/**
 * The Verifera Encyclopaedia — commercial-grade surface.
 *
 * Mirrors the Camden encyclopaedia's shared two-surface aesthetic (the locked Alt-B system):
 * cream apothecary ground, Cormorant Garamond editorial headings + DM Sans body, Navy/Gold,
 * faceted card-grid archives + single entries with a sticky scroll-spy "On this page" rail.
 * Same navigation/scroll/layout as the Health edition; careers output. Self-contained (scoped
 * to .vf-enc*) so it is theme-independent. Fonts are already self-hosted by the theme.
 */

.vf-enc {
	/* ── tokens: defined by assets/tokens.enc.css (canon values, --enc-*) +
	   assets/tokens.css (generated --vf- alias shim + locals) — enqueued as
	   dependencies of this stylesheet. NO values are defined here (0-hex rule);
	   canon home = platform-core src/Design (L-TOK R2 cutover 2026-07-04). ── */
	background: var(--vf-cream);
	color: var(--vf-ink);
	font-family: var(--f-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.vf-enc *, .vf-enc *::before, .vf-enc *::after { box-sizing: border-box; }
.vf-enc__wrap { max-width: var(--vf-maxw); margin: 0 auto; padding: 0 24px; }

/* ── shared chrome: breadcrumb + eyebrow ── */
.vf-breadcrumbs, .vf-enc__crumb {
	font-family: var(--f-body); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
	color: var(--vf-ink-soft); margin: 0 0 .9rem; display: flex; flex-wrap: wrap; gap: .35rem .5rem;
}
.vf-breadcrumbs a, .vf-enc__crumb a { color: var(--vf-ink-soft); text-decoration: none; }
.vf-breadcrumbs a:hover, .vf-enc__crumb a:hover { color: var(--vf-navy); }
.vf-breadcrumbs .sep, .vf-enc__crumb .sep { opacity: .5; }
.vf-enc__eyebrow {
	font-family: var(--f-body); font-size: 12.5px; font-weight: 500; letter-spacing: .08em;
	text-transform: uppercase; color: var(--vf-gold-ink); margin: 0 0 .5rem;
}
.vf-enc__eyebrow .tm { font-size: .7em; vertical-align: super; }

/* ── hero ── */
.vf-enc__hero { padding: 56px 0 28px; border-bottom: 1px solid var(--vf-line); }
.vf-enc__hero h1 {
	font-family: var(--f-disp); font-weight: 600; font-size: clamp(2.1rem, 1.4rem + 2.6vw, 2.75rem);
	line-height: 1.1; letter-spacing: -.02em; color: var(--vf-navy); margin: 0 0 .4rem;
}
.vf-enc__lede { font-size: 1.0625rem; line-height: 1.65; color: var(--vf-ink-soft); max-width: 48rem; margin: .5rem 0 0; }
.vf-enc__stats { list-style: none; display: flex; flex-wrap: wrap; gap: 1.75rem; margin: 1.5rem 0 0; padding: 0; }
.vf-enc__stats li { font-size: .9rem; color: var(--vf-ink-soft); }
.vf-enc__stats strong { display: block; font-size: 1.6rem; font-weight: 600; color: var(--vf-green); font-family: var(--f-body); }

/* ── two-column layout (archive + single share it) ── */
.vf-enc__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 32px 0 64px; align-items: start; }
.vf-enc__layout--single { grid-template-columns: minmax(0, 1fr) 240px; }
/* The archive's two children are PLACED, never auto-placed. Auto-placement is what broke
   this layout once already: a script-injected third child took the main cell and pushed the
   card grid into the sidebar column on the next row, where the sticky aside then scrolled
   straight over the cards (measured on verifera.co.uk at 1024px, 2026-09-18). Explicit
   columns mean a stray child costs a row, never the main column. */
.vf-enc__layout > .vf-enc__facets { grid-column: 1; }
.vf-enc__layout > .vf-enc__grid { grid-column: 2; }

/* ── facet sidebar (archive) ── */
.vf-enc__facets { position: sticky; top: 24px; }
.vf-enc__search { position: relative; margin: 0 0 1.5rem; }
.vf-enc__search input {
	width: 100%; padding: .7rem .9rem .7rem 2.2rem; font: inherit; font-size: .95rem;
	border: 1px solid var(--vf-line); border-radius: var(--vf-radius-sm); background: var(--vf-card); color: var(--vf-ink);
}
.vf-enc__search input:focus { outline: none; border-color: var(--vf-navy-500); box-shadow: 0 0 0 3px rgba(27, 58, 122, .12); }
.vf-enc__search::before { content: "⌕"; position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--vf-ink-soft); font-size: 1.05rem; }
.vf-facet-group { margin: 0 0 1.4rem; }
.vf-facet-group h3 {
	font-family: var(--f-body); font-size: 12.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase;
	color: var(--vf-ink-soft); margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--vf-line);
}
.vf-facet-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.vf-facet-group a {
	display: flex; justify-content: space-between; gap: .5rem; align-items: baseline;
	padding: .32rem .5rem; border-radius: 6px; text-decoration: none; color: var(--vf-ink); font-size: .92rem;
}
.vf-facet-group a:hover { background: var(--vf-gold-pale); }
.vf-facet-group a[aria-current="true"] { background: var(--vf-navy); color: #fff; }
.vf-facet-group .n { color: var(--vf-ink-soft); font-size: .8rem; }
.vf-facet-group a[aria-current="true"] .n { color: rgba(255, 255, 255, .7); }

/* ── card grid (archive) ── */
.vf-enc__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 18px; }
.vf-enc-card {
	display: flex; flex-direction: column; gap: .5rem; padding: 20px 20px 18px; background: var(--vf-card);
	border: 1px solid var(--vf-line); border-radius: var(--vf-radius); box-shadow: var(--vf-shadow);
	text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease;
}
.vf-enc-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(6, 22, 69, .06), 0 14px 36px rgba(6, 22, 69, .1); }
.vf-enc-card__type { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--vf-gold-ink); font-weight: 500; }
.vf-enc-card__title { font-family: var(--f-disp); font-weight: 600; font-size: 1.3rem; line-height: 1.2; color: var(--vf-navy); margin: 0; }
.vf-enc-card__excerpt { font-size: .9rem; color: var(--vf-ink-soft); line-height: 1.5; margin: 0; }
.vf-enc-card__foot { margin-top: auto; padding-top: .6rem; display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--vf-ink-soft); }
.vf-enc__empty { padding: 3rem 1rem; text-align: center; color: var(--vf-ink-soft); grid-column: 1 / -1; }

/* ── single entry ── */
.vf-enc-entry__main { min-width: 0; }
.vf-enc-entry__main h2 { font-family: var(--f-disp); font-weight: 600; font-size: 1.85rem; line-height: 1.2; color: var(--vf-navy); letter-spacing: -.01em; margin: 2.2rem 0 .6rem; scroll-margin-top: 90px; }
.vf-enc-entry__main h3 { font-size: 1.25rem; font-weight: 600; color: var(--vf-navy); margin: 1.6rem 0 .4rem; }
.vf-enc-entry__main p, .vf-enc-entry__main li { font-size: 1.0625rem; line-height: 1.7; }
.vf-enc-entry__main p { max-width: var(--vf-prose); }
.vf-enc-entry__main a { color: var(--vf-green); text-underline-offset: 2px; }

/* sticky "On this page" rail with scroll-spy */
.vf-toc { position: sticky; top: 24px; font-size: .9rem; }
.vf-toc__title { font-family: var(--f-body); font-size: 12px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--vf-ink-soft); margin: 0 0 .7rem; }
.vf-toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--vf-line); display: flex; flex-direction: column; }
.vf-toc a { display: block; padding: .3rem 0 .3rem .9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--vf-ink-soft); text-decoration: none; line-height: 1.35; }
.vf-toc a:hover { color: var(--vf-navy); }
.vf-toc a.is-active { color: var(--vf-navy); border-left-color: var(--vf-gold); font-weight: 500; }

/* ── the "Sources checked" date mark ── */
.vf-mark-wrap { margin: 0 0 1.5rem; }
.vf-mark { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 500; letter-spacing: .02em; padding: .35rem .75rem; border-radius: 999px; }
.vf-mark--verified { background: var(--vf-gold-pale); color: var(--vf-gold-ink); }
.vf-mark--review { background: #eef1f6; color: var(--vf-navy-500); }

/* ── provenance + related ── */
.vf-provenance { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px solid var(--vf-gold); font-size: .9rem; }
.vf-provenance h2 { font-family: var(--f-disp); font-size: 1.4rem; color: var(--vf-navy); margin: 0 0 .6rem; }
.vf-provenance ul { list-style: none; margin: 0; padding: 0; }
.vf-provenance li { padding: .4rem 0; border-bottom: 1px solid var(--vf-line); }
.vf-provenance a { color: var(--vf-green); }
/* "Sources and regulators" - the authoritative bodies behind an entry's facts. */
.vf-authority { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 2px solid var(--vf-gold); font-size: .9rem; }
.vf-authority h2 { font-family: var(--f-disp); font-size: 1.4rem; color: var(--vf-navy); margin: 0 0 .6rem; }
.vf-authority__list { list-style: none; margin: 0; padding: 0; }
.vf-authority__item { padding: .4rem 0; border-bottom: 1px solid var(--vf-line); }
.vf-authority__name { color: var(--vf-green); font-weight: 600; }
.vf-authority__role { display: inline-block; margin-left: .5rem; padding: .05rem .5rem; border: 1px solid var(--vf-line); border-radius: 999px; font-size: .78rem; }
.vf-authority__verified { margin-left: .5rem; font-size: .8rem; opacity: .8; }
.vf-disclaimer { margin-top: 1rem; font-size: .82rem; color: var(--vf-ink-soft); max-width: var(--vf-prose); }
.vf-flag { cursor: help; }
.vf-related { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--vf-line); }
.vf-related h2 { font-family: var(--f-disp); font-size: 1.4rem; color: var(--vf-navy); margin: 0 0 .6rem; }
.vf-related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.vf-related a { color: var(--vf-green); text-decoration: none; padding: .4rem 0; }
.vf-related a:hover { text-decoration: underline; }

/* ── cross-edition note ── */
.vf-enc__edition-note { margin-top: 2.5rem; padding: 1.1rem 1.25rem; background: var(--vf-gold-pale); border-radius: var(--vf-radius); font-size: .9rem; color: var(--vf-gold-ink); }
.vf-enc__edition-note a { color: var(--vf-navy); font-weight: 500; }

/* ── responsive ── */
@media (max-width: 900px) {
	.vf-enc__layout, .vf-enc__layout--single { grid-template-columns: 1fr; gap: 24px; }
	/* one column: release the placement above, or column 2 would be implicit and off-screen */
	.vf-enc__layout > .vf-enc__facets, .vf-enc__layout > .vf-enc__grid { grid-column: auto; }
	.vf-enc__facets, .vf-toc { position: static; }
	.vf-toc { order: -1; padding: 1rem; background: var(--vf-card); border: 1px solid var(--vf-line); border-radius: var(--vf-radius); }
	.vf-toc ul { border-left: 0; }
	.vf-toc a { border-left: 0; padding-left: 0; }
	.vf-enc__hero { padding: 36px 0 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEPTH MODEL — schema v2 (2026-07-24)
   The tiered `sections` object rendered by render_sections(). Four shapes only
   (kv/row list · staged ladder · html blob · citation marker), so a new section
   declared in content/_sections.json styles itself with no CSS change.
   0-hex rule: every value is a token from tokens.enc.css — canon home is
   platform-core src/Design (L-TOK R2).
   ═══════════════════════════════════════════════════════════════════════════ */

.vf-enc-s { margin: var(--vf-space-24) 0 0; padding-top: var(--vf-space-24); border-top: 1px solid var(--vf-line); }
.vf-enc-s > h2 { font-family: var(--f-disp); font-size: var(--vf-fs-h1-editorial); color: var(--vf-navy); margin: 0 0 var(--vf-space-16); }

/* ── the citation marker: every figure links to the dated fact holding it up ── */
.vf-cite {
	font-family: var(--f-body); font-size: var(--vf-fs-caption); font-variant-numeric: tabular-nums;
	color: var(--vf-gold-ink); background: var(--vf-gold-pale); border-radius: var(--vf-radius-chip);
	padding: 0 .35em; margin-left: .3em; text-decoration: none; vertical-align: super; line-height: 1;
}
.vf-cite:hover, .vf-cite:focus-visible { background: var(--vf-gold); color: var(--vf-navy); }

/* ── row-shaped sections: at_a_glance · routes · costs · myths · pitfalls … ── */
.vf-rows { margin: 0; display: grid; gap: var(--vf-space-12); }
.vf-row { display: grid; grid-template-columns: minmax(9rem, 15rem) 1fr; gap: var(--vf-space-4) var(--vf-space-16); align-items: baseline; }
.vf-row dt { font-weight: 600; color: var(--vf-navy); margin: 0; }
.vf-row dd { margin: 0; color: var(--vf-ink-soft); }
.vf-row dd em { color: var(--vf-ink); font-style: normal; display: block; margin-top: var(--vf-space-4); }
/* Myths read as claim-then-correction, so the term column carries the contradicted claim. */
.vf-rows--myths .vf-row dt { font-weight: 500; color: var(--vf-ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.vf-rows--myths .vf-row dd { color: var(--vf-ink); }

/* ── the staged ladder: timeline · earnings ── */
.vf-total { font-size: var(--vf-fs-body-lg); color: var(--vf-ink); margin: 0 0 var(--vf-space-16); }
.vf-total strong { font-family: var(--f-disp); font-size: var(--vf-fs-display); color: var(--vf-navy); }
.vf-ladder { list-style: none; margin: 0; padding: 0 0 0 var(--vf-space-24); position: relative; }
.vf-ladder::before { content: ""; position: absolute; left: 5px; top: .6em; bottom: .6em; width: 2px; background: var(--vf-line); }
.vf-stage { position: relative; padding-bottom: var(--vf-space-16); }
.vf-stage::before {
	content: ""; position: absolute; left: calc(-1 * var(--vf-space-24) + 1px); top: .5em;
	width: 10px; height: 10px; border-radius: var(--vf-radius-pill);
	background: var(--vf-gold); border: 2px solid var(--vf-cream);
}
.vf-stage__h { display: flex; flex-wrap: wrap; gap: var(--vf-space-8); align-items: baseline; }
.vf-stage__n { font-weight: 600; color: var(--vf-navy); }
.vf-stage p { margin: var(--vf-space-4) 0 0; color: var(--vf-ink-soft); }
.vf-stage__f { font-size: var(--vf-fs-meta); color: var(--vf-ink-3); }
.vf-dur, .vf-pay {
	font-family: var(--f-body); font-size: var(--vf-fs-meta); letter-spacing: var(--vf-track-meta);
	text-transform: uppercase; color: var(--vf-navy); background: var(--vf-cream-deep);
	border-radius: var(--vf-radius-label); padding: .15em .5em; white-space: nowrap;
}
/* A milestone is an instant, not a span — styled as a marker so it never reads as a duration. */
.vf-dur--milestone { background: transparent; color: var(--vf-ink-3); border: 1px dashed var(--vf-line); }

@media (max-width: 640px) {
	.vf-row { grid-template-columns: 1fr; }
	.vf-row dt { margin-bottom: var(--vf-space-4); }
}

/* Honest-absence marker: a figure known to exist but not yet primary-source checked.
   Rendered where the number would be, never in place of the row — silence would read as
   "this cost does not exist", and a plausible number would be a lie. */
.vf-pending {
	font-family: var(--f-body); font-size: var(--vf-fs-meta); letter-spacing: var(--vf-track-meta);
	text-transform: uppercase; color: var(--vf-ink-3); background: transparent;
	border: 1px dashed var(--vf-line); border-radius: var(--vf-radius-label);
	padding: .15em .5em; white-space: nowrap;
}

/* ── Derived indices (/time-to-qualify/, /cost-to-qualify/) ── */
.vf-index { width: 100%; border-collapse: collapse; margin: var(--vf-space-24) 0; font-size: var(--vf-fs-body); }
.vf-index th, .vf-index td { text-align: left; padding: var(--vf-space-12) var(--vf-space-8); border-bottom: 1px solid var(--vf-line); vertical-align: baseline; }
.vf-index thead th {
	font-family: var(--f-body); font-size: var(--vf-fs-meta); letter-spacing: var(--vf-track-meta);
	text-transform: uppercase; color: var(--vf-ink-soft); border-bottom: 2px solid var(--vf-navy);
}
.vf-index tbody th { font-weight: 600; }
.vf-index tbody tr:hover { background: var(--vf-cream-deep); }
.vf-index__date { font-size: var(--vf-fs-meta); color: var(--vf-ink-3); white-space: nowrap; }
@media (max-width: 640px) { .vf-index { display: block; overflow-x: auto; } }

/* ── Citation witness: what the last re-check found, beside each source ── */
.vf-witness {
	font-family: var(--f-body); font-size: var(--vf-fs-caption); letter-spacing: var(--vf-track-meta);
	text-transform: uppercase; border-radius: var(--vf-radius-label); padding: .1em .45em; white-space: nowrap;
}
.vf-witness--intact, .vf-witness--moved { color: var(--vf-safe-ok); border: 1px solid var(--vf-safe-ok); }
.vf-witness--changed, .vf-witness--gone { color: var(--vf-safe-watch); border: 1px solid var(--vf-safe-watch); }
/* The archived passage — shown only once the live source no longer says what we cited,
   so a rotted citation becomes dated evidence instead of a dead end. */
.vf-archived { margin: var(--vf-space-8) 0 0; font-size: var(--vf-fs-caption); }
.vf-archived summary { cursor: pointer; color: var(--vf-ink-soft); }
.vf-archived blockquote {
	margin: var(--vf-space-8) 0 0; padding: var(--vf-space-8) var(--vf-space-12);
	border-left: 3px solid var(--vf-gold); background: var(--vf-cream-deep); color: var(--vf-ink);
}

/* ── Reform diff: what the source said, and what it says now ── */
.vf-diff__head { margin: var(--vf-space-12) 0 var(--vf-space-4); font-size: var(--vf-fs-caption);
	letter-spacing: var(--vf-track-meta); text-transform: uppercase; color: var(--vf-ink-soft); }
.vf-diff__body { margin: 0; line-height: 1.9; }
.vf-diff { border-radius: var(--vf-radius-chip); padding: .05em .3em; }
del.vf-diff { background: var(--vf-safe-harm-bg); color: var(--vf-safe-harm); text-decoration: line-through; }
ins.vf-diff { background: var(--vf-verif-bg); color: var(--vf-safe-ok); text-decoration: none; }

/* ── Archive: order-by control (script-injected; absent without JS) ── */
.vf-enc__grid > .vf-sortbar { grid-column: 1 / -1; }
.vf-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vf-space-8); margin: 0 0 var(--vf-space-16); }
.vf-sortbar__l { font-size: var(--vf-fs-meta); letter-spacing: var(--vf-track-meta);
	text-transform: uppercase; color: var(--vf-ink-soft); }
.vf-sortbar button {
	font: inherit; font-size: var(--vf-fs-caption); cursor: pointer; color: var(--vf-ink-soft);
	background: transparent; border: 1px solid var(--vf-line); border-radius: var(--vf-radius-pill);
	padding: .25em .8em;
}
.vf-sortbar button:hover { border-color: var(--vf-navy); color: var(--vf-navy); }
.vf-sortbar button.is-active { background: var(--vf-navy); border-color: var(--vf-navy); color: var(--vf-paper); }

/* ── Route comparator (script-injected) ── */
.vf-compare__box { margin-right: .5em; vertical-align: middle; accent-color: var(--vf-navy); }
.vf-compare:empty { display: none; }
.vf-compare {
	margin: var(--vf-space-12) 0 0; padding: var(--vf-space-8) var(--vf-space-12);
	background: var(--vf-cream-deep); border-left: 3px solid var(--vf-gold);
	border-radius: var(--vf-radius-sm); font-weight: 600; color: var(--vf-navy);
}

/* ── Quote-first fact cards (nl edition; rendered only where the market sets fact_cards) ── */
.vf-card { margin: var(--vf-space-12) 0 var(--vf-space-24); padding: 0; }
.vf-card blockquote { margin: 0; padding: var(--vf-space-8) var(--vf-space-12); border-left: 3px solid var(--vf-gold); background: var(--vf-cream-deep); }
.vf-card blockquote p { margin: 0; }
.vf-card__en, .vf-card__src { margin: var(--vf-space-8) 0 0; font-size: var(--vf-fs-meta); color: var(--vf-ink-soft); }
.vf-card__label { font-family: var(--f-body); letter-spacing: var(--vf-track-meta); text-transform: uppercase; color: var(--vf-ink-3); margin-right: .4em; }
.vf-card__valid { margin-left: .4em; }
.vf-card--absent { color: var(--vf-ink-soft); }
