:root {
  --ink: #111; --ink2: #3a3a3a; --soft: #767676; --line: #e7e7e4; --bg: #fafaf8; --card: #fff; --hover: #f3f3f0;
  --up: #1f9d55; --down: #c2412d; --run: #2563eb;
  --hook: #111; --rule: #9a9a95; --beat: #d9d9d4; --ask: #1f9d55;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Inter, Roboto, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
details.more > summary { cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary h2::after { content: ' ▸'; color: var(--soft); }
details.more[open] > summary h2::after { content: ' ▾'; }
body { margin: 0; }
a { color: inherit; }
.soft { color: var(--soft); }
.pad { padding: 24px; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
#tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
#tabs a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink2); white-space: nowrap; }
#tabs a:hover { background: var(--hover); }
#tabs a.on { background: var(--ink); color: #fff; }
.end { display: flex; align-items: center; gap: 12px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--ink); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; padding: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { border: 0; background: none; color: var(--soft); cursor: pointer; font: inherit; text-decoration: underline; }
.g { width: 18px; height: 18px; }

.signin { max-width: 380px; margin: 12vh auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.signin h1 { margin: 0 0 6px; font-size: 22px; }
.signin p { margin: 0 0 20px; line-height: 1.5; }
.alt { margin-top: 16px; } .alt summary { cursor: pointer; color: var(--soft); }
.alt form { display: flex; gap: 8px; margin-top: 10px; }
.alt input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.err { color: var(--down); min-height: 1em; }

main { max-width: 1280px; margin: 0 auto; padding: 20px; }
section { margin: 0 0 28px; }
h2 { font-size: 15px; margin: 0 0 10px; display: flex; align-items: baseline; gap: 10px; }
h2 .soft { font-weight: 400; font-size: 13px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: auto; }

/* numbers line */
.nums { display: flex; flex-wrap: wrap; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.nums > div { padding: 10px 16px; border-right: 1px solid var(--line); min-width: 120px; }
.nums > div:last-child { border-right: 0; }
.nums b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.nums small { color: var(--soft); font-size: 12px; }

/* tables */
table { width: 100%; border-collapse: collapse; }
th { font-weight: 500; color: var(--soft); font-size: 12px; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fcfcfb; white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--hover); }
td .sub { display: block; color: var(--soft); font-size: 12px; margin-top: 2px; }
td.cap { max-width: 380px; }
td.cap b { font-weight: 500; }
.thumb { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; background: var(--line); display: block; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--line); vertical-align: middle; margin-right: 8px; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--hover); color: var(--ink2); }
.tag.hook { background: var(--hook); color: #fff; } .tag.rule { background: var(--rule); color: #fff; } .tag.ask { background: var(--ask); color: #fff; } .tag.beat { background: var(--beat); }
.tag.open { background: #e8f0ff; color: var(--run); } .tag.closed { background: var(--hover); color: var(--soft); }
.spark { display: block; }

/* charts */
.chart { padding: 12px 16px 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.chart svg { width: 100%; height: 160px; display: block; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--soft); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* reel structure */
.reel { padding: 14px 16px; background: #fcfcfb; }
.bar { position: relative; height: 26px; border-radius: 6px; overflow: hidden; background: var(--hover); margin: 6px 0 4px; }
.bar span { position: absolute; top: 0; bottom: 0; border-right: 1px solid #fff; }
.bar .watch { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--down); }
.ticks { position: relative; height: 16px; font-size: 11px; color: var(--soft); }
.ticks span { position: absolute; transform: translateX(-50%); }
.lines { width: 100%; margin-top: 10px; }
.lines td { padding: 4px 8px; border: 0; }
.lines tr.past td { color: var(--soft); }
.lines tr.at td { background: #fff3f0; }

/* story */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } .top { flex-wrap: wrap; } }
.truth { padding: 14px 16px; line-height: 1.55; }
.truth .k { font-size: 12px; color: var(--soft); display: block; margin-bottom: 4px; }
tr.now td { background: #f4fbf6; }
.funnel td.bar2 { width: 40%; }
.funnel .fill { height: 10px; background: var(--ink); border-radius: 3px; }
.note { font-size: 12px; color: var(--soft); margin: 6px 2px 0; }
.empty { padding: 20px; color: var(--soft); }
