/* ==========================================================================
   FizzFellowShowtck — Nomad Ledger
   Premium financial-editorial stylesheet (vanilla CSS, no frameworks)
   Palette: Deep Emerald, Antique Gold, Champagne Gold, Warm Ivory (no blue)
   ========================================================================== */

:root {
  --emerald: #176B4D;
  --emerald-deep: #0F5239;
  --gold: #B88B45;
  --gold-text: #7A5A26;
  --champagne: #D6BD82;
  --ivory: #F3F0E7;
  --surface: #FFFDF8;
  --dark: #252D28;
  --dark-2: #1C231F;
  --text: #292F2A;
  --muted: #7F857C;
  --muted-text: #5C6259;
  --sage: #C5D6C2;
  --border: #DCDDD2;
  --copper: #C88A70;
  --copper-text: #8F5640;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Hoefler Text", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(37, 45, 40, .06), 0 12px 32px -14px rgba(37, 45, 40, .28);
  --shadow-lift: 0 2px 4px rgba(37, 45, 40, .08), 0 24px 48px -18px rgba(37, 45, 40, .38);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--ivory);
  /* ledger-grid-paper-texture */
  background-image:
    linear-gradient(rgba(220, 221, 210, .38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 221, 210, .38) 1px, transparent 1px);
  background-size: 48px 48px;
}
::selection { background: var(--champagne); color: var(--dark); }
img { max-width: 100%; display: block; }
a { color: var(--emerald); text-underline-offset: 3px; }
a:visited { color: var(--emerald); }
a:hover { color: var(--emerald-deep); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--dark); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.32rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2rem; }
.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.small { font-size: .86rem; color: var(--muted-text); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--emerald); color: #fff; padding: .6rem 1rem; z-index: 200; border-radius: 0 0 8px 8px; }
.skip-link:focus { left: 1rem; color: #fff; }

/* ---------- Header (non-sticky) ---------- */
.site-header { position: relative; z-index: 30; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--dark); }
.brand:visited { color: var(--dark); }
.brand-mark { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.brand-name { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.1; }
.brand-sub { display: block; font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); font-weight: 700; }
.primary-nav { display: flex; align-items: center; gap: .6rem; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .1rem; }
.primary-nav a { display: block; padding: .45rem .68rem; border-radius: 999px; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 500; transition: background .2s, color .2s; }
.primary-nav a:hover { background: var(--sage); color: var(--dark); }
.primary-nav a[aria-current="page"] { background: var(--emerald); color: #fff; }
.saved-toggle { display: inline-flex; align-items: center; gap: .4rem; border: 1.5px solid var(--gold); background: transparent; color: var(--dark); border-radius: 999px; padding: .42rem .85rem; font: 600 .86rem var(--sans); cursor: pointer; white-space: nowrap; }
.saved-toggle:hover { background: var(--champagne); }
.saved-count { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .3rem; border-radius: 999px; background: var(--emerald); color: #fff; font-size: .75rem; }
.nav-toggle { display: none; align-items: center; gap: .55rem; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: .5rem .9rem; font: 600 .9rem var(--sans); color: var(--dark); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: var(--dark); border-radius: 2px; position: relative; transition: transform .3s, background .3s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); padding: 0 1.25rem; max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .4s ease, padding .4s ease, visibility .4s; }
  .primary-nav.open { max-height: 85vh; overflow: auto; visibility: visible; padding: 1rem 1.25rem 1.4rem; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { padding: .8rem 1rem; font-size: 1rem; border-radius: 12px; }
  .saved-toggle { justify-content: center; margin-top: .6rem; padding: .7rem; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .74rem 1.2rem; border-radius: 999px; font: 600 .92rem/1.1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s, color .2s, border-color .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-primary:visited { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-deep); color: #fff; box-shadow: 0 8px 20px -10px rgba(23, 107, 77, .8); }
.btn-outline, .btn-outline:visited { background: transparent; border-color: var(--gold); color: var(--dark); }
.btn-outline:hover { background: var(--champagne); color: var(--dark); }
.btn-gold, .btn-gold:visited { background: var(--champagne); color: var(--dark); }
.btn-gold:hover { background: var(--gold); color: var(--dark); }
.btn-light, .btn-light:visited { border-color: rgba(214, 189, 130, .65); color: var(--surface); background: transparent; }
.btn-light:hover { background: rgba(214, 189, 130, .16); color: #fff; }
.btn-sm { padding: .5rem .85rem; font-size: .84rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; color: var(--dark); }
.link-btn { background: none; border: 0; padding: 0; color: var(--champagne); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- Stamps, chips, tags ---------- */
.kicker { display: inline-block; font: 700 .74rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .9rem; }
.stamp { display: inline-flex; align-items: center; gap: .35rem; font: 700 .66rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--emerald); border: 1.5px dashed currentColor; border-radius: 6px; padding: .36rem .55rem; transform: rotate(-1.5deg); background: rgba(255, 253, 248, .6); }
.stamp.gold { color: var(--gold-text); }
.stamp.copper { color: var(--copper-text); }
.stamp.light { color: var(--champagne); background: transparent; }
.stamp-row { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: .5rem 1rem; font: 500 .88rem var(--sans); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.chip:hover { border-color: var(--emerald); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.tag { display: inline-block; font-size: .76rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; background: var(--sage); color: var(--dark); margin: 0 .3rem .3rem 0; }
.tag.gold { background: #EFE3C6; }
.tag.copper { background: #F1DDD3; }

/* ---------- Hero: The Global Ledger ---------- */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #E9E5D7; padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem); isolation: isolate; }
.hero::before { /* hero-ledger-grid-pattern */ content: ""; position: absolute; inset: 0; z-index: -3; background-image: linear-gradient(rgba(214, 189, 130, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 189, 130, .07) 1px, transparent 1px); background-size: 56px 56px; }
.hero::after { /* hero-readability-gradient */ content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(37, 45, 40, .97) 0%, rgba(37, 45, 40, .82) 45%, rgba(37, 45, 40, .2) 100%); pointer-events: none; }
.hero-art { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.layer { position: absolute; will-change: transform; transition: transform .25s ease-out; }
.map-layer { right: -4%; top: 4%; width: min(940px, 92vw); }
.hero-map { width: 100%; height: auto; opacity: .7; }
.hero-map .continent { fill: rgba(214, 189, 130, .08); stroke: rgba(214, 189, 130, .55); stroke-width: 1.1; }
.hero-map .graticule { fill: none; stroke: rgba(197, 214, 194, .14); stroke-width: .8; }
.hero-map .route { fill: none; stroke: var(--champagne); stroke-width: 1.4; stroke-dasharray: 4 7; animation: dash 18s linear infinite; }
.hero-map .pin { fill: var(--champagne); }
.hero-map .pin-ring { fill: none; stroke: var(--champagne); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ping 3.2s ease-out infinite; }
@keyframes dash { to { stroke-dashoffset: -220; } }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.4); opacity: 0; } }
.float { display: inline-block; animation: drift 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.float-label { font: 700 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--champagne); border: 1.5px dashed rgba(214, 189, 130, .7); padding: .45rem .65rem; border-radius: 6px; background: rgba(37, 45, 40, .7); white-space: nowrap; transform: rotate(-3deg); }
.float-cur { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.8rem); color: rgba(214, 189, 130, .55); text-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.cal-card { width: 132px; background: var(--surface); color: var(--dark); border-radius: 12px; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); overflow: hidden; transform: rotate(4deg); }
.cal-card .cal-m { display: block; background: var(--emerald); color: #fff; font: 700 .7rem/1 var(--sans); letter-spacing: .2em; padding: .45rem .7rem; }
.cal-card .cal-d { display: block; font: 600 2.2rem/1 var(--serif); padding: .45rem .7rem 0; }
.cal-card .cal-t { display: block; font-size: .66rem; line-height: 1.3; padding: .3rem .7rem .7rem; color: var(--muted-text); }
.doc-card { width: 150px; padding: .9rem; background: #FBF6EA; color: var(--dark); border-radius: 6px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .75); font: 600 .72rem var(--sans); transform: rotate(-5deg); clip-path: polygon(0 0, 88% 0, 100% 12%, 100% 100%, 0 100%); }
.doc-card .doc-lines { display: block; height: 46px; margin-bottom: .55rem; background: repeating-linear-gradient(180deg, var(--border) 0 2px, transparent 2px 9px); }
.hero-grid { position: relative; }
.hero-copy { max-width: 720px; }
.hero h1 { color: var(--surface); margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--champagne); }
.reveal-line { display: block; overflow: hidden; padding-bottom: .06em; }
.reveal-line > span { display: inline-block; transform: translateY(105%); animation: lineUp 1s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes lineUp { to { transform: none; } }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: #D8D4C4; max-width: 620px; }
.hero-search { display: flex; gap: .4rem; background: var(--surface); border-radius: 999px; padding: .38rem; max-width: 640px; margin: 1.6rem 0 1.1rem; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1rem; padding: .6rem 1rem; color: var(--text); }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--champagne), 0 18px 40px -20px rgba(0, 0, 0, .8); }
.hero .chip { background: rgba(255, 253, 248, .06); border-color: rgba(214, 189, 130, .45); color: #EDE9DC; }
.hero .chip[aria-pressed="true"] { background: var(--champagne); border-color: var(--champagne); color: var(--dark); }
.hero-trust { margin-top: 1.4rem; font-size: .84rem; color: #BDB9AA; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.hero-trust span::before { content: "◆ "; color: var(--gold); }
@media (max-width: 760px) {
  .layer:not(.map-layer):not(.keep-mobile) { display: none; }
  .map-layer { opacity: .45; top: auto; bottom: -4%; }
  .hero::after { background: rgba(37, 45, 40, .82); }
}

/* Ledger strip */
.ledger-strip { background: var(--dark-2); color: #D8D4C4; border-top: 1px solid rgba(214, 189, 130, .2); }
.ledger-strip ul { list-style: none; margin: 0; padding: 1rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .88rem; }
.ledger-strip strong { font-family: var(--serif); font-size: 1.3rem; color: var(--champagne); margin-right: .4rem; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--dark); color: #E3DFD0; padding: clamp(2.8rem, 6vw, 4.8rem) 0 clamp(2.4rem, 5vw, 3.8rem); }
.page-hero::after { /* globe-contour-illustration */ content: ""; position: absolute; right: -80px; top: 50%; width: 460px; height: 460px; transform: translateY(-50%); opacity: .5; pointer-events: none; background: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20200'%3E%3Cg%20fill='none'%20stroke='%23D6BD82'%20stroke-width='.6'%20opacity='.6'%3E%3Ccircle%20cx='100'%20cy='100'%20r='96'/%3E%3Cellipse%20cx='100'%20cy='100'%20rx='48'%20ry='96'/%3E%3Cellipse%20cx='100'%20cy='100'%20rx='80'%20ry='96'/%3E%3Cellipse%20cx='100'%20cy='100'%20rx='16'%20ry='96'/%3E%3Cpath%20d='M4%20100h192M14%2060h172M14%20140h172M40%2025h120M40%20175h120'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
.page-hero h1 { color: var(--surface); font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 860px; }
.page-hero .lead { color: #D3CFBF; max-width: 720px; font-size: 1.15rem; }
.page-hero > .container { position: relative; z-index: 1; }
.breadcrumb { font-size: .84rem; margin-bottom: 1rem; color: #BDB9AA; }
.breadcrumb a { color: var(--champagne); }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.breadcrumb li + li::before { content: "/ "; color: var(--muted); }

/* ---------- Sections & layouts ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tight { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: end; margin-bottom: 2.2rem; }
.section-head p { color: var(--muted-text); margin: 0; }
.lead { font-size: 1.15rem; color: #454B45; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1.35fr) minmax(0, .9fr); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
@media (max-width: 900px) {
  .section-head, .split, .split-wide, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow); }
.panel-dark { background: var(--dark); color: #E3DFD0; border-color: rgba(214, 189, 130, .25); }
.panel-dark h2, .panel-dark h3, .panel-dark h4 { color: var(--surface); }
.panel-dark a:not(.btn) { color: var(--champagne); }
.panel-gold { background: linear-gradient(160deg, #FBF5E6, var(--surface)); border-color: #E8D9B3; }
.notice { display: flex; gap: .8rem; align-items: flex-start; background: #F8F0DC; border: 1px solid var(--champagne); border-left: 4px solid var(--gold); border-radius: 12px; padding: 1rem 1.2rem; font-size: .94rem; color: var(--text); margin: 1rem 0; }
.notice strong { white-space: nowrap; }
.notice.sage { background: #EAF1E8; border-color: var(--sage); border-left-color: var(--emerald); }
.notice-icon { flex: none; display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--gold); color: var(--dark); font-weight: 800; font-size: .9rem; }
.editorial-note { border: 1px dashed var(--gold); border-radius: 14px; padding: 1rem 1.2rem; background: rgba(214, 189, 130, .1); }
.editorial-note .label { display: block; font: 700 .7rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); margin-bottom: .3rem; }
.tick-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.tick-list li { position: relative; padding: .35rem 0 .35rem 1.8rem; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; top: .35rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--sage); color: var(--emerald-deep); font-size: .72rem; display: grid; place-items: center; font-weight: 800; }
.warn-list li::before { content: "!"; background: #F1DDD3; color: var(--copper-text); }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.panel-dark .link-list li { border-color: rgba(214, 189, 130, .2); }
.data-table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--surface); border-radius: 14px; overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: .8rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { background: #EFEBDF; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--dark); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
dl.facts { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: .55rem 1rem; margin: 0; font-size: .93rem; }
dl.facts dt { font-weight: 700; color: var(--muted-text); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; padding-top: .2rem; }
dl.facts dd { margin: 0; }
.panel-dark dl.facts dt { color: var(--champagne); }

/* ---------- Image frames & fallbacks ---------- */
.media, .img-frame { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--emerald) 0%, var(--dark) 100%); }
.media { aspect-ratio: 16 / 10; }
.img-frame { border-radius: var(--radius); aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.media img, .img-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.media::before, .img-frame::before { /* image-fallback-label */ content: attr(data-label); position: absolute; inset: 0; display: none; place-items: center; text-align: center; padding: 1rem; font: 600 1.15rem/1.3 var(--serif); color: var(--champagne); background-image: radial-gradient(circle at 30% 30%, rgba(214, 189, 130, .25), transparent 55%), repeating-linear-gradient(45deg, rgba(214, 189, 130, .08) 0 2px, transparent 2px 14px); }
.img-failed::before { display: grid; }
.img-failed img { display: none; }
/* image-reveal-wipe */
html.js .reveal .media::after, html.js .img-frame.reveal::after { content: ""; position: absolute; inset: 0; background: var(--champagne); transform-origin: right; transform: scaleX(1); transition: transform 1s cubic-bezier(.7, 0, .2, 1) .1s; z-index: 1; }
html.js .reveal.in .media::after, html.js .img-frame.reveal.in::after { transform: scaleX(0); }
figure { margin: 0; }
figcaption { font-size: .82rem; color: var(--muted-text); margin-top: .5rem; }

/* ---------- Resource cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.res-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .35s ease, box-shadow .35s ease, border-color .35s; }
.res-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: #CFC7AE; }
.res-card:hover .media img { transform: scale(1.045); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.3rem 1.4rem; }
.card-body h3 { font-size: 1.24rem; margin-bottom: .5rem; }
.card-provider { font-size: .82rem; color: var(--muted-text); margin-bottom: .6rem; }
.card-summary { font-size: .95rem; color: #3F453F; }
.card-meta { display: grid; grid-template-columns: auto 1fr; gap: .25rem .8rem; font-size: .82rem; margin: .2rem 0 .6rem; padding-top: .7rem; border-top: 1px dashed var(--border); }
.card-meta dt { color: var(--muted-text); font-weight: 600; }
.card-meta dd { margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: 1rem; }
.card-actions .btn { flex: 1 1 auto; }
.save-btn { position: absolute; top: .8rem; right: .8rem; z-index: 3; background: rgba(255, 253, 248, .96); border: 1px solid var(--border); border-radius: 999px; padding: .42rem .8rem; font: 600 .78rem var(--sans); color: var(--dark); cursor: pointer; transition: background .2s, transform .2s; }
.save-btn:hover { transform: scale(1.04); }
.save-btn[aria-pressed="true"] { background: var(--champagne); border-color: var(--gold); }
.save-inline { position: static; }
.status-line { font-size: .92rem; color: var(--muted-text); margin: 0 0 1.2rem; min-height: 1.4em; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; border: 1px dashed var(--gold); border-radius: var(--radius); background: var(--surface); }
.empty-state h3 { margin-bottom: .3rem; }

/* ---------- Editorial guide cards ---------- */
.guide-mosaic { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 1.4rem; }
.guide-mosaic .g-large { grid-row: span 2; }
.g-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.g-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.g-card .media { aspect-ratio: 16 / 9; }
.g-large .media { aspect-ratio: 4 / 3; }
.g-card .card-body h3 a { color: var(--dark); text-decoration: none; }
.g-card .card-body h3 a:hover { text-decoration: underline; }
@media (max-width: 900px) { .guide-mosaic { grid-template-columns: 1fr; } .guide-mosaic .g-large { grid-row: auto; } }

/* ---------- Featured resource ---------- */
.featured { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; border-radius: 24px; overflow: hidden; background: var(--dark); color: #E3DFD0; box-shadow: var(--shadow-lift); }
.featured .media { aspect-ratio: auto; min-height: 320px; height: 100%; }
.featured-body { padding: clamp(1.5rem, 4vw, 2.8rem); }
.featured-body h2, .featured-body h3 { color: var(--surface); }
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; } .featured .media { min-height: 220px; aspect-ratio: 16 / 9; } }

/* ---------- Tabs (jurisdiction spotlight) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.tab { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: .7rem 1.1rem; font: 600 .92rem var(--sans); cursor: pointer; color: var(--text); display: inline-flex; align-items: center; gap: .5rem; }
.tab .flag-code { font: 700 .68rem var(--sans); letter-spacing: .12em; border: 1.5px dashed currentColor; border-radius: 4px; padding: .15rem .3rem; }
.tab[aria-selected="true"] { background: var(--emerald); color: #fff; border-color: var(--emerald); }
.jpanel { animation: fadeUp .45s ease; }
.jpanel-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; }
.jdates { background: #F5EFDF; border-radius: 12px; padding: .8rem 1rem; font-size: .95rem; }
@media (max-width: 800px) { .jpanel-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1rem 1.2rem; }
.field { min-width: 0; }
.field > label, .field legend, .field .label { display: block; font-weight: 650; font-size: .9rem; margin-bottom: .35rem; color: var(--dark); }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="search"], .field select, .field textarea { width: 100%; padding: .72rem .85rem; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); font: inherit; font-size: 1rem; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--emerald); outline: none; box-shadow: 0 0 0 3px rgba(23, 107, 77, .18); }
.field .hint { display: block; font-size: .8rem; color: var(--muted-text); margin-top: .3rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.check-pills { display: flex; flex-wrap: wrap; gap: .45rem; }
.check-pills label { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--border); border-radius: 999px; padding: .45rem .85rem; background: var(--surface); cursor: pointer; font-weight: 500; font-size: .92rem; transition: background .2s, border-color .2s; }
.check-pills input { accent-color: var(--emerald); width: 1rem; height: 1rem; margin: 0; }
.check-pills label:has(input:checked) { background: var(--sage); border-color: var(--emerald); }
.check-pills label:focus-within { box-shadow: 0 0 0 3px rgba(184, 139, 69, .45); }
.form-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }
.filters { position: relative; }
.filter-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); margin-bottom: 1.6rem; }
.filter-top { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1rem; }
.filter-top .field { flex: 1 1 320px; }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.active-filters .tag { background: #EFE3C6; }

/* ---------- Results ---------- */
.result { margin-top: 1.6rem; }
.result.flash { animation: fadeUp .5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result-label { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; font-size: .9rem; color: var(--muted-text); }
.result-group { border-left: 3px solid var(--gold); padding: .3rem 0 .3rem 1.1rem; margin: 1.3rem 0; }
.result-group h3 { font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--emerald); margin-bottom: .5rem; }
.qlist { margin: 0; padding-left: 1.1rem; }
.qlist li { margin-bottom: .45rem; }
.result-progress { display: flex; align-items: center; gap: .8rem; font-size: .85rem; margin: .8rem 0; }
.result-progress .progress { flex: 1; }

/* ---------- Checklists & progress ---------- */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { border-bottom: 1px solid var(--border); }
.checklist label { display: flex; gap: .8rem; padding: .7rem .2rem; cursor: pointer; align-items: flex-start; }
.checklist input { width: 1.15rem; height: 1.15rem; accent-color: var(--emerald); margin-top: .25rem; flex: none; }
.checklist input:checked + span { text-decoration: line-through; text-decoration-color: var(--gold); color: var(--muted-text); }
.progress { height: 10px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--emerald), var(--gold)); transition: width .6s ease; }
.progress-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: .88rem; }
.progress-wrap .progress { flex: 1; }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 1rem; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 2.25rem; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 14px); z-index: 0; }
.tl-item { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.1rem; box-shadow: var(--shadow); }
.tl-juris { font: 700 .68rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.tl-date { display: block; font-family: var(--serif); font-size: 1.55rem; color: var(--emerald); line-height: 1.1; margin: .2rem 0 .4rem; }
.tl-item p { font-size: .88rem; margin-bottom: .5rem; }
@media (max-width: 700px) { .timeline::before { display: none; } }

/* ---------- Calendar ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.cal-head h3 { margin: 0; font-size: 1.5rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { font-size: .72rem; text-align: center; color: var(--muted-text); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem 0; }
.cal-day { min-height: 78px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .35rem; font: 500 .85rem var(--sans); text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--text); overflow: hidden; transition: border-color .2s, background .2s; }
.cal-day:hover { border-color: var(--emerald); }
.cal-day.other { opacity: .42; }
.cal-day.today { border: 2px solid var(--gold); }
.cal-day.today .cal-num::after { content: " · today"; font-size: .65rem; color: var(--gold-text); }
.cal-day.selected { background: #EAF1E8; border-color: var(--emerald); }
.cal-num { font-weight: 700; }
.cal-dot { display: block; font-size: .68rem; background: var(--sage); border-radius: 4px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-dot.more { background: #EFE3C6; }
@media (max-width: 620px) { .cal-day { min-height: 52px; } .cal-dot { font-size: 0; height: 6px; padding: 0; } .cal-day.today .cal-num::after { content: ""; } }
.reminder-list { list-style: none; padding: 0; margin: 0; }
.reminder-list li { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.reminder-date { font: 600 1rem var(--serif); color: var(--emerald); min-width: 6.5rem; }
.reminder-list .tag { margin: 0; }

/* ---------- Calculator ---------- */
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: .9rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1rem; }
.stat .stat-label { display: block; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-text); }
.stat .stat-value { display: block; font: 600 1.55rem/1.2 var(--serif); color: var(--dark); margin: .25rem 0; font-variant-numeric: tabular-nums; }
.stat .stat-note { font-size: .8rem; color: var(--muted-text); }
.stat.key { background: var(--dark); border-color: var(--dark); }
.stat.key .stat-label { color: var(--champagne); }
.stat.key .stat-value { color: var(--surface); }
.stat.key .stat-note { color: #C9C5B6; }
.alloc { display: grid; gap: .7rem; margin-top: 1.4rem; }
.alloc-row { display: grid; grid-template-columns: minmax(130px, 190px) 1fr 64px; gap: .8rem; align-items: center; font-size: .88rem; }
.alloc-bar { height: 14px; background: #ECE9DE; border-radius: 999px; overflow: hidden; }
.alloc-bar > span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.alloc-pct { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sw-emerald { background: var(--emerald); }
.sw-gold { background: var(--gold); }
.sw-champagne { background: var(--champagne); }
.sw-copper { background: var(--copper); }
.sw-sage { background: #8FAE8A; }
.sw-dark { background: var(--dark); }
.sw-hatch { background: repeating-linear-gradient(45deg, var(--emerald) 0 4px, #4F8C73 4px 8px); }
@media (max-width: 560px) { .alloc-row { grid-template-columns: 1fr 56px; } .alloc-bar { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- Four-locations lens ---------- */
.lens-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: center; }
.lens-svg { width: 100%; max-width: 480px; margin-inline: auto; }
.lens-svg .spoke { stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 3 4; }
.lens-svg .spoke.active { stroke: var(--gold); stroke-dasharray: none; stroke-width: 2.5; }
.lens-node circle { fill: var(--surface); stroke: var(--gold); stroke-width: 1.5; transition: fill .3s, transform .3s; transform-box: fill-box; transform-origin: center; }
.lens-node text { font: 600 11px var(--sans); fill: var(--dark); text-anchor: middle; pointer-events: none; }
.lens-node.active circle { fill: var(--emerald); stroke: var(--emerald-deep); transform: scale(1.12); }
.lens-node.active text { fill: #fff; }
.lens-center circle { fill: var(--dark); }
.lens-center text { fill: var(--champagne); font: 700 13px var(--serif); text-anchor: middle; }
.lens-panel { min-height: 160px; }
@media (max-width: 860px) { .lens-wrap { grid-template-columns: 1fr; } }

/* ---------- Accordions ---------- */
.concept { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: .7rem; transition: box-shadow .3s; }
.concept[open] { box-shadow: var(--shadow); }
.concept summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.concept summary::-webkit-details-marker { display: none; }
.concept summary::after { content: "+"; font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--gold-text); transition: transform .3s; flex: none; }
.concept[open] summary::after { transform: rotate(45deg); }
.concept-body { padding: 0 1.2rem 1.1rem; }

/* ---------- Guide layout ---------- */
.guide-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; max-height: calc(100vh - 2.4rem); overflow: auto; }
.toc ol { margin: 0; padding-left: 1.2rem; font-size: .88rem; }
.toc li { margin-bottom: .35rem; }
.guide-article { padding: 2rem 0; border-bottom: 1px solid var(--border); scroll-margin-top: 1rem; }
.guide-article:first-child { padding-top: 0; }
.guide-article-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.guide-article-head .save-btn { position: static; flex: none; }
.source-line { font-size: .84rem; color: var(--muted-text); border-top: 1px dashed var(--border); padding-top: .6rem; margin-top: .8rem; }
@media (max-width: 960px) { .guide-layout { grid-template-columns: 1fr; } .toc { position: static; max-height: none; } }

/* ---------- Detail page ---------- */
.detail-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: center; }
.detail-hero-grid .img-frame { aspect-ratio: 4 / 3; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; align-items: start; }
.detail-layout section { margin-bottom: 2.4rem; }
.detail-aside { display: grid; gap: 1.2rem; }
@media (max-width: 960px) { .detail-hero-grid, .detail-layout { grid-template-columns: 1fr; } }

/* ---------- Drawer & cookie banner ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(37, 45, 40, .5); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .3s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); z-index: 95; transform: translateX(100%); visibility: hidden; transition: transform .38s cubic-bezier(.2, .7, .2, 1), visibility .38s; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .4); display: flex; flex-direction: column; padding: 1.4rem; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.drawer-head h2 { font-size: 1.6rem; margin: 0; }
.saved-list { list-style: none; padding: 0; margin: 1rem 0; overflow: auto; flex: 1; }
.saved-list li { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.saved-list a { font-weight: 600; }
.drawer-foot { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 110; max-width: 780px; margin-inline: auto; background: var(--dark); color: #E3DFD0; border: 1px solid rgba(214, 189, 130, .45); border-radius: 18px; padding: 1.2rem 1.4rem; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); animation: fadeUp .5s ease; }
.cookie-banner h2 { color: var(--surface); font-size: 1.25rem; margin-bottom: .4rem; }
.cookie-banner p { font-size: .9rem; margin-bottom: .9rem; }
.cookie-banner a { color: var(--champagne); }
.cookie-dialog { border: 0; border-radius: 20px; padding: 0; max-width: 560px; width: calc(100% - 2rem); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); }
.cookie-dialog::backdrop { background: rgba(37, 45, 40, .6); }
.cookie-dialog form { padding: 1.6rem; }
.consent-row { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--border); }
.consent-row p { font-size: .86rem; color: var(--muted-text); margin: .2rem 0 0; }
.switch { position: relative; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + span { background: var(--emerald); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:disabled + span { opacity: .6; }
.switch input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(20px); background: var(--dark); color: var(--surface); padding: .7rem 1.2rem; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 120; border: 1px solid rgba(214, 189, 130, .5); }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #D3CFC1; padding: 4rem 0 2rem; font-size: .93rem; }
.site-footer a { color: var(--champagne); }
.site-footer h2 { font-family: var(--sans); font-size: .76rem; letter-spacing: .18em; text-transform: uppercase; color: var(--champagne); margin-bottom: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2.2rem; padding-bottom: 2.4rem; border-bottom: 1px solid rgba(214, 189, 130, .2); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-brand .brand { color: var(--surface); margin-bottom: 1rem; }
.footer-brand .brand:visited { color: var(--surface); }
.footer-brand .brand-sub { color: var(--champagne); }
.footer-notices { padding: 2rem 0 1rem; display: grid; gap: 1rem; }
.footer-notices p { font-size: .84rem; color: #C6C2B3; margin: 0; }
.platform-notice { border: 1px solid rgba(214, 189, 130, .38); border-radius: 14px; padding: 1rem 1.2rem; background: rgba(255, 253, 248, .03); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .82rem; color: #A9A698; padding-top: 1rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Scroll reveals ---------- */
html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .75s ease, transform .75s ease; transition-delay: calc(var(--i, 0) * 80ms); }
html.js .reveal.in { opacity: 1; transform: none; }
html.js .res-card.reveal.in:hover { transform: translateY(-5px); transition-delay: 0s; }

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .cookie-banner, .drawer, .drawer-backdrop, .hero-art, .form-actions, .save-btn, .toc { display: none !important; }
  body { background: #fff; }
  .page-hero { background: #fff; color: #000; }
  .page-hero h1 { color: #000; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .float, .hero-map .route, .hero-map .pin-ring { animation: none !important; }
  .reveal-line > span { transform: none; }
}