/* PolitiCloud v0.1 styles */

:root {
  --bg: #f4f3ef;            /* page background, warm newsprint */
  --surface-solid: #ffffff; /* cards, fully opaque (rarely needed) */
  --surface: color-mix(in srgb, var(--surface-solid) 72%, transparent);   /* cards: glass over the page wash */
  --surface-2: #ebe9e3;     /* inputs, chips */
  --ink: #15151a;           /* main text */
  --ink-2: #5b5b66;         /* secondary text */
  --line: #d9d6ce;          /* borders */
  --left: #2f6bff;          /* Left */
  --left-soft: #e3ebff;
  --center: #8a63d2;        /* Center */
  --center-soft: #eee7fb;
  --right: #f0383b;         /* Right */
  --right-soft: #ffe4e4;
  --accent: #15151a;        /* active tab / primary buttons */
  --accent-ink: #ffffff;
  --glow: #ffcf33;          /* "in the news" highlight */
  --verified: #0f9d76;      /* verified official badge (green, distinct from lean colors) */
  --seat-empty: #cfccc4;    /* vacant seat */
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 4px 16px rgb(0 0 0 / .06);
  --radius: 14px;
  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e13;
    --surface-solid: #16171f;
    --surface: color-mix(in srgb, var(--surface-solid) 70%, transparent);
    --surface-2: #20222c;
    --ink: #f2f1ee;
    --ink-2: #9a9aa8;
    --line: #2b2d39;
    --left: #5b8cff;
    --left-soft: #18223f;
    --center: #a888ec;
    --center-soft: #251d3a;
    --right: #ff5a5d;
    --right-soft: #3a1a1d;
    --accent: #f2f1ee;
    --accent-ink: #0d0e13;
    --seat-empty: #33353f;
    --verified: #2cc495;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 24px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--body);
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--center); outline-offset: 2px; }
.muted { color: var(--ink-2); }
.mono { font-family: var(--mono); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background .25s ease, backdrop-filter .25s ease, box-shadow .25s ease;
}
/* Liquid-glass lite: a touch more frost once you've scrolled past the top */
.top.scrolled {
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 8px 24px rgb(0 0 0 / .08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.brand-mark i { width: 7px; border-radius: 4px; display: block; }
.brand-mark .l { height: 16px; background: var(--left); }
.brand-mark .c { height: 26px; background: var(--center); }
.brand-mark .r { height: 16px; background: var(--right); }
.brand-name { font: 700 22px/1 var(--display); letter-spacing: -.02em; }
.brand-name b { font-weight: 800; }

.tabs { display: none; gap: 4px; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink-2); min-height: 40px; display: flex; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--accent); color: var(--accent-ink); }

.lean-picker { display: flex; align-items: center; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 999px; }
.lean-label { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 6px 0 8px; display: none; }
.lean-picker button {
  width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; font: 800 20px/1 var(--mono); color: var(--ink-2);
  transition: background .15s, color .15s, transform .15s;
}
.lean-picker button:hover { color: var(--ink); }
.lean-picker button[data-lean="left"][aria-checked="true"] { background: var(--left); color: #fff; }
.lean-picker button[data-lean="center"][aria-checked="true"] { background: var(--center); color: #fff; }
.lean-picker button[data-lean="right"][aria-checked="true"] { background: var(--right); color: #fff; }
.lean-picker button[aria-checked="true"] { transform: scale(1.06); }

/* Mobile bottom nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 86%, transparent); border-top: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a, .bottom-nav .more-tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; text-decoration: none; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.bottom-nav .ico { font-size: 20px; line-height: 1; }
.bottom-nav a.on { color: var(--ink); }
.bottom-nav a.on .ico { color: var(--center); }

/* Phone bar + More sheet below 1024px; top tabs + the same More menu from 1024px.
   1024-1279: the top tabs are exactly the phone's main four; 1280+: Cloud, Vote and Blog get tabs too
   (they're always in More as well, so every size reaches the same pages). */
@media (max-width: 1279px) { .tabs .tab-wide { display: none; } }
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .tabs { display: flex; }
  .bottom-nav { display: none; }
  .brand { margin-right: 0; }
  .tabs { margin-right: auto; margin-left: 12px; }
}

/* Liquid-glass lite: a cursor-tracked sheen on the main pills and buttons.
   Fine-pointer only (desktop), no SVG distortion, respects reduced motion. */
@media (hover: hover) and (pointer: fine) {
  .tabs a, .lean-picker button, .bottom-nav a, .geo-btn, #account-btn {
    position: relative; overflow: hidden; isolation: isolate;
  }
  .tabs a::before, .lean-picker button::before, .bottom-nav a::before, .geo-btn::before, #account-btn::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / .35), transparent 65%);
    opacity: 0; transition: opacity .2s ease;
  }
  .tabs a:hover::before, .lean-picker button:hover::before, .bottom-nav a:hover::before, .geo-btn:hover::before, #account-btn:hover::before {
    opacity: 1;
  }
  @media (prefers-reduced-motion: reduce) {
    .tabs a::before, .lean-picker button::before, .bottom-nav a::before, .geo-btn::before, #account-btn::before { display: none; }
  }
}

main { max-width: 1240px; margin: 0 auto; padding: 16px; outline: none; }

/* ---------- Shared bits ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.page-head h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; min-height: 40px; border-radius: 999px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.controls select, .controls input[type="search"] {
  min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px;
}
.controls input[type="search"] { flex: 1 1 200px; min-width: 0; }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin-bottom: 12px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 6px 12px; min-height: 36px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); white-space: nowrap;
}
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip .n { font-family: var(--mono); font-size: 12px; opacity: .7; margin-left: 4px; }

.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; min-height: 44px; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw { width: 44px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); position: relative; transition: background .2s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-2); transition: transform .2s, background .2s; }
.toggle input:checked + .sw { background: var(--center); border-color: var(--center); }
.toggle input:checked + .sw::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .sw { outline: 3px solid var(--center); outline-offset: 2px; }

.badge { display: inline-flex; align-items: center; gap: 4px; font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .04em; padding: 4px 7px; border-radius: 6px; }
.badge.left { background: var(--left-soft); color: var(--left); }
.badge.center { background: var(--center-soft); color: var(--center); }
.badge.right { background: var(--right-soft); color: var(--right); }
.badge.plain { background: var(--surface-2); color: var(--ink-2); }
.badge.hot { background: var(--glow); color: #2a2000; }

.empty { padding: 40px 16px; text-align: center; color: var(--ink-2); }
.loading { padding: 60px 16px; text-align: center; color: var(--ink-2); font-family: var(--mono); }

/* ---------- Spectrum bar (the < ^ > lens) ---------- */
.lens {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px;
}
.lens button {
  border: 2px solid var(--line); background: var(--surface); border-radius: 12px; min-height: 52px;
  font: 800 16px/1 var(--display); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2);
  transition: all .15s;
}
.lens button .sym { font-family: var(--mono); font-size: 18px; }
.lens button .n { font: 500 12px/1 var(--mono); opacity: .7; }
.lens button.on[data-b="left"] { border-color: var(--left); color: var(--left); background: var(--left-soft); }
.lens button.on[data-b="center"] { border-color: var(--center); color: var(--center); background: var(--center-soft); }
.lens button.on[data-b="right"] { border-color: var(--right); color: var(--right); background: var(--right-soft); }

/* ---------- News ---------- */
.scope-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.news-layout { display: grid; gap: 20px; }
.news-layout > *, .rail, .rail-box, .feed { min-width: 0; }
@media (min-width: 1000px) { .news-layout { grid-template-columns: minmax(0, 1fr) 340px; } }

.feed { display: grid; gap: 12px; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 5px solid var(--c, var(--line)); padding: 14px 16px; display: grid; gap: 8px;
  position: relative;
}
.card[data-b="left"] { --c: var(--left); }
.card[data-b="center"] { --c: var(--center); }
.card[data-b="right"] { --c: var(--right); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--ink-2); }
.card-meta .src { font-weight: 700; color: var(--ink); }
.card h3 { font-size: 19px; font-weight: 700; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card .sum { margin: 0; color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.has-img { grid-template-columns: minmax(0, 1fr) 96px; }
.card.has-img > *:not(.thumb) { grid-column: 1; }
.card .thumb { grid-column: 2; grid-row: 1 / span 3; width: 96px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
@media (min-width: 600px) { .card.has-img { grid-template-columns: minmax(0, 1fr) 140px; } .card .thumb { width: 140px; height: 100px; } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); text-decoration: none; border: 0; cursor: pointer; min-height: 28px; display: inline-flex; align-items: center; }
.tag.pol { background: var(--accent); color: var(--accent-ink); }
.tag.pol.D { background: var(--left); color: #fff; }
.tag.pol.R { background: var(--right); color: #fff; }
.tag.pol.I { background: var(--center); color: #fff; }
.tag::before { content: '#'; opacity: .5; margin-right: 1px; }
.tag.pol::before, .tag.state::before { content: ''; margin: 0; }

.coverage { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.cov-bar { display: flex; height: 8px; width: 120px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.cov-bar i { display: block; height: 100%; }
.cov-bar .l { background: var(--left); } .cov-bar .c { background: var(--center); } .cov-bar .r { background: var(--right); }

.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; min-height: 40px;
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* Reader tag bar: the < ^ > "like button" on every story */
.tagbar { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.tagbar button {
  min-width: 52px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.tagbar .sym { font: 800 18px/1 var(--mono); }
.tagbar .cnt { font: 700 13px/1 var(--mono); min-width: 0; }
.tagbar .cnt:empty { display: none; }
.tagbar button:hover { color: var(--ink); background: var(--surface); }
.tagbar button[data-b="left"]:hover { color: var(--left); }
.tagbar button[data-b="center"]:hover { color: var(--center); }
.tagbar button[data-b="right"]:hover { color: var(--right); }
.tagbar button[aria-pressed="true"][data-b="left"] { background: var(--left); color: #fff; }
.tagbar button[aria-pressed="true"][data-b="center"] { background: var(--center); color: #fff; }
.tagbar button[aria-pressed="true"][data-b="right"] { background: var(--right); color: #fff; }
.tagbar button.pop { animation: tagpop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes tagpop { 0% { transform: scale(.7); } 60% { transform: scale(1.22); } 100% { transform: scale(1); } }
.badge.disagree { outline: 2px dashed currentColor; outline-offset: 1px; }

/* Blindspots view */
.blind-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .blind-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.blind-col { min-width: 0; }
.blind-col[data-b="left"] { --c: var(--left); } .blind-col[data-b="right"] { --c: var(--right); }
.blind-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); border-top: 4px solid var(--c); }
.blind-head h2 { font-size: 22px; }
.blind-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.blind-eye {
  flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font: 800 24px/1 var(--mono); color: var(--ink-2); background: var(--surface-2); position: relative;
}
.blind-eye::after { content: ''; position: absolute; width: 62px; height: 4px; background: var(--ink-2); transform: rotate(-35deg); border-radius: 4px; }

/* Other-side rail */
.rail { display: grid; gap: 10px; align-content: start; }
.rail-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.rail-box h2 { font-size: 18px; margin-bottom: 4px; }
.rail-box > p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.rail-list { display: grid; gap: 10px; }
.mini { display: grid; gap: 2px; text-decoration: none; padding: 8px 0 8px 10px; border-left: 3px solid var(--c); }
.mini[data-b="left"] { --c: var(--left); } .mini[data-b="center"] { --c: var(--center); } .mini[data-b="right"] { --c: var(--right); }
.mini b { font-size: 15px; line-height: 1.3; }
.mini span { font-size: 12px; color: var(--ink-2); }
@media (max-width: 999px) {
  .rail { order: -1; }
  .rail-box.scroller .rail-list { display: flex; overflow-x: auto; gap: 10px; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .rail-box.scroller .mini { flex: 0 0 78%; scroll-snap-align: start; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
}

/* Spectrum (3-column) view */
.spectrum { display: grid; gap: 14px; }
@media (min-width: 900px) { .spectrum { grid-template-columns: repeat(3, 1fr); } }
.spectrum-col h2 { font-size: 22px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 3px solid var(--c); }
.spectrum-col[data-b="left"] { --c: var(--left); } .spectrum-col[data-b="center"] { --c: var(--center); } .spectrum-col[data-b="right"] { --c: var(--right); }
.spectrum-col .feed { gap: 10px; }
.spectrum-col .card .sum { -webkit-line-clamp: 2; }

/* ---------- Chamber (seating chart) ---------- */
.chamber-wrap { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); padding: 12px 12px 18px; position: relative; overflow: hidden; }
.chamber-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--center) 14%, transparent), transparent 60%);
}
.hemi { width: 100%; height: auto; display: block; position: relative; touch-action: manipulation; }
.seat { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: opacity .25s, r .15s; }
.seat.anim { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: var(--d); }
@keyframes pop { from { transform: scale(0); opacity: 0; } }
.seat:hover, .seat.focus { stroke: var(--ink); stroke-width: 3; }
.seat.dim { opacity: .14; }
.seat.vacant { fill: var(--seat-empty); cursor: default; }
.seat.hot { stroke: var(--glow); stroke-width: 4; filter: drop-shadow(0 0 6px var(--glow)); }
.seat.hot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { stroke-width: 7; } }
.hemi-axis { font: 700 13px var(--mono); fill: var(--ink-2); letter-spacing: .06em; }

.hemi-center {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 34%; text-align: center; display: grid; justify-items: center; gap: 4px; pointer-events: none;
}
@media (max-width: 600px) { .hemi-center { bottom: 26px; gap: 2px; } .hemi-center img { display: none; } }
.hemi-center .big { font: 800 clamp(28px, 8vw, 76px)/1 var(--display); letter-spacing: -.03em; }
.hemi-center .sub { font-size: clamp(11px, 2.4vw, 15px); line-height: 1.25; color: var(--ink-2); font-weight: 600; }
.hemi-center img { width: clamp(44px, 10vw, 84px); aspect-ratio: 225/275; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); background: var(--surface-2); }
.hemi-center .who { font: 800 clamp(14px, 3.4vw, 24px)/1.1 var(--display); }

.split { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; background: var(--surface-2); }
.split i { display: block; height: 100%; transition: width .6s; }
.split-labels { display: flex; justify-content: space-between; font: 600 13px var(--mono); color: var(--ink-2); flex-wrap: wrap; gap: 6px; }

.legend { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; margin-top: 10px; }
.grad { width: 160px; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--left), var(--center), var(--right)); }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; vertical-align: middle; margin-right: 4px; }

.extremes { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 700px) { .extremes { grid-template-columns: repeat(3, 1fr); } }
.ext { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; gap: 12px; align-items: center; text-decoration: none; border-top: 4px solid var(--c); }
.ext img { width: 48px; height: 58px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.ext small { display: block; color: var(--ink-2); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ext b { font-family: var(--display); font-size: 17px; }

.tooltip {
  position: fixed; z-index: 50; pointer-events: none; opacity: 0; transform: translateY(4px);
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: 13px; max-width: 240px;
  transition: opacity .12s, transform .12s; box-shadow: var(--shadow);
}
.tooltip.on { opacity: 1; transform: none; }
.tooltip b { display: block; font-size: 14px; }

/* ---------- Roster ---------- */
.roster { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .roster { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .roster { grid-template-columns: repeat(3, 1fr); } }
.person {
  display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 12px; align-items: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; text-decoration: none;
  border: 2px solid transparent; transition: border-color .15s, transform .15s;
}
.person:hover { border-color: var(--line); transform: translateY(-1px); }
.person img { width: 60px; height: 74px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.person .nm { font: 700 17px/1.15 var(--display); }
.person .sub { font-size: 13px; color: var(--ink-2); margin: 2px 0 6px; }

.meter { position: relative; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--left), var(--center), var(--right)); opacity: .9; }
.meter i { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); transform: translate(-50%, -50%); }
.meter.big { height: 14px; margin: 18px 0 8px; }
.meter.big i { width: 26px; height: 26px; border-width: 4px; }
.meter-labels { display: flex; justify-content: space-between; font: 600 12px var(--mono); color: var(--ink-2); }

/* ---------- Profile (drawer) ---------- */
.drawer { position: fixed; inset: 0; z-index: 40; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .45); opacity: 0; transition: opacity .25s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--bg);
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: -10px 0 40px rgb(0 0 0 / .2);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-close { position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 26px; cursor: pointer; z-index: 2; }
.drawer-body { padding: 16px; padding-bottom: 40px; }

.prof-head { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; align-items: end; margin-top: 8px; }
.prof-head img { width: 110px; height: 134px; object-fit: cover; border-radius: 14px; background: var(--surface-2); box-shadow: var(--shadow); border-bottom: 6px solid var(--c); }
.prof-head h2 { font-size: 30px; font-weight: 800; }
.prof-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.section { margin-top: 22px; }
.section > h3 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 10px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--surface); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.stat b { display: block; font: 800 24px/1 var(--display); }
.stat span { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.votes { display: grid; gap: 8px; }
.vote { background: var(--surface); border-radius: 12px; padding: 10px 12px; display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; box-shadow: var(--shadow); }
.vote .cast { font: 800 13px/1 var(--mono); text-transform: uppercase; padding: 8px 0; border-radius: 8px; text-align: center; }
.vote .cast.Yea { background: #dff6e6; color: #127a3a; }
.vote .cast.Nay { background: #fde2e2; color: #b4232a; }
.vote .cast.other { background: var(--surface-2); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .vote .cast.Yea { background: #133222; color: #6fe39a; } .vote .cast.Nay { background: #3a1617; color: #ff8a8d; } }
.vote .q { font-size: 14px; font-weight: 600; line-height: 1.35; }
.vote .m { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
.broke { color: var(--glow); font-weight: 800; }
@media (prefers-color-scheme: light) { .broke { color: #a86b00; } }

/* Takes */
.takes { display: grid; gap: 8px; }
.take { background: var(--surface); border-radius: 12px; padding: 10px 12px; border-left: 4px solid var(--c); }
.take[data-b="left"] { --c: var(--left); } .take[data-b="center"] { --c: var(--center); } .take[data-b="right"] { --c: var(--right); }
.take .who { font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.take p { margin: 4px 0 0; white-space: pre-wrap; }
.take-form { display: grid; gap: 8px; margin-top: 10px; }
.take-form textarea, .take-form input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); font-size: 16px; }
.take-form textarea { min-height: 90px; resize: vertical; }

/* Sources */
.src-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.src-table th, .src-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.src-table th { font: 700 12px var(--mono); text-transform: uppercase; color: var(--ink-2); }
.ok { color: #1a9a4b; font-weight: 700; } .bad { color: var(--right); font-weight: 700; }
.table-scroll { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================================================================
   v0.2: accounts, forms, tag blocks, News sidebar layout, sources list
   ====================================================================== */
.small { font-size: 13px; }
body.no-scroll { overflow: hidden; }
.linkish { background: none; border: 0; padding: 0; color: var(--center); font-weight: 700; cursor: pointer; text-decoration: underline; min-height: 0; }

/* Header account button */
.account-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 4px;
  border: 0; background: transparent; cursor: pointer; font-weight: 700; color: var(--ink); border-radius: 999px;
}
.account-btn .acct-name { display: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-btn .acct-name.show { display: inline; background: var(--accent); color: var(--accent-ink); padding: 9px 14px; border-radius: 999px; font-size: 14px; }
@media (min-width: 1100px) { .account-btn .acct-name { display: inline; } }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font: 800 13px/1 var(--display); color: #fff; background: var(--center);
}
.avatar[data-b="left"] { background: var(--left); } .avatar[data-b="right"] { background: var(--right); }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
@media (max-width: 420px) {
  .brand-name { font-size: 18px; }
  .brand { gap: 7px; }
  .top { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .lean-picker { padding: 3px; gap: 2px; }
  .lean-picker button { width: 34px; height: 38px; font-size: 18px; }
  .account-btn .acct-name.show { padding: 9px 11px; font-size: 13px; }
}

/* Sign-in dialog */
.auth { border: 0; padding: 0; border-radius: 20px; width: min(440px, calc(100% - 24px)); background: var(--bg); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.auth::backdrop { background: rgb(0 0 0 / .5); }
#auth-body { padding: 22px 20px 20px; position: relative; }
#auth-body h2 { font-size: 26px; margin: 6px 48px 8px 0; }
#auth-body .drawer-close { position: absolute; top: 12px; right: 12px; margin: 0; float: none; }
#auth-body .switch { margin: 14px 0 0; text-align: center; }
.stack { display: grid; gap: 12px; margin-top: 12px; }
.stack label, .stack fieldset { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.stack fieldset { border: 0; padding: 0; margin: 0; }
.stack legend { padding: 0; margin-bottom: 6px; }
.stack input, .stack select, .stack textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px;
  background: var(--surface); font-size: 16px; font-weight: 400;
}
.form-error { color: var(--right); font-weight: 600; margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.btn.big { min-height: 50px; font-size: 16px; justify-content: center; }

/* < ^ > radio group used in forms */
.lean-radio { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lean-radio label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.lean-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lean-radio .sym { font: 800 17px/1 var(--mono); }
.lean-radio label:has(input:checked)[data-b="left"] { background: var(--left); color: #fff; }
.lean-radio label:has(input:checked)[data-b="center"] { background: var(--center); color: #fff; }
.lean-radio label:has(input:checked)[data-b="right"] { background: var(--right); color: #fff; }
.lean-radio label:has(input:focus-visible) { outline: 3px solid var(--center); outline-offset: 2px; }

/* "How do you see them?" */
.tag-block { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 14px; padding: 12px 14px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.tag-block .small { margin-top: 2px; }

/* Takes */
.take-form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.take .tagbar { margin-top: 8px; }
.take .tagbar button { min-height: 34px; min-width: 44px; }
.take .who a { text-decoration: none; }
.take .who { flex-wrap: wrap; }
.signin-nudge { background: var(--surface); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.signin-nudge p { margin: 0 0 10px; }

/* ---------- News: sidebar + feed + rail ---------- */
.news-shell { display: block; }
.news-main { min-width: 0; }
.news-head { margin: 4px 0 14px; }
.news-head h1 { font-size: clamp(28px, 6vw, 40px); font-weight: 800; }
.news-head p { margin: 4px 0 0; }
.filter-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 12px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-weight: 700; cursor: pointer; text-align: left;
}
.filter-btn .muted { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side {
  position: fixed; z-index: 35; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
  background: var(--bg); overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); box-shadow: 10px 0 40px rgb(0 0 0 / .2);
}
.side.open { transform: none; }
.side-scrim { position: fixed; inset: 0; z-index: 34; background: rgb(0 0 0 / .4); opacity: 0; pointer-events: none; transition: opacity .25s; }
.side-scrim.open { opacity: 1; pointer-events: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 18px; }
.side-x { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); font-size: 24px; cursor: pointer; }
.side-search { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; font-size: 16px; }
.side-group { margin-top: 18px; display: grid; gap: 2px; }
.side-group h4 { margin: 0 0 6px 10px; font: 700 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.side-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 15px;
}
.side-item:hover { background: var(--surface); color: var(--ink); }
.side-item.on { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--ink); }
.side-item .ico { width: 22px; text-align: center; font-size: 17px; flex: none; }
.side-item b { display: block; font-weight: 700; color: inherit; }
.side-item small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.side-item .n { margin-left: auto; font: 600 12px var(--mono); color: var(--ink-2); }
.side-item .lens-sym { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 800 15px/1 var(--mono); background: var(--surface-2); flex: none; }
.side-item.on .lens-sym[data-b="left"] { background: var(--left); color: #fff; }
.side-item.on .lens-sym[data-b="center"] { background: var(--center); color: #fff; }
.side-item.on .lens-sym[data-b="right"] { background: var(--right); color: #fff; }
.side-item[data-lens]:not(.on) { opacity: .55; text-decoration: line-through; }
.side-group select { margin: 6px 0 0 10px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; font-size: 16px; width: calc(100% - 10px); }
.side-note { display: block; margin: 6px 0 0 10px; font-size: 12px; }
.side-link { display: block; margin: 18px 0 0 10px; font-weight: 700; color: var(--ink-2); text-decoration: none; }
.side-link:hover { color: var(--ink); }
.side-done { width: 100%; margin-top: 18px; position: sticky; bottom: 0; }

.rail-side { display: none; }
.rail-inline { margin-bottom: 14px; }
.rail-more { margin-top: 12px; display: grid; gap: 12px; }
.rail-more > summary { list-style: none; cursor: pointer; min-height: 56px; padding: 10px 16px; border-radius: var(--radius); display: grid; gap: 2px; align-content: center;
  background: var(--surface); box-shadow: var(--shadow); }
.rail-more > summary::-webkit-details-marker { display: none; }
.rail-more > summary b { font: 800 16px/1.2 var(--display); }
.rail-more > summary small { color: var(--ink-2); font-size: 13px; }
.rail-more > summary::after { content: "Show ▾"; position: absolute; right: 16px; font: 700 13px var(--body); color: var(--center); }
.rail-more[open] > summary::after { content: "Hide ▴"; }
.rail-more > summary { position: relative; }
.rail-more > .rail-box { margin: 0; }

@media (min-width: 900px) {
  .news-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
  .side {
    position: sticky; top: 76px; z-index: 1; width: auto; max-height: calc(100vh - 92px); transform: none; box-shadow: none;
    padding: 0 6px 20px 0; background: transparent; transition: none;
  }
  .side-head, .side-done, .side-scrim, .filter-btn { display: none; }
  .side-search { margin-top: 2px; }
  .topic-list { display: grid; gap: 2px; }
}
@media (min-width: 1180px) {
  .news-shell:not(.wide) { grid-template-columns: 230px minmax(0, 1fr) 300px; }
  .rail-inline { display: none; }
  .rail-side { display: grid; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
}

/* Sources list (replaces the wide table so it works on phones) */
.src-list { display: grid; gap: 8px; }
.src-row {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: center;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; border-left: 5px solid var(--c);
}
.src-row[data-b="left"] { --c: var(--left); } .src-row[data-b="center"] { --c: var(--center); } .src-row[data-b="right"] { --c: var(--right); }
.src-name small { display: block; }
.src-lean { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (min-width: 760px) { .src-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; } }

/* Sub-navigation (Congress: seating chart / roster) */
.subnav { display: flex; gap: 4px; margin: 0 0 6px; border-bottom: 1px solid var(--line); }
.subnav a { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 700; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subnav a.on { color: var(--ink); border-bottom-color: var(--ink); }

/* Verified official badge */
.vbadge { display: inline-flex; vertical-align: -3px; margin-left: 4px; width: 18px; height: 18px; flex: none; }
.vbadge svg { width: 100%; height: 100%; }
.vbadge svg path:first-child { fill: var(--verified); }
.vbadge svg .tick { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.vbadge.lg { width: 26px; height: 26px; vertical-align: -4px; }
.claim-box { margin-top: 14px; padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.claim-box p { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
.claim-box.verified { border-left: 4px solid var(--verified); }

/* Claim page + admin queue */
.claim-page { max-width: 640px; }
.claim-page .back { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; text-decoration: none; color: var(--ink-2); }
.claim-head { display: flex; gap: 14px; align-items: center; margin: 6px 0 16px; }
.claim-head img { width: 64px; height: 78px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.claim-head h1 { font-size: clamp(24px, 6vw, 34px); }
.claim-head p { margin: 4px 0 0; }
.claim-steps { padding-left: 20px; display: grid; gap: 8px; margin: 0 0 18px; }
.notice { background: var(--surface); border-radius: 12px; padding: 14px; box-shadow: var(--shadow); border-left: 4px solid var(--center); }
.notice.ok { border-left-color: var(--verified); }
.stack .radio { display: flex; gap: 10px; align-items: center; font-weight: 500; min-height: 44px; }
.stack .radio input { width: 20px; height: 20px; min-height: 0; }
.claim-list { display: grid; gap: 12px; }
.claim-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.claim-card h3 { font-size: 20px; }
.claim-card p { margin: 6px 0; font-size: 14px; }
.claim-card blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--ink-2); }
.claim-cols { display: grid; gap: 14px; }
@media (min-width: 860px) { .claim-cols { grid-template-columns: 1.3fr 1fr; } }
.claim-check { background: var(--surface-2); border-radius: 12px; padding: 12px; }
.review-note { flex: 1 1 220px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: var(--bg); font-size: 16px; }
.badge.ok-b { background: color-mix(in srgb, var(--verified) 18%, transparent); color: var(--verified); }

/* News: the < ^ > Left / Center / Right control, pinned under the header */
.lcr {
  position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 5;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 0 14px; padding: 6px 0;
  background: var(--bg);
}
.lcr button {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); cursor: pointer; text-align: left;
  transition: border-color .15s, background .15s, color .15s, opacity .15s;
}
.lcr-sym { font: 800 26px/1 var(--mono); width: 30px; text-align: center; flex: none; }
.lcr-txt b { display: block; font: 800 17px/1.1 var(--display); }
.lcr-txt small { font: 600 12px var(--mono); opacity: .8; }
.lcr-bar { position: absolute; left: 0; bottom: 0; height: 4px; background: currentColor; opacity: .5; }
.lcr button[data-b="left"].on { border-color: var(--left); color: var(--left); background: var(--left-soft); }
.lcr button[data-b="center"].on { border-color: var(--center); color: var(--center); background: var(--center-soft); }
.lcr button[data-b="right"].on { border-color: var(--right); color: var(--right); background: var(--right-soft); }
.lcr button:not(.on) { opacity: .55; }
.lcr button:not(.on) .lcr-txt b { text-decoration: line-through; }
@media (max-width: 520px) {
  .lcr { gap: 5px; }
  .lcr button { flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 4px; text-align: center; }
  .lcr-sym { font-size: 22px; width: auto; }
  .lcr-txt b { font-size: 15px; }
  .lcr-txt small { font-size: 11px; }
}

/* Password field with show/hide */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 52px !important; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 18px; opacity: .55; border-radius: 10px; }
.pw-eye.on { opacity: 1; background: var(--surface-2); }
.forgot { justify-self: center; margin-top: 2px; min-height: 40px; }
.form-error .linkish { font-size: inherit; }

/* Profile photos (same box as initials avatars) */
img.avatar.photo { object-fit: cover; background: var(--surface-2); padding: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 112px; height: 112px; font-size: 34px; }

/* "Where" switch in the header */
.geo-scrim { position: fixed; inset: 0; z-index: 55; background: transparent; }
.geo-btn { position: relative; z-index: 57; }
.geo-scrim[hidden], .geo-menu[hidden] { display: none; }
.geo { position: relative; }
.geo-btn { min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.geo-menu { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: min(300px, calc(100vw - 24px)); background: var(--bg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgb(0 0 0 / .25); padding: 8px; display: grid; gap: 2px; }
.geo-menu [data-geo] { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; color: var(--ink); font-size: 15px; }
.geo-menu [data-geo] small { margin-left: auto; color: var(--ink-2); font-size: 12px; }
.geo-menu [data-geo]:hover { background: var(--surface); }
.geo-menu [aria-checked="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--ink); }
.geo-pick { display: grid; gap: 4px; padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.geo-pick select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; font-size: 16px; color: var(--ink); }
.geo-links { display: grid; gap: 2px; padding: 6px 10px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.geo-links a { min-height: 36px; display: flex; align-items: center; font-weight: 700; text-decoration: none; }
.geo-note { margin: 4px 10px 6px; font-size: 12px; color: var(--ink-2); }
@media (max-width: 640px) {
  .geo-menu { position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; width: auto; max-height: calc(100vh - 160px); overflow-y: auto; }
}
@media (max-width: 540px) {
  .brand-name { display: none; }
  .geo { min-width: 0; flex-shrink: 1; max-width: 32vw; }
  .geo-btn { max-width: 100%; padding: 0 10px; font-size: 13px; }
  #account-btn, .lean-picker { flex-shrink: 0; }
}

/* Phone "More" tab + sheet */
.bottom-nav .more-tab { border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.bottom-nav .more-tab.on { color: var(--ink); }
.bottom-nav .more-tab.on .ico { color: var(--center); }
.more-sheet { position: fixed; inset: 0; z-index: 70; }
.more-sheet[hidden] { display: none; }
.more-scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .45); }
.more-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; animation: more-up .22s ease-out; }
@keyframes more-up { from { transform: translateY(30px); opacity: 0; } }
.more-grab { grid-column: 1 / -1; width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 6px; }
.more-panel a { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-height: 64px; padding: 10px; border-radius: 14px; background: var(--surface); text-decoration: none; box-shadow: var(--shadow); }
.more-panel a span { grid-row: 1 / span 2; font-size: 20px; text-align: center; }
.more-panel a b { font-size: 15px; }
.more-panel a small { color: var(--ink-2); font-size: 12px; line-height: 1.3; }
/* Desktop: the same menu, as a drop-down under the More tab */
.more-tab-desk { border: 0; background: none; cursor: pointer; font: inherit; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink-2); min-height: 40px; display: flex; align-items: center; gap: 4px; }
.more-tab-desk:hover { color: var(--ink); }
.more-tab-desk.on, .more-tab-desk[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); }
@media (min-width: 1024px) {
  .more-scrim { background: rgb(0 0 0 / .18); }
  .more-panel {
    top: var(--more-y, 72px); left: var(--more-x, auto); right: auto; bottom: auto; width: min(640px, calc(100vw - 32px));
    max-height: calc(100vh - var(--more-y, 72px) - 24px); border-radius: 18px; padding: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr)); animation: more-down .18s ease-out;
  }
  .more-grab { display: none; }
}
@keyframes more-down { from { transform: translateY(-8px); opacity: 0; } }
/* Header never squeezes Sign in; the "My lean" label shows only when there's room */
#account-btn { flex-shrink: 0; white-space: nowrap; }
@media (min-width: 1400px) { .lean-label { display: inline; } }
@media (prefers-reduced-motion: reduce) { .more-panel { animation: none; } }

/* Touch preview card (states map, Congress seats): same facts as the mouse hover tooltip */
.touch-preview {
  position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px 44px 14px 16px; max-width: 520px; margin: 0 auto;
  border-radius: 20px; background: var(--glass-sheet, var(--bg)); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-rim, transparent), 0 0 24px -6px color-mix(in srgb, var(--center) 55%, transparent), 0 12px 30px rgb(0 0 0 / .25);
  animation: tp-in .18s ease-out;
}
.touch-preview .tp-body { font-size: 14px; line-height: 1.45; min-width: 0; }
.touch-preview .tp-body b { display: block; font: 800 17px/1.2 var(--display); }
.touch-preview .btn { min-height: 44px; white-space: nowrap; }
.tp-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; border: 0; background: none; font-size: 24px; color: var(--ink-2); cursor: pointer; }
@keyframes tp-in { from { transform: translateY(12px); opacity: 0; } }
@media (min-width: 1024px) { .touch-preview { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .touch-preview { animation: none; } }

/* Member photo that failed to load: initials in the same box */
.ph-fallback { display: inline-grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); font: 800 18px var(--display); border-radius: 12px; object-fit: cover; }

/* Tap targets: 44px touchable areas on phones and tablets without changing how anything looks */
.lean-picker button, .tabs a, .geo-btn { position: relative; }
.lean-picker button::after { content: ""; position: absolute; inset: -6px -5px; }
@media (max-width: 1023px) {
  #more.btn { min-height: 44px; }
}

/* Tightest desktop band (1024-1099px): the logo keeps its mark, and the header stays one row */
@media (min-width: 1024px) and (max-width: 1099px) {
  .top { gap: 10px; }
  .brand-name { display: none; }
  .tabs { margin-left: 4px; }
  .tabs a, .more-tab-desk { padding: 8px 11px; }
}
