:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --soft: #f0f0f3;
  --accent: #0071e3;
  --accent-soft: #e8f1fc;
  --good: #1a8f3c;
  --good-soft: #e6f4ea;
  --warn: #b25e00;
  --warn-soft: #fdf1e3;
  --bad: #d70015;
  --bad-soft: #fde8ea;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1c1c1e; --text: #f5f5f7; --muted: #98989d; --line: #2c2c2e; --soft: #2c2c2e;
    --accent: #2997ff; --accent-soft: #0a2a4a; --good: #30d158; --good-soft: #0f2e18;
    --warn: #ff9f0a; --warn-soft: #3a2700; --bad: #ff453a; --bad-soft: #3a1210;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { font-size: 15px; line-height: 1.45; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.bar-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand i { width: 18px; height: 18px; border-radius: 6px; background: var(--accent); display: inline-block; position: relative; }
.brand i::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
nav::-webkit-scrollbar { display: none; }
nav a {
  color: var(--muted); padding: 6px 12px; border-radius: 999px; white-space: nowrap; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
nav a:hover { color: var(--text); text-decoration: none; }
nav a.on { color: var(--text); background: var(--soft); font-weight: 500; }
.badge { background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; }
.sync { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- layout ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 32px 20px 96px; }
h1 { font-size: 34px; line-height: 1.12; letter-spacing: -.022em; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
.sub { color: var(--muted); font-size: 17px; margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
section { margin-top: 40px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; font-weight: 500;
  background: var(--soft); color: var(--text); display: inline-flex; align-items: center; gap: 6px;
  transition: transform .06s ease, background .15s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.big { padding: 13px 24px; font-size: 16px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.ghost { background: transparent; color: var(--accent); padding-left: 0; padding-right: 0; }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.done { background: var(--good-soft); color: var(--good); }

/* ---------- hero ---------- */
.hero { padding: 8px 0 0; }
.hero .row { margin-top: 20px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }

.alert { border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert p { margin: 2px 0 0; color: var(--text); }

/* ---------- flow ---------- */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.step {
  background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); position: relative;
  display: flex; flex-direction: column; gap: 2px; color: inherit; min-height: 132px;
}
.step:hover { text-decoration: none; outline: 1px solid var(--line); }
.step .who { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.step.you { background: var(--accent); color: #fff; }
.step.you .who, .step.you .muted { color: rgba(255,255,255,.8); }
.step .n { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: auto; line-height: 1; }
.step .unit { font-size: 12px; }
.step .num { position: absolute; top: 12px; right: 14px; font-size: 12px; color: var(--muted); }
.step.you .num { color: rgba(255,255,255,.7); }
.flow-note { margin-top: 12px; }
.flow-detail { display: none; }

/* ---------- lists ---------- */
.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 20px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; cursor: pointer;
  display: grid; place-items: center; background: transparent; padding: 0; margin-top: 1px;
}
.check.on { background: var(--good); border-color: var(--good); }
.check.on::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check[disabled] { cursor: default; }
.item.done h3 { color: var(--muted); font-weight: 500; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; background: var(--soft); padding: 1px 6px; border-radius: 6px; }

/* ---------- upload ---------- */
.up { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start; }
.up-img { position: sticky; top: 80px; }
.art { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--card) repeating-conic-gradient(var(--soft) 0 25%, transparent 0 50%) 50% / 24px 24px; display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow); }
/* absolute: a % height on a grid item is ignored, so tall art grew past the square and got cropped */
.art img { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; padding: 4%; object-fit: contain; }
.art .none { color: var(--muted); font-size: 13px; }
.steps { counter-reset: s; display: flex; flex-direction: column; gap: 0; }
.ustep { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.ustep:first-child { border-top: 0; padding-top: 0; }
.ustep::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.ustep.ok::before { content: "✓"; background: var(--good-soft); color: var(--good); }
.field { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.field .val { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--soft); border-radius: 8px; padding: 3px 9px; font-size: 13px; }
.pager { display: flex; align-items: center; gap: 8px; }
input[type=text], input[type=url], input[type=password], input[type=number], textarea {
  width: 100%; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 11px 14px; outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 88px; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form input { flex: 1; }
.err { color: var(--bad); font-size: 13px; margin-top: 6px; min-height: 1em; }

/* ---------- designs ---------- */
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; gap: 2px; overflow-x: auto; max-width: 100%; }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 500; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: inherit; display: flex; flex-direction: column; }
.tile:hover { text-decoration: none; transform: translateY(-1px); }
.tile .art { border-radius: 0; box-shadow: none; }
.tile .meta { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty h2 { color: var(--text); }

/* ---------- sheet (detail) ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; display: grid; place-items: center; padding: 20px; animation: fade .15s ease; }
.sheet { background: var(--card); border-radius: 22px; max-width: 760px; width: 100%; max-height: calc(100vh - 40px); overflow: auto; padding: 24px; animation: rise .2s ease; }
.sheet-grid { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
.vote { display: inline-flex; gap: 6px; }
.vote button { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.vote button.on.up { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.vote button.on.down { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.vote svg { width: 18px; height: 18px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 30px; line-height: 1; color: var(--line); padding: 0; border-radius: 8px; }
.stars button.on { color: #f5a623; }
.stars button:hover { color: #f7c56b; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.chip.good.on { background: var(--good-soft); border-color: var(--good); color: var(--good); }
.chip.bad.on { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.rated { font-weight: 600; color: var(--muted); }
.rated.r4, .rated.r5 { color: var(--good); }
.rated.r1, .rated.r2 { color: var(--bad); }

/* ---------- results ---------- */
.gates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gate .meter { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin: 12px 0 8px; }
.gate .meter b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.gate.passed .meter b { background: var(--good); }
.gate .id { font-weight: 700; font-size: 13px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td input[type=number] { width: 84px; padding: 7px 10px; text-align: right; border-radius: 10px; }
.tablewrap { overflow-x: auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }

/* ---------- notes ---------- */
.thread { display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; flex-direction: column; gap: 6px; }
.bubble { border-radius: 18px; padding: 10px 14px; max-width: 640px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.me { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.bubble.ai { background: var(--card); box-shadow: var(--shadow); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg .meta { font-size: 12px; color: var(--muted); }
.msg .meta.r { align-self: flex-end; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: 100%; max-width: 340px; text-align: center; display: flex; flex-direction: column; gap: 12px; }
.login .brand { justify-content: center; font-size: 20px; margin-bottom: 12px; }
.login .brand i { width: 28px; height: 28px; border-radius: 9px; }
.login .brand i::after { inset: 8px; }

#toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--text); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 30;
  max-width: calc(100vw - 40px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast a { color: inherit; text-decoration: underline; margin-left: 8px; }

.skeleton { height: 200px; border-radius: var(--radius); background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .flow { grid-template-columns: repeat(3, 1fr); }
  .gates, .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  main { padding: 20px 16px 96px; }
  h1 { font-size: 28px; }
  .bar-in { padding: 0 16px; gap: 12px; }
  .sync { display: none; }
  .up { grid-template-columns: 1fr; gap: 20px; }
  .up-img { position: static; max-width: 360px; width: 100%; margin: 0 auto; }
  .sheet-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- v2: critic fixes ---------- */
.sync.late { color: var(--bad); font-weight: 500; }
.eyebrow { color: var(--muted); font-size: 14px; margin: 0 0 4px; }
.head { margin-bottom: 24px; align-items: flex-end; }
.head h1 { margin: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
ol.steps { list-style: none; margin: 0; padding: 0; }
.pager .btn { width: 40px; justify-content: center; font-size: 18px; padding: 6px 0; }
span.btn[aria-disabled] { opacity: .35; cursor: default; }
a.pill:hover { text-decoration: none; filter: brightness(.97); }

.step { min-height: 0; padding: 14px 14px 12px; gap: 4px; }
.step .lbl { font-weight: 600; font-size: 15px; }
.step .n { margin-top: 6px; font-size: 26px; display: flex; align-items: baseline; gap: 6px; }
.step .unit { font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.step.you .unit { color: rgba(255,255,255,.8); }

details.setup > summary { list-style: none; cursor: pointer; align-items: center; }
details.setup > summary::-webkit-details-marker { display: none; }
details.setup .chev { color: var(--muted); font-size: 22px; transition: transform .15s ease; }
details.setup[open] .chev { transform: rotate(90deg); }

details.skip { margin-top: 12px; text-align: center; }
details.skip > summary { list-style: none; display: inline-flex; }
details.skip > summary::-webkit-details-marker { display: none; }
details.skip[open] > summary { display: none; }
details.skip form { text-align: left; display: flex; flex-direction: column; gap: 8px; }

#toast { display: flex; align-items: center; gap: 12px; }
.toast-btn { background: transparent; border: 0; color: #4da3ff; font-weight: 600; cursor: pointer; padding: 0; }
@media (prefers-color-scheme: dark) { .toast-btn { color: #0071e3; } }

.weekpick { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.weekpick h3 { margin: 0; }
.weekpick .btn { width: 32px; justify-content: center; padding: 4px 0; }
.numbers { border-top: 1px solid var(--line); }
.nrow { display: grid; grid-template-columns: minmax(0, 1fr) repeat(4, 96px); gap: 10px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); }
.nrow:first-child { border-top: 0; }
.nname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nfield { display: flex; flex-direction: column; gap: 2px; }
.nfield span { font-size: 11px; color: var(--muted); text-align: right; }
.nfield input { padding: 7px 10px; text-align: right; border-radius: 10px; }
.nrow:not(:first-child) .nfield span { display: none; }

.tabbar { display: none; }
.login form .btn { justify-content: center; }

@media (max-width: 720px) {
  .brand span { display: none; }
  nav.top { display: none; }
  .sync { display: inline; margin-left: auto; }
  .tabbar {
    display: grid; grid-template-columns: repeat(8, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 12px; color: var(--muted); border-radius: 10px; position: relative; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.on { color: var(--accent); font-weight: 600; }
  .tabbar .badge { position: absolute; top: 0; left: 58%; }
  main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .step .n { font-size: 22px; }
  .nrow { grid-template-columns: repeat(4, 1fr); padding: 12px 16px; }
  .nname { grid-column: 1 / -1; }
  .nrow .nfield span { display: block !important; text-align: left; }
  .nfield input { text-align: left; }
  .hide-sm { display: none; }
  .head { align-items: flex-start; }
}
.brand, .brand:hover { color: var(--text); text-decoration: none; }
@media (max-width: 720px) {
  .tabbar a.on { background: none; }
  .tabbar .badge { top: 0; left: auto; right: calc(50% - 30px); }
}
.gate .meter { margin-top: 10px; }
@media (max-width: 720px) {
  .tabbar .badge { top: 2px; right: 6px; left: auto; }
  .tabbar a { padding-right: 4px; }
}
@media (max-width: 720px) {
  .tabbar a { flex-direction: row; justify-content: center; gap: 3px; padding: 10px 0; }
  .tabbar .badge { position: static; min-width: 16px; height: 16px; font-size: 10px; }
}

/* ---------- cost ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat .big { font-size: 28px; font-weight: 600; margin: 4px 0; font-variant-numeric: tabular-nums; }
.meter { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.meter b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cchart { display: flex; align-items: flex-end; gap: 2px; height: 140px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.cbar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; cursor: default; }
.cbar:hover { background: var(--soft); border-radius: 4px 4px 0 0; }
.cbar b { display: block; width: 100%; max-width: 16px; background: var(--accent); border-radius: 4px 4px 0 0; }
.cbar i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); margin-bottom: 3px; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
/* ---------- trends ---------- */
.lead { font-size: 17px; line-height: 1.45; margin: 0 0 4px; max-width: 760px; }
details.trend { display: block; }
details.trend > summary { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; list-style: none; }
details.trend > summary::-webkit-details-marker { display: none; }
details.trend > summary .pill { flex: none; margin-top: 1px; min-width: 62px; text-align: center; }
.tline { display: block; margin-top: 2px; }
.tmore { margin: 10px 0 2px 74px; }
.tmore p { margin: 0 0 6px; }
.focus { margin: 0; padding: 14px 20px 14px 40px; line-height: 1.7; }
@media (max-width: 720px) { .tmore { margin-left: 0; } }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.dot.test { background: var(--accent); } .dot.avoid { background: var(--bad); }
.dot.none { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.sbar { display: inline-block; width: 70px; height: 8px; border-radius: 4px; background: var(--soft); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.sbar b { display: block; height: 100%; background: var(--good); }
.track tr.ended td { opacity: .55; }
.track td { vertical-align: middle; }
.row.tight { gap: 6px; }
.act-h { margin: 6px 0 2px; }
.pill.conf-high { background: var(--good-soft); color: var(--good); }
.pill.conf-medium { background: var(--warn-soft); color: var(--warn); }
.pill.conf-low { background: var(--soft); color: var(--muted); }
.up { color: var(--good); } .down { color: var(--bad); }
td.num { white-space: nowrap; }
@media (max-width: 420px) { .tabbar a { font-size: 10px; letter-spacing: -.02em; } .tabbar .badge { min-width: 14px; height: 14px; font-size: 9px; padding: 0 3px; } }   /* 8 tabs since the Pick tab (D86) */

/* ---------- results (D66) ---------- */
.nrow.r3 { grid-template-columns: minmax(0, 1fr) 96px 96px 110px; }
.nrate > div { padding: 7px 0; text-align: right; font-variant-numeric: tabular-nums; }
.star { color: #f5a623; font-style: normal; }
.vfield { width: 110px; }
.vfield span { display: block !important; }
.chartbox { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.vchart { height: 120px; gap: 6px; margin-bottom: 4px; }
.vchart .cbar b { max-width: 24px; }
.vchart .cbar span { margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.vlabels { display: flex; gap: 6px; }
.vlabels span { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; }
.pchart { width: 100%; max-width: 640px; height: auto; display: block; }
.pchart .axis { stroke: var(--line); stroke-width: 1; }
.pchart .pline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pchart .pdot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.pchart .phit { fill: transparent; }
.pchart .plabel { fill: var(--text); font-size: 14px; font-weight: 600; }
.pchart .ptick { fill: var(--muted); font-size: 13px; }
.goal .meter { max-width: 360px; }
details.more > summary { cursor: pointer; }
@media (max-width: 720px) {
  .nrow.r3 { grid-template-columns: repeat(3, 1fr); }
  .nrate > div { text-align: left; }
  .vhead { flex-wrap: wrap; }
  .vhead .grow { flex-basis: 100%; }
  .vhead .vfield { flex: 1; }
  .vlabels span:nth-child(even) { visibility: hidden; }
}
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; vertical-align: middle; margin: 0 4px; }
.seg a { padding: 2px 10px; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--accent); color: #fff; }

/* ---------- jotting reminder (D71) ---------- */
.jot { background: var(--warn-soft); border-bottom: 1px solid var(--line); }
.jot-in { max-width: 1080px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.jot-items { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }

/* Pick tab (D86): the Investor chooses the winning draft */
.pickcard { margin-bottom: 20px; }
.pickcard h3 { font-size: 16px; font-weight: 600; }
.pickgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 12px; }
.pickdraft { position: relative; padding: 0; border: 3px solid transparent; border-radius: var(--radius); background: #fff; cursor: pointer; overflow: hidden; aspect-ratio: 1; }
.pickdraft img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pickdraft .tick { display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 6px; font-size: 13px; font-weight: 600; color: #fff; background: var(--accent); }
.pickdraft.on { border-color: var(--accent); }
.pickdraft.on .tick { display: block; }
