:root {
  color-scheme: dark;
  --bg: #0f0e0c;
  --panel: #171511;
  --panel-2: #201d17;
  --ink: #f3ead8;
  --muted: #b8ad9b;
  --soft: #8f8576;
  --line: #393126;
  --gold: #d9b45f;
  --teal: #6fd0b5;
  --red: #d74e3f;
  --shadow: 0 20px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(111, 208, 181, .12), transparent 24rem),
    radial-gradient(circle at 80% 14%, rgba(217, 180, 95, .10), transparent 22rem),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #9ae9d5; }
img { max-width: 100%; height: auto; display: block; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 180, 95, .18);
  background: rgba(15, 14, 12, .92);
  backdrop-filter: blur(14px);
}
.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.brand img { width: 34px; height: 34px; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  font-size: 22px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.site-nav a:hover { color: var(--ink); }

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  min-height: 560px;
  padding: 78px 0 36px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 42px;
  align-items: center;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}
h1, h2, h3 {
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0 0 14px;
}
h1 { font-size: clamp(42px, 7vw, 78px); max-width: 760px; }
h2 { font-size: clamp(28px, 4vw, 42px); margin-top: 42px; }
h3 { font-size: 22px; margin-top: 26px; }
p { margin: 0 0 16px; color: var(--muted); }
.lede { font-size: clamp(18px, 2vw, 22px); max-width: 720px; color: #ddd0bd; }
.hero-actions, .button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.button.primary {
  background: var(--gold);
  color: #16120b;
  border-color: var(--gold);
}
.button:hover { transform: translateY(-1px); color: var(--ink); }
.button.primary:hover { color: #16120b; }
.hero-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(32, 29, 23, .98), rgba(16, 15, 13, .96));
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}
.hero-card img { width: 100%; aspect-ratio: 616 / 353; object-fit: cover; }
.caption { padding: 10px 14px; font-size: 12px; color: var(--soft); }

.band { padding: 44px 0; border-top: 1px solid rgba(217, 180, 95, .12); }
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--line);
  background: rgba(23, 21, 17, .86);
  border-radius: 8px;
  padding: 18px;
  min-width: 0;
}
.card h3 { margin-top: 0; font-size: 20px; }
.card p { margin-bottom: 0; }
.card a { color: var(--ink); text-decoration: none; }
.card a:hover { color: var(--teal); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(111, 208, 181, .12);
  color: var(--teal);
  border: 1px solid rgba(111, 208, 181, .25);
  font-size: 12px;
  font-weight: 800;
}

.article {
  max-width: 880px;
  padding: 58px 0;
}
.article h1 { font-size: clamp(38px, 5vw, 62px); }
.answer-box, .hint-box, .source-box, .planner-panel {
  border-left: 4px solid var(--gold);
  background: rgba(32, 29, 23, .8);
  padding: 18px;
  border-radius: 8px;
  margin: 22px 0;
}
.hint-box { border-left-color: var(--teal); }
.source-box { border-left-color: var(--red); }
.answer-box strong, .hint-box strong, .source-box strong { color: var(--ink); }
ul, ol { color: var(--muted); padding-left: 22px; }
li { margin: 8px 0; }

.table-wrap { overflow-x: auto; margin: 22px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: rgba(23, 21, 17, .7);
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
th { color: var(--ink); background: rgba(217, 180, 95, .08); }

.mini-index {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.mini-index a {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 11px;
  text-decoration: none;
  font-weight: 750;
}

.planner-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; margin-bottom: 14px; }
select {
  width: 100%;
  border: 1px solid var(--line);
  background: #12100d;
  color: var(--ink);
  border-radius: 8px;
  min-height: 44px;
  padding: 9px 10px;
  font: inherit;
}
.result-list {
  display: grid;
  gap: 10px;
  margin: 0;
}
.result-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.result-list dt { color: var(--ink); font-weight: 900; }
.result-list dd { margin: 3px 0 0; color: var(--muted); }
.tiny-note { font-size: 13px; color: var(--soft); }

.footer {
  border-top: 1px solid rgba(217, 180, 95, .16);
  padding: 34px 0;
  color: var(--soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
}
.footer a { color: var(--muted); margin-right: 14px; }

@media (max-width: 820px) {
  .header-inner { align-items: flex-start; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none;
    width: 100%;
    padding: 10px 0 0;
    justify-content: flex-start;
  }
  .site-nav[data-open="true"] { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .hero { padding-top: 46px; min-height: auto; }
  .hero-grid, .planner-grid, .grid, .grid.two, .footer-grid { grid-template-columns: 1fr; }
  .wrap { width: min(100% - 28px, 1160px); }
  .card { padding: 15px; }
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 10px; }
  td { border: 0; padding: 7px 0; }
  td::before {
    content: attr(data-label);
    display: block;
    color: var(--ink);
    font-weight: 900;
    margin-bottom: 2px;
  }
}

/* Screenshot Grid */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.screenshot-grid img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-grid img:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5);
}

/* Build Planner Result Cards */
[data-build-result] {
  padding: 20px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

[data-build-result] table {
  width: 100%;
  margin: 12px 0;
}

[data-build-result] td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 768px) {
  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

