:root {
  --sea: #0d1b24; --panel: #13222c; --panel-2: #182a35; --line: #2a3d49;
  --ink: #ece2c8; --muted: #a3ada9; --gold: #d6ae5c; --gold-hi: #f2d283; --red: #d4594a;
  --btn-bg: var(--gold); --btn-hover: var(--gold-hi); --btn-ink: #1a1306; --shadow: rgba(0, 0, 0, .35);
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --logo-clue: var(--gold); --logo-untry: var(--gold-hi);
  color-scheme: dark;
}
/* Light palette of the game; gold one step darker because the site uses it for small text */
:root[data-theme="light"] {
  --sea: #d6dfdc; --panel: #f1f2ee; --panel-2: #e6e9e4; --line: #c3cbc7;
  --ink: #1d2a31; --muted: #4a575c; --gold: #7a5a17; --gold-hi: #5c4410; --red: #b23a2c;
  --btn-bg: #7a5a17; --btn-hover: #5c4410; --btn-ink: #ffffff; --shadow: rgba(29, 42, 49, .18);
  --logo-clue: #94702a; --logo-untry: #4f3a0c;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--sea); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
a { color: var(--gold-hi); }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px 22px; padding-top: 16px; padding-bottom: 12px;
  flex-wrap: wrap; }
.site-header .site-nav { margin-left: auto; }
/* Logo follows the theme: "Clue" in gold, "untry" and the clue dot in the contrasting gold */
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: .01em; text-decoration: none; display: inline-flex;
  align-items: center; color: var(--logo-clue); }
.brand:hover { color: var(--logo-clue); }
.brand span { color: var(--logo-untry); }
.brand .logo { display: block; width: 30px; height: 30px; margin-right: 10px; }
.brand .logo-dot { fill: var(--logo-untry); }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.theme-btn { border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 8px;
  padding: 5px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.theme-btn:hover { color: var(--ink); border-color: var(--gold); }
.theme-btn svg { display: block; }
.theme-btn .icon-moon { display: none; }
:root[data-theme="light"] .theme-btn .icon-sun { display: none; }
:root[data-theme="light"] .theme-btn .icon-moon { display: block; }
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 24px 0 36px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer button { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; text-decoration: underline;
  cursor: pointer; }

/* Buttons */
.btn { display: inline-block; border: 1px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-ink);
  border-radius: 10px; padding: 12px 20px; font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel); color: var(--ink); border-color: var(--gold); }

/* Hero */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.kicker { color: var(--gold); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }
.hero h1 { font-size: clamp(38px, 6vw, 58px); margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--ink); margin: 0 0 26px; max-width: 34em; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .note { color: var(--muted); font-size: 14px; margin-top: 14px; }
.shot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 40px var(--shadow);
  transform: rotate(.6deg); }

/* Sections */
section { padding: 36px 0; }
h2 { font-size: 32px; margin: 0 0 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  counter-reset: step; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--serif); font-size: 30px; color: var(--gold); display: block;
  line-height: 1; margin-bottom: 8px; }
.steps h3 { font-size: 20px; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; }

table.points { border-collapse: collapse; width: 100%; max-width: 640px; }
table.points th, table.points td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.points th { color: var(--muted); font-weight: 500; font-size: 14px; }
table.points td.num { font-variant-numeric: tabular-nums; color: var(--gold-hi); white-space: nowrap; }

/* Passport-style card (as in the game) */
.passport { border: 1px solid var(--gold); border-radius: 6px; padding: 4px; }
.passport-in { border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 3px; padding: 18px 20px; }

/* Text pages */
.page { padding: 48px 0 0; }
.page h1 { font-size: 44px; margin: 0 0 8px; }
.page .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.page h2 { font-size: 26px; margin: 34px 0 10px; }
.page p, .page li { color: var(--ink); }
.page ul { padding-left: 20px; }
.muted { color: var(--muted); }
.maker { display: flex; gap: 22px; align-items: center; margin: 34px 0 0; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.maker img { width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--gold); flex: none; }
.maker h2 { margin-top: 0; }
.maker p { margin: 0; }

/* Archive */
.archive { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.archive li { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.archive summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; gap: 14px; align-items: baseline;
  flex-wrap: wrap; }
.archive summary::-webkit-details-marker { display: none; }
.archive summary::after { content: "\25BE"; color: var(--gold); transition: transform .15s; }
.archive details[open] summary::after { transform: rotate(180deg); }
.archive summary:hover .country { color: var(--gold-hi); }
.archive .nr { color: var(--gold); font-variant-numeric: tabular-nums; min-width: 4.5em; }
.archive .country { font-family: var(--serif); font-size: 22px; }
.archive .day { color: var(--muted); font-size: 14px; margin-left: auto; }
.archive .clues { margin: 0; padding: 0 18px 16px 18px; list-style: none; display: grid; gap: 6px; }
.archive .clues li { background: none; border: 0; border-left: 2px solid var(--gold); border-radius: 0; padding: 2px 0 2px 12px; }
.archive .clues .cat { display: block; color: var(--gold); font-size: 12px; }
.archive .plain { padding: 14px 18px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .shot { transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .maker { flex-direction: column; align-items: flex-start; }
  .steps { grid-template-columns: 1fr; }
  .archive .day { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 640px) {
  .site-header .brand { order: 1; }
  .site-header .theme-btn { order: 2; margin-left: auto; }
  .site-header .site-nav { order: 3; flex-basis: 100%; margin-left: 0; }
}
