/* Shared ledger language — monochrome, bordered, documentary */

/* ---------- Self-hosted fonts (bypasses iOS Lockdown Mode CDN block) ---------- */
/* Fraunces italic — variable font, covers wght 300–400 */
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url('fonts/fraunces-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces'; font-style: italic; font-weight: 300 400; font-display: swap;
  src: url('fonts/fraunces-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fraunces normal — variable font, covers wght 300–400 */
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url('fonts/fraunces-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 300 400; font-display: swap;
  src: url('fonts/fraunces-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* JetBrains Mono — variable font, covers wght 300–600 */
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url('fonts/jbm-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url('fonts/jbm-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Amiri — static font */
@font-face {
  font-family: 'Amiri'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('fonts/amiri-italic-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('fonts/amiri-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Amiri'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/amiri-normal-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/amiri-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Amiri'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/amiri-bold-arabic.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/amiri-bold-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #07080a;
  --bg-2: #0b0d10;
  --bg-3: #0f1115;
  --ink: #e8e4dc;
  --ink-dim: #8a8478;
  --ink-fainter: #807a6e;
  --ink-faint2: #2a2824;
  --line: rgba(232,228,220,0.07);
  --line-2: rgba(232,228,220,0.14);
  --line-3: rgba(232,228,220,0.22);
  --danger: #d05a50;
  --line-control: rgba(232,228,220,0.42);
  --withheld-deep: #b89364;
  --withheld-deep-line: #a07a4a;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --arabic: 'Amiri', 'Times New Roman', serif;
  /* Withheld-body accent — muted ochre / burial earth. Desaturated (sat ~60%,
     anti-slop: never an alarmist >80% accent) and distinct from both the cream
     of the living field and the red of the killed bloom. One source of truth. */
  --withheld: #d4a23c;
  /* ---- Motion system: one easing + duration scale, used site-wide -------
     Restrained for the subject — enters decelerate (ease-out), exits are
     faster and accelerate (ease-in), state changes are symmetric. */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);        /* enters */
  --ease-in:   cubic-bezier(0.55, 0.06, 0.68, 0.19); /* exits only */
  --ease-soft: cubic-bezier(0.45, 0, 0.55, 1);       /* hover / state change */
  --dur-fast: 140ms;
  --dur:      240ms;
  --dur-slow: 360ms;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  overflow: visible;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  outline: none;
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
::selection { background: var(--ink); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Global top bar ---------- */
/* Fixed on every page. Scrollable pages reserve header height via
   body { padding-top: var(--nav-h) } — set dynamically by header.js. */
.ledger-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7,8,10,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
body { padding-top: var(--nav-h, 56px); }
body[data-page="archive"] { padding-top: 0; }
.ledger-nav .brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-transform: none;
}
.ledger-nav .brand .mark {
  display: inline-block; width: 6px; height: 6px; background: var(--ink);
  margin-right: 4px;
}
.ledger-nav .brand .ar {
  font-family: var(--arabic);
  font-size: 17px;
  color: var(--ink);
}
.ledger-nav nav {
  display: flex; gap: 22px;
}
.ledger-nav nav a {
  color: var(--ink-dim);
  letter-spacing: 0.2em;
  transition: color var(--dur-fast) var(--ease-soft);
  position: relative;
  padding: 4px 0;
}
.ledger-nav nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur) var(--ease-out);
}
.ledger-nav nav a.on { color: var(--ink); }
.ledger-nav nav a.on::after { transform: scaleX(1); }
/* Language switcher — EN · ع. Default system font so the Latin "EN" and the
   Arabic "ع" share metrics and sit centred together (the mono face had no ع and
   fell back to a misaligned system glyph). Brighter + larger for clarity. */
.ledger-nav .lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--line-2); border-radius: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px; letter-spacing: normal; color: var(--ink-dim);
  padding: 6px 12px; margin-inline-start: 8px; cursor: pointer; line-height: 1;
  transition: border-color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-out);
}
.ledger-nav .lang-toggle [data-set-lang] {
  display: inline-flex; align-items: center; line-height: 1;
  color: var(--ink-dim);
  transition: color var(--dur-fast) var(--ease-soft);
}
.ledger-nav .lang-toggle [data-set-lang="ar"] { font-size: 15px; }
.ledger-nav .lang-toggle [data-set-lang].on { color: var(--ink); }
.ledger-nav .lang-toggle .lt-sep { color: var(--line-3); font-size: 12px; }
@media (hover: hover) and (pointer: fine) {
  .ledger-nav .lang-toggle:hover {
    border-color: var(--ink-dim);
    background-color: rgba(232, 228, 220, 0.06);
    transform: translateY(-1px);
  }
  .ledger-nav .lang-toggle:hover [data-set-lang] { color: var(--ink); }
}

/* Mobile header: identical across every page */
@media (max-width: 820px) {
  .ledger-nav { padding: 10px 16px; }
  .ledger-nav .brand { font-size: 14px; gap: 6px; }
  .ledger-nav .brand .ar { font-size: 13px; margin-left: 0; }
  .ledger-nav nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
  .ledger-nav nav a { font-size: 9px; letter-spacing: 0.14em; padding: 2px 0; }
}
@media (max-width: 520px) {
  .ledger-nav {
    flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 10px 14px;
  }
  .ledger-nav .brand { font-size: 13px; }
  .ledger-nav nav { width: 100%; justify-content: space-between; }
}

/* ---------- Eyebrow / titles ---------- */
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.headline {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(36px, 6vw, 72px);

  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}
.headline .plain { font-style: normal; }
.headline-ar {
  font-family: var(--arabic);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 34px);
  color: var(--ink-dim);
  direction: rtl;
  line-height: 1.4;
  margin-top: 8px;
}

.lead {
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.6;
}

.rule { border-bottom: 1px solid var(--line); }

/* ---------- Buttons / chips ---------- */
.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 5px 10px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-control);
  color: var(--ink-dim);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  border-radius: 0;
}
.chip.active {
  color: var(--bg);
  background: var(--ink);
  border-color: var(--ink);
}
@media (pointer: coarse) {
  .chip { min-height: 44px; }
}

.btn {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid var(--line-control);
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color var(--dur-fast) var(--ease-soft),
              background-color var(--dur-fast) var(--ease-soft),
              border-color var(--dur-fast) var(--ease-soft),
              transform var(--dur-fast) var(--ease-out);
}
/* ---------- Footer ---------- */
.ledger-foot {
  border-top: 1px solid var(--line);
  padding: 28px;
  display: flex; justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fainter);
  gap: 40px;
  flex-wrap: wrap;
}
/* "Data as of" provenance line — sits on its own row, quieter than the rest. */
.foot-asof {
  flex-basis: 100%;
  opacity: 0.75;
  letter-spacing: 0.16em;
}
/* ---------- Generic page shell ---------- */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

/* Form fields */
input[type=text], input[type=email], textarea, select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-control);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 0;
  outline: none;
  transition: border-color .15s ease;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 2px; }
input::placeholder,
textarea::placeholder { color: var(--ink-dim); opacity: 1; }

/* Small table */
table.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.ledger-table th, .ledger-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.ledger-table th {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fainter);
  font-weight: 500;
}
.ledger-table td { color: var(--ink); }

/* ===== RTL (Arabic) overrides — only apply when <html dir="rtl">. ===== */
[dir="rtl"] .skip-link { left: auto; right: 16px; }
[dir="rtl"] .ledger-nav .brand .mark { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .ledger-nav nav a::after { transform-origin: right center; }
[dir="rtl"] .ledger-table th,
[dir="rtl"] .ledger-table td { text-align: right; }

/* ----- RTL typography -----
   The chrome's tracked mono micro-labels are a Latin device: letter-spacing
   breaks Arabic's cursive joining, and the 9–11px label sizes are illegible in
   Arabic. Kill tracking site-wide in Arabic and lift the label sizes. All
   [dir="rtl"]-scoped, so the English layout is untouched. */
/* RTL UI labels use a crisp system Arabic SANS. Amiri is a delicate Naskh serif
   that looks thin/weak at small label sizes; the system sans (SF Arabic on
   macOS) is built for UI legibility. Display text (headings/names/prose) keeps
   Amiri via --arabic elsewhere — only the small label tier switches. Feed the
   sans into --mono too so every var(--mono) label gets it for Arabic while
   Latin/digits stay tabular in JetBrains Mono. */
[dir="rtl"] {
  --arabic-ui: system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
  --mono: 'JetBrains Mono', system-ui, -apple-system, 'Segoe UI', 'Noto Sans Arabic', sans-serif;
  /* Arabic labels need far more contrast than the Latin micro-label grays give:
     the dim/fainter inks are near-invisible on small Arabic. Brighten them hard
     in RTL only (EN keeps the subtle grays). */
  --ink-dim: #d4cfc4;
  --ink-fainter: #bdb7ab;
}
[dir="rtl"] * { letter-spacing: normal !important; }
/* Slightly heavier weight so small Arabic labels read solid, not hairline. */
[dir="rtl"] .ledger-nav nav a,
[dir="rtl"] .eyebrow,
[dir="rtl"] .filter-label,
[dir="rtl"] .chip,
[dir="rtl"] .seg button,
[dir="rtl"] .legend,
[dir="rtl"] .foot,
[dir="rtl"] .bignum .sub,
[dir="rtl"] .bignum .l,
[dir="rtl"] .bw-headline .sub,
[dir="rtl"] .bw-subsets .cell .of,
[dir="rtl"] .bar-row .lbl,
[dir="rtl"] .year-row .y-lbl { font-weight: 500; }
/* Third axis for light-on-dark Arabic (per the typography reference): the
   multi-line stat sublabels need more leading so they breathe, and the primary
   stat sublabel reads better a touch larger. */
[dir="rtl"] .bignum .sub,
[dir="rtl"] .bw-headline .sub,
[dir="rtl"] .bw-overlap-note,
[dir="rtl"] .legend,
[dir="rtl"] .foot { line-height: 1.65; }
[dir="rtl"] .bignum .sub { font-size: 14px; }
/* COMPREHENSIVE Arabic label sizing — most stat-label classes were still at
   their original 9–11px (too small). Bump every Arabic TEXT label; leave number
   values (.val/.y-count/.g-val/.n/axes) at their small tabular sizes. */
[dir="rtl"] .ledger-nav nav a { font-size: 17px; }
[dir="rtl"] .eyebrow { font-size: 15px; }
[dir="rtl"] .filter-label { font-size: 15px; }
[dir="rtl"] .chip,
[dir="rtl"] .seg button { font-size: 15px; }
[dir="rtl"] .legend { font-size: 14px; }
[dir="rtl"] .foot { font-size: 14px; }
/* Statistics page — all the Arabic text labels that were never sized. */
[dir="rtl"] .bignum .l,
[dir="rtl"] .bw-headline .l { font-size: 13px; }
[dir="rtl"] .bignum .sub,
[dir="rtl"] .bw-headline .sub { font-size: 16px; }
[dir="rtl"] .chart-card .note,
[dir="rtl"] .bar-row .lbl,
[dir="rtl"] .bw-part-legend .t,
[dir="rtl"] .bw-subsets .cell .l,
[dir="rtl"] .bw-subsets .cell .of,
[dir="rtl"] .bw-overlap-note,
[dir="rtl"] .bw-sources { font-size: 14px; }
[dir="rtl"] .ledger-nav nav a,
[dir="rtl"] .eyebrow,
[dir="rtl"] .filter-label,
[dir="rtl"] .chip,
[dir="rtl"] .seg button,
[dir="rtl"] .legend,
[dir="rtl"] .foot,
[dir="rtl"] .mobile-filter-btn,
[dir="rtl"] .mobile-reset-btn,
[dir="rtl"] .drawer-title { font-family: var(--arabic-ui) !important; }
/* (Older duplicate size blocks removed — the comprehensive block above is the
   single source of truth for RTL label sizes. Only the lang-toggle and mobile
   drawer sizes, not set above, remain here.) */
[dir="rtl"] .ledger-nav .lang-toggle { font-size: 13px; }
[dir="rtl"] .mobile-filter-btn,
[dir="rtl"] .mobile-reset-btn,
[dir="rtl"] .drawer-title { font-size: 15px; }

/* Hide scrollbars in chrome-y areas while keeping usable */
.lite-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.lite-scroll::-webkit-scrollbar-thumb { background: var(--line-3); }
.lite-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---------- Page transitions ----------
   SPA-style: header.js swaps ONLY the [data-ledger-page] region,
   never the header/footer. The fade is scoped to the content region
   so the chrome stays rock-still across navigation. */

html { background: var(--bg); }

[data-ledger-page] {
  transition: opacity var(--dur) var(--ease-out);
}
[data-ledger-page].is-leaving {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-in);
}
/* Enter from slightly below — gives the swapped page a gentle upward settle
   (ease-out). Skipped on the archive page: its canvas/filters are
   position:fixed, and a transform on this ancestor would change their
   containing block mid-transition. Archive uses opacity only. */
body:not([data-page="archive"]) [data-ledger-page] {
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
body:not([data-page="archive"]) [data-ledger-page].is-leaving {
  transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-in),
              transform var(--dur-fast) var(--ease-in);
}
body:not([data-page="archive"]) [data-ledger-page].is-entering {
  opacity: 0;
  transform: translateY(8px);
  transition: none;
}

/* Staggered reveal — runs whenever new content is swapped in.
   JS assigns --i by visual position (bottom → top). */
[data-reveal] > *,
[data-reveal-item] {
  opacity: 0;
  transform: translateY(20px);
  animation: ledger-reveal 400ms cubic-bezier(.16,.84,.32,1) forwards;
  animation-delay: calc(60ms + var(--i, 0) * 55ms);
}
@keyframes ledger-reveal {
  to { opacity: 1; transform: none; }
}

/* Hover effects only for real pointer devices — not touch */
@media (hover: hover) and (pointer: fine) {
  .ledger-nav nav a:hover { color: var(--ink); }
  .ledger-nav nav a:hover::after { transform: scaleX(1); }   /* underline wipes in from left */
  .chip:hover { color: var(--ink); border-color: var(--line-3); transform: translateY(-1px); }
  .btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-1px); }
  .ledger-foot a:hover { color: var(--ink); }
}

.btn:active  { transform: scale(0.97); transition: transform 80ms ease; }
.chip:active { transform: scale(0.97); transition: transform 80ms ease; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  body, [data-reveal] > *, [data-reveal-item] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  /* Make everything else effectively instant without forcing transform:none
     globally (which would erase static transformed states like the active-nav
     underline or the poppy blooms). */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Neutralize the page-enter/leave offsets so nothing slides. */
  [data-ledger-page].is-entering,
  [data-ledger-page].is-leaving { transform: none !important; }
}
@media (forced-colors: active) {
  .chip, .btn, input, textarea, select, .reset-btn, .close-btn { border-color: CanvasText; }
  .chip.active { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  :focus-visible { outline-color: Highlight; }
}
