/* =====================================================================
   Kshiti design system · calm neo-brutalism
   Palette: orange, white, black and greys only.
   ===================================================================== */

@font-face { font-family: "Inter"; src: url("/static/fonts/web/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Anek Devanagari"; src: url("/static/fonts/web/AnekDevanagari.woff2") format("woff2"); font-weight: 100 800; font-stretch: 75% 125%; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Tillana"; src: url("/static/fonts/web/Tillana-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Tillana"; src: url("/static/fonts/web/Tillana-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #111111;
  --g800: #2B2B2B;
  --g700: #3D3D3D;
  --g500: #6B6B6B;
  --g400: #9A9A9A;
  --g300: #CFCFCF;
  --g200: #E4E4E4;
  --g100: #F3F3F3;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --o600: #EA580C;
  --o700: #C2410C;
  --o500: #F97316;
  --o200: #FED7AA;
  --o100: #FFEDD5;
  --o50: #FFF7ED;

  --bw: 2px;
  --r: 4px;
  --sh: 4px 4px 0 var(--ink);
  --sh-sm: 3px 3px 0 var(--ink);
  --sh-lg: 6px 6px 0 var(--ink);

  --f-en: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-hi: "Anek Devanagari", "Noto Sans Devanagari", "Nirmala UI", "Mangal", sans-serif;
  --f-brand: "Tillana", "Anek Devanagari", serif;
  --f-mono: ui-monospace, "Cascadia Mono", "Consolas", "Menlo", monospace;
  --f-ui: var(--f-en), var(--f-hi);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 140ms;
  --t: 220ms;
  --t-slow: 420ms;

  --maxw: 1280px;
  --rail: 340px;
}

html[lang="hi"] { --f-ui: var(--f-hi), var(--f-en); }
html.size-sm { font-size: 93.75%; }
html.size-lg { font-size: 112.5%; }

/* High contrast: pure black on white, thicker rules, no tints */
html.hc {
  --g800: #000; --g700: #000; --g500: #000; --g400: #000; --g300: #000; --g200: #000; --g100: #fff;
  --paper: #fff; --o100: #fff; --o50: #fff; --o200: #000; --o700: #9A3412; --bw: 3px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(var(--g200) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="hi"] body { line-height: 1.7; }
html.hc body { background-image: none; }

img { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--o700); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--ink); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }
kbd { font-family: var(--f-mono); font-size: .78em; border: 1.5px solid var(--g500); border-bottom-width: 3px; border-radius: 3px; padding: 0 .35em; background: var(--white); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); font-size: .86em; }
.muted { color: var(--g500); }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--o600); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.ic { display: inline-block; vertical-align: -0.18em; width: 1.15em; height: 1.15em; flex: none; }
.ic--sm { width: .9em; height: .9em; }
.ic--xl { width: 32px; height: 32px; }

/* ----------------------------------------------------------- skip link */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 14px; font-weight: 600; transition: top var(--t) var(--ease); }
.skip:focus { top: 12px; color: var(--white); }

/* ----------------------------------------------------------- utility bar (GIGW) */
.utilbar { background: var(--ink); color: var(--white); font-size: .8rem; }
.utilbar__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; flex-wrap: wrap; }
.utilbar__gov { letter-spacing: .02em; opacity: .92; }
.utilbar__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ulink { color: var(--white); text-decoration: none; opacity: .85; transition: opacity var(--t-fast); }
.ulink:hover { color: var(--white); opacity: 1; text-decoration: underline; }
.usep { width: 1px; height: 16px; background: var(--g500); }
.ubtn { display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1.5px solid transparent; color: var(--white); padding: 3px 8px; border-radius: 3px; transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease); }
.ubtn:hover { border-color: var(--g500); transform: translateY(-1px); }
.ubtn[aria-pressed="true"] { background: var(--white); color: var(--ink); }
.seg { display: inline-flex; border: 1.5px solid var(--g500); border-radius: 3px; overflow: hidden; }
.seg__b { background: transparent; border: 0; color: var(--white); padding: 2px 10px; min-width: 32px; transition: background var(--t-fast), color var(--t-fast); }
.seg__b + .seg__b { border-left: 1.5px solid var(--g500); }
.seg__b:hover { background: var(--g800); }
.seg__b.is-on { background: var(--o600); color: var(--ink); font-weight: 700; }
.seg__b sup { font-size: .7em; }
.seg--lang .seg__b[lang="hi"] { font-family: var(--f-hi); }

/* ----------------------------------------------------------- masthead */
.masthead { background: var(--white); border-bottom: var(--bw) solid var(--ink); position: sticky; top: 0; z-index: 30; }
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 4px; background: var(--o600); }
.masthead__row { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 22px; min-height: 84px; }
.emblems { display: flex; align-items: center; gap: 12px; padding-right: 18px; border-right: var(--bw) solid var(--ink); }
.emblem--india { height: 54px; width: auto; }
.emblem--mp { height: 52px; width: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand__mark { display: block; width: 92px; height: 52px; }
.brand__mark svg { display: block; width: 100%; height: 100%; }
.brand__mark .g { fill: var(--ink); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--f-brand); font-weight: 700; font-size: 1.7rem; letter-spacing: .01em; }
.brand__sub { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--g700); }
html[lang="hi"] .brand__sub { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.masthead__org { display: flex; flex-direction: column; line-height: 1.25; padding-left: 4px; }
.org__dept { font-weight: 700; font-size: .95rem; }
.org__body { font-size: .82rem; color: var(--g700); }
.masthead__status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; padding: 3px 9px; border: var(--bw) solid var(--ink); border-radius: 999px; background: var(--white); white-space: nowrap; }
.chip--ink { background: var(--ink); color: var(--white); }
.chip--warn { background: var(--o100); border-color: var(--o700); color: var(--ink); }
.chip--ok { background: var(--white); }
.chip--off { background: var(--g100); color: var(--g500); border-color: var(--g400); }

/* ----------------------------------------------------------- layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 28px; padding-top: 34px; padding-bottom: 56px; align-items: start; }
.layout:focus { outline: none; }
.col-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.col-rail { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 112px; }

/* ----------------------------------------------------------- buttons */
.btn {
  --lift: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 8px 16px;
  font-weight: 650; font-size: .95rem; letter-spacing: .005em;
  background: var(--white); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--sh-sm);
  transform: translate(var(--lift), var(--lift));
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t) var(--ease), color var(--t);
  will-change: transform;
  user-select: none;
}
.btn:hover { --lift: -2px; box-shadow: 5px 5px 0 var(--ink); }
.btn:active { --lift: 2px; box-shadow: 1px 1px 0 var(--ink); transition-duration: 60ms; }
.btn:disabled { opacity: .55; box-shadow: none; --lift: 0px; }
.btn--primary { background: var(--o600); }
.btn--primary:hover { background: var(--o500); }
.btn--lg { min-height: 50px; padding: 10px 22px; font-size: 1.02rem; }
.btn--icon { min-height: 38px; width: 38px; padding: 0; }
.btn--ghost { box-shadow: none; border-color: transparent; background: transparent; }
.btn--ghost:hover { border-color: var(--ink); box-shadow: var(--sh-sm); background: var(--white); }
.btn .ic--move { transition: transform var(--t) var(--ease-spring); }
.btn:hover .ic--move { transform: translateX(4px); }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .ic--move { animation: nudge 900ms var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--o600); padding-bottom: 1px; transition: gap var(--t) var(--ease), color var(--t-fast); }
.link:hover { gap: 9px; color: var(--o700); }

/* ----------------------------------------------------------- ask card */
.askcard {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-lg);
  padding: 28px 30px 24px;
}
.askcard__glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity var(--t-slow) var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), var(--o100), transparent 65%);
}
.askcard:hover .askcard__glow { opacity: 1; }
html.hc .askcard__glow { display: none; }
.h-ask { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.05rem); font-weight: 800; letter-spacing: -0.02em; }
html[lang="hi"] .h-ask { font-weight: 700; letter-spacing: 0; }
.lede { color: var(--g700); margin-top: 8px; max-width: 62ch; }
.ask { margin-top: 18px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--white); transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.ask:focus-within { box-shadow: 0 0 0 4px var(--o200); }
.ask textarea { display: block; width: 100%; border: 0; resize: none; padding: 16px 18px 6px; font-size: 1.1rem; line-height: 1.5; min-height: 84px; background: transparent; outline: none; }
.ask textarea::placeholder { color: var(--g400); }
.ask__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 10px 18px; flex-wrap: wrap; }
.ask__hint { font-size: .8rem; color: var(--g500); }
.examples { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.examples__label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--g500); }
html[lang="hi"] .examples__label { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.examples__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.ex {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--white); padding: 5px 12px; font-size: .86rem; text-align: left;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t) var(--ease);
}
.ex:hover { transform: translate(-1px, -2px); box-shadow: 2px 3px 0 var(--ink); background: var(--o50); }
.ex:active { transform: translate(1px, 1px); box-shadow: none; }
.ex__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex__tag { flex: none; font-size: .68rem; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 999px; background: var(--ink); color: var(--white); }
.ex__tag--nf { background: var(--g300); color: var(--ink); }
.ex[lang="hi"] { font-family: var(--f-hi); }

/* ----------------------------------------------------------- promise (empty state USP) */
.h-sec { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.h-sec::before { content: ""; width: 14px; height: 14px; background: var(--o600); border: var(--bw) solid var(--ink); }
.promise__grid { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pcard {
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 18px 16px 16px; box-shadow: var(--sh-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--d, 0) * 70ms + 200ms);
}
.pcard:nth-child(1) { --d: 0; } .pcard:nth-child(2) { --d: 1; } .pcard:nth-child(3) { --d: 2; } .pcard:nth-child(4) { --d: 3; }
.pcard:hover { transform: translate(-2px, -3px); box-shadow: 5px 6px 0 var(--ink); }
.pcard .ic--xl { color: var(--o700); }
.pcard h3 { margin-top: 12px; font-size: 1rem; font-weight: 750; }
.pcard p { margin-top: 6px; font-size: .88rem; color: var(--g700); line-height: 1.5; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------- result */
.result { scroll-margin-top: 140px; display: flex; flex-direction: column; gap: 18px; animation: rise var(--t-slow) var(--ease) both; }
.qecho { font-size: 1.05rem; font-weight: 600; padding-left: 14px; border-left: 4px solid var(--o600); color: var(--g800); }
.qecho small { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--g500); margin-bottom: 2px; }

.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--white); overflow: hidden; }
.stage { position: relative; display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; row-gap: 1px; padding: 9px 12px 10px; font-size: .82rem; font-weight: 650; color: var(--g400); transition: color var(--t), background var(--t); }
.stage + .stage { border-left: var(--bw) solid var(--ink); }
.stage .ic { grid-column: 2; }
.stage__dot { grid-column: 1; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; transition: background var(--t), border-color var(--t), transform var(--t) var(--ease-spring); }
.stage__t { grid-column: 3; min-width: 0; line-height: 1.25; }
.stage__s { grid-column: 3; grid-row: 2; font-family: var(--f-mono); font-size: .72rem; font-weight: 600; color: var(--g500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1em; }
.stage.is-active { color: var(--ink); background: var(--o50); }
.stage.is-active .stage__dot { border-color: var(--o600); background: var(--o600); animation: pulse 1.1s var(--ease) infinite; }
.stage.is-done { color: var(--ink); }
.stage.is-done .stage__dot { background: var(--ink); border-color: var(--ink); transform: scale(1.1); }
.stage.is-skip { color: var(--g400); }
.stage.is-fail { color: var(--o700); }
.stage.is-fail .stage__dot { background: var(--o700); border-color: var(--o700); }
.stage::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--o600); transition: width 600ms var(--ease); }
.stage.is-active::after { width: 70%; transition-duration: 4s; }
.stage.is-done::after { width: 100%; background: var(--ink); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, .45); } 100% { box-shadow: 0 0 0 9px rgba(234, 88, 12, 0); } }

/* figure cards */
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.figs:empty { display: none; }
.fig {
  position: relative; background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh);
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%;
  animation: pop var(--t-slow) var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 80ms);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fig:hover { transform: translate(-2px, -2px); box-shadow: var(--sh-lg); }
.fig--lead { background: var(--o600); }
.fig__label { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
html[lang="hi"] .fig__label { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.fig__value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fig__sub { font-size: .82rem; font-weight: 700; }
.fig__src { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; }
.fig__row { font-size: .76rem; color: var(--g700); }
.fig--lead .fig__row { color: var(--ink); }
.fig__badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--ink); color: var(--white); padding: 2px 7px; border-radius: 3px; width: fit-content; }
html[lang="hi"] .fig__badge { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.fig__more { margin-top: 8px; font-size: .82rem; color: var(--g800); border-top: 1.5px dashed var(--g400); padding-top: 8px; display: none; }
.fig.is-open .fig__more { display: block; animation: rise var(--t) var(--ease); }
.fig__more ul { margin: 6px 0 0; padding-left: 18px; }
.figs__note { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; font-size: .84rem; color: var(--g700); background: var(--white); border: 1.5px dashed var(--g500); border-radius: var(--r); padding: 8px 12px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }

/* plot diagram */
.plot { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 18px; align-items: center; animation: rise var(--t-slow) var(--ease) both; }
.plot > svg { display: block; width: 100%; height: auto; }
.plot h3 { font-size: .95rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.plot p { font-size: .84rem; color: var(--g700); margin-top: 6px; }
.plot .legend { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: .82rem; }
.plot .legend span { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 12px; border: 1.5px solid var(--ink); flex: none; }
.sw--open { background: repeating-linear-gradient(45deg, var(--o200), var(--o200) 3px, var(--white) 3px, var(--white) 6px); }
.sw--build { background: var(--white); border-style: dashed; }
.sw--road { background: var(--g300); }

/* answer */
.answer { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh); padding: 18px 22px 18px; }
.answer__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.answer__kicker { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--g500); display: flex; align-items: center; gap: 8px; }
html[lang="hi"] .answer__kicker { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.answer__text { font-size: 1.12rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.answer__text[lang="hi"] { font-family: var(--f-hi); font-size: 1.18rem; line-height: 1.8; }
.answer__text .rref { font-weight: 700; background: linear-gradient(transparent 62%, var(--o200) 62%); }
.answer__text.is-streaming::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--o600); animation: caret 900ms steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.answer__meta { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.answer--unverified { border-style: dashed; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: var(--bw) solid var(--ink); background: var(--white); }
html[lang="hi"] .badge { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.badge--ink { background: var(--ink); color: var(--white); }
.badge--o { background: var(--o600); }
.badge--muted { border-color: var(--g400); color: var(--g500); }

/* skeleton while waiting */
.skel { display: flex; flex-direction: column; gap: 9px; }
.skel i { display: block; height: 14px; border-radius: 3px; background: linear-gradient(90deg, var(--g200) 0%, var(--g100) 40%, var(--g200) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel i:nth-child(2) { width: 92%; } .skel i:nth-child(3) { width: 74%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* proof (citations) */
.proof { display: flex; flex-direction: column; gap: 12px; }
.proof__h { font-size: .95rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cite { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.cite__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: var(--bw) solid var(--ink); background: var(--g100); flex-wrap: wrap; }
.cite__rule { font-weight: 800; font-size: .98rem; }
.cite__title { color: var(--g700); font-size: .9rem; flex: 1; min-width: 160px; }
.cite__page { font-family: var(--f-mono); font-size: .8rem; font-weight: 700; }
.cite__quote { margin: 0; padding: 12px 14px; font-family: var(--f-mono); font-size: .8rem; line-height: 1.55; white-space: pre; overflow-x: auto; max-height: 280px; overflow-y: auto; color: var(--g800); background: var(--white); }
.cite__quote mark { background: var(--o100); color: var(--ink); box-shadow: inset 3px 0 0 var(--o600); display: inline-block; min-width: 100%; }
.cite__supports { padding: 8px 14px 0; font-size: .84rem; color: var(--g700); }
.cite__actions { display: flex; gap: 8px; padding: 10px 14px 12px; flex-wrap: wrap; border-top: 1.5px dashed var(--g300); }
.cite__actions .btn { min-height: 34px; padding: 4px 10px; font-size: .84rem; box-shadow: 2px 2px 0 var(--ink); }
.cite__actions .btn:hover { box-shadow: 3px 3px 0 var(--ink); }

/* warnings */
.warn { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--white); animation: rise var(--t-slow) var(--ease) both; }
.warn .ic { width: 22px; height: 22px; margin-top: 2px; }
.warn__t { font-weight: 800; font-size: .92rem; }
.warn__d { font-size: .9rem; color: var(--g800); margin-top: 2px; }
.warn--amendment { background: var(--o100); border-color: var(--o700); box-shadow: 4px 4px 0 var(--o700); }
.warn--amendment .ic { color: var(--o700); }
.warn--table, .warn--info { background: var(--white); border-style: dashed; }
.warn--unverified, .warn--invented_rule { background: var(--white); border-color: var(--o700); }
.warn--unverified .ic, .warn--invented_rule .ic { color: var(--o700); }

/* state cards */
.state { display: flex; gap: 18px; align-items: flex-start; padding: 22px; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--white); box-shadow: var(--sh); animation: rise var(--t-slow) var(--ease) both; }
.state__icon { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border: var(--bw) solid var(--ink); border-radius: 50%; background: var(--g100); }
.state__icon .ic { width: 28px; height: 28px; }
.state h3 { font-size: 1.2rem; font-weight: 800; }
.state p { margin-top: 6px; color: var(--g800); }
.state--nf { background: var(--g100); }
.state--err .state__icon { background: var(--o100); color: var(--o700); }
.state--inputs .state__icon { background: var(--o600); }

.inputs { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 700; }
.field__box { display: flex; align-items: center; border: var(--bw) solid var(--ink); border-radius: var(--r); background: var(--white); transition: box-shadow var(--t); }
.field__box:focus-within { box-shadow: 0 0 0 4px var(--o200); }
.field input, .field select { border: 0; outline: none; padding: 9px 10px; width: 100%; min-width: 0; background: transparent; font-weight: 600; }
.field__unit { padding: 0 10px; font-size: .8rem; color: var(--g500); border-left: 1.5px solid var(--g300); }

/* actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; animation: rise var(--t-slow) var(--ease) both; }
.actions__fb { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--g700); }
.btn[data-fb].is-picked { background: var(--ink); color: var(--white); }
.decides { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--g700); border-top: 1.5px dashed var(--g300); padding-top: 12px; }

/* ----------------------------------------------------------- rail */
.rcard { background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 16px 16px 14px; box-shadow: var(--sh-sm); transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.rcard:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.rcard--muted { background: var(--g100); }
.rcard__h { font-size: .92rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kv { margin: 0 0 12px; display: flex; flex-direction: column; gap: 7px; font-size: .84rem; }
.kv div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; }
.kv dt { color: var(--g500); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.amend { margin-bottom: 12px; }
.amend__item { font-size: .82rem; background: var(--o100); border: 1.5px solid var(--o700); border-radius: var(--r); padding: 8px 10px; }
.amend__item b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.how { list-style: none; counter-reset: how; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.how li { counter-increment: how; display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; font-size: .84rem; color: var(--g700); }
.how li::before { content: counter(how); grid-row: span 2; width: 26px; height: 26px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; border: var(--bw) solid var(--ink); background: var(--o600); color: var(--ink); border-radius: 50%; }
.how b { color: var(--ink); font-size: .88rem; }
.svc { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.limits { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--g700); }

/* accuracy bars */
.acc { display: flex; flex-direction: column; gap: 10px; }
.acc__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: .82rem; }
.acc__label { font-weight: 600; }
.acc__val { font-family: var(--f-mono); font-weight: 700; }
.acc__bar { grid-column: 1 / -1; height: 10px; border: 1.5px solid var(--ink); border-radius: 2px; background: var(--g100); overflow: hidden; }
.acc__bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width 900ms var(--ease); }
.acc__bar--o i { background: var(--o600); }
.acc__empty { font-size: .84rem; color: var(--g700); border: 1.5px dashed var(--g400); border-radius: var(--r); padding: 10px; }
.acc__foot { font-size: .76rem; color: var(--g500); margin-top: 4px; }

/* ----------------------------------------------------------- drawer */
.drawer { position: fixed; inset: 0; z-index: 60; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(17, 17, 17, .38); animation: fade var(--t) var(--ease) both; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(860px, 94vw); background: var(--white); border-left: var(--bw) solid var(--ink); box-shadow: -6px 0 0 var(--ink); display: flex; flex-direction: column; animation: slidein var(--t-slow) var(--ease) both; }
.drawer.is-closing .drawer__panel { animation: slideout var(--t) var(--ease) both; }
.drawer.is-closing .drawer__scrim { animation: fade var(--t) var(--ease) reverse both; }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 18px 20px; border-bottom: var(--bw) solid var(--ink); background: var(--g100); }
.drawer__kicker { font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--g500); }
.drawer__head h2 { font-size: 1.25rem; font-weight: 800; margin-top: 2px; }
.drawer__body { overflow-y: auto; padding: 16px 20px 40px; }
.blk { margin: 0 0 10px; font-family: var(--f-mono); font-size: .76rem; line-height: 1.55; white-space: pre; overflow-x: auto; padding: 8px 10px; border-left: 3px solid transparent; }
.blk.is-cited { background: var(--o100); border-left-color: var(--o600); }
.pgbreak { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--g500); }
.pgbreak::before, .pgbreak::after { content: ""; flex: 1; height: 1.5px; background: var(--g300); }
@keyframes slidein { from { transform: translateX(100%); } to { transform: none; } }
@keyframes slideout { to { transform: translateX(100%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ----------------------------------------------------------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--r); box-shadow: 4px 4px 0 var(--o600); font-size: .9rem; font-weight: 600; animation: toastin var(--t-slow) var(--ease-spring) both; }
.toast.is-out { animation: toastout var(--t) var(--ease) both; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(8px); } }

/* ----------------------------------------------------------- footer */
.footer { background: var(--ink); color: var(--g200); border-top: 6px solid var(--o600); padding: 34px 0 18px; font-size: .86rem; }
.footer a { color: var(--white); }
.footer a:hover { color: var(--o200); }
.footer h3 { color: var(--white); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.footer ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.footer__brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-brand); font-weight: 700; color: var(--white); font-size: 1.5rem; margin-bottom: 8px; }
.footer__mark { color: var(--o500); }
.footer__legal { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--g700); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .muted { color: var(--g400); }

/* ----------------------------------------------------------- splash (opening animation) */
.splash { position: fixed; inset: 0; z-index: 200; background: var(--paper); display: grid; place-items: center; overflow: hidden; }
.splash::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--g300) 1px, transparent 1.3px); background-size: 22px 22px; opacity: .55; }
.splash__grain { position: absolute; inset: -50%; background: radial-gradient(circle at 50% 46%, var(--o100), transparent 42%); animation: breathe 4.5s var(--ease) both; }
.splash__stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.splash__mark { width: min(56vw, 440px); aspect-ratio: 2210 / 1722; }
.splash__mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.splash__mark .g { fill: var(--ink); fill-opacity: 0; stroke: var(--ink); stroke-width: 9; stroke-linejoin: round; stroke-linecap: round; }
/* Timeline (about 6 s): each stroke is written slowly (0.3 s to 3.3 s), ink settles,
   the orange swash sweeps (3.1 s), KSHITI rises (3.6 s), the tagline (4.0 s), a calm hold,
   then the mark flies into the header (JS, from 5.3 s). Click or any key skips. */
.splash.is-play .splash__mark .g {
  animation: draw 1.9s cubic-bezier(.45, 0, .25, 1) forwards, ink 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.45s + 0.3s), calc(var(--i) * 0.45s + 1.7s);
}
.splash__swash { display: block; width: min(48vw, 380px); height: 30px; margin-top: -6px; overflow: visible; }
.splash__swash path { fill: none; stroke: var(--o600); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 700; stroke-dashoffset: 700; }
.splash.is-play .splash__swash path { animation: swash 1.1s cubic-bezier(.45, 0, .25, 1) 3.1s forwards; }
.splash__latin { font-family: var(--f-brand); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); letter-spacing: .5em; margin-top: 14px; padding-left: .5em; opacity: 0; transform: translateY(10px); }
.splash.is-play .splash__latin { animation: rise .9s var(--ease) 3.6s forwards; }
.splash__tag { margin-top: 10px; font-size: .82rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--g700); opacity: 0; }
html[lang="hi"] .splash__tag { text-transform: none; letter-spacing: .02em; font-size: .95rem; }
.splash.is-play .splash__tag { animation: rise .9s var(--ease) 4.0s forwards; }
.splash__skip { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); font-size: .75rem; font-weight: 600; letter-spacing: .08em; color: var(--g500); opacity: 0; }
.splash.is-play .splash__skip { animation: fade .8s var(--ease) 1.2s forwards; }
.splash.is-leaving { animation: splashout .7s var(--ease) forwards; }
/* Reduced motion (for example Windows "Animation effects" off): no drawing, a calm fade-in and hold. */
.splash.is-calm .splash__mark .g { fill-opacity: 1; stroke-width: 0; }
.splash.is-calm .splash__stage { animation: fade 1s ease-out both; }
.splash.is-calm .splash__swash path { stroke-dashoffset: 0; }
.splash.is-calm .splash__latin, .splash.is-calm .splash__tag { opacity: 1; transform: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ink { to { fill-opacity: 1; stroke-width: 0; } }
@keyframes swash { to { stroke-dashoffset: 0; } }
@keyframes breathe { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes splashout { to { opacity: 0; visibility: hidden; } }
body.is-splash { overflow: hidden; }

/* ----------------------------------------------------------- page entrance after splash */
.is-entering .masthead, .is-entering .askcard, .is-entering .col-rail > * { animation: rise .6s var(--ease) both; }
.is-entering .askcard { animation-delay: 80ms; }
.is-entering .col-rail > :nth-child(1) { animation-delay: 160ms; }
.is-entering .col-rail > :nth-child(2) { animation-delay: 220ms; }
.is-entering .col-rail > :nth-child(3) { animation-delay: 280ms; }
.is-entering .col-rail > :nth-child(4) { animation-delay: 340ms; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 1fr; }
  .col-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promise__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .masthead__org { display: none; }
  .masthead__row { grid-template-columns: auto auto 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 14px; }
  .utilbar__gov { display: none; }
  .masthead__row { grid-template-columns: auto 1fr; gap: 12px; min-height: 70px; }
  .masthead__status { display: none; }
  .emblems { padding-right: 10px; }
  .emblem--india { height: 42px; } .emblem--mp { height: 40px; }
  .brand__mark { width: 64px; height: 38px; }
  .askcard { padding: 20px 16px 18px; }
  .ask textarea { min-height: 112px; font-size: 1.02rem; }
  .stages { grid-template-columns: 1fr 1fr; }
  .examples__list { grid-template-columns: 1fr; }
  .stage:nth-child(3) { border-left: 0; }
  .stage:nth-child(n+3) { border-top: var(--bw) solid var(--ink); }
  .col-rail, .promise__grid { grid-template-columns: 1fr; }
  .plot { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .actions__fb { margin-left: 0; }
}

/* ----------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  :not(.splash, .splash *), :not(.splash, .splash *)::before, :not(.splash, .splash *)::after {
    animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
}

/* ----------------------------------------------------------- print */
@media print {
  .utilbar, .askcard, .promise, .col-rail, .actions, .footer, .stages, .toasts, .skip { display: none !important; }
  .layout { display: block; }
  body { background: none; }
}
