/* Access Legislative Archive — Haryana Vidhan Sabha record
   Palette: legal foolscap under office light; government-seal indigo for
   citations, verdigris for verified, ochre for unresolved, oxide for blockers. */
:root {
  --ground:  #EFF1F0;
  --panel:   #FFFFFF;
  --sunk:    #E4E8E6;
  --ink:     #171C1A;
  --ink-2:   #4A544F;
  --ink-3:   #6E7873;
  --rule:    #D1D7D4;
  --seal:    #1F3A5F;
  --seal-bg: #E6ECF3;
  --verdigris: #22645A;
  --verdigris-bg: #DFEBE8;
  --ochre:   #7E5214;
  --ochre-bg: #F2E9D8;
  --oxide:   #7A2B2B;
  --oxide-bg: #F3E3E1;
  --measure: 68ch;
  --radius: 3px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121715; --panel: #1A211E; --sunk: #222A27;
    --ink: #E7EAE8; --ink-2: #AFB8B4; --ink-3: #8A948F; --rule: #2E3734;
    --seal: #9CBFE4; --seal-bg: #1B2733;
    --verdigris: #74BCA9; --verdigris-bg: #172724;
    --ochre: #D7A862; --ochre-bg: #2A2318;
    --oxide: #DE9A96; --oxide-bg: #2B1C1B;
  }
}
:root[data-theme="dark"] {
  --ground: #121715; --panel: #1A211E; --sunk: #222A27;
  --ink: #E7EAE8; --ink-2: #AFB8B4; --ink-3: #8A948F; --rule: #2E3734;
  --seal: #9CBFE4; --seal-bg: #1B2733;
  --verdigris: #74BCA9; --verdigris-bg: #172724;
  --ochre: #D7A862; --ochre-bg: #2A2318;
  --oxide: #DE9A96; --oxide-bg: #2B1C1B;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- masthead ---------- */
.mast { border-bottom: 1px solid var(--rule); background: var(--panel); }
.mast .wrap { display: flex; align-items: baseline; gap: 18px;
  flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.mast h1 { font-size: 1rem; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
.mast h1 span { display: block; font-weight: 400; color: var(--ink-3);
  font-size: 0.8125rem; letter-spacing: 0; }
.mast nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.mast nav a {
  color: var(--ink-2); text-decoration: none; font-size: 0.875rem;
  padding: 5px 10px; border-radius: var(--radius); white-space: nowrap;
}
.mast nav a:hover { background: var(--sunk); color: var(--ink); }
.mast nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); font-weight: 600; }

/* ---------- the record: the one loud element ---------- */
.record {
  background: var(--panel); border-bottom: 1px solid var(--rule);
  padding: 44px 0 36px;
}
.record .passage {
  font-family: "Noto Serif Devanagari", "Source Serif 4", Georgia, serif;
  font-size: clamp(1.375rem, 1.1rem + 1.3vw, 2.125rem);
  line-height: 1.75; max-width: 34ch; margin: 0 0 22px;
  color: var(--ink); font-weight: 500;
  text-wrap: pretty;
}
.record .passage.latn { max-width: 44ch; font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); }
.record .kicker {
  font-size: 0.8125rem; color: var(--verdigris); margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 7px;
}
.record .kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--verdigris); flex: none;
}
/* metadata as a real definition list, not a dot-joined string */
dl.meta { margin: 0; display: grid; grid-template-columns: max-content 1fr;
  gap: 4px 18px; font-size: 0.875rem; align-items: baseline; }
dl.meta dt { color: var(--ink-3); }
dl.meta dd { margin: 0; color: var(--ink-2); }
dl.meta dd a { color: var(--seal); }

/* ---------- status: three dimensions, never one number ---------- */
.status { background: var(--sunk); border-bottom: 1px solid var(--rule); padding: 26px 0; }
.status .lead { max-width: var(--measure); margin: 0 0 20px; color: var(--ink-2); font-size: 0.9375rem; }
.status .lead b { color: var(--ink); font-weight: 600; }
.dims { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.dim { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 13px 15px; }
.dim h3 { margin: 0 0 6px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.dim .val { font-size: 0.9375rem; font-weight: 600; margin-bottom: 4px;
  overflow-wrap: break-word; hyphens: none; }
.dim .note { font-size: 0.8125rem; color: var(--ink-3); }
.dim.is-pending .val { color: var(--ochre); }
.dim.is-partial .val { color: var(--ochre); }
.dim.is-ok .val { color: var(--verdigris); }

/* ---------- sections ---------- */
section.band { padding: 34px 0; border-bottom: 1px solid var(--rule); }
section.band > .wrap > h2 {
  font-size: 1.0625rem; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em;
}
section.band > .wrap > p.sub { margin: 0 0 20px; color: var(--ink-3);
  font-size: 0.875rem; max-width: var(--measure); }

/* cards sized to their content, not a uniform grid of identical tiles */
.sessions { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.sess { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 16px 17px; }
.sess .yr { font-size: 0.8125rem; color: var(--ink-3); }
.sess h3 { margin: 2px 0 10px; font-size: 1rem; font-weight: 600; }
.sess h3 a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.sess h3 a:hover { border-bottom-color: var(--seal); color: var(--seal); }
.sess .flag { margin-top: 12px; padding: 9px 11px; border-radius: var(--radius);
  background: var(--ochre-bg); color: var(--ochre); font-size: 0.8125rem; }
.sess .flag b { font-weight: 600; }

/* leader rows: a measured bar showing attributed vs set-aside */
table.tab { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table.tab th, table.tab td { text-align: left; padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--rule); vertical-align: top; }
table.tab th { font-size: 0.8125rem; color: var(--ink-3); font-weight: 600; }
table.tab td.num, table.tab th.num { text-align: right; padding-right: 18px; }
table.tab tr:last-child td { border-bottom: 0; }
.name-hi { font-family: "Noto Serif Devanagari", Georgia, serif; color: var(--ink-2);
  font-size: 0.9375rem; display: block; }

.split { display: flex; height: 7px; border-radius: 4px; overflow: hidden;
  background: var(--sunk); min-width: 110px; }
.split i { display: block; height: 100%; }
.split i.att { background: var(--seal); }
.split i.amb { background: var(--ochre); opacity: .55; }

/* ---------- tokens ---------- */
.tok { display: inline-block; font-size: 0.75rem; padding: 2px 7px; border-radius: 2px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.tok.verified { background: var(--verdigris-bg); color: var(--verdigris); }
.tok.candidate { background: var(--sunk); color: var(--ink-2); }
.tok.pending { background: var(--ochre-bg); color: var(--ochre); }
.tok.block { background: var(--oxide-bg); color: var(--oxide); }
.tok.seal { background: var(--seal-bg); color: var(--seal); }

/* ---------- evidence rows ---------- */
.ev { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 10px; }
.ev .snip {
  font-family: "Noto Serif Devanagari", "Source Serif 4", Georgia, serif;
  font-size: 1rem; line-height: 1.8; max-width: var(--measure); margin: 0 0 11px;
  color: var(--ink);
}
.ev .snip mark { background: var(--seal-bg); color: var(--seal); padding: 0 2px;
  border-radius: 2px; }
/* The capture preserved the original line breaks of the page. Keep them
   visible as evidence of the layout, but quiet enough to read through. */
.ev .snip .lb { color: var(--ink-3); opacity: .35; font-size: .8em;
  padding: 0 .15em; user-select: none; }
.ev .foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: 0.8125rem; color: var(--ink-3); }
.ev .foot a { color: var(--seal); }
.ev.set-aside { border-left: 3px solid var(--ochre); }

/* ---------- filters ---------- */
form.filters { background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end; }
form.filters label { display: block; font-size: 0.8125rem; color: var(--ink-3);
  margin-bottom: 4px; }
form.filters select, form.filters input[type=text], form.filters input[type=password] {
  width: 100%; font: inherit; font-size: 0.9375rem; padding: 7px 9px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--ground); color: var(--ink);
}
form.filters .acts { display: flex; gap: 8px; }
button, .btn {
  font: inherit; font-size: 0.9375rem; padding: 7px 15px; cursor: pointer;
  border: 1px solid var(--seal); border-radius: var(--radius);
  background: var(--seal); color: var(--panel); text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { opacity: .9; }
.btn.quiet { background: transparent; color: var(--ink-2); border-color: var(--rule); }
a { color: var(--seal); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--seal); outline-offset: 2px;
}

.pager { display: flex; gap: 10px; align-items: center; margin-top: 18px;
  font-size: 0.875rem; color: var(--ink-3); }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8125rem; word-break: break-all; }
.empty { background: var(--panel); border: 1px dashed var(--rule);
  border-radius: var(--radius); padding: 26px; color: var(--ink-2);
  max-width: var(--measure); }
.empty h3 { margin: 0 0 6px; font-size: 1rem; }

footer.foot { padding: 26px 0 44px; color: var(--ink-3); font-size: 0.8125rem; }
footer.foot p { max-width: var(--measure); margin: 0 0 8px; }

.scroller { overflow-x: auto; }
@media (max-width: 600px) {
  .record { padding: 30px 0 26px; }
  dl.meta { grid-template-columns: 1fr; gap: 1px 0; }
  dl.meta dt { margin-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
