/* Nekud Editorial: nekud.click content components (block styles and nk-* markup in existing posts).
 * Styles only: post content is never modified in the database. */

/* No sideways scrolling anywhere: long words, URLs and wide embeds stay inside their column. */
html, body { overflow-x: clip; }
.nk-article__grid > *, .nk-prose, .nk-notes, .nk-toc { min-width: 0; }
.nk-prose :where(p, li, td, th, h2, h3, h4, figcaption, dd, dt, blockquote), .nk-refs li { overflow-wrap: anywhere; }
.nk-prose :where(img, video, iframe, embed, object, svg, canvas) { max-width: 100%; height: auto; }
.nk-prose iframe { width: 100%; }
.nk-prose pre { overflow-x: auto; max-width: 100%; white-space: pre-wrap; }

/* Notes rail and reference pop-up: long URLs wrap instead of overflowing. */
.nk-notes, .nk-notes * , .nk-pop, .nk-pop * { overflow-wrap: anywhere; word-break: normal; }
.nk-notes { max-width: 100%; }
.nk-notes a, .nk-pop a { word-break: break-word; overflow-wrap: anywhere; }

/* House rule: typographic links read in the colour of the text around them, underlined so they stay visible.
   Boxed controls (buttons, chips, pills, related-note cards) are excluded: this rule's
   border-bottom: 0 is specific enough to punch a hole in a 4-sided box border. */
.nk-prose a:not(.nk-cite__link):not(.nk-btn):not(.wp-block-button__link):not(.nkp-tile):not(.nk-merchants-switch__item):not(.nk-merchants-pager a):not(.nk-family-pager a):not(.nk-family-back):not(.btn-primary):not(.btn-secondary):not(.related-note-card):not(.topic-link-card):not(.on-page-related-card):not(.nk-chip):not(.nk-places-chip):not(.nk-places-card):not(.nk-epub):not(.filter-pill):not(.hub-hero-pill-btn):not(.nk-tx-card):not(.nk-tx-filter a):not(.nk-txg__nav a), .nk-refs a, .nk-notes a, .nk-pop a {
  color: inherit; border-bottom: 0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em;
  text-decoration-color: color-mix(in srgb, currentColor 34%, transparent);
}
.nk-prose a:not(.nk-cite__link):not(.nk-btn):not(.wp-block-button__link):not(.nkp-tile):not(.nk-merchants-switch__item):not(.nk-merchants-pager a):not(.nk-family-pager a):not(.nk-family-back):not(.btn-primary):not(.btn-secondary):not(.related-note-card):not(.topic-link-card):not(.on-page-related-card):not(.nk-chip):not(.nk-places-chip):not(.nk-places-card):not(.nk-epub):not(.filter-pill):not(.hub-hero-pill-btn):not(.nk-tx-card):not(.nk-tx-filter a):not(.nk-txg__nav a):hover, .nk-refs a:hover, .nk-notes a:hover, .nk-pop a:hover,
.nk-prose a:not(.nk-cite__link):not(.nk-btn):not(.wp-block-button__link):not(.nkp-tile):not(.nk-merchants-switch__item):not(.nk-merchants-pager a):not(.nk-family-pager a):not(.nk-family-back):not(.btn-primary):not(.btn-secondary):not(.related-note-card):not(.topic-link-card):not(.on-page-related-card):not(.nk-chip):not(.nk-places-chip):not(.nk-places-card):not(.nk-epub):not(.filter-pill):not(.hub-hero-pill-btn):not(.nk-tx-card):not(.nk-tx-filter a):not(.nk-txg__nav a):focus-visible, .nk-refs a:focus-visible { color: var(--nk-c-accent-text, #8B6914); text-decoration-color: var(--nk-c-accent, #d4a537); }

/* Boxed link-pills and chips keep a complete 4-sided border, including unclassed
   section filters (.nk-tx-filter a). Do not force a colour, so hover gold still wins. */
.nk-prose :is(
  .nk-tx-filter a, .nk-txg__nav a,
  a.on-page-related-card, a.related-note-card, a.topic-link-card,
  a.nk-btn, a.nk-chip, a.nk-places-chip, a.nk-places-card, a.nk-epub,
  a.filter-pill, a.hub-hero-pill-btn, a.nk-tx-card,
  a[class*="chip"], a[class*="pill"]
) {
  border-bottom-width: var(--nk-border-w, 1px);
  border-bottom-style: solid;
  text-decoration: none;
}

/* Compact rounded controls: squircle (superellipse(2)) on a capsule-sized radius
   paints a full computed border, but the bottom stroke renders faint or missing.
   Use a circular corner so the 1px stroke is even on all four sides. */
.nk-btn, .nk-chip, .nk-places-chip, .nk-tx-filter a, .nk-txg__nav a, .filter-pill, .hub-hero-pill-btn {
  corner-shape: round;
}
.nk-refs .nk-back, .nk-prose .nk-back { text-decoration: none; opacity: .7; }

/* Boxes: Key findings and callouts. */
.nk-prose :is(.is-style-fl-key-findings, .is-style-fl-callout, .nk-callout, .nk-box) {
  background: var(--nk-c-surface, #eef0f3); border-left: 3px solid var(--nk-c-accent, #d4a537);
  padding: var(--nk-space-6) var(--nk-space-6) var(--nk-space-5);
  border-radius: 0 calc(var(--nk-radius-card) * .6 * var(--nk-sq-k)) calc(var(--nk-radius-card) * .6 * var(--nk-sq-k)) 0;
  font-size: .95em; margin-block: 1.8em;
}
.nk-prose .is-style-fl-callout { background: var(--nk-c-pastel-3); }
.nk-prose :is(.is-style-fl-key-findings, .is-style-fl-callout) > :first-child { margin-top: 0; }
.nk-prose :is(.is-style-fl-key-findings, .is-style-fl-callout) :is(h2, h3, h4) {
  font-variant: small-caps; letter-spacing: .05em; font-size: 1.02em; margin: 0 0 .5em; color: var(--nk-c-heading);
}
.nk-prose :is(.is-style-fl-key-findings, .is-style-fl-callout) ul { margin: 0; }
html[data-mode="dark"] .nk-prose :is(.is-style-fl-key-findings, .is-style-fl-callout, .nk-callout, .nk-box) { background: color-mix(in srgb, var(--nk-c-accent) 10%, var(--nk-c-surface)); }

.nk-prose .is-style-fl-standfirst { font-size: 1.15em; line-height: 1.5; color: var(--nk-c-heading); }
.nk-prose ol.is-style-fl-references { list-style: none; counter-reset: nkref; padding-left: 2.4em; font-size: .88em; }
.nk-prose ol.is-style-fl-references > li { counter-increment: nkref; position: relative; }
.nk-prose ol.is-style-fl-references > li::before { content: "[" counter(nkref) "]"; position: absolute; left: -2.4em; width: 2em; text-align: right; font-variant-numeric: tabular-nums; opacity: .75; }
.nk-prose :is(table.is-style-fl-data, .is-style-fl-data table, .nk-table table) { font-variant-numeric: tabular-nums; }
.nk-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nk-prose table { border-collapse: collapse; width: 100%; font-size: .9em; }
.nk-prose :is(th, td) { padding: .45em .6em; border-bottom: 1px solid var(--nk-c-border-soft); text-align: left; vertical-align: top; }
.nk-prose th { font-weight: 600; color: var(--nk-c-heading); }
.nk-prose .is-style-fl-pull, .nk-prose .wp-block-pullquote { border-left: 0; padding: var(--nk-space-4) 0; margin-block: 2em; text-align: center; font-family: var(--nk-f-pageHeading-family); font-size: 1.3em; line-height: 1.35; color: var(--nk-c-heading); border-top: 2px solid var(--nk-c-accent, #d4a537); border-bottom: 1px solid var(--nk-c-border-soft); }
.nk-prose .is-style-fl-pull cite { font-family: var(--nk-f-body-family); font-size: .65em; opacity: .75; }

/* Timelines (nk-timeline): click a row to open it. */
.nk-prose ol.nk-timeline, .nk-prose ul.nk-timeline { list-style: none; padding: 0 0 0 1.4em; margin: 1.6em 0; border-left: 2px solid var(--nk-c-accent); }
.nk-timeline > li { position: relative; margin: 0 0 .4em; }
.nk-timeline > li::before { content: ""; position: absolute; left: calc(-1.4em - 7px); top: .9em; width: 12px; height: 12px; border-radius: 50%; background: var(--nk-c-bg); border: 2px solid var(--nk-c-accent); box-sizing: border-box; }
.nk-timeline > li.is-open::before { background: var(--nk-c-accent); }
.nk-tl-head { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 1em; align-items: baseline; width: 100%; padding: .45em .7em; border-radius: 10px; }
.nk-tl-head:hover { background: color-mix(in srgb, var(--nk-c-accent) 9%, transparent); }
.nk-tl-head:focus-visible { outline: 2px solid var(--nk-c-accent); outline-offset: 2px; }
.nk-tl-year { font-weight: 700; color: var(--nk-c-accent); min-width: 6.5em; font-variant-numeric: tabular-nums; }
.nk-tl-title { font-weight: 600; color: var(--nk-c-heading); }
.nk-tl-body { display: none; padding: .1em .7em .6em 8.2em; }
.nk-tl-body > :first-child { margin-top: 0; }
.nk-timeline > li.is-open .nk-tl-body, .no-js .nk-tl-body { display: block; }
@media (max-width: 700px) { .nk-tl-head { flex-direction: column; gap: .1em; } .nk-tl-body { padding-left: .7em; } }

/* Figures, maps, diagrams, glossary, bibliography. */
.nk-prose .nk-figure figcaption, .nk-prose figure figcaption { font-size: .85em; color: var(--nk-c-muted, inherit); text-align: center; }
.nk-prose figure.wp-block-image .nk-media, .nk-prose figure.wp-block-image { aspect-ratio: auto; }
.nk-prose figure.wp-block-image img { height: auto; object-fit: contain; }
.nk-prose :is(.nk-map, .nk-diagram, [class*="nk-map-"]) { max-width: 100%; overflow: hidden; border-radius: calc(var(--nk-radius-media) * var(--nk-sq-k)); }
.nk-prose .nk-glossary dt { font-weight: 600; color: var(--nk-c-heading); margin-top: .8em; }
.nk-prose .nk-glossary dd { margin: .2em 0 0; }
.nk-prose .nk-bibliography { font-size: .88em; }
.nk-prose .nk-bibliography li { padding-left: 1.6em; text-indent: -1.6em; list-style: none; }
.nk-prose .nk-part, .nk-prose .nk-toc-part { font-variant: small-caps; letter-spacing: .08em; color: var(--nk-c-accent); }

/* Merged articles: part openers. */
.nk-prose hr.wp-block-separator { border: 0; height: 2px; background: var(--nk-c-accent, #d4a537); margin: 2.4em auto; width: 28%; }

/* About page (page 959, nk-about--v2): the nekud-about-page plugin styles its own sections;
 * the theme gives it a full-width stage without side rails. */
.nk-article--about .nk-article__grid { grid-template-columns: minmax(0, 1fr); }
.nk-article--about .nk-toc, .nk-article--about .nk-notes { display: none; }
.nk-article--about .nk-prose { max-width: min(1100px, 100%); }
.nk-article--about .nk-prose > .nk-about { margin-top: 0; }
.nk-article--about .nk-prose .nk-about :is(h2, h3) { scroll-margin-top: calc(var(--nk-header-h) + var(--nk-space-6)); }

/* Wordmark (the site's Segol trio artwork, letters in the theme's ink). */
.nk-brand__wordmark { display: block; height: 30px; width: auto; color: var(--nk-c-heading); }
.nk-footer .nk-brand__wordmark { height: 34px; }
@media (max-width: 600px) { .nk-brand__wordmark { height: 24px; } }

.nk-prose :is(.nkp-jump a, .nkp-tile, .nk-merchants-switch__item, .nk-merchants-pager a, .nk-merchants-crumbs a, .nk-family-pager a, .nk-family-back, .nkp-toggle, .nkp-tool, .nkp-close) {
  text-decoration: none;
  text-decoration-color: transparent;
}

/* Family pages already have the merch breadcrumb; hide the theme trail only there. */
body.nk-family-page:has(.nk-merchants-crumbs) .nk-article__head nav.nk-crumbs:not(.nk-merchants-crumbs) { display: none; }


/* Filled Transmission / legacy primary buttons: light text on navy (the prose
   link colour would otherwise inherit navy-on-navy). */
html body .nk-prose.nk-prose a.btn-primary,
html body a.btn-primary,
html body .nk-tx .btn-primary,
html body .nk-tx .btn-primary span {
  color: #fff;
  background: var(--nk-c-primary, #14223d);
  border: 1px solid var(--nk-c-primary, #14223d);
  text-decoration: none;
}
html body .nk-prose.nk-prose a.btn-primary:hover,
html body .nk-prose.nk-prose a.btn-primary:focus-visible,
html body a.btn-primary:hover,
html body a.btn-primary:focus-visible,
html body .nk-tx .btn-primary:hover,
html body .nk-tx .btn-primary:focus-visible,
html body .nk-tx .btn-primary:hover span,
html body .nk-tx .btn-primary:focus-visible span {
  color: #14223d;
  background: var(--nk-c-accent, #d4a537);
  border-color: var(--nk-c-accent, #d4a537);
  text-decoration: none;
}

/* Clearer borders on cards, chips, buttons and boxes; gold edge on hover. */
.nk-tx { --border-color: var(--nk-c-border, #b9c0cb); }
.nk-tx .related-note-card,
.nk-tx a.topic-link-card,
.nk-tx a.on-page-related-card,
.nk-tx .nk-tx-filter a,
.nk-tx .nk-txg__nav a,
.nk-tx .ornate-card,
.nk-card, .nk-tile, .nk-places-card,
.nk-prose :is(.nk-callout, .nk-box, .is-style-fl-key-findings, .is-style-fl-callout) {
  border: 1px solid var(--nk-c-border, #b9c0cb);
}
.nk-chip, .nk-btn:not(.nk-btn--primary), .nk-places-chip, .nk-select, .nk-input {
  border-color: var(--nk-c-border, #b9c0cb);
}
.nk-tx .related-note-card:hover,
.nk-tx .related-note-card:focus-visible,
.nk-tx a.topic-link-card:hover,
.nk-tx a.topic-link-card:focus-visible,
.nk-tx a.on-page-related-card:hover,
.nk-tx a.on-page-related-card:focus-visible,
.nk-tx .nk-tx-filter a:hover,
.nk-tx .nk-tx-filter a:focus-visible,
.nk-tx .nk-txg__nav a:hover,
.nk-tx .nk-txg__nav a:focus-visible,
.nk-card:hover, .nk-tile:hover,
a.nk-places-card:hover, a.nk-places-card:focus-visible,
.nk-chip:hover, .nk-chip:focus-visible,
.nk-places-chip:hover, .nk-places-chip:focus-visible,
.nk-btn:not(.nk-btn--primary):hover,
.nk-btn:not(.nk-btn--primary):focus-visible {
  border-color: var(--nk-c-accent, #d4a537);
}
a:focus-visible, button:focus-visible, .nk-chip:focus-visible, .nk-btn:focus-visible {
  outline: 2px solid var(--nk-c-focus, #d4a537);
  outline-offset: 2px;
}
