/* IQTango Community — "The Arena"
   Matches the IQTango landing page and game: midnight blue, cyan-to-blue light, glowing rings,
   heavy italic wordmark. For = cyan, Against = coral (the only warm colour, used for the
   opposing side). Violet belongs to The Rabbit Hole only.
   Type: Inter Display for headings and the wordmark, Inter for reading,
   Lora only for the questions being argued (motions). */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/inter-regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/fonts/inter-medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/fonts/inter-semibold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/inter-bold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-weight: 700; font-style: normal; font-display: swap; src: url('/fonts/inter-display-bold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-weight: 900; font-style: italic; font-display: swap; src: url('/fonts/inter-display-blackitalic.woff') format('woff'); }
@font-face { font-family: 'Lora'; font-weight: 400 700; font-style: normal; font-display: swap; src: url('/fonts/lora-var.woff') format('woff'); }
@font-face { font-family: 'Lora'; font-weight: 400 700; font-style: italic; font-display: swap; src: url('/fonts/lora-italic-var.woff') format('woff'); }

:root {
  color-scheme: dark;
  /* structure */
  --night: #060d1f;      /* page (landing page background) */
  --night-2: #050b1a;    /* sunk: inputs, wells */
  --surface: #0b1733;    /* raised panels */
  --raised: #102043;
  --raised-2: #16294f;
  --line: #172a52;
  --line-strong: #264075;
  /* text — all AA on --surface and --night */
  --ink: #f4f8ff;
  --ink-2: #c4d3ee;
  --muted: #97abcf;
  --faint: #8095bd;
  /* brand */
  --cyan: #7fe4fa;       /* For · primary action · selected */
  --blue: #4f9cf9;
  --grad: linear-gradient(100deg, #a3f1ff 0%, #74dcfb 40%, #4f9cf9 100%);
  --grad-text: linear-gradient(100deg, #8fe9ff 0%, #5fc4f5 45%, #3d8bf2 100%);
  --glow: 0 10px 30px -10px rgba(79, 156, 249, .65);
  --cyan-ink: #04112a;   /* text on cyan, 12:1 */
  --cyan-soft: rgba(111, 216, 251, .10);
  --coral: #ff9b82;      /* Against */
  --coral-soft: rgba(255, 155, 130, .10);
  --sky: #8fd3ff;        /* links, information */
  --violet: #b39dff;     /* The Rabbit Hole */
  --violet-deep: #241b4a;
  --amber: #ffae7d;       /* warm orange: warnings, earned badges (no yellow) */
  --danger: #ff8a8a;
  --success: #9be7b8;
  --teal: #6fd6c8;
  --rose: #ff9fb2;
  /* legacy names still used by a few components */
  --metal: var(--sky);
  --metal-hi: #dcecff;
  --metal-lo: #5d8fd9;
  --electric: #5b8cff;
  /* type */
  --display: 'Inter Display', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Lora', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  /* shape: tight for controls, softer for panels; full round only for avatars and dots */
  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --rail: 232px;
  --aside: 296px;
  --main: 700px;
  --tabbar: 64px;
  --focus: 0 0 0 2px var(--night), 0 0 0 4px var(--cyan);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgba(160, 220, 255, .07) inset, 0 24px 50px -28px rgba(0, 0, 0, .9);
  --panel-bg: linear-gradient(180deg, rgba(16, 33, 70, .92), rgba(9, 20, 45, .92));
}

*, *::before, *::after { box-sizing: border-box; }
svg:not([class]) { width: 1.05em; height: 1.05em; flex: none; }
.ev-title svg { vertical-align: -2px; margin-left: 2px; color: var(--faint); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--night); color: var(--ink);
  font: 400 15px/1.6 var(--sans); font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--metal-hi); }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(111, 216, 251, .28); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cyan); color: var(--cyan-ink); font-weight: 600; padding: 10px 14px; border-radius: var(--r-sm); }
.skip:focus { top: 12px; color: var(--cyan-ink); }
#ssr { display: none; }
.no-js #ssr { display: block; max-width: 720px; margin: 40px auto; padding: 0 20px; }
.ssr-article h1 { font-family: var(--serif); font-size: 34px; line-height: 1.2; }

/* ---------- type ---------- */
.serif { font-family: var(--serif); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-family: var(--display); font-size: 31px; line-height: 1.15; letter-spacing: -0.022em; }
h2 { font-family: var(--display); font-size: 20px; line-height: 1.3; letter-spacing: -0.015em; }
h3 { font-size: 16px; line-height: 1.35; font-weight: 600; }
h4 { font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.prose { max-width: 66ch; color: var(--ink-2); font-size: 15.5px; line-height: 1.7; }
.prose p { margin: 0 0 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.prose a { text-decoration: underline; text-decoration-color: rgba(140, 196, 255, .45); text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, var(--main)) var(--aside); gap: 0 44px; justify-content: center; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 8px 22px 20px; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 28px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; overflow: visible; }
.brand-mark .mark-a { fill: var(--cyan); stroke: var(--night); stroke-width: 2.4; stroke-linejoin: round; }
.brand-mark .mark-b { fill: var(--coral); stroke: var(--night); stroke-width: 2.4; stroke-linejoin: round; }
.panel .brand-mark path, .tango .brand-mark path, .stage .brand-mark path { stroke: var(--surface); }
.brand-word { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 21px; letter-spacing: -0.01em; text-transform: uppercase; line-height: 1; padding-right: 2px; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { position: relative; display: flex; align-items: center; gap: 13px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); font-weight: 500; font-size: 15px; transition: color .12s, background .12s; }
.nav a:hover { color: var(--ink); background: rgba(195, 204, 224, .05); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -9px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--cyan); }
.nav a[aria-current="page"] svg { color: var(--cyan); }
.nav svg { width: 19px; height: 19px; flex: none; color: var(--faint); }
.nav .badge { margin-left: auto; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.rail-session { display: flex; flex-direction: column; gap: 4px; }
.rail-signout { display: flex; align-items: center; gap: 10px; padding: 8px; width: 100%; color: var(--muted); background: transparent; border: 0; border-radius: var(--r-md); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.rail-signout:hover, .rail-signout:focus-visible { background: rgba(195, 204, 224, .07); color: var(--ink); }
.rail-signout svg { width: 19px; height: 19px; flex: none; }
.rail .btn-create { margin: 22px 10px 0 4px; }
.rail-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); color: var(--ink); line-height: 1.3; }
.rail-user:hover { background: rgba(195, 204, 224, .05); color: var(--ink); }

.main { padding: 30px 0 90px; min-width: 0; }
.aside { padding: 30px 20px 40px 0; }
.aside-inner { position: sticky; top: 30px; display: flex; flex-direction: column; gap: 30px; }

.topbar { display: none; }
.tabbar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-head p { margin: 6px 0 0; color: var(--muted); }

.searchbox { position: relative; }
.searchbox input { width: 100%; padding: 11px 14px 11px 40px; border-radius: var(--r-sm); background: var(--night-2); border: 1px solid var(--line-strong); }
.searchbox input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(111, 216, 251, .14); }
.searchbox svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.btn:hover { background: var(--raised); border-color: #45588a; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { border-color: var(--cyan); background: var(--cyan); color: var(--cyan-ink); }
.btn-primary:hover { background: #a9f1ff; border-color: #a9f1ff; color: var(--cyan-ink); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn-quiet:hover { color: var(--ink); background: rgba(195, 204, 224, .06); border-color: transparent; }
.btn-danger { background: transparent; border-color: rgba(255, 138, 138, .45); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 138, 138, .08); border-color: var(--danger); color: var(--danger); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-xs); }
.btn svg { width: 17px; height: 17px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; position: relative; }
.icon-btn:hover { background: rgba(195, 204, 224, .07); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--cyan); color: var(--cyan-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.icon-btn .badge { position: absolute; top: 2px; right: 0; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--faint); }
.input, textarea.input, select.input { width: 100%; padding: 11px 13px; background: var(--night-2); border: 1px solid #4a5b85; /* 3.2:1 boundary (WCAG 1.4.11) */ border-radius: var(--r-sm); color: var(--ink); transition: border-color .12s, box-shadow .12s; }
textarea.input { resize: vertical; min-height: 110px; line-height: 1.6; }
.input:hover { border-color: #5a6c98; }
.input:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 3px rgba(111, 216, 251, .14); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder { color: var(--faint); opacity: 1; }
.form-error { color: var(--danger); font-size: 13px; margin: 6px 0 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: 2px; flex: none; }
/* Checkboxes drawn to match the system (unticked: a clear outline; ticked: cyan) */
input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 2px 0 0; flex: none; border: 1.5px solid #5a6c98; border-radius: 5px; background: var(--night-2); display: inline-grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; }
input[type="checkbox"]:hover { border-color: var(--cyan); }
input[type="checkbox"]:checked { background: var(--cyan); border-color: var(--cyan); }
input[type="checkbox"]:checked::after { content: ''; width: 9px; height: 5px; border: solid var(--cyan-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
input[type="checkbox"]:focus-visible { box-shadow: var(--focus); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.seg { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: var(--night-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: var(--r-xs); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--raised-2); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }

/* Tags: small, squared, quiet. Colour only where it carries meaning. */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; background: rgba(195, 204, 224, .06); color: var(--ink-2); border: 1px solid var(--line); line-height: 1.5; }
a.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.violet { color: var(--violet); background: rgba(179, 157, 255, .08); border-color: rgba(179, 157, 255, .25); }
.chip.blue { color: var(--sky); }
.chip.teal { color: var(--teal); background: rgba(111, 214, 200, .07); border-color: rgba(111, 214, 200, .22); }
.chip.amber { color: var(--amber); background: rgba(255, 174, 125, .07); border-color: rgba(255, 174, 125, .22); }
.chip.rose { color: var(--rose); }
.chip.staff { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(111, 216, 251, .3); font-size: 11px; padding: 0 7px; }

.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--cyan-ink); overflow: hidden; background: #c9d6f2; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar[data-tint="0"] { background: #c9d6f2; }
.avatar[data-tint="1"] { background: #8fe9ff; }
.avatar[data-tint="2"] { background: #ffb9a6; }
.avatar[data-tint="3"] { background: #a9d4ff; }
.avatar[data-tint="4"] { background: #d3c6ff; }
.avatar[data-tint="5"] { background: #9fe3d8; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 84px; height: 84px; font-size: 32px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-pad { padding: 22px 24px; }
.section { margin-top: 40px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; }
.section-head a { font-size: 13px; font-weight: 600; }
.empty { padding: 28px 24px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.notice { padding: 12px 16px; border-radius: var(--r-md); background: rgba(140, 196, 255, .07); border: 1px solid rgba(140, 196, 255, .22); border-left: 3px solid var(--sky); color: var(--ink-2); font-size: 14px; }
.notice.warn { background: rgba(255, 174, 125, .06); border-color: rgba(255, 174, 125, .25); border-left-color: var(--amber); }
.notice.danger { background: rgba(255, 138, 138, .06); border-color: rgba(255, 138, 138, .28); border-left-color: var(--danger); }

/* ---------- THE DAILY TANGO (the one bold moment) ---------- */
.tango { position: relative; padding: 34px 34px 28px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }
.tango::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--cyan) 0 50%, var(--coral) 50% 100%); }
.tango-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.tango-title { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -0.005em; }
.tango-title svg { width: 22px; height: 22px; }
.tango-date { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tango-q { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.7vw, 40px); line-height: 1.14; letter-spacing: -0.015em; margin: 0 0 16px; color: var(--ink); text-wrap: balance; }
.tango-context { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); max-width: 60ch; margin-bottom: 26px; }
.tango-opts { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.opt { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 54px; padding: 12px 18px; border-radius: var(--r-md); text-align: left; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--night-2); color: var(--ink); font-weight: 500; font-size: 15px; overflow: hidden; isolation: isolate; transition: border-color .12s, background .12s; }
.opt:hover:not(:disabled) { border-color: var(--cyan); }
.opt:disabled { cursor: default; }
.opt-fill { position: absolute; inset: 0 auto 0 0; width: 0; z-index: -1; background: rgba(195, 204, 224, .09); transition: width .9s var(--ease); }
.opt.mine { border-color: var(--cyan); }
.opt.mine .opt-fill { background: rgba(111, 216, 251, .16); }
.opt-label { display: flex; align-items: center; gap: 12px; }
.opt-mark { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; display: grid; place-items: center; }
.opt.mine .opt-mark { border-color: var(--cyan); background: var(--cyan); }
.opt.mine .opt-mark::after { content: ''; width: 8px; height: 5px; border: solid var(--cyan-ink); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.opt-pct { display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 9px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-family: var(--display); color: var(--ink); }
.opt-votes { color: var(--muted); font-family: var(--body, inherit); font-size: .82em; font-weight: 500; white-space: nowrap; }
.opt.mine .opt-votes { color: var(--ink); opacity: .83; }
@media (max-width: 480px) {
  .opt { gap: 8px; padding: 11px 12px; }
  .opt-label { min-width: 0; gap: 9px; }
  .opt-pct { gap: 5px; font-size: 14px; }
  .opt-votes { font-size: 11px; }
}
.opt.mine .opt-pct { color: var(--cyan); }
.tango-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.tango-foot .row { gap: 6px; }
@media (prefers-reduced-motion: reduce) { .opt-fill { transition: none; } }

/* ---------- feed: rows, not cards ---------- */
.list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 18px 4px; border-top: 1px solid var(--line); position: relative; transition: background .12s; }
.item:first-child { border-top: 0; }
.item:hover { background: linear-gradient(90deg, rgba(195, 204, 224, .035), transparent 85%); }
.item.unread { background: linear-gradient(90deg, rgba(111, 216, 251, .06), transparent 70%); }
.item.unread::before { content: ''; position: absolute; left: -12px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }
.item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.item-meta a { color: var(--ink-2); font-weight: 600; }
.item-title { font-size: 17px; font-weight: 600; line-height: 1.38; color: var(--ink); margin: 3px 0 2px; letter-spacing: -0.006em; }
.item-title a { color: inherit; }
.item-title a::after { content: ''; position: absolute; inset: 0; }
.item-title a:hover { color: var(--cyan); }
.item-excerpt { color: var(--muted); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.item-stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--faint); margin-top: 8px; }
.item-stats span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.item-stats svg { width: 14px; height: 14px; }
.item-actions { grid-row: 1 / span 3; grid-column: 2; display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.item.rank { grid-template-columns: 36px minmax(0, 1fr) auto; }
.item.rank .item-actions { grid-column: 3; }
.rank-n { grid-row: 1 / span 3; font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1; color: var(--line-strong); padding-top: 4px; font-variant-numeric: tabular-nums; }
.item.rank:nth-child(-n+3) .rank-n { color: var(--cyan); }
.kind-tag { color: var(--faint); }
.toggle[aria-pressed="true"] { color: var(--cyan); }
.toggle[aria-pressed="true"] svg { fill: currentColor; }

/* ---------- circles ---------- */
.circle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.circle-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); min-height: 200px; transition: border-color .12s, transform .12s; }
.circle-card:hover { border-color: var(--line-strong); }
.circle-card h3 { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.012em; }
.circle-card h3 a { color: var(--ink); }
.circle-card h3 a::after { content: ''; position: absolute; inset: 0; }
.circle-card .tagline { color: var(--ink-2); font-size: 14px; }
.circle-card .foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; position: relative; z-index: 1; }
.circle-card[data-accent="violet"] { border-color: rgba(179, 157, 255, .28); background: linear-gradient(180deg, rgba(179, 157, 255, .08), transparent 60%), var(--surface); }
.circle-card[data-accent="blue"] { border-top: 3px solid var(--sky); }
.circle-card[data-accent="teal"] { border-top: 3px solid var(--teal); }
.circle-card[data-accent="violet"] { border-top: 3px solid var(--violet); }
.glyph { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; background: rgba(140, 196, 255, .09); color: var(--sky); }
.glyph svg { width: 21px; height: 21px; }
[data-accent="violet"] .glyph { background: rgba(179, 157, 255, .13); color: var(--violet); }
[data-accent="teal"] .glyph { background: rgba(111, 214, 200, .11); color: var(--teal); }
.mini-circle { display: flex; align-items: center; gap: 12px; }
.mini-circle .glyph { width: 34px; height: 34px; border-radius: var(--r-sm); }
.mini-circle .glyph svg { width: 18px; height: 18px; }
.mini-circle > div:not(.glyph) { min-width: 0; flex: 1; }
.main:focus { box-shadow: none; outline: none; }
.mini-circle a { color: var(--ink); font-weight: 600; }

.circle-hero { padding: 30px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); margin-bottom: 22px; box-shadow: var(--shadow); }
.circle-hero h1 { font-size: 32px; margin: 16px 0 6px; }
.circle-hero .tagline { font-size: 16px; color: var(--ink-2); margin-bottom: 10px; }
.circle-hero[data-accent="blue"] { border-top: 3px solid var(--sky); }
.circle-hero[data-accent="teal"] { border-top: 3px solid var(--teal); }

/* The Rabbit Hole: its own room — violet, deeper, a little theatrical */
.rabbit { position: relative; overflow: hidden; border-color: rgba(179, 157, 255, .3); border-top: 3px solid var(--violet);
  background:
    radial-gradient(circle at 92% 0%, transparent 0 46px, rgba(179, 157, 255, .10) 47px 48px, transparent 49px 90px, rgba(179, 157, 255, .07) 91px 92px, transparent 93px 140px, rgba(179, 157, 255, .05) 141px 142px, transparent 143px 196px, rgba(179, 157, 255, .035) 197px 198px, transparent 199px),
    linear-gradient(180deg, #17123a, #110e28); }
.rabbit h1 { font-family: var(--serif); font-weight: 500; font-size: 40px; letter-spacing: -0.015em; }
.rabbit .tagline { font-family: var(--serif); font-style: italic; color: #d8cdff; font-size: 18px; }
.rh-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.rh-section { position: relative; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid rgba(179, 157, 255, .2); background: rgba(10, 8, 26, .5); color: var(--ink); }
.rh-section:hover { border-color: rgba(179, 157, 255, .55); color: var(--ink); }
.rh-section[aria-current="true"] { border-color: var(--violet); background: rgba(179, 157, 255, .12); }
.rh-section strong { display: block; font-size: 15px; }
.rh-section span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.rh-section .count { position: absolute; top: 14px; right: 14px; font-size: 12px; color: #cbbfff; font-variant-numeric: tabular-nums; }

/* Evidence labels */
.evidence { display: flex; flex-direction: column; gap: 10px; }
.ev { display: grid; grid-template-columns: 3px minmax(0, 1fr); gap: 0 14px; padding: 12px 14px 12px 0; border-radius: var(--r-md); background: var(--night-2); border: 1px solid var(--line); overflow: hidden; }
.ev::before { content: ''; background: var(--ev, var(--sky)); grid-row: 1 / span 3; }
.ev-label { font-size: 12px; font-weight: 600; color: var(--ev, var(--sky)); }
.ev-title { font-weight: 600; overflow-wrap: anywhere; }
.ev-note { font-size: 14px; color: var(--muted); margin: 2px 0 0; white-space: pre-wrap; }
.ev[data-label="source"] { --ev: #9be7b8; }
.ev[data-label="interpretation"] { --ev: #8cc4ff; }
.ev[data-label="unverified"] { --ev: #ffae7d; }
.ev[data-label="speculation"] { --ev: #c3b0ff; }
.ev[data-label="hypothetical"] { --ev: #ff9fb2; }
.label-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.label-key span { display: inline-flex; align-items: center; gap: 6px; }
.label-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--sky); }
.label-key i[data-l="source"] { background: #9be7b8; } .label-key i[data-l="interpretation"] { background: #8cc4ff; }
.label-key i[data-l="unverified"] { background: #ffae7d; } .label-key i[data-l="speculation"] { background: #c3b0ff; } .label-key i[data-l="hypothetical"] { background: #ff9fb2; }

.case-block { padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--night-2); margin-bottom: 12px; }
.case-block h3 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.case-block .claim { font-family: var(--serif); font-size: 22px; line-height: 1.35; color: var(--ink); }

/* ---------- discussion page ---------- */
.post-head { margin-bottom: 20px; }
.post-title { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 3.5vw, 38px); line-height: 1.16; letter-spacing: -0.015em; margin: 12px 0 14px; text-wrap: balance; }
.byline { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.byline a { color: var(--ink); font-weight: 600; }
.post-body { margin: 24px 0; }
.actionbar { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; }
.reacts { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.react { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: var(--r-xs); border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: color .12s, border-color .12s, background .12s; }
.react:hover { color: var(--ink); border-color: var(--line-strong); }
.react[aria-pressed="true"] { color: var(--cyan); border-color: rgba(111, 216, 251, .45); background: var(--cyan-soft); }
.react .n { font-variant-numeric: tabular-nums; color: inherit; opacity: .85; }
.poll-box { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface); margin: 20px 0; }

.stance-tabs { margin: 8px 0 14px; }
.composer { padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--night-2); transition: border-color .12s; }
.composer:focus-within { border-color: var(--cyan); }
.composer textarea { border: 0; background: transparent; padding: 4px 2px; min-height: 76px; }
.composer textarea:focus { box-shadow: none; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.stance-pick { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.stance-pick button { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: var(--r-xs); padding: 4px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.stance-pick button:hover { color: var(--ink); }
.stance-pick button[aria-pressed="true"][data-stance="support"] { color: var(--cyan); border-color: rgba(111, 216, 251, .5); background: var(--cyan-soft); }
.stance-pick button[aria-pressed="true"][data-stance="challenge"] { color: var(--coral); border-color: rgba(255, 155, 130, .5); background: var(--coral-soft); }
.stance-pick button[aria-pressed="true"][data-stance="neutral"] { color: var(--sky); border-color: rgba(140, 196, 255, .5); background: rgba(140, 196, 255, .08); }

.thread { display: flex; flex-direction: column; margin-top: 20px; }
.reply { position: relative; padding: 16px 0 6px; }
.reply + .reply { border-top: 1px solid var(--line); }
.children { margin-left: 16px; padding-left: 18px; border-left: 2px solid var(--line); }
.children .reply + .reply { border-top: 0; }
.reply-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.reply-head a { color: var(--ink); font-weight: 600; }
.reply-body { margin: 8px 0 6px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 66ch; line-height: 1.65; }
.reply-body.gone { color: var(--faint); font-style: italic; }
.reply-tools { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; margin-left: -8px; }
.reply-tools .react { border-color: transparent; min-height: 28px; padding: 0 8px; }
.stance { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: var(--r-xs); }
.stance.support { color: var(--cyan); background: var(--cyan-soft); }
.stance.challenge { color: var(--coral); background: var(--coral-soft); }
.stance.neutral { color: var(--sky); background: rgba(140, 196, 255, .09); }
.pick { color: var(--amber); font-weight: 600; font-size: 12px; }
.reply.featured > .reply-body { border-left: 2px solid var(--amber); padding-left: 12px; }
.reply:target { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { background: rgba(111, 216, 251, .12); } 100% { background: transparent; } }

/* ---------- aside ---------- */
.side-block h3 { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink); margin-bottom: 14px; letter-spacing: -0.005em; }
.side-list { display: flex; flex-direction: column; gap: 16px; }
.event { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: start; }
.event-date { border-radius: var(--r-sm); border: 1px solid var(--line-strong); text-align: center; padding: 5px 0; line-height: 1.1; background: var(--surface); }
.event-date b { display: block; font-family: var(--display); font-size: 18px; }
.event-date span { font-size: 11px; color: var(--muted); }
.event h4 { font-size: 14px; font-weight: 600; }
.rail-foot .legal { font-size: 12px; color: var(--faint); display: flex; gap: 6px 12px; flex-wrap: wrap; }
.rail-foot .legal a { color: var(--faint); }
.rail-foot .legal a:hover { color: var(--ink-2); }

/* ---------- forms & auth ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-wrap h1 { font-size: 32px; margin-bottom: 8px; }
.auth-card { padding: 28px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); margin-top: 22px; box-shadow: var(--shadow); }
.interest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.interest { position: relative; padding: 14px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); text-align: left; cursor: pointer; font-weight: 600; color: var(--ink-2); transition: border-color .12s, background .12s; }
.interest:hover { border-color: #45588a; color: var(--ink); }
.interest[aria-pressed="true"] { border-color: var(--cyan); background: var(--cyan-soft); color: var(--ink); }
.interest[aria-pressed="true"]::after { content: ''; position: absolute; right: 12px; top: 50%; width: 9px; height: 5px; border: solid var(--cyan); border-width: 0 0 2px 2px; transform: translateY(-70%) rotate(-45deg); }

.compose-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 20px; }
.kind { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); text-align: left; cursor: pointer; transition: border-color .12s; }
.kind:hover { border-color: #45588a; }
.kind strong { display: block; font-size: 14px; }
.kind span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.kind[aria-pressed="true"] { border-color: var(--cyan); background: var(--cyan-soft); }
.kind[data-kind="case"][aria-pressed="true"] { border-color: var(--violet); background: rgba(179, 157, 255, .1); }
.repeat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.ev-editor { padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--night-2); margin-bottom: 10px; }

/* ---------- tabs, tables, admin ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 11px 12px; color: var(--muted); font-weight: 600; font-size: 14px; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--ink); }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--cyan); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat { padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
a.stat:hover { border-color: var(--line-strong); }
.stat b { display: block; font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat span { font-size: 12.5px; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12.5px; background: var(--surface); }
tr:last-child td { border-bottom: 0; }
.bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 90px; padding: 10px 0 0; }
.bars div { background: var(--cyan); opacity: .85; border-radius: 3px 3px 0 0; min-height: 2px; }
.report-card { padding: 18px 20px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); margin-bottom: 12px; }
.quote { padding: 10px 14px; border-left: 2px solid var(--line-strong); color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0; max-height: 180px; overflow: auto; }

/* ---------- dialog & toast ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); padding: 26px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); }
dialog::backdrop { background: rgba(5, 9, 20, .74); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 8px; }
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 14px; border-radius: var(--r-md); background: var(--raised-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--cyan); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .7); font-size: 14px; font-weight: 500; pointer-events: auto; max-width: min(92vw, 420px); animation: toast-in .22s var(--ease); }
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.loading { padding: 40px 0; color: var(--faint); text-align: center; }
.skeleton { height: 160px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface), var(--raised), var(--surface)); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.dev-flag { position: fixed; right: 10px; bottom: 10px; z-index: 50; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: #3a1d0c; color: var(--amber); border: 1px solid rgba(255, 174, 125, .4); }

.play-hero { position: relative; padding: 34px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.play-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--cyan) 0 50%, var(--coral) 50% 100%); }
.play-hero h1 { font-size: 36px; margin: 0 0 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .shell { grid-template-columns: 76px minmax(0, var(--main)) var(--aside); gap: 0 28px; }
  .rail { padding: 24px 8px; align-items: center; }
  .brand-word, .nav a span, .rail-user span, .rail-signout span, .rail .btn-create span, .rail-foot .legal { display: none; }
  .rail-signout { justify-content: center; width: 44px; }
  .brand { padding: 0 0 26px; }
  .nav a { justify-content: center; padding: 11px; }
  .nav a[aria-current="page"]::before { left: -8px; }
  .nav .badge { position: absolute; margin: 0; transform: translate(10px, -10px); }
  .rail .btn-create { width: 44px; padding: 0; margin: 20px 0 0; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: 76px minmax(0, 1fr); padding-right: 22px; }
  .aside { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { display: block; padding: 0; }
  .rail { display: none; }
  .main { padding: 16px 16px calc(var(--tabbar) + 30px + env(safe-area-inset-bottom)); }
  .topbar { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; gap: 4px; height: 58px; padding: 0 8px 0 16px; padding-top: env(safe-area-inset-top); background: rgba(12, 20, 40, .9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .topbar .brand { padding: 0; margin-right: auto; }
  .topbar .brand-word { display: inline; font-size: 19px; }
  .topbar .brand-mark { width: 27px; height: 27px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(10, 17, 34, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--faint); font-size: 11px; font-weight: 600; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] svg { color: var(--cyan); }
  .tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--cyan); }
  h1 { font-size: 27px; }
  .tango { padding: 26px 20px 22px; }
  .tango-q { font-size: 27px; }
  .item { padding: 16px 2px; }
  .item.unread::before { left: -9px; }
  .item.rank { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .rank-n { font-size: 20px; }
  .circle-hero { padding: 24px 20px; }
  .rabbit h1 { font-size: 32px; }
  .rh-sections { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .children { margin-left: 6px; padding-left: 12px; }
  .auth-wrap { margin: 20px auto; }
  .auth-card { padding: 22px; }
  .toasts { right: 16px; left: 16px; align-items: stretch; bottom: calc(var(--tabbar) + 16px); }
  .mobile-only { display: block; }
  .post-title { font-size: 28px; }
}
@media (min-width: 761px) { .mobile-only { display: none !important; } }

/* Full-width pages (auth, onboarding, admin) */
.shell.wide { grid-template-columns: var(--rail) minmax(0, 980px); }
@media (max-width: 1180px) { .shell.wide { grid-template-columns: 76px minmax(0, 980px); } }
@media (max-width: 1000px) { .shell.wide { grid-template-columns: 76px minmax(0, 1fr); } }

/* ===================================================================
   TANGO BATTLES — For in cyan (side A), Against in coral (side B), mirrored.
   =================================================================== */
:root { --side-a: var(--cyan); --side-a-bg: rgba(111, 216, 251, .08); --side-b: var(--coral); --side-b-bg: rgba(255, 155, 130, .08); }
.side-tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; }
.side-tag::before { content: ''; width: 8px; height: 8px; border-radius: 2px; }
.side-tag.a { color: var(--side-a); } .side-tag.a::before { background: var(--side-a); }
.side-tag.b { color: var(--side-b); } .side-tag.b::before { background: var(--side-b); }
.battle-tag { color: var(--coral) !important; }
.streak { color: var(--amber); font-weight: 600; }

.phase-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: var(--r-xs); font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); color: var(--ink-2); }
.phase-pill.live { color: var(--coral); border-color: rgba(255, 155, 130, .45); background: var(--coral-soft); }
.phase-pill.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .phase-pill.live::before { animation: none; } }
.phase-pill.voting { color: var(--cyan); border-color: rgba(111, 216, 251, .45); background: var(--cyan-soft); }
.phase-pill.closed { color: var(--ink-2); }
.phase-pill.cancelled { color: var(--faint); }

.battle-list { display: grid; gap: 12px; }
.battle-card { position: relative; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: border-color .12s; }
.battle-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--cyan) 0 50%, var(--coral) 50% 100%); }
.battle-card:hover { border-color: var(--line-strong); }
.battle-card[data-phase="live"] { border-color: rgba(255, 155, 130, .3); }
.battle-title { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.3; margin: 10px 0; letter-spacing: -0.008em; }
.battle-title a { color: var(--ink); } .battle-title a::after { content: ''; position: absolute; inset: 0; }
.battle-title a:hover { color: var(--ink); }
.battle-sides { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.battle-sides .vs { font-family: var(--serif); font-style: italic; color: var(--faint); font-size: 14px; }

.stage { position: relative; margin: 10px 0 20px; padding: 26px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.stage::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--cyan) 0 50%, var(--coral) 50% 100%); }
.stage-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.stage-status { color: var(--ink-2); margin: 12px 0 20px; font-size: 14.5px; }

.phase-track { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: none; overflow-x: auto; scrollbar-width: none; }
.phase-track li { position: relative; flex: 1 1 0; min-width: 92px; padding-top: 20px; font-size: 12px; color: var(--faint); font-weight: 600; }
.phase-track li::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: var(--line-strong); }
.phase-track li:first-child::before { left: 6px; }
.phase-track .dot { position: absolute; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); }
.phase-track li.done { color: var(--muted); } .phase-track li.done::before { background: var(--cyan); opacity: .55; }
.phase-track li.done .dot { background: var(--cyan); border-color: var(--cyan); opacity: .7; }
.phase-track li.current { color: var(--ink); } .phase-track li.current .dot { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 4px rgba(111, 216, 251, .16); }

.versus { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.vs-mark { align-self: center; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--faint); }
.side-head { padding: 18px; border-radius: var(--r-md); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--night-2); }
.side-head.a { border: 1px solid rgba(111, 216, 251, .28); border-top: 3px solid var(--side-a); }
.side-head.b { border: 1px solid rgba(255, 155, 130, .3); border-top: 3px solid var(--side-b); align-items: flex-end; text-align: right; }
.side-name { font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.2; }
.side-head.a .side-name { color: var(--side-a); } .side-head.b .side-name { color: var(--side-b); }
.side-people { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.side-head.b .side-people { justify-content: flex-end; }
.person { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.person a { color: var(--ink); font-weight: 600; }
.host-tools { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.stage-composer { margin-top: 18px; }
.stage-composer textarea { min-height: 140px; }

.rounds { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.round { border-top: 1px solid var(--line); padding-top: 16px; }
.round.current .round-head h3 { color: var(--ink); }
.round-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.round-head h3 { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--muted); }
.round-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.round-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.arg { padding: 14px 16px; border-radius: var(--r-md); background: var(--night-2); border: 1px solid var(--line); }
.arg.a { border-left: 3px solid var(--side-a); } .arg.b { border-right: 3px solid var(--side-b); }
.arg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.arg-head a { color: var(--ink); font-weight: 600; }
.arg-body p { margin-bottom: 10px; line-height: 1.65; }
.arg-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: var(--r-md); margin: 0; }
.col-label { font-size: 12px; font-weight: 600; }
.round-col.a .col-label { color: var(--side-a); } .round-col.b .col-label { color: var(--side-b); }

.audience { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.stance-poll h3, .verdict-vote h3 { font-size: 16px; margin-bottom: 2px; }
.side-btn[aria-pressed="true"].a { background: var(--side-a-bg); border-color: var(--side-a); color: var(--side-a); }
.side-btn[aria-pressed="true"].b { background: var(--side-b-bg); border-color: var(--side-b); color: var(--side-b); }
.side-btn[aria-pressed="true"].undecided { background: rgba(255, 255, 255, .06); border-color: var(--muted); }
.verdict-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.verdict-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; padding: 12px; border-radius: var(--r-md); cursor: pointer;
  font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--ink); background: var(--night-2); border: 1px solid var(--line-strong); transition: background .12s, border-color .12s, color .12s; }
.verdict-btn.a:hover, .verdict-btn.a[aria-pressed="true"] { border-color: var(--side-a); background: var(--side-a-bg); color: var(--side-a); }
.verdict-btn.b:hover, .verdict-btn.b[aria-pressed="true"] { border-color: var(--side-b); background: var(--side-b-bg); color: var(--side-b); }
.verdict-btn .tiny { font-family: var(--sans); }

.result { margin: 0 0 18px; padding: 20px; border-radius: var(--r-md); background: var(--night-2); border: 1px solid var(--line-strong); }
.result-head { font-weight: 500; font-size: 23px; margin-bottom: 14px; }
.verdict-bar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--line); gap: 2px; }
.verdict-bar .a { width: 50%; background: var(--side-a); transition: width 1s var(--ease); }
.verdict-bar .b { width: 50%; background: var(--side-b); transition: width 1s var(--ease); }
@media (prefers-reduced-motion: reduce) { .verdict-bar span { transition: none; } }

.questions { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.questions h3 { font-size: 15px; margin-bottom: 10px; }
.question { padding: 10px 0; border-top: 1px solid var(--line); }
.question:first-of-type { border-top: 0; }
.question.selected { padding-left: 12px; border-left: 2px solid var(--amber); }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge-card { display: flex; gap: 12px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); opacity: .7; }
.badge-card.earned { opacity: 1; border-color: rgba(255, 174, 125, .35); background: linear-gradient(135deg, rgba(255, 174, 125, .08), transparent 60%), var(--surface); }
.badge-card.unavailable { opacity: .45; }
.badge-mark { width: 34px; height: 34px; border-radius: var(--r-sm); flex: none; display: grid; place-items: center; background: rgba(195, 204, 224, .07); color: var(--faint); }
.badge-card.earned .badge-mark { background: rgba(255, 174, 125, .15); color: var(--amber); }
.badge-mark svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .stage { padding: 20px 16px; margin-left: -4px; margin-right: -4px; }
  .versus { gap: 6px; }
  .side-head { padding: 12px; gap: 8px; }
  .vs-mark { font-size: 16px; }
  .side-head .btn { white-space: normal; text-align: center; }
  .round-cols { grid-template-columns: 1fr; }
  .arg.b { border-right: 1px solid var(--line); border-left: 3px solid var(--side-b); }
  .side-name { font-size: 19px; }
  .verdict-btn { font-size: 17px; min-height: 64px; }
}

/* Getting started checklist */
.checklist { margin-bottom: 22px; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.checklist h2 { font-size: 17px; }
.checklist-bar { height: 4px; border-radius: 2px; background: var(--line); margin: 12px 0 14px; overflow: hidden; }
.checklist-bar span { display: block; height: 100%; background: var(--cyan); }
.checklist-items { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 18px; }
.checklist-items li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checklist-items li a { color: var(--ink-2); }
.checklist-items li a:hover { color: var(--ink); }
.checklist-items li.done, .checklist-items li.done a { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(130, 144, 177, .45); }
.check-mark { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-strong); }
.checklist-items li.done .check-mark { background: var(--cyan); border-color: var(--cyan); color: var(--cyan-ink); }
.check-mark svg { width: 12px; height: 12px; stroke-width: 2.6; }
.danger-zone { border-color: rgba(255, 138, 138, .25); }
.cohort td.c { text-align: center; font-variant-numeric: tabular-nums; }

/* Legal documents */
article.legal { max-width: 72ch; color: var(--ink-2); }
article.legal h1 { font-size: 36px; color: var(--ink); margin: 6px 0 14px; }
article.legal h2 { font-size: 20px; color: var(--ink); margin: 36px 0 10px; scroll-margin-top: 20px; }
article.legal h3 { font-size: 16px; color: var(--ink); margin: 24px 0 8px; }
article.legal p, article.legal li { line-height: 1.7; }
article.legal ul, article.legal ol { padding-left: 22px; margin: 0 0 14px; }
article.legal li { margin-bottom: 6px; }
article.legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(140, 196, 255, .45); }
article.legal .table-wrap { margin: 12px 0 18px; }
article.legal td, article.legal th { line-height: 1.5; }
.legal-missing { background: rgba(255, 174, 125, .2); color: var(--amber); padding: 0 4px; border-radius: 4px; }
.toc { display: flex; flex-direction: column; gap: 7px; font-size: 13px; max-height: 70vh; overflow: auto; }
.toc a { color: var(--muted); } .toc a:hover { color: var(--ink); }
.terms-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(140, 196, 255, .07); border: 1px solid rgba(140, 196, 255, .25); border-left: 3px solid var(--sky); font-size: 14px; }


/* ===================================================================
   PREMIUM LAYER — light, glass and rings, as on the IQTango landing page
   =================================================================== */
body {
  background:
    radial-gradient(900px 700px at -10% 35%, rgba(18, 52, 120, .45), transparent 70%),
    radial-gradient(800px 500px at 110% -10%, rgba(40, 110, 220, .18), transparent 70%),
    var(--night);
  background-attachment: fixed;
}
.rail { background: linear-gradient(180deg, rgba(8, 18, 42, .65), rgba(6, 13, 31, .2)); border-right-color: rgba(38, 64, 117, .55); }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(127, 228, 250, .18), 0 6px 18px -6px rgba(79, 156, 249, .7); }
.brand-word { font-size: 22px; color: #fff; }
.topbar .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(79, 156, 249, .14), transparent); }
.nav a[aria-current="page"]::before { background: var(--grad); box-shadow: 0 0 12px rgba(127, 228, 250, .7); }

/* Buttons: the landing page's glowing cyan-to-blue */
.btn { background: rgba(9, 20, 45, .7); border-color: var(--line-strong); }
.btn:hover { background: rgba(22, 41, 79, .9); border-color: #3a5a9a; }
.btn-primary { border: 0; background: var(--grad); color: var(--cyan-ink); font-weight: 800; letter-spacing: .02em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), var(--glow); }
.btn-primary:hover { background: var(--grad); color: var(--cyan-ink); filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 12px 34px -8px rgba(79, 156, 249, .85); }
.btn-quiet { background: transparent; }
.rail .btn-create { font-size: 14px; letter-spacing: .01em; min-height: 44px; }
.badge { background: var(--grad); box-shadow: 0 0 10px rgba(127, 228, 250, .45); }

/* Tracked labels, used sparingly, like "THE SOCIAL GUESSING ARENA" */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.eyebrow .live-dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee8a6; box-shadow: 0 0 0 3px rgba(94, 232, 166, .18), 0 0 10px rgba(94, 232, 166, .8); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Glass panels with a lit top edge */
.panel, .checklist, .auth-card, .circle-card, .battle-card, .stat, .report-card, .poll-box, .badge-card { background: var(--panel-bg); border-color: rgba(38, 64, 117, .75); }
.panel, .checklist, .auth-card, .circle-card, .battle-card { box-shadow: var(--shadow); }
.stat b { background: linear-gradient(180deg, #ffffff, #bfe9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.opt, .side-head, .arg, .verdict-btn, .result, .case-block, .ev, .composer, .input, .searchbox input { background-color: rgba(4, 10, 25, .75); }

/* THE DAILY TANGO — glowing rim and orbit rings in the corner */
.tango { border-color: rgba(70, 120, 210, .45); background:
    radial-gradient(circle at 100% 0%, transparent 0 70px, rgba(127, 228, 250, .13) 71px 72px, transparent 73px 120px, rgba(127, 228, 250, .09) 121px 122px, transparent 123px 175px, rgba(79, 156, 249, .07) 176px 177px, transparent 178px),
    radial-gradient(520px 300px at 100% 0%, rgba(60, 130, 240, .22), transparent 70%),
    var(--panel-bg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(127, 228, 250, .06), 0 30px 80px -40px rgba(79, 156, 249, .55); }
.tango::before { height: 2px; background: linear-gradient(90deg, transparent, #8fe9ff 20%, #4f9cf9 80%, transparent); box-shadow: 0 0 18px rgba(127, 228, 250, .9); }
.tango-title { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
.tango-title .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
.opt:hover:not(:disabled) { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(127, 228, 250, .25), 0 0 24px -8px rgba(127, 228, 250, .6); }
.opt.mine { border-color: var(--cyan); box-shadow: 0 0 22px -10px rgba(127, 228, 250, .8); }
.opt.mine .opt-fill { background: linear-gradient(90deg, rgba(127, 228, 250, .28), rgba(79, 156, 249, .12)); }
.opt.mine .opt-mark { background: var(--grad); border-color: transparent; }

/* Live debates and other featured stages */
.stage { border-color: rgba(70, 120, 210, .45); background: radial-gradient(420px 240px at 0% 0%, rgba(127, 228, 250, .1), transparent 70%), radial-gradient(420px 240px at 100% 0%, rgba(255, 143, 115, .08), transparent 70%), var(--panel-bg); }
.stage::before { height: 2px; box-shadow: 0 0 16px rgba(127, 228, 250, .6); }
.play-hero { background: radial-gradient(circle at 100% 50%, transparent 0 60px, rgba(127, 228, 250, .12) 61px 62px, transparent 63px 110px, rgba(127, 228, 250, .08) 111px 112px, transparent 113px), radial-gradient(500px 280px at 100% 50%, rgba(60, 130, 240, .25), transparent 70%), var(--panel-bg); }
.play-hero::before { height: 2px; background: linear-gradient(90deg, transparent, #8fe9ff, #4f9cf9, transparent); }
.circle-hero:not(.rabbit) { background: var(--panel-bg); }
.checklist-bar span { background: var(--grad); box-shadow: 0 0 10px rgba(127, 228, 250, .6); }
.bars div { background: linear-gradient(180deg, #8fe9ff, #4f9cf9); opacity: 1; }
.phase-track li.current .dot { background: var(--grad); border-color: transparent; box-shadow: 0 0 0 4px rgba(127, 228, 250, .16), 0 0 12px rgba(127, 228, 250, .8); }
.verdict-bar .a { background: var(--grad); }
.toast { background: rgba(16, 33, 70, .96); backdrop-filter: blur(10px); }
.item-title a:hover { color: var(--cyan); }
.page-head h1, .section-head h2 { color: #fff; }

/* ---------- Visitor hero (logged-out Discover) ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); align-items: center; gap: 12px; margin: 0 0 30px; padding: 8px 0 26px; border-bottom: 1px solid var(--line); }
.hero h1 { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(34px, 4.6vw, 52px); line-height: .98; letter-spacing: -0.02em; margin: 16px 0 16px; color: #fff; }
.hero h1 span { display: block; }
.hero p { color: var(--ink-2); font-size: 16.5px; line-height: 1.6; max-width: 46ch; margin: 0 0 22px; }
.hero .row .btn { min-height: 48px; padding: 0 22px; text-transform: uppercase; letter-spacing: .05em; font-size: 13.5px; font-weight: 800; }
.hero-points { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 320px; justify-self: center; display: grid; place-items: center; isolation: isolate; }
.orbit::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: -1;
  background:
    radial-gradient(circle, rgba(40, 90, 190, .45) 0 30%, transparent 31%),
    radial-gradient(circle, transparent 0 41%, rgba(127, 228, 250, .55) 41.4% 42.2%, transparent 42.6%),
    radial-gradient(circle, transparent 0 45%, rgba(79, 156, 249, .55) 45.3% 46.6%, transparent 47%),
    radial-gradient(circle, transparent 0 57%, rgba(127, 228, 250, .16) 57.3% 57.8%, transparent 58.2%),
    radial-gradient(circle, transparent 0 69.5%, rgba(79, 156, 249, .14) 69.8% 70.2%, transparent 70.6%);
  filter: drop-shadow(0 0 14px rgba(79, 156, 249, .55)); }
.orbit::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 4%; height: 12%; border-radius: 50%; z-index: -1; border: 2px solid rgba(127, 228, 250, .55); box-shadow: 0 0 22px rgba(127, 228, 250, .55), inset 0 0 18px rgba(127, 228, 250, .35); }
.orbit-core { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; margin-top: -4%; }
.orbit-core img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 0 0 1px rgba(127, 228, 250, .25), 0 12px 34px -6px rgba(79, 156, 249, .8); }
.orbit-core b { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; letter-spacing: -0.01em; color: #fff; line-height: 1; }
.orbit-core span { font-family: var(--display); font-size: 9.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan); }
.orbit-tag { position: absolute; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: rgba(13, 30, 66, .94); border: 1px solid rgba(80, 130, 220, .5); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .8), 0 0 18px -8px rgba(79, 156, 249, .7);
  font-family: var(--display); font-weight: 700; font-style: italic; text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; line-height: 1.2; color: #fff; white-space: nowrap; }
.orbit-tag small { display: block; font-size: 9px; letter-spacing: .14em; color: var(--cyan); font-style: italic; }
.orbit-tag svg { width: 16px; height: 16px; color: var(--cyan); flex: none; }
.orbit-tag.t1 { top: 1%; left: -10%; transform: rotate(-7deg); }
.orbit-tag.t2 { top: 35%; right: -13%; transform: rotate(6deg); }
.orbit-tag.t3 { bottom: 1%; left: -5%; transform: rotate(-5deg); }
@media (max-width: 1100px) { .hero { grid-template-columns: 1fr; } .orbit { display: none; } }
@media (max-width: 760px) { .hero h1 { font-size: 36px; } .hero .row .btn { flex: 1; } }
.orbit-tag img { width: 18px; height: 18px; border-radius: 5px; box-shadow: none; flex: none; }
.tango-top { flex-wrap: wrap; row-gap: 6px; }
.tango-date { white-space: nowrap; }
@media (max-width: 760px) { .tango-title { letter-spacing: .16em; font-size: 11.5px; } .tango-date { font-size: 12px; } }
/* Keyboard focus: an outline, so button glows and panel shadows can never hide it */
:focus-visible { box-shadow: none; outline: 2px solid var(--cyan); outline-offset: 2px; }
input[type="checkbox"]:focus-visible, .input:focus-visible { outline-offset: 1px; }

/* ---------- Milestone 5: people ---------- */
.follow-box { display: inline-flex; align-items: center; gap: 4px; }
.follow-counts { gap: 14px; margin: -4px 0 16px; font-size: 14px; }
.follow-counts a { color: var(--ink-2); }
.follow-counts a:hover { color: var(--ink); }
.people-list { display: flex; flex-direction: column; }
.person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 4px; border-top: 1px solid var(--line); }
.person-name { font-weight: 600; color: var(--ink); }
.mini-person { display: flex; align-items: center; gap: 10px; }
.mini-person a { font-weight: 600; font-size: 14px; }
@media (max-width: 560px) { .person { grid-template-columns: auto minmax(0, 1fr); } .person > .row { grid-column: 2; } }

/* ---------- Milestone 5: tournaments, rankings, Circle trivia ---------- */
.battle-title svg { width: 17px; height: 17px; vertical-align: -2px; color: var(--metal); }
.champion { display: flex; align-items: center; gap: 16px; padding: 16px 18px; margin-bottom: 18px; border-radius: var(--r-lg); border: 1px solid rgba(255, 174, 125, .3); background: linear-gradient(100deg, rgba(255, 174, 125, .10), rgba(79, 156, 249, .06)); }
.champion-mark { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 174, 125, .14); color: var(--amber); flex: none; }
.champion-mark svg { width: 24px; height: 24px; }
.bracket { display: grid; grid-template-columns: repeat(var(--rounds), minmax(220px, 1fr)); gap: 18px; overflow-x: auto; padding-bottom: 8px; }
.bracket-round { display: flex; flex-direction: column; min-width: 220px; }
.bracket-head { min-height: 72px; margin-bottom: 10px; }
.bracket-head h2 { font-size: 16px; margin-bottom: 4px; }
.bracket-matches { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; flex: 1; }
.match { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 8px 10px; }
.match-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 18px; align-items: center; gap: 6px; padding: 5px 0; font-size: 14px; }
.match-row + .match-row { border-top: 1px solid var(--line); }
.match-row .seed { color: var(--faint); font-size: 12px; text-align: right; }
.match-row .match-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row.won { font-weight: 600; }
.match-row.won .match-name a { color: var(--ink); }
.match-row.lost .match-name { opacity: .65; }
.match-win { color: var(--success); display: grid; place-items: center; }
.match-win svg { width: 16px; height: 16px; }
.side-dot { width: 8px; height: 8px; border-radius: 2px; justify-self: center; }
.side-dot.a { background: var(--side-a); } .side-dot.b { background: var(--side-b); }
.match-note { margin: 6px 0 0; color: var(--muted); }
.match-note.warn { color: var(--amber); }
.motion-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.motion-list li { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.rank-table td, .rank-table th { white-space: nowrap; }
.rank-table tr.mine td { background: var(--cyan-soft); }
.motion-fields, .q-fields { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px 12px; margin: 0; }
.motion-fields legend, .q-fields legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.q-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
.q-choice { display: flex; align-items: center; gap: 6px; }
.q-choice input[type="radio"] { accent-color: var(--cyan); width: 16px; height: 16px; flex: none; }
@media (max-width: 560px) { .q-choices { grid-template-columns: 1fr; } }

.circle-standings { display: grid; gap: 8px; }
.standing { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; grid-template-rows: auto 6px; column-gap: 12px; row-gap: 8px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.standing.top { border-color: rgba(255, 174, 125, .4); }
.standing-rank { font-weight: 700; font-size: 18px; color: var(--ink-2); text-align: center; }
.standing.top .standing-rank { color: var(--amber); }
.standing-name { font-weight: 600; color: var(--ink); }
.standing-score { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.standing-bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--night-2); overflow: hidden; }
.standing-bar span { display: block; height: 100%; background: var(--grad); border-radius: 3px; }

.trivia-game, .trivia-start { margin-bottom: 18px; }
.trivia-game { padding: 22px; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--raised), var(--surface)); }
.trivia-clock { font-weight: 700; font-size: 18px; color: var(--cyan); min-width: 3ch; text-align: right; }
.trivia-timebar { height: 6px; border-radius: 3px; background: var(--night-2); overflow: hidden; margin: 10px 0 18px; }
.trivia-timebar span { display: block; height: 100%; background: var(--grad); transition: width .25s linear; }
.trivia-prompt { font-size: 22px; font-weight: 500; line-height: 1.35; margin-bottom: 18px; }
.trivia-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trivia-choice { display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--night-2); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; min-height: 56px; }
.trivia-choice:hover:not(:disabled) { border-color: var(--cyan); background: var(--cyan-soft); }
.trivia-choice:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.trivia-choice:disabled { cursor: default; opacity: .6; }
.trivia-choice.picked { opacity: 1; border-color: var(--cyan); background: var(--cyan-soft); }
.trivia-choice .letter { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--raised-2); color: var(--ink-2); }
.trivia-done { text-align: center; padding: 10px 0; }
.trivia-done .champion-mark { margin: 0 auto 12px; }
@media (max-width: 560px) { .trivia-choices { grid-template-columns: 1fr; } .trivia-prompt { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .trivia-timebar span { transition: none; } }

.review-list { padding-left: 20px; margin: 0; display: grid; gap: 16px; }
.review-prompt { font-weight: 600; margin: 0 0 8px; }
.review-choices { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.review-choices li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.review-choices li svg { width: 16px; height: 16px; flex: none; }
.review-choices li.right { color: var(--success); font-weight: 600; }
.review-choices li.wrong { color: var(--danger); }
.review-choices .dot { width: 16px; height: 16px; flex: none; display: grid; place-items: center; }
.review-choices .dot::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
dialog:has(> .dialog-wide) { width: min(680px, calc(100vw - 32px)); }
.q-choice .input { min-width: 0; }

/* v18 Discover controls: fluid tabs on small devices, keyboard-visible actions. */
.discover-feed-tabs { margin: 4px 0 10px; overflow-x: auto; }
.discover-feed-tabs [role="tab"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; border-radius: 6px 6px 0 0; }
.discover-feed-hint { min-height: 22px; margin: 0 0 14px; }
.discover-feed-more { margin: 18px auto 4px; display: flex; }
.discover-feed-results .empty { margin-top: 4px; }

/* v19 Circles home: joined communities with a dedicated responsive activity feed. */
.circles-tabs { margin: 0 0 20px; overflow-x: auto; }
.circles-tabs [role="tab"]:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.circles-content { min-height: 180px; }
.my-circles-head { align-items: start; gap: 16px; margin-bottom: 16px; }
.my-circles-head h2 { margin-bottom: 5px; }
.my-circles-head p { margin: 0; }
.circle-recent { display: inline-flex; align-items: center; gap: 7px; color: var(--cyan); margin: 0; }
.circle-recent svg { width: 15px; height: 15px; }
.circle-card.has-new-posts { border-top: 3px solid var(--cyan); }
.my-circles-sort { flex-wrap: wrap; margin: 0 0 15px; }
.my-circles-sort button:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.my-circles-more { display: flex; margin: 18px auto 4px; }
@media (max-width: 600px) { .my-circles-head { flex-wrap: wrap; } .my-circles-sort { display: flex; width: 100%; } .my-circles-sort button { flex: 1; padding: 9px 8px; } }

/* v20: accessible Circle pulse and human-written, rotating discussion ideas. */
.circle-pulse { display: flex; flex-wrap: wrap; gap: 16px 30px; padding: 17px 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); margin: 0 0 20px; align-items: center; }
.pulse-title { min-width: 112px; font-weight: 700; display: grid; gap: 3px; }
.pulse-title small { color: var(--ink-2); font-size: 12px; font-weight: 400; }
.pulse-stat { display: flex; flex-direction: column; gap: 2px; }
.pulse-stat strong { font-size: 23px; color: var(--ink); }
.pulse-stat span { color: var(--ink-2); font-size: 12px; }
.circle-starters { margin: 0 0 22px; }
.starter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 12px; }
.starter-card { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; padding: 17px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); min-width: 0; }
.starter-card.featured { border-color: var(--line-strong); background: linear-gradient(135deg, var(--raised), var(--surface)); }
.starter-kicker { display: flex; gap: 7px; align-items: center; color: var(--cyan); font-size: 12px; font-weight: 650; }
.starter-kicker svg { width: 16px; height: 16px; }
.starter-card h3 { font-size: 17px; line-height: 1.35; margin: 0; }
.starter-card p { margin: 0; flex: 1; }
.starter-card .btn { margin-top: 2px; }
.starter-alternatives { margin-top: 12px; }
.starter-alternatives > summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 10px 0; }
.starter-alternatives > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.starter-circle { color: var(--ink-2); font-size: 13px; margin-bottom: 8px; }
.starter-draft-hint { margin-bottom: 18px; }
@media (max-width: 550px) { .circle-pulse { gap: 18px; } .pulse-title { flex-basis: 100%; } .pulse-stat { min-width: 25%; } }

/* v21 — Catch Up: real activity, personal context, no manufactured engagement */
.catchup-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(circle at 100% -10%, rgba(95, 196, 245, .17), transparent 57%),
    linear-gradient(135deg, #12264f, #09172f 75%);
  padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); margin: 8px 0 18px;
  box-shadow: var(--shadow);
}
.catchup-hero .eyebrow { display: flex; align-items: center; gap: 8px; color: var(--cyan); }
.catchup-hero h2 { font: italic 900 clamp(25px, 4vw, 33px)/1.17 var(--display); margin-top: 8px; letter-spacing: -.028em; }
.catchup-actions { margin-top: 18px; flex-wrap: wrap; gap: 10px; }
.catchup-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-bottom: 27px; }
.catchup-metric {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--r-md);
  min-width: 0; transition: border-color .15s, transform .15s;
}
.catchup-metric:hover, .catchup-metric:focus-visible { border-color: var(--cyan); transform: translateY(-2px); }
.catchup-metric strong { color: var(--ink); font: 800 27px/1.2 var(--display); }
.catchup-metric span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.catchup-section { margin: 26px 0; }
.catchup-section .section-head { align-items: start; gap: 10px; }
.catchup-section .section-head .btn { flex-shrink: 0; }
.catchup-promo {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin: 4px 0 18px; padding: 14px 18px;
  border: 1px solid rgba(127, 228, 250, .24); border-radius: var(--r-md);
  background: linear-gradient(110deg, rgba(79,156,249,.15), rgba(8,20,45,.85));
}
.catchup-promo strong { font-size: 15px; color: var(--ink); }
@media (max-width: 700px) {
  .catchup-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .catchup-section .section-head { flex-wrap: wrap; }
  .catchup-hero { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) { .catchup-metric { transition: none; } }

/* v21 — inbox filtering with a responsive, readable control row */
.notification-tabs { flex-wrap: wrap; margin: 14px 0 8px; }
.notification-tabs button[aria-pressed="true"] { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-soft); }
.notification-load { margin-top: 14px; }
.notification-hub .page-head { gap: 12px; flex-wrap: wrap; }
.notification-hub .item.unread { border-left: 2px solid var(--cyan); }


/* Members Online — Discover right rail */
.online-members { border: 1px solid rgba(110,171,242,.24); border-radius: 16px; padding: 16px; background: linear-gradient(150deg,rgba(32,59,116,.28),rgba(8,15,39,.50)); min-width: 0; }
.online-header { display:flex; align-items:center; gap:10px; justify-content:space-between; margin-bottom:14px; }
.online-header h3 { margin:0; font-size:15px; }
.online-count { background:rgba(72,199,145,.13); color:#75e0af; border:1px solid rgba(86,219,161,.35); border-radius:20px; padding:2px 9px; font-weight:800; font-variant-numeric:tabular-nums; font-size:13px; }
.online-list { display:flex; flex-direction:column; gap:3px; max-height:430px; overflow-y:auto; min-height:34px; scrollbar-width:thin; }
.online-member { display:flex; gap:10px; align-items:center; padding:8px 4px; border-radius:9px; text-decoration:none; color:var(--ink); min-width:0; }
.online-member:hover, .online-member:focus-visible { background:rgba(160,200,255,.08); }
.online-avatar { display:inline-flex; position:relative; flex:none; }
.online-dot { position:absolute; bottom:-1px; right:-1px; width:11px; height:11px; border:2px solid #101a37; background:#39dc91; box-shadow:0 0 7px rgba(57,220,145,.6); border-radius:50%; }
.online-name { display:flex; flex-direction:column; min-width:0; line-height:1.3; }
.online-name strong, .online-name span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.online-name strong { font-size:13px; }
.online-name span { font-size:11px; }
@media(max-width:900px) { .online-list { max-height:260px; } }

.online-mobile-panel { display:none; }
@media(max-width:1000px) {
  .online-mobile-panel { display:block; margin:0 0 18px; }
  .online-mobile-panel .online-members { max-width:680px; }
  .online-mobile-panel .online-list { max-height:250px; }
}

/* Invite dialog: visible dismiss controls and compact mobile layout. */
.invite-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.invite-dialog-heading h2 { min-width: 0; margin: 0; }
.invite-dialog-close { flex: none; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 10px; }
.invite-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.invite-dialog-actions .btn { min-height: 42px; }
@media (max-width: 480px) { .invite-dialog-actions { justify-content: stretch; } .invite-dialog-actions .btn { flex: 1 1 auto; } }


/* Admin Circle deletion: keep every word and action visible; never scroll sideways. */
dialog:has(> .circle-delete-dialog) {
  width: min(640px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: min(88dvh, 760px);
  padding: clamp(16px, 3vw, 28px);
  overflow-x: hidden;
  overflow-y: auto;
}
.circle-delete-dialog { width: 100%; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.circle-delete-dialog > * { max-width: 100%; }
.circle-delete-dialog .circle-delete-confirm { width: 100%; max-width: 360px; min-width: 0; }
.circle-delete-actions { display: flex; justify-content: flex-end; align-items: stretch; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.circle-delete-actions .btn { white-space: normal; overflow-wrap: anywhere; text-align: center; min-width: 0; min-height: 44px; max-width: 100%; }
@media (max-width: 480px) {
  .circle-delete-actions { flex-direction: column-reverse; }
  .circle-delete-actions .btn { width: 100%; }
  .circle-delete-dialog .circle-delete-confirm { max-width: 100%; }
}

/* Five IQTango editorial invitations: three visible, two in an accessible details panel. */
.starter-featured-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.starter-intro { margin:0 0 12px; }
.starter-role { font-size:11px;color:var(--ink-2);border:1px solid var(--line);border-radius:100px;padding:3px 8px; }
.starter-kicker { flex-wrap:wrap; }
.starter-alternatives[open] > summary { margin-bottom:8px; }
@media (max-width:800px){.starter-featured-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:540px){.starter-featured-grid{grid-template-columns:minmax(0,1fr);} .starter-card{padding:15px;}}
