/* Political Eye — place landing pages (/place/<slug>/). Hand-written; the page HTML is generated by
   scripts/build-place-pages.mjs. Same ballot-stub palette and faces as the globe's cards.
   html.embed (?embed=1): the page sits inside a window card, so its own header and footer go. */
:root {
  --ink: #08122b;
  --ink-2: #0e1b3d;
  --panel: #0c1838;
  --line: rgba(160, 180, 230, 0.16);
  --line-2: rgba(160, 180, 230, 0.3);
  --text: #eef2fa;
  --mute: #a3b0cf;
  --dim: #7f8db3;
  --red: #d7263d;
  --red-l: #f0626f;
  --blue: #2563eb;
  --blue-l: #7aa2ff;
  --gold: #e8b04a;
  --focus: #ffd479;
  --display: 'Big Shoulders Display', Impact, 'Arial Narrow', sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not(.embed) {
    --ink: #f6f7fb;
    --ink-2: #eaeef7;
    --panel: #ffffff;
    --line: rgba(20, 35, 80, 0.14);
    --line-2: rgba(20, 35, 80, 0.3);
    --text: #0e1633;
    --mute: #404c6e;
    --dim: #5a678c;
    --red: #b3172d;
    --red-l: #b3172d;
    --blue: #1d4fd0;
    --blue-l: #1d4fd0;
    --gold: #8a5a00;
    --focus: #8a5a00;
    color-scheme: light;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: radial-gradient(1100px 520px at 12% -8%, rgba(37, 99, 235, 0.16), transparent 70%),
    radial-gradient(900px 480px at 100% 0%, rgba(215, 38, 61, 0.12), transparent 70%), var(--ink);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
}
a {
  color: var(--blue-l);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--text);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
.pl-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--gold);
  color: #1a1200;
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
  font-weight: 700;
}
.pl-skip:focus {
  top: 10px;
}
.pl-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* top bar and breadcrumb */
.pl-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 22px;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 24px 0;
}
.pl-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 20px/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.pl-mark {
  width: 22px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%);
}
.pl-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 500 13px/1.3 var(--mono);
  color: var(--mute);
}
.pl-crumbs li + li::before {
  content: '›';
  margin-right: 4px;
  color: var(--dim);
}
.pl-crumbs a {
  color: var(--mute);
}
.pl-crumbs [aria-current] {
  color: var(--text);
}

.pl-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 24px 56px;
}

/* hero */
.pl-hero {
  padding: 32px 0 12px;
}
.pl-kind {
  margin: 0 0 8px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.pl-hero h1 {
  margin: 0;
  font: 900 clamp(34px, 6.4vw, 60px) / 0.98 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 18ch;
}
.pl-lede {
  max-width: 62ch;
  margin: 16px 0 0;
  color: var(--mute);
  font-size: 17px;
}
.pl-hero-nums {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.pl-hero-nums li {
  background: var(--panel);
  padding: 16px 18px 14px;
}
.pl-hero-nums b {
  display: block;
  font: 800 clamp(30px, 4.6vw, 44px) / 1 var(--display);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.pl-hero-nums span {
  display: block;
  margin-top: 6px;
  font: 500 12px/1.3 var(--mono);
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* sections */
.pl-section {
  margin-top: 44px;
  scroll-margin-top: 16px;
}
.pl-section h2 {
  margin: 0 0 14px;
  font: 800 clamp(22px, 3.2vw, 30px) / 1.1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pl-section h3 {
  margin: 22px 0 8px;
  font: 700 15px/1.3 var(--body);
  color: var(--text);
}
.pl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.pl-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.pl-card h3 {
  margin: 0 0 10px;
  font: 600 13px/1.3 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
}
.pl-split {
  display: flex;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--ink-2);
  font: 700 13px/38px var(--mono);
  color: #fff;
}
.pl-split span {
  display: block;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.pl-split .r {
  background: var(--red);
}
.pl-split .d {
  background: var(--blue);
  text-align: right;
  margin-left: auto;
}
.pl-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px 14px;
  margin: 14px 0 0;
}
.pl-stats div {
  min-width: 0;
}
.pl-stats dt {
  font: 500 11px/1.3 var(--mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pl-stats dd {
  margin: 2px 0 0;
  font: 800 22px/1.1 var(--display);
  font-variant-numeric: tabular-nums;
}
.pl-src,
.pl-fine,
.pl-note {
  font-size: 13px;
  color: var(--dim);
}
.pl-src {
  margin: 12px 0 0;
}
.pl-note {
  margin: 10px 0 0;
}
.pl-sub {
  color: var(--dim);
  font-size: 13px;
}
.pl-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.pl-facts div {
  background: var(--panel);
  padding: 11px 14px;
}
.pl-facts dt {
  font: 500 11px/1.3 var(--mono);
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pl-facts dd {
  margin: 2px 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.pl-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pl-bars li {
  display: grid;
  grid-template-columns: 90px 1fr 56px;
  align-items: center;
  gap: 10px;
  font: 500 13px/1.2 var(--mono);
}
.pl-bars i {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold) var(--w), var(--ink-2) var(--w));
}
.pl-bars b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* layer switches */
.pl-layer-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.pl-layer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.pl-layer-list b {
  font-weight: 700;
}
.pl-layer-list span:not(.pl-lock) {
  display: block;
  color: var(--mute);
  font-size: 13px;
}
.pl-lock,
.pl-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  font: 600 11px/1.6 var(--mono);
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-left: 6px;
}
.pl-chip {
  color: var(--mute);
  margin-left: 0;
}
.pl-switch {
  flex: none;
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  cursor: pointer;
  padding: 0;
  transition: background 0.18s, border-color 0.18s;
}
.pl-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mute);
  transition: transform 0.18s, background 0.18s;
}
.pl-switch[aria-checked='true'] {
  background: var(--blue);
  border-color: var(--blue-l);
}
.pl-switch[aria-checked='true'] i {
  transform: translateX(22px);
  background: #fff;
}
.pl-switch:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* link lists */
.pl-linklist,
.pl-doclist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.pl-linklist li,
.pl-doclist li {
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}

/* video facade */
.pl-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}
.pl-video {
  margin: 0;
}
.pl-video-play,
.pl-video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #000;
}
.pl-video-play {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #1a2b66, #000 70%);
  font: 700 15px/1.3 var(--body);
  padding: 12px;
}
.pl-play {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(255, 255, 255, 0.7);
  position: relative;
}
.pl-play::after {
  content: '';
  position: absolute;
  left: 22px;
  top: 16px;
  border-left: 18px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.pl-video-play:hover .pl-play {
  background: var(--red);
}
.pl-video figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--mute);
}

/* sponsor slot */
.pl-sponsor {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: 18px 20px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(160, 180, 230, 0.05) 12px 24px);
}
.pl-sponsor h2 {
  font-size: 22px;
  margin: 4px 0 8px;
}
.pl-sponsor p {
  margin: 0 0 8px;
}
.pl-sponsor-tag {
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* live results (live.css draws the block itself; this is its place on the page) */
.pl-live {
  --pc-text: var(--text);
  --pc-mute: var(--mute);
  --pc-line: var(--line);
  --pc-display: var(--display);
  --pc-mono: var(--mono);
  --pe-gold: var(--gold);
  --pe-red: var(--red);
  --pe-blue: var(--blue);
}
.pl-live .pe-live {
  max-width: 560px;
  font-size: 14px;
  padding: 14px 16px 12px;
}
.pl-live .pe-live-big b {
  font-size: 40px;
}
.pl-live .pe-live-spark {
  width: 160px;
  height: 36px;
}

/* live news picker */
.pl-stream-group {
  margin-top: 14px;
}
.pl-stream-group h3 {
  margin: 0 0 8px;
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.pl-stream-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pl-stream-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--ink-2);
  color: var(--text);
  font: 600 13px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}
.pl-stream-btn small {
  font: 500 10.5px/1.2 var(--mono);
  color: var(--mute);
}
.pl-stream-btn:hover {
  border-color: var(--gold);
}
.pl-stream-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.pl-stream-btn[aria-pressed='true'] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.pl-stream-btn.is-unverified {
  border-style: dashed;
  opacity: 0.8;
}
.pl-stream-stage {
  margin-top: 16px;
}
.pl-stream-label {
  margin: 0 0 8px;
  font: 500 12.5px/1.4 var(--mono);
  color: var(--mute);
}
.pl-stream-frame iframe {
  display: block;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #000;
}

.pl-foot {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 14px;
}
.pl-foot p {
  margin: 0 0 6px;
}

/* inside a window card: the window supplies the header and footer */
html.embed .pl-top,
html.embed .pl-foot,
html.embed .pl-skip {
  display: none;
}
html.embed .pl-main {
  padding: 4px 18px 28px;
}
html.embed .pl-hero {
  padding-top: 16px;
}
html.embed .pl-hero h1 {
  font-size: clamp(24px, 5.4vw, 34px);
  max-width: none;
}
html.embed .pl-hero-nums {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}
html.embed .pl-hero-nums li {
  padding: 12px 14px 10px;
}
html.embed .pl-section {
  margin-top: 32px;
}
.pl-fly {
  margin-top: 16px;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  color: var(--text);
  font: 600 13px/1 var(--body);
  cursor: pointer;
}
.pl-fly:hover {
  border-color: var(--gold);
}

/* state pages and the /place/ hub (21 Oct 2026): Live Voting call to action, neighbours, the every-state
   table, the newsletter and the labelled ad slot (a placeholder; no ads, no ad scripts) */
.pl-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 14px 0 6px;
}
.pl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font: 700 15px/1.2 var(--body);
  text-decoration: none;
  border: 1px solid var(--blue-l);
}
.pl-btn:hover,
.pl-btn:focus-visible {
  background: var(--red);
  border-color: var(--red-l);
  color: #fff;
}
.pl-watch {
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--gold);
  border-radius: 14px;
  padding: 18px 20px;
  background: var(--panel);
}
.pl-cols {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.pl-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.pl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pl-table caption {
  caption-side: bottom;
  text-align: left;
  padding: 10px 14px;
  color: var(--mute);
  font-size: 12.5px;
}
.pl-table th,
.pl-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.pl-table thead th {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute);
}
.pl-table .pl-num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.pl-news {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 20px;
  background: var(--ink-2);
}
.pl-ad {
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  padding: 16px 20px;
  min-height: 120px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(160, 180, 230, 0.05) 12px 24px);
}
.pl-ad-tag {
  margin: 0 0 6px;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
.pl-ad-body {
  margin: 0;
  color: var(--mute);
  font-size: 13.5px;
}
html.embed .pl-ad,
html.embed .pl-news {
  display: none;
}

@media (max-width: 560px) {
  .pl-table th,
  .pl-table td {
    padding: 8px 10px;
  }
  .pl-main,
  .pl-top {
    padding-left: 16px;
    padding-right: 16px;
  }
  .pl-bars li {
    grid-template-columns: 70px 1fr 50px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pl-switch,
  .pl-switch i {
    transition: none;
  }
}
