/* Plate theme for the explainer pages (Explainers, Chemmani, Budget 2027).
   Loaded last, after each page's own CSS. It moves the pages onto the homepage's
   look: paper ground, one green ink, Newsreader display, IBM Plex text,
   square hairline geometry and a full-width bar for the nav. */
:root {
  --canvas: #ECEEE9; --canvas-soft: #F2F3EF; --surface: #F4F5F1; --surface-strong: #DEE2DB;
  --ink: #111915; --ink-soft: #26302B; --body: #3C4540; --muted: #69736D; --muted-soft: #A3ABA6;
  --hairline: rgba(17, 25, 21, .2); --hairline-soft: rgba(17, 25, 21, .12); --hairline-strong: rgba(17, 25, 21, .36);
  --mint: #A4D2C5; --forest: #105C48; --brand: #111915;
  --font-display: 'Newsreader', 'Noto Serif Tamil', 'Noto Serif Sinhala', Georgia, serif;
  --font-body: 'IBM Plex Sans', 'Noto Sans Tamil', 'Noto Sans Sinhala', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Sans', 'Noto Sans Tamil', 'Noto Sans Sinhala', ui-monospace, monospace;
  --c1: #105C48; --c3: #2a78d6; --pos: #105C48;
  --q1: #E3EDE8; --q2: #C3DDD3; --q3: #A4D2C5; --q4: #6FA897; --q5: #3F8370; --q6: #1C6A55; --q7: #0E3F32;
  --grid: rgba(17, 25, 21, .12); --axis: rgba(17, 25, 21, .3);
  --shadow: none;
  --inset: clamp(20px, 2.78vw, 60px);
}
[data-theme="dark"] {
  --canvas: #111915; --canvas-soft: #151E19; --surface: #18221D; --surface-strong: #202B25;
  --ink: #E6E9E3; --ink-soft: #CDD3CD; --body: #B0B8B2; --muted: #8E9892; --muted-soft: #56605A;
  --hairline: rgba(230, 233, 227, .18); --hairline-soft: rgba(230, 233, 227, .1); --hairline-strong: rgba(230, 233, 227, .34);
  --brand: #E6E9E3; --c1: #A4D2C5; --pos: #A4D2C5;
  --grid: rgba(230, 233, 227, .12); --axis: rgba(230, 233, 227, .3);
}
:root[lang='ta'], :root[lang='si'] { --font-display: 'Noto Serif Tamil', 'Noto Serif Sinhala', 'Newsreader', Georgia, serif; }

body { font-size: 16px; }
body::after { content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .9; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .06  0 0 0 0 .1  0 0 0 0 .08  0 0 0 .27 -.115'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: normal; }
:focus-visible { outline-color: var(--forest); border-radius: 0; }
::selection { background: var(--mint); color: #111915; }

/* type */
.display { font-weight: 350; letter-spacing: -.03em; line-height: .98; }
.display-xl { font-size: clamp(44px, 6.3vw, 112px); }
.display-lg { font-size: clamp(32px, 4.2vw, 72px); }
.eyebrow { font: italic 400 15px/1.2 var(--font-display); letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
.tag, .gr { border-radius: 0; }

/* nav: the homepage's sticky bar with an inset hairline */
.nav { position: fixed; top: 0; left: 0; right: 0; transform: none; width: auto; max-width: none; height: 72px; padding: 0 var(--inset); gap: 14px; border: 0; border-radius: 0; box-shadow: none; background: var(--canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
.nav::after { content: ''; position: absolute; left: var(--inset); right: var(--inset); bottom: 0; height: 1px; background: var(--hairline-strong); }
.aama-logo { width: 62px; height: 32px; }
.nav-title, .nav-crumb, .nav-link { font-size: 15px; }
.nav-title { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink); }
.nav-link { border-radius: 0; padding: 8px 0; margin: 0 10px; background: none !important; position: relative; }
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.nav-link:hover::after { transform: scaleX(1); }
.lang a { border-radius: 0 !important; }
.icon-btn { border-radius: 0; }
.top-pad { padding-top: 104px; }
@media (max-width: 480px) { .nav { top: 0; height: 60px; padding: 0 16px; } .top-pad { padding-top: 84px; } }

/* surfaces: flat paper panels with hairlines instead of soft white cards */
.card, .hero-fig, .key, .callout, .cnote { box-shadow: none; }
.callout { border-left-width: 2px; }
.dock { border-radius: 0; box-shadow: none !important; border: 1px solid var(--hairline-strong); background: var(--canvas); }
.dock[data-state="min"] { box-shadow: none; }
.tabs a { border-radius: 0; }
.tabs a.on { background: var(--ink); color: var(--canvas); }

/* footer: dark ink band like the homepage */
.foot { background: #111915; color: #E6E9E3; border-top: 0; margin-top: 64px; padding: 56px 0 64px; }
.foot p, .foot a, .foot b { color: inherit; }
.foot p { opacity: .78; max-width: 72ch; }

/* language switch: plain words, the current one underlined, as on the homepage */
.lang { background: none; padding: 0; gap: 14px; margin-right: 6px; }
.lang a { min-height: 32px; padding: 0; font-size: 14px; opacity: .55; }
.lang a[lang="en"] { font: 400 14px var(--font-body); letter-spacing: 0; }
.lang a:hover { opacity: 1; }
.lang a[aria-current="page"] { background: none; box-shadow: inset 0 -1px currentColor; opacity: 1; }

/* explainers hub: hairline rows instead of a boxed list */
.ex-head h1 { font-weight: 350; letter-spacing: -.03em; }
.ex-sec h2 { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.toc { border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hairline); background: none; overflow: visible; }
.entry { padding: 30px 0; transition: background-color .45s, color .45s, padding .45s; }
.entry:hover { background: #111915; color: #E6E9E3; padding-left: 24px; padding-right: 24px; }
.entry:hover .e-sum, .entry:hover .e-note, .entry:hover .e-date, .entry:hover .e-facts, .entry:hover .e-facts span, .entry:hover .e-go { color: inherit; }
.e-title { font-weight: 350; letter-spacing: -.02em; }
.toc > li.next { background: none; border-top: 1px solid var(--hairline); }
.next-in { padding: 26px 0; }
.side { background: none; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--hairline); }
.side > div { padding: 16px 16px 16px 0; }
.side > div + div { padding-left: 16px; }
.side b { font: 350 40px/1 var(--font-display); letter-spacing: -.03em; }
.demo .src, .src { border-radius: 0; background: transparent; }
@media (max-width: 860px) { .entry { padding: 22px 0; } .entry:hover { padding-left: 14px; padding-right: 14px; } .next-in { padding: 20px 0; } }

/* figures: light serif numerals, like the homepage's mosaic tiles */
.hf-v, .sv, .kv-v, .kv .big, .res b, .yl { font-family: var(--font-display); font-weight: 350; letter-spacing: -.03em; font-variant-numeric: lining-nums tabular-nums; }
.hf-v { font-size: clamp(56px, 7.4vw, 112px); line-height: .9; }
.sv { font-size: 34px; line-height: 1; }
.kv-v { font-size: clamp(40px, 4.6vw, 64px); line-height: .9; }
.kv .big, .res b { font-size: 28px; }
.state h3, .rd h3, .dp h3 { font-weight: 400; letter-spacing: -.015em; }
