/* Women on Record. Warm paper, ink and indigo, madder red for the outcome that
   matters, turmeric only as a fill. Women appear only as data: a hundred
   standing figures, each one 1 in 100 cases. */
:root {
  --ground: #ffffff;
  --cloth: #ffffff;
  --ink: #16181d;
  --soft: #4f5461;
  --thread: #e2e4e9;
  --panel: #f6f7f9;
  --red: #a3243b;
  --turmeric: #d99a00;
  --knot: #3a3f6b;
  --knot-open: #a9abc6;
  --focus: #a3243b;
  --q1: #dfe3f2; --q2: #b3bbe0; --q3: #7d89c4; --q4: #4b589f; --q5: #1f2a5c;
  --display: "IBM Plex Serif", "IBM Plex Sans Devanagari", Georgia, serif;
  --text: "IBM Plex Sans", "IBM Plex Sans Devanagari", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #111317; --cloth: #181b20; --ink: #eef0f4; --soft: #aeb3bf; --thread: #2f333b; --panel: #1d2026;
    --red: #f08a9b; --turmeric: #e6b234; --knot: #8f9ddd; --knot-open: #4b5587; --focus: #f08a9b;
    --q1: #2a3263; --q2: #3f4c8f; --q3: #6474bd; --q4: #9aa7e0; --q5: #dfe4fb;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #111317; --cloth: #181b20; --ink: #eef0f4; --soft: #aeb3bf; --thread: #2f333b; --panel: #1d2026;
  --red: #f08a9b; --turmeric: #e6b234; --knot: #8f9ddd; --knot-open: #4b5587; --focus: #f08a9b;
  --q1: #2a3263; --q2: #3f4c8f; --q3: #6474bd; --q4: #9aa7e0; --q5: #dfe4fb;
  color-scheme: dark;
}

html[lang="ta"] { --text: "Noto Sans Tamil", "IBM Plex Sans", system-ui, sans-serif; --display: "Noto Serif Tamil", "Noto Sans Tamil", serif; }
html[lang="bn"] { --text: "Noto Sans Bengali", "IBM Plex Sans", system-ui, sans-serif; --display: "Noto Serif Bengali", "Noto Sans Bengali", serif; }
html[lang="ur"] { --text: "Noto Nastaliq Urdu", "IBM Plex Sans", serif; --display: "Noto Nastaliq Urdu", serif; }
html[lang="ur"] body { line-height: 2.05; }

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16.5px/1.62 var(--text); overflow-x: clip; }
.wrap { max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }
a { color: var(--ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--cloth); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }
[hidden] { display: none !important; }

/* Mithila border across the top */
.band { display: block; width: 100%; height: 22px; }
.band-cloth { fill: var(--cloth); }
.band-hatch { stroke: var(--ink); stroke-width: 1.4; }
.band-line { stroke: var(--ink); stroke-width: 2; }

.top { position: sticky; top: 0; z-index: 5; background: var(--ground); border-bottom: 1px solid var(--thread); }
.top-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-block: 10px; }
.mark { font: 600 25px/1 var(--display); letter-spacing: -.01em; text-decoration: none; letter-spacing: .01em; }
html[lang="ur"] .mark { font-family: "IBM Plex Serif", serif; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-weight: 600; font-size: 16px; }
.nav a { text-decoration: none; padding: 4px 0; }
.nav a:hover { text-decoration: underline; }
.controls { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.lang, .pick select, .state-head select {
  font: 600 15px/1.2 var(--text); color: var(--ink); background: var(--cloth);
  border: 1px solid var(--thread); border-radius: 3px; padding: 7px 10px; min-height: 40px;
}
.theme { display: inline-grid; place-items: center; width: 40px; height: 40px; color: var(--ink); background: var(--cloth); border: 1px solid var(--thread); border-radius: 3px; cursor: pointer; }
.tnote { margin-block: 12px 0; padding: 10px 14px; background: var(--cloth); border-inline-start: 4px solid var(--turmeric); font-size: 15px; }

/* Running stitch */
.stitch { height: 3px; margin-block: 8px; background: repeating-linear-gradient(90deg, var(--red) 0 10px, transparent 10px 17px); background-clip: content-box; }

.hero { padding-block: 40px 20px; display: grid; gap: 14px; }
.kicker { margin: 0; font: 500 13px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
html[lang='ur'] .kicker, html[lang='ta'] .kicker, html[lang='bn'] .kicker, html[lang='hi'] .kicker, html[lang='mr'] .kicker { font-family: var(--text); letter-spacing: 0; }
h1 { margin: 0; font: 600 clamp(30px, 5.2vw, 54px)/1.12 var(--display); letter-spacing: -.015em; max-width: 22ch; text-wrap: balance; }
html[lang="ur"] h1 { line-height: 1.6; }
.lead { margin: 0; font-size: clamp(18px, 2.3vw, 21px); max-width: 60ch; color: var(--soft); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.fig { background: var(--cloth); padding: 20px 20px 16px; border-radius: 3px; border: 1px solid var(--thread); display: grid; gap: 4px; align-content: start; }
.fig b { font: 600 clamp(30px, 4vw, 40px)/1.05 var(--display); letter-spacing: -.01em; color: var(--red); font-variant-numeric: tabular-nums; }
.fig span { color: var(--soft); font-size: 15.5px; }

.sec { padding-block: 34px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sec > * { min-width: 0; }
h2 { margin: 0; font: 600 clamp(24px, 3.4vw, 34px)/1.2 var(--display); letter-spacing: -.01em; text-wrap: balance; }
h3 { margin: 10px 0 0; font-size: 19px; font-weight: 700; }
html[lang="ur"] h2 { line-height: 1.7; }
.intro { margin: 0; max-width: 68ch; }
.note { margin: 0; max-width: 68ch; color: var(--soft); font-size: 15.5px; }
.cloth { background: var(--cloth); border-radius: 3px; border: 1px solid var(--thread); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { font: 600 15px/1.2 var(--text); color: var(--ink); background: transparent; border: 1px solid var(--thread); border-radius: 4px; padding: 8px 14px; cursor: pointer; min-height: 40px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--cloth); border-style: solid; border-color: var(--ink); }

.field { margin: 0; padding: 20px; display: grid; gap: 12px; }
.field canvas { display: block; width: 100%; }
.field figcaption { font-size: 18px; max-width: 64ch; }
.field figcaption b { color: var(--red); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; color: var(--soft); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-inline-end: 7px; vertical-align: -1px; }

.table-wrap { overflow-x: auto; background: var(--cloth); border-radius: 4px; }
.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 15.5px; }
.grid th, .grid td { padding: 9px 12px; text-align: end; white-space: nowrap; border-bottom: 1px solid var(--thread); }
.grid th:first-child, .grid td:first-child { text-align: start; white-space: normal; min-width: 14em; }
.grid thead th { font-weight: 700; color: var(--soft); border-bottom: 1px solid var(--soft); }
.grid tbody th { font-weight: 600; }
.grid td.hl { color: var(--red); font-weight: 700; }
.grid .sub { display: block; font-weight: 400; color: var(--soft); font-size: 13.5px; }
.grid tr.group th { padding-top: 18px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); border-bottom: 0; }
.spark { vertical-align: middle; }

.pick { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.pick select, .state-head select { max-width: 100%; width: 100%; min-width: 0; }
.pick label { min-width: 0; max-width: 100%; flex: 1 1 200px; display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--soft); }
.maprow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .maprow { grid-template-columns: 1fr; } }
.map { margin: 0; padding: 16px; display: grid; gap: 10px; }
.map svg { width: 100%; height: auto; display: block; }
.map path { stroke: var(--cloth); stroke-width: .6; cursor: pointer; }
.map path:hover, .map path.on { stroke: var(--red); stroke-width: 2; }
.map path:focus-visible { outline: none; stroke: var(--red); stroke-width: 2.5; }
.map figcaption { font-size: 15.5px; }
.scale { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13.5px; color: var(--soft); align-items: center; }
.scale i { display: inline-block; width: 22px; height: 12px; margin-inline-end: 5px; vertical-align: -1px; border-radius: 2px; }
.credit { margin: 0; font-size: 13.5px; color: var(--soft); }
.rank { margin: 0; padding: 14px 16px; list-style: none; max-height: 640px; overflow: auto; display: grid; gap: 2px; }
.rank li button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 5px 6px; border-radius: 4px; font-size: 15.5px; }
.rank li button:hover, .rank li button.on { background: var(--ground); }
.rank li button:focus-visible { outline: 3px solid var(--focus); }
.rank .n { color: var(--soft); font-variant-numeric: tabular-nums; }
.rank .v { font-variant-numeric: tabular-nums; font-weight: 700; }
.rank .bar { grid-column: 2 / 4; height: 5px; background: var(--knot); border-radius: 3px; }
.rank li.india .bar { background: var(--red); }
.rank li.india button { font-weight: 700; }

.state-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: baseline; justify-content: space-between; }

.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mult { margin: 0; padding: 16px 16px 12px; display: grid; gap: 6px; }
.mult h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.mult .law { font-size: 13px; color: var(--soft); }
.mult svg { width: 100%; height: auto; display: block; }
.mult .last { font: 600 24px/1 var(--display); color: var(--red); font-variant-numeric: tabular-nums; }
.mult p { margin: 0; font-size: 13.5px; color: var(--soft); }

.read .limits { margin: 0; padding-inline-start: 1.3em; display: grid; gap: 10px; max-width: 72ch; }

.downloads { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.downloads a { display: grid; gap: 4px; padding: 20px; background: var(--cloth); border-radius: 3px; border: 1px solid var(--thread); text-decoration: none; height: 100%; }
.downloads a:hover b { text-decoration: underline; }
.downloads b { font-size: 19px; }
.downloads span { color: var(--soft); font-size: 15px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px 36px; }
.cols p { margin: 6px 0 0; }
.srclist { margin: 10px 0 0; padding-inline-start: 1.2em; font-size: 15px; display: grid; gap: 4px; }
.srclist code { font-size: 12.5px; word-break: break-all; color: var(--soft); }

.foot { margin-top: 30px; border-top: 1px solid var(--thread); background: var(--cloth); }
/* One centred line, as on offtheroll.in: who made it, the promise, then links. */
.foot-in { margin-block: 0; padding-block: 24px 36px; text-align: center; font-size: 14px; line-height: 1.8; color: var(--soft); max-width: 900px; }
.foot-in a { color: var(--soft); }
.foot-in a:hover { color: var(--ink); }
.foot-in b { color: var(--ink); }

.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--cloth); padding: 6px 10px; border-radius: 4px; font-size: 14px; max-width: 260px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .top, .band, .tabs, .pick, .controls { display: none; } body { background: #fff; } }

/* Big figure inside the stitched field */
.fieldbig { margin: 0; display: grid; gap: 2px; }
.fieldbig b { font: 600 clamp(40px, 7vw, 68px)/1 var(--display); letter-spacing: -.02em; color: var(--red); font-variant-numeric: tabular-nums; }
.fieldbig span { font-size: clamp(17px, 2.2vw, 20px); font-weight: 600; }
.glyph { vertical-align: -3px; margin-inline-end: 6px; }
.cta { display: inline-block; margin-top: 4px; padding: 12px 22px; border-radius: 4px; background: var(--ink); color: var(--cloth); font-weight: 700; text-decoration: none; min-height: 44px; }
.cta:hover { text-decoration: underline; }
.menu { display: none; place-items: center; width: 40px; height: 40px; color: var(--ink); background: var(--cloth); border: 1px solid var(--thread); border-radius: 3px; cursor: pointer; }
/* On a phone the links always sit behind the menu button. Wider than that, js/app.js
   measures the header and adds .fold when the name, the links and the controls do not
   fit on one row, which depends on the language as much as the width. */
@media (max-width: 720px) {
  .top-in { flex-wrap: nowrap; }
  .menu { display: inline-grid; order: 3; }
  .controls { order: 2; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--ground); border-bottom: 1px solid var(--thread); padding: 8px 16px 14px; flex-direction: column; gap: 2px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; font-size: 18px; }
  .top { position: sticky; }
}
.top.fold .top-in { flex-wrap: nowrap; }
.top.fold .menu { display: inline-grid; order: 3; }
.top.fold .controls { order: 2; }
.top.fold .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--ground); border-bottom: 1px solid var(--thread); padding: 8px 16px 14px; flex-direction: column; gap: 2px; }
.top.fold .nav.open { display: flex; }
.top.fold .nav a { padding: 10px 0; font-size: 18px; }
.top.fold { position: sticky; }
@media (min-width: 721px) { .top.fold .nav { padding-inline: 28px; } }

/* Phones */
@media (max-width: 600px) {
  body { font-size: 16.5px; }
  .hero { padding-block: 26px 12px; }
  .figs { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fig { padding: 14px 14px 12px; outline-offset: -6px; }
  .fig b { font-size: 27px; }
  .fig span { font-size: 13.5px; line-height: 1.4; }
  .sec { padding-block: 24px; }
  .field { padding: 16px 14px; }
  .field figcaption { font-size: 16.5px; }
  .pick label { flex: 1 1 130px; }
  .pick label:first-child { flex-basis: 100%; }
  .grid th:first-child, .grid td:first-child { min-width: 9.5em; }
  .grid .old, .grid .ind { display: none; }
  .grid .spark { width: 48px; }
  .grid thead th { white-space: normal; font-size: 13px; line-height: 1.25; }
  #stateTable th:first-child, #stateTable td:first-child { min-width: 0; width: 46%; }
  .grid th, .grid td { padding: 8px 8px; }
  /* tables of outcomes become one card per year */
  .grid.stack thead { display: none; }
  .grid.stack, .grid.stack tbody { display: block; }
  .grid.stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; padding: 10px 12px; border-bottom: 1px solid var(--thread); }
  .grid.stack th[scope="row"] { grid-column: 1 / -1; border: 0; padding: 2px 0 6px; font: 600 20px/1.1 var(--display); min-width: 0; }
  .grid.stack td { display: flex; flex-direction: column; align-items: flex-start; text-align: start; white-space: normal; border: 0; padding: 4px 0; }
  .grid.stack td::before { content: attr(data-label); font-size: 12.5px; color: var(--soft); font-weight: 600; }
  .rank { max-height: 420px; }
  .multiples { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mult { padding: 12px 12px 10px; }
  .mult h3 { font-size: 14px; }
  .mult .last { font-size: 22px; }
}
@media (max-width: 380px) { .multiples { grid-template-columns: 1fr; } }

html[lang="hi"], html[lang="mr"] { --display: "IBM Plex Sans Devanagari", "IBM Plex Serif", serif; }

/* Protest context */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 72ch; border-inline-start: 2px solid var(--thread); }
.events li { padding: 4px 0 18px 22px; position: relative; }
.events li::before { content: ""; position: absolute; inset-inline-start: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--cloth); border: 2px solid var(--red); }
.events .when { font: 500 13px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
html:not([lang="en"]) .events .when { font-family: var(--text); letter-spacing: 0; text-transform: none; font-weight: 600; }
.events p { margin: 4px 0 0; }
.events .src { font-size: 14px; color: var(--soft); }
.prdata { padding: 20px 22px; display: grid; gap: 8px; max-width: 72ch; }
.prdata h3 { margin: 0; }
.prdata p { margin: 0; }

/* Tooltips */
.has-tip { text-decoration: underline dotted var(--soft); text-underline-offset: 4px; cursor: help; }
.tip { position: fixed; z-index: 30; pointer-events: none; background: var(--ink); color: var(--cloth); padding: 9px 12px; border-radius: 3px; font: 400 14px/1.45 var(--text); box-shadow: 0 6px 20px rgba(15, 20, 45, .25); }

/* Tour */
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--thread); font: 700 16px/1.2 var(--text); cursor: pointer; }
.tour { position: fixed; z-index: 40; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 440px; margin-inline: auto; background: var(--cloth); color: var(--ink); padding: 18px 20px; border-radius: 3px; border: 1px solid var(--thread); box-shadow: 0 12px 40px rgba(15, 20, 45, .3); }
.tour h2 { font-size: 21px; margin: 2px 0 6px; }
.tour p { margin: 0; }
.tour-n { font: 500 12.5px/1.4 var(--mono); color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.tour-b { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tour-b button { font: 700 15px/1.2 var(--text); padding: 9px 16px; border-radius: 4px; border: 1px solid var(--thread); background: transparent; color: var(--ink); cursor: pointer; min-height: 40px; }
.tour-b #tourNext { background: var(--ink); color: var(--cloth); border-style: solid; border-color: var(--ink); }
.tour-b button:disabled { opacity: .45; cursor: default; }
.tour-on { outline: 3px solid var(--red) !important; outline-offset: 6px !important; border-radius: 3px; }

/* ---------- pages ---------- */
.page { display: block; }
@media (min-width: 1240px) {
  body.has-toc .page { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 36px; max-width: 1320px; }
  body.has-toc .page > main { grid-column: 2; grid-row: 1; }
}
.toc { display: none; }
@media (min-width: 1240px) {
  body.has-toc .toc { display: block; grid-column: 1; grid-row: 1; position: sticky; top: 92px; align-self: start; margin-top: 44px; font-size: 14.5px; }
  .toc p { margin: 0 0 8px; font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
  html:not([lang="en"]) .toc p { font-family: var(--text); text-transform: none; letter-spacing: 0; }
  .toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-inline-start: 1px solid var(--thread); display: grid; gap: 8px; }
  .toc a { text-decoration: none; color: var(--soft); }
  .toc a:hover { color: var(--ink); text-decoration: underline; }
}
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--red); text-underline-offset: 6px; }
.phead { padding-block: 34px 6px; display: grid; gap: 12px; }
.phead h1 { font-size: clamp(30px, 4.6vw, 48px); max-width: 24ch; }
.phead .kicker a { color: inherit; }
.phead .intro { font-size: clamp(17px, 2vw, 19px); color: var(--soft); }
main > .stitch { margin-block: 4px; }
.yearpick { flex: 0 0 auto !important; }
.phead .pick { align-items: end; }
.phead .tabs { flex: 1 1 420px; }

/* home cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.card a { display: grid; gap: 6px; align-content: start; height: 100%; padding: 22px 22px 20px; background: var(--cloth); border-radius: 3px; border: 1px solid var(--thread); text-decoration: none; }
.card a:hover b { text-decoration: underline; }
.card .kick { font: 500 12.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--soft); }
html:not([lang="en"]) .card .kick { font-family: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; }
.card b { font: 600 21px/1.25 var(--display); }
.card span:not(.kick) { color: var(--soft); font-size: 15.5px; }
.cardviz { width: 100%; height: auto; margin-top: 8px; display: block; }

/* charts */
.chart { margin: 0; padding: 18px 18px 14px; display: grid; gap: 10px; }
.chart > div { min-width: 0; }
.chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.chart figcaption { font-size: 15px; color: var(--soft); max-width: 72ch; }
.chart text { font-family: var(--text); fill: var(--ink); }
.chart .tick { font-size: 12.5px; fill: var(--soft); }
.chart .tick.mark { fill: var(--ink); font-weight: 600; }
.chart .lab { font-size: 13.5px; font-weight: 600; paint-order: stroke; stroke: var(--cloth); stroke-width: 4px; stroke-linejoin: round; }
.chart .lab.num { font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .lab.part { font-size: 14.5px; font-weight: 400; }
.chart .lab.hub { font-size: 17px; font-weight: 700; }
.chart .inbar { font-size: 12.5px; font-weight: 700; fill: #fff; }
.chart .band:hover { fill-opacity: .55; }
.chart .legend li { display: inline-flex; align-items: center; }
.flowkey { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: st; }
.flowkey > li { border-top: 1px solid var(--thread); padding-top: 8px; }
.flowkey ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.flowkey ul li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 14.5px; }
.flowkey i { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.flowkey b { font-variant-numeric: tabular-nums; }

.slopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.slope { margin: 0; padding: 14px 14px 8px; display: grid; gap: 6px; }
.slope figcaption { font-weight: 700; font-size: 15px; line-height: 1.3; }
.slope figcaption a { text-decoration: none; }
.slope figcaption a:hover { text-decoration: underline; }
.slope svg { width: 100%; height: auto; overflow: visible; }
.slope text { font-family: var(--text); fill: var(--ink); }
.slope .tick { font-size: 11.5px; fill: var(--soft); }
.slope .lab { font-size: 12.5px; font-weight: 700; }

.placelist { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 28px; }
.placelist li { padding: 5px 0; border-bottom: 1px solid var(--thread); break-inside: avoid; }
.placelist a { text-decoration: none; font-weight: 600; }
.placelist a:hover { text-decoration: underline; }
.rank .row { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; align-items: center; width: 100%; padding: 5px 6px; border-radius: 4px; font-size: 15.5px; text-decoration: none; }
.rank a.row:hover { background: var(--ground); }
.rank .bar { grid-column: 1 / 3; }
.rank li.india .row { font-weight: 700; }

a.mult { text-decoration: none; }
a.mult:hover h3 { text-decoration: underline; }
.mult .tick { font-size: 11px; fill: var(--soft); font-family: var(--text); }

.sortable thead button { all: unset; cursor: pointer; font: inherit; color: inherit; }
.sortable thead button:focus-visible { outline: 3px solid var(--focus); }
.sortable thead th[aria-sort] button { color: var(--ink); text-decoration: underline; }
.grid tr.total th, .grid tr.total td { font-weight: 700; border-top: 1px solid var(--soft); }
@media (max-width: 600px) {
  .chart { padding: 14px 12px 12px; }
  .phead { padding-block: 24px 4px; }
  .card a { padding: 18px 18px 16px; }
  .slopes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .slope { padding: 10px 8px 6px; }
  .slope figcaption { font-size: 13.5px; }
}
.lead2 { margin: 0; max-width: 68ch; font-size: 18px; font-weight: 600; line-height: 1.55; }
.src { margin: 0; max-width: 72ch; font-size: 14px; color: var(--soft); }
details.every summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
details.every[open] summary { margin-bottom: 8px; }
/* Charts are laid out left to right in every language. In a right-to-left
   page an SVG inherits direction: rtl, which reverses text-anchor and pushes
   labels off the chart. Text inside still shapes in its own script. */
.chart svg, .slope svg, .mult svg, .cardviz, .map svg { direction: ltr; }

/* Plain report: no hatched strip, no running-stitch rules between sections. */
svg.band { display: none; }
.stitch { height: 0; margin-block: 8px; background: none; border-top: 1px solid var(--thread); }
.top { box-shadow: none; }
.mark { white-space: nowrap; }
@media (max-width: 720px) { .mark { font-size: 22px; } .lang { padding: 7px 8px; } }
/* On a phone the name takes two lines, so the controls and the menu button fit beside it. */
@media (max-width: 480px) {
  .top-in { gap: 8px 10px; }
  .mark { white-space: normal; width: 5.2em; flex-shrink: 0; font-size: 21px; line-height: 1.05; }
  .theme, .menu { width: 38px; }
  .controls { gap: 6px; }
}
@media (max-width: 360px) { .mark { font-size: 19px; } .lang { padding: 6px 4px; } }
.fig b, .card b { letter-spacing: -.01em; }
.cloth, .fig, .card a, .downloads a { box-shadow: none; }
.tabs button[aria-selected="true"] { border-color: var(--ink); }
.tour { box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }

/* The hundred women */
.isofig { margin: 0; }
.iso { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px 5px; max-width: 420px; margin-block: 14px 10px; }
.iso .woman { width: 100%; height: auto; display: block; }
.isobig { margin: 0; display: grid; gap: 4px; }
.isobig b { font: 600 clamp(40px, 7vw, 60px)/1 var(--display); letter-spacing: -.02em; color: var(--red); font-variant-numeric: tabular-nums; }
.isobig span { font-weight: 600; font-size: clamp(16px, 2vw, 18px); max-width: 34ch; }
.isofig .legend .woman { width: 9px; height: 18px; vertical-align: -4px; margin-inline-end: 6px; }
.isonote { margin: 6px 0 0; font-size: 13.5px; color: var(--soft); }
#field.isofig { padding: 4px 0; }
.field .iso { max-width: 520px; }
/* Home: text and the hundred women side by side on a wide screen */
.hero { grid-template-columns: minmax(0, 1fr); }
.hero-t { display: grid; gap: 14px; align-content: start; }
.hero-iso { padding: 20px; background: var(--cloth); border: 1px solid var(--thread); border-radius: 3px; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px 48px; align-items: start; }
  .hero .figs { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) { .hero-iso { padding: 16px 14px; } .iso { gap: 5px 4px; } .figs { grid-template-columns: 1fr; } .fig b { font-size: 30px; } }

/* Terms page: one column of plain prose */
.legal { max-width: 72ch; }
.legal p { margin: 0; max-width: 72ch; }
html[lang="en"] .only-tr { display: none; }
/* English text inside a translated page keeps the English display face. */
.legal h2, h1[lang="en"] { font-family: "IBM Plex Serif", Georgia, serif; }

/* Sharing and saving: a row of small buttons under each chart, and a link
   button beside each section heading, as on offtheroll.in. */
.tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.tools button, .tools a { font: 600 13px/1.2 var(--text); color: var(--ink); background: var(--ground); border: 1px solid var(--thread); border-radius: 3px; padding: 6px 10px; cursor: pointer; text-decoration: none; position: relative; }
.tools button:hover, .tools a:hover { border-color: var(--ink); }
.tools .wa { color: #fff; background: #1e7a4a; border-color: #1e7a4a; }
.anchor { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-inline-start: 8px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--soft); cursor: pointer; position: relative; opacity: .7; }
.anchor:hover, .anchor:focus-visible { opacity: 1; background: var(--ground); color: var(--ink); }
[data-msg]::after { content: attr(data-msg); position: absolute; inset-inline-start: 100%; top: 50%; transform: translateY(-50%); margin-inline-start: 6px; font: 600 12.5px/1 var(--text); color: var(--cloth); background: var(--ink); border-radius: 3px; padding: 5px 7px; white-space: nowrap; z-index: 5; }
.tools [data-msg]::after { inset-inline-start: auto; inset-inline-end: 0; top: auto; bottom: 100%; transform: none; margin: 0 0 6px; }
.chart .rowlab { fill: var(--ink); font-size: 12.5px; }
.chart .hv { fill: var(--ink); font-variant-numeric: tabular-nums; }
.chart .hv.dark { fill: var(--cloth); }
@media print { .tools, .anchor { display: none; } }

/* White pages, with structure from rules and type. A short red bar marks
   every section heading, and each section's lead finding is set as a callout. */
.sec > h2::before { content: ""; display: block; width: 36px; height: 3px; background: var(--red); margin-bottom: 14px; }
.lead2 { padding: 4px 0 4px 18px; border-inline-start: 4px solid var(--red); font: 500 clamp(18px, 2.1vw, 21px)/1.5 var(--display); max-width: 60ch; }
html[lang="ur"] .lead2 { padding: 4px 18px 4px 0; }
.fig, .card a, .downloads a, .chart, .hero-iso, .slope, .mult, .rank, .map, .table-wrap { border-color: var(--thread); }
.hero-iso { background: var(--panel); border: 0; }
.chart, .map, .slope, .mult { background: var(--cloth); }
.top { border-bottom-color: var(--thread); }
.foot { background: var(--panel); border-top: 0; }

/* What the records show */
.findings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.findings li { padding: 18px 20px 20px 0; display: grid; gap: 8px; align-content: start; border-bottom: 1px solid var(--thread); }
@media (min-width: 720px) { .findings li { padding-inline: 0 24px; } .findings li + li { padding-inline-start: 24px; border-inline-start: 1px solid var(--thread); } }
.findings b { font: 600 clamp(34px, 4.4vw, 46px)/1 var(--display); color: var(--red); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.findings span { font-size: 16px; line-height: 1.5; }
.findings a { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.findings a::after { content: " \2192"; }
html[dir="rtl"] .findings a::after { content: " \2190"; }
/* treemap, tile map */
.chart .tml { font-size: 13px; font-weight: 600; }
.chart .tml.num { font-weight: 400; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.tmkey { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; }
.tmkey li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; font-size: 14px; }
.tmkey i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.tmkey b { font-variant-numeric: tabular-nums; }
.chart .tile { fill: var(--panel); stroke: var(--thread); }
.chart a:hover .tile, .chart a:focus .tile { stroke: var(--ink); stroke-width: 1.5; }
.chart .tcode { font-weight: 700; fill: var(--ink); }
.chart .tval { font-size: 11px; fill: var(--soft); font-variant-numeric: tabular-nums; }
/* explorer */
.exbar { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.exbar label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; color: var(--soft); min-width: 0; }
.exbar input, .exbar select { font: inherit; font-size: 15px; padding: 8px 10px; border: 1px solid var(--thread); border-radius: 4px; background: var(--cloth); color: var(--ink); width: 100%; min-width: 0; }
.exbar input:focus, .exbar select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.exbar2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 14px; }
.exyears { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--soft); }
.exyears > span:first-child { margin-inline-end: 4px; }
.exyears button { font: inherit; font-weight: 600; font-size: 13.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--thread); background: var(--cloth); color: var(--soft); cursor: pointer; font-variant-numeric: tabular-nums; }
.exyears button[aria-pressed="true"] { background: var(--knot); border-color: var(--knot); color: var(--cloth); }
.excols { position: relative; font-size: 14px; }
.excols summary { cursor: pointer; font-weight: 600; padding: 6px 10px; border: 1px solid var(--thread); border-radius: 4px; background: var(--cloth); list-style: none; }
.excols summary::after { content: " ▾"; color: var(--soft); }
.excols > div { position: absolute; z-index: 5; margin-top: 4px; background: var(--cloth); border: 1px solid var(--thread); border-radius: 6px; padding: 10px 14px; display: grid; gap: 6px; min-width: 210px; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.excols label { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.exreset { font: inherit; font-size: 14px; background: none; border: 0; color: var(--soft); text-decoration: underline; cursor: pointer; padding: 6px 2px; }
.exstatus { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-bottom: 8px; }
.exstatus p { margin: 0; font-size: 14.5px; color: var(--soft); font-variant-numeric: tabular-nums; }
.exact { display: flex; gap: 8px; }
.btn { font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 4px; border: 1px solid var(--red); background: var(--red); color: #fff; cursor: pointer; }
.btn.ghost { background: var(--cloth); color: var(--ink); border-color: var(--thread); }
.btn:disabled { opacity: .5; cursor: default; }
.btn[data-msg] { position: relative; }
.table-wrap.ex { max-height: 70vh; overflow: auto; border: 1px solid var(--thread); }
.extable { font-size: 14px; }
.extable thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; }
.extable thead th button { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.extable th[scope="row"] { position: sticky; left: 0; background: var(--cloth); z-index: 1; min-width: 10em; }
.extable td.t { text-align: start; white-space: normal; min-width: 11em; }
.extable td.t.wide { min-width: 22em; font-size: 13px; color: var(--soft); }
.extable tbody tr:hover th, .extable tbody tr:hover td { background: var(--panel); }
.exmore { text-align: center; }
@media (max-width: 760px) { .exbar { grid-template-columns: 1fr 1fr; } .exsearch { grid-column: 1 / -1; } .extable th[scope="row"] { min-width: 8em; } }
.extable thead th.t { text-align: start; }
.exyears { gap: 8px; }
/* state page header with a locator map */
.shead { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 28px; align-items: start; }
.locator { width: 150px; height: auto; margin-top: 28px; }
@media (max-width: 560px) { .locator { width: 92px; margin-top: 4px; } .shead { grid-template-columns: minmax(0, 1fr) 92px; gap: 8px 12px; } }
.fold { margin-top: 10px; }
.fold > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 10px 14px; border: 1px solid var(--thread); border-radius: 4px; background: var(--cloth); display: inline-block; }
.fold[open] > summary { margin-bottom: 10px; }
@media (min-width: 900px) {
  #stateIso { display: grid; grid-template-columns: minmax(0, 1fr) 330px; grid-template-areas: "big iso" "leg iso" "note iso"; grid-template-rows: auto auto 1fr; gap: 14px 36px; align-items: start; }
  #stateIso .isobig { grid-area: big; } #stateIso .iso { grid-area: iso; margin: 0; } #stateIso .legend { grid-area: leg; flex-direction: column; } #stateIso .isonote { grid-area: note; }
}

/* the law page: prose in every cell, and one card per crime on a phone */
.lawtable th, .lawtable td { white-space: normal; text-align: start; vertical-align: top; }
.lawtable td:last-child { min-width: 18em; }
.law [id] { scroll-margin-top: 80px; }
@media (max-width: 699px) {
  .lawtable, .lawtable tbody, .lawtable tr, .lawtable th, .lawtable td { display: block; width: auto; min-width: 0 !important; }
  .lawtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lawtable tr { padding: 10px 0; border-bottom: 1px solid var(--thread); }
  .lawtable th, .lawtable td { padding: 3px 0; border: 0; }
  .lawtable tbody th { font-size: 17px; }
  .lawtable td::before { display: block; font-size: 13px; color: var(--soft); }
  .lawtable td:nth-child(2)::before { content: "IPC, before 1 July 2024"; }
  .lawtable td:nth-child(3)::before { content: "BNS, from 1 July 2024"; }
  .lawtable td:nth-child(4)::before { content: "What changed"; }
}
