:root {
  color-scheme: light;
  --ink: #211e18;
  --muted: #5e5445;
  --pine: #172c29;
  --paper: #fbf5e8;
  --line: #c6b38e;
  --gold: #bca063;
  font: 100%/1.5 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #eee4d1; color: var(--ink); }
[hidden] { display: none !important; }
a { color: #254940; text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #806025; outline-offset: 4px; }
.masthead {
  color: #fff6e1; background: var(--pine);
  background-image:
    radial-gradient(ellipse at top, #365047, transparent 52%),
    repeating-linear-gradient(126deg, #dbbd800b 0 1px, transparent 1px 4px);
  border-bottom: 5px double var(--gold); padding: 1.45rem 1rem;
}
.masthead-inner { max-width: 58rem; margin: auto; display: flex; justify-content: center; align-items: center; gap: 1rem; }
.seal {
  flex: 0 0 3.3rem; height: 3.3rem; border-radius: 50%; border: 4px double #dbbd80;
  position: relative; background: repeating-conic-gradient(#c8aa71 0deg 2deg, transparent 2deg 15deg);
  box-shadow: 0 0 0 2px #273f36, 0 0 0 3px #b69356;
}
.seal::before { content: ""; position: absolute; inset: .28rem; border: 1px solid #c8aa71; border-radius: 50%; background: #253c35; }
.seal::after {
  content: ""; position: absolute; width: .72rem; height: .95rem; top: .43rem; left: 50%;
  border-left: 2px solid #eed298; border-bottom: 2px solid #eed298; transform: rotate(-24deg);
  transform-origin: bottom left;
}
.brand { margin: 0; font: 600 clamp(1.05rem, 4.4vw, 2rem)/1.12 Georgia, serif; letter-spacing: .085em; text-transform: uppercase; }
.registry-name { margin: .28rem 0 0; color: #ead09a; font-size: clamp(.65rem, 2.6vw, .85rem); letter-spacing: .08em; text-transform: uppercase; }
.shell { width: min(100% - 2rem, 58rem); margin: clamp(1.25rem, 4vw, 2.6rem) auto; }
.station-shell { max-width: 39rem; }
.paper {
  position: relative; padding: clamp(1.05rem, 5vw, 2.5rem);
  background-color: var(--paper);
  background-image: radial-gradient(ellipse at center, transparent 45%, #c49c5923),
    repeating-linear-gradient(0deg, #a67e3a08 0 1px, transparent 1px 4px);
  border: 1px solid var(--line); box-shadow: 0 8px 24px #44341912;
}
.paper::after { content: ""; position: absolute; inset: 8px; border: 1px dotted #c6b38e; pointer-events: none; }
.paper::before { content: ""; position: absolute; inset: 5px; border: 1px solid #e0d2b4; pointer-events: none; }
h1 { font: 500 clamp(2rem, 7vw, 3.3rem)/1.04 Georgia, serif; letter-spacing: -.035em; margin: 0 0 .65rem; }
.station-shell h1 { font-size: clamp(1.8rem, 6vw, 2.65rem); }
h2 { font: 600 1.4rem/1.2 Georgia, serif; margin: 0 0 .65rem; }
p { margin: 0 0 1rem; }
.intro { color: var(--muted); max-width: 39rem; }
.stations {
  margin: 1.25rem 0 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: .55rem 1.25rem;
}
.stations li { border-bottom: 1px solid #e0d2b4; }
.stations a {
  display: flex; align-items: center; gap: .55rem; min-height: 48px; padding: .3rem .1rem;
  font: 600 1.12rem/1.2 Georgia, serif; text-decoration: none;
}
.stations a::before { content: ""; width: .42rem; height: .42rem; border: 1px solid #806025; transform: rotate(45deg); flex-shrink: 0; }
.stations a:hover { text-decoration: underline; }
.question { border-top: 1px solid var(--line); padding-top: 1rem; font: 600 1.2rem/1.35 Georgia, serif; margin-bottom: .75rem; }
.fields { display: grid; gap: .65rem; }
.field label { display: block; font-size: .95rem; font-weight: 650; margin-bottom: .24rem; }
.field small { display: block; color: var(--muted); margin: .2rem 0 0; font-size: .875rem; }
input {
  width: 100%; min-height: 48px; border: 1px solid #968368; border-radius: 3px;
  background: #fffcf6; color: var(--ink); font: inherit; padding: .55rem .7rem;
}
button {
  cursor: pointer; border-radius: 3px; font: 700 .9rem/1.2 system-ui, sans-serif;
  min-height: 48px; padding: .65rem .95rem;
}
button[disabled] { cursor: wait; opacity: .72; }
.verify { text-transform: uppercase; width: 100%; margin: .85rem 0 0; color: #fff5dc; background: var(--pine); border: 1px solid var(--pine); letter-spacing: .09em; }
.verify:hover:enabled { background: #2b483f; }
.feedback:empty { display: block; height: 0; padding: 0; border: 0; margin: 0; }
.feedback:not(:empty) { margin: .8rem 0 0; padding: .65rem .8rem; border: 1px solid #aa9670; border-left-width: 4px; background: #f5ead2; }
.feedback[data-state="correct"] { border-color: #436b51; background: #eaf0df; }
.feedback[data-state="incorrect"] { border-color: #986638; }
.feedback strong { display: block; font-size: .84rem; letter-spacing: .065em; }
.hints { margin-top: .75rem; }
.hints button { background: transparent; border: 1px solid #9d8966; color: #254940; }
.hints button:hover:enabled { background: #f0e5cb; }
.hint-line { margin: .55rem 0; padding-left: .7rem; border-left: 2px solid var(--gold); }
.back {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 .35rem;
  font-size: .935rem; font-weight: 650;
}
.notice { margin-bottom: .2rem; color: var(--muted); margin-top: .65rem; font-size: .875rem; }
.noscript { border: 1px solid var(--line); padding: .65rem; margin-top: .65rem; }
@media (max-width: 420px) {
  .masthead { padding: 1rem .7rem; }
  .seal { scale: .9; }
  .shell { width: calc(100% - 1.25rem); margin-top: .7rem; }
  .masthead-inner { gap: .55rem; }
  .question { padding-top: .72rem; }
  .fields { gap: .45rem; }
}

@media (max-width: 360px) {
  .masthead { padding-block: .72rem; }
  .seal { flex-basis: 2.7rem; height: 2.7rem; }
  .station-shell .paper { padding: .95rem; }
  .station-shell h1 { font-size: 1.65rem; }
  .station-shell .question { font-size: 1.08rem; }
}
