/* Layout: header bar, hero with an at-a-glance tally, a "where it stands" panel, then a section index beside the provisions. Each provision is a card of status chip, plain-language text, and citations that open the official article. */
:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --border: #e2e1db;
  --border-strong: #cfcec7;
  --ink: #16181d;
  --text2: #33342f;
  --text3: #4a4b46;
  --muted: #55564f;
  --soft: #f2f1ec;
  --link: #1d4ed8;
  --panel: #16181d;
  --panel-text: #f2f2ee;
  --panel-muted: #b8b9b2;
  --panel-card: #22242a;
  --panel-track: #2a2c32;
  --panel-dash: #6e6f69;
  --hot-card: #fffdf8;
  --new-bg: #e6eefb; --new: #1d4ed8;
  --chg-bg: #fcebd9; --chg: #8f4500;
  --rem-bg: #fbe7e9; --rem: #a61b2b;
  --kept-bg: #ebebe7; --kept: #46473f;
  /* Tally bar and swatches; same in both themes. */
  --sw-new: #2f6feb; --sw-chg: #d9730d; --sw-rem: #c42b3c; --sw-kept: #8f9089;
  --flag-red: #c42b3c; --flag-blue: #1f4fbf; --flag-apricot: #e8962e;
  --font-display: "Inter Tight", "Inter", "Noto Sans Armenian", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans Armenian", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-hy: "Noto Sans Armenian", "Inter", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --border: #2a2e35; --border-strong: #3a3f47; --ink: #ecedea;
    --text2: #d2d3ce; --text3: #b4b5af; --muted: #9a9b95; --soft: #1f2329; --link: #8ab4ff;
    --panel: #1e2228; --panel-card: #272b32; --panel-track: #2f343c; --panel-dash: #5c616a; --hot-card: #1b1e23;
    --new-bg: #1a2b4d; --new: #9dbbff; --chg-bg: #3a2612; --chg: #f5b36b;
    --rem-bg: #3d1a1f; --rem: #f59aa5; --kept-bg: #2a2c30; --kept: #c9cac4;
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
  :root:not([data-theme="light"]) .theme .sun { display: block; }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --border: #2a2e35; --border-strong: #3a3f47; --ink: #ecedea;
  --text2: #d2d3ce; --text3: #b4b5af; --muted: #9a9b95; --soft: #1f2329; --link: #8ab4ff;
  --panel: #1e2228; --panel-card: #272b32; --panel-track: #2f343c; --panel-dash: #5c616a; --hot-card: #1b1e23;
  --new-bg: #1a2b4d; --new: #9dbbff; --chg-bg: #3a2612; --chg: #f5b36b;
  --rem-bg: #3d1a1f; --rem: #f59aa5; --kept-bg: #2a2c30; --kept: #c9cac4;
  color-scheme: dark;
}
:root[data-theme="dark"] .theme .moon { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.wrap {
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 640px) { .wrap { padding-left: 24px; padding-right: 24px; } }

.flagbar { display: flex; height: 6px; }
.flagbar span { flex: 1; background: var(--flag-red); }
.flagbar span + span { background: var(--flag-blue); }
.flagbar span + span + span { background: var(--flag-apricot); }

header.bar { border-bottom: 1px solid var(--border); background: var(--surface); }
.bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--muted); }
.crumbs .home { font-family: var(--font-display); font-weight: 700; color: var(--ink); text-decoration: none; }
.crumbs .here { color: var(--text3); }
.bar-tools { display: flex; align-items: center; gap: 8px; }
button.theme {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.theme .sun { display: none; }
.lang { display: flex; gap: 4px; font-size: 0.875rem; }
.lang a { padding: 10px 12px; border-radius: 8px; color: var(--text3); text-decoration: none; }
.lang a[aria-current="page"] { background: var(--ink); color: var(--surface); font-weight: 600; }

.hero { padding: 4rem 0 2.5rem; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; }
.hero-text { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.875rem; color: var(--muted); }
.draft {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--rem); background: var(--rem-bg); padding: 6px 10px; border-radius: 999px;
}
h1 {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance;
}
/* Armenian words run long; keep the longest one inside a phone-width column. */
h1:lang(hy) { font-size: clamp(1.9rem, 8vw, 4.25rem); line-height: 1.08; overflow-wrap: break-word; }
.hy-sub { margin: 0; font-family: var(--font-hy); font-weight: 500; font-size: 1.375rem; color: var(--text3); }
.about { margin: 0; max-width: 620px; font-size: 1.125rem; line-height: 1.55; color: var(--text2); }
.lede { margin: 0; max-width: 620px; font-size: 0.9375rem; color: var(--muted); }

.glance {
  flex: 1 1 340px; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 16px;
}
.glance-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 0.9375rem; color: var(--text3); }
.glance .big { font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 1; color: var(--ink); margin-right: 4px; }
.pill-ink { font-size: 0.875rem; font-weight: 600; color: var(--surface); background: var(--ink); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; }
.stack .new, .sw.new { background: var(--sw-new); }
.stack .chg, .sw.chg { background: var(--sw-chg); }
.stack .rem, .sw.rem { background: var(--sw-rem); }
.stack .kept, .sw.kept { background: var(--sw-kept); }
.tally {
  margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px; font-size: 0.875rem; color: var(--text2);
}
.tally li { display: flex; align-items: center; gap: 8px; }
.tally strong { margin-left: auto; }
.sw { width: 10px; height: 10px; border-radius: 3px; }

.stands {
  background: var(--panel); color: var(--panel-text); border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 28px;
}
@media (max-width: 560px) { .stands { padding: 24px 20px; } }
.stands h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.625rem; }
.stands a { color: inherit; }
.stands .muted { color: var(--panel-muted); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.steps li { border-top: 3px dashed var(--panel-dash); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.steps .when { font-size: 0.8125rem; font-weight: 600; color: var(--panel-muted); }
.steps .what { font-weight: 600; }
.steps .what a { font-weight: 400; font-size: 0.875rem; color: var(--panel-muted); }
.steps .done { border-top-style: solid; border-top-color: var(--flag-apricot); }
.steps .done .when { color: var(--flag-apricot); }
.steps .now { border-top-style: solid; border-top-color: var(--panel-text); }
.steps .now .when { color: var(--panel-text); }
.seats { display: flex; flex-direction: column; gap: 10px; }
.seats p { margin: 0; font-size: 0.875rem; }
.seats-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.875rem; }
.seats-row strong { font-size: 1.125rem; }
.seats-row .gap { color: var(--flag-apricot); }
.seatbar { position: relative; display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: var(--panel-track); }
.seatbar .held { background: var(--panel-text); }
.seatbar .short { background: repeating-linear-gradient(45deg, var(--flag-apricot) 0 6px, var(--panel-track) 6px 10px); }
.seatbar .mark { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--flag-apricot); }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; font-size: 0.9375rem; line-height: 1.5; }
.notes p { margin: 0; background: var(--panel-card); border-radius: 12px; padding: 16px; }
.notes a { color: var(--panel-muted); font-size: 0.875rem; }

.browse { display: flex; flex-wrap: wrap; gap: 40px; padding: 3.5rem 0 1.5rem; align-items: flex-start; }
nav.toc { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 960px) { nav.toc { position: sticky; top: 16px; } }
nav.toc .label {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); padding: 0 12px 8px;
}
nav.toc a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px;
  min-height: 44px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 0.9375rem;
}
nav.toc a:hover { background: var(--soft); }
nav.toc .n, .filters .n { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.content { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
}
.filters button {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text2); font: 500 0.875rem var(--font-body); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.filters .n { font-size: 0.75rem; color: inherit; opacity: 0.8; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filters .hot-only { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.filters .sep { width: 1px; height: 28px; background: var(--border); margin: 0 4px; }
.empty {
  margin: 0; padding: 32px; text-align: center; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--border-strong); border-radius: 14px;
}

.content > section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.sec-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.sec-head .num { font-family: var(--font-mono); font-size: 0.875rem; color: var(--muted); }
.sec-head h2 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.sec-head .count { margin-left: auto; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.content .sub { margin: 0 0 4px; color: var(--muted); font-size: 0.9375rem; }

article.item {
  display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border);
}
article.item.hot { background: var(--hot-card); border-color: var(--ink); }
.tags { flex: 0 0 120px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
@media (max-width: 560px) { .tags { flex-basis: 100%; flex-direction: row; } }
.chip { font-size: 0.8125rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.chip.new { color: var(--new); background: var(--new-bg); }
.chip.chg { color: var(--chg); background: var(--chg-bg); }
.chip.rem { color: var(--rem); background: var(--rem-bg); }
.chip.kept { color: var(--kept); background: var(--kept-bg); }
.chip.hot { color: var(--surface); background: var(--ink); }
.body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.body h3 { margin: 0; font-size: 1.125rem; font-weight: 600; line-height: 1.35; }
.body p { margin: 0; color: var(--text2); max-width: 68ch; }
blockquote.hy {
  margin: 4px 0 0; padding: 8px 12px; background: var(--soft); border-radius: 8px;
  font-family: var(--font-hy); font-size: 0.9375rem; line-height: 1.6; color: var(--text2); max-width: 68ch;
}
blockquote.hy .tr { display: block; font-family: var(--font-body); font-size: 0.875rem; color: var(--muted); margin-top: 4px; }
.refs { flex: 0 1 200px; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; justify-content: flex-end; }
@media (max-width: 560px) { .refs { flex-basis: 100%; justify-content: flex-start; } }
.refs a {
  font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.4; padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text2); text-decoration: none;
}
.refs a:hover { border-color: var(--ink); color: var(--ink); }
.refs .ctx { background: var(--soft); color: var(--muted); border-color: var(--border); }

footer {
  border-top: 1px solid var(--border); padding: 28px 0 56px; display: flex; flex-wrap: wrap;
  gap: 12px 32px; justify-content: space-between; font-size: 0.875rem; line-height: 1.5; color: var(--muted);
}
footer > div { max-width: 640px; display: grid; gap: 6px; }
footer p { margin: 0; }
footer a { color: var(--link); font-weight: 500; }
