:root {
  --ink: #07131d;
  --ink-2: #0a1a27;
  --ink-3: #0e2232;
  --panel: #0b1b28;
  --panel-hover: #102638;
  --paper: #f0e9d6;
  --paper-soft: #d7cfba;
  --muted: #9ea9ae;
  --dim: #72818a;
  --gold: #c7a15c;
  --gold-bright: #e0bf78;
  --gold-soft: rgba(199,161,92,.12);
  --crimson: #9f3d43;
  --crimson-soft: rgba(159,61,67,.13);
  --line: rgba(226,216,188,.13);
  --line-strong: rgba(226,216,188,.25);
  --shadow: 0 28px 80px rgba(0,0,0,.28);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); scroll-padding-top: 88px; }
body {
  margin: 0;
  min-width: 280px;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 1000; border: 1px solid var(--gold); background: var(--paper); color: var(--ink); padding: .8rem 1rem; font-weight: 800; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hero {
  position: relative;
  min-height: 780px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 76% 39%, rgba(199,161,92,.085), transparent 29%),
    linear-gradient(180deg, #0a1b29 0%, #07131d 78%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: linear-gradient(rgba(226,216,188,.11) 1px, transparent 1px), linear-gradient(90deg, rgba(226,216,188,.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 610px;
  height: 610px;
  right: -230px;
  top: 92px;
  border: 1px solid rgba(199,161,92,.15);
  border-radius: 50%;
  box-shadow: inset 0 0 0 54px rgba(199,161,92,.018), inset 0 0 0 55px rgba(199,161,92,.08);
  pointer-events: none;
}
.hero-rule { position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--crimson) 0 22%, var(--gold) 22% 78%, var(--crimson) 78%); }

.topbar, .hero-layout, .stats, .archive, .methodology, footer { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.topbar { height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; z-index: 3; border-bottom: 1px solid var(--line); }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; min-width: 0; }
.brand-copy { min-width: 0; }
.brand strong, .footer-brand strong { display: block; font: 600 1rem/1.1 var(--serif); letter-spacing: .025em; }
.brand small, .footer-brand small { display: block; margin-top: 4px; color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.topnav-links { display: flex; align-items: center; gap: 26px; }
.topnav-links a { color: var(--muted); text-decoration: none; font-size: .76rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.topnav-links a:hover, .topnav-links a:focus-visible { color: var(--paper); }

.republic-seal { position: relative; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-bright); background: radial-gradient(circle, rgba(199,161,92,.08) 0 38%, transparent 39%), var(--ink-2); box-shadow: inset 0 0 0 4px var(--ink-2), inset 0 0 0 5px rgba(199,161,92,.45); }
.republic-seal::before, .republic-seal::after { content: "✦"; position: absolute; color: var(--gold); font-size: .45em; line-height: 1; }
.republic-seal::before { left: 11%; }
.republic-seal::after { right: 11%; }
.republic-seal > span { font-family: var(--serif); font-weight: 700; }
.seal-small { width: 44px; height: 44px; font-size: 1.15rem; }
.seal-large { width: 220px; height: 220px; font-size: 5rem; box-shadow: inset 0 0 0 10px var(--ink-2), inset 0 0 0 11px rgba(199,161,92,.65), 0 24px 70px rgba(0,0,0,.25); }
.seal-large::before, .seal-large::after { font-size: .7rem; }

.hero-layout { position: relative; z-index: 2; min-height: 536px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 80px; align-items: center; padding: 55px 0 72px; }
.hero-copy { min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--gold-bright); font-size: .66rem; font-weight: 850; letter-spacing: .19em; text-transform: uppercase; }
.eyebrow > span { width: 30px; height: 1px; background: var(--gold); }
.eyebrow.simple { display: block; margin-bottom: 16px; }
h1, h2, h3, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 820px; font: 500 clamp(3.55rem, 7.2vw, 6.8rem)/.91 var(--serif); letter-spacing: -.052em; }
h1 em, h2 em { color: var(--gold-bright); font-weight: inherit; }
.hero-lede { max-width: 660px; margin: 30px 0 0; color: #b8c1c1; font-size: clamp(.98rem, 1.5vw, 1.1rem); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 5px; padding: 0 19px; text-decoration: none; font-size: .82rem; font-weight: 800; letter-spacing: .035em; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.button.primary { border-color: var(--gold); background: var(--gold); color: #111820; }
.button.primary:hover { background: var(--gold-bright); }
.button.secondary { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: var(--paper); }
.button.secondary:hover { border-color: rgba(224,191,120,.5); }
.hero-seal-wrap { display: grid; justify-items: center; align-content: center; min-height: 300px; border-left: 1px solid var(--line); }
.hero-seal-wrap p { margin: 25px 0 3px; color: var(--dim); font-size: .6rem; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.hero-seal-wrap > strong { color: var(--paper-soft); font: 500 .85rem var(--serif); letter-spacing: .16em; }

.stats { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--line-strong); }
.stats article { position: relative; min-height: 124px; padding: 25px 26px 27px; border-right: 1px solid var(--line); }
.stats article:first-child { border-left: 1px solid var(--line); }
.stats article > span { position: absolute; right: 17px; top: 15px; color: var(--dim); font: 650 .55rem var(--mono); }
.stats strong { display: block; color: var(--paper); font: 500 clamp(1.8rem, 3vw, 2.45rem)/1 var(--serif); }
.stats small { display: block; margin-top: 10px; color: var(--muted); font-size: .63rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.archive { padding: 104px 0 118px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, 450px); gap: 70px; align-items: end; margin-bottom: 43px; }
.section-heading h2, .methodology h2 { margin: 0; font: 500 clamp(2.6rem, 5vw, 4.45rem)/.98 var(--serif); letter-spacing: -.04em; }
.record-note { position: relative; margin-bottom: 4px; padding: 3px 0 3px 21px; border-left: 2px solid var(--crimson); }
.record-note strong { display: block; color: var(--paper-soft); font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; }
.record-note p { margin: 8px 0 0; color: var(--muted); font-size: .86rem; line-height: 1.66; }

.controls-shell { position: sticky; top: 0; z-index: 20; margin-inline: -1px; padding: 10px 0; background: linear-gradient(to bottom, rgba(7,19,29,.97) 72%, rgba(7,19,29,0)); backdrop-filter: blur(12px); }
.controls { display: grid; grid-template-columns: minmax(280px,1fr) 145px 180px 48px; gap: 9px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(10,26,39,.94); box-shadow: 0 16px 50px rgba(0,0,0,.19); }
.search-control, .select-control, .icon-button { border: 1px solid var(--line); border-radius: 4px; background: #071620; }
.search-control { min-width: 0; height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 13px; }
.search-control:focus-within, .select-control:focus-within { border-color: rgba(224,191,120,.52); }
.search-control svg, .icon-button svg, .dialog-close svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-control svg { color: var(--dim); }
.search-control input { min-width: 0; flex: 1; border: 0; outline: 0 !important; background: transparent; color: var(--paper); font-size: 16px; }
.search-control input::placeholder { color: #6f7e84; }
kbd { border: 1px solid var(--line); border-bottom-color: var(--line-strong); border-radius: 3px; padding: 2px 6px; color: var(--dim); font: 10px var(--mono); }
.select-control { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 10px; }
.select-control > span { flex: 0 0 auto; color: var(--dim); font-size: .57rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.select-control select { min-width: 0; flex: 1; border: 0; outline: 0 !important; background: transparent; color: var(--paper); cursor: pointer; font-size: .78rem; }
.select-control option { background: var(--ink-2); color: var(--paper); }
.icon-button { width: 48px; height: 48px; display: grid; place-items: center; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--paper); border-color: var(--line-strong); }

.result-bar { min-height: 59px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 4px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.order-label { color: var(--dim); }
.timeline { position: relative; padding-top: 18px; }
.timeline::before { content: ""; position: absolute; left: 90px; top: 31px; bottom: 5px; width: 1px; background: linear-gradient(to bottom, var(--gold), rgba(199,161,92,.22) 100px, rgba(226,216,188,.12) calc(100% - 80px), transparent); }
.year-marker { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 36px; align-items: center; margin: 44px 0 15px; }
.year-marker:first-child { margin-top: 4px; }
.year-marker strong { color: var(--gold-bright); font: 600 1rem var(--serif); letter-spacing: .04em; text-align: right; }
.year-marker span { height: 1px; background: linear-gradient(90deg, rgba(199,161,92,.38), var(--line) 20%, transparent); }

.admin-row { position: relative; display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 36px; padding: 7px 0; }
.admin-row::before { content: ""; position: absolute; left: 85px; top: 36px; z-index: 2; width: 11px; height: 11px; border: 2px solid #786a4d; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--ink); }
.admin-row.has-special::before { border-color: var(--gold-bright); background: var(--gold); box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px rgba(199,161,92,.14); }
.admin-row.is-current::before { border-color: var(--paper); background: var(--crimson); box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px rgba(159,61,67,.24); }
.admin-number { padding-top: 15px; text-align: right; }
.admin-number span { display: block; color: var(--dim); font: 700 .55rem var(--mono); letter-spacing: .09em; }
.admin-number strong { display: block; margin-top: 4px; color: var(--paper-soft); font: 500 1.3rem var(--serif); }

.admin-card { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: inherit; text-align: left; padding: 0; cursor: pointer; box-shadow: 0 12px 38px rgba(0,0,0,.11); transition: transform .17s ease, border-color .17s ease, background .17s ease; }
.admin-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: rgba(199,161,92,.4); }
.admin-row.has-special .admin-card::before { background: var(--gold); }
.admin-row.is-current .admin-card::before { background: var(--crimson); }
.admin-card:hover { transform: translateY(-1px); border-color: var(--line-strong); background: var(--panel-hover); }
.admin-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.card-main { display: grid; grid-template-columns: minmax(205px,.9fr) minmax(300px,1.35fr) auto; gap: 28px; align-items: center; padding: 22px 24px 21px 27px; }
.term-date { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--muted); font-size: .67rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.current-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 2px 6px; border: 1px solid rgba(159,61,67,.55); border-radius: 3px; background: var(--crimson-soft); color: #e6a9ad; font-size: .53rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.office-label { display: block; margin-bottom: 6px; color: var(--dim); font-size: .59rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hoyenah-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--paper); font: 500 clamp(1.3rem,2.2vw,1.67rem)/1.12 var(--serif); overflow-wrap: anywhere; }
.alias-note { display: inline-flex; align-items: center; max-width: 100%; border: 1px solid rgba(199,161,92,.27); border-radius: 3px; background: var(--gold-soft); color: var(--gold-bright); padding: 3px 6px; font: 750 .58rem var(--sans); letter-spacing: .03em; }
.chief-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.chief-list { display: grid; grid-template-columns: 1fr; gap: 8px; align-items: stretch; }
.person-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chief-index { display: inline-grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(199,161,92,.4); border-radius: 50%; background: rgba(199,161,92,.08); color: var(--gold-bright); font: 800 .68rem/1 var(--mono); }
.person-wrap { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; flex-wrap: wrap; }
.person-chip { display: inline-flex; align-items: center; min-height: 30px; max-width: 100%; padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.018); color: #cad1cf; font: 680 .73rem var(--mono); overflow-wrap: anywhere; }
.card-metrics { display: flex; justify-content: flex-end; gap: 21px; }
.metric { min-width: 56px; }
.metric strong { display: block; color: var(--paper-soft); font-size: .91rem; font-weight: 770; }
.metric span { display: block; margin-top: 4px; color: var(--dim); font-size: .55rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.card-footer { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 7px 24px 7px 27px; border-top: 1px solid var(--line); color: var(--dim); font-size: .67rem; }
.event-badge, .change-badge { display: inline-flex; align-items: center; gap: 6px; }
.event-badge { color: var(--gold-bright); font-weight: 750; }
.event-badge::before { content: "✦"; font-size: .55rem; }
.change-badge { color: #b7c0bd; }
.view-details { margin-left: auto; color: var(--paper-soft); font-weight: 750; white-space: nowrap; }
.admin-card:hover .view-details { color: var(--gold-bright); }

.empty-state { margin-top: 18px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 64px 24px; text-align: center; background: var(--panel); }
.empty-seal { width: 50px; height: 50px; margin: 0 auto 18px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-bright); font: 600 1.25rem var(--serif); }
.empty-state h3 { margin: 0; font: 500 1.7rem var(--serif); }
.empty-state p { margin: 10px auto 22px; max-width: 460px; color: var(--muted); line-height: 1.55; }

.methodology { padding: 92px 0 102px; border-top: 1px solid var(--line-strong); }
.method-heading { max-width: 760px; }
.method-grid { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 52px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.method-grid article { min-height: 265px; padding: 28px 30px 35px 0; border-right: 1px solid var(--line); }
.method-grid article + article { padding-left: 30px; }
.method-grid article:last-child { border-right: 0; }
.method-number { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-bright); font: 600 .71rem var(--serif); }
.method-grid h3 { margin: 52px 0 10px; font: 500 1.42rem var(--serif); }
.method-grid p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.68; }

.admin-dialog { width: min(940px,calc(100% - 28px)); max-height: min(890px,calc(100dvh - 30px)); margin: auto; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--paper); overflow: visible; }
.admin-dialog::backdrop { background: rgba(2,8,12,.8); backdrop-filter: blur(7px); }
.dialog-card { max-height: min(890px,calc(100dvh - 30px)); overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--ink-2); box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: #485866 transparent; }
.dialog-close { position: sticky; top: 13px; float: right; z-index: 4; width: 42px; height: 42px; margin: 13px 13px 0 0; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(7,19,29,.92); color: var(--muted); cursor: pointer; backdrop-filter: blur(9px); }
.dialog-close:hover { color: var(--paper); border-color: rgba(224,191,120,.45); }
.dialog-hero { position: relative; padding: 50px 48px 34px; border-top: 3px solid var(--gold); border-bottom: 1px solid var(--line-strong); background: radial-gradient(circle at 90% 18%, rgba(199,161,92,.085), transparent 32%); }
.dialog-hero::after { content: "THE REPUBLIC"; position: absolute; right: 48px; bottom: 34px; color: rgba(215,207,186,.12); font: 700 .56rem var(--sans); letter-spacing: .22em; }
.dialog-kicker { margin: 0 0 12px; color: var(--gold-bright); font-size: .64rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.dialog-hero h2 { margin: 0; max-width: 720px; color: var(--paper); font: 500 clamp(2.45rem,7vw,4.75rem)/.98 var(--serif); letter-spacing: -.045em; overflow-wrap: anywhere; }
.dialog-subtitle { max-width: 690px; margin: 15px 0 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.dialog-body { padding: 32px 48px 48px; }
.detail-grid { display: grid; grid-template-columns: repeat(4,1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 5px; }
.detail-grid article { min-width: 0; padding: 17px; border-right: 1px solid var(--line); background: rgba(255,255,255,.012); }
.detail-grid article:last-child { border-right: 0; }
.detail-grid strong { display: block; font: 500 1.3rem var(--serif); overflow-wrap: anywhere; }
.detail-grid span { display: block; margin-top: 6px; color: var(--dim); font-size: .57rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.detail-section { margin-top: 33px; }
.detail-section h3 { margin: 0 0 13px; color: var(--paper-soft); font-size: .63rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.officeholder-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.officeholder { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.013); }
.officeholder.is-hoyenah { border-color: rgba(199,161,92,.28); background: var(--gold-soft); }
.officeholder small { display: block; margin-bottom: 7px; color: var(--dim); font-size: .56rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.officeholder strong { display: block; color: var(--paper); font: 760 .86rem var(--mono); overflow-wrap: anywhere; }
.event-panel { padding: 16px 18px; border: 1px solid rgba(199,161,92,.28); border-left: 3px solid var(--gold); border-radius: 4px; background: var(--gold-soft); }
.event-panel + .event-panel { margin-top: 8px; }
.event-title { color: var(--gold-bright); font-size: .76rem; font-weight: 800; }
.event-panel p, .note-panel p { margin: 9px 0 0; color: #c6c1b3; font-size: .81rem; line-height: 1.58; }
.note-panel { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--crimson); border-radius: 4px; background: var(--crimson-soft); }
.note-panel p { color: #c8ceca; white-space: pre-line; }
.election-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { min-width: 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 4px; }
.fact span { display: block; color: var(--dim); font-size: .56rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fact strong { display: block; margin-top: 6px; color: var(--paper-soft); font-size: .83rem; line-height: 1.45; overflow-wrap: anywhere; }

footer { min-height: 175px; display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 42px 0; border-top: 1px solid var(--line-strong); }
footer p { max-width: 550px; margin: 0; color: var(--dim); font-size: .76rem; line-height: 1.65; text-align: right; }

@media (max-width: 960px) {
  .hero-layout { grid-template-columns: 1fr 230px; gap: 44px; }
  .seal-large { width: 175px; height: 175px; font-size: 4rem; }
  .section-heading { grid-template-columns: 1fr; gap: 24px; }
  .record-note { max-width: 650px; }
  .controls { grid-template-columns: 1fr 1fr 1fr 48px; }
  .search-control { grid-column: 1/-1; }
  .card-main { grid-template-columns: minmax(190px,.8fr) 1.2fr; }
  .card-metrics { grid-column: 1/-1; justify-content: flex-start; padding-top: 2px; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article, .method-grid article + article { min-height: 0; padding: 25px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .method-grid article:last-child { border-bottom: 0; }
  .method-grid h3 { margin-top: 23px; }
  .detail-grid { grid-template-columns: repeat(2,1fr); }
  .detail-grid article:nth-child(2) { border-right: 0; }
  .detail-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 700px) {
  html { scroll-padding-top: 74px; }
  .topbar, .hero-layout, .stats, .archive, .methodology, footer { width: min(100% - 28px,1180px); }
  .topbar { height: 78px; }
  .topnav-links { display: none; }
  .brand small { font-size: .55rem; }
  .hero { min-height: auto; }
  .hero::after { width: 360px; height: 360px; right: -245px; top: 145px; }
  .hero-layout { min-height: 0; grid-template-columns: 1fr; gap: 0; padding: 66px 0 70px; }
  .hero-seal-wrap { display: none; }
  .eyebrow { font-size: .59rem; gap: 8px; }
  .eyebrow > span { width: 18px; }
  h1 { font-size: clamp(3.2rem,15vw,4.9rem); }
  .hero-lede { margin-top: 24px; font-size: .94rem; line-height: 1.67; }
  .hero-actions { margin-top: 27px; }
  .button { min-height: 47px; padding-inline: 16px; }
  .stats { width: 100%; grid-template-columns: 1fr 1fr; }
  .stats article { min-height: 104px; padding: 21px 18px 23px; border-top: 1px solid var(--line); }
  .stats article:first-child, .stats article:nth-child(3) { border-left: 0; }
  .stats article:nth-child(1), .stats article:nth-child(2) { border-top: 0; }
  .stats article:nth-child(odd) { padding-left: 22px; }
  .stats strong { font-size: 1.65rem; }
  .stats small { font-size: .57rem; }

  .archive { padding-top: 76px; padding-bottom: 84px; }
  .section-heading { margin-bottom: 34px; }
  .section-heading h2, .methodology h2 { font-size: clamp(2.45rem,11vw,3.55rem); }
  .record-note { padding-left: 15px; }
  .controls-shell { margin-inline: -14px; padding-inline: 14px; }
  .controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; gap: 7px; padding: 7px; border-radius: 6px; }
  .search-control { height: 46px; grid-column: 1/-1; }
  .select-control { height: 44px; min-width: 0; padding: 0 8px; }
  .select-control > span { display: none; }
  .icon-button { width: 44px; height: 44px; }
  kbd { display: none; }
  .result-bar { min-height: 52px; padding-inline: 2px; font-size: .7rem; }
  .order-label { display: none; }
  .timeline { padding-top: 8px; }
  .timeline::before { left: 20px; top: 20px; }
  .year-marker { grid-template-columns: 36px minmax(0,1fr); gap: 16px; margin-top: 34px; }
  .year-marker strong { grid-column: 2; font-size: .72rem; text-align: left; transform: none; letter-spacing: .11em; }
  .year-marker span { display: none; }
  .admin-row { grid-template-columns: 36px minmax(0,1fr); gap: 16px; padding: 6px 0; }
  .admin-row::before { left: 15px; top: 33px; width: 10px; height: 10px; box-shadow: 0 0 0 3px var(--ink); }
  .admin-row.has-special::before, .admin-row.is-current::before { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(199,161,92,.12); }
  .admin-number { padding-top: 14px; text-align: center; }
  .admin-number span { display: none; }
  .admin-number strong { font-size: .9rem; }
  .admin-card { border-radius: 6px; }
  .card-main { grid-template-columns: 1fr; gap: 17px; padding: 18px 16px 17px 19px; }
  .term-date { flex-wrap: wrap; font-size: .62rem; }
  .hoyenah-name { font-size: 1.36rem; }
  .chief-line { gap: 6px; }
  .person-chip { min-height: 29px; padding: 4px 7px; font-size: .68rem; }
  .card-metrics { grid-column: auto; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; width: 100%; padding-top: 0; }
  .metric { min-width: 0; padding-right: 7px; border-right: 1px solid var(--line); }
  .metric:last-child { border-right: 0; padding-right: 0; }
  .metric strong { font-size: .83rem; }
  .metric span { font-size: .5rem; }
  .card-footer { min-height: 36px; padding: 7px 15px 7px 19px; flex-wrap: wrap; font-size: .61rem; }
  .view-details { display: none; }

  .methodology { padding: 72px 0 78px; }
  .method-grid { margin-top: 40px; }
  .admin-dialog { width: calc(100% - 14px); max-height: calc(100dvh - 14px); border-radius: 7px; }
  .dialog-card { max-height: calc(100dvh - 14px); border-radius: 7px; }
  .dialog-close { top: 9px; margin: 9px 9px 0 0; }
  .dialog-hero { padding: 55px 19px 25px; }
  .dialog-hero::after { display: none; }
  .dialog-hero h2 { font-size: clamp(2.2rem,11vw,3.5rem); }
  .dialog-subtitle { font-size: .79rem; }
  .dialog-body { padding: 23px 19px 33px; }
  .detail-grid article { padding: 13px; }
  .detail-grid strong { font-size: 1.08rem; }
  .officeholder-list, .election-facts { grid-template-columns: 1fr; }
  footer { min-height: 220px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 36px 0; }
  footer p { text-align: left; }
}

@media (max-width: 390px) {
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .controls { grid-template-columns: minmax(0,1fr) 44px; }
  .select-control { grid-column: 1; }
  .select-control:nth-of-type(3) { grid-column: 1; }
  .icon-button { grid-column: 2; grid-row: 2 / span 2; height: 95px; }
  .card-footer > span:not(.view-details) { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail-grid article:last-child { border-bottom: 0; }
}

@media (hover: none) {
  .admin-card:hover, .button:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Round-two stability and mobile register cleanup */
.mobile-admin-number { display: none; }
.clear-label { display: none; }

@media (max-width: 700px) {
  .timeline::before { left: 8px; }
  .year-marker { grid-template-columns: 20px minmax(0,1fr); gap: 12px; }
  .admin-row { grid-template-columns: 20px minmax(0,1fr); gap: 12px; }
  .admin-row::before { left: 1px; top: 35px; }

  /* Do not squeeze the administration identifier into the timeline gutter.
     The number element is hidden, so explicitly keep the card in column 2. */
  .admin-number { display: none; }
  .admin-card {
    grid-column: 2;
    min-width: 0;
    display: block;
    visibility: visible;
    opacity: 1;
    -webkit-appearance: none;
    appearance: none;
  }
  .mobile-admin-number {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0 0 9px;
    padding: 3px 7px;
    border: 1px solid rgba(199,161,92,.28);
    border-radius: 3px;
    background: rgba(199,161,92,.08);
    color: var(--gold-bright);
    font: 800 .56rem/1 var(--sans);
    letter-spacing: .11em;
    text-transform: uppercase;
  }
  .admin-row.is-current .mobile-admin-number {
    border-color: rgba(159,61,67,.46);
    background: var(--crimson-soft);
    color: #e6a9ad;
  }

  .card-main { padding-left: 18px; }

  .card-main > div { min-width: 0; }
  .chief-line { min-width: 0; }
  .chief-list { gap: 7px; }
  .person-row { gap: 8px; }
  .chief-index { flex-basis: 22px; width: 22px; height: 22px; font-size: .64rem; }
  .person-wrap { min-width: 0; max-width: 100%; }
  .person-label { min-width: 0; max-width: calc(100% - 35px); }
  .person-chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .card-footer { padding-left: 18px; }

  /* Preserve the crimson latest-record marker instead of letting the
     special-election mobile rule recolor it gold. */
  .admin-row.has-special::before {
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(199,161,92,.12);
  }
  .admin-row.is-current::before {
    border-color: var(--paper);
    background: var(--crimson);
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(159,61,67,.20);
  }
}

@media (max-width: 390px) {
  /* Keep both filters usable without turning the clear control into a tall
     two-row X button. */
  .controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .search-control { grid-column: 1 / -1; }
  .select-control,
  .select-control:nth-of-type(3) { grid-column: auto; }
  .icon-button {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    height: 40px;
    display: flex;
    gap: 8px;
    border-color: rgba(226,216,188,.18);
  }
  .icon-button svg { width: 15px; height: 15px; }
  .clear-label {
    display: inline;
    color: var(--muted);
    font-size: .67rem;
    font-weight: 760;
    letter-spacing: .04em;
  }
}

@media (max-width: 700px) {
  /* Routine rows do not need a repetitive empty-status strip on every card. */
  .card-footer.is-quiet { display: none; }
}

/* Live Minecraft identity portraits */
.player-avatar {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(224,191,120,.34);
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(199,161,92,.12), rgba(255,255,255,.02)),
    #091722;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.24), 0 4px 14px rgba(0,0,0,.16);
  isolation: isolate;
}
.player-avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.045);
}
.player-avatar img,
.player-avatar-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.player-avatar img {
  z-index: 2;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity .16s ease;
}
.player-avatar-placeholder {
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(240,233,214,.64);
  font: 650 .82rem/1 var(--serif);
  background:
    linear-gradient(45deg, transparent 48%, rgba(199,161,92,.08) 49% 51%, transparent 52%),
    rgba(255,255,255,.018);
}
.player-avatar.is-loaded img { opacity: 1; }
.player-avatar.is-loaded .player-avatar-placeholder { opacity: 0; }
.player-avatar.is-unresolved { border-style: dashed; border-color: rgba(226,216,188,.16); }
.player-avatar.is-error { border-color: rgba(159,61,67,.38); }
.player-avatar--small { width: 30px; height: 30px; border-radius: 4px; }
.player-avatar--hoyenah { width: 44px; height: 44px; border-radius: 5px; }
.player-avatar--large { width: 58px; height: 58px; border-radius: 6px; }

.hoyenah-line { display: flex; align-items: center; gap: 11px; min-width: 0; }
.hoyenah-line .hoyenah-name { min-width: 0; flex: 1 1 auto; }
.person-wrap { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
.person-label { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; flex-wrap: wrap; }
.person-chip { min-width: 0; }

.officeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
}
.officeholder-copy { min-width: 0; flex: 1; }
.officeholder-copy .alias-note { margin-top: 7px; }

@media (max-width: 700px) {
  .player-avatar--small { width: 29px; height: 29px; }
  .player-avatar--hoyenah { width: 40px; height: 40px; }
  .player-avatar--large { width: 54px; height: 54px; }
  .hoyenah-line { gap: 9px; }
  .officeholder { min-height: 78px; padding: 11px; }
  .officeholder-list { gap: 7px; }
}

@media (max-width: 360px) {
  .player-avatar--small { width: 27px; height: 27px; }
  .person-wrap { gap: 5px; }
  .person-chip { font-size: .65rem; }
}

/* Pre-election founding leadership */
.method-grid { grid-template-columns: repeat(4, 1fr); }
.year-marker.founding-marker { margin-top: 4px; }
.year-marker.founding-marker strong {
  grid-column: 2;
  text-align: left;
  color: var(--gold-bright);
  font: 850 .64rem var(--sans);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.year-marker.founding-marker span { display: none; }
.admin-row.is-founding::before {
  border-color: var(--gold-bright);
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--ink), 0 0 0 6px rgba(199,161,92,.12);
}
.admin-row.is-founding .admin-card::before { background: var(--gold-bright); }
.founding-number span { color: var(--gold-bright); }
.founding-number strong { color: var(--paper-soft); }
.founding-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 7px;
  border: 1px solid rgba(199,161,92,.28);
  border-radius: 3px;
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-size: .55rem;
  font-weight: 820;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.muted-chip { color: var(--muted); }
.admin-row.is-founding .metric:first-child strong { color: var(--gold-bright); font-size: .72rem; }
.pre-election-officeholders { grid-template-columns: repeat(2, minmax(0,1fr)); }
.officeholder.is-unrecorded { border-style: dashed; color: var(--muted); }
.officeholder.is-unrecorded strong { color: var(--muted); font-family: var(--sans); font-size: .78rem; }
.founding-dialog-hero { border-top-color: var(--gold-bright); }
.note-panel p + p { margin-top: 10px; }

@media (max-width: 960px) {
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .year-marker.founding-marker strong { grid-column: 2; }
  .admin-row.is-founding::before {
    box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(199,161,92,.12);
  }
  .admin-row.is-founding .mobile-admin-number {
    border-color: rgba(199,161,92,.38);
    background: rgba(199,161,92,.10);
    color: var(--gold-bright);
  }
  .pre-election-officeholders { grid-template-columns: 1fr; }
}


@media (max-width: 460px) {
  .chief-line.chief-list { gap: 6px; }
  .person-row { align-items: flex-start; }
  .person-label { max-width: 100%; }
}

/* Candidate ballot placements */
.ballot-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ballot-panel { min-width:0; padding:15px; border:1px solid var(--line); border-radius:5px; background:rgba(255,255,255,.012); }
.ballot-panel-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-bottom:11px; border-bottom:1px solid var(--line); }
.ballot-panel-head h4 { margin:0; color:var(--paper-soft); font-size:.73rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.ballot-panel-head span { color:var(--dim); font-size:.62rem; font-weight:750; }
.candidate-results { display:grid; gap:7px; margin-top:11px; }
.candidate-result { display:grid; grid-template-columns:30px auto minmax(0,1fr); align-items:center; gap:9px; min-width:0; padding:7px 8px; border:1px solid rgba(255,255,255,.055); border-radius:4px; background:rgba(255,255,255,.012); }
.candidate-result.is-first { border-color:rgba(199,161,92,.28); background:var(--gold-soft); }
.candidate-place { display:grid; place-items:center; width:27px; height:27px; border:1px solid rgba(199,161,92,.42); border-radius:50%; color:var(--gold-bright); font:800 .7rem/1 var(--mono); }
.candidate-result-copy { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
.candidate-result-copy strong { color:var(--paper); font:730 .76rem var(--mono); overflow-wrap:anywhere; }
.candidate-note { flex-basis:100%; color:var(--dim); font-size:.61rem; line-height:1.4; }
.candidate-missing { margin:11px 0 0; padding-top:10px; border-top:1px dashed var(--line); color:var(--muted); font-size:.69rem; line-height:1.5; }
.candidate-empty { color:var(--muted); font-size:.72rem; line-height:1.5; padding:5px 0; }
@media (max-width:700px){ .ballot-grid { grid-template-columns:1fr; } .candidate-result { grid-template-columns:28px auto minmax(0,1fr); gap:8px; } }
