/* Survey handbook: dark sheets, ruled data tables, one mining-progress bar per game card. */
:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --text: #e8ecf5;
  --muted: #9aa4b8;
  --primary: #7c5cff;
  --accent: #22d3ee;
  --btn: #6a4af0;
  --btn-hover: #5636dc;
  --line: color-mix(in srgb, var(--muted) 24%, transparent);
  --line-soft: color-mix(in srgb, var(--muted) 12%, transparent);
  --radius: 12px;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--body); font-variant-numeric: tabular-nums; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 48px; }
h2 { font-size: 28px; }
h3 { font-size: 18px; }
p { margin: 0 0 16px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* header */
.bar { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.mark { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font: 700 18px/1 var(--head); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--radius); }
.nav a:hover { color: var(--text); background: var(--card); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px; border-radius: var(--radius); background: var(--btn); color: #fff; font-weight: 600; text-decoration: none; border: 1px solid var(--btn); }
.btn:hover { background: var(--btn-hover); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--text); background: transparent; }

/* home: hero */
.hero { padding-top: 48px; padding-bottom: 32px; }
.hero .lede { color: var(--muted); font-size: 18px; margin-top: 16px; }
.dataline { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 0; margin: 8px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.dataline b { color: var(--accent); font: 700 22px/1 var(--head); margin-right: 4px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* home: cards with the dig bar */
.survey, .choose, .contents, .home-prose, .faq { padding-top: 48px; }
.survey h2, .choose h2, .contents h2 { margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-img img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: 16px 16px 8px; flex: 1; }
.card h3 { font-size: 22px; margin-bottom: 8px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card-body > p { color: var(--muted); font-size: 14px; }
.spec { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th { text-align: left; font-weight: 600; color: var(--muted); padding: 4px 12px 4px 0; width: 32%; border-top: 1px solid var(--line-soft); }
.spec td { padding: 4px 0; border-top: 1px solid var(--line-soft); }
.credit { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.dig { padding: 8px 16px 12px; border-top: 1px solid var(--line); }
.dig-track { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.dig-track span { display: block; height: 100%; width: var(--fill); background: linear-gradient(90deg, var(--primary), var(--accent)); transform-origin: left; animation: dig 1.2s ease-out both; }
.dig-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 4px; }
@keyframes dig { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .dig-track span { animation: none; } }

/* home: numbered choose list */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.steps li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps .num { font: 700 36px/1 var(--head); color: var(--primary); }
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); margin: 0; }

/* contents page with dotted leaders */
.toc, .related ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li, .related li { counter-increment: toc; }
.toc a, .related a { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; color: var(--text); text-decoration: none; }
.toc a::before, .related a::before { content: counter(toc, decimal-leading-zero); color: var(--muted); font-size: 14px; min-width: 28px; }
.toc a span, .related a span { font-weight: 600; }
.toc a i, .related a i { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); min-width: 24px; }
.toc a em, .related a em { font-style: normal; color: var(--muted); font-size: 14px; text-align: right; }
.toc a:hover span, .related a:hover span { color: var(--accent); }

/* FAQ */
.faq h2 { margin-bottom: 16px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 700 22px/1.2 var(--head); color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* inner pages */
.doc { padding-top: 24px; padding-bottom: 64px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--muted); }
.doc-head h1 { font-size: 36px; }
.doc-head .lede { color: var(--muted); font-size: 18px; margin-top: 16px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 24px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts div { padding: 12px 16px; border-right: 1px solid var(--line-soft); }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 0; font: 700 18px/1.3 var(--head); }
.stamp { font-size: 14px; color: var(--muted); margin-top: 16px; }
.shot { margin: 32px 0 0; }
.shot img, .prose figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.shot figcaption, .prose figcaption { font-size: 12px; color: var(--muted); margin-top: 8px; }
.prose { margin-top: 32px; }
.prose h2 { font-size: 28px; margin: 48px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--primary); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted); }
.prose blockquote p { margin: 0; }
.prose figure { margin: 24px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 16px 0 24px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { color: var(--muted); font-weight: 600; border-bottom-color: var(--muted); white-space: nowrap; }
.prose tbody tr:hover { background: var(--card); }
.tbv { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 0 6px; line-height: 1.6; white-space: nowrap; }
.doc .faq, .related, .sources { padding-top: 48px; }
.related h2, .sources h2 { font-size: 22px; margin-bottom: 12px; }
.sources ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.sources li { padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.sources li span { color: var(--muted); }
.disclaim { margin-top: 32px; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* tool */
.tool { margin-top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }

/* footer */
.foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 32px 0 24px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot-name { font: 700 18px/1.2 var(--head); color: var(--text); }
.foot-links { display: flex; flex-direction: column; gap: 4px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--text); }
.foot-year { margin-top: 24px; font-size: 12px; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1, .doc-head h1 { font-size: 30px; }
  h2, .prose h2 { font-size: 22px; }
  .bar { position: static; }
  .bar-row { flex-direction: column; align-items: flex-start; padding: 8px 0; gap: 4px; }
  .nav a { padding: 8px; }
  .cards, .foot-grid, .gallery { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .steps li { grid-template-columns: 48px 1fr; }
  .steps .num { font-size: 28px; }
  .toc a em, .related a em { display: none; }
}
