/* Detox Dock website - "arcade at bedtime": the dock's neon night palette, pixel display type used sparingly */
:root {
  color-scheme: dark;
  --night: #0c0b1d;
  --panel: #16142e;
  --panel-2: #1d1a3c;
  --line: #2c2856;
  --text: #eceaff;
  --muted: #a4a0cf;
  --pink: #ff4fc8;
  --cyan: #2fd5ff;
  --gold: #ffd23a;
  --green: #22e07a;
  --pixel: "Press Start 2P", ui-monospace, Menlo, monospace;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 17px/1.6 var(--sans); }
img, canvas { max-width: 100%; }
a { color: var(--cyan); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.logo { font-family: var(--pixel); font-size: 14px; color: var(--gold); text-decoration: none; text-shadow: 2px 2px 0 #1b2fa8; white-space: nowrap; }
.logo span { color: #ff6a1a; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.nav a.link { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--text); }

/* ---- Type ---- */
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 800; }
.eyebrow { font-family: var(--pixel); font-size: 11px; letter-spacing: .06em; color: var(--cyan); text-transform: uppercase; }
.lede { font-size: 20px; color: var(--muted); max-width: 52ch; margin: 0; }
p { margin: 0; }
.pixel-hi { font-family: var(--pixel); color: var(--gold); }

/* ---- Buttons ---- */
.btn { display: inline-block; font-weight: 800; text-decoration: none; padding: 14px 22px; border-radius: 12px; background: var(--pink); color: #1a0716; border: 0; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

/* ---- Sections ---- */
section { padding-block: 72px; }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 64ch; }
.section-head p { color: var(--muted); }

/* ---- Hero ---- */
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .copy { display: grid; gap: 22px; min-width: 0; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.device { background: linear-gradient(#2a2a33, #1b1b22); border-radius: 22px; padding: 16px 16px 0; box-shadow: 0 30px 60px #0009, inset 0 1px 0 #ffffff1a; max-width: 520px; width: 100%; justify-self: center; }
.device canvas { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; border: 6px solid #0a0a0e; background: #04040f; }
.device .base { height: 40px; margin: 14px -16px 0; border-radius: 0 0 22px 22px; background: linear-gradient(#e9e9ee, #c9c9d2); display: flex; align-items: center; justify-content: center; gap: 4%; }
.device .base i { width: 11px; height: 11px; border-radius: 50%; background: #8a8a95; }

/* ---- Our story ---- */
.story { background: var(--panel); border-block: 1px solid var(--line); }
.story .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.story-quote { display: grid; gap: 18px; }
.story-quote .big { font-family: var(--pixel); font-size: clamp(22px, 3.2vw, 34px); line-height: 1.5; color: var(--gold); text-shadow: 3px 3px 0 #1b2fa8; }
.story-copy { display: grid; gap: 16px; min-width: 0; }
.story-copy p { color: var(--muted); font-size: 18px; max-width: 58ch; }
@media (max-width: 860px) { .story .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.step .num { font-family: var(--pixel); font-size: 12px; color: var(--gold); }
.step p { color: var(--muted); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---- Leaderboard cards ---- */
.boards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .boards { grid-template-columns: 1fr; } }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.board .tag { font-family: var(--pixel); font-size: 10px; color: var(--pink); }
.board p { color: var(--muted); font-size: 15px; }
.rank { display: grid; grid-template-columns: 22px 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.rank.you { background: var(--panel-2); box-shadow: inset 0 0 0 2px var(--pink); }
.rank .n { font-family: var(--pixel); font-size: 11px; color: var(--gold); }
.rank .who { min-width: 0; font-weight: 800; }
.rank .who small { display: block; font-weight: 600; color: var(--muted); font-size: 12px; }
.rank .v { font-weight: 800; color: var(--gold); text-align: right; }
.rank .v small { display: block; font-weight: 600; color: var(--muted); font-size: 11px; }
.rank canvas { width: 34px; height: 34px; image-rendering: pixelated; }
.sample { font-size: 12px; color: var(--muted); }

/* ---- Full leaderboard table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 560px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
td .fam { display: flex; align-items: center; gap: 12px; font-weight: 800; }
td canvas { width: 30px; height: 30px; image-rendering: pixelated; }
.rank-cell { font-family: var(--pixel); font-size: 12px; color: var(--gold); }

/* ---- Privacy / setup band ---- */
.band { background: var(--panel); border-block: 1px solid var(--line); }
.band .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .band .wrap { grid-template-columns: 1fr; } }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { padding-left: 30px; position: relative; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; background: var(--green); box-shadow: 4px 4px 0 #0f6b3a; }
.checks b { color: var(--text); }

/* ---- Blog ---- */
.posts { display: grid; gap: 16px; }
.post-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-decoration: none; color: inherit; }
.post-card:hover { border-color: var(--pink); }
.post-card time { font-family: var(--pixel); font-size: 10px; color: var(--cyan); }
.post-card h3 { margin-block: 6px; }
.post-card p { color: var(--muted); }
.post-card canvas { width: 64px; height: 64px; image-rendering: pixelated; background: var(--night); border-radius: 10px; padding: 6px; }

article.post { max-width: 68ch; margin: 0 auto; display: grid; gap: 22px; }
article.post header { display: grid; gap: 14px; }
article.post .byline { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 15px; }
article.post .byline canvas { width: 48px; height: 48px; image-rendering: pixelated; background: var(--panel); border-radius: 10px; padding: 4px; }
article.post h2 { font-size: 26px; margin-top: 12px; }
article.post p, article.post li { color: #d6d3f5; }
article.post ul { padding-left: 22px; display: grid; gap: 8px; margin: 0; }
article.post blockquote { margin: 0; border-left: 4px solid var(--pink); padding: 6px 0 6px 18px; color: var(--text); font-weight: 700; }
.specs { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 15px; }
.specs dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 700; }

/* ---- Footer ---- */
footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- Blog photos and post navigation ---- */
figure { margin: 0; display: grid; gap: 8px; }
figure img { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; background: var(--panel); }
figcaption { font-size: 14px; color: var(--muted); }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.figs img { aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 560px) { .figs { grid-template-columns: 1fr; } }
.postnav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 12px; }
.postnav a { text-decoration: none; font-weight: 800; max-width: 46%; }
.postnav a small { display: block; font-family: var(--pixel); font-size: 9px; color: var(--muted); margin-bottom: 6px; }
.postnav .next { text-align: right; margin-left: auto; }
.post-card .thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
@media (max-width: 560px) { .post-card { grid-template-columns: 1fr; } .post-card .thumb { width: 100%; height: 160px; } }
