/* Parliament of Samoa (/parliament.html)
   A focused page for the Legislative Assembly: a 3D chamber, the current party
   balance, and a what-if scenario lab that feeds both the room and the flat plan.
   The page owns its layout here; styles.css supplies the site shell and tokens. */

.parliament-shell {
  background:
    radial-gradient(ellipse at 88% 3%, rgba(201, 75, 54, .08), transparent 28%),
    radial-gradient(ellipse at 7% 16%, rgba(47, 100, 160, .055), transparent 26%),
    var(--paper);
}

.parliament-topbar { align-items: center; }
.parliament-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 18px; }
.parliament-nav a {
  position: relative;
  padding: 7px 0;
  color: var(--green);
  font: 500 9px var(--mono);
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
}
.parliament-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: transparent;
  content: '';
  transform: scaleX(.2);
  transition: background .18s ease, transform .18s ease;
}
.parliament-nav a:hover::after,
.parliament-nav a:focus-visible::after,
.parliament-nav a[aria-current="page"]::after { background: var(--amber); transform: scaleX(1); }
.parliament-nav a[aria-current="page"] { color: var(--green-deep); }
.parliament-nav .island-label { margin-left: 4px; }

/* Hero ------------------------------------------------------------------ */
.parliament-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 362px;
  align-items: end;
  gap: clamp(30px, 6vw, 94px);
  padding: 57px 0 43px;
}
.parliament-hero-copy { max-width: 790px; }
.parliament-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(45px, 5.6vw, 78px);
  font-weight: 500;
  line-height: .97;
  letter-spacing: -.035em;
}
.parliament-hero h1 em { color: var(--green); }
.parliament-deck {
  max-width: 620px;
  margin: 22px 0 0;
  color: #586256;
  font-size: 15px;
  line-height: 1.7;
}
.parliament-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 24px; }
.parliament-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}
.parliament-button:hover { transform: translateY(-1px); }
.parliament-button.is-primary { color: var(--white); border-color: var(--green-deep); background: var(--green-deep); box-shadow: 0 8px 18px rgba(25, 61, 45, .12); }
.parliament-button.is-primary:hover { background: #24513a; }
.parliament-button.is-quiet { color: var(--green); border-color: #cdd8c8; background: rgba(255, 254, 248, .7); }
.parliament-button.is-quiet:hover { border-color: #a7b99f; background: #f0f5e9; }
.parliament-updated {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 17px 0 0;
  color: var(--muted);
  font: 9px/1.6 var(--mono);
}
.parliament-updated a { color: var(--green); text-underline-offset: 3px; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #6f9f63; box-shadow: 0 0 0 3px rgba(111, 159, 99, .12); }
.parliament-snapshot {
  position: relative;
  overflow: hidden;
  padding: 21px 22px 18px;
  color: #f1f3e4;
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 232, 141, .14), transparent 37%),
    radial-gradient(circle at 0% 100%, rgba(201, 75, 54, .14), transparent 32%),
    var(--green-deep);
  box-shadow: 0 22px 44px rgba(25, 61, 45, .16);
}
.parliament-snapshot::after {
  position: absolute;
  top: -68px;
  right: -46px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(217, 232, 141, .18);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(217, 232, 141, .035), 0 0 0 36px rgba(217, 232, 141, .025);
  content: '';
  pointer-events: none;
}
.snapshot-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #b7c4a8; font: 8px var(--mono); letter-spacing: .1em; }
.snapshot-date { color: #d9e88d; font-size: 8px; }
.snapshot-total { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 12px; padding: 10px 0 14px; border-bottom: 1px solid rgba(229, 237, 189, .17); }
.snapshot-total strong { color: #f4f3e8; font: 500 64px/1 var(--serif); letter-spacing: -.05em; }
.snapshot-total span { color: #b7c4a8; font: 9px/1.5 var(--mono); }
.snapshot-parties { position: relative; z-index: 1; display: grid; gap: 1px; padding: 9px 0 7px; }
.snapshot-party { display: grid; grid-template-columns: 12px 46px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 28px; }
.snapshot-party-name { font-size: 11px; font-weight: 600; }
.snapshot-party-role { overflow: hidden; color: #9eb098; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.snapshot-party strong { color: #f4f3e8; font: 500 18px var(--mono); }
.snapshot-majority { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 7px; margin-top: 3px; padding: 11px 0 9px; border-top: 1px solid rgba(229, 237, 189, .17); color: #b7c4a8; font: 9px var(--mono); }
.snapshot-majority strong { color: var(--lime); font: 600 25px var(--mono); }
.snapshot-majority-note { margin-left: auto; color: #9eb098; font-size: 8px; }
.snapshot-note { position: relative; z-index: 1; margin: 0; color: #9eb098; font-size: 9px; line-height: 1.55; }
.party-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; }
.party-dot.is-fast, .preset-arrow i.is-fast { background: #c94b36; }
.party-dot.is-hrpp, .preset-arrow i.is-hrpp { background: #2f64a0; }
.party-dot.is-sup, .preset-arrow i.is-sup { background: #3f7d50; }
.party-dot.is-ind, .preset-arrow i.is-ind { background: #7e837a; }
.party-dot.is-vacant, .preset-arrow i.is-vacant { border: 1px dashed #9a9b8e; background: transparent; }

/* Chamber --------------------------------------------------------------- */
.parliament-chamber { padding-top: 38px; }
.parliament-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 15px; }
.parliament-section-head .eyebrow { margin-bottom: 5px; }
.parliament-section-head h2, .plan-copy h2, .explainer-intro h2, .record-copy h2, .history-head h2, .faq-head h2, .sources-head h2 {
  margin: 0;
  font-size: clamp(25px, 2.7vw, 35px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.section-sub { max-width: 520px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.view-switch { display: flex; flex: 0 0 auto; gap: 3px; padding: 3px; border: 1px solid #d6ddcf; border-radius: 7px; background: #eceee2; }
.view-switch button {
  min-height: 31px;
  padding: 0 13px;
  color: #6e7668;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: 500 9px var(--mono);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.view-switch button:hover { color: var(--green-deep); background: rgba(255, 254, 248, .65); }
.view-switch button.is-active { color: var(--white); background: var(--green-deep); box-shadow: 0 2px 5px rgba(25, 61, 45, .16); }
.chamber-workbench { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 17px; }
.chamber-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: clamp(590px, 55vw, 730px);
  border: 1px solid #335747;
  border-radius: 16px;
  background: #071b14;
  box-shadow: 0 26px 56px rgba(16, 42, 31, .15);
  isolation: isolate;
}
.chamber-stage::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  border: 1px solid rgba(217, 232, 141, .06);
  border-radius: 16px;
  content: '';
  pointer-events: none;
}
#chamber-canvas { position: absolute; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; touch-action: pan-y; cursor: grab; }
#chamber-canvas:focus-visible { outline: 2px solid var(--lime); outline-offset: -4px; }
.chamber-stage.is-dragging #chamber-canvas { cursor: grabbing; }
.stage-ribbon {
  position: absolute;
  z-index: 4;
  top: 15px;
  left: 17px;
  display: flex;
  align-items: center;
  gap: 11px;
  pointer-events: none;
}
.stage-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: #e4ecd4; border: 1px solid rgba(217, 232, 141, .18); border-radius: 4px; background: rgba(6, 25, 18, .72); backdrop-filter: blur(9px); font: 7px var(--mono); letter-spacing: .1em; }
.stage-live .live-dot { width: 5px; height: 5px; background: var(--lime); box-shadow: 0 0 0 3px rgba(217, 232, 141, .1); }
#stage-party-summary { color: #b8c7ae; font: 8px var(--mono); text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.stage-controls { position: absolute; z-index: 5; top: 13px; right: 13px; display: flex; gap: 5px; }
.stage-controls button {
  display: grid;
  min-width: 31px;
  height: 31px;
  place-items: center;
  padding: 0 8px;
  color: #dfe9d5;
  border: 1px solid rgba(226, 238, 208, .17);
  border-radius: 5px;
  background: rgba(6, 25, 18, .7);
  font: 8px var(--mono);
  letter-spacing: .04em;
  cursor: pointer;
  backdrop-filter: blur(9px);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.stage-controls button:hover { color: #fffef8; border-color: rgba(217, 232, 141, .44); background: rgba(15, 47, 35, .9); }
.stage-controls button.is-pressed { color: var(--green-deep); border-color: var(--lime); background: var(--lime); }
.stage-controls svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.chamber-labels { position: absolute; z-index: 4; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .18s ease; }
.chamber-labels.is-hidden { opacity: 0; visibility: hidden; }
.chamber-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 160px;
  min-height: 22px;
  padding: 4px 8px;
  color: #e9eedf;
  border: 1px solid rgba(231, 239, 218, .22);
  border-radius: 999px;
  background: rgba(5, 23, 16, .7);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
  font: 7.5px/1 var(--mono);
  letter-spacing: .06em;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  backdrop-filter: blur(6px);
}
.chamber-label::before { width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%; background: #c9a45c; content: ''; }
.chamber-label.is-fast::before { background: #e46c56; }
.chamber-label.is-hrpp::before { background: #70a4dd; }
.chamber-label.is-sup::before { background: #79b98a; }
.chamber-label.is-ind::before { background: #b9beb4; }
.chamber-label:hover, .chamber-label:focus-visible { border-color: rgba(217, 232, 141, .7); background: rgba(13, 43, 31, .93); transform: translate(-50%, calc(-50% - 1px)); }
.stage-footer {
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 19px 15px;
  background: linear-gradient(0deg, rgba(3, 16, 11, .9), rgba(3, 16, 11, 0));
  pointer-events: none;
}
.stage-footer p { max-width: 620px; margin: 0; color: #dfe8d4; font-size: 10px; line-height: 1.5; text-shadow: 0 1px 5px rgba(0, 0, 0, .5); }
.stage-hint { flex: 0 0 auto; color: #95ab91; font: 7px var(--mono); letter-spacing: .03em; }
.seat-tooltip {
  position: absolute;
  z-index: 8;
  max-width: 250px;
  padding: 8px 10px;
  color: #ecf1e4;
  border: 1px solid rgba(217, 232, 141, .3);
  border-radius: 5px;
  background: rgba(5, 23, 16, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  font-size: 10px;
  line-height: 1.45;
  pointer-events: none;
  transform: translate(12px, -50%);
}
.seat-tooltip strong { display: block; color: #f7f5e7; font-size: 10.5px; }
.seat-tooltip span { display: block; color: #aebda7; font: 8px var(--mono); line-height: 1.45; }
.seat-marker {
  position: absolute;
  z-index: 9;
  padding: 4px 7px;
  color: #24321f;
  border: 1px solid #fff8dc;
  border-radius: 3px;
  background: #f1d27d;
  box-shadow: 0 4px 10px rgba(18, 40, 31, .24);
  font: 700 7px var(--mono);
  letter-spacing: .03em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.seat-marker::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  border: 4px solid transparent;
  border-top-color: #f1d27d;
  transform: translateX(-50%);
}
.stage-loader {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #dce7d3;
  background: radial-gradient(circle at 50% 45%, #163c2d, #071b14 68%);
  font: 9px var(--mono);
  letter-spacing: .06em;
  transition: opacity .5s ease, visibility .5s ease;
}
.stage-loader.is-done { visibility: hidden; opacity: 0; }
.loader-mark { width: 18px; height: 18px; border: 1px solid rgba(217, 232, 141, .25); border-top-color: var(--lime); border-radius: 50%; animation: parliament-spin 1s linear infinite; }
@keyframes parliament-spin { to { transform: rotate(360deg); } }
.stage-fallback { position: absolute; z-index: 7; inset: 0; display: grid; align-content: center; justify-items: center; padding: 30px; color: #e5ecda; text-align: center; background: radial-gradient(circle at 50% 40%, #153b2d, #071b14 70%); }
.stage-fallback[hidden] { display: none; }
.stage-fallback-mark { display: grid; width: 47px; height: 47px; place-items: center; margin-bottom: 12px; color: var(--lime); border: 1px solid rgba(217, 232, 141, .35); border-radius: 50%; font: 9px var(--mono); }
.stage-fallback h3 { margin: 0; font-size: 19px; font-weight: 500; }
.stage-fallback p { max-width: 380px; margin: 8px 0 16px; color: #aebda7; font-size: 11px; line-height: 1.6; }
.stage-source-note { position: relative; display: block; margin: 11px 2px 0; padding-left: 22px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.stage-source-note > span { position: absolute; top: 1px; left: 0; display: grid; width: 14px; height: 14px; place-items: center; color: var(--green); border: 1px solid #cbd7c4; border-radius: 50%; font: 8px var(--mono); }
.stage-source-note a { color: var(--green); text-underline-offset: 2px; }

/* Balance / scenario sidebar ------------------------------------------- */
.balance-panel {
  position: sticky;
  top: 15px;
  padding: 19px 19px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 254, 248, .94);
  box-shadow: 0 14px 34px rgba(25, 61, 45, .06);
}
.balance-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.balance-head .eyebrow { margin-bottom: 4px; }
.balance-head h2 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.1; }
.balance-badge { flex: 0 0 auto; padding: 4px 8px; color: var(--green); border: 1px solid #cbd7c4; border-radius: 999px; background: #f0f5e9; font: 7px var(--mono); letter-spacing: .06em; }
.balance-badge.is-scenario { color: #8a4a1d; border-color: #e4d0bd; background: #f8eee3; }
.balance-sub { margin: 7px 0 12px; color: var(--muted); font: 8px var(--mono); }
.balance-sub span { color: var(--green-deep); font-weight: 500; }
.balance-list { display: grid; gap: 1px; border-top: 1px solid #ecece0; }
.balance-row { display: grid; grid-template-columns: 11px 43px minmax(0, 1fr) auto; align-items: center; gap: 7px; min-height: 36px; border-bottom: 1px solid #ecece0; }
.balance-row .balance-name { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.balance-row .balance-role { overflow: hidden; color: var(--muted); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.balance-row .balance-count { min-width: 24px; color: var(--green-deep); font: 500 18px var(--mono); text-align: right; }
.balance-row.is-sup { color: #7a8274; }
.balance-row[hidden] { display: none; }
.balance-row.is-sup .balance-count { color: #7e837a; }
.balance-row.is-vacant .balance-count { color: var(--amber); font-size: 14px; }
.balance-row.is-vacant .balance-name { color: var(--amber); }
.balance-row.is-flash { animation: balance-flash .65s ease; }
@keyframes balance-flash { 0%, 100% { background: transparent; } 25% { background: #f3f0de; } }
.majority-card { margin-top: 14px; padding: 11px 0 2px; border-top: 1px solid #e4e6d8; }
.majority-head { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font: 8px var(--mono); }
.majority-head strong { color: var(--green-deep); font: 600 24px var(--mono); line-height: 1; }
.majority-head span:last-child { margin-left: auto; }
.majority-bar { display: flex; gap: 2px; height: 17px; margin: 9px 0 6px; }
.majority-bar i { display: block; min-width: 1px; flex: 1 1 0; height: 100%; border-radius: 2px; background: #d9d9ca; transition: background .35s ease, opacity .35s ease; }
.majority-bar i.is-fast { background: #c94b36; }
.majority-bar i.is-hrpp { background: #2f64a0; }
.majority-bar i.is-sup { background: #3f7d50; }
.majority-bar i.is-ind { background: #7e837a; }
.majority-bar i.is-vacant { border: 1px dashed #b9b9aa; background: transparent; }
.majority-scale { position: relative; display: flex; justify-content: space-between; color: #8a8f83; font: 7px var(--mono); }
.majority-scale span:nth-child(2) { position: absolute; left: 51.92%; color: var(--amber); transform: translateX(-50%); white-space: nowrap; }
.majority-verdict { margin: 10px 0 0; padding: 8px 9px; color: #3d5a43; border-left: 2px solid var(--green); background: #f2f5e9; font-size: 10px; line-height: 1.5; }
.majority-verdict.is-warning { color: #7c4b24; border-left-color: var(--amber); background: #faf1e5; }
.scenario-panel { margin-top: 15px; padding-top: 14px; border-top: 1px solid #e4e6d8; }
.scenario-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.scenario-head .eyebrow { margin-bottom: 4px; color: var(--amber); }
.scenario-head h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.2; }
.scenario-step { flex: 0 0 auto; color: #9a8b72; font: 7px var(--mono); letter-spacing: .08em; }
.scenario-step.is-scenario { color: var(--amber); }
.scenario-copy { margin: 7px 0 10px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.scenario-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.scenario-presets button {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  color: #46523f;
  border: 1px solid #e0e3d5;
  border-radius: 5px;
  background: #f9faf2;
  font-size: 9px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.scenario-presets button:hover { color: var(--green-deep); border-color: #b8c7ad; background: #f0f5e9; }
.preset-arrow { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.preset-arrow i { display: block; width: 7px; height: 7px; border-radius: 50%; }
.preset-arrow i.is-vacant { border: 1px dashed #9a9b8e; background: transparent; }
.preset-arrow b { color: #9ca195; font-size: 9px; font-weight: 400; }
.scenario-form { display: grid; gap: 7px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e1e3d7; }
.scenario-field { display: grid; gap: 4px; }
.scenario-field > span { color: #7f8777; font: 7px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.scenario-field select {
  width: 100%;
  min-height: 33px;
  padding: 0 25px 0 8px;
  color: var(--ink);
  border: 1px solid #d6ddce;
  border-radius: 4px;
  background: #fffef8;
  font-size: 10px;
  cursor: pointer;
}
.scenario-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.scenario-pair [hidden] { display: none; }
.scenario-apply {
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  border: 1px solid var(--green-deep);
  border-radius: 4px;
  background: var(--green-deep);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.scenario-apply:hover { background: #24513a; transform: translateY(-1px); }
.scenario-apply:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.scenario-message { min-height: 14px; margin: 8px 0 0; color: #64705d; font-size: 9px; line-height: 1.5; }
.scenario-message.is-warning { color: #8a4a1d; }
.scenario-reset { width: 100%; min-height: 30px; margin-top: 6px; padding: 0; color: var(--green); border: 1px solid #d6ddce; border-radius: 4px; background: transparent; font: 8px var(--mono); cursor: pointer; }
.scenario-reset:hover:not(:disabled) { border-color: #a7b99f; background: #f0f5e9; }
.scenario-reset:disabled { color: #a8aa9f; border-color: #ebebe0; cursor: default; }

/* Flat plan ------------------------------------------------------------- */
.plan-section {
  display: grid;
  grid-template-columns: minmax(250px, .76fr) minmax(0, 1.24fr);
  align-items: center;
  gap: clamp(28px, 5vw, 75px);
  margin-top: 44px;
  padding: 43px 0 47px;
  border-top: 1px solid var(--line);
}
.plan-copy { max-width: 420px; }
.plan-copy p { margin: 13px 0 0; color: #586256; font-size: 12px; line-height: 1.65; }
.plan-key { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 17px; }
.plan-key-item { display: inline-flex; align-items: center; gap: 6px; color: #596556; font: 8px var(--mono); }
.plan-key-swatch { display: grid; width: 15px; height: 15px; place-items: center; border: 1px solid rgba(25, 61, 45, .1); border-radius: 50%; background: var(--swatch, #7e837a); }
.plan-key-swatch.is-vacant { border: 1px dashed #9a9b8e; background: transparent; }
.plan-key-swatch.is-speaker { border: 2px solid #c9a45c; background: #c94b36; }
.plan-note { padding-top: 11px; border-top: 1px solid #e5e7d9; color: var(--muted) !important; font-size: 9.5px !important; }
.plan-figure { min-width: 0; margin: 0; }
.plan-paper {
  overflow: hidden;
  padding: 12px 12px 8px;
  border: 1px solid #dcddcd;
  border-radius: 10px;
  background-color: #fffdf4;
  background-image: linear-gradient(rgba(25, 61, 45, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(25, 61, 45, .04) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: 0 16px 32px rgba(31, 48, 28, .07);
}
.plan-noscript { margin: 0; padding: 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }
#chamber-plan { display: block; width: 100%; height: auto; overflow: visible; }
.plan-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.plan-fig-note { font: 8px var(--mono); }
.plan-ring { fill: none; stroke: #dfe1d3; stroke-width: 1; stroke-dasharray: 2 5; }
.plan-seat { stroke: #fffdf4; stroke-width: 1.6; transition: fill .35s ease, opacity .35s ease; }
.plan-seat.is-fast { fill: #c94b36; }
.plan-seat.is-hrpp { fill: #2f64a0; }
.plan-seat.is-sup { fill: #3f7d50; }
.plan-seat.is-ind { fill: #7e837a; }
.plan-seat.is-vacant { fill: none; stroke: #a4a495; stroke-width: 1.2; stroke-dasharray: 2 2; }
.plan-seat.is-speaker { fill: #c94b36; stroke: #c9a45c; stroke-width: 3; }
.plan-table { fill: #bf9760; opacity: .72; }
.plan-table-line { fill: none; stroke: #f2ead9; stroke-width: 1; opacity: .8; }
.plan-dais { fill: #e3d4b7; stroke: #c9a45c; stroke-width: 1; }
.plan-label { fill: #7a8273; font-family: 'DM Mono', Consolas, monospace; font-size: 10.5px; letter-spacing: .04em; }
.plan-label.is-strong { fill: #3f5b43; font-size: 11px; }
.plan-label.is-government { fill: #a53b2b; }
.plan-label.is-opposition { fill: #2f64a0; }
.plan-label.is-crossbench { fill: #697066; }
.plan-speaker-label { fill: #6b5a2e; font-family: 'DM Mono', Consolas, monospace; font-size: 10px; letter-spacing: .05em; }

/* Explainer ------------------------------------------------------------- */
.parliament-explainer {
  display: grid;
  grid-template-columns: minmax(230px, .6fr) minmax(0, 1.4fr);
  gap: clamp(26px, 5vw, 70px);
  padding: 38px 0 42px;
  border-top: 1px solid var(--line);
}
.explainer-intro p:last-child { max-width: 310px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.explainer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.explainer-card { position: relative; padding: 17px 17px 15px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 254, 248, .76); }
.explainer-card::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--green), transparent 80%); content: ''; }
.explainer-num { color: var(--amber); font: 8px var(--mono); }
.explainer-card h3 { margin: 8px 0 5px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.explainer-card p { margin: 0; color: #667160; font-size: 10.5px; line-height: 1.65; }

/* Record + history ------------------------------------------------------ */
.parliament-record {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 75px);
  padding: 43px 0 44px;
  border-top: 1px solid var(--line);
}
.record-copy p { max-width: 470px; margin: 13px 0 0; color: #586256; font-size: 12px; line-height: 1.7; }
.text-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 15px; color: var(--green); font-size: 10px; font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.record-table-wrap { min-width: 0; }
.record-table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); background: rgba(255, 254, 248, .7); }
.record-table caption { padding: 0 0 8px; color: var(--muted); font: 8px var(--mono); text-align: left; }
.record-table th, .record-table td { padding: 10px 12px; border-bottom: 1px solid #e8e9dc; font-size: 11px; text-align: left; }
.record-table thead th { color: #7f8777; background: #f0f2e6; font: 7px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.record-table thead th.is-number, .record-table td.is-number { text-align: right; }
.record-table tbody th { font-weight: 500; }
.record-table tbody tr:last-child th, .record-table tbody tr:last-child td { border-bottom: 0; }
.record-table tfoot th, .record-table tfoot td { border-top: 1px solid #d8ddcf; border-bottom: 0; color: var(--green-deep); background: #f6f8ee; font-weight: 600; }
.record-table tfoot td.is-number, .record-table tbody td.is-number { font-family: var(--mono); }
.table-party { display: inline-flex; align-items: center; gap: 7px; }
.record-source { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.parliament-history { padding: 35px 0 39px; border-top: 1px solid var(--line); }
.history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.history-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 22px 0 0; padding: 0; list-style: none; }
.history-list li { position: relative; padding: 16px 17px 0; border-top: 1px solid #d5ddcc; }
.history-list li::before { position: absolute; top: -4px; left: 17px; width: 7px; height: 7px; border: 2px solid var(--paper); border-radius: 50%; background: var(--green); content: ''; }
.history-list li:last-child::before { background: var(--amber); }
.history-list time { color: var(--green); font: 8px var(--mono); letter-spacing: .04em; }
.history-list p { margin: 7px 0 0; color: #626e5c; font-size: 10px; line-height: 1.6; }

/* FAQ + sources --------------------------------------------------------- */
.parliament-faq {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  gap: clamp(25px, 5vw, 70px);
  padding: 38px 0 39px;
  border-top: 1px solid var(--line);
}
.faq-list { display: grid; gap: 6px; }
.faq-list details { border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 254, 248, .72); }
.faq-list summary { position: relative; padding: 11px 38px 11px 13px; font-size: 11.5px; font-weight: 600; line-height: 1.4; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { position: absolute; top: 50%; right: 13px; color: var(--green); font: 14px var(--mono); content: '+'; transform: translateY(-50%); }
.faq-list details[open] summary::after { content: '−'; }
.faq-list summary:hover { color: var(--green-deep); }
.faq-list details p { margin: 0; padding: 0 13px 12px; color: #667160; font-size: 10.5px; line-height: 1.65; }
.faq-list details p strong { color: var(--green-deep); }
.parliament-sources { margin: 12px 0 0; padding: 29px 28px 27px; border: 1px solid #d6ddce; border-radius: 10px; background: #edf2e3; }
.sources-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.sources-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 30px; margin-top: 15px; }
.sources-grid p { margin: 0 0 9px; color: #566452; font-size: 10.5px; line-height: 1.65; }
.sources-grid code { padding: 1px 4px; color: var(--green-deep); border: 1px solid #cbd7c4; border-radius: 3px; background: #f7f9f0; font: 9px var(--mono); }
.source-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 8px 0 7px; border-top: 1px solid #d6dfca; }
.source-list li:first-child { padding-top: 0; border-top: 0; }
.source-list a { display: block; color: var(--green-deep); font-size: 10px; font-weight: 600; text-underline-offset: 2px; }
.source-list span { display: block; margin-top: 2px; color: #788472; font-size: 9px; line-height: 1.5; }

/* Dark mode ------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  .parliament-shell { background: radial-gradient(ellipse at 88% 3%, rgba(201, 75, 54, .08), transparent 28%), #111710; }
  .parliament-nav a { color: #b9d1ac; }
  .parliament-nav a[aria-current="page"] { color: #e2e8d6; }
  .parliament-deck, .plan-copy p, .record-copy p, .explainer-card p, .faq-list details p, .history-list p { color: #a9b4a0; }
  .parliament-button.is-quiet { color: #cfe3bd; border-color: #33402c; background: #1a2316; }
  .parliament-button.is-quiet:hover { border-color: #465840; background: #26331f; }
  .parliament-snapshot { background: radial-gradient(circle at 100% 0%, rgba(217, 232, 141, .1), transparent 37%), #0d2c21; }
  .parliament-updated { color: #9aa590; }
  .parliament-updated a, .stage-source-note a, .text-link { color: #b9d1ac; }
  .section-sub, .stage-source-note { color: #9aa590; }
  .view-switch { border-color: #33402c; background: #1f281b; }
  .view-switch button { color: #9aa590; }
  .view-switch button:hover { color: #cfe3bd; background: #26331f; }
  .view-switch button.is-active { color: #12170f; background: #b9d1ac; }
  .balance-panel { border-color: #2c3627; background: #1a2217; }
  .balance-badge { color: #b9d1ac; border-color: #3a4a32; background: #1f281b; }
  .balance-badge.is-scenario { color: #e0b49e; border-color: #5d3a2a; background: #2a1c14; }
  .balance-sub span { color: #cfe3bd; }
  .balance-list, .balance-row { border-color: #2a3425; }
  .balance-row .balance-role { color: #8f9a85; }
  .balance-row .balance-count { color: #cfe3bd; }
  .majority-card, .scenario-panel { border-color: #2a3425; }
  .majority-head strong { color: #cfe3bd; }
  .majority-bar i { background: #35402f; }
  .majority-bar i.is-vacant { border-color: #5a6352; background: transparent; }
  .majority-scale { color: #8f9a85; }
  .majority-verdict { color: #c2ccb6; background: #202a1b; border-left-color: #76916a; }
  .majority-verdict.is-warning { color: #e0b49e; background: #2a1c14; border-left-color: #b96632; }
  .scenario-copy, .scenario-message { color: #99a38e; }
  .scenario-head h3 { color: #e2e8d6; }
  .scenario-presets button { color: #c2ccb6; border-color: #33402c; background: #1f281b; }
  .scenario-presets button:hover { color: #f2f4e8; border-color: #465840; background: #26331f; }
  .scenario-form { border-top-color: #2a3425; }
  .scenario-field > span { color: #8f9a85; }
  .scenario-field select { color: #dbe2d0; border-color: #33402c; background: #1f281b; }
  .scenario-reset { color: #b9d1ac; border-color: #33402c; }
  .scenario-reset:hover:not(:disabled) { border-color: #465840; background: #26331f; }
  .scenario-reset:disabled { color: #5f6a57; border-color: #293126; }
  .plan-section, .parliament-explainer, .parliament-record, .parliament-history, .parliament-faq { border-top-color: #2c3627; }
  .parliament-section-head h2, .plan-copy h2, .explainer-intro h2, .record-copy h2, .history-head h2, .faq-head h2, .sources-head h2 { color: #e2e8d6; }
  .plan-note { border-top-color: #2a3425; color: #9aa590 !important; }
  .plan-paper { border-color: #3a4a32; background-color: #162013; box-shadow: 0 16px 32px rgba(0, 0, 0, .22); }
  .plan-ring { stroke: #33402c; }
  .plan-seat { stroke: #162013; }
  .plan-seat.is-vacant { stroke: #7f8a74; }
  .plan-label { fill: #9aa590; }
  .plan-label.is-strong { fill: #cfe3bd; }
  .plan-label.is-government { fill: #e08b77; }
  .plan-label.is-opposition { fill: #8db7e3; }
  .plan-label.is-crossbench { fill: #a8b1a0; }
  .plan-speaker-label { fill: #d8b57f; }
  .plan-dais { fill: #4c4228; stroke: #927841; }
  .plan-table { fill: #6c5331; opacity: .85; }
  .explainer-card, .faq-list details { border-color: #2c3627; background: #1a2217; }
  .explainer-card h3, .faq-list summary { color: #e2e8d6; }
  .record-table { border-color: #2c3627; background: #1a2217; }
  .record-table th, .record-table td { border-color: #293227; }
  .record-table thead th { color: #9aa590; background: #202a1b; }
  .record-table tfoot th, .record-table tfoot td { border-color: #3a4a32; background: #202a1b; color: #cfe3bd; }
  .record-source, .faq-list summary:hover { color: #9aa590; }
  .history-list li { border-top-color: #3a4a32; }
  .history-list li::before { border-color: #111710; }
  .parliament-sources { border-color: #33402c; background: #1a2217; }
  .sources-grid p { color: #a9b4a0; }
  .sources-grid code { color: #cfe3bd; border-color: #3a4a32; background: #202a1b; }
  .source-list li { border-top-color: #2c3627; }
  .source-list a { color: #b9d1ac; }
  .source-list span { color: #8f9a85; }
}

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .parliament-hero { grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }
  .chamber-workbench { grid-template-columns: minmax(0, 1fr) 344px; }
}
@media (max-width: 1060px) {
  .parliament-hero { grid-template-columns: minmax(0, 1fr) 315px; gap: 30px; }
  .parliament-hero h1 { font-size: clamp(43px, 6vw, 62px); }
  .chamber-workbench { grid-template-columns: 1fr; }
  .balance-panel { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 24px; }
  .balance-head, .balance-sub, .balance-list, .majority-card { grid-column: 1; }
  .scenario-panel { grid-column: 2; grid-row: 1 / span 5; margin-top: 0; padding-top: 0; border-top: 0; padding-left: 24px; border-left: 1px solid #e4e6d8; }
  .chamber-stage { height: min(67vw, 690px); min-height: 520px; }
}
@media (max-width: 850px) {
  .parliament-hero { grid-template-columns: 1fr; align-items: start; padding: 39px 0 29px; }
  .parliament-snapshot { width: min(100%, 430px); }
  .parliament-section-head { align-items: flex-start; flex-direction: column; gap: 13px; }
  .view-switch { align-self: flex-start; }
  .chamber-stage { height: 575px; min-height: 0; }
  .parliament-section-head h2, .plan-copy h2, .explainer-intro h2, .record-copy h2, .history-head h2, .faq-head h2, .sources-head h2 { font-size: 27px; }
  .plan-section { grid-template-columns: 1fr; gap: 22px; padding-top: 31px; }
  .plan-copy { max-width: 560px; }
  .parliament-explainer { grid-template-columns: 1fr; gap: 22px; }
  .explainer-intro p:last-child { max-width: 560px; }
  .parliament-record { grid-template-columns: 1fr; gap: 22px; }
  .record-copy p { max-width: 600px; }
  .history-list { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .parliament-faq { grid-template-columns: 1fr; gap: 18px; }
  .sources-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 760px) {
  .balance-panel { display: block; }
  .scenario-panel { margin-top: 15px; padding-top: 14px; padding-left: 0; border-top: 1px solid #e4e6d8; border-left: 0; }
}
@media (max-width: 620px) {
  .parliament-topbar { min-height: 67px; }
  .parliament-nav { gap: 5px 13px; }
  .parliament-nav a { font-size: 8px; }
  .parliament-nav a:nth-child(3) { display: none; }
  .parliament-nav .island-label { font-size: 8px; }
  .parliament-hero { padding-top: 29px; }
  .parliament-hero h1 { font-size: 45px; }
  .parliament-deck { margin-top: 16px; font-size: 13px; line-height: 1.65; }
  .parliament-hero-actions { align-items: stretch; flex-direction: column; margin-top: 19px; }
  .parliament-button { justify-content: space-between; }
  .parliament-snapshot { width: 100%; padding: 18px 18px 16px; }
  .snapshot-total strong { font-size: 57px; }
  .parliament-chamber { padding-top: 28px; }
  .parliament-section-head { margin-bottom: 12px; }
  .parliament-section-head h2, .plan-copy h2, .explainer-intro h2, .record-copy h2, .history-head h2, .faq-head h2, .sources-head h2 { font-size: 25px; }
  .section-sub { font-size: 10px; }
  .view-switch { width: 100%; }
  .view-switch button { flex: 1; }
  .chamber-stage { height: 440px; border-radius: 12px; }
  .stage-ribbon { top: 11px; left: 11px; gap: 6px; }
  .stage-live { padding: 5px 7px; font-size: 6px; }
  #stage-party-summary { font-size: 6px; }
  .stage-controls { top: 9px; right: 9px; gap: 3px; }
  .stage-controls button { min-width: 27px; height: 27px; padding: 0 6px; font-size: 7px; }
  .stage-controls button:nth-child(1), .stage-controls button:nth-child(2) { display: none; }
  .stage-footer { padding: 34px 12px 10px; }
  .stage-footer p { max-width: 260px; font-size: 9px; }
  .stage-hint { display: none; }
  .chamber-label { max-width: 120px; padding: 3px 6px; font-size: 6.5px; }
  .stage-source-note { font-size: 8px; }
  .balance-panel { padding: 16px 15px 14px; border-radius: 10px; }
  .scenario-presets { grid-template-columns: 1fr; }
  .scenario-presets button { min-height: 34px; }
  .plan-section { margin-top: 31px; padding: 26px 0 31px; }
  .plan-paper { padding: 6px 6px 3px; }
  .plan-figure figcaption { flex-direction: column; gap: 3px; }
  .plan-label, .plan-speaker-label { font-size: 16px; }
  .plan-label.is-strong { font-size: 17px; }
  .explainer-grid { grid-template-columns: 1fr; }
  .parliament-record, .parliament-faq { padding-top: 31px; padding-bottom: 32px; }
  .record-table th, .record-table td { padding: 8px 9px; font-size: 10px; }
  .history-list { grid-template-columns: 1fr; row-gap: 16px; }
  .history-list li { padding-top: 13px; }
  .history-list p { font-size: 9.5px; }
  .parliament-sources { padding: 22px 17px 21px; }
  .sources-head { display: block; }
  .sources-grid p { font-size: 10px; }
  .app-footer { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .parliament-button, .chamber-label, .stage-controls button, .scenario-presets button, .majority-bar i { transition: none !important; }
  .loader-mark { animation: none !important; }
}
@media (max-width: 360px) {
  #stage-party-summary { display: none; }
  .chamber-stage { height: 410px; }
}

/* Reference-aligned circular chamber ------------------------------------ */
.chamber-stage {
  background:
    linear-gradient(180deg, #e9ede8 0%, #d4e4e8 44%, #e8dfcf 100%);
  border-color: #b9c9c7;
}
.chamber-stage::after { border-color: rgba(25, 61, 45, .08); }
.chamber-labels { overflow: visible; }
.chamber-pin {
  position: absolute;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: #fffef8;
  border: 2px solid #fffef8;
  box-shadow: 0 0 0 1px rgba(25, 61, 45, .42), 0 5px 12px rgba(18, 40, 31, .2);
  font: 700 9px var(--mono);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
  backdrop-filter: blur(5px);
}
.chamber-pin[data-label="speaker"] { color: #1d2b23; background: #ffffff; }
.chamber-pin[data-label="clerk"] { color: #fff; background: #d1232a; border-color: #fff; }
.chamber-pin[data-label="deputy-clerk"] { color: #3d3300; background: #cbc009; border-color: #fff; }
.chamber-pin[data-label="table"] { color: #fff; background: #0d4d9e; border-color: #fff; }
.chamber-pin[data-label="pm"] { color: #fff; background: #40ae49; border-color: #fff; }
.chamber-pin[data-label="deputy-pm"] { color: #5f2c13; background: #ffa86f; border-color: #fff; }
.chamber-pin[data-label="deputy-speaker"] { color: #4b432d; background: #ddd6be; border-color: #fff; }
.chamber-pin[data-label="cabinet"] { color: #fff; background: #02afef; border-color: #fff; }
.chamber-pin[data-label="associate"] { color: #214e3b; background: #96ceb4; border-color: #fff; }
.chamber-pin[data-label="opposition"] { color: #5e4c12; background: #ffeead; border-color: #fff; }
.chamber-pin[data-label="gallery-left"],
.chamber-pin[data-label="gallery-right"] { color: #fff; background: #4f372d; border-color: #fff; }
.chamber-pin[data-label="sergeant"] { color: #1b4a54; background: #6dc4d5; border-color: #fff; }
.chamber-pin[data-label="salelesi"] { color: #fff; background: #221f1f; border-color: #fff; }
.chamber-pin:hover, .chamber-pin:focus-visible {
  color: #fffef8;
  border-color: var(--green-deep);
  background: var(--green-deep);
  outline: 2px solid rgba(255, 254, 248, .9);
  outline-offset: 2px;
}
.chamber-pin[data-label="speaker"],
.chamber-pin[data-label="table"] { border-color: #b48b45; color: #6b4d18; }
.chamber-pin[data-label="pm"],
.chamber-pin[data-label="associate"] { border-color: #3f7d50; color: #285536; }
.chamber-pin[data-label="opposition"] { border-color: #2f64a0; color: #1f4a7d; }
.chamber-pin[data-label="clerk"] { border-color: #c94b36; color: #9e3528; }
.chamber-pin[data-label="deputy-clerk"] { border-color: #c7a631; color: #7a631d; }
.chamber-pin[data-label="cabinet"] { border-color: #18a9ce; color: #14718c; }
.chamber-pin[data-label="associate"] { border-color: #69ab8f; color: #356d56; }
.chamber-pin[data-label="deputy-pm"] { border-color: #df844d; color: #8a4a1d; }
.chamber-pin[data-label="deputy-speaker"] { border-color: #b9a86f; color: #6b5a2e; }
.chamber-pin[data-label="sergeant"] { border-color: #6dc4d5; color: #317785; }
.chamber-pin[data-label="salelesi"] { border-color: #494844; color: #252522; }
.chamber-pin[data-label="gallery-left"],
.chamber-pin[data-label="gallery-right"] { border-color: #7b5c3c; color: #614326; }
.chamber-zone-tag {
  position: absolute;
  padding: 4px 8px;
  color: #5f6762;
  border: 1px solid rgba(95, 103, 98, .35);
  border-radius: 999px;
  background: rgba(255, 252, 242, .9);
  box-shadow: 0 3px 8px rgba(18, 40, 31, .1);
  font: 7px var(--mono);
  letter-spacing: .06em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(5px);
}
.chamber-key {
  margin-top: 12px;
  border: 1px solid #d8dfd1;
  border-radius: 8px;
  background: rgba(255, 254, 248, .82);
}
.chamber-key summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  color: var(--green-deep);
  font: 8px var(--mono);
  letter-spacing: .05em;
  cursor: pointer;
  list-style: none;
}
.chamber-key summary::-webkit-details-marker { display: none; }
.chamber-key summary::after { content: '+'; color: var(--green); font-size: 13px; }
.chamber-key[open] summary::after { content: '−'; }
.chamber-key summary span:last-child { margin-left: auto; color: var(--muted); }
.chamber-key ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0 8px 8px;
  list-style: none;
}
.chamber-key li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 6px;
  color: #5f6b59;
  border-top: 1px solid #eef0e5;
  font-size: 9px;
  line-height: 1.3;
}
.chamber-key li b {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: var(--green-deep);
  border: 1px solid #cbd7c4;
  border-radius: 50%;
  background: #f6f8ef;
  font: 9px var(--mono);
}
.chamber-key li:nth-child(1) b { color: #1d2b23; background: #fff; }
.chamber-key li:nth-child(2) b { color: #fff; background: #d1232a; }
.chamber-key li:nth-child(3) b { color: #3d3300; background: #cbc009; }
.chamber-key li:nth-child(4) b { color: #fff; background: #0d4d9e; }
.chamber-key li:nth-child(5) b { color: #fff; background: #40ae49; }
.chamber-key li:nth-child(6) b { color: #5f2c13; background: #ffa86f; }
.chamber-key li:nth-child(7) b { color: #4b432d; background: #ddd6be; }
.chamber-key li:nth-child(8) b { color: #fff; background: #02afef; }
.chamber-key li:nth-child(9) b { color: #214e3b; background: #96ceb4; }
.chamber-key li:nth-child(10) b { color: #5e4c12; background: #ffeead; }
.chamber-key li:nth-child(11) b { color: #fff; background: #4f372d; }
.chamber-key li:nth-child(12) b { color: #1b4a54; background: #6dc4d5; }
.chamber-key li:nth-child(13) b { color: #fff; background: #221f1f; }
.people-roster {
  margin-top: 12px;
  border: 1px solid #d8dfd1;
  border-radius: 8px;
  background: rgba(255, 254, 248, .82);
}
.people-roster summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  color: var(--green-deep);
  font: 8px var(--mono);
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.people-roster summary::-webkit-details-marker { display: none; }
.people-roster summary::after { content: '+'; color: var(--green); font-size: 13px; }
.people-roster[open] summary::after { content: '−'; }
.people-roster summary span:last-child { margin-left: auto; color: var(--muted); }
.people-intro { margin: 0; padding: 0 13px 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.people-group { padding: 0 9px 9px; }
.people-group h3 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 4px 5px;
  color: var(--green-deep);
  font: 8px var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.people-group h3 span { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.person-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 7px;
  padding: 7px;
  color: #33483c;
  border: 1px solid #e2e7db;
  border-radius: 5px;
  background: rgba(255, 255, 251, .7);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.person-card:hover, .person-card:focus-visible {
  border-color: #b9cbb2;
  background: #fffef8;
  transform: translateY(-1px);
  outline: none;
}
.person-card.is-selected { border-color: var(--green); background: #f5f9ed; }
.person-badge {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #02afef;
  box-shadow: 0 0 0 1px rgba(25, 61, 45, .25);
  font: 700 7px var(--mono);
}
.person-card[data-badge="PM"] .person-badge { background: #40ae49; }
.person-card[data-badge="DPM"] .person-badge { background: #ffa86f; color: #5f2c13; }
.person-card[data-badge="OPP"] .person-badge { background: #2f64a0; }
.person-card[data-badge="SPK"] .person-badge { background: #f2ead7; color: #5e4c12; }
.person-card[data-badge="DSP"] .person-badge { background: #ddd6be; color: #4b432d; }
.person-copy { display: grid; min-width: 0; gap: 1px; }
.person-copy strong { overflow: hidden; color: #24382b; font-size: 10px; font-weight: 600; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.person-copy small { display: -webkit-box; overflow: hidden; color: #65735f; font: 8px var(--mono); line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.person-copy em { color: #8a927f; font: 7px var(--mono); font-style: normal; line-height: 1.25; }
.people-note { margin: 0; padding: 0 13px 12px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.people-note a { color: var(--green); }
.stage-source-note { margin-top: 9px; }

/* Flat plan: the same ring in two dimensions. */
.plan-room-outline { fill: #f7f1e3; stroke: #c9bda6; stroke-width: 1.5; }
.plan-floor { fill: #d7e3e5; }
.plan-carpet { fill: #153f58; stroke: #0e3045; stroke-width: 1.2; }
.plan-carpet-inlay { fill: none; stroke: #8d7b55; stroke-width: 1.1; opacity: .45; }
.plan-platform { fill: #e7decb; stroke: #d3c5ad; stroke-width: .8; }
.plan-bench { fill: #c99f6e; stroke: #ad8252; stroke-width: .8; opacity: .92; }
.plan-parapet { fill: #f5edde; stroke: #c9bda6; stroke-width: .9; }
.plan-gallery { fill: #d7c7ac; stroke: #b8a588; stroke-width: 1; }
.plan-gallery-seat { fill: #7b817e; }
.plan-entrance-num { fill: #6d716b; font: 8px var(--mono); letter-spacing: .04em; }
.plan-gallery-label { fill: #705c3f; font-size: 8px; }
.plan-step { fill: #caa474; stroke: #ae8556; stroke-width: .8; }
.plan-entrance-chair { fill: #7b817e; stroke: #fffdf4; stroke-width: 1.3; }
.plan-pm-seat { fill: #40ae49; stroke: #fffdf4; stroke-width: 1.5; }
.plan-pm-label { fill: #fff; font: 700 6px var(--mono); letter-spacing: .02em; }
.plan-pm-callout { fill: #2e6b43; font: 700 9px var(--mono); letter-spacing: .03em; paint-order: stroke; stroke: #fffdf4; stroke-width: 2.5px; }
.plan-speaker-chair { fill: #c94b36; stroke: #c9a45c; stroke-width: 2.5; }
.plan-back-label { fill: #8a795c; font-size: 8px; }
.plan-table { fill: #bf9760; opacity: .9; }
.plan-dais { fill: #e3d4b7; stroke: #c9a45c; stroke-width: 1; }
.plan-figure figcaption { margin-top: 9px; }

@media (max-width: 850px) {
  .chamber-key ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .people-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .chamber-pin { width: 21px; height: 21px; font-size: 8px; }
  .chamber-key ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chamber-key summary { padding: 8px 11px; }
  .chamber-key li { padding: 5px 4px; font-size: 8.5px; }
  .people-grid { grid-template-columns: 1fr; }
  .person-copy strong, .person-copy small { white-space: normal; }
  .plan-section { padding-bottom: 26px; }
  .plan-label, .plan-speaker-label { font-size: 15px; }
  .plan-gallery-label { font-size: 11px; }
  .plan-back-label { font-size: 10px; }
}

.chamber-pin.is-selected {
  z-index: 6;
  box-shadow: 0 0 0 3px #f1d27d, 0 0 18px rgba(241, 210, 125, .75);
  transform: translate(-50%, -50%) scale(1.16);
}
