:root {
  --bg: #f7f1e8;
  --surface: #fffaf2;
  --surface-tint: #f1e6d7;
  --border: #dfd0bc;
  --text: #2b2118;
  --muted: #6b5b4b;
  --primary: #b24722;
  --primary-hover: #923819;
  --accent: #e0a03a;
  --accent-soft: #f6e7c8;
  --white: #ffffff;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 150ms ease; }
a:hover { color: var(--primary-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background-color: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius);
}
.skip-link:focus { left: 16px; z-index: 100; }

.container {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--primary); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--primary);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 16px;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.nav-link {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 4px;
}
.nav-link:hover { color: var(--primary); text-decoration: none; }

.breadcrumb {
  padding-top: 16px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero { padding: 48px 0 32px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 32px;
  align-items: start;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-hover);
  background-color: var(--surface-tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.2;
  margin-top: 0;
}
h1 { font-size: 44px; margin-bottom: 16px; }
h2 { font-size: 28px; margin-bottom: 16px; }
h3 { font-size: 22px; margin-bottom: 8px; }
.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 24px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}
.btn-primary:hover { background-color: var(--primary-hover); color: var(--white); }
.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background-color: var(--surface-tint); color: var(--text); }
.btn-secondary[data-gf-liked] {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn-full { width: 100%; }
.link-btn {
  background: transparent;
  border: 0;
  color: var(--primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
}

.spotlight-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.spotlight-kicker {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 8px;
}
.spotlight-title {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}
.spotlight-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}
.reset-box {
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.reset-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.reset-clock { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }

.section { padding: 48px 0; }
.section-tinted { background-color: var(--surface-tint); }
.section-heading { margin-bottom: 16px; }
.section-intro { color: var(--muted); max-width: 68ch; margin: 0 0 24px; }

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.game-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.game-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background-color: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.meta-note { font-size: 14px; color: var(--muted); }
.card-title { margin: 0; font-size: 22px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--primary); }
.card-desc { margin: 0; color: var(--muted); font-size: 16px; flex: 1; }
.card-link { font-weight: 600; font-size: 14px; color: var(--primary); }

.clue-list { display: flex; flex-direction: column; gap: 12px; }
.clue-row {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.clue-row-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}
.step-num {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 999px;
  background-color: var(--primary);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}
.clue-title { font-size: 18px; margin: 0 0 4px; }
.clue-summary { margin: 0; color: var(--muted); font-size: 14px; }
.clue-reveal {
  margin-top: 12px;
  padding: 12px 16px;
  background-color: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}
.clue-reveal p { margin: 0; font-size: 16px; }

.editorial-figure {
  margin: 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.editorial-figure figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.prose-wrap { max-width: 780px; }
.prose p, .prose li { max-width: 70ch; }
.prose h2 { margin-top: 32px; font-size: 28px; }
.prose h3 { margin-top: 24px; font-size: 20px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background-color: var(--surface);
  border: 1px solid var(--border);
}
.prose th, .prose td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.prose th { background-color: var(--surface-tint); font-weight: 600; }

.tool-stage-section { padding: 24px 0 32px; }
.tool-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.tool-header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.related-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.related-tile {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}
.related-tile:hover { text-decoration: none; border-color: var(--primary); }
.related-tag { font-size: 12px; font-weight: 600; color: var(--primary); text-transform: uppercase; }
.related-tile span:last-child { font-size: 14px; color: var(--muted); }

.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.faq-item p { margin: 12px 0 0; color: var(--muted); }

.engage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.engage-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.share-msg, .form-msg { font-size: 14px; color: var(--primary); font-weight: 600; }
.comment-total { font-size: 14px; color: var(--muted); }
.comment-form {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.form-row { margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--bg);
  color: var(--text);
}
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comments-empty { display: none; color: var(--muted); font-size: 14px; }
.comments-list[data-gf-empty] .comments-empty { display: block; }
.comment-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.comment-item[data-gf-owner] { border-left: 4px solid var(--primary); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin-bottom: 6px; }
.comment-head time { color: var(--muted); font-size: 12px; }
.owner-badge {
  background-color: var(--primary);
  color: var(--white);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
}
.comment-body { margin: 0 0 8px; }
.comment-replies { margin-top: 12px; padding-left: 16px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-tagline { margin: 12px 0 8px; font-weight: 600; color: var(--text); }
.footer-note { margin: 0; font-size: 14px; color: var(--muted); }
.footer-heading { font-size: 16px; margin-bottom: 12px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer-list a { color: var(--muted); }
.footer-list a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .container { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 24px; }
  .hero { padding: 24px 0; }
  .hero-grid, .card-grid-2, .related-strip, .footer-grid { grid-template-columns: 1fr; }
  .tool-header { flex-direction: column; align-items: flex-start; }
  .header-inner { flex-direction: column; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { gap: 12px; }
  .hero-actions .btn, .form-actions .btn { width: 100%; }
  .tool-card { padding: 16px; }
}