/* 4th & Data theme, 2026-09-09 redesign: light-first, one accent, quiet chrome. Dark mode follows the system. */
:root {
  --bg: #ffffff; --bg2: #f5f5f7; --panel: #ffffff; --panel2: #f5f5f7; --line: rgba(0, 0, 0, .09); --line2: rgba(0, 0, 0, .05);
  --text: #1d1d1f; --muted: #6e6e73; --faint: #a1a1a6;
  --accent: #0071e3; --accent2: #0077ed; --accent-t: #0b5cad; --accent-bg: rgba(0, 113, 227, .10);
  --good: #34c759; --good-t: #1a7f37; --good-bg: rgba(52, 199, 89, .14);
  --bad: #ff3b30; --bad-t: #b42318; --bad-bg: rgba(255, 59, 48, .12);
  --mid: #ff9f0a; --warn-t: #9a5b00; --warn-bg: rgba(255, 159, 10, .16);
  --gold: var(--accent); --gold2: var(--accent2);        /* legacy names still used by pages */
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 18px; --radius-s: 12px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --bg2: #161617; --panel: #1c1c1e; --panel2: #2c2c2e; --line: rgba(255, 255, 255, .12); --line2: rgba(255, 255, 255, .07);
    --text: #f5f5f7; --muted: #a1a1a6; --faint: #6e6e73;
    --accent: #2997ff; --accent2: #4aa8ff; --accent-t: #6cb6ff; --accent-bg: rgba(41, 151, 255, .18);
    --good-t: #4cd964; --good-bg: rgba(52, 199, 89, .20);
    --bad-t: #ff6961; --bad-bg: rgba(255, 69, 58, .20);
    --warn-t: #ffb340; --warn-bg: rgba(255, 159, 10, .22);
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { color-scheme: light dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.5 Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { font-weight: 600; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* nav */
header.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .72); border-bottom: 1px solid var(--line2);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
@media (prefers-color-scheme: dark) { header.top { background: rgba(0, 0, 0, .72); } }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { font-weight: 600; letter-spacing: -.01em; font-size: 17px; color: var(--text); white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 600; }
nav { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a { color: var(--muted); margin: 0; padding: 6px 10px; border-radius: 980px; font-size: 13px; font-weight: 500; white-space: nowrap; }
nav a:hover { color: var(--text); text-decoration: none; background: var(--line2); }
nav a.on { color: var(--text); background: var(--bg2); font-weight: 600; }
@media (prefers-color-scheme: dark) { nav a.on { background: var(--panel2); } }

/* hero + sections */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; margin: 0 0 16px; letter-spacing: -.03em; font-weight: 600; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 20px; line-height: 1.45; color: var(--muted); max-width: 640px; margin: 0 0 26px; }
.kicker { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--accent); font-weight: 600; }
.cta { display: inline-block; background: var(--accent); color: #fff; font-weight: 500; font-size: 16px; padding: 11px 20px; border-radius: 980px; }
.cta:hover { background: var(--accent2); text-decoration: none; }
.cta.ghost { background: transparent; color: var(--accent); border: 0; margin-left: 6px; padding-left: 8px; }
.cta.ghost::after { content: " \203A"; }
.cta.ghost:hover { text-decoration: underline; background: transparent; }
section { padding: 44px 0; border-top: 1px solid var(--line2); }
h2 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.02em; font-weight: 600; line-height: 1.15; }
h3 { font-weight: 600; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 20px; font-size: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* cards */
.card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); overflow: hidden; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
a.card { color: var(--text); display: block; transition: transform .18s ease, box-shadow .18s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 14px 34px rgba(0, 0, 0, .10); }
.stat { font-size: 40px; font-weight: 600; letter-spacing: -.03em; color: var(--text); line-height: 1.1; margin-bottom: 6px; }
.callout { border-left: 3px solid var(--accent); background: var(--bg2); padding: 16px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 20px 0; }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line2); border-radius: var(--radius-s); background: var(--panel); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th:first-child, td:first-child, th.l, td.l { text-align: left; }
th:first-child, td:first-child { position: sticky; left: 0; background: var(--panel); z-index: 2; }
th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; user-select: none; }
th:first-child { z-index: 3; }
th.sorted { color: var(--accent); }
th .qm { display: inline-block; margin-left: 5px; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: var(--panel2); color: var(--muted); font-size: 10px; font-weight: 700; }
td.wrap { white-space: normal; min-width: 200px; max-width: 320px; line-height: 1.6; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: var(--bg2); }
@media (prefers-color-scheme: dark) { tr:hover td { background: var(--panel2); } }
td.heat { font-weight: 600; }
.card table { display: block; overflow-x: auto; max-width: 100%; }
.card table th, .card table td { white-space: nowrap; }
.fd-tip { display: none; position: absolute; z-index: 50; width: 260px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow); }

/* controls */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tab { background: var(--bg2); border: 1px solid transparent; color: var(--muted); padding: 7px 14px; border-radius: 980px; font-weight: 500; font-size: 13px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--text); color: var(--bg); }
.toggle { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin-left: 8px; }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 980px; padding: 3px 10px; font-size: 12px; color: var(--muted); margin-right: 6px; background: var(--panel); }
button, input, select, textarea { font: inherit; color: inherit; }
button.go { background: var(--accent); color: #fff; border: 0; border-radius: 980px; padding: 10px 18px; font-weight: 500; font-size: 15px; cursor: pointer; }
button.go:hover { background: var(--accent2); }
button.mini { background: var(--bg2); color: var(--text); border: 1px solid var(--line2); border-radius: 980px; padding: 3px 10px; font-size: 12px; font-weight: 500; cursor: pointer; }
button.mini:hover { background: var(--line2); }
input[type=text], input[type=number], input[type=email], select, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-bg); border-color: var(--accent); }
form.capture { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
form.capture input { flex: 1 1 240px; padding: 12px 14px; border-radius: 980px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 15px; }
form.capture button { padding: 12px 20px; border-radius: 980px; border: 0; background: var(--accent); color: #fff; font-weight: 500; cursor: pointer; }

/* tiers, tags */
.tier { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; letter-spacing: .01em; }
.tier.must { background: var(--good-bg); color: var(--good-t); } .tier.start { background: var(--good-bg); color: var(--good-t); opacity: .85; }
.tier.flex { background: var(--warn-bg); color: var(--warn-t); } .tier.sit { background: var(--bad-bg); color: var(--bad-t); }
.tier.out { background: var(--panel2); color: var(--muted); } .tier.bench { background: var(--bg2); color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; margin: 1px 4px 1px 0; background: var(--bg2); color: var(--text); letter-spacing: .01em; }
.tag.smash { background: var(--good-bg); color: var(--good-t); }
.tag.fade { background: var(--bad-bg); color: var(--bad-t); }
.tag.gold { background: var(--accent-bg); color: var(--accent-t); }
.tag.lean-smash { background: transparent; color: var(--good-t); border: 1px dashed var(--good-t); font-weight: 500; }
.tag.lean-fade { background: transparent; color: var(--bad-t); border: 1px dashed var(--bad-t); font-weight: 500; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* long-form */
.study h2 { font-size: 32px; }
.study p, .study li { font-size: 18px; line-height: 1.6; max-width: 720px; }
footer { border-top: 1px solid var(--line2); padding: 32px 0 48px; color: var(--muted); font-size: 13px; }
footer a { color: var(--muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  header.top .wrap { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 6px; }
  nav { width: 100%; justify-content: flex-start; }
  .hero { padding: 40px 0 24px; } .hero p { font-size: 17px; }
  h2 { font-size: 24px; } .card { padding: 18px; } section { padding: 32px 0; }
}
