/* BeltPrints: own design, no game graphics. Dark by default, light follows the OS. */
:root {
  --bg: #0f1216; --bg-grid: rgba(255, 255, 255, .025);
  --surface: #161a20; --surface-2: #1c2129; --surface-3: #232a33;
  --line: #2a313b; --line-strong: #39424e;
  --text: #e8ecf1; --muted: #98a3af; --faint: #6f7a86;
  --accent: #f5a524; --accent-strong: #ffb53d; --accent-ink: #1b1200; --accent-soft: rgba(245, 165, 36, .12);
  --link: #8cc8ff; --ok: #3fbf7f; --ok-soft: rgba(63, 191, 127, .12);
  --vulcanus: #ff7a45; --fulgora: #b48cff; --gleba: #7ed957; --aquilo: #6fd3ff; --space: #c9c3e8; --base: #f5a524;
  --radius: 14px; --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px -18px rgba(0, 0, 0, .7);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --preview-bg: #12161b;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f7; --bg-grid: rgba(15, 23, 42, .035);
    --surface: #ffffff; --surface-2: #f7f8fa; --surface-3: #eef0f3;
    --line: #e1e5ea; --line-strong: #cfd5dc;
    --text: #151a20; --muted: #5a6572; --faint: #8a94a0;
    --accent: #e08c00; --accent-strong: #c97d00; --accent-ink: #ffffff; --accent-soft: rgba(224, 140, 0, .1);
    --link: #0b62b5; --ok: #16894f; --ok-soft: rgba(22, 137, 79, .1);
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -16px rgba(16, 24, 40, .25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; color: var(--text); font: 16px/1.6 var(--font);
  background-color: var(--bg);
  background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 2px; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }

/* ── Header ─────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 12px 24px; min-height: 62px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--text); text-decoration: none; }
.brand b { color: var(--accent); font-weight: 800; }
.logo { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600; padding: 7px 11px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
.top-search { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: .92rem; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; background: var(--surface); }
.top-search:hover { color: var(--text); border-color: var(--line-strong); }
@media (max-width: 720px) {
  .top-in { gap: 6px 12px; }
  .nav { order: 3; width: 100%; margin: 0 -11px; overflow-x: auto; flex-wrap: nowrap; }
  .nav a { white-space: nowrap; }
  .top-search { margin-left: auto; }
  .top-search span { display: none; }
}

main.wrap { padding-top: 24px; padding-bottom: 64px; }
h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: 1.25rem; letter-spacing: -.01em; margin: 32px 0 12px; font-weight: 750; }
h3 { font-size: 1rem; margin: 20px 0 8px; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 68ch; margin: 0 0 8px; }
.hint { color: var(--muted); font-size: .9rem; }
code, kbd { font-family: var(--mono); background: var(--surface-3); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: .85em; }

/* ── Buttons, chips, badges ─────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 750; cursor: pointer; text-decoration: none; transition: transform .08s ease, background .15s ease; }
.btn:hover { background: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn-big { width: 100%; padding: 15px 18px; font-size: 1.05rem; border-radius: 12px; box-shadow: 0 8px 22px -12px var(--accent); }
.btn.copied { background: var(--ok); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 700; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; background: color-mix(in srgb, currentColor 13%, transparent); white-space: nowrap; line-height: 1.4; }
.b-sa { color: var(--fulgora); } .b-base { color: var(--base); } .b-quality { color: #ffd166; } .b-book { color: var(--aquilo); } .b-old { color: var(--muted); }
.p-vulcanus { --planet: var(--vulcanus); } .p-fulgora { --planet: var(--fulgora); } .p-gleba { --planet: var(--gleba); } .p-aquilo { --planet: var(--aquilo); } .p-space { --planet: var(--space); }
.badge.p-vulcanus, .badge.p-fulgora, .badge.p-gleba, .badge.p-aquilo, .badge.p-space { color: var(--planet); }

/* ── Breadcrumbs ────────────────────────────────────────── */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0; margin: 0 0 16px; font-size: .85rem; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }

/* ── Cards ──────────────────────────────────────────────── */
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card[hidden] { display: none; }
.card a { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.card a:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.card a:hover .card-title { color: var(--accent); }
.card-img { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--preview-bg); border-bottom: 1px solid var(--line); overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
.card-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.card-badges .badge { background: rgba(10, 12, 15, .82); backdrop-filter: blur(4px); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.card-title { font-weight: 750; line-height: 1.3; transition: color .15s ease; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .82rem; margin-top: auto; font-variant-numeric: tabular-nums; }
.card-by { color: var(--faint); }

/* ── Home ───────────────────────────────────────────────── */
.hero { position: relative; padding: 36px 0 20px; }
.hero::before { content: ""; position: absolute; inset: -24px -16px auto; height: 360px; z-index: -1; background: radial-gradient(600px 240px at 18% 30%, var(--accent-soft), transparent 70%), radial-gradient(500px 220px at 80% 10%, rgba(180, 140, 255, .08), transparent 70%); pointer-events: none; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 750; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2rem, 5.6vw, 3.4rem); max-width: 18ch; }
.hl { color: var(--accent); }
.hero .lead { font-size: 1.12rem; }
.hero-search { display: flex; gap: 10px; margin: 22px 0 18px; max-width: 640px; }
.hero-search .searchbox { flex: 1; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .92rem; }
.hero-stats b { color: var(--text); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.hero-stats .ic { color: var(--ok); }
.block { margin-top: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; }
.block-head a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.block-head a:hover { color: var(--accent); }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tiles a { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 650; transition: border-color .15s ease, background .15s ease; }
.tiles a:hover { border-color: var(--accent); background: var(--surface-2); }
.tiles .ic { color: var(--accent); width: 22px; height: 22px; }
.tile-name { flex: 1; }
.tile-n { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; background: var(--surface-3); border-radius: 999px; padding: 1px 9px; }
.planets { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.planets a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-weight: 700; background: linear-gradient(135deg, color-mix(in srgb, var(--planet) 16%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, var(--planet) 35%, var(--line)); }
.planets a:hover { border-color: var(--planet); }
.planets small { margin-left: auto; color: var(--muted); font-weight: 600; }
.orb { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff8, var(--planet) 45%, color-mix(in srgb, var(--planet) 40%, #000)); box-shadow: 0 0 14px -2px var(--planet); flex: none; }

/* ── Page headers (tags, browse, guides) ────────────────── */
.page-head { display: flex; gap: 18px; align-items: flex-start; padding: 22px; margin-bottom: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.page-head h1 { margin-bottom: 8px; }
.page-head .lead { margin: 0; }
.head-icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 13px; background: var(--accent-soft); color: var(--accent); }
.head-icon .ic { width: 28px; height: 28px; }
.page-head[class*="p-"] { border-color: color-mix(in srgb, var(--planet) 40%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--planet) 12%, var(--surface)), var(--surface) 60%); }
.page-head[class*="p-"] .head-icon { background: color-mix(in srgb, var(--planet) 18%, transparent); color: var(--planet); }
.count { color: var(--muted); font-size: .88rem; font-weight: 650; margin: 10px 0 0; }
.more { margin-top: 28px; }
@media (max-width: 560px) { .page-head { flex-direction: column; padding: 18px; } .head-icon { width: 44px; height: 44px; } }

/* ── Search + filters ───────────────────────────────────── */
.searchbox { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; color: var(--muted); transition: border-color .15s ease, box-shadow .15s ease; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; padding: 12px 0; outline: none; }
.filters { position: sticky; top: 62px; z-index: 5; padding: 12px 0; margin: -4px 0 8px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.filters .searchbox { max-width: 560px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.filter-row .searchbox { flex: 1 1 320px; }
.beltpick { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.beltpick select { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; font: inherit; }
.chips-hint { margin: 8px 0 0; font-size: .85rem; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); }
.chip .ic { color: var(--accent); }
.chip small { color: var(--muted); font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip[aria-pressed="true"] .ic, .chip[aria-pressed="true"] small { color: inherit; }
.result-count { color: var(--muted); font-size: .9rem; min-height: 1.4em; margin: 4px 0 12px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
@media (max-width: 720px) { .filters { top: 98px; } }

/* ── Blueprint page ─────────────────────────────────────── */
.bp-head { margin-bottom: 20px; }
.bp-head h1 { margin-top: 10px; }
.answer { color: var(--text); font-size: 1.04rem; max-width: 72ch; margin: 0; padding: 12px 16px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; }
.bp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.bp-side { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .bp-grid { grid-template-columns: 1fr; } .bp-side { position: static; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 12px; font-size: 1.05rem; }
.preview { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.preview-frame { background: var(--preview-bg); padding: 14px; display: grid; place-items: center; min-height: 260px; }
.preview-frame img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; display: block; }
.mix { display: flex; height: 6px; gap: 2px; padding: 0 2px; background: var(--preview-bg); }
.mix span { border-radius: 2px; min-width: 3px; }
.preview figcaption { padding: 12px 16px 14px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 0 0 6px; font-size: .85rem; color: var(--muted); }
.legend small { color: var(--faint); font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.preview figcaption > small { color: var(--faint); font-size: .8rem; }
.steps { margin: 14px 0 10px; padding-left: 20px; color: var(--muted); font-size: .9rem; }
.steps li { margin: 3px 0; }
.raw summary { cursor: pointer; color: var(--muted); font-size: .88rem; padding: 4px 0; }
.raw textarea { width: 100%; margin-top: 8px; font: 11.5px/1.45 var(--mono); background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: 10px; resize: vertical; word-break: break-all; }
.copy .hint { margin: 8px 0 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.stat dt { color: var(--faint); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat dd { margin: 2px 0 0; font-weight: 750; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.checked { display: flex; gap: 8px; align-items: center; margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: .88rem; }
.credit p { margin: 0 0 4px; color: var(--muted); font-size: .9rem; }
.credit .credit-by { color: var(--text); }
.credit-change { font-size: .82rem !important; color: var(--faint) !important; }
.bp-body { max-width: 820px; }
.desc p { max-width: 72ch; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(130px, 220px) 1fr 56px; gap: 12px; align-items: center; font-size: .92rem; }
.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); border-radius: 999px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bars li { grid-template-columns: 1fr 48px; } .bar { grid-column: 1 / -1; grid-row: 2; } }
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pills li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .86rem; }
.pills small { color: var(--muted); }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 650; }
.facts table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.facts th { width: 30%; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; text-decoration: none; font-size: .88rem; font-weight: 600; }
.tag .ic { color: var(--accent); }
.tag:hover { border-color: var(--accent); }
.draft { color: var(--muted); font-size: .9rem; border: 1px dashed var(--accent); padding: 8px 12px; border-radius: 8px; }
.related { margin-top: 48px; }

/* ── Guides and text pages ──────────────────────────────── */
.guide-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.guide-cards a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s ease, transform .15s ease; }
.guide-cards a:hover { border-color: var(--accent); transform: translateY(-2px); }
.g-title { font-weight: 750; line-height: 1.3; }
.g-desc { color: var(--muted); font-size: .9rem; flex: 1; }
.g-more { color: var(--accent); font-weight: 700; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; }
.prose { max-width: 760px; }
.prose > h1 { margin-bottom: 18px; }
.prose p, .prose li { max-width: 72ch; }
.prose table { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); border-collapse: separate; border-spacing: 0; overflow: hidden; margin: 12px 0 20px; }
.prose table tr:first-child th { background: var(--surface-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td { font-variant-numeric: tabular-nums; }
.prose ol li, .prose ul li { margin: 4px 0; }
.prose pre { overflow-x: auto; }
@media (max-width: 560px) { .prose table { display: block; overflow-x: auto; } }

/* ── Footer ─────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; padding: 36px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.foot h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 4px 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot-tag { margin: 10px 0 0; max-width: 32ch; }
.disclaimer { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--faint); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.linkish:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: 72ch; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ic { color: var(--ok); margin-top: 4px; }

/* Category tiles: one line, equal height. */
.tiles li { display: flex; }
.tiles a { flex: 1; min-height: 56px; }
.tile-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* Inspector */
.hero-tool { margin: -4px 0 16px; color: var(--muted); }
.hero-tool a { color: var(--accent); font-weight: 650; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.inspect-box { margin-bottom: 24px; }
.ins-label { display: block; font-weight: 700; margin-bottom: 8px; }
.inspect-box textarea { width: 100%; font: 12px/1.45 var(--mono); background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; resize: vertical; word-break: break-all; }
.inspect-box textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ins-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-top: 12px; }
.ins-actions .hint { margin: 0; }
.ins-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: rgba(208, 87, 78, .12); color: #ff8a80; font-weight: 600; }
.inspect-result { margin-bottom: 32px; scroll-margin-top: 80px; }
.ins-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.ins-head { margin-bottom: 16px; }
.ins-pick { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.ins-pick select { flex: 1; min-width: 0; background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.ck-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.ck-ok .ck-dot { background: var(--ok); }
.ck-warn .ck-dot { background: var(--accent); }
.ck-bad .ck-dot { background: #e5534b; }

/* Medium widths: keep the header on one line now that the nav has five links. */
@media (max-width: 1000px) {
  .top-search span { display: none; }
  .top-search { padding: 7px 9px; }
  .nav a { padding: 7px 8px; }
}

/* ── Fan-site look (Nov 2026): own typeface, flat bevelled panels, less template polish ── */
@font-face { font-family: "Titillium Web"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/titillium-web-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/titillium-web-latin-600.woff2") format("woff2"); }
@font-face { font-family: "Titillium Web"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/titillium-web-latin-700.woff2") format("woff2"); }
:root {
  --font: "Titillium Web", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --radius: 6px; --radius-sm: 4px;
  --bevel: inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 -2px 0 rgba(0, 0, 0, .35);
  --shadow: var(--bevel);
}
@media (prefers-color-scheme: light) { :root { --bevel: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -2px 0 rgba(0, 0, 0, .06); } }
body { font-size: 16.5px; line-height: 1.55; }
h1, h2, h3, .brand, .card-title, .g-title { letter-spacing: 0; font-weight: 700; }
h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); line-height: 1.1; }
.hero::before { display: none; }
.hero { padding: 28px 0 8px; }
.hero h1 { max-width: 22ch; }
.hero-stats { color: var(--muted); font-size: .98rem; margin: 6px 0 0; display: block; }
.hero-tool { margin: 0 0 4px; }

/* panels: flat with a light top edge and darker bottom edge, like an in-game frame */
.panel, .card a, .page-head, .preview, .tiles a, .guide-cards a, .facts table, .prose table, .planets a, .searchbox, .stat {
  border-radius: var(--radius); box-shadow: var(--bevel);
}
.page-head { background: var(--surface); }
.page-head[class*="p-"] { background: var(--surface); border-left: 4px solid var(--planet); }
.card a:hover, .guide-cards a:hover { transform: none; }
.card a:hover { border-color: var(--accent); }
.card-img { border-radius: 0; }
.planets a { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--planet); }
.planets a:hover { border-color: var(--planet); }
.orb { box-shadow: none; }
.head-icon { border-radius: var(--radius-sm); }

/* buttons: chunky, bevelled, square-ish */
.btn { border-radius: var(--radius-sm); font-weight: 700; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .22); }
.btn:active { box-shadow: inset 0 2px 0 rgba(0, 0, 0, .25); }
.btn-big { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .22); }
.btn-ghost { box-shadow: var(--bevel); }
.badge { border-radius: 3px; font-weight: 600; letter-spacing: 0; }
.chip, .tag, .tile-n, .pills li, .top-search { border-radius: var(--radius-sm); }
.answer { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* personal touches */
.note { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--bevel); padding: 6px 22px 10px; margin: 8px 0 24px; max-width: 72ch; }
.note p { margin: 12px 0; }
.sig { font-weight: 700; color: var(--accent); }
.report { color: var(--muted); font-size: .9rem; margin-top: 18px; }
.changelog { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; max-width: 760px; }
.changelog li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--bevel); }
.changelog time { color: var(--accent); font-weight: 700; }
@media (max-width: 560px) { .changelog li { grid-template-columns: 1fr; gap: 2px; } }

/* ════════════════════════════════════════════════════════════════════
   In-game GUI look (own CSS, inspired by Factorio's window style; no
   game graphics). Windows = grey frame + bold title strip; content
   sits in dark inset areas; grey buttons, green "confirm" button.
   Dark only: the game has no light mode.
   ════════════════════════════════════════════════════════════════════ */
:root, :root * { color-scheme: dark; }
:root {
  --bg: #1c1b1c; --bg-grid: transparent;
  --win: #313031; --win-edge: #4b4a4b; --win-dark: #141314;
  --inset: #242324; --inset-hi: #3a393a;
  --surface: #313031; --surface-2: #2a292a; --surface-3: #242324;
  --line: #141314; --line-strong: #0e0d0e;
  --text: #ffffff; --muted: #c9c4bc; --faint: #9a958e;
  --title: #ffe6c0;
  --accent: #ff9f1c; --accent-strong: #ffb547; --accent-ink: #000; --accent-soft: rgba(255, 159, 28, .14);
  --link: #ffcf74; --ok: #5eb663; --ok-soft: rgba(94, 182, 99, .15);
  --radius: 0; --radius-sm: 0;
  --bevel: inset 1px 1px 0 var(--win-edge), inset -1px -1px 0 #1f1e1f;
  --sunk: inset 2px 2px 3px #0c0b0c, inset -1px -1px 0 var(--inset-hi);
  --preview-bg: #1a191a;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #1c1b1c; --surface: #313031; --surface-2: #2a292a; --surface-3: #242324; --line: #141314; --line-strong: #0e0d0e; --text: #fff; --muted: #c9c4bc; --faint: #9a958e; --accent: #ff9f1c; --accent-strong: #ffb547; --accent-ink: #000; --link: #ffcf74; --ok: #5eb663; --bevel: inset 1px 1px 0 #4b4a4b, inset -1px -1px 0 #1f1e1f; }
}
body { background: var(--bg); background-image: none; }
a { color: var(--link); }
h1, h2, h3 { color: var(--title); }

/* Header: a plain dark bar */
.top { background: #252425; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 2px solid #0e0d0e; box-shadow: inset 0 -1px 0 #3a393a; }
.nav a { color: var(--muted); border-radius: 0; }
.nav a:hover { background: #3a393a; color: #fff; }
.nav a[aria-current="page"] { background: var(--inset); color: var(--title); box-shadow: var(--sunk); }
.top-search { background: var(--inset); border: 0; box-shadow: var(--sunk); color: var(--muted); }

/* Windows */
.panel, .page-head, .preview, .card a, .tiles a, .guide-cards a, .planets a, .note, .changelog li, .inspect-box, .facts table, .prose table {
  background: var(--win); border: 2px solid var(--win-dark); box-shadow: var(--bevel); border-radius: 0;
}
.page-head[class*="p-"], .planets a { border-left: 2px solid var(--win-dark); }
.page-head[class*="p-"] .head-icon, .head-icon { background: var(--inset); color: var(--title); box-shadow: var(--sunk); }
/* title strip with the striped filler after the text */
.panel > h2, .ins-head h2, .block-head h2, .related > h2, .parts > h2, .facts > h2, .desc > h2, .before > h2 {
  display: flex; align-items: center; gap: 12px; color: var(--title); font-size: 1.05rem; font-weight: 700; letter-spacing: .01em;
}
.panel > h2::after, .block-head h2::after, .related > h2::after, .parts > h2::after, .facts > h2::after, .desc > h2::after, .before > h2::after {
  content: ""; flex: 1; height: 12px; min-width: 24px;
  background: repeating-linear-gradient(90deg, #4a494a 0 2px, #222122 2px 4px);
  box-shadow: inset 0 1px 0 #1a191a;
}
.block-head h2 { flex: 1; }
.block-head { align-items: center; }

/* Inset (sunken) areas */
.preview-frame, .card-img, .stat, .searchbox, .raw textarea, .inspect-box textarea, .bars .bar, .answer, .ins-pick select, .chips .chip, .tag, .pills li {
  background: var(--inset); box-shadow: var(--sunk); border: 0; border-radius: 0;
}
.preview { padding: 8px; }
.preview .mix { margin-top: 6px; }
.preview figcaption { padding: 10px 4px 2px; }
.card a { padding: 6px; }
.card-img { border-bottom: 0; }
.card-body { padding: 10px 6px 4px; }
.card-title { color: #fff; }
.card a:hover { border-color: var(--accent); }
.card a:hover .card-title { color: var(--title); }
.card-badges .badge { background: #000c; }

/* Summary sentence: plain text under the title, not a highlighted box */
.answer { background: none; box-shadow: none; border: 0; padding: 0; color: var(--muted); font-size: 1rem; }

/* Buttons: grey game buttons, orange on hover, green for the main action */
.btn, .btn-ghost {
  background: linear-gradient(#a7a6a7, #8a898a); color: #000; border: 1px solid #0e0d0e; border-radius: 0;
  box-shadow: inset 1px 1px 0 #d8d7d8, inset -1px -2px 0 #5c5b5c; font-weight: 700; text-shadow: none;
}
.btn:hover, .btn-ghost:hover { background: linear-gradient(#ffc36b, #ff9f1c); color: #000; }
.btn:active { box-shadow: inset 2px 2px 0 #5c5b5c; }
.btn-big, .hero-search .btn, .ins-actions .btn {
  background: linear-gradient(#7fd184, #4f9f54); box-shadow: inset 1px 1px 0 #b5f0b8, inset -1px -2px 0 #2f6b33;
}
.btn-big:hover, .hero-search .btn:hover, .ins-actions .btn:hover { background: linear-gradient(#9de3a1, #5eb663); }
.btn.copied { background: linear-gradient(#ffc36b, #ff9f1c); }
.btn .ic { color: inherit; }

/* Fewer decorations: no icons on tiles/chips/tags, counts as plain text */
.tiles .ic, .chip .ic, .tag .ic, .hero-stats .ic { display: none; }
.tiles a { min-height: 48px; padding: 10px 14px; font-weight: 600; }
.tiles a:hover { border-color: var(--accent); background: #3a393a; }
.tile-n { background: none; box-shadow: none; padding: 0; color: var(--faint); }
.chip[aria-pressed="true"] { background: linear-gradient(#ffc36b, #ff9f1c); color: #000; box-shadow: none; }
.badge { border: 0; background: var(--inset); box-shadow: var(--sunk); color: var(--muted); }
.badge.b-sa, .badge.b-quality { color: var(--title); }
.badge.p-vulcanus, .badge.p-fulgora, .badge.p-gleba, .badge.p-aquilo, .badge.p-space { color: var(--planet); }
.orb { width: 14px; height: 14px; box-shadow: none; }

/* Side stats: label/value rows like an in-game info panel */
.stats { display: block; padding: 6px 10px; }
.stats .stat { display: flex; justify-content: space-between; background: none; box-shadow: none; padding: 5px 0; border-bottom: 1px solid #262526; }
.stats .stat:last-child { border-bottom: 0; }
.stat dt { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--muted); font-weight: 600; }
.stat dd { margin: 0; font-size: .95rem; color: #fff; }
.checked { background: var(--inset); box-shadow: var(--sunk); border-radius: 0; color: var(--ok); }

/* "Before you place it": plain bullets, no checkmarks */
.checklist { list-style: disc; padding-left: 20px; gap: 4px; }
.checklist li { display: list-item; }
.checklist .ic { display: none; }
.bars .bar span { background: linear-gradient(#ffc36b, #ff9f1c); border-radius: 0; }
.facts th { color: var(--muted); }
th, td { border-bottom-color: #232223; }
.crumbs ol { color: var(--faint); }
.crumbs a { color: var(--muted); }
.hl { color: var(--accent); }
.hero h1 { color: var(--title); }
.hero-stats { color: var(--muted); }
.foot { background: #252425; border-top: 2px solid #0e0d0e; box-shadow: inset 0 1px 0 #3a393a; }
.foot h2 { color: var(--title); }
.disclaimer { border-top-color: #1a191a; }
.note { border-left: 2px solid var(--win-dark); }
.sig { color: var(--title); }
.ins-error { border-radius: 0; }
.ck-ok .ck-dot, .ck-warn .ck-dot, .ck-bad .ck-dot { border-radius: 0; }
code, kbd { background: var(--inset); border: 0; box-shadow: var(--sunk); border-radius: 0; color: var(--title); }

/* Blueprint page sections as windows too */
.bp-body { max-width: none; display: grid; gap: 14px; margin-top: 14px; }
.bp-body > section { background: var(--win); border: 2px solid var(--win-dark); box-shadow: var(--bevel); padding: 12px 16px 16px; }
.bp-body > section > h2 { margin: 0 0 10px; }
.bp-body > .tags, .bp-body > .report { margin: 0; }
.related { margin-top: 28px; }
.related > h2 { margin: 0 0 12px; }
.prose > h2 { color: var(--title); }

/* Interactive preview: zoom, pan, hover details */
.preview-frame.viewer { display: block; padding: 0; min-height: 0; }
.vw-stage { position: relative; width: 100%; overflow: hidden; cursor: grab; touch-action: none; user-select: none; background: #12161b; outline: none; }
.vw-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent, #e39827); }
.vw-stage.vw-drag { cursor: grabbing; }
.vw-stage svg { width: 100%; height: 100%; display: block; }
.vw-stage svg [data-i]:hover { stroke: #fff; stroke-width: .12; fill-opacity: 1; }
.vw-stage svg .lbl { display: none; }
.vw-stage svg.vw-labels .lbl { display: inline; }
.vw-tip { position: absolute; z-index: 2; max-width: 260px; padding: 7px 10px; font-size: .85rem; line-height: 1.4; color: #fff; background: rgba(20, 20, 20, .94); border: 1px solid #000; box-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none; }
.vw-tip b { color: #ffe6c0; }
.vw-cat { color: #bbb; font-size: .78rem; }
.vw-cat i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: 0; }
.vw-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface); }
.vw-btn { min-width: 36px; padding: 4px 10px; font-weight: 700; }
.vw-tools .hint { margin: 0 0 0 4px; font-size: .8rem; }


/* Accounts, uploads and admin */
.top-acct { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .92rem; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); margin-left: 8px; }
.top-acct:hover { color: var(--text); border-color: var(--line-strong); }
@media (max-width: 760px) { .top-acct span { display: none; } }
.app-page { padding: 8px 0 40px; }
.app-page .panel { margin-bottom: 16px; }
.app-signin { max-width: 460px; margin: 24px auto; }
.app-signin h1 { margin-top: 0; }
.btn-google { background: #fff; color: #1f1f1f; box-shadow: none; border: 1px solid #dadce0; }
.btn-google:hover { background: #f4f6f8; }
.btn-sm { padding: 6px 11px; font-size: .85rem; border-radius: 8px; }
.btn-danger { background: #c9473b; color: #fff; }
.btn-danger:hover { background: #b23a2f; }
.app-form .app-label, .app-form legend { display: block; font-weight: 700; margin: 14px 0 6px; }
.app-form .app-label:first-child { margin-top: 0; }
.app-form input[type=text], .app-form input:not([type]), .app-form input[type=search], .app-form textarea, .app-filter input, .app-filter select {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.app-form textarea { resize: vertical; }
.app-form textarea#f-string { font-family: ui-monospace, monospace; font-size: .8rem; }
.app-form fieldset { border: 0; padding: 0; margin: 0; }
.app-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.app-tags legend { width: 100%; }
.app-tag, .app-radio, .app-own { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.app-radio { margin: 6px 0; }
.app-own { margin: 16px 0 8px; font-weight: 600; }
[data-count] { font-weight: 400; color: var(--muted); }
[data-count].ok { color: var(--ok); }
.app-err { color: #ff8a7a; font-weight: 600; }
.app-check .checks { margin-top: 12px; }
.app-preview { margin-bottom: 16px; }
.app-cols { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .app-cols { grid-template-columns: 1fr; } }
.app-list { list-style: none; padding: 0; margin: 0; }
.app-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.app-list li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.app-list small { display: block; color: var(--muted); margin-top: 2px; }
.app-list p { margin: 6px 0 0; }
.app-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.app-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.app-tabs button { font: inherit; font-weight: 700; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 12px; cursor: pointer; }
.app-tabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.app-filter { display: flex; gap: 8px; margin-bottom: 10px; }
.app-filter select { width: auto; }
.app-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.app-done code { overflow-wrap: anywhere; }
.app-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: min(92vw, 520px); padding: 11px 16px; border-radius: 10px; background: #1d2a22; color: #fff; border: 1px solid var(--ok); box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.app-toast-err { background: #2d1a18; border-color: #c9473b; }
.app-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.app-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.app-bar span { position: absolute; bottom: 0; left: 0; right: 0; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .55; }
.app-bar .app-bar-s { left: 25%; right: 25%; opacity: 1; background: var(--accent-strong); }
.app-bar:hover span { opacity: .85; }
.app-cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .app-cols2 { grid-template-columns: 1fr; } }
.app-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-bottom: 12px; }
.app-table th, .app-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.app-table th { color: var(--muted); font-weight: 600; }
.app-table .num { text-align: right; white-space: nowrap; }
.app-filter label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.app-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0 4px; }
.app-or::before, .app-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.app-form input[type=email], .app-form input[type=password] { width: 100%; box-sizing: border-box; font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.app-signin .app-form .btn-big { margin-top: 14px; }
.app-switch { margin-top: 12px; }

/* Admin analytics (Lovable-style) */
.an-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.an-live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.an-live b { color: var(--text); font-size: 1.1rem; }
.an-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: an-pulse 2s infinite; }
@keyframes an-pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 191, 127, .6); } 70% { box-shadow: 0 0 0 8px rgba(63, 191, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 191, 127, 0); } }
@media (prefers-reduced-motion: reduce) { .an-dot { animation: none; } }
.an-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.an-card { text-align: left; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.an-card span { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
.an-card b { display: block; font-size: 1.35rem; margin-top: 2px; font-variant-numeric: tabular-nums; }
.an-card[aria-selected=true] { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.an-chart { padding: 10px 8px 4px; }
.ch { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-ax { fill: var(--muted); font-size: 11px; }
.ch-area { fill: var(--accent); opacity: .16; }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.ch-dot { fill: var(--accent); pointer-events: none; }
.ch-hit { fill: transparent; }
.ch-hit:hover + .ch-dot { r: 4.5; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.an-list h2 { font-size: 1rem; margin: 0 0 8px; }
.an-list ul { list-style: none; margin: 0; padding: 0; }
.an-list li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 8px; font-size: .9rem; border-radius: 6px; }
.an-list li + li { margin-top: 3px; }
.an-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); border-radius: 6px; }
.an-k, .an-list li b { position: relative; }
.an-k { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-list li b { font-variant-numeric: tabular-nums; }
.an-wide { grid-column: span 2; }
@media (max-width: 700px) { .an-wide { grid-column: auto; } }

/* Site analytics (port of sfsblueprints /admin/analytics) */
.an-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.an-title { margin: 0; font-size: 1.1rem; }
.an-top .hint { margin: 2px 0 0; font-size: .8rem; }
.an-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.an-seg { display: inline-flex; gap: 4px; }
.an-seg button { font: inherit; font-size: .85rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.an-seg button[aria-pressed=true] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.an-short { display: none; }
@media (max-width: 640px) { .an-short { display: inline; } .an-long { display: none; } }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.an-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1000px) { .an-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.an-kpi { margin: 0 !important; padding: 14px 16px; }
.an-kpi-l { font-size: .78rem; color: var(--muted); }
.an-kpi-v { display: flex; align-items: center; gap: 6px; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.an-kpi-v span { overflow: hidden; text-overflow: ellipsis; }
.an-kpi-s { font-size: .75rem; color: var(--muted); min-height: 1.1em; margin-top: 2px; }
.an-delta { display: inline-flex; align-items: center; gap: 2px; font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.an-delta.up { color: #34d399; }
.an-delta.down { color: #fb7185; }
.an-delta.compact { font-size: .7rem; }
.an-card-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.an-card-h h3, .panel > h3 { margin: 0; font-size: 1rem; }
.an-card-h .hint { margin: 2px 0 0; font-size: .78rem; }
.an-legend { display: flex; gap: 16px; font-size: .75rem; color: var(--muted); margin: 4px 0 6px; }
.an-legend span { display: inline-flex; align-items: center; gap: 6px; }
.an-l1 { width: 16px; height: 2px; background: var(--accent); border-radius: 2px; }
.an-l2 { width: 16px; border-top: 2px dashed var(--muted); }
.ch-prev { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 4; }
rect.ch-hit { fill: transparent; }
rect.ch-hit:hover { fill: rgba(255, 255, 255, .04); }
.an-small { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.an-tablewrap { max-height: 256px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 6px; }
.an-split { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; align-items: start; }
@media (max-width: 1000px) { .an-split { grid-template-columns: 1fr; } }
.an-split > .panel { min-width: 0; }
.an-filter { width: 220px; max-width: 100%; font: inherit; font-size: .88rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
.an-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--surface-2); border-radius: 8px; padding: 3px; margin-bottom: 8px; }
.an-tabs button { font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 6px; padding: 6px 4px; cursor: pointer; }
.an-tabs button[aria-selected=true] { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.an-ul { list-style: none; margin: 0; padding: 0; }
.an-ul > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.an-ul > li:last-child { border-bottom: 0; }
.an-scroll { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.an-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; }
.an-rl { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-rl a { color: var(--text); text-decoration: none; }
.an-rl a:hover { text-decoration: underline; }
.an-rl small { display: block; color: var(--muted); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; }
.an-rv { flex-shrink: 0; display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.an-pct { width: 3.2em; text-align: right; font-size: .75rem; color: var(--muted); }
.an-mini { font-size: .7rem; color: var(--muted); }
.an-share { height: 6px; margin-top: 5px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.an-share > div { height: 100%; background: var(--accent); border-radius: 999px; }
.an-empty { text-align: center; color: var(--muted); font-size: .9rem; padding: 22px 0; }
.an-more { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--muted); margin-top: 6px; }
.an-flag { display: inline-block; vertical-align: -2px; border-radius: 2px; }
.an-hm-wrap { overflow-x: auto; }
.an-hm { min-width: 480px; display: grid; grid-template-columns: 2.5rem repeat(24, minmax(0, 1fr)); gap: 2px; }
.an-hm-h { font-size: .62rem; color: var(--muted); text-align: center; }
.an-hm-d { font-size: .7rem; color: var(--muted); align-self: center; }
.an-hm-c { height: 20px; border-radius: 3px; background: var(--surface-3); }
.an-hm-c > div { width: 100%; height: 100%; border-radius: 3px; background: var(--accent); }
.an-hm-leg { display: flex; justify-content: flex-end; align-items: center; gap: 5px; font-size: .62rem; color: var(--muted); margin-top: 8px; }
.an-hm-leg span { width: 16px; height: 10px; border-radius: 2px; background: var(--accent); }
.an-foot { font-size: .72rem; }
.page-app .panel > h3 + .hint { margin-top: 2px; font-size: .78rem; }

/* Header on mid-size screens (721–1000 px): keep logo, menu, search and
   account on one row; the menu scrolls sideways instead of pushing the
   search and account buttons onto a second line. */
@media (min-width: 721px) {
  .top-in { flex-wrap: nowrap; }
  .nav { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .top-search, .top-acct, .brand { flex: none; }
}
@media (min-width: 721px) and (max-width: 900px) { .top-acct span { display: none; } }

/* Phones: categories and planets in two columns, so the home page does not
   push planets and new builds under 21 full-width rows. */
@media (max-width: 560px) {
  .tiles, .planets { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tiles a, .planets a { min-height: 44px; padding: 10px 12px; font-size: .92rem; }
}
/* Planet links on the Space Age and planet pages. */
.planet-nav { margin: 0 0 18px; }
.planet-nav a[aria-current="page"] { border-color: var(--planet); box-shadow: inset 0 0 0 1px var(--planet); }

/* "What you need" card, book callout and book index on blueprint pages. */
.compat h2 { font-size: 1rem; margin: 0 0 8px; }
.compat-list { margin: 0; display: grid; gap: 6px; }
.compat-list div { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; font-size: .9rem; }
.compat-list dt { color: var(--muted); }
.compat-list dd { margin: 0; font-weight: 600; }
.compat-note { margin: 10px 0 0; font-size: .85rem; color: var(--muted); border-left: 3px solid #ffd166; padding-left: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.book-callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.book-callout .ic { color: var(--accent); flex: none; margin-top: 3px; }
.book-callout p { margin: 0; }
.book-rest { margin-top: 14px; }
.book-rest summary { cursor: pointer; font-weight: 600; }
.inspect-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 18px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.inspect-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 1.15rem; }
.inspect-card p { margin: 0; color: var(--muted); }
.inspect-card-form { display: grid; gap: 8px; }
.inspect-card-form textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: .85rem; background: var(--inset, var(--surface-2)); color: var(--text); border: 1px solid var(--line); padding: 8px 10px; resize: vertical; }
.inspect-card-form .btn { justify-self: start; }
@media (max-width: 760px) { .inspect-card { grid-template-columns: 1fr; } }
.explore-btn { margin-top: 10px; }

/* "Did it work?" box, video box, verified mark, creator links. */
.verdict { margin: 24px 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.verdict h2 { margin-top: 0; }
.verdict-tally { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.verdict-tally .ic { color: #6dd36d; }
.verdict .btn.chosen { outline: 2px solid var(--accent); }
.verdict .btn:disabled { opacity: .75; cursor: default; }
.verdict-thanks { margin: 10px 0 0; color: var(--muted); }
.card-ok { display: inline-flex; align-items: center; gap: 3px; color: #6dd36d; font-weight: 600; }
.card-ok .ic { width: 13px; height: 13px; display: inline; }
.video-box { margin: 24px 0; }
.video-facade { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; aspect-ratio: 16 / 9; max-height: 420px; background: #111; color: #fff; border: 1px solid var(--line); cursor: pointer; font: inherit; font-weight: 600; }
.video-facade:hover { border-color: var(--accent); }
.video-facade .play { width: 0; height: 0; border-left: 22px solid var(--accent); border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; max-height: 420px; border: 0; }
.head-links { display: flex; gap: 16px; align-items: center; }

/* Upload form preview and the note on a new upload's live page. */
.app-look { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.app-look h2 { margin: 0 0 4px; font-size: 1.05rem; }
.app-look-grid { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 18px; align-items: start; margin-top: 10px; }
.app-look-grid .cards { grid-template-columns: 1fr; }
.app-look-grid h3 { margin: 0 0 6px; }
@media (max-width: 760px) { .app-look-grid { grid-template-columns: 1fr; } }
.app-note { padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
