:root {
  --bg: #f6f3ee;
  --panel: #ffffff;
  --ink: #171512;
  --muted: #665f55;
  --line: #d8d0c3;
  --brand: #1f7a74;
  --brand-dark: #145450;
  --accent: #bf3f2f;
  --gold: #d69b32;
  --shadow: 0 18px 50px rgba(34, 28, 19, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: rgba(246, 243, 238, 0.92);
  border-bottom: 1px solid rgba(216, 208, 195, 0.9);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: white;
  background: var(--brand);
  border-radius: 8px;
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 15px;
}

.nav a,
.site-footer a,
.guide-card a,
.related-links a {
  text-decoration: none;
}

.nav a:hover,
.site-footer a:hover,
.guide-card a:hover,
.related-links a:hover {
  color: var(--brand);
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(20, 18, 15, 0.78), rgba(20, 18, 15, 0.42) 48%, rgba(20, 18, 15, 0.12)), linear-gradient(0deg, rgba(20, 18, 15, 0.72), rgba(20, 18, 15, 0.04) 40%);
}

.hero-content {
  position: relative;
  width: min(780px, calc(100% - 36px));
  margin: 0 clamp(18px, 6vw, 80px) clamp(52px, 10vh, 96px);
  color: white;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f1bd61;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(42px, 8vw, 86px);
}

.hero-copy {
  max-width: 640px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: var(--brand);
}

.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

.section,
.page-shell,
.article-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  padding: 74px 0;
}

.section.compact {
  padding-top: 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-title h1,
.article-header h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card,
.game-row,
.answer-box,
.toc,
details,
.metrics-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.guide-card {
  padding: 22px;
}

.guide-card h3 {
  margin-top: 8px;
  font-size: 22px;
}

.guide-card p,
.game-row p,
.page-title p,
.article-meta,
.lede,
.site-footer {
  color: var(--muted);
}

.card-meta {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 36px;
}

.split h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.split p {
  color: var(--muted);
  font-size: 18px;
}

.metrics-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 24px;
  gap: 14px;
}

.metrics-panel div {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: #f3eee5;
  border-radius: 8px;
}

.metrics-panel span {
  color: var(--brand);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.metrics-panel p {
  margin: 8px 0 0;
  font-size: 15px;
}

.page-shell,
.article-shell {
  padding: 56px 0 74px;
}

.page-title {
  max-width: 780px;
  margin-bottom: 28px;
}

.game-list {
  display: grid;
  gap: 16px;
}

.game-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.game-row.muted {
  box-shadow: none;
}

.game-row h2 {
  margin-top: 8px;
  font-size: 28px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 280px;
}

.tag-list span {
  padding: 6px 10px;
  color: var(--brand-dark);
  background: #dcefeb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.guide-article {
  max-width: 860px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-size: 14px;
}

.lede {
  font-size: 20px;
}

.answer-box {
  padding: 18px;
  border-left: 5px solid var(--brand);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 34px;
  padding: 12px;
  box-shadow: none;
}

.toc a,
.related-links a {
  padding: 8px 10px;
  color: var(--brand-dark);
  background: #e8f4f1;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.guide-article section {
  margin-top: 40px;
}

.guide-article h2 {
  margin-bottom: 16px;
  font-size: 30px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--ink);
  background: #eee7dc;
}

tr:last-child td {
  border-bottom: 0;
}

.check-list {
  padding-left: 22px;
}

.check-list li {
  margin: 10px 0;
}

details {
  margin: 12px 0;
  padding: 14px 16px;
  box-shadow: none;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.config-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.config-form,
.output-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.config-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.config-form label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.config-form input,
.config-form select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.config-form input:focus,
.config-form select:focus {
  outline: 3px solid rgba(31, 122, 116, 0.18);
  border-color: var(--brand);
}

.config-form .toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
}

.output-panel {
  padding: 18px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.output-header h2 {
  margin: 0;
  font-size: 24px;
}

#configOutput {
  min-height: 330px;
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: #f6f3ee;
  background: #171512;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre;
}

.copy-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--brand-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  .game-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 720px;
  }

  .guide-grid,
  .split,
  .metrics-panel,
  .game-row,
  .config-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .game-row .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-content {
    margin-bottom: 38px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .button {
    width: 100%;
  }
}
