/* Project Insaf 2.0
   White ground, pastel pink and pastel yellow, plum ink. One committed light theme. */

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-soft: #FBF8FA;
  --ink: #221B26;
  --ink-2: #5E5563;
  --ink-3: #8C8391;
  --line: #EFE7EC;

  --pink-50: #FFF4F7;
  --pink-100: #FFE6EE;
  --pink-200: #FFCFDD;
  --pink-300: #F9A8C0;
  --pink-500: #E0618B;
  --pink-600: #C2406D;   /* buttons, active, text accent (AA on white) */
  --pink-800: #8E2A4E;

  --yellow-50: #FFFCF0;
  --yellow-100: #FFF5D1;
  --yellow-200: #FFEAA6;
  --yellow-300: #FFDB70;
  --yellow-800: #7A5A00;  /* text on yellow */

  --shadow-sm: 0 1px 2px rgba(34,27,38,.05);
  --shadow: 0 1px 2px rgba(34,27,38,.04), 0 10px 30px -14px rgba(142,42,78,.22);
  --r-lg: 24px; --r-md: 18px; --r-sm: 12px;

  --font: "Lexend", "Noto Sans Devanagari", "Segoe UI", system-ui, -apple-system, sans-serif;
  --tab-h: 84px;
  --ease: cubic-bezier(.22,.8,.24,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pink-600); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--pink-300); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 1.1rem;
  animation: splash-out .45s var(--ease) 1.35s forwards;
}
#splash::before, #splash::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; }
#splash::before { width: 320px; height: 320px; background: var(--pink-100); top: 18%; left: -90px; }
#splash::after { width: 260px; height: 260px; background: var(--yellow-100); bottom: 14%; right: -70px; }
.splash-logo { animation: logo-in .9s var(--ease) both, balance 1.1s ease-in-out .35s both; transform-origin: 50% 30%; }
.splash-name { font-weight: 600; font-size: 1.35rem; animation: fade-up .6s var(--ease) .35s both; }
@keyframes logo-in { from { transform: scale(.7); opacity: 0; } }
@keyframes balance { 0% { rotate: -9deg; } 45% { rotate: 6deg; } 75% { rotate: -2deg; } 100% { rotate: 0deg; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
.no-splash #splash { display: none; }

/* ---------- Brand ---------- */
.ver {
  display: inline-block; vertical-align: .2em; margin-left: .2rem;
  font: 600 .66rem/1 var(--font); letter-spacing: .02em;
  color: var(--pink-800); background: var(--pink-100);
  padding: .3rem .45rem; border-radius: 999px;
}
.splash-name .ver { font-size: .8rem; }

/* ---------- Shell ---------- */
.shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "bar" "main"; }
.appbar {
  grid-area: bar; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(env(safe-area-inset-top) + .7rem) 20px .7rem;
  background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; }
.brand-name { font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }

/* ---------- Language switch (top of every screen) ---------- */
.appbar-end { display: flex; align-items: center; gap: .6rem; flex: none; }
.lang-switch { display: inline-grid; grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg-soft); border: 1.5px solid var(--pink-200); }
.lang-switch button { min-height: 36px; padding: .35rem .85rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: .86rem; font-weight: 500; line-height: 1; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease); }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--pink-600); color: #fff; font-weight: 600; }
.lang-switch button[lang="hi"] { font-family: "Noto Sans Devanagari", var(--font); font-size: .92rem; }
@media (max-width: 639px) {
  .appbar .js-install { display: none !important; }   /* on phones, the install button lives in About */
  .brand { gap: .5rem; }
  .brand svg { width: 34px; height: 34px; }
  .brand-name { font-size: 1rem; }
  .lang-switch button { padding: .35rem .7rem; }
}
@media (max-width: 359px) { .brand-name .ver { display: none; } }

/* Netlify's "Powered by Netlify" badge: keep it clear of the bottom tab bar on phones */
@media (max-width: 899px) {
  #nl-badge-frame { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)) !important; }
  main { padding-bottom: calc(var(--tab-h) + 2.5rem + 56px + env(safe-area-inset-bottom)); }
}

/* switching language: a quick fade so the page doesn't jump */
main { transition: opacity .15s ease; }
main.lang-out { opacity: 0; }
.no-anim .stagger > *, .no-anim .org, .no-anim .dir-card, .no-anim .cell, .no-anim .state-body.swap { animation: none !important; }

main {
  grid-area: main; width: 100%; max-width: 1000px; margin-inline: auto;
  padding: .5rem 20px calc(var(--tab-h) + 2.5rem + env(safe-area-inset-bottom)); outline: none;
}

.tabs {
  position: fixed; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  height: var(--tab-h); padding: 8px 4px;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 12px 40px -12px rgba(34,27,38,.2); backdrop-filter: blur(12px);
}
.tabs a { display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; padding-inline: 1px; color: var(--ink-3); text-decoration: none; font-size: .64rem; font-weight: 500; border-radius: 18px; }
.tab-ic { display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .3s var(--ease); }
/* tab names wrap onto two lines on phones */
.tab-lab { max-width: 100%; text-align: center; line-height: 1.2; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current] .tab-ic { background: var(--pink-100); color: var(--pink-600); }
/* state sub-headers under Access to Legal Resources.
   Phones: a row above the four tabs while Access to Legal Resources is open. Larger screens: indented in the side menu. */
.tab-sub { display: none; }
@media (max-width: 899px) {
  .tabs { transition: height .3s var(--ease); }
  html.in-help { --tab-h: 130px; }
  html.in-help .tabs { grid-template-rows: auto minmax(0, 1fr); row-gap: 6px; padding-top: 7px; }
  html.in-help .tabs > a { grid-row: 2; }
  html.in-help .tab-sub { display: flex; gap: 3px; grid-row: 1; grid-column: 1 / -1; padding: 0 3px; animation: rise .35s var(--ease) both; }
  .tabs .tab-sub a {
    flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 3px 6px;
    border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line);
    font-size: .68rem; font-weight: 500; line-height: 1.15; text-align: center; color: var(--ink-2);
  }
  .tabs .tab-sub a[aria-current] { background: var(--pink-600); border-color: var(--pink-600); color: #fff; font-weight: 600; }
}

@media (min-width: 900px) {
  .shell { grid-template-columns: 236px minmax(0, 1fr); grid-template-areas: "bar bar" "tabs main"; }
  .appbar { padding-inline: 32px; border-bottom: 1px solid var(--line); }
  .tabs { grid-area: tabs; position: sticky; top: 76px; align-self: start; left: auto; right: auto; bottom: auto;
    height: auto; display: flex; flex-direction: column; gap: .3rem; margin: 1.25rem 0 0 16px; padding: .6rem; box-shadow: none; }
  .tabs a { grid-auto-flow: column; grid-template-columns: auto 1fr; justify-content: start; justify-items: start; gap: .5rem; padding: .35rem; font-size: .92rem; }
  .tab-lab { text-align: left; line-height: 1.3; display: block; overflow: visible; -webkit-line-clamp: unset; }
  .tabs a:hover { background: var(--bg-soft); color: var(--ink); }
  .tabs a[aria-current] { background: var(--pink-50); }
  .tab-ic { width: 40px; }
  .tab-sub { display: grid; gap: 2px; margin: .1rem 0 .4rem 1.55rem; padding-left: .55rem; border-left: 2px solid var(--pink-100); }
  .tabs .tab-sub a { display: block; padding: .38rem .6rem; border-radius: 10px; font-size: .9rem; font-weight: 500; line-height: 1.3; color: var(--ink-2); background: transparent; }
  .tabs .tab-sub a:hover { background: var(--bg-soft); color: var(--ink); }
  .tabs .tab-sub a[aria-current] { background: var(--pink-50); color: var(--pink-600); font-weight: 600; }
  main { padding: 1.5rem 36px 3rem; }
}

/* ---------- Screens & motion ---------- */
.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.screen.enter { animation: screen-in .5s var(--ease); }
@keyframes screen-in { from { opacity: .3; transform: translateY(16px); } }
.stagger > * { animation: rise .6s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; }
.stagger > *:nth-child(n+5) { animation-delay: .24s; }
@keyframes rise { from { opacity: .35; transform: translateY(12px); } }

/* ---------- Type ---------- */
.page-head { display: grid; gap: .55rem; padding-top: .5rem; }
.kicker { font-size: .82rem; font-weight: 500; color: var(--pink-600); display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.h-page { font-size: clamp(1.9rem, 6.2vw, 2.6rem); line-height: 1.12; font-weight: 600; }
.h-sec { font-size: clamp(1.25rem, 3.8vw, 1.5rem); line-height: 1.25; font-weight: 600; }
.h-card { font-size: 1.08rem; line-height: 1.35; font-weight: 600; }
.lede { color: var(--ink-2); font-size: 1.04rem; font-weight: 300; max-width: 60ch; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.sec { display: grid; gap: 1rem; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; }
.sec-head > div { display: grid; gap: .25rem; }

/* ---------- Surfaces ---------- */
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.1rem, 3.5vw, 1.6rem); box-shadow: var(--shadow-sm); }
.card.raised { box-shadow: var(--shadow); border-color: transparent; }
.pink { background: var(--pink-50); border-color: transparent; }
.yellow { background: var(--yellow-50); border-color: transparent; }

/* ---------- Pills, chips, buttons ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; font-weight: 500; padding: .28rem .65rem; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); white-space: nowrap; }
.pill.p { background: var(--pink-100); color: var(--pink-800); }
.pill.y { background: var(--yellow-100); color: var(--yellow-800); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 999px; padding: .8rem 1.25rem; min-height: 46px; cursor: pointer;
  font-weight: 500; font-size: .92rem; line-height: 1.1; text-decoration: none;
  background: var(--pink-600); color: #fff;
  transition: transform .18s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { background: var(--pink-800); }
.btn:active { transform: scale(.97); }
.btn-soft { background: var(--pink-100); color: var(--pink-800); }
.btn-soft:hover { background: var(--pink-200); }
.btn-line { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { background: var(--bg-soft); }
.btn.small { min-height: 36px; padding: .5rem .9rem; font-size: .82rem; }
.btn-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.arrow::after { content: "→"; transition: transform .2s var(--ease); }
.btn:hover .arrow::after, .arrow:hover::after { transform: translateX(3px); }
.ext::after { content: "↗"; font-size: .85em; }

.segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented button { border: 0; background: transparent; padding: .5rem .95rem; border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background .25s var(--ease), color .25s; }
.segmented button[aria-pressed="true"], .segmented button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(34,27,38,.18); }
.segmented.full { display: flex; width: 100%; }
.segmented.full button { flex: 1 1 auto; min-width: 0; padding-inline: clamp(.4rem, 2.4vw, .95rem); }
@media (min-width: 520px) {
  .segmented.full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .segmented.full button { padding-inline: .95rem; }
}

.chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip-btn { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); padding: .45rem .9rem; border-radius: 999px; cursor: pointer; font-size: .84rem; font-weight: 500; transition: all .2s var(--ease); }
.chip-btn:hover { border-color: var(--pink-300); color: var(--ink); }
.chip-btn[aria-pressed="true"] { background: var(--yellow-200); border-color: var(--yellow-200); color: var(--ink); }

/* ---------- Tracker: stat tiles ---------- */
.tiles { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { border-radius: var(--r-md); padding: 1.05rem 1rem 1.1rem; display: grid; gap: .3rem; align-content: start; }
.tile:nth-child(4n+1), .tile:nth-child(4n+4) { background: var(--pink-50); }
.tile:nth-child(4n+2), .tile:nth-child(4n+3) { background: var(--yellow-50); }
.tile-val { font-size: clamp(1.45rem, 5vw, 1.9rem); font-weight: 600; line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile-lab { font-size: .82rem; color: var(--ink-2); line-height: 1.4; }

/* ---------- Tracker: queue chart ---------- */
.queue-summary { font-size: 1.02rem; color: var(--ink-2); max-width: 62ch; }
.queue-summary b { color: var(--ink); font-weight: 600; }
.queue-summary .hl { color: var(--pink-600); }
.big-share { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.big-share b { font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--pink-600); font-variant-numeric: tabular-nums; }
.big-share span { color: var(--ink-2); font-size: .95rem; }
.seg-bar { display: flex; height: 56px; border-radius: 16px; overflow: hidden; gap: 3px; }
.seg { height: 100%; transition: flex-basis .8s var(--ease), filter .2s; border-radius: 6px; cursor: default; min-width: 4px; }
.seg:first-child { border-radius: 16px 6px 6px 16px; }
.seg:last-child { border-radius: 6px 16px 16px 6px; }
.seg.hot { filter: brightness(.94) saturate(1.2); }
.c0 { background: var(--yellow-300); }
.c1 { background: var(--pink-200); }
.c2 { background: var(--pink-300); }
.c3 { background: var(--pink-500); }
.c4 { background: var(--pink-800); }
.axis { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-3); margin-top: .45rem; }
.age-rows { display: grid; gap: .15rem; }
.age-row { display: grid; grid-template-columns: 12px minmax(92px, 1fr) minmax(0, 2.2fr) auto; align-items: center; gap: .8rem; padding: .55rem .6rem; border-radius: 12px; font-size: .88rem; transition: background .2s; }
.age-row.hot { background: var(--bg-soft); }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.age-track { height: 10px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.age-fill { display: block; height: 100%; border-radius: 999px; transition: width .8s var(--ease); }
.age-val { font-size: .84rem; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.age-val em { font-style: normal; color: var(--ink-3); font-weight: 400; margin-left: .45rem; display: inline-block; min-width: 5.6ch; text-align: right; }

/* "Pending for more than a year": criminal, civil and all cases side by side */
.over { display: grid; gap: .75rem; }
.over-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem 1rem; }
.over-sub { font-size: .8rem; color: var(--ink-3); }
.over-grid { display: grid; gap: .6rem; grid-template-columns: minmax(0, 1fr); }
.over-item { display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: .75rem; row-gap: .2rem; padding: .95rem 1.05rem; border-radius: var(--r-md); }
.over-item.o0 { background: var(--pink-50); }
.over-item.o1 { background: var(--yellow-50); }
.over-item.o2 { background: var(--pink-100); }
.over-lab { font-size: .84rem; font-weight: 500; color: var(--ink-2); }
.over-pct { font-size: 1.6rem; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; color: var(--ink); }
.over-cnt { grid-column: 1 / -1; font-size: .78rem; line-height: 1.4; color: var(--ink-2); }
@media (min-width: 640px) {
  .over-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .over-item { grid-template-columns: minmax(0, 1fr); }
}
.note { font-size: .78rem; line-height: 1.5; color: var(--ink-3); max-width: 62ch; }
@media (max-width: 480px) { .age-row { grid-template-columns: 12px 1fr auto; } .age-track { display: none; } }

/* ---------- Tracker: state lens ---------- */
.state-body { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); align-items: start; }
.state-body.swap { animation: rise .5s var(--ease); }
.facts { display: grid; gap: .6rem; }
.fact { display: grid; gap: .1rem; padding: .85rem 1rem; border-radius: var(--r-sm); background: var(--bg-soft); }
.fact-val { font-size: 1.45rem; font-weight: 600; line-height: 1.15; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.fact-lab { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
.viz { display: grid; gap: .8rem; padding: 1.1rem; border-radius: var(--r-md); background: var(--yellow-50); }
.viz-lab { font-size: .8rem; color: var(--yellow-800); font-weight: 500; }
.cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.cell { aspect-ratio: 1; border-radius: 7px; max-width: 100%; background: var(--bg); border: 1.5px solid var(--yellow-200); animation: pop .4s var(--ease) both; animation-delay: calc(var(--i) * 22ms); }
.cell.in { background: var(--yellow-300); border-color: var(--yellow-300); }
.cell.over { background: var(--pink-500); border-color: var(--pink-500); }
.cell.blank { visibility: hidden; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.viz-read { font-size: .92rem; color: var(--ink-2); }
.viz-read b { font-size: 1.5rem; font-weight: 600; color: var(--pink-600); letter-spacing: -.03em; margin-right: .25rem; }
.legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .78rem; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.aid-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--pink-100); color: var(--pink-800); text-decoration: none; font-weight: 500; transition: background .2s, transform .2s var(--ease); }
.aid-link:hover { background: var(--pink-200); transform: translateY(-1px); }
.aid-link small { display: block; font-weight: 400; color: var(--pink-800); opacity: .8; font-size: .8rem; }
.aid-link .go { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex: none; font-size: 1.1rem; }

/* ---------- Help ---------- */
.sos { background: var(--pink-100); border-radius: var(--r-lg); padding: clamp(1.2rem, 4vw, 1.75rem); display: grid; gap: 1.1rem; position: relative; overflow: hidden; }
.sos::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: var(--yellow-100); right: -80px; top: -90px; opacity: .8; }
.sos > * { position: relative; z-index: 1; }
.sos .lede { color: var(--pink-800); }
.sos-grid { display: grid; gap: .6rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .sos-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sos-item { display: grid; gap: .5rem; align-content: start; text-align: left; text-decoration: none; color: var(--ink); background: var(--bg); border: 0; border-radius: var(--r-md); padding: 1rem; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s; }
.sos-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.sos-item[aria-expanded="true"] { background: var(--yellow-200); }
.sos-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--pink-50); color: var(--pink-600); }
.sos-item:nth-child(even) .sos-ic { background: var(--yellow-100); color: var(--yellow-800); }
.sos-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sos-item b { font-size: 1.02rem; font-weight: 600; line-height: 1.2; }
.sos-item span { font-size: .8rem; color: var(--ink-2); line-height: 1.35; }
.cnr { background: var(--bg); border-radius: var(--r-md); padding: 1.2rem; display: grid; gap: 1rem; animation: rise .45s var(--ease); }
.cnr-sample { font-size: 1.05rem; font-weight: 500; letter-spacing: .08em; background: var(--yellow-50); border: 1.5px dashed var(--yellow-300); border-radius: 12px; padding: .7rem .9rem; overflow-x: auto; white-space: nowrap; }
.cnr-sample span { border-bottom: 2px solid var(--pink-300); padding-bottom: 1px; }
.cnr-key { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .78rem; color: var(--ink-2); }
.cnr-where { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .92rem; color: var(--ink-2); }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 500; }
.input-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.input { flex: 1 1 220px; min-height: 48px; padding: .7rem 1rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); letter-spacing: .06em; text-transform: uppercase; }
.input:focus { outline: none; border-color: var(--pink-300); box-shadow: 0 0 0 4px var(--pink-50); }
.hint { font-size: .78rem; color: var(--ink-3); }
.hint.err { color: var(--pink-600); }

.orgs { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.org { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.15rem; display: grid; gap: .6rem; align-content: start; animation: rise .45s var(--ease) both; transition: box-shadow .25s, transform .25s var(--ease); }
.org:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.org h3 { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.org p { font-size: .88rem; color: var(--ink-2); line-height: 1.55; }
.org-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.org .org-local { font-size: .84rem; color: var(--ink-2); padding-left: .7rem; border-left: 2px solid var(--pink-200); }
.org-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .2rem; }
.count { font-size: .82rem; color: var(--ink-3); }
.group-lab { font-size: .95rem; font-weight: 600; margin-top: .5rem; display: flex; align-items: center; gap: .6rem; }
.group-lab::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.org-none { font-size: .92rem; color: var(--ink-2); line-height: 1.6; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--bg-soft); border: 1px dashed var(--line); }

/* Government / Organisation label on each listing */
.type-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .24rem .6rem .24rem .5rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.type-tag svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.type-tag.gov { border-color: #DCD3E0; color: var(--ink); }

/* ---------- Directory: state buttons and state pages ---------- */
.dir-grid { display: grid; gap: .7rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dir-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .9rem .5rem; min-height: 112px;
  padding: 1rem 1rem 1rem 1.1rem; border-radius: var(--r-md); background: var(--pink-50); border: 1px solid var(--pink-100);
  color: var(--ink); text-decoration: none; animation: rise .45s var(--ease) both;
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.dir-card:hover { background: var(--pink-100); transform: translateY(-2px); box-shadow: var(--shadow); }
.dir-card.india { grid-column: 1 / -1; min-height: 92px; background: var(--yellow-50); border-color: var(--yellow-100); }
.dir-card.india:hover { background: var(--yellow-100); }
.dir-name { grid-column: 1 / -1; align-self: start; font-size: 1.08rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.dir-count { font-size: .84rem; color: var(--ink-2); line-height: 1.35; }
.dir-card .go { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1rem; color: var(--pink-600); flex: none; }
.dir-grid.four .dir-card { min-height: 96px; }
@media (min-width: 640px) {
  .dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dir-card.india { grid-column: span 2; }
  .dir-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) { .dir-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.back-link { justify-self: start; display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 500; color: var(--pink-600); text-decoration: none; padding: .25rem 0; margin-bottom: -1rem; }
.back-link:hover { text-decoration: underline; }

/* ---------- Learn ---------- */
.flip-deck { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.flip { display: block; width: 100%; min-height: 200px; perspective: 1000px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; color: inherit; font: inherit; border-radius: var(--r-md); }
.flip-inner { display: grid; width: 100%; height: 100%; min-height: 200px; transition: transform .65s var(--ease); transform-style: preserve-3d; }
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.flip-face { grid-area: 1 / 1; position: relative; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--r-md); padding: 1.1rem; display: grid; align-content: space-between; gap: .6rem; }
.flip:nth-child(odd) .flip-front { background: var(--pink-100); }
.flip:nth-child(even) .flip-front { background: var(--yellow-100); }
.flip-front b { font-size: 1.12rem; font-weight: 600; line-height: 1.3; letter-spacing: -.015em; }
.flip-foot { display: flex; justify-content: space-between; align-items: end; gap: .5rem; font-size: .72rem; color: var(--ink-2); }
.flip-turn { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; flex: none; font-size: .9rem; }
.flip-back { background: var(--bg); border: 1.5px solid var(--pink-200); transform: rotateY(180deg); font-size: .9rem; line-height: 1.55; }
.flip:nth-child(even) .flip-back { border-color: var(--yellow-300); }
.flip-back .law { font-size: .72rem; color: var(--pink-600); font-weight: 500; }

.jump { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.jump a { flex: none; text-decoration: none; }

.btypes { display: grid; gap: .6rem; }
.btype { display: grid; grid-template-columns: 40px 1fr; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--line); }
.btype-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 600; font-size: .95rem; }
.btype:nth-child(odd) .btype-ic { background: var(--pink-100); color: var(--pink-800); }
.btype:nth-child(even) .btype-ic { background: var(--yellow-100); color: var(--yellow-800); }
.btype h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.btype .law { font-size: .76rem; color: var(--pink-600); font-weight: 500; margin: .1rem 0 .3rem; }
.btype p { font-size: .9rem; color: var(--ink-2); }

.checklist-card { background: var(--yellow-50); border-radius: var(--r-lg); padding: clamp(1.1rem, 3.5vw, 1.6rem); display: grid; gap: 1rem; }
.progress { display: flex; align-items: center; gap: .8rem; }
.progress-track { flex: 1; height: 10px; background: var(--yellow-200); border-radius: 999px; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--pink-500); border-radius: 999px; transition: width .5s var(--ease); }
.progress span { font-size: .82rem; font-weight: 500; color: var(--yellow-800); white-space: nowrap; }
.checklist { display: grid; gap: .4rem; }
.check { display: grid; grid-template-columns: 26px 1fr; gap: .75rem; align-items: start; padding: .75rem .85rem; background: var(--bg); border-radius: 14px; cursor: pointer; font-size: .92rem; transition: background .2s; }
.check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 8px; border: 2px solid var(--yellow-300); background: var(--bg); display: grid; place-items: center; cursor: pointer; transition: all .2s var(--ease); }
.check input::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--ease); }
.check input:checked { background: var(--pink-500); border-color: var(--pink-500); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:checked + span { color: var(--ink-3); }

.insaf-feature { display: grid; gap: .9rem; }
.pub-lead { background: var(--pink-100); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2rem); display: grid; gap: .9rem; position: relative; overflow: hidden; }
.pub-lead::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--pink-200); right: -90px; bottom: -120px; opacity: .6; }
.pub-lead > * { position: relative; z-index: 1; }
.pub-lead h3 { font-size: clamp(1.35rem, 4.5vw, 1.8rem); font-weight: 600; line-height: 1.2; max-width: 26ch; }
.pub-lead .dek { color: var(--pink-800); max-width: 58ch; }
.pubs { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pub { background: var(--yellow-50); border-radius: var(--r-lg); padding: 1.3rem; display: grid; gap: .7rem; align-content: start; }
.pub h3 { font-size: 1.12rem; font-weight: 600; line-height: 1.3; }
.pub .dek { color: var(--ink-2); font-size: .93rem; }
details.points summary { cursor: pointer; list-style: none; font-size: .88rem; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
details.points summary::-webkit-details-marker { display: none; }
details.points summary::before { content: "+"; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 600; transition: transform .25s var(--ease); }
details.points[open] summary::before { transform: rotate(45deg); }
details.points ul { margin: .7rem 0 0; padding-left: 1.1rem; display: grid; gap: .4rem; font-size: .92rem; color: var(--ink-2); max-width: 62ch; }
details.points[open] ul { animation: rise .35s var(--ease); }
.section-links { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.section-links a { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; font-size: .9rem; transition: background .2s, border-color .2s; }
.section-links a:hover { background: var(--pink-50); border-color: var(--pink-200); }

/* ---------- About ---------- */
.about-hero { position: relative; overflow: hidden; border-radius: 28px; background: var(--pink-100); padding: clamp(1.5rem, 5vw, 2.75rem); display: grid; gap: 1.1rem; }
.about-hero::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--yellow-200); right: -110px; top: -120px; opacity: .75; }
.about-hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--pink-200); right: 60px; bottom: -110px; opacity: .7; }
.about-hero > * { position: relative; z-index: 1; }
.about-hero .h-page { max-width: 16ch; }
.about-hero .lede { color: var(--pink-800); font-weight: 400; }
.meaning { display: inline-flex; align-items: baseline; gap: .6rem; background: var(--bg); border-radius: 999px; padding: .45rem 1rem; font-size: .9rem; width: fit-content; }
.meaning b { font-weight: 600; font-size: 1.05rem; }
.why { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.why .tile { background: var(--yellow-50); padding: 1.3rem; }
.why .tile:nth-child(2) { background: var(--pink-50); }
.two-up { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: stretch; }
.story { display: grid; gap: .8rem; align-content: start; }
.story p { color: var(--ink-2); max-width: 60ch; }
.founder-badge { display: flex; align-items: center; gap: .85rem; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--yellow-200); color: var(--yellow-800); display: grid; place-items: center; font-weight: 600; font-size: 1.1rem; flex: none; }
.tools-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.tools-list li { display: grid; grid-template-columns: 34px 1fr; gap: .75rem; align-items: center; padding: .65rem .75rem; background: var(--bg); border-radius: 14px; font-size: .92rem; }
.tools-list .ti { width: 34px; height: 34px; border-radius: 10px; background: var(--pink-100); color: var(--pink-600); display: grid; place-items: center; }
.tools-list li:nth-child(even) .ti { background: var(--yellow-100); color: var(--yellow-800); }
.tools-list svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.contact { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: clamp(1.3rem, 4vw, 2rem); display: grid; gap: .9rem; }
.contact p { color: rgba(255,255,255,.75); }
.contact .btn { background: var(--yellow-200); color: var(--ink); width: fit-content; }
.contact .btn:hover { background: var(--yellow-300); }

/* ---------- Credits ---------- */
.credits { border-top: 1px solid var(--line); padding-top: 1rem; font-size: .68rem; line-height: 1.6; color: var(--ink-3); display: grid; gap: .25rem; }
.credits a { color: var(--ink-3); }
.credits b { font-weight: 500; color: var(--ink-2); }
.credits .legal-note { margin-top: .6rem; padding: .8rem .95rem; border-radius: 12px; background: var(--yellow-50); color: var(--ink-2); font-size: .74rem; line-height: 1.65; }
.credits .legal-note b { color: var(--ink); font-weight: 600; }
.credits .legal-note a { color: var(--pink-600); }

/* ---------- Legal literacy additions ---------- */
.tile-src { margin-top: .35rem; font-size: .7rem; line-height: 1.4; color: var(--ink-3); }
.law-change { background: var(--yellow-50); border-radius: var(--r-md); padding: 1.1rem 1.2rem; display: grid; gap: .45rem; }
.law-change p { font-size: .92rem; color: var(--ink-2); max-width: 70ch; }
details.finder { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: .95rem 1.1rem; }
details.finder summary::before { background: var(--pink-100); color: var(--pink-800); }
.finder-scroll { overflow-x: auto; margin-top: .8rem; }
.finder-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.finder-table th { text-align: left; font-size: .72rem; font-weight: 500; letter-spacing: .02em; color: var(--ink-3); padding: .4rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.finder-table td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.finder-table td.now { color: var(--pink-600); font-weight: 600; }
.finder-table tr:last-child td { border-bottom: 0; }
details.finder .note { margin-top: .6rem; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 26px + env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 999px; font-size: .88rem; transition: opacity .25s, transform .3s var(--ease); max-width: calc(100vw - 40px); text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { #toast { bottom: 28px; } }

/* ---------- Hindi (Devanagari) typography ----------
   Devanagari needs more line height, no letter-spacing (it breaks the headline stroke),
   and slightly larger small text to stay readable. Layout and colours are unchanged. */
html[lang="hi"] body { line-height: 1.75; }
html[lang="hi"] *, html[lang="hi"] *::before, html[lang="hi"] *::after { letter-spacing: 0 !important; }
html[lang="hi"] h1, html[lang="hi"] h2, html[lang="hi"] h3, html[lang="hi"] .h-page, html[lang="hi"] .h-sec, html[lang="hi"] .h-card,
html[lang="hi"] .flip-front b, html[lang="hi"] .pub-lead h3, html[lang="hi"] .pub h3 { line-height: 1.4; }
html[lang="hi"] .h-page { font-size: clamp(1.8rem, 6vw, 2.45rem); }
html[lang="hi"] .lede { font-weight: 400; }
html[lang="hi"] .kicker, html[lang="hi"] .tile-lab, html[lang="hi"] .count { font-size: .88rem; }
html[lang="hi"] .note, html[lang="hi"] .hint, html[lang="hi"] .cnr-key, html[lang="hi"] .over-cnt, html[lang="hi"] .over-sub { font-size: .84rem; }
html[lang="hi"] .credits { font-size: .74rem; }
html[lang="hi"] .credits .legal-note { font-size: .8rem; }
html[lang="hi"] .pill, html[lang="hi"] .axis, html[lang="hi"] .tile-src, html[lang="hi"] .flip-foot,
html[lang="hi"] .flip-back .law, html[lang="hi"] .btype .law, html[lang="hi"] .finder-table th { font-size: .8rem; }
@media (max-width: 899px) { html[lang="hi"] .tabs a { font-size: .72rem; } html[lang="hi"] .tab-lab { line-height: 1.3; } }
html[lang="hi"] .segmented button, html[lang="hi"] .chip-btn, html[lang="hi"] .dir-count { font-size: .9rem; }
html[lang="hi"] .tabs .tab-sub a { font-size: .95rem; }
@media (max-width: 899px) { html[lang="hi"] .tabs .tab-sub a { font-size: .74rem; line-height: 1.3; } }
html[lang="hi"] .type-tag { font-size: .8rem; }
html[lang="hi"] .tile-val, html[lang="hi"] .fact-val { line-height: 1.25; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
  #splash { display: none; }
}
