:root {
  color-scheme: dark;
  --night: #101e2b;
  --stone: #192d3a;
  --raised: #203845;
  --line: #39525e;
  --snow: #eff4ed;
  --mist: #b2c8cf;
  --mint: #b7e5cf;
  --amber: #efc47a;
  --red: #f3a19d;
  --yellow: #f1d17c;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --frame: 1080px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--night);
  color: var(--snow);
  font: 16px/1.55 var(--sans);
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button, input, a, summary { -webkit-tap-highlight-color: #b7e5cf25; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
h1:focus, h2:focus { outline: none; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2 { font: 700 2.4rem/1.08 var(--serif); letter-spacing: -.042em; }
h2 { font-size: clamp(1.65rem, 4vw, 2.15rem); }
h3 { line-height: 1.2; }
p { max-width: 61ch; }
svg { display: inline-block; width: 1.35em; height: 1.35em; vertical-align: middle; flex: none; }
.frame { width: min(calc(100% - 36px), var(--frame)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

.top { border-bottom: 1px solid var(--line); background: #12222f; }
.top-inner { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.brand { display: inline-flex; gap: .6rem; align-items: center; padding-block: .4rem; font-weight: 750; line-height: 1.15; }
.brand img { flex: none; width: 36px; height: 36px; }
.brand small { display: block; font-size: .69rem; font-weight: 500; color: var(--mist); margin-top: .26rem; }
.nav-link { color: var(--mist); font-size: .82rem; font-weight: 650; padding: .75rem .15rem; }
.nav-link:hover { color: var(--snow); }
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 1rem;
  border-top: 1px solid var(--line); padding-block: 1.25rem 1.75rem; margin-top: 3rem;
  color: var(--mist); font-size: .78rem;
}

.button {
  min-height: 49px; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  border: 1px solid transparent; border-radius: 7px; padding: .65rem .9rem;
  font-size: .93rem; font-weight: 750; text-align: center; line-height: 1.25;
}
.button.primary { background: var(--mint); color: #152c30; }
.button.primary:hover { background: #d0f2e0; }
.button.secondary { color: var(--snow); border-color: #66818a; background: #203642; }
.button.secondary:hover { background: #2c4854; }
.button:disabled { opacity: .48; }
.text-button {
  min-height: 44px; border: 0; background: transparent; color: var(--mist);
  text-decoration: underline; text-underline-offset: .22em; padding: .3rem .1rem;
  font-weight: 650; font-size: .84rem;
}
.text-button:hover { color: var(--snow); }
.text-button:disabled { opacity: .45; }

.hero {
  display: grid; align-items: center; gap: 1.6rem; overflow: hidden;
  margin-top: 1.4rem; background: #142632; border: 1px solid #395361;
  border-radius: 15px 15px 5px 5px;
}
.hero-copy { padding: 1.55rem 1.1rem 0; }
.edition { display: inline-flex; gap: .55rem; align-items: center; color: var(--amber); font-size: .84rem; font-weight: 700; }
.edition > span { width: 15px; height: 1px; background: var(--amber); }
.hero h1 { margin: .6rem 0 .85rem; font-size: clamp(2.65rem, 11.7vw, 5.7rem); line-height: .94; letter-spacing: -.057em; }
.hero-copy p { max-width: 34ch; color: #c2d3d6; margin-bottom: 1.2rem; }
.hero-copy .button svg:last-child { margin-left: .4rem; width: 1.15em; }
.hero-art { position: relative; align-self: stretch; background: #101e2b; min-width: 0; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-art figcaption {
  position: absolute; right: .65rem; bottom: .65rem; color: #d9e6e3; background: #101e2be8;
  padding: .28rem .5rem; border: 1px solid #72909570; border-radius: 4px;
  font-size: .65rem; letter-spacing: .01em;
}
.hero-art figcaption span { display: inline-block; width: 5px; height: 5px; margin-right: .25rem; background: var(--amber); transform: rotate(45deg); vertical-align: .1em; }
.rounds { margin-top: 2.25rem; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem 1rem; flex-wrap: wrap; margin-bottom: .85rem; }
.section-heading > span { font-size: .78rem; color: var(--mist); }
.round-grid, .route-grid { display: grid; gap: .65rem; }
.round {
  position: relative; display: flex; gap: .85rem; align-items: center;
  min-width: 0; padding: .9rem 2.3rem .9rem .8rem; background: var(--stone); border: 1px solid var(--line);
  border-radius: 7px;
}
.round-icon, .big-icon {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px;
  background: #25404a; border: 1px solid #44646c; color: var(--mint); border-radius: 8px;
}
.round-icon svg, .big-icon svg { width: 23px; height: 23px; }
.round time { font-size: .73rem; font-weight: 700; color: var(--amber); }
.round h3 { margin: .16rem 0; font-size: 1.13rem; }
.round p { color: var(--mist); font-size: .8rem; }
.round-number { position: absolute; right: .75rem; top: .65rem; color: #9bb6bd; font: 1.2rem/1.2 var(--serif); }
.field-note { display: flex; align-items: flex-start; gap: .8rem; margin-top: 1.7rem; padding: .1rem 0 .1rem 1rem; border-left: 2px solid #638e88; }
.field-note > svg { color: var(--mint); margin-top: .15rem; }
.field-note h2 { font: 700 .95rem/1.3 var(--sans); letter-spacing: normal; }
.field-note p { margin-top: .23rem; color: var(--mist); font-size: .86rem; }

.narrow { width: min(100%, 650px); margin: clamp(1.5rem, 5vw, 3.6rem) auto 0; }
.sheet { border: 1px solid var(--line); background: var(--stone); padding: clamp(1rem, 5vw, 2rem); border-radius: 12px; }
.sheet h1, .station h1 { margin: .5rem 0 .8rem; font-size: clamp(2rem, 8vw, 3.6rem); }
.sheet > p { margin: .55rem 0 1.15rem; color: var(--mist); }
.sheet > .big-icon { margin-bottom: .75rem; }
.kicker { color: var(--amber); font-size: .79rem; font-weight: 700; }
.entry .stack { margin-top: 1.45rem; }
.stack { display: grid; gap: .65rem; }
label { display: block; font-size: .87rem; font-weight: 700; }
input {
  display: block; color: var(--snow); width: 100%; min-height: 50px; border-radius: 7px; border: 1px solid #73919c;
  background: #101f2c; padding: .6rem .75rem; font-size: 1.05rem;
}
#pin { letter-spacing: .45em; }
.feedback { margin: 0; color: #ffc3a7; font-size: .86rem; }
.feedback:empty { display: none; }
.entry > .text-button { margin-top: .5rem; }

.theme-red { --team: var(--red); }
.theme-yellow { --team: var(--yellow); }
.team { display: inline-flex; align-items: center; gap: .45rem; color: var(--team, var(--mint)); font-size: .85rem; font-weight: 750; }
.team i { display: inline-block; flex: none; width: .62rem; height: .62rem; border-radius: 50%; background: currentColor; }
.station-head { padding: 0 .15rem 1.2rem; }
.station-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem .8rem; margin-bottom: 1rem; color: var(--mist); font-size: .81rem; }
.puzzle-tag { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: .15rem .45rem; color: var(--mist); font-size: .72rem; }
.puzzle { display: grid; gap: .85rem; border-top: 3px solid var(--team); }
.puzzle > .puzzle-intro { margin: 0; color: var(--snow); }
.puzzle .button { margin-top: .2rem; }
.cipher {
  display: grid; gap: .6rem; padding: .8rem .65rem; background: #142633;
  border: 1px solid var(--line); border-radius: 6px;
}
.glyphs, .legend { display: grid; list-style: none; margin: 0; padding: 0; gap: .3rem; }
.glyphs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.legend { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.glyphs li { display: grid; place-items: center; height: 43px; background: var(--raised); color: var(--mint); border: 1px solid #43636b; border-radius: 4px; }
.glyphs svg { width: 1.3rem; }
.legend-title { color: var(--mist); font-size: .73rem; font-weight: 700; }
.legend li { display: flex; justify-content: center; align-items: center; gap: .15rem; font-size: .81rem; color: var(--mist); }
.legend svg { width: 1.15rem; }
.legend b { color: var(--snow); }
.verse { background: #142633; border-left: 2px solid var(--team); padding: .7rem .8rem; font: 1rem/1.65 var(--serif); }
.order-board { min-width: 0; }
.order-help { margin: 0 0 .55rem; color: var(--mist); font-size: .83rem; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.tile {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .2rem .5rem;
  min-height: 46px; padding: .45rem .55rem; text-align: left; color: var(--snow); background: #223c48;
  border: 1px solid #557380; border-radius: 5px; font-size: .84rem; font-weight: 700;
}
.tile:hover { background: #2b4a55; }
.tile:disabled { opacity: .46; }
.tile small { color: var(--mist); font-weight: 600; }
.order-heading { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; font-size: .86rem; }
.picked { display: grid; gap: .35rem; padding: 0; margin: 0; list-style: none; }
.picked .tile { width: 100%; justify-content: flex-start; }
.picked .tile b { color: var(--team); min-width: 1.5rem; }
.remove { margin-left: auto; color: var(--mist); font-size: 1.1rem; }
.empty-order { border: 1px dashed #63808a; border-radius: 5px; padding: .6rem; color: var(--mist); font-size: .81rem; }
.clue {
  display: flex; align-items: flex-start; gap: .85rem; border-radius: 8px;
  padding: clamp(.95rem, 4vw, 1.65rem); background: #1a363c; border: 1px solid #68988b; border-top: 3px solid var(--team);
}
.clue h2 { margin: .35rem 0 .6rem; }
.clue .kicker { color: var(--mint); }
.after-clue { margin: .75rem .1rem 0; color: var(--mist); font-size: .88rem; }
.station-bottom { margin: .85rem .12rem 0; }

.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: clamp(1.65rem, 5vw, 3rem) 0 1.55rem; }
.admin-head h1 { margin: .25rem 0 .55rem; font-size: clamp(2.25rem, 7vw, 4.2rem); }
.admin-head p { color: var(--mist); }
.admin-section { margin-top: 1.5rem; }
.route { border: 1px solid var(--line); border-top: 2px solid var(--team); padding: .75rem .85rem .45rem; border-radius: 6px; background: var(--stone); }
.route-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.route-top > span { font-size: .83rem; color: var(--mist); }
.route ul { margin: .55rem 0 0; padding: 0; list-style: none; }
.route li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .35rem .6rem; padding-block: .55rem; border-top: 1px solid var(--line); font-size: .87rem; }
.route li small { display: block; color: var(--mist); font-size: .71rem; }
.waiting, .done { font-size: .75rem; color: var(--mist); }
.done { color: var(--mint); }
.kit { background: #162a37; border: 1px solid var(--line); border-radius: 7px; margin-top: 1.5rem; }
.kit summary { display: flex; align-items: center; gap: .65rem; padding: .8rem .85rem; cursor: pointer; color: var(--mint); font-weight: 750; list-style: none; }
.kit summary::-webkit-details-marker { display: none; }
.kit summary::after { content: "+"; font-weight: 500; font-size: 1.35rem; margin-left: auto; }
.kit[open] summary::after { content: "−"; }
.kit small { display: block; font-size: .77rem; font-weight: 500; color: var(--mist); }
#kit-content { padding: 0 .8rem .8rem; color: var(--mist); font-size: .87rem; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 213px), 1fr)); gap: .55rem; margin-top: .85rem; }
.kit-card { background: var(--stone); border: 1px solid var(--line); border-top: 2px solid var(--team); border-radius: 5px; padding: .65rem; }
.kit-card h3 { margin: .3rem 0 .6rem; color: var(--snow); font-size: .99rem; }
.kit-card img { display: block; background: #fff; width: 148px; height: auto; aspect-ratio: 1; max-width: 100%; }
.kit-card .pin-label { margin: .55rem 0; }
.pin-label code { font-size: .95rem; letter-spacing: .07em; color: var(--snow); font-weight: 750; }
.kit-card .button { width: 100%; }
.live::before { display: inline-block; content: ""; margin-right: .35rem; width: .53rem; height: .53rem; border-radius: 50%; background: var(--mint); }
.live.stale::before { background: var(--amber); }
.privacy { margin-bottom: .6rem; font-size: .81rem; color: var(--mist); }
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.event, .log-empty { padding: .75rem .3rem; border-bottom: 1px solid var(--line); }
.log-empty { color: var(--mist); font-size: .88rem; }
.event-line, .event-context, .event-detail { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .65rem; }
.event-line { justify-content: space-between; margin-bottom: .22rem; }
.event-line time { color: var(--mist); font-size: .75rem; }
.event-done { color: var(--mint); }
.event-context, .event-context .team { font-size: .79rem; }
.event-detail { color: var(--mist); margin-top: .25rem; font-size: .72rem; overflow-wrap: anywhere; }
.event-detail b { color: #ccdcde; font-weight: 550; }

@media (min-width: 600px) {
  .frame { width: min(calc(100% - 64px), var(--frame)); }
  .top-inner { min-height: 73px; }
  .round-grid, .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .round { padding: 1.15rem 2.45rem 1.15rem 1rem; }
  .round-icon { width: 48px; height: 48px; }
  .hero-copy { padding: 1.85rem 1.55rem 0; }
  .hero h1 { font-size: clamp(3.65rem, 9vw, 5.7rem); }
}
@media (min-width: 785px) {
  .hero { grid-template-columns: .88fr 1.12fr; gap: .2rem; margin-top: 2rem; }
  .hero-copy { padding: 2.1rem 0 2.2rem clamp(1.45rem, 4vw, 3.2rem); }
  .hero h1 { font-size: clamp(3.4rem, 7.65vw, 6.2rem); }
  .hero-art figcaption { right: 1rem; bottom: .85rem; }
  .rounds { margin-top: 2.5rem; }
}
