/* Lost in Mountainaire: orange & white (style 1).
   Mobile-first single column; widens to a centred 640px column on desktop. */
:root {
  --orange: #E8590C;       /* marker-top orange: header, buttons */
  --orange-text: #B8430A;  /* orange that passes contrast as text on white */
  --ink: #1D1D1B;          /* text, borders, the "What is this?" bar */
  --muted: #4A4A46;
  --paper: #FFFFFF;
  --contour: #F2C2A4;      /* faint contour lines */
  --wood: #C9A27A;         /* post colour in the marker drawing */
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif-condensed, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.55;
}
a { color: var(--orange-text); }
a:hover { color: #8A3208; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
img, svg { max-width: 100%; }

.wrap { max-width: 640px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Header */
.top { background: var(--orange); color: #fff; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; position: relative; }
.brand { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: 1.5px; color: #fff; text-decoration: none; text-transform: uppercase; }
.brand:hover { color: #fff; }
.menu summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border: 2px solid #fff; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: max(20px, env(safe-area-inset-right)); top: 60px; z-index: 10; background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; min-width: 230px; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.menu nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 14px 18px; border-bottom: 1px solid #E6E6E2; }
.menu nav a:last-child { border-bottom: 0; }
.menu nav a:hover { background: #FFF1E8; }

/* "What is this?" bar on control pages */
.whatbar { display: block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; }
.whatbar:hover { color: #fff; background: #000; }
.whatbar .wrap { display: flex; justify-content: space-between; padding-block: 14px; }

/* Faint contour-line background */
.contours { position: relative; overflow: hidden; }
.contours > svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.contours > *:not(svg.lines) { position: relative; }

/* Buttons */
.btn { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 13px 18px; border-radius: 6px; font-weight: 600; font-size: 17px; text-decoration: none; border: 2px solid var(--ink); color: var(--ink); background: var(--paper); }
.btn:hover { color: var(--ink); background: #FFF1E8; }
.btn.primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primary:hover { background: #CF4F0A; color: #fff; }
.btns { display: flex; flex-direction: column; gap: 12px; }
.btns.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.btns.two .btn { justify-content: center; text-align: center; }

/* Type */
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 3px; text-transform: uppercase; color: var(--orange-text); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; text-wrap: balance; margin: 0; }
h1 { font-size: 50px; }
h2 { font-size: 32px; margin-top: 8px; }
h3 { font-size: 23px; }
p, ul, ol { margin: 0; }
.prose { display: flex; flex-direction: column; gap: 16px; padding-block: 28px 40px; }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.prose section { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.note { border: 2px solid var(--ink); border-radius: 4px; padding: 14px 16px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { border: 1.5px solid var(--ink); border-radius: 20px; padding: 6px 12px; color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }

/* Map colour key */
.key { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.swatch { width: 34px; height: 22px; border: 1px solid var(--ink); }

/* Home hero */
.hero { background: var(--ink); color: #fff; }
.hero .wrap { display: flex; flex-direction: column; gap: 14px; padding-block: 34px 30px; }
.hero .eyebrow { color: #FF9A5C; }
.hero p { color: #E4E4E0; }
.steps { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px 12px; }
.steps .n { width: 28px; height: 28px; border-radius: 14px; background: var(--orange); color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 14px; padding-block: 24px; }

/* Control page */
.control { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding-block: 32px 24px; }
.control .code { font-family: var(--display); font-weight: 800; font-size: 132px; line-height: .9; letter-spacing: 2px; }
.control .check { color: var(--muted); font-size: 16px; }
.about { width: 100%; text-align: left; background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.about .label { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--orange-text); }

footer { border-top: 1px solid #E6E6E2; color: var(--muted); font-size: 14px; }
footer .wrap { padding-block: 18px 28px; }

@media (min-width: 700px) { h1 { font-size: 64px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
