@font-face { font-family: "Kanit"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/kanit-v17-latin-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/inter-v20-latin-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/inter-v20-latin-700.woff2") format("woff2"); }

:root {
  --bg: #13171A;
  --surface: #1B2024;
  --line: #2C3338;
  --text: #E3E7E9;
  --muted: #9AA5AC;
  --accent: #7FB9C5;
  --heading: "Kanit", "Segoe UI", Arial, sans-serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.65; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--heading); font-weight: 500; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 40px; }
h2 { font-size: 26px; }
h3 { font-size: 19px; }
p, ul { margin: 0; }
.shell { max-width: 760px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }

.top { border-bottom: 1px solid var(--line); }
.top .shell { padding-block: 22px 0; display: flex; flex-direction: column; gap: 18px; }
.top-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.wordmark { font-family: var(--heading); font-size: 22px; font-weight: 500; color: var(--text); text-decoration: none; }
.wordmark span { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-left: 8px; }
.back { font-family: var(--mono); font-size: 13px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding: 0; margin: 0; font-size: 15px; }
.nav a { display: inline-block; padding-bottom: 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

main .shell { padding-block: 56px 72px; display: flex; flex-direction: column; gap: 40px; }
.intro { display: flex; flex-direction: column; gap: 14px; }
.lead { font-size: 19px; color: var(--text); }
.status { align-self: flex-start; font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 3px 10px; }
section { display: flex; flex-direction: column; gap: 14px; }
section ul { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.muted { color: var(--muted); }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.placeholder { font-family: var(--mono); font-size: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; padding: 14px 16px; }
.resources { list-style: none; padding: 0 !important; gap: 14px !important; }
.resources li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.resources strong { font-family: var(--heading); font-weight: 500; font-size: 18px; }
.credits { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px 24px; margin: 0; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; min-width: 0; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

.up { font-family: var(--mono); font-size: 13px; }
.hint-parts { list-style: none; padding: 0 !important; gap: 12px !important; }
.hint-parts li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.hint-parts a { font-family: var(--heading); font-weight: 500; font-size: 19px; }
.hint-parts span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.steps { display: flex; flex-direction: column; }
.hint-step { border-top: 1px solid var(--line); }
.hint-step:last-of-type { border-bottom: 1px solid var(--line); }
.hint-step > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; }
.hint-step > summary::-webkit-details-marker { display: none; }
.hint-step > summary::after { content: "Is this where you are?"; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hint-step[open] > summary::after { content: "Close"; }
.hint-step > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hint-step h2 { font-family: var(--mono); font-weight: 400; font-size: 22px; color: var(--accent); margin: 0; }
.step-body { display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.here-if span { color: var(--muted); }
.hints { display: flex; flex-direction: column; gap: 8px; }
.hint { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.hint summary { cursor: pointer; padding: 12px 16px; font-family: var(--heading); font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.hint summary::-webkit-details-marker { display: none; }
.hint summary::after { content: "Show"; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--accent); }
.hint[open] summary::after { content: "Hide"; }
.hint summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hint p { margin: 0; padding: 0 16px 14px; }
.part-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; border-top: 1px solid var(--line); padding-top: 24px; font-family: var(--mono); font-size: 14px; }

.foot { border-top: 1px solid var(--line); }
.foot .shell { padding-block: 24px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 14px; color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 22px; }
  main .shell { padding-block: 36px 48px; gap: 32px; }
  .credits { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .credits dd { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
