/* ============ Tokens ============ */
:root {
  --bg: #f6f3f1;
  --surface: #ffffff;
  --surface-2: #efe9e6;
  --ink: #120d12;
  --muted: #5e5662;
  --line: #e6dfdb;
  --brand: #e8175d;
  --brand-2: #7b4dff;
  --on-brand: #ffffff;
  --lime: #d6ff3d;
  --for: #0f8a45; --for-bg: #dff5e8;
  --against: #d93a40; --against-bg: #fde6e6;
  --mixed: #a26a0b; --mixed-bg: #fbefd7;
  --ghost: #77768c; --ghost-bg: #ebeaf2;
  --shadow: 0 1px 2px rgb(20 20 40 / .05), 0 8px 24px -12px rgb(20 20 40 / .18);
  --r: 22px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --tabbar-h: 68px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #100c10;
  --surface: #1b161b;
  --surface-2: #262027;
  --ink: #f5f0f1;
  --muted: #b0a6ae;
  --line: #322a32;
  --brand: #ff5c93;
  --brand-2: #9d7bff;
  --on-brand: #1a0710;
  --for: #4ade80; --for-bg: #12301f;
  --against: #ff7477; --against-bg: #3a1719;
  --mixed: #f5c451; --mixed-bg: #382b0f;
  --ghost: #a9a8c2; --ghost-bg: #24233a;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; }
h2 { font-size: 1.55rem; margin: 0 0 4px; }
h3 { font-size: 1.15rem; margin: 0 0 6px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 40px; outline: none; min-height: 70vh; }

/* ============ Top bar & nav ============ */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.logo { gap: 0; }
.logo-mark { width: 30px; height: 30px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; margin-right: 8px; transform: rotate(-6deg); }
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }
.logo-yr { color: var(--brand); }
.logo-chip { margin-left: 8px; font-family: Inter, sans-serif; font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); }
.icon-btn { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); text-decoration: none; flex: none; }
.desk-nav { display: none; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; border-radius: 16px; }
.tabbar a[aria-current] { color: var(--brand); }
.tabbar a[aria-current] .icon { background: color-mix(in srgb, var(--brand) 14%, transparent); border-radius: 999px; padding: 3px 14px; width: 52px; height: 30px; }
.tabbar a[data-nav="match"] .icon { color: var(--brand); }
body[data-view="match"] .tabbar { display: none; }
body[data-view="match"] { padding-bottom: env(safe-area-inset-bottom); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .desk-nav { display: flex; gap: 4px; margin: 0 auto; }
  .desk-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
  .desk-nav a .icon { width: 18px; height: 18px; }
  .desk-nav a:hover { background: var(--surface-2); color: var(--ink); }
  .desk-nav a[aria-current] { background: var(--ink); color: var(--bg); }
  .icon-btn { margin-left: 0; }
}

/* ============ Type & small parts ============ */
.display { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 9vw, 4.6rem); line-height: .95; letter-spacing: -.035em; margin: 14px 0 12px; }
.display.sm { font-size: clamp(2.1rem, 7vw, 3.2rem); }
.hl { background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-theme="dark"] .hl { background: none; color: var(--lime); }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 56ch; margin: 0 0 18px; }
.lede b { color: var(--ink); }
.eyebrow { margin: 0 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.eyebrow.pad { margin-top: 16px; }
.fine { font-size: .82rem; color: var(--muted); }
.hint { font-size: .9rem; color: var(--muted); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; }
.hint.disputed { background: var(--mixed-bg); color: var(--ink); border-left: 3px solid var(--mixed); }
.hint.disputed p { margin: 4px 0; color: var(--muted); }
.tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 999px; background: var(--mixed-bg); color: var(--mixed); vertical-align: middle; }
.back { display: inline-block; margin: 8px 0; font-weight: 600; text-decoration: none; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--muted); }
.boot { display: grid; place-items: center; min-height: 40vh; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 0; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; font-size: 1rem; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn.soft { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.soft:hover { background: var(--surface-2); }
.btn.xl { padding: 16px 24px; font-size: 1.08rem; }
.btn.block { display: flex; width: 100%; margin-top: 16px; }
.btn-tag { background: var(--lime); color: #0d0d12; border-radius: 999px; padding: 2px 9px; font-size: .78rem; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.search { width: 100%; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }

/* Party pill */
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 11px 4px 8px; font-size: .84rem; font-weight: 600; cursor: pointer; margin: 0 4px 4px 0; }
.pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.pill:hover { border-color: var(--c); }
.more { font-size: .82rem; color: var(--muted); font-weight: 600; padding: 4px; }

/* Avatar */
.avatar { --size: 48px; position: relative; flex: none; width: var(--size); height: var(--size); border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--ring) 20%, var(--surface)); box-shadow: 0 0 0 2.5px var(--ring); margin: 3px; }
.avatar span { font-weight: 800; color: var(--ring); font-size: calc(var(--size) * .36); font-family: var(--display); }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

/* ============ Home ============ */
.hero { padding: 18px 0 10px; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--for); box-shadow: 0 0 0 0 var(--for); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.cta-row .btn { flex: 1 1 240px; }
.steps { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps li { background: var(--surface); border-radius: 16px; padding: 10px; font-size: .84rem; font-weight: 600; line-height: 1.25; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.steps span { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .88rem; }
.trust b { color: var(--ink); }

.block { margin-top: 40px; }
.block-head { margin-bottom: 14px; }
.block-head p { margin: 0; color: var(--muted); }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.ghost-card { scroll-snap-align: start; background: var(--surface); border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border-top: 5px solid var(--c); transition: transform .15s; }
.ghost-card:hover { transform: translateY(-2px); }
.gc-top { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 1.1rem; }
.gc-num { font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--muted); margin: 10px 0 0; }
.gc-num span { font-size: 3rem; color: var(--ink); letter-spacing: -.04em; }
.gc-label { margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.ghost-card ul { margin: 0; padding: 0; list-style: none; }
.ghost-card li { font-size: .88rem; padding: 4px 0; border-top: 1px dashed var(--line); }
.ghost-card li::before { content: "👻 "; }

.bento, .issue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.clash, .issue-card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.issue-card .q { color: var(--muted); font-size: .9rem; margin: 0 0 10px; }
.side { display: grid; grid-template-columns: 96px 1fr; gap: 6px; align-items: start; padding: 7px 0; border-top: 1px solid var(--line); }
.side > span { font-size: .8rem; font-weight: 700; padding-top: 5px; }
.side.for > span { color: var(--for); }
.side.against > span { color: var(--against); }
.side.mixed > span { color: var(--mixed); }
.side.ghost > span { color: var(--ghost); }
.side.ghost .pill { opacity: .75; border-style: dashed; }

.cta-band { margin: 44px 0 10px; padding: 28px 22px; border-radius: 28px; text-align: center; color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--brand-2) 0%, var(--brand) 50%, #4a0b26 100%); }
.cta-band h2 { font-size: clamp(1.6rem, 6vw, 2.3rem); }
.cta-band p { opacity: .85; margin: 6px 0 18px; }
.cta-band .btn.primary { background: var(--lime); color: #0d0d12; box-shadow: none; }

/* ============ Page heads & filters ============ */
.page-head { padding-top: 10px; }
.filters { margin-bottom: 8px; }
.filters .row-between { margin: 10px 0 4px; }
.view-toggle { display: none; }
@media (min-width: 860px) {
  .filters { position: sticky; top: 61px; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 0 2px; }
  .view-toggle { display: inline-block; }
}
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 2px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* Table view */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .88rem; }
.matrix th, .matrix td { padding: 6px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix thead th { position: sticky; top: 0; background: var(--surface); font-size: .78rem; }
.matrix thead th a { color: var(--ink); text-decoration: none; }
.matrix th.issue { text-align: left; position: sticky; left: 0; background: var(--surface); min-width: 170px; font-weight: 600; z-index: 1; }
.cell { width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer; font-size: 1rem; }
.cell.for { background: var(--for-bg); } .cell.against { background: var(--against-bg); } .cell.mixed { background: var(--mixed-bg); }
.cell.ghost { background: transparent; border: 1.5px dashed var(--line); opacity: .7; }

/* ============ Match ============ */
.match-intro { text-align: center; padding: 10px 0 30px; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.match-intro .lede { margin: 0 auto 8px; }
.match-intro .btn.xl { min-width: 240px; }
.stack-preview { position: relative; width: 260px; height: 150px; margin: 18px auto 0; }
.mini-card { position: absolute; inset: 0; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  transform: rotate(calc((var(--i) - 1) * 7deg)) translateY(calc(var(--i) * -4px)); z-index: calc(3 - var(--i)); animation: float 4s ease-in-out infinite; animation-delay: calc(var(--i) * -1.3s); }
.mini-card span { font-size: 2rem; }
@keyframes float { 50% { translate: 0 -6px; } }

.quiz { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100dvh - 90px); padding-bottom: 12px; }
.quiz-top { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; }
.quiz-top .icon-btn { margin: 0; }
.progress { flex: 1; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: inherit; transition: width .3s ease; }
.count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 44px; text-align: right; }
.deck { position: relative; flex: 1; min-height: 380px; max-height: 540px; }
.qcard {
  position: absolute; inset: 0; background: var(--surface); border-radius: 30px; box-shadow: var(--shadow); padding: 26px 24px;
  display: flex; flex-direction: column; justify-content: center; text-align: center; touch-action: none; user-select: none; cursor: grab;
  transform: translateY(calc(var(--depth) * 14px)) scale(calc(1 - var(--depth) * .05)); transition: transform .3s ease, opacity .3s ease;
  border: 1px solid var(--line); --yeah: 0; --nah: 0;
}
.qcard[style*="--depth:1"], .qcard[style*="--depth:2"] { opacity: .7; pointer-events: none; }
.qcard.dragging { transition: none; cursor: grabbing; }
.qcard.leaving { transition: transform .26s ease-in, opacity .26s ease-in; }
.q-emoji { font-size: 4.4rem; line-height: 1; margin: 6px 0 14px; }
/* Hinge-style prompt card: small prompt line, big answer. */
.prompt-box { background: var(--surface-2); border-radius: 20px; padding: 16px 18px; text-align: left; }
.prompt { margin: 0 0 6px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.qcard h2 { font-size: clamp(1.6rem, 6.2vw, 2.1rem); margin: 0; }
.q-sub { color: var(--muted); margin: 12px 0 0; font-size: .95rem; }
/* Drag feedback: a big ♥ or ✕ fades in as the card is dragged right or left. */
.react { position: absolute; top: 22px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; }
.react.like { right: 22px; color: var(--brand); opacity: var(--yeah); transform: scale(calc(.6 + var(--yeah) * .4)); }
.react.nope { left: 22px; color: var(--ink); opacity: var(--nah); transform: scale(calc(.6 + var(--nah) * .4)); }
.quiz-actions { display: flex; justify-content: center; align-items: center; gap: 26px; padding: 18px 0 26px; }
.round { position: relative; width: 70px; height: 70px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; color: var(--ink); transition: transform .12s; }
.round span { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .74rem; font-weight: 700; color: var(--muted); }
.round:active { transform: scale(.9); }
.round.yeah { background: var(--brand); border-color: var(--brand); color: #fff; }
.round.nah:hover { background: var(--surface-2); }
.quiz-actions .skip { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .85rem; text-decoration: underline; cursor: pointer; padding: 8px; }
.kbd-hint { text-align: center; display: none; }
@media (hover: hover) { .kbd-hint { display: block; } }

/* Result */
.result { max-width: 640px; margin: 0 auto; }
.friend-banner { background: var(--lime); color: #0d0d12; border-radius: 16px; padding: 12px 16px; font-weight: 600; margin: 8px 0; }
.friend-banner a { color: #0d0d12; }
/* Story card: built to be screenshotted as-is (9:16, same look in light and dark). */
.story { --c: #e8175d; margin: 8px auto 0; width: min(100%, 420px); aspect-ratio: 9 / 16; border-radius: 30px; padding: 18px 16px 14px; color: #fff;
  display: flex; flex-direction: column; position: relative;
  background: linear-gradient(165deg, #ff2e74 0%, #7b4dff 55%, #22093a 100%); box-shadow: 0 24px 50px -20px rgb(60 10 60 / .55);
  animation: pop .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.story-bar { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.story-logo { font-family: var(--display); font-size: 1.05rem; letter-spacing: -.02em; }
.story-tag { opacity: .8; }
.story-kicker { font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem, 11vw, 2.8rem); line-height: 1; letter-spacing: -.035em; margin: 12px 0 0; }
.story-sub { margin: 0 0 8px; opacity: .88; font-size: .95rem; }
.story-top { background: rgb(255 255 255 / .16); border-radius: 20px; padding: 10px; }
.story-top-row { display: flex; align-items: center; gap: 10px; }
.story-top .avatar { box-shadow: 0 0 0 3px #fff; }
.story-name { font-family: var(--display); font-weight: 800; font-size: 1.6rem; line-height: 1.05; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.story-pct { font-family: var(--display); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--lime); letter-spacing: -.03em; }
.story-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.story-stats span { background: rgb(255 255 255 / .18); border-radius: 999px; padding: 2px 8px; font-size: .76rem; }
.story-of { margin: 6px 0 0; font-size: .76rem; opacity: .85; }
.story-label { font-family: var(--display); font-weight: 800; font-size: .95rem; margin: 10px 0 5px; }
.story-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; flex: 1; align-content: start; }
.story-list li { display: flex; align-items: center; gap: 8px; background: rgb(255 255 255 / .1); border-radius: 12px; padding: 5px 10px; }
.sl-rank { font-family: var(--display); font-weight: 800; opacity: .6; width: 12px; }
.sl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sl-name { font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-bar { height: 6px; background: rgb(255 255 255 / .2); border-radius: 999px; overflow: hidden; }
.sl-bar span { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.sl-counts { font-size: .7rem; opacity: .85; }
.sl-pct { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.story-legend { font-size: .62rem; opacity: .75; margin: 7px 0 2px; text-align: center; }
.story-foot { font-size: .74rem; margin: 0; text-align: center; color: var(--lime); }
.story-tag.full { color: var(--lime); opacity: 1; }
/* Compact share bar: round brand-coloured icons, the standard share-row pattern. */
.share-bar { display: flex; justify-content: center; gap: 6px; max-width: 420px; margin: 12px auto 0; }
.share-bar button { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--bg); color: var(--fg); transition: transform .12s; }
.share-bar button:hover { transform: translateY(-2px); }
.share-bar button:active { transform: scale(.92); }
.share-bar svg { width: 19px; height: 19px; }
.linkish { border: 0; background: none; padding: 0; color: var(--brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.share-label { text-align: center; margin: 16px 0 0; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.share-label + .share-bar { margin-top: 8px; }
.deeper { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 16px auto 0; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--brand-2) 14%, var(--surface))); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.deeper > span:first-child { font-size: 1.8rem; }
.deeper > span:nth-child(2) { flex: 1; font-size: .88rem; color: var(--muted); }
.deeper b { display: block; color: var(--ink); font-size: 1rem; }
.deeper > span:last-child { font-size: 1.3rem; font-weight: 800; color: var(--brand); }
/* The "go deeper?" gate card replaces the swipe buttons. */
.quiz.gated .quiz-actions, .quiz.gated .kbd-hint { visibility: hidden; }
.qcard.gate { cursor: default; touch-action: auto; }
.qcard.gate .q-sub b { color: var(--ink); }
.gate-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.quiz-top .stop { white-space: nowrap; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 16px auto 4px; max-width: 420px; }
.share-row .btn { flex: 1 1 170px; }
.center { text-align: center; }
.r-meta .of { opacity: .75; }
.list-title { margin: 22px 0 10px; }
.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ranking details { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.ranking summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.ranking summary::-webkit-details-marker { display: none; }
.rank { font-family: var(--display); font-weight: 800; color: var(--muted); width: 18px; }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.r-name { font-weight: 700; }
.bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c); border-radius: inherit; }
.r-meta { font-size: .78rem; color: var(--muted); }
.r-pct { font-family: var(--display); font-weight: 800; font-size: 1.4rem; }
.breakdown { list-style: none; margin: 0; padding: 0 10px 10px; }
.bd-row { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 0; background: none; padding: 9px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.bd-row:hover { background: var(--surface-2); }
.bd-q { font-weight: 600; font-size: .9rem; }
.bd-you { font-size: .78rem; color: var(--muted); grid-row: 2; }
.bd-v { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: .78rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.bd-v.agree { background: var(--for-bg); color: var(--for); } .bd-v.clash { background: var(--against-bg); color: var(--against); }
.bd-v.ghost { background: var(--ghost-bg); color: var(--ghost); } .bd-v.mixed { background: var(--mixed-bg); color: var(--mixed); }

/* ============ Parties ============ */
.legend-inline { font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: 6px; }
.lg.for { background: var(--for); } .lg.against { background: var(--against); } .lg.mixed { background: var(--mixed); } .lg.ghost { background: var(--ghost-bg); border: 1px dashed var(--ghost); }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.party-card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .15s; position: relative; overflow: hidden; }
.party-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.party-card:hover { transform: translateY(-2px); }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-top h3 { margin: 0; }
.pc-top p { margin: 0; font-size: .85rem; color: var(--muted); }
.you-pct { margin-left: auto; font-family: var(--display); font-weight: 800; background: var(--lime); color: #0d0d12; border-radius: 999px; padding: 4px 10px; font-size: .95rem; }
.you-pct.big { font-size: 1.6rem; padding: 8px 14px; text-align: center; line-height: 1; }
.you-pct small { display: block; font-size: .62rem; font-family: Inter, sans-serif; font-weight: 700; text-transform: uppercase; }
.stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 14px 0 8px; gap: 2px; }
.stack .for { background: var(--for); } .stack .against { background: var(--against); } .stack .mixed { background: var(--mixed); } .stack .ghost { background: var(--ghost-bg); }
.pc-meta { margin: 0; font-size: .82rem; color: var(--muted); }
.more-parties { margin-top: 16px; background: var(--surface); border-radius: var(--r); padding: 14px 16px; }
.more-parties summary { cursor: pointer; font-weight: 700; }
.more-parties ul { columns: 2 220px; font-size: .9rem; }

.p-hero { display: flex; gap: 16px; align-items: center; padding: 20px; border-radius: 28px; color: #fff; flex-wrap: wrap;
  background: linear-gradient(150deg, var(--c) 0%, color-mix(in srgb, var(--c) 55%, #0d0d12) 100%); }
.p-hero > div { flex: 1 1 200px; }
.p-hero .display { margin: 0; }
.p-hero p { margin: 4px 0 0; opacity: .9; }
.p-hero .fine { color: rgb(255 255 255 / .8); }
.p-hero .avatar { box-shadow: 0 0 0 4px #fff; }
.tldr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.tile { border-radius: 18px; padding: 12px; text-align: center; }
.tile b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.tile span { font-size: .78rem; font-weight: 600; }
.tile.for { background: var(--for-bg); color: var(--for); } .tile.against { background: var(--against-bg); color: var(--against); } .tile.ghost { background: var(--ghost-bg); color: var(--ghost); }
.p-section { margin-top: 26px; }
.p-section h2 { display: flex; align-items: center; gap: 8px; }
.count-chip { font-family: Inter, sans-serif; font-size: .8rem; padding: 2px 9px; border-radius: 999px; }
.count-chip.for { background: var(--for-bg); color: var(--for); } .count-chip.against { background: var(--against-bg); color: var(--against); }
.count-chip.mixed { background: var(--mixed-bg); color: var(--mixed); } .count-chip.ghost { background: var(--ghost-bg); color: var(--ghost); }
.takes { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.takes li.extra { display: none; }
.p-section.expanded .takes li.extra { display: block; }
.takes details { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.takes summary { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; list-style: none; }
.takes summary::-webkit-details-marker { display: none; }
.t-emoji { font-size: 1.3rem; }
.t-sum { display: block; font-size: .9rem; color: var(--muted); margin-top: 2px; }
.takes .sources { padding: 0 14px 12px 48px; }
.ghost-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.gchip { font-size: .84rem; border: 1.5px dashed var(--ghost); color: var(--ghost); border-radius: 999px; padding: 4px 11px; background: var(--ghost-bg); }
.gchip.noted { border-style: solid; cursor: help; }
.notes, .bullets { font-size: .9rem; padding-left: 18px; }
.notes li, .bullets li { margin-bottom: 6px; }
.notes { color: var(--muted); }

/* Members */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.members.tight { grid-template-columns: 1fr; }
.member { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: var(--surface); border-radius: 16px; border: 1px solid var(--line); min-width: 0; }
.member-txt { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.member-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.member-name:hover { text-decoration: underline; }
.member small, .member-txt > span { font-size: .8rem; color: var(--muted); }
.dot-label { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.dot-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.dot-label a { color: inherit; }
.credit { font-size: .75rem; color: var(--muted); text-decoration: none; align-self: flex-start; }

/* ============ Map ============ */
.map-tools { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.zoom-btns { display: flex; gap: 6px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; align-items: start; }
#map { height: 560px; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); z-index: 0; }
.seat-panel { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); position: sticky; top: 76px; max-height: 560px; overflow: auto; scroll-margin-top: 76px; }
.seat-panel h2 { margin-bottom: 10px; }
.more-parties h3 { margin-top: 16px; }
.leaflet-container { font: inherit; }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
[data-theme="dark"] .leaflet-bar a, [data-theme="dark"] .leaflet-control-attribution { background: var(--surface); color: var(--ink); }
@media (max-width: 860px) {
  .map-layout { grid-template-columns: 1fr; }
  #map { height: 400px; }
  .seat-panel { position: static; max-height: none; }
}
@media (max-width: 480px) { .map-tools { grid-template-columns: 1fr; } }

/* ============ About ============ */
.how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.how { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.how > span { font-size: 1.8rem; }
.how p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); }
.faq { margin-top: 20px; display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: 16px; padding: 14px 16px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { color: var(--muted); }
.reg-list { columns: 2 240px; font-size: .9rem; padding-left: 18px; }

/* ============ Sheet, sources, toast ============ */
.sheet { border: 0; padding: 20px 18px 24px; background: var(--surface); color: var(--ink); width: min(540px, 100%); max-height: 85dvh; border-radius: 28px; box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
.sheet::backdrop { background: rgb(10 10 20 / .45); backdrop-filter: blur(3px); }
.sheet[open] { animation: rise .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: -8px auto 10px; display: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; }
.sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding-right: 40px; }
.sheet-head h3 { margin: 0; font-size: 1.35rem; }
.sheet-lead { font-size: 1.05rem; }
.sheet h4 { margin: 16px 0 4px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stance-chip { display: inline-block; font-weight: 700; padding: 5px 12px; border-radius: 999px; font-size: .9rem; }
.stance-chip.for { background: var(--for-bg); color: var(--for); } .stance-chip.against { background: var(--against-bg); color: var(--against); }
.stance-chip.mixed { background: var(--mixed-bg); color: var(--mixed); } .stance-chip.ghost { background: var(--ghost-bg); color: var(--ghost); } .stance-chip.na { background: var(--surface-2); }
.hint.q { background: none; padding: 6px 0 0; }
@media (max-width: 640px) {
  .sheet { margin: auto 0 0; max-width: 100%; width: 100%; border-radius: 28px 28px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .sheet-grip { display: block; }
}
.sources { list-style: none; padding: 0; margin: 0; }
.sources li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; }
.sources small { display: block; color: var(--muted); }
.src-type { font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; margin-right: 6px; background: var(--surface-2); color: var(--muted); }
.src-type.party { background: var(--for-bg); color: var(--for); }
.src-type.government, .src-type.official { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.src-type.aggregator { background: var(--mixed-bg); color: var(--mixed); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 600; z-index: 60; transition: .25s; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot { max-width: 1080px; margin: 0 auto; padding: 24px 16px 28px; color: var(--muted); font-size: .84rem; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }
body[data-view="match"] .foot { display: none; }

/* ============ Key-date banner (app + static pages) ============ */
.key-banner { max-width: 1080px; margin: 8px auto 0; padding: 10px 14px; border-radius: 14px; background: var(--lime); color: #120d12; font-size: .9rem; }
.key-banner a { color: #120d12; font-weight: 700; }
main > .key-banner { margin: 8px 0 0; }
.static > .key-banner { margin: 8px 16px 0; }
@media (min-width: 1112px) { .static > .key-banner { margin: 8px auto 0; } }

/* ============ Static (pre-rendered) pages ============ */
body.static { padding-bottom: 0; }
.static-main { max-width: 820px; margin: 0 auto; padding: 8px 16px 40px; }
.static .topbar { justify-content: space-between; }
.static-cta { padding: 9px 16px; font-size: .92rem; }
.static-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; max-width: 1080px; margin: 0 auto; scrollbar-width: none; }
.static-nav::-webkit-scrollbar { display: none; }
.static-nav a { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .85rem; }
.static-nav a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.crumbs { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }
.crumbs a { color: var(--muted); }
.seo-section { margin-top: 28px; }
.seo-section > p { max-width: 70ch; }
.static a.pill { color: var(--ink); text-decoration: none; }
.pill-row { display: flex; flex-wrap: wrap; }
.count-chip { font-family: Inter, sans-serif; font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.pos-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.pos-list li { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); border-left: 4px solid var(--c, var(--line)); }
.pos-list h3 { font-size: 1.02rem; margin: 0 0 4px; }
.pos-list h3 a { color: var(--ink); }
.pos-list p { margin: 0 0 4px; font-size: .94rem; }
.srcs { font-size: .8rem; color: var(--muted); }
.srcs a { color: var(--muted); }
.ghost-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ghost-list li { border: 1.5px dashed var(--ghost); background: var(--ghost-bg); border-radius: 14px; padding: 5px 11px; font-size: .86rem; }
.ghost-list a { color: var(--ghost); font-weight: 600; }
.ghost-list span { display: block; color: var(--muted); font-size: .78rem; max-width: 60ch; }
.mp-list, .dist-list, .issue-links { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.mp-list li, .dist-list li { background: var(--surface); border-radius: 12px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.dist-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dist-list a { font-weight: 700; }
.dist-list span { font-size: .8rem; color: var(--muted); }
.issue-links a { display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; padding: 10px 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.issue-links a span { font-size: .85rem; color: var(--muted); }
.issue-links .il-meta { font-size: .78rem; margin-top: 2px; }
.cta-inline { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 20px; text-decoration: none; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #ff2e74, #7b4dff); box-shadow: 0 10px 24px -12px rgb(123 77 255 / .6); }
.cta-inline span:first-child { font-size: 1.6rem; }
.cta-inline span:nth-child(2) { flex: 1; }
.cta-inline span:last-child { font-size: 1.3rem; }
.dates-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; font-size: .92rem; }
.dates-table th, .dates-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dates-table th { width: 38%; }
.ballot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 10px 0; }
.ballot { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.ballot h3 { margin: 0; }
.ballot-sub { margin: 2px 0 8px; font-size: .82rem; color: var(--muted); }
.ballot p:last-child { margin: 0; }
.seo-faq { margin-top: 32px; display: grid; gap: 8px; }
.seo-faq details { background: var(--surface); border-radius: 14px; padding: 12px 14px; }
.seo-faq summary { font-weight: 700; cursor: pointer; }
.seo-faq p { color: var(--muted); margin: 8px 0 0; }
.pc-h { margin: 0; }
.p-hero-static { border-left: 6px solid var(--c); padding-left: 14px; }
.static .matrix td { font-size: 1.1rem; }
.static .matrix th.issue a { color: var(--ink); text-decoration: none; }

/* ============ Motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
