/* Night theme (default, also used when JS is off) */
:root {
  --bg: #0b0d13; --surface: #12151f; --surface2: #181c29; --line: rgba(255,255,255,.08);
  --text: #e9ecf3; --text2: #cfd5e2; --muted: #8e97ab; --amber: #f5b942; --accent-text: #1a1405;
  --red: #ff5c5c; --green: #3ddc97; --blue: #6ea8ff;
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --r: 16px; --shadow: 0 20px 60px rgba(0,0,0,.45);
  --glow1: rgba(245,185,66,.16); --glow2: rgba(255,92,92,.13); --glow3: rgba(110,168,255,.10);
}
/* Day theme: warm paper, same accents in darker, readable shades */
:root[data-theme="light"] {
  --bg: #f6f5f1; --surface: #ffffff; --surface2: #f0eee8; --line: rgba(20,24,40,.09);
  --text: #1b1d23; --text2: #343845; --muted: #5f6676; --amber: #9a6508; --accent-text: #ffffff;
  --red: #c8321f; --green: #1a8f5b; --blue: #2b5fcf;
  --shadow: 0 16px 48px rgba(30,30,50,.14);
  --glow1: rgba(245,185,66,.22); --glow2: rgba(255,92,92,.10); --glow3: rgba(110,168,255,.12);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
html[data-theme="light"] { color-scheme: light; }
:root[data-theme="light"] .thumb h3, :root[data-theme="light"] .thumb .dur { color: #fff; }
:root[data-theme="light"] .evidence { color: var(--text2); }
body { margin: 0; background: var(--bg); color: var(--text); font: 15.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .take, .takeaway blockquote { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
h1 em, h2 em { font-style: italic; color: var(--amber); font-weight: 400; }
img { display: block; }
button { font: inherit; cursor: pointer; }
::selection { background: rgba(245,185,66,.35); }

/* ambient background */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 10% -10%, var(--glow1), transparent 60%),
    radial-gradient(800px 500px at 100% 20%, var(--glow2), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, var(--glow3), transparent 60%);
}
.bg::after { content: ""; position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); }

/* header */
.top { position: relative; max-width: 1180px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; }
.logo em { font-style: italic; color: var(--amber); }
nav { display: flex; align-items: center; gap: 2px; }
nav a { padding: 7px 11px; border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; transition: .2s; }
nav a .dot { display: inline-block; background: var(--red); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 6px; margin-left: 2px; vertical-align: 1px; }
.menu-btn { display: none; background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; width: 40px; height: 40px; font-size: 18px; }
nav a:hover { color: var(--text); background: var(--surface2); }
nav a.on { color: var(--text); background: var(--surface2); }
nav a.add { color: var(--amber); }
main { max-width: 1180px; margin: 0 auto; padding: 8px 20px 80px; }
footer { max-width: 1180px; margin: 0 auto; padding: 24px 20px 48px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* hero */
.hero { padding: 56px 0 28px; }
.hero h1, .hero .lede, .hero .eyebrow { max-width: 760px; }
.hero.small { padding: 40px 0 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--amber); margin: 0 0 12px; }
.hero h1 { font-size: clamp(40px, 6.5vw, 72px); line-height: 1.02; margin: 0 0 18px; }
.lede { font-size: 18px; color: var(--muted); margin: 0; max-width: 620px; }
.stats { display: flex; flex-wrap: nowrap; gap: 12px; margin-top: 32px; }
.stats .stat { flex: 0 1 auto; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; min-width: 150px; }
.stat b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.top { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.stat.top b { display: block; font-size: 20px; color: var(--amber); padding-top: 6px; }
.stat.top span { display: block; }

/* toolbar */
.toolbar { display: flex; flex-direction: column; gap: 14px; margin: 28px 0 20px; }
.search input { width: 100%; max-width: 480px; padding: 12px 16px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.search input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; transition: .2s; }
.chip i { font-style: normal; opacity: .6; margin-left: 2px; }
.chip:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.chip.on { background: var(--amber); border-color: var(--amber); color: var(--accent-text); }
.chip.on i { opacity: .7; }

/* tiles */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s, border-color .28s; animation: rise .5s both; }
.grid .tile:nth-child(1){animation-delay:.03s}.grid .tile:nth-child(2){animation-delay:.08s}.grid .tile:nth-child(3){animation-delay:.13s}
.grid .tile:nth-child(4){animation-delay:.18s}.grid .tile:nth-child(5){animation-delay:.23s}.grid .tile:nth-child(6){animation-delay:.28s}
.grid .tile:nth-child(n+7){animation-delay:.33s}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tile:hover { transform: translateY(-5px); box-shadow: var(--shadow), 0 0 0 1px rgba(245,185,66,.35); border-color: rgba(245,185,66,.4); }
.thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.tile:hover .thumb img { transform: scale(1.05); }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,10,16,.95) 0%, rgba(8,10,16,.35) 50%, rgba(8,10,16,.15) 100%); }
.thumb h3 { position: absolute; left: 14px; right: 14px; bottom: 12px; margin: 0; z-index: 1; font-size: 18px; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.thumb .loss, .thumb .dur, .thumb .sev { position: absolute; z-index: 1; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px; backdrop-filter: blur(8px); }
.thumb .loss { top: 10px; left: 10px; background: rgba(245,185,66,.18); color: var(--amber); border: 1px solid rgba(245,185,66,.4); }
.thumb .dur { bottom: auto; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; }
.thumb .sev { right: 10px; top: 40px; display: flex; align-items: center; gap: 5px; padding: 4px 9px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; }
.thumb .sev i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 1px; }
.sev .f { background: var(--red); box-shadow: 0 0 8px var(--red); }
.sev .m { background: var(--amber); }
.tile .body { padding: 12px 14px 14px; }
.tile .meta { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.tile .take { margin: 0 0 10px; font-style: italic; font-size: 15px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cats span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }
.out.shut_down, .out.bankruptcy, .out.written_off { color: var(--red); }
.out.sold_at_loss, .out.lawsuit, .out.struggling { color: var(--amber); }
.out.recovered { color: var(--green); }
.red { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.empty { text-align: center; padding: 60px 0; color: var(--muted); }
.empty h2 { font-size: 28px; margin: 0 0 8px; color: var(--text); }
.empty a { color: var(--amber); }

/* video page */
.case { max-width: 920px; margin: 0 auto; }
.back { display: inline-block; color: var(--muted); margin: 10px 0 16px; }
.back:hover { color: var(--text); }
.player-wrap { position: relative; aspect-ratio: 16/9; border-radius: var(--r); overflow: hidden; background: #000; box-shadow: var(--shadow); border: 1px solid var(--line); }
.player-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vtitle { font-size: clamp(24px, 3.5vw, 36px); line-height: 1.15; margin: 22px 0 6px; }
.vmeta { color: var(--muted); margin: 0 0 24px; }
.vmeta a { color: var(--blue); }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 16px 0; }
.note.warn { border-color: rgba(245,185,66,.4); background: rgba(245,185,66,.08); }
.note a { color: var(--amber); }

.snapshot { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 28px; }
.snapshot div { background: var(--surface); padding: 12px 14px; }
.snapshot span { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.snapshot b { font-weight: 600; font-size: 15px; }

.takeaway { margin: 0 0 36px; padding: 28px 32px; border-radius: var(--r); position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(245,185,66,.14), rgba(255,92,92,.08)); border: 1px solid rgba(245,185,66,.3); }
.takeaway::before { content: "“"; position: absolute; right: 18px; top: -22px; font-family: var(--serif); font-size: 160px; line-height: 1; color: rgba(245,185,66,.12); }
.takeaway blockquote { margin: 0; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; font-style: italic; }

.case h2 { font-size: 26px; margin: 0 0 14px; }
.case h2 .count { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 10px; vertical-align: middle; }
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; margin: 0 0 40px; }
.summary { font-size: 17px; line-height: 1.6; margin: 0 0 14px; }
.narr { font-size: 14px; color: var(--text); }
.narr .muted { display: block; margin-top: 2px; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface2); border: 2px solid var(--muted); }
.timeline li.bad::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 10px var(--red); }
.timeline .stage { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.timeline li.bad .stage { color: var(--red); }
.timeline p { margin: 2px 0 0; font-size: 14.5px; }
.legend { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); vertical-align: middle; margin-right: 6px; }
.dot.fatal { background: var(--red); box-shadow: 0 0 8px var(--red); }
.dot.major { background: var(--amber); }
.dot.minor { background: var(--muted); }

.issues { margin-bottom: 40px; }
.issue { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 14px; padding: 18px 22px; margin-bottom: 14px; }
.issue.fatal { border-left-color: var(--red); }
.issue.major { border-left-color: var(--amber); }
.ihead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.badge { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 11px; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.badge.fatal { background: rgba(255,92,92,.15); color: var(--red); }
.badge.major { background: rgba(245,185,66,.15); color: var(--amber); }
.ihead .cat { color: var(--muted); }
.inf { margin-left: auto; color: var(--blue); font-size: 12px; border: 1px dashed rgba(110,168,255,.5); padding: 2px 8px; border-radius: 6px; }
.issue h3 { font-size: 22px; margin: 0 0 6px; }
.issue > p { margin: 0 0 8px; }
.stages { font-size: 13px; color: var(--muted); }
.stages b { color: var(--text); font-weight: 600; }
.evidence { margin: 12px 0; padding: 12px 14px; background: var(--surface2); border-radius: 10px; display: flex; gap: 12px; align-items: flex-start; font-style: italic; color: var(--text2); }
.seek { flex: none; font-style: normal; font-variant-numeric: tabular-nums; font-size: 12.5px; font-weight: 600; color: var(--amber);
  background: rgba(245,185,66,.12); border: 1px solid rgba(245,185,66,.3); border-radius: 7px; padding: 3px 8px; transition: .15s; }
.seek:hover { background: rgba(245,185,66,.25); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 10px; }
.cols h4, .check h4, .prevent h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
ul.warn, ul.fix { margin: 0; padding: 0; list-style: none; }
ul.warn li, ul.fix li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: 14.5px; }
ul.warn li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: rgba(245,185,66,.18); color: var(--amber); font-size: 11px; font-weight: 700; text-align: center; line-height: 15px; }
ul.fix li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: rgba(61,220,151,.18); color: var(--green); font-size: 10px; font-weight: 700; text-align: center; line-height: 15px; }

.check { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 36px; }
.check h2 { display: flex; align-items: center; gap: 12px; }
.check .progress { flex: 1; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; max-width: 220px; }
.check .progress i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.check .done { font-family: var(--sans); font-size: 13px; color: var(--muted); font-weight: 500; }
.check h4 { margin-top: 16px; }
.ck { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.ck input { margin-top: 4px; accent-color: var(--green); width: 16px; height: 16px; flex: none; }
.ck span { transition: .2s; }
.ck input:checked + span { color: var(--muted); text-decoration: line-through; }
.tags { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 32px; }

.transcript { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin-bottom: 36px; }
.transcript summary { cursor: pointer; padding: 14px 18px; font-weight: 600; }
.transcript summary span { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 8px; }
.transcript .lines { max-height: 50vh; overflow-y: auto; padding: 4px 18px 14px; border-top: 1px solid var(--line); }
.transcript p { display: flex; gap: 10px; margin: 0; padding: 3px 0; font-size: 14px; }
.transcript p.hl { background: rgba(245,185,66,.1); }
.related h2 { font-size: 22px; }
.adminbar { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }

/* mistakes page */
.mgroup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; margin-bottom: 16px; animation: rise .5s both; }
.mgroup header { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: baseline; margin-bottom: 14px; }
.mgroup h2 { font-size: 24px; margin: 0; }
.mgroup .n { color: var(--muted); font-size: 13px; }
.mgroup .bar { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.mgroup .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--red)); border-radius: 3px; }
.mgroup .two { margin: 0; gap: 24px; grid-template-columns: 1.2fr 1fr; }
.cases { list-style: none; margin: 0; padding: 0; }
.cases li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cases li:last-child { border-bottom: 0; }
.cases .dot { margin-top: 7px; flex: none; }
.cases a b { display: block; font-weight: 600; }
.cases a span { display: block; color: var(--muted); font-size: 13px; }
.cases a:hover b { color: var(--amber); }

/* add page */
.urlform { display: flex; gap: 8px; max-width: 760px; margin: 10px 0 8px; }
.urlform input { flex: 1; min-width: 0; padding: 12px 16px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.urlform input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.btn { padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); font-weight: 600; transition: .15s; }
.btn:hover { border-color: rgba(255,255,255,.25); }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.msg { color: var(--muted); min-height: 1.4em; margin: 6px 0; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
.xcard { display: grid; grid-template-columns: 240px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 12px 0 36px; max-width: 900px; }
.xcard[hidden] { display: none; }
.xcard img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; }
.xcard h3 { margin: 0 0 4px; font-size: 20px; }
.xactions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.xactions select { font: inherit; padding: 6px 10px; border-radius: 8px; background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
#preview { max-height: 220px; overflow: auto; font-size: 12.5px; background: var(--surface2); padding: 12px; border-radius: 10px; white-space: pre-wrap; margin: 0; color: var(--muted); }
.libhead { font-size: 24px; margin: 0 0 12px; }
.libhead .count { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 10px; font-weight: 500; }
table.admin { width: 100%; border-collapse: collapse; }
table.admin td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.admin td:first-child { padding-left: 0; }
table.admin a:hover { color: var(--amber); }
.acts { white-space: nowrap; text-align: right; }
.status { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.status.analyzed { color: var(--green); background: rgba(61,220,151,.12); }
.status.rejected { color: var(--red); background: rgba(255,92,92,.12); }

@keyframes pulse { 50% { opacity: .45; } }
.busy { animation: pulse 1.2s infinite; }

@media (max-width: 760px) {
  .two, .cols, .mgroup .two { grid-template-columns: 1fr; }
  .xcard { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .stats { flex-wrap: wrap; }
  .stat { min-width: calc(50% - 6px); }
  .top { padding: 14px 16px; }
  main { padding: 0 16px 60px; }
  .acts { white-space: normal; }
}

/* header auth */
nav .me { display: flex; align-items: center; gap: 6px; margin-left: 4px; padding: 3px 4px 3px 4px; border-radius: 999px; background: var(--surface2); font-size: 13px; white-space: nowrap; }
nav .me .handle { color: var(--amber); font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
nav .me button { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
nav .me button:hover { color: var(--text); background: var(--surface); }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
footer .flinks a { color: var(--muted); }
footer .flinks a:hover { color: var(--text); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-size: inherit; }
.linkish:hover { color: var(--red); }
.inline { display: inline; }

/* board */
.btoolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 18px; }
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tabs a.on { background: var(--surface2); color: var(--text); }
.posts { display: flex; flex-direction: column; gap: 10px; }
.postrow { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; transition: border-color .2s; }
.postrow:hover { border-color: rgba(255,255,255,.18); }
.postrow.top { background: none; border: 0; padding: 8px 0 0; align-items: flex-start; }
.ptitle { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.ptitle:hover { color: var(--amber); }
.ptitle.big { font-size: clamp(26px, 3.5vw, 34px); margin: 0 0 6px; }
.ptag { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--amber); background: rgba(245,185,66,.12); border: 1px solid rgba(245,185,66,.3); padding: 2px 8px; border-radius: 6px; vertical-align: middle; }
.pmeta { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.pmeta a:hover { color: var(--text); }
.pthumb img { width: 110px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.vote { display: inline-flex; flex-direction: column; align-items: center; gap: 0; min-width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vote b { font-size: 13px; color: var(--text); }
.vote button { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.vote button:hover { background: var(--surface2); color: var(--text); }
.vote .up.on { color: var(--amber); }
.vote .down.on { color: var(--blue); }
.post-full { max-width: 860px; margin: 0 auto; }
.pcase { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 14px 0; }
.pcase img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.pcase small { display: block; color: var(--amber); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; }
.pcase b { font-weight: 600; }
.pbody { font-size: 16px; margin: 14px 0 8px; }
.pbody p { margin: 0 0 12px; }

/* comments */
.discussion { margin: 36px 0; }
.cform textarea, .bigform textarea, .bigform input, .bigform select { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
.cform textarea:focus, .bigform textarea:focus, .bigform input:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.cform { margin: 0 0 20px; }
.cbtns { display: flex; gap: 8px; margin-top: 8px; }
.login-cta { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; }
.login-cta a { color: var(--amber); }
.comments { display: flex; flex-direction: column; gap: 6px; }
.c { padding: 8px 0 2px; }
.c .kids { margin-left: 14px; padding-left: 14px; border-left: 2px solid var(--line); }
.c .kids .c:hover > .kids { border-left-color: rgba(255,255,255,.2); }
.chead { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.chead b { font-weight: 600; }
.c .vote { flex-direction: row; gap: 2px; min-width: 0; }
.cbody { margin: 4px 0 2px 2px; font-size: 15px; }
.cbody p { margin: 0 0 8px; }
.cacts { display: flex; gap: 14px; font-size: 12.5px; }
.cacts .reply { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.cacts .reply:hover { color: var(--amber); }
.reply-form { margin: 8px 0 4px; }
.c.gone > .chead { opacity: .6; }

/* forms, auth, legal */
.bigform { max-width: 720px; display: flex; flex-direction: column; gap: 14px; margin: 10px 0 40px; }
.bigform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.bigform label input, .bigform label select, .bigform label textarea { font-weight: 400; color: var(--text); font-size: 15px; }
.authcard { max-width: 440px; margin: 48px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 28px 20px; box-shadow: var(--shadow); }
.authcard h1 { font-size: 32px; margin: 0 0 6px; }
.authcard .bigform { margin: 18px 0 14px; }
.authcard a { color: var(--amber); }
.legal { max-width: 760px; margin: 0 auto; padding-top: 24px; }
.legal h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 10px; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal p, .legal li { font-size: 15.5px; color: var(--text2); }
.legal a { color: var(--amber); }
.legal code { background: var(--surface2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }
@media (max-width: 760px) {
  .postrow { grid-template-columns: auto 1fr; }
  .pthumb { display: none; }
  .btoolbar { flex-wrap: wrap; }
}

/* master checklist */
.mtoolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 10px 0 22px; position: sticky; top: 10px; z-index: 5; backdrop-filter: blur(10px); }
.mprogress { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.mprogress .progress { flex: 1; height: 8px; border-radius: 4px; background: var(--surface2); overflow: hidden; max-width: 360px; }
.mprogress .progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--green)); transition: width .3s; }
.mprogress .done { font-variant-numeric: tabular-nums; font-size: 14px; }
.mbtns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mstage { margin-bottom: 26px; }
.mstage h2 { font-size: 24px; margin: 0 0 8px; }
.mitem { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; cursor: pointer; transition: border-color .2s, background .2s; }
.mitem:hover { border-color: rgba(255,255,255,.18); }
.mitem input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--green); flex: none; }
.mtext { display: flex; flex-direction: column; gap: 3px; }
.mi { font-weight: 600; font-size: 15.5px; transition: .2s; }
.mitem input:checked ~ .mtext .mi { color: var(--muted); text-decoration: line-through; }
.mitem input:checked { }
.mitem.is-done { background: rgba(61,220,151,.05); border-color: rgba(61,220,151,.25); }
.mwhy { color: var(--muted); font-size: 13.5px; }
.msrc { font-size: 12.5px; margin-top: 2px; }
.msrc summary { color: var(--amber); cursor: pointer; list-style: none; }
.msrc summary::before { content: "↗ "; }
.msrc ul { margin: 4px 0 0; padding-left: 16px; }
.msrc a:hover { color: var(--amber); }
.pending { margin: 6px 0 0; padding-left: 18px; }
.pending li { margin-bottom: 4px; }
/* checklist admin rows */
.mrow { display: grid; grid-template-columns: 150px 1fr 1fr 64px auto auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.mrow.add { border-top: 0; margin-bottom: 8px; grid-template-columns: 150px 1fr 1fr 64px auto; }
.mrow input, .mrow select { width: 100%; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; }
.mrow input:focus, .mrow select:focus { outline: 2px solid var(--amber); outline-offset: -1px; }
.mrow .tog { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.mrow .tog input { width: auto; accent-color: var(--amber); }
.mrow.is-hidden { opacity: .5; }
.mrow .msrcs { grid-column: 1 / -1; margin-top: -4px; }
@media (max-width: 900px) { .mrow, .mrow.add { grid-template-columns: 1fr 1fr; } }

/* google sign-in */
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 14px; padding: 12px 18px; border-radius: 12px; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; font-size: 15px; transition: .15s; }
.gbtn:hover { background: #f1f3f4; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.gbtn svg { width: 22px; height: 22px; }
nav .me img { width: 22px; height: 22px; border-radius: 50%; }

/* moderation: report / block / admin reports */
.cacts .report { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.cacts .report:hover { color: var(--red); }
.pmeta .report { font-size: inherit; }
.report-form { margin: 10px 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; max-width: 640px; }
.report-form .rlabel { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.report-form select, .report-form input { font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; width: 100%; }
nav a.alert { color: var(--red); font-weight: 700; }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 12px; }
.rcard.gone { opacity: .6; }
.rhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13.5px; }
.rnote { margin: 8px 0 0; font-style: italic; color: var(--muted); }
.rquote { margin: 10px 0; padding: 10px 14px; background: var(--surface2); border-left: 3px solid var(--line); border-radius: 8px; white-space: pre-wrap; font-size: 14.5px; }
.racts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 13px; }

/* member submissions */
.subs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.subrow { display: grid; grid-template-columns: 160px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.subrow img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.subrow a:hover { color: var(--amber); }
.subbody .cbtns { margin-top: 6px; }
@media (max-width: 600px) { .subrow { grid-template-columns: 1fr; } }

/* "buying a business? start here" */
.buyers { margin: 40px 0 8px; padding: 26px 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.buyers h2 { font-size: 26px; margin: 0 0 14px; }
.bcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 12px; }
.bcols a { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); transition: .2s; }
.bcols a:hover { border-color: rgba(245,185,66,.5); transform: translateY(-2px); }
.bcols b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.bcols span { color: var(--muted); font-size: 14px; }

/* admin dashboard */
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.admin-stats { margin: 0 0 28px; }
.admin-stats .stat b { font-size: 26px; }
table.admin th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 10px; border-top: 0; }
table.admin th:first-child { padding-left: 0; }
.members .mav { width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.members tr.is-banned td { opacity: .6; }
.badge.fatal { background: rgba(255,92,92,.15); color: var(--red); }
.gap { margin-left: 12px; }

/* theme menu */
.theme-menu { position: relative; margin-left: 4px; }
nav .theme { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; height: 34px; padding: 0 12px 0 10px; font-size: 13px; font-weight: 600; }
nav .theme:hover { color: var(--text); background: var(--surface2); }
nav .theme .sun, nav .theme .moon { display: none; font-size: 15px; }
:root[data-theme="light"] nav .theme .sun { display: inline; }
:root[data-theme="dark"] nav .theme .moon, :root:not([data-theme]) nav .theme .moon { display: inline; }
.tlist { display: none; position: absolute; right: 0; top: 40px; min-width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); z-index: 20; }
.theme-menu.open .tlist { display: block; }
.tlist button { position: relative; display: flex; flex-direction: column; align-items: flex-start; width: 100%; background: none; border: 0; color: var(--text); text-align: left; padding: 8px 28px 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.tlist button small { color: var(--muted); font-size: 11.5px; font-weight: 400; }
.tlist button:hover { background: var(--surface2); }
.tlist button.on { color: var(--amber); }
.tlist button.on::after { content: "✓"; position: absolute; right: 10px; top: 8px; }

/* insights charts */
.chart { margin: 0 0 36px; }
.chart h2 { font-size: 24px; margin: 0 0 6px; }
.chart > p.muted { margin: 0 0 12px; font-size: 14px; }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz .lbl { font: 13px var(--sans); fill: var(--text); }
.viz .lbl.sm { font-size: 11.5px; fill: var(--muted); }
.viz .lbl.muted { fill: var(--muted); }
.viz .val { font: 600 12.5px var(--sans); fill: var(--text); font-variant-numeric: tabular-nums; }
.viz .axis { stroke: var(--line); stroke-width: 1; }
.viz .seg { cursor: default; outline: none; }
.viz .seg:focus, .viz .cell:focus { stroke: var(--text); stroke-width: 1.5; }
.viz .seg.fatal, .viz .seg.one, .viz .seg.made { fill: var(--amber); }
.viz .seg.major { fill: var(--amber); fill-opacity: .62; }
.viz .seg.minor { fill: var(--amber); fill-opacity: .32; }
.viz .seg.surf { fill: var(--muted); fill-opacity: .55; }
:root[data-theme="light"] .viz .seg.major { fill-opacity: .75; }
:root[data-theme="light"] .viz .seg.minor { fill-opacity: .5; }
:root[data-theme="light"] .sw.major { opacity: .75; }
:root[data-theme="light"] .sw.minor { opacity: .5; }
.viz .cell { fill: var(--amber); }
.viz .cellv { font: 600 12px var(--sans); fill: var(--text); pointer-events: none; }
.viz .cellv.strong { fill: var(--accent-text); }
.lg { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; white-space: nowrap; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--amber); }
.sw.major { opacity: .62; } .sw.minor { opacity: .32; } .sw.surf { background: var(--muted); opacity: .55; }
.tbl { margin-top: 8px; } .tbl summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.viztip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; box-shadow: var(--shadow); max-width: 280px; }

/* responsive header + mobile pass */
img { max-width: 100%; height: auto; }
.chartwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  nav { display: none; position: absolute; top: 64px; left: 12px; right: 12px; flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); z-index: 30; }
  .top.open nav { display: flex; }
  nav a { padding: 11px 12px; font-size: 15px; }
  nav .theme-menu { margin: 6px 0 0; }
  nav .theme { width: 100%; justify-content: center; }
  .tlist { position: static; margin-top: 6px; width: 100%; }
  nav .me { margin: 6px 0 0; justify-content: space-between; padding: 6px 8px; }
  nav .me .handle { max-width: none; }
}
@media (max-width: 760px) {
  table.admin { display: block; overflow-x: auto; }
  .chartwrap .viz { min-width: 560px; }
  .mtoolbar { position: static; }
  .hero h1 { font-size: clamp(34px, 9.5vw, 46px); }
  .snapshot { grid-template-columns: 1fr 1fr; }
  .vtitle { font-size: 24px; }
  .takeaway { padding: 20px 18px; }
  .takeaway blockquote { font-size: 20px; }
  .issue { padding: 14px 16px; }
  .check { padding: 16px; }
  .buyers { padding: 18px; }
  .bigform { gap: 10px; }
  .authcard { margin: 24px auto; padding: 22px 18px 14px; }
  .btoolbar .btn { padding: 8px 12px; }
  .admin-links .btn { flex: 1 1 auto; text-align: center; }
}

/* analytics consent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-size: 13.5px; }
.consent p { margin: 0; color: var(--text); }
.consent a { color: var(--amber); }
.consent div { display: flex; gap: 8px; }
