/* Spashta — editorial stylesheet. Tokens first; dark theme follows the system unless the reader picks one. */
:root {
  --paper: #fbf8f2;
  --panel: #f2ede3;
  --ink: #1a1c20;
  --ink-2: #3d4148;
  --muted: #6a6e75;
  --rule: #ddd5c6;
  --rule-strong: #1a1c20;
  --accent: #0d5c6e;        /* peacock teal */
  --accent-ink: #0a4a59;
  --accent-soft: #e1eef0;
  --warm: #a3521a;          /* terracotta, for "what it means for you" */
  --warm-soft: #f6e9dc;
  --chip: #e6e0d4;
  --focus: #1b7f95;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --deva: "Noto Serif Devanagari", "Kohinoor Devanagari", serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121416; --panel: #1b1e22; --ink: #e9e6df; --ink-2: #c9c5bc; --muted: #9a9890; --rule: #2e3237;
  --rule-strong: #e9e6df; --accent: #5cb8cb; --accent-ink: #7fcbdb; --accent-soft: #15292e; --warm: #e0955f;
  --warm-soft: #2a2019; --chip: #2a2e33; --focus: #7fcbdb; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--serif); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 6px 10px; z-index: 9; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- masthead ---------- */
.topline { height: 4px; background: var(--accent); }
.mast-row { display: flex; justify-content: space-between; align-items: center; padding-top: 10px;
  font: 500 13px/1.2 var(--sans); color: var(--muted); }
.mast-tools { display: flex; gap: 6px; }
.tool { font: 500 13px/1 var(--sans); color: var(--ink-2); background: none; border: 1px solid var(--rule);
  border-radius: 999px; padding: 7px 12px; text-decoration: none; }
.tool:hover { border-color: var(--accent); color: var(--accent); }
.brand { text-align: center; padding: 14px 16px 12px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 14px; text-decoration: none; color: var(--ink); }
.wm-latin { font: 700 clamp(44px, 8vw, 76px)/0.95 var(--serif); letter-spacing: -0.035em; }
.wm-deva { font: 600 clamp(22px, 3.6vw, 34px)/1 var(--deva); color: var(--accent); }
.tagline { margin: 8px 0 0; font: italic 400 17px/1.3 var(--serif); color: var(--ink-2); }
.tagline span { font: 500 12px/1 var(--sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-left: 8px; }
.sections { border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.nav-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.nav-row::-webkit-scrollbar { display: none; }
.nav-row a { font: 600 13.5px/1 var(--sans); padding: 13px 10px; white-space: nowrap; text-decoration: none; color: var(--ink-2); }
.nav-row a:hover, .nav-row a[aria-current] { color: var(--accent); box-shadow: inset 0 -3px var(--accent); }
.fresh { margin: 12px 0 0; padding: 10px 14px; background: var(--accent-soft); border-left: 3px solid var(--accent);
  font: 500 14px/1.4 var(--sans); }
.fresh button { margin-left: 8px; background: var(--accent); color: var(--paper); border: 0; border-radius: 4px; padding: 5px 10px; font-weight: 600; }
main { padding-top: 26px; padding-bottom: 56px; }

/* ---------- shared type ---------- */
.kick-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin-bottom: 6px; }
.kicker { font: 700 12px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--accent);
  text-decoration: none; }
.topic { font: 500 12px/1.2 var(--sans); color: var(--muted); }
.topic::before { content: "·"; margin-right: 8px; }
.col-head { font: 700 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 12px;
  padding-top: 10px; border-top: 3px solid var(--rule-strong); }
.col-head a { text-decoration: none; }
.page-h { font: 700 clamp(30px, 5vw, 44px)/1.1 var(--serif); letter-spacing: -0.02em; margin: 6px 0 10px; }
.page-lede { font-size: 19px; color: var(--ink-2); max-width: 760px; margin: 0 0 26px; }
.sec-h { font: 700 26px/1.2 var(--serif); margin: 40px 0 14px; padding-top: 12px; border-top: 3px solid var(--rule-strong); }
.box-h { font: 700 12.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; color: var(--accent-ink); }
.more { display: inline-block; margin-top: 10px; font: 600 14px/1 var(--sans); color: var(--accent); text-decoration: none; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- cards ---------- */
.card h3 { font: 700 22px/1.2 var(--serif); letter-spacing: -0.01em; margin: 0 0 6px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; color: inherit; }
.card .rubric { margin: 0 0 8px; color: var(--ink-2); font-size: 16.5px; }
.card-meta { margin: 0; font: 500 12.5px/1.3 var(--sans); color: var(--muted); }
.card.lead h3 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; letter-spacing: -0.025em; }
.card.lead .rubric { font-size: 20px; line-height: 1.45; }
.lead-quick { margin: 14px 0 12px; padding: 12px 16px 12px 32px; background: var(--panel); border-left: 3px solid var(--accent); font-size: 16px; }
.lead-quick li { margin: 4px 0; }
.card.lead { padding-bottom: 22px; border-bottom: 1px solid var(--rule); margin-bottom: 20px; }
.second-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.second-grid .card { padding-top: 14px; border-top: 1px solid var(--rule); }
.card.row { display: block; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.card.row h3 { font-size: 25px; }

/* ---------- front page ---------- */
.front-top { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
.today-col { border-left: 1px solid var(--rule); padding-left: 26px; }
.notice { background: var(--panel); padding: 26px; border-top: 3px solid var(--accent); }
.notice h2 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; }
.brief { list-style: none; margin: 0; padding: 0; }
.brief li { padding: 11px 0; border-bottom: 1px solid var(--rule); }
.brief li:last-child { border-bottom: 0; }
.brief p { margin: 0; font-size: 15.5px; line-height: 1.45; }
.b-sec { display: block; font: 700 10.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.b-src { margin-top: 4px !important; font: 500 11.5px/1.3 var(--sans) !important; color: var(--muted); }
.indepth { font: 700 12.5px/1 var(--sans); color: var(--accent); text-decoration: none; white-space: nowrap; }
.promise { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 40px 0 10px;
  border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.promise div { padding: 16px 18px 18px 0; }
.promise div + div { padding-left: 18px; border-left: 1px solid var(--rule); }
.promise strong { display: block; font: 700 14px/1.3 var(--sans); margin-bottom: 4px; }
.promise span { font: 400 13.5px/1.45 var(--sans); color: var(--ink-2); }
.sec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 34px; margin-top: 34px; }
.sec-block ul { list-style: none; margin: 0; padding: 0; }
.sec-block li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sec-block li a { text-decoration: none; display: block; }
.sec-block strong { display: block; font: 700 18px/1.25 var(--serif); }
.sec-block span { display: block; font-size: 15px; color: var(--ink-2); margin-top: 3px; }
.sec-block a:hover strong { text-decoration: underline; }

/* ---------- section + today pages ---------- */
.section-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
.today-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; }

/* ---------- article ---------- */
.story-head { max-width: 820px; padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.story-head h1 { font: 700 clamp(32px, 5.4vw, 54px)/1.06 var(--serif); letter-spacing: -0.028em; margin: 4px 0 14px; }
.story-head .rubric { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.42; color: var(--ink-2); margin: 0 0 14px; }
.story-meta { font: 500 13px/1.5 var(--sans); color: var(--muted); margin: 0 0 16px; }
.upd { color: var(--warm); font-weight: 600; }
.js .levels { flex-wrap: wrap; align-items: center; gap: 6px; font: 500 13px/1 var(--sans); color: var(--muted); }
.levels button { border: 1px solid var(--rule); background: transparent; color: var(--ink-2); border-radius: 999px;
  padding: 8px 14px; font: 600 13px/1 var(--sans); }
.levels button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.quick { max-width: 820px; margin: 22px 0 0; padding: 16px 20px 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.quick ul { margin: 0; padding-left: 20px; } .quick li { margin: 5px 0; font-size: 17.5px; }
.story-grid { display: grid; grid-template-columns: minmax(0, 680px) minmax(0, 1fr); gap: 52px; margin-top: 28px; }
.story-body { font-size: 19px; line-height: 1.66; }
.story-body p { margin: 0 0 1.05em; }
.story-body > p:first-child::first-letter { float: left; font: 700 3.6em/0.82 var(--serif); padding: 6px 8px 0 0; color: var(--accent); }
.story-body h2 { font: 700 20px/1.3 var(--sans); letter-spacing: -0.005em; margin: 1.6em 0 .5em; }
.story-side { display: flex; flex-direction: column; gap: 18px; }
.box { background: var(--panel); padding: 18px 20px; border-top: 3px solid var(--accent); }
.box p { margin: 0; font-size: 16.5px; line-height: 1.55; }
.box.you { background: var(--warm-soft); border-top-color: var(--warm); }
.box.you .box-h { color: var(--warm); }
.jargon { margin: 0; } .jargon dt { font: 700 14.5px/1.3 var(--sans); margin-top: 12px; } .jargon dt:first-child { margin-top: 0; }
.jargon dd { margin: 3px 0 0; font-size: 15.5px; line-height: 1.5; color: var(--ink-2); }
.trust ul { margin: 0; padding: 0; list-style: none; font: 400 14px/1.45 var(--sans); }
.trust li { padding: 6px 0; border-bottom: 1px solid var(--rule); } .trust li:last-child { border: 0; }
.trust strong { font-size: 17px; color: var(--accent-ink); margin-right: 2px; }
.after { max-width: 820px; display: grid; gap: 18px; margin-top: 30px; }
.box.ask ol { margin: 0; padding-left: 22px; } .box.ask li { margin: 6px 0; font-size: 17px; }
.box.evidence { border-top-color: var(--rule-strong); }
.factfile, .sources { max-width: 820px; }
.ff h3 { font: 700 15px/1.3 var(--sans); margin: 22px 0 8px; }
.ff ul { margin: 0; padding-left: 20px; } .ff li { margin: 6px 0; font-size: 16.5px; }
.chip { display: inline-block; min-width: 20px; padding: 2px 6px; margin-left: 2px; border-radius: 4px; background: var(--chip);
  font: 700 11px/1.3 var(--sans); text-align: center; text-decoration: none; vertical-align: 2px; color: var(--ink-2); }
.chip:hover { background: var(--accent); color: var(--paper); }
.nums { border-collapse: collapse; width: 100%; font-size: 16px; }
.nums th { text-align: left; overflow-wrap: anywhere; width: 34%; padding: 8px 14px 8px 0; font: 700 17px/1.3 var(--serif); color: var(--accent-ink); vertical-align: top; }
.nums td { padding: 8px 0; border-bottom: 1px solid var(--rule); } .nums th { border-bottom: 1px solid var(--rule); }
.src-list { list-style: none; margin: 0; padding: 0; }
.src-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.src-list li:target { background: var(--accent-soft); }
.src-list .n { font: 700 13px/1.6 var(--sans); color: var(--accent); min-width: 18px; }
.src-list a { font-weight: 600; } .src-meta { display: block; font: 500 12.5px/1.4 var(--sans); color: var(--muted); margin-top: 2px; }
.sources h3 { font: 700 15px/1.3 var(--sans); margin: 22px 0 6px; }
.notes { padding-left: 20px; margin: 0; } .covered { font: 400 14px/1.5 var(--sans); color: var(--muted); }
.made { max-width: 820px; margin: 34px 0 0; padding-top: 14px; border-top: 1px solid var(--rule); font: 400 13.5px/1.55 var(--sans); color: var(--muted); }
.lvl-hint { display: none; margin-top: 22px; font: 500 15px/1.4 var(--sans); }
.lvl-hint button { border: 0; background: var(--accent); color: var(--paper); border-radius: 4px; padding: 8px 12px; font-weight: 600; margin-left: 6px; }
/* reading depth */
/* Depth controls need JavaScript; without it every part of the article is shown. */
.levels { display: none; }
.js .levels { display: inline-flex; }
.js .story.lv-quick [data-lv="full"], .js .story.lv-quick [data-lv="deep"], .js .story.lv-full [data-lv="deep"] { display: none; }
.js .story.lv-quick .lvl-hint { display: block; }
.js .story.lv-quick .story-grid { grid-template-columns: minmax(0, 820px); }
.related { margin-top: 48px; }
.rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }

/* ---------- about, search ---------- */
.about { max-width: 760px; } .about h2 { font: 700 24px/1.25 var(--serif); margin: 34px 0 10px; }
.about li { margin: 8px 0; }
.search-box input { width: 100%; max-width: 680px; font: 400 20px/1.3 var(--serif); padding: 14px 16px; border: 1px solid var(--rule);
  border-radius: 6px; background: var(--panel); color: var(--ink); }
.results { list-style: none; padding: 0; max-width: 760px; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.results a { font: 700 19px/1.3 var(--serif); text-decoration: none; } .results a:hover { text-decoration: underline; }
.results p { margin: 4px 0 0; font-size: 15px; color: var(--ink-2); }
.results .k { font: 700 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.bar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .6s; }
.table-wrap { overflow-x: auto; }
.runs { border-collapse: collapse; width: 100%; font: 400 14px/1.45 var(--sans); }
.runs th, .runs td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.runs th { font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { border-top: 3px solid var(--rule-strong); background: var(--panel); padding: 30px 0 40px; font: 400 14px/1.55 var(--sans); color: var(--ink-2); }
.foot-grid { display: grid; grid-template-columns: 1.3fr .7fr 1.3fr; gap: 30px; }
.foot-grid a { display: block; text-decoration: none; padding: 3px 0; font-weight: 600; }
.foot-mark { font: 700 24px/1 var(--serif); color: var(--ink); margin-bottom: 8px; } .foot-mark span { font: 600 17px/1 var(--deva); color: var(--accent); }
.foot-note p { margin: 0; color: var(--muted); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  .front-top, .section-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .today-col { border-left: 0; padding-left: 0; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sec-grid, .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise div:nth-child(3) { padding-left: 0; border-left: 0; }
  .promise div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .second-grid, .sec-grid, .rel-grid, .today-grid, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .promise { grid-template-columns: minmax(0, 1fr); }
  .promise div, .promise div + div { padding: 14px 0; border-left: 0; }
  .promise div + div { border-top: 1px solid var(--rule); }
  .tagline span { display: block; margin: 6px 0 0; }
  .story-body { font-size: 18px; }
  .nav-row { justify-content: flex-start; }
  .mast-date { font-size: 12px; }
}

/* ---------- notice line, explainer badge ---------- */
.notice-line { margin: 0 0 22px; padding: 11px 16px; background: var(--warm-soft); border-left: 4px solid var(--warm);
  font: 600 15px/1.45 var(--sans); color: var(--ink); }
.badge { font: 700 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--paper);
  background: var(--warm); padding: 3px 6px; border-radius: 3px; margin-right: 8px; }

/* Link back to the Sudh home page (sudh.org), a slim strip above the masthead. */
.sudh-home { display: block; padding: 5px 20px; font: 500 13px/1.5 var(--sans, -apple-system, BlinkMacSystemFont, sans-serif); color: var(--muted); background: var(--chip, var(--panel)); border-bottom: 1px solid var(--rule); text-decoration: none; }
.sudh-home:hover { color: var(--ink); }
