/* Layout: одна дата управляет всем. Сверху пульт дня с лентой 35 лет, под ним зал (или два: Мажилис и Сенат),
   рядом с залом список партий с числами, ниже люди, картина всех созывов и честная таблица «что поднято».
   Вид как у «Правительства» на aqqqulaq.com: небо под стеклянными панелями, тёмная тема «Аспан», светлая «Су». */
:root {
  color-scheme: dark;
  --bg: #04060c; --ink: #e3e7f0; --ink-2: #c5cfdf; --muted: #9baac2;
  --glass: #17212d9c; --solid: #142031f7; --sheet: #142031; --control: #10192a;
  --line: rgba(255,255,255,.16); --line-2: rgba(255,255,255,.3);
  --accent: #81bceb; --accent-soft: #81bceb1f; --selected: #e4ecff; --selected-ink: #132037;
  --gold: #e9c27b; --band-a: #81bceb24; --band-b: #81bceb47; --band-c: #e9c27b3d; --band-ink: #d9e8f8;
  --face-bg: #1c2838; --shadow: 0 24px 65px #0005, 0 4px 12px #0003;
  --sky: radial-gradient(ellipse at 62% 42%, #0a1020 0%, #060a13 37%, #04060c 80%);
  --h-blue: #3987e5; --h-orange: #d95926; --h-aqua: #199e70; --h-yellow: #c98500; --h-magenta: #d55181; --h-green: #0ca30c; --h-violet: #9085e9; --h-red: #e66767; --h-gray: #8b97a6; --h-mute: #5b6a80;
  --on-hue: #ffffff;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-surface: 24px; --r-control: 14px;
}
:root[data-theme="water"] {
  color-scheme: light;
  --bg: #c3e9e9; --ink: #173c4a; --ink-2: #21495a; --muted: #3a5d69;
  --glass: #effafad4; --solid: #f1fafbf7; --sheet: #eef9fa; --control: #f3ffffb8;
  --line: rgba(23,60,74,.18); --line-2: rgba(23,60,74,.34);
  --accent: #286f9e; --accent-soft: #286f9e1a; --selected: #245e6b; --selected-ink: #ffffff;
  --gold: #a8700a; --band-a: #245e6b1c; --band-b: #245e6b38; --band-c: #c98a1a33; --band-ink: #173c4a;
  --face-bg: #d3ebeb; --shadow: 0 24px 65px #22616c26, 0 4px 12px #22616c12;
  --sky: radial-gradient(ellipse at 23% -12%, #f3fffaee, transparent 58%), linear-gradient(165deg, #d7f2ec 0%, #b1e2e3 42%, #80c3d1 100%);
  --h-blue: #2a78d6; --h-orange: #eb6834; --h-aqua: #1baf7a; --h-yellow: #eda100; --h-magenta: #e87ba4; --h-green: #008300; --h-violet: #6250d6; --h-red: #e34948; --h-gray: #7a8794; --h-mute: #9fb1b8;
}
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); min-width: 280px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.sky { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: var(--sky); }
.shell { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding-block: 28px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 18px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px, 5.2vw, 46px); line-height: 1.05; letter-spacing: -1.4px; font-weight: 650; text-wrap: balance; }
h2 { font-size: 21px; line-height: 1.2; letter-spacing: -.3px; font-weight: 650; text-wrap: balance; }
h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-top: 18px; }
.head { display: grid; gap: 10px; padding: 6px 4px 4px; }
.headRow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.headRow .eyebrow { margin-right: auto; }
.seg.langs button { min-width: 52px; min-height: 40px; }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lede { max-width: 66ch; color: var(--ink-2); font-size: 16px; }
.lede b, .phrase b, .measure strong { font-variant-numeric: tabular-nums; }
.pglass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); }
.fine { font-size: 13px; color: var(--muted); max-width: 78ch; }
.ghost { border: 1px solid var(--line); background: var(--control); border-radius: 99px; min-height: 40px; padding: 8px 14px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ghost:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
.ghost:disabled { opacity: .4; cursor: default; }
.ghost.small { min-height: 34px; padding: 6px 12px; }

/* пульт дня */
.console { padding: 18px 20px 14px; display: grid; gap: 10px; }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.phrase { font-size: clamp(19px, 3.2vw, 26px); letter-spacing: -.4px; margin-right: auto; }
.phrase b { font-weight: 650; }
.pcontrols { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#legSelect, #search, .dateField { border: 1px solid var(--line); background: var(--control); border-radius: var(--r-control); min-height: 40px; padding: 8px 12px; font-size: 14px; min-width: 0; }
.ribbon { position: relative; height: 96px; margin-top: 2px; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; border-radius: 10px; }
.lane { position: absolute; left: 0; right: 0; }
.lane0 { top: 10px; height: 30px; } .lane1 { top: 46px; height: 22px; }
.laneName { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lane1::before { content: attr(data-name); position: absolute; left: 0; top: 2px; font-size: 11px; color: var(--muted); }
.block { position: absolute; top: 0; bottom: 0; min-width: 7px; border: 0; padding: 0; border-radius: 6px; background: var(--band-a); color: var(--band-ink); font-size: 11px; font-weight: 600; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.block.b-vs { background: var(--band-c); } .block.b-kurultai { background: var(--band-b); }
.block.on { background: var(--selected); color: var(--selected-ink); }
.block span { pointer-events: none; } .block.thin span { display: none; }
.before { position: absolute; top: 6px; bottom: 22px; left: 0; pointer-events: none; border-right: 1px dashed var(--gold); background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 6px); border-radius: 6px 0 0 6px; }
.years { position: absolute; left: 0; right: 0; bottom: 0; height: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.years span { position: absolute; transform: translateX(-50%); }
.years .born { transform: none; color: var(--gold); padding-left: 3px; }
.cursor { position: absolute; top: 0; bottom: 18px; width: 2px; margin-left: -1px; background: var(--gold); pointer-events: none; border-radius: 2px; }
.cursor i { position: absolute; top: -3px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px var(--solid); }
.key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; box-shadow: inset 0 0 0 1px var(--line); }
.key .k-vs { background: var(--band-c); } .key .k-m { background: var(--band-a); } .key .k-k { background: var(--band-b); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.happened { font-size: 13.5px; color: var(--ink-2); }
.happened:empty { display: none; }
.stepNote { font-size: 12px; color: var(--muted); margin-top: -4px; }
.stepNote.warn { color: var(--ink); font-weight: 600; }
.step { display: inline-flex; align-items: center; gap: 6px; }
.error { padding: 16px 20px; }

/* палаты */
/* поле дня: день.месяц.год своим текстом; родное поле браузера лежит под ним и только открывает календарь */
.dateField { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 12px; }
.dateField:focus-within { border-color: var(--accent); }
.dateField.bad { border-color: #e5484d; }
#dateTyped { border: 0; background: transparent; color: inherit; font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; width: 10.5ch; min-width: 0; padding: 8px 0; outline: 0; }
.dateIcon { border: 0; background: transparent; width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.dateIcon:hover { color: var(--ink); background: var(--accent-soft); }
.dateIcon svg { width: 18px; height: 18px; }
#date { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; margin: 0; min-height: 0; }
@media (pointer: coarse) { #date { pointer-events: auto; } #dateTyped, .dateIcon { pointer-events: none; } }
/* вкладки: на широком экране под пультом, на телефоне внизу под большим пальцем */
.tabs { display: flex; gap: 3px; padding: 4px; width: fit-content; max-width: 100%; border: 1px solid var(--line); background: var(--glass); border-radius: 24px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.tabs button { border: 0; background: transparent; border-radius: 99px; min-height: 42px; padding: 8px 18px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs button[aria-pressed="true"] { background: var(--selected); color: var(--selected-ink); }
.panes, .tabPane, .dataPane { display: grid; gap: 18px; min-width: 0; }
.mini { position: fixed; z-index: 20; top: 0; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 8px; background: var(--solid); border-bottom: 1px solid var(--line);
  padding: calc(6px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }
.mini .ghost { min-height: 40px; min-width: 46px; font-variant-numeric: tabular-nums; }
.seg.sides { display: none; }
.hint { margin-top: -2px; }
.chambers { display: grid; gap: 18px; align-items: start; }
@media (max-width: 1079px) {
  .seg.sides:not([hidden]) { display: flex; width: 100%; }
  .seg.sides button { flex: 1; min-height: 44px; }
  .chambers.pick0 > .chamber:nth-child(2), .chambers.pick1 > .chamber:nth-child(1) { display: none; }
}
@media (min-width: 1080px) { .chambers.n2 { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); } }
.chamber { padding: 20px; min-width: 0; display: grid; gap: 10px; align-content: start; }
.chamberHead { display: grid; gap: 4px; }
.sub { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; padding: 4px; gap: 3px; border: 1px solid var(--line); background: var(--control); border-radius: 22px; width: fit-content; max-width: 100%; }
.seg button { border: 0; background: transparent; border-radius: 99px; min-height: 36px; padding: 6px 13px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--selected); color: var(--selected-ink); }
.measure { font-size: 14px; color: var(--ink-2); max-width: 76ch; }
.measure strong { font-size: 16px; color: var(--ink); }
.hall { position: relative; width: 100%; max-width: 880px; margin: 6px auto 0; }
.seat { position: absolute; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; background: var(--c); transition: transform .12s, opacity .2s; }
button.seat:hover, button.seat:focus-visible { transform: scale(1.4); z-index: 3; outline-offset: 2px; }
.seat b { display: none; font: 600 9px/1 var(--font); color: var(--on-c, var(--on-hue)); letter-spacing: -.2px; }
.hall.letters .seat b { display: grid; place-items: center; height: 100%; }
.hall.faces .seat.face { background-color: var(--face-bg); background-image: var(--faces, none); background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%); box-shadow: 0 0 0 2px var(--c); }
.hall.faces .seat.face b { display: none; }
/* a phone: portraits in the hall too, with a thinner party ring so that neighbours do not merge */
.hall.smallFaces .seat.face { box-shadow: 0 0 0 1.5px var(--c); }
.hall.smallFaces .seat.face.maybe { outline-width: 1.5px; }
.seat.maybe { background: transparent; outline: 1.5px dashed var(--c); outline-offset: -1.5px; }
.seat.maybe b { color: var(--ink-2); }
.hall.faces .seat.face.maybe { box-shadow: none; outline: 2px dashed var(--c); outline-offset: 0; opacity: .62; }
.seat.dim { opacity: .14; }
.seat.vacant { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.hallCount { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); text-align: center; line-height: 1.05; pointer-events: none; }
.hallCount strong { display: block; font-size: clamp(26px, 6vw, 48px); letter-spacing: -1.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.hallCount span { font-size: 12px; color: var(--muted); }
.hall.tiny .hallCount strong { font-size: 24px; }
.hallNote { font-size: 12px; color: var(--muted); text-align: center; }
.c-blue { --c: var(--h-blue); } .c-orange { --c: var(--h-orange); } .c-aqua { --c: var(--h-aqua); } .c-yellow { --c: var(--h-yellow); --on-c: #1b1406; } .c-magenta { --c: var(--h-magenta); }
.c-ink { --c: var(--ink-2); --on-c: var(--bg); }
.c-green { --c: var(--h-green); } .c-violet { --c: var(--h-violet); } .c-red { --c: var(--h-red); } .c-gray { --c: var(--h-gray); } .c-mute { --c: var(--h-mute); }
.seat.c-mute, .hbar .c-mute, .swatchHatch { background: repeating-linear-gradient(45deg, var(--h-mute) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px var(--h-mute); }
.parties { display: grid; gap: 4px; margin-top: 4px; }
.party { display: grid; grid-template-columns: 12px 112px minmax(0, 1.1fr) minmax(40px, 1fr) auto 44px; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 12px; padding: 7px 10px; min-height: 40px; }
.party:hover { background: var(--accent-soft); } .party.picked { border-color: var(--line-2); background: var(--accent-soft); }
.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--c); display: block; }
.c-mute > .swatch { background: repeating-linear-gradient(45deg, var(--h-mute) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--h-mute); }
.parties.results .party { cursor: default; }
.parties.results .party:hover { background: transparent; }
.parties.nologo .party { grid-template-columns: 12px 0 minmax(0, 1.1fr) minmax(40px, 1fr) auto 44px; column-gap: 5px; }
.logoPlate { grid-column: 2; justify-self: start; display: grid; place-items: center; height: 30px; padding: 4px 8px; border-radius: 8px; background: #ffffff; }
.logoPlate img { display: block; height: 22px; width: auto; max-width: 96px; object-fit: contain; }
.logoPlate.tall { height: 40px; padding: 3px 5px; } .logoPlate.tall img { height: 34px; }
.pname { grid-column: 3; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; } .pbar { grid-column: 4; height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; display: block; }
.pbar i { display: block; height: 100%; background: var(--c); border-radius: 4px; }
.c-mute .pbar i { background: var(--h-mute); }
.pn { grid-column: 5; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; } .pp { grid-column: 6; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 13px; }
.offices { display: grid; gap: 6px 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.offices p { display: grid; gap: 1px; font-size: 14px; }
.role { font-size: 12px; color: var(--muted); }
.who { border: 0; background: none; padding: 0; text-align: left; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; min-height: 24px; }
.who:hover { text-decoration-color: var(--accent); }
.committees { display: grid; gap: 6px; }
.committees details { border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; background: var(--control); }
.committees summary { cursor: pointer; display: grid; gap: 2px; min-height: 28px; }
.committees summary span { font-size: 12.5px; color: var(--muted); }
.cmembers { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 18px; margin-top: 10px; font-size: 14px; }
.cmember { display: flex; align-items: center; gap: 9px; min-height: 40px; text-align: left; }
button.cmember { font: inherit; color: inherit; background: none; border: 0; padding: 0; border-radius: 10px; cursor: pointer; }
button.cmember .cwho { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
button.cmember:hover .cwho { text-decoration-color: currentColor; }
button.cmember:focus-visible { outline: 2px solid var(--accent, #9cc3ff); outline-offset: 2px; }
.cmember .avatar b { font-size: 11px; }
.cname { display: grid; gap: 1px; min-width: 0; line-height: 1.25; flex: 1; }
.cmember .swatch { flex: none; }
.cmember em { font-style: normal; font-size: 12px; color: var(--muted); }
.cmember.csource { grid-column: 1 / -1; min-height: 32px; }
.csource { flex-basis: 100%; font-size: 12.5px; }
.gap { text-align: left; } .gapActions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gapActions .ghost { white-space: normal; text-align: left; }

/* люди */
.ppanel { padding: 20px; display: grid; gap: 12px; min-width: 0; }
.panelHead { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.panelHead h2 { margin-right: auto; } #search { width: min(100%, 320px); }
.more { margin-top: 10px; }
.peopleList h3 { margin: 14px 0 8px; } .peopleList h3:first-child { margin-top: 0; }
.rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 12px; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--control); border-radius: 14px; padding: 7px 10px; min-height: 56px; }
.row:hover { border-color: var(--line-2); }
.rowText { display: grid; min-width: 0; } .rowText strong { font-weight: 600; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; } .rowText span { font-size: 12px; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background-color: var(--face-bg); display: grid; place-items: center; flex: none; overflow: hidden; }
.avatar.face { background-image: var(--faces, none); background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%); }
.avatar b { font-size: 13px; font-weight: 600; color: var(--muted); }

/* 35 лет */
.history { display: grid; gap: 5px; }
.hrow { display: grid; grid-template-columns: 132px minmax(0, 1fr) 170px; gap: 12px; align-items: center; text-align: left; border: 1px solid transparent; background: none; border-radius: 12px; padding: 5px 8px; min-height: 44px; }
.hrow:hover { background: var(--accent-soft); } .hrow.on { border-color: var(--line-2); background: var(--accent-soft); }
.hname, .hnum { display: grid; line-height: 1.25; } .hname span, .hnum span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hnum strong { font-variant-numeric: tabular-nums; }
.htrack { display: block; min-width: 0; } .hbar { display: flex; gap: 2px; height: 24px; min-width: 24px; }
.hbar i { display: block; background: var(--c); min-width: 2px; border-radius: 4px; overflow: hidden; position: relative; }
.hbar i span { position: absolute; inset: 0 5px; display: flex; align-items: center; font: 600 11px/1 var(--font); font-style: normal; color: var(--on-c, var(--on-hue)); white-space: nowrap; overflow: hidden; }
.hbar i span[hidden] { display: none; }
.hbar .c-mute span, .hbar .c-gray span { color: var(--ink); text-shadow: 0 0 3px var(--solid), 0 0 3px var(--solid); }
.hbar .c-none-yet { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

/* что поднято */
.tableWrap { overflow-x: auto; }
.quality { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.quality th, .quality td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.quality thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.quality tbody th { font-weight: 600; white-space: nowrap; }
.fineList { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); max-width: 86ch; }
.foot { font-size: 12.5px; color: var(--muted); padding: 0 4px; display: grid; gap: 6px; max-width: 90ch; }

/* подсказка и карточка */
.tip { position: fixed; z-index: 40; pointer-events: none; background: var(--solid); border: 1px solid var(--line-2); border-radius: 10px; padding: 6px 10px; font-size: 13px; display: grid; box-shadow: var(--shadow); max-width: 280px; }
.tip span { color: var(--muted); font-size: 12px; }
.card { position: fixed; inset: 0; z-index: 50; background: #0007; display: flex; justify-content: flex-end; }
.cardPanel { position: relative; width: min(470px, 100%); height: 100%; overflow-y: auto; background: var(--sheet); border-left: 1px solid var(--line); padding: calc(22px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) 20px; box-shadow: var(--shadow); }
.pclose { position: sticky; top: 0; float: right; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--control); font-size: 22px; line-height: 1; z-index: 2; }
.cardTop { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; margin-right: 52px; }
.cardTop .avatar b { font-size: 26px; }
.kk { color: var(--ink-2); font-size: 14px; } .lead { margin-top: 14px; color: var(--ink-2); }
.life { position: relative; height: 14px; margin-top: 12px; border-radius: 7px; background: var(--accent-soft); overflow: hidden; }
.life i { position: absolute; top: 0; bottom: 0; background: var(--c); min-width: 3px; } .life i.c-mute { background: var(--h-mute); }
.life u { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--gold); }
.terms { display: grid; gap: 8px; margin-top: 8px; }
.term { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.term.now { border-color: var(--gold); }
.term .swatch { margin-top: 5px; } .term div { display: grid; gap: 2px; min-width: 0; } .term span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.term .office { color: var(--ink); } .term .note { color: var(--muted); font-size: 12.5px; }
.brief h3 { margin-top: 16px; } .briefText { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); max-width: 62ch; } .brief .fine { margin-top: 4px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 14px; } .credit { margin-top: 14px; }
body.cardOpen { overflow: hidden; }

@media (max-width: 720px) {
  .console, .chamber, .ppanel { padding: 16px 14px; border-radius: 20px; }
  .shell { padding-block: 14px 104px; gap: 12px; }
  .head { gap: 6px; padding: 0 2px; } #ledeB { display: none; } .lede { font-size: 14.5px; }
  .console { gap: 8px; }
  .pcontrols { width: 100%; flex-wrap: nowrap; gap: 6px; } .pcontrols .ghost { flex: 0 0 auto; padding-inline: 12px; min-height: 44px; } .dateField { flex: 1 1 auto; min-width: 0; min-height: 44px; } #dateTyped { width: 100%; font-size: 16px; }
  .stepLabel { display: none; } .step { min-width: 46px; justify-content: center; font-size: 16px; }
  .jump label, .jump .ghost { display: none; } #legSelect { min-height: 44px; }
  .tabs { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; width: auto; max-width: none; border-radius: 0; border-width: 1px 0 0; background: var(--solid); justify-content: space-around;
    padding: 6px max(10px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); }
  .tabs button { flex: 1; min-height: 48px; padding: 6px 4px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; } .filters::-webkit-scrollbar { display: none; } .filters button { flex: none; min-height: 42px; }
  .who { min-height: 40px; display: inline-flex; align-items: center; } .offices { gap: 2px 22px; }
  .cmembers { grid-template-columns: 1fr; gap: 2px; } .cmember, .cmember.csource { min-height: 48px; }
  .committees summary { min-height: 44px; } .ghost.small { min-height: 40px; }
  .block, .years, .lane1::before, .hbar i span { font-size: 12px; }
  .chamber .fine a, .quality a, .links a, .brief .fine a { display: inline-flex; align-items: center; min-height: 40px; }
  .chamber .noteSources a { display: inline; min-height: 0; padding-block: 10px; }
  .years span:first-child { display: none; }
  body[data-tab="history"] .console, body[data-tab="data"] .console, body[data-tab="history"] .mini, body[data-tab="data"] .mini { display: none; }
  .tableWrap { overflow: visible; } .quality { min-width: 0; display: block; } .quality thead { display: none; } .quality tbody { display: grid; gap: 10px; }
  .quality tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
  .quality tbody th { grid-column: 1 / -1; white-space: normal; border: 0; padding: 0; font-size: 15px; }
  .quality td { display: grid; gap: 1px; align-content: start; border: 0; padding: 0; } .quality td::before { content: attr(data-label); font-size: 12px; color: var(--muted); }
  .quality td:nth-of-type(n+3) { grid-column: 1 / -1; }
  .key { display: none; }
  .ribbon { height: 90px; }
  h1 { font-size: 28px; letter-spacing: -.8px; }
  .party { grid-template-columns: 12px 82px minmax(0, 1fr) auto 40px; row-gap: 4px; }
  .parties.nologo .party { grid-template-columns: 12px 0 minmax(0, 1fr) auto 40px; }
  .pbar { grid-column: 1 / -1; grid-row: 2; height: 5px; } .pn { grid-column: 4; } .pp { grid-column: 5; }
  .logoPlate { height: 26px; padding: 3px 6px; } .logoPlate img { height: 18px; max-width: 70px; }
  .logoPlate.tall { height: 36px; padding: 3px 4px; } .logoPlate.tall img { height: 30px; }
  .hrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; } .htrack { grid-column: 1 / -1; grid-row: 2; } .hnum { text-align: right; } .hbar { width: 100% !important; }
  .card { align-items: flex-end; } .cardPanel { width: 100%; height: auto; max-height: 88%; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding-top: 18px; }
  .jump label { width: 100%; } #legSelect { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .seat { transition: none; } }

/* tall enough for any tab to start at the top of the window: a short tab must not throw the reader up the page */
.panes { min-height: 100vh; min-height: 100svh; align-content: start; align-items: start; }

/* «Download» and «Share» (dashboards/shared/share.js), like Our World in Data: icons in the head of a chamber and of the 35 years */
.chamberHead { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.chamberHead > h2, .chamberHead > .sub { grid-column: 1; }
.chamberHead > .shareBox { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: -6px -6px 0 0; }
.tabPane[data-tab="history"] { position: relative; }
.historyShare { position: absolute; top: 10px; right: 10px; }
#historyTitle { padding-right: 100px; }
.shareBox { position: relative; }
.shareBar { display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-height: 44px; }
.shareAnchor { position: relative; }
.shareIcon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 12px; background: none; color: var(--muted); cursor: pointer; padding: 0; }
.shareIcon[aria-expanded="true"] { background: var(--control, var(--solid)); border-color: var(--line); color: var(--ink); }
@media (hover: hover) { .shareIcon:hover { color: var(--ink); background: var(--control, var(--solid)); } }
.shareMenu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 40; min-width: 230px; max-width: min(300px, calc(100vw - 40px)); padding: 6px;
  background: var(--solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.shareBox.down .shareMenu { bottom: auto; top: calc(100% + 6px); }
.shareMenuHead { margin: 4px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.shareItem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.shareItem svg { flex: none; color: var(--muted); }
@media (hover: hover) { .shareItem:hover { background: var(--control, rgba(127,127,127,.12)); } }
.shareItem:focus-visible, .shareIcon:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.shareStatus { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 41; padding: 5px 10px; border-radius: 10px; background: var(--solid); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.shareStatus.on { opacity: 1; }
.shareBox.down .shareStatus { bottom: auto; top: calc(100% + 4px); }
.shareEmbed { grid-column: 1 / -1; margin-top: 8px; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--solid); position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(520px, calc(100vw - 40px)); }
.shareEmbedHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.shareHint { margin: 0; font-size: 13px; color: var(--muted); }
.shareClose { flex: none; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; }
.shareEmbed textarea { width: 100%; min-height: 96px; resize: vertical; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-sizing: border-box; border-radius: 10px; padding: 10px 12px; font: 12.5px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.shareTools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.shareCopy { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--selected, var(--solid)); color: var(--selected-ink, var(--ink)); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.shareManual { width: 100%; margin-top: 8px; min-height: 44px; font-size: 16px; box-sizing: border-box; }
@media (pointer: coarse) { .shareItem.wide { display: none; } }
/* the embed page (public/parliament/embed/): the hall of a day or the 35 years, nothing else */
.embed .mini, .embed .console, .embed .tabs, .embed .tabPane[data-tab="people"], .embed .tabPane[data-tab="data"], .embed .filters, .embed .hallNote, .embed .chamber .fine,
.embed .chamber h3, .embed .chamber .offices, .embed .chamber .committees, .embed .shareBox, .embed #historyFine, .embed #tip { display: none !important; }
body.embed { margin: 0; }
.embed .shell { padding: 10px 12px 0; max-width: none; }
.embed .chambers { gap: 10px; }
.embedHead, .embedFoot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.embedHead b { color: var(--ink); font-size: 15px; }
.embedFoot { margin: 8px 0 10px; }
.embedFoot a, .embedHead a { color: var(--ink); font-weight: 600; text-decoration: none; }

/* The section on aqqqulaq.com: the site's header and heading above the dashboard, the texts of a page below it.
   Appended to the dashboard's styles by build_site.mjs. */
.parl-page .sky { display: none; }
#sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
:root[data-theme="water"] #sky { background: var(--sky); }
.siteHead { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.siteHead .header-brand { margin-right: auto; }
.siteHead .back-link { font-size: 13px; color: var(--muted); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.siteHead .back-link:hover { color: var(--ink); }
.wordmark { font-size: 24px; font-weight: 650; letter-spacing: -1px; text-decoration: none; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.themes { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass); }
.themes button { width: 44px; min-width: 44px; height: 44px; padding: 9px; display: grid; place-items: center; border: 0; border-radius: 14px; background: none; color: var(--muted); cursor: pointer; }
.themes button[aria-pressed="true"] { background: var(--selected); color: var(--selected-ink); }
.themes svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.titleRow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; padding: 0 4px; }
.titleRow h1 { margin: 0; flex: 1 1 60%; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; text-wrap: balance; max-width: 30ch; scroll-margin-top: 12px; }
.titleRow > .share { margin-left: auto; align-self: center; }
#answer { flex: 1 1 100%; order: 3; max-width: 86ch; margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
#answer strong { font-weight: 600; color: var(--ink); }

#static { min-width: 0; }
.parl-pages { display: grid; gap: 14px; }
.parl-block { padding: 18px 20px; min-width: 0; }
.parl-block h2 { margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.parl-block h3 { margin: 16px 0 4px; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); }
.parl-block h3 span { font-weight: 400; color: var(--muted); font-size: 13px; }
.parl-block p, .parl-block li { margin: 0 0 6px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.parl-block a { color: var(--accent); text-underline-offset: 3px; }
.parl-fine { font-size: 12.5px !important; color: var(--muted) !important; }
.parl-list, .parl-links { list-style: none; margin: 0; padding: 0; }
.parl-list li span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.parl-links { display: flex; flex-wrap: wrap; gap: 2px 20px; }
.parl-links a { display: inline-flex; align-items: center; min-height: 40px; min-width: 44px; }
.parl-scroll { overflow-x: auto; }
.parl-table { width: auto; min-width: min(100%, 560px); border-collapse: collapse; font-size: 14px; }
.parl-table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 6px 28px 6px 0; border-bottom: 1px solid var(--line-2); vertical-align: bottom; }
.parl-table td { padding: 7px 28px 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.parl-table td:first-child { color: var(--ink); }
.parl-table td.num, .parl-table th:not(:first-child) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.parl-table tr:last-child td { border-bottom: 0; }
/* a plain page (a party) has no dashboard: the texts start right under the heading */
.parl-page .site-sections { --wide: 1240px; }
@media (max-width: 720px) {
  .siteHead { gap: 8px; flex-wrap: wrap; }
  .wordmark { font-size: 22px; }
  .themes button { width: 40px; min-width: 40px; height: 40px; padding: 8px; }
  .titleRow h1 { font-size: 26px; flex-basis: 100%; }
  #answer { font-size: 14px; }
  .parl-block { padding: 14px 14px; }
  .parl-block h3 a { display: inline-flex; align-items: center; min-height: 40px; }
  .parl-table { font-size: 13px; width: 100%; }
  .parl-table th, .parl-table td { padding-right: 8px; }
  /* the tabs are pinned to the bottom of a phone: the foot of the site must end above them */
  body:has(#tabs) .site-sections { padding-bottom: 96px; }
}
