:root {
  color-scheme: dark;
  --ink: #eef0f6; --ink-2: #c5cbdb; --muted: #98a0b5; --line: #2a2e3d; --line-2: #222636;
  --bg: #0e1017; --card: #181b26; --raised: #1f2331; --accent: #8ea2ff; --accent-2: #b3c0ff; --accent-solid: #3d5ce0; --accent-bg: #232842;
  --good: #5fd49b; --good-bg: #16302a; --warn: #f0c060; --warn-bg: #352b12; --bad: #ff7b72;
  --r: 12px; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
img { max-width: 100%; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.01em; }
h2 { font-size: 17px; margin: 32px 0 12px; }
h3 { font-size: 15px; margin: 0 0 4px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

/* header */
.top { background: rgba(17, 19, 27, .88); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1040px; margin: 0 auto; padding: 0 24px; height: 58px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 9px; font: 700 21px/1 'Space Grotesk', Inter, system-ui, sans-serif; letter-spacing: -.03em; color: var(--ink); text-decoration: none; }
.brand-mark { height: 19px; width: auto; flex: none; }
nav { display: flex; gap: 4px; flex: 1; }
nav a { text-decoration: none; color: var(--ink-2); padding: 6px 12px; border-radius: 8px; font-weight: 500; }
nav a:hover { background: var(--line-2); }
nav a.active { color: var(--ink); background: var(--line-2); }
.acct { position: relative; margin-left: auto; }
.acct-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 3px 12px 3px 3px; cursor: pointer; font: inherit; color: var(--ink); }
.acct-btn img { width: 28px; height: 28px; border-radius: 50%; background: var(--line); object-fit: cover; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 220px; padding: 6px; }
.menu-email { padding: 8px 10px; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; word-break: break-all; }
.menu button { width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; color: var(--ink); }
.menu button:hover { background: var(--line-2); }

main { max-width: 1040px; margin: 0 auto; padding: 32px 24px 80px; }

/* controls */
button, .button { font: inherit; font-weight: 500; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--card); cursor: pointer; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: background .12s, border-color .12s; }
button:hover, .button:hover { border-color: #4a516b; background: var(--raised); }
button.primary, .button.primary { background: var(--accent-solid); border-color: var(--accent-solid); color: #fff; }
button.primary:hover, .button.primary:hover { background: #4f6df0; border-color: #4f6df0; }
button.danger { color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--line-2); }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }
button:disabled { opacity: .55; cursor: default; }
button.big, .button.big { padding: 11px 20px; font-size: 16px; border-radius: 10px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
input, textarea, select { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid #3a4057; border-radius: 9px; background: var(--card); color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.error { color: var(--bad); font-size: 14px; min-height: 1.2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* layout */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.page-head { margin-bottom: 22px; }
.back { display: inline-block; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back:hover { color: var(--ink); }
.empty { text-align: center; padding: 48px 20px; }
.empty .art { font-size: 34px; margin-bottom: 8px; }

/* pills + progress */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); text-transform: capitalize; vertical-align: middle; }
.pill.live { background: var(--good-bg); color: var(--good); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.done { background: var(--accent-bg); color: var(--accent); }
.progress { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .3s; }

/* test cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.tcard { display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.tcard:hover { border-color: #3a4057; transform: translateY(-1px); }
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; background: var(--line-2); aspect-ratio: 16/7; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; background: #23273a; }
.tcard-body { padding: 14px 16px 16px; }
.tcard-body .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin: 8px 0 8px; }

/* upload */
.drop { border: 2px dashed #3a4057; border-radius: var(--r); padding: 30px 18px; text-align: center; color: var(--muted); cursor: pointer; background: var(--raised); transition: border-color .12s, background .12s; }
.drop strong { color: var(--ink); display: block; margin-bottom: 2px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-bg); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--card); }
.slot img { width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #23273a; border-radius: 6px; display: block; }
.slot .row { margin-top: 8px; flex-wrap: nowrap; }
.slot input { padding: 6px 9px; }
.formbar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 22px 0 8px; display: flex; gap: 10px; align-items: center; }

/* results */
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; margin: 18px 0; background: var(--line-2); color: var(--ink-2); }
.verdict.clear { background: var(--good-bg); color: #0f5134; }
.verdict.leaning { background: var(--warn-bg); color: var(--warn); }
.verdict strong { display: block; color: inherit; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.res { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); position: relative; }
.res img { width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #23273a; border-radius: 7px; display: block; cursor: zoom-in; }
.res.lead { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.res .badge { position: absolute; top: 16px; left: 16px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.res .nums { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 2px 6px; }
.res .pct { font-size: 22px; font-weight: 700; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { padding: 5px 12px; border-radius: 99px; font-size: 13px; }
.tabs button[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.reasons { padding: 4px 18px; }
.reason { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.reason:last-child { border-bottom: 0; }
.reason .who { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.lightbox { position: fixed; inset: 0; background: rgba(10, 12, 18, .85); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; cursor: zoom-out; }
.lightbox img { max-height: 100%; border-radius: 8px; }

/* tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
th { background: var(--raised); font-weight: 600; color: var(--muted); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--raised); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* code */
code, pre { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 5px; }
.codebox { position: relative; }
.codebox pre { background: #14161b; color: #e6e8ee; padding: 16px 18px; border-radius: 10px; overflow: auto; margin: 0; white-space: pre; }
.codebox .copy { position: absolute; top: 8px; right: 8px; font-size: 13px; padding: 4px 10px; background: #2a2d36; color: #e6e8ee; border-color: #3a3e4a; }
.keyrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.keyrow code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 6px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* landing */
.hero { text-align: center; padding: 48px 0 40px; }
.hero h1 { font-size: 42px; letter-spacing: -.025em; max-width: 720px; margin: 0 auto 14px; }
.hero p { font-size: 18px; color: var(--ink-2); max-width: 600px; margin: 0 auto 28px; }
.gbtn { background: var(--card); border: 1px solid #3a4057; color: var(--ink); font-weight: 600; }
.gbtn:hover { background: var(--raised); }
.gbtn svg { width: 18px; height: 18px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 48px; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); font-weight: 700; display: grid; place-items: center; margin-bottom: 10px; font-size: 14px; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sides ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); }
.sides li + li { margin-top: 4px; }
.mock { max-width: 560px; margin: 0 auto 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(20, 22, 30, .1); padding: 16px; text-align: left; }
.mock .q { font-weight: 650; margin-bottom: 10px; }
.mock .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mock .two div { aspect-ratio: 16/10; border-radius: 8px; border: 2px solid var(--line); background: linear-gradient(135deg, #ffd6a8, #ff8f70); }
.mock .two div + div { background: linear-gradient(135deg, #a8c6ff, #6f7dff); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 56px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); z-index: 60; }
.toast.bad { background: #b3261e; color: #fff; }

@media (max-width: 720px) {
  .top-in { gap: 12px; padding: 0 14px; }
  .acct-btn span { display: none; }
  .acct-btn { padding: 3px; }
  main { padding: 22px 16px 70px; }
  .grid2, .steps, .sides, .stats { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
}

/* designs: upload tiles */
.plan { background: var(--accent-bg); color: var(--accent-2); border-radius: 9px; padding: 10px 14px; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.tile { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tile img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #23273a; }
.tile span { display: block; padding: 6px 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile button { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: rgba(20, 22, 30, .7); color: #fff; font-size: 12px; }
.tile button:hover { background: var(--bad); border: 0; }

/* funnel + ranking */
.funnel { display: flex; align-items: stretch; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.fstep { flex: 1; min-width: 150px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.fstep .fname { font-size: 13px; font-weight: 600; color: var(--muted); }
.fstep strong { font-size: 18px; }
.fstep.live { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.fstep.live .fname { color: var(--accent); }
.fstep.done .fname::after { content: " ✓"; color: var(--good); }
.fstep.next { opacity: .6; }
.farrow { align-self: center; color: var(--muted); }
.verdict.narrowing { background: var(--accent-bg); color: var(--accent-2); }
.tier { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.tbadge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; color: #fff; background: #8a8f9c; }
.tbadge.tS { background: #c9861a; } .tbadge.tA { background: var(--accent); } .tbadge.tB { background: #2c8a63; } .tbadge.tC { background: #7a6bb5; }
.lboard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.lrow { display: grid; grid-template-columns: 30px 104px minmax(120px, 1.2fr) minmax(120px, 2fr) 44px 150px; gap: 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.lrow:last-child { border-bottom: 0; }
.lrow .rank { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.lrow img { width: 104px; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; background: #23273a; cursor: zoom-in; display: block; }
.lrow .who { display: flex; flex-direction: column; min-width: 0; }
.lrow .who strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .score { font-weight: 700; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; }
.lrow .state { text-align: right; }
.lrow.out img, .lrow.out .who, .lrow.out .score { opacity: .55; }
.range { position: relative; height: 18px; }
.range::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 2px; background: var(--line-2); }
.range i { position: absolute; top: 5px; height: 8px; border-radius: 4px; background: #3b4a85; }
.range b { position: absolute; top: 2px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.lrow.out .range i { background: #2a2e3d; } .lrow.out .range b { background: #9a9eab; }
.posnote { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ink-2); margin-top: 16px; }
@media (max-width: 720px) {
  .lrow { grid-template-columns: 22px 72px 1fr 40px; } .lrow img { width: 72px; } .lrow .range, .lrow .state { display: none; }
  .farrow { display: none; }
}

/* funnel, top down: one row per round, no box around it */
.fgraph { position: relative; display: flex; flex-direction: column-reverse; gap: 64px; padding: 6px 0 4px; }
.fgraph svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.fgraph path { fill: none; stroke: #9fb1ee; stroke-width: 1.5; opacity: .7; }
.fgraph.tracing path { opacity: .1; } .fgraph.tracing path.trace { opacity: 1; stroke: var(--accent); stroke-width: 3; }
.frow { position: relative; z-index: 1; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; }
.frow header { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.frow .fname { font-size: 13px; font-weight: 700; color: var(--muted); }
.frow.live .fname { color: var(--accent); } .frow.done .fname::after { content: " ✓"; color: var(--good); }
.frow header strong { font-size: 19px; } .frow b.up { color: var(--good); }
.frow.next { opacity: .55; }
.fthumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 100%; }
.fth { width: var(--w); padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: #23273a; display: block; box-shadow: 0 4px 12px -6px rgba(20, 22, 30, .35); }
.fth img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.fth span { display: block; padding: 7px 8px; font-weight: 700; font-size: 14px; background: var(--card); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fth.up { border-color: #9fb1ee; } .fth.cut { opacity: .3; filter: grayscale(.8); box-shadow: none; }
.fth.win { border-color: #c9861a; box-shadow: 0 0 0 2px #c9861a, 0 14px 30px -12px rgba(201, 134, 26, .7); }
.fth.trace { border-color: var(--accent); opacity: 1; filter: none; }
.fth:hover { border-color: var(--accent); }
@media (max-width: 720px) { .fgraph { gap: 44px; } .fth { width: calc(var(--w) * .6); } .frow { grid-template-columns: 1fr; gap: 10px; } .frow header { align-items: center; } }

/* funnel: a clicked design's matchups in that round */
.fth { position: relative; }
.frow.focus .fth:not(.sel):not(.rival) { opacity: .18; filter: grayscale(.8); box-shadow: none; }
.frow.focus .fth.rival { opacity: 1; filter: none; border-color: #3a4057; }
.fth.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); opacity: 1; filter: none; }
.vsb { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); font-style: normal; font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); white-space: nowrap; }
.vsb.up { background: var(--good); color: #fff; } .vsb.down { background: var(--bad); color: #fff; }
/* Night: the title and the funnel share one dotted stage that runs the full width and fades into the page */
.stage { position: relative; margin: -32px 0 30px; padding: 40px 0 46px; }
.stage::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 300vw; /* wider than the window, so the dots reach both edges even when the page shifts for the details panel */ transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(#2c3142 1.1px, transparent 1.2px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(#000 0, #000 calc(100% - 140px), transparent); mask-image: linear-gradient(#000 0, #000 calc(100% - 140px), transparent); }
.stage > * { position: relative; }
.shead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 34px; }
.shead h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; margin: 8px 0 6px; color: #fff; }
.shead p { margin: 0; font-size: 17px; color: #aab2c8; }
.sstate { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #c9d3ff; border: 1px solid #343a55; border-radius: 99px; padding: 2px 11px; background: rgba(35, 40, 66, .6); }
.sstate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f0b545; }
.sstate.live { color: #a8ecc9; border-color: #24503f; background: rgba(22, 48, 42, .6); } .sstate.live::before { background: #5fd49b; }
.fgraph { color: #eef0f6; }
.fgraph::before { content: ""; position: absolute; left: 50%; top: -90px; width: 760px; height: 420px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 196, 92, .22), transparent); pointer-events: none; }
.fgraph .muted, .fgraph .fname { color: #98a0b5; }
.fgraph b.up { color: #5fd49b; }
.fgraph path { stroke: #6f83d6; opacity: .8; }
.fgraph.tracing path.trace { stroke: #fff; }
.fth { background: #23273a; box-shadow: 0 6px 18px -6px #000; }
.fth.up { border-color: #6f83d6; }
.fth.cut { opacity: .28; }
.fth.trace, .fth:hover { border-color: #fff; }
.fth.win span { background: #1b1e2a; color: #fff; }
.frow.focus .fth.rival { border-color: #3a4057; }

/* details panel for a clicked design, on the right */
.fdrawer { position: fixed; top: 58px; right: 0; bottom: 0; width: 340px; z-index: 20; overflow-y: auto; background: #181b26; color: #eef0f6; border-left: 1px solid #2a2e3d; padding: 18px; box-shadow: -18px 0 40px -20px rgba(0, 0, 0, .6); }
.fdrawer h3 { font-size: 18px; margin: 12px 0 10px; overflow-wrap: anywhere; }
.dclose { position: absolute; top: 24px; right: 24px; width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 50%; border: 0; background: rgba(17, 19, 27, .75); color: #fff; }
.dclose:hover { background: #000; border: 0; }
.dimg { width: 100%; border-radius: 10px; display: block; cursor: zoom-in; background: #23273a; }
.dfacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dfacts div { background: #20243300; border: 1px solid #2a2e3d; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.dfacts div:last-child { grid-column: 1 / -1; }
.dfacts b { font-size: 20px; font-variant-numeric: tabular-nums; } .dfacts b.dfate { font-size: 16px; }
.dfacts span { font-size: 12px; color: #98a0b5; }
.dtabs { display: flex; gap: 6px; margin: 16px 0 8px; flex-wrap: wrap; }
.dtabs button { padding: 4px 12px; border-radius: 99px; font-size: 13px; background: none; color: #c5cbdb; border-color: #2a2e3d; }
.dtabs button[aria-pressed=true] { background: #eef0f6; color: #11131b; border-color: #eef0f6; }
.dline { margin: 0 0 10px; color: #c5cbdb; } .dline b { color: #fff; }
.dvs { display: flex; flex-direction: column; gap: 4px; }
.dvs button { background: none; border: 1px solid transparent; color: #eef0f6; padding: 4px 6px 4px 4px; justify-content: flex-start; font-weight: 400; min-width: 0; }
.dvs button:hover { background: #20243a; border-color: #2a2e3d; }
.dvs img { width: 62px; aspect-ratio: 16/10; object-fit: cover; border-radius: 5px; flex: none; }
.dvs span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.dvs .vsb { position: static; transform: none; flex: none; }
.dnote { font-size: 12px; color: #98a0b5; margin: 10px 0 0; }
/* make room for the panel on wide windows, so it never covers the funnel */
@media (min-width: 1100px) { body.drawer main { margin-right: 340px; margin-left: max(0px, calc((100vw - 340px - 1040px) / 2)); } }
@media (max-width: 560px) { .fdrawer { width: 100%; } }

/* night theme, site-wide: small fixes on top of the dark tokens */
button, .button { background: var(--raised); }
button.ghost, button.link, .menu button { background: transparent; }
input, textarea, select { background: #141722; border-color: #3a4057; }
input::placeholder, textarea::placeholder { color: #6f778c; }
.verdict { background: var(--raised); }
.verdict.clear { color: var(--good); } .verdict.leaning { color: var(--warn); }
.pill.done { color: var(--accent); }
.tbadge { color: #11131b; } .tbadge.tS { background: #f0b545; } .tbadge.tA { background: var(--accent); } .tbadge.tB { background: #5fd49b; } .tbadge.tC { background: #b3a4f0; }
.range::before { background: var(--line); } .range b { background: var(--accent); }
.progress { background: var(--line); } .progress > div { background: var(--accent-solid); }
.plan { color: var(--accent-2); }
.drop { background: #141722; } .drop:hover, .drop.over { background: var(--accent-bg); }
.codebox pre { border: 1px solid var(--line); }
.mshown .won img { border-color: var(--good); }
.vs b.down { color: var(--bad); }

html, body { overflow-x: clip; }
