/* Front page (Guild Hall) extras: where you come down (the globe roll), the Kheron break-up stepper, the prospecting
   hillside, numbers, story, loop, status board, the visitor's mission board, FAQ.
   Loaded by index.html after site.css, fx.css and guild.css. Uses their tokens only. */

/* ---------- hero ---------- */
.hero-badges { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.trailer-note { margin: .625rem 0 0; font-size: .8125rem; color: #a4b0c8; }
.cta-center { justify-content: center; }

/* ---------- shared: read-out tiles ---------- */
.readout { margin: 0; display: grid; gap: .625rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.readout div { background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: .75rem .875rem; min-width: 0; }
.readout .wide { grid-column: 1 / -1; }
.readout dt { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.readout dd { margin: .25rem 0 0; font-size: 1.0625rem; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 420px) { .readout { grid-template-columns: 1fr; } }

/* ---------- where you come down ---------- */
.land { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); align-items: start; margin-top: 1.75rem; }
.land[hidden] { display: none; }
.globe { margin: 0; min-width: 0; }
.globe canvas { display: block; width: 100%; max-width: 22rem; height: auto; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, rgba(78,201,255,.08) 0 60%, transparent 72%); }
.globekey { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem .875rem; margin-top: 1rem; font-size: .8125rem; color: var(--muted); }
.globekey span::before { content: ""; display: inline-block; width: .625rem; height: .625rem; border-radius: .1875rem; margin-right: .375rem; vertical-align: -.0625rem; }
.globekey .g-trop::before { background: rgb(38,140,84); }
.globekey .g-sav::before { background: rgb(150,160,70); }
.globekey .g-dry::before { background: rgb(196,160,98); }
.globekey .g-temp::before { background: rgb(72,150,96); }
.globekey .g-bor::before { background: rgb(40,104,86); }
.globekey .g-tun::before { background: rgb(128,140,132); }
.globekey .g-ice::before { background: rgb(232,240,248); }
.landside { min-width: 0; }
.landside .readout dd { font-size: 1rem; }
#ld-spot { font-size: 1.375rem; color: var(--accent); }
#ld-prime { color: var(--accent-2); }
#ld-band b { font-weight: 800; }
#ld-band { font-weight: 400; color: #c3cde2; }
.band-trop { color: #5fd18e; } .band-sav { color: #c8d06a; } .band-dry, .band-desert { color: #e2bb78; } .band-temp { color: #7fd69c; }
.band-bor { color: #59b89a; } .band-tun { color: #b5c2ba; } .band-ice { color: #eef4fb; }
#landing .wrap > .note .pill { display: inline-block; margin-right: .5rem; vertical-align: .0625rem; }
.land-cta { margin-top: 1.125rem; }
.landside .note { margin: .875rem 0 0; min-height: 2.8em; }
.landrules { margin-top: 2.25rem; padding: 1.25rem 1.375rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); max-width: 52rem; }
.landrules h3 { margin: 0 0 .625rem; font-size: 1.0625rem; }
.landrules ul { margin: 0; padding-left: 1.25rem; color: #c3cde2; }
.landrules li { margin: .375rem 0; }
.landrules .note { margin: .875rem 0 0; }
@media (max-width: 860px) {
  .land { grid-template-columns: 1fr; }
  .globe canvas { max-width: 18rem; }
}

/* ---------- Kheron break-up ---------- */
.kh { display: grid; gap: 1.5rem 2.25rem; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; margin-top: 1.75rem; }
.kh[hidden] { display: none; }
.khview { min-width: 0; }
.khview canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: var(--radius); border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 50%, #0b1428, #050913 70%); }
.khscale { margin: .5rem 0 0; font-size: .8125rem; color: var(--muted); }
.khside { min-width: 0; }
.khsteps { display: flex; flex-wrap: wrap; gap: .5rem; }
.khtext { min-height: 13.5rem; margin-top: 1.125rem; padding: 1.125rem 1.25rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); }
.khtext h3 { margin: .25rem 0 .5rem; font-size: 1.25rem; }
.khtext p { margin: 0; color: #c3cde2; }
.khtext .khcount { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.khnav { margin-top: 1rem; }
.khnav .btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.khlist { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: .875rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); counter-reset: kh; }
.khlist li { counter-increment: kh; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.125rem; }
.khlist h3 { margin: 0 0 .375rem; font-size: 1.0625rem; }
.khlist h3::before { content: counter(kh) " "; color: var(--accent); }
.khlist p { margin: 0; color: var(--muted); font-size: .9375rem; }
.khlist.khlist-js { display: none; }   /* the stepper shows the same text, one stage at a time */
#kheron > .wrap > .note { margin-top: 1.5rem; }
@media (max-width: 860px) {
  .kh { grid-template-columns: 1fr; }
  .khtext { min-height: 0; }
}

/* ---------- prospecting: follow the float ---------- */
.pros { display: grid; gap: 1.5rem 2.25rem; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; margin-top: 1.75rem; }
.pros[hidden] { display: none; }
.prosfield { min-width: 0; }
.hill { margin: 0; font-size: .6875rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); text-align: center; }
.hill.up { margin-bottom: .375rem; }
.hill.down { margin-top: .375rem; }
.prosgrid { display: grid; gap: 3px; padding: 3px; border-radius: var(--radius); border: 1px solid var(--line); background: #0a1120; }
.prow { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; }
.pwrap { min-width: 0; }
.pcell {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; margin: 0; cursor: pointer; overflow: hidden;
  border: 1px solid rgba(0,0,0,.35); border-radius: .3125rem; font: inherit;
  background: linear-gradient(160deg, #3f5a34, #2f4428);
  transition: filter .15s, box-shadow .15s;
}
.pcell:hover { filter: brightness(1.18); }
.pcell:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; z-index: 1; }
.pcell.rust1 { background: linear-gradient(160deg, #5a5232, #45402a); }
.pcell.rust2 { background: linear-gradient(160deg, #7a4a2a, #5c3620); }
.pcell .peb { position: absolute; width: 18%; height: 18%; max-width: .5rem; max-height: .5rem; min-width: 4px; min-height: 4px; border-radius: 40% 55% 45% 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 1px rgba(0,0,0,.5); }
.pcell .peb.iron { background: #8e3d22; }
.pcell .peb.copper { background: #d1ad48; }
.pcell.barren { background: repeating-linear-gradient(135deg, #3a3f48 0 4px, #30343c 4px 8px); }
.pcell.low { background: linear-gradient(160deg, #6b5a3a, #4e4129); box-shadow: inset 0 0 0 2px rgba(255,200,90,.65); }
.pcell.hit { background: radial-gradient(circle, #ffd59e, #ff8a3d 55%, #a4471b); box-shadow: inset 0 0 0 2px #fff1d6, 0 0 .75rem rgba(255,138,61,.7); }
.pcell.marked { box-shadow: inset 0 0 0 2px var(--accent-2), 0 0 .625rem rgba(78,201,255,.6); animation: qp-pulse 1.6s ease-in-out infinite; }
.pcell.hit::after, .pcell.barren::after, .pcell.low::after { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: clamp(.625rem, 2.2vw, .9375rem); color: rgba(255,255,255,.82); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.pcell.hit::after { content: "\2605"; color: #3a1405; text-shadow: none; }
.pcell.low::after { content: "~"; }
.pcell.barren::after { content: "\00d7"; color: rgba(223,230,243,.5); }
@keyframes qp-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.prosside { min-width: 0; }
.proshelp { margin: 0 0 .875rem; color: #c3cde2; }
.proskey { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .375rem; font-size: .875rem; color: var(--muted); }
.proskey i { display: inline-block; width: .875rem; height: .875rem; margin-right: .5rem; vertical-align: -.125rem; border-radius: .1875rem; }
.proskey .k-peb { background: radial-gradient(circle at 35% 40%, #8e3d22 0 22%, transparent 24%), radial-gradient(circle at 70% 65%, #d1ad48 0 22%, transparent 24%), #2f4428; }
.proskey .k-rust { background: #7a4a2a; }
.proskey .k-low { background: #6b5a3a; box-shadow: inset 0 0 0 2px rgba(255,200,90,.65); }
.proskey .k-bar { background: repeating-linear-gradient(135deg, #3a3f48 0 3px, #30343c 3px 6px); }
.readout.prosread { margin-bottom: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prosmsg { margin: 0 0 1rem; min-height: 4.2em; color: #c3cde2; }
.prosclues { margin-top: 2rem; }
@media (max-width: 860px) { .pros { grid-template-columns: 1fr; } }
@media (max-width: 420px) {
  .prosgrid, .prow { gap: 2px; }
  .pcell { border-radius: .1875rem; }
}

/* ---------- numbers ---------- */
.numbers .stat b { font-size: clamp(1.875rem, 4.4vw, 2.875rem); }
.numbers .stat .num-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- story ---------- */
#story .split p { color: #c3cde2; }
.story-pic { margin: 0; }
.story-pic img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.story-pic figcaption { margin-top: .5rem; color: var(--muted); font-size: .875rem; }
@media (max-width: 860px) { #story .split { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- loop ---------- */
#loop .step .pill { display: inline-block; margin: 0 0 .5rem .5rem; vertical-align: middle; }

/* ---------- status board ---------- */
.sysfilter, .logtags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.sysfilter[hidden] { display: none; }
.chip { font: inherit; font-size: .875rem; font-weight: 700; color: var(--muted); background: rgba(14,21,38,.7); border: 1px solid var(--line); border-radius: 999px; padding: .375rem .875rem; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--text); border-color: #2f4270; }
.chip[aria-pressed="true"] { color: #1a0d02; background: var(--accent); border-color: var(--accent); }
.chip:focus-visible, .missionlist input:focus-visible, .linkish:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.chip small { font-weight: 400; opacity: .8; margin-left: .25rem; }
.syscount { margin: 0 0 1rem; color: var(--muted); font-size: .875rem; min-height: 1.4em; }
.sysboard { list-style: none; margin: 0; padding: 0; display: grid; gap: .875rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.sysboard li { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid #3a4766; border-radius: var(--radius); padding: 1rem 1.125rem; }
.sysboard li[hidden] { display: none; }
.sysboard li[data-state="built"] { border-left-color: #6ee7a0; }
.sysboard li[data-state="partial"] { border-left-color: var(--accent-2); }
.sysboard li[data-state="started"] { border-left-color: var(--accent); }
.sysboard h3 { margin: .375rem 0 .25rem; font-size: 1.0625rem; }
.sysboard p { margin: 0; color: var(--muted); font-size: .9375rem; }
.state { display: inline-block; font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: .125rem .5rem; border-radius: 999px; }
.state.built { background: rgba(110,231,160,.14); color: #6ee7a0; }
.state.partial { background: rgba(78,201,255,.12); color: var(--accent-2); }
.state.started { background: rgba(255,138,61,.15); color: var(--accent); }
.state.none { background: rgba(141,154,181,.14); color: var(--muted); }

/* ---------- timeline with six stages (its block is hidden for now in a LATER comment in index.html) ---------- */
.timeline.six { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) and (min-width: 861px) { .timeline.six li { font-size: .875rem; } }
@media (max-width: 860px) { .timeline.six { grid-template-columns: 1fr; } }

/* ---------- news ---------- */
.feed-more { margin-top: 1.5rem; }

/* ---------- visitor mission board ---------- */
.missionlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); counter-reset: mission; }
.missionlist li { display: flex; align-items: center; gap: .75rem; background: var(--panel); border: 1px solid var(--line); border-radius: .75rem; padding: .75rem 1rem; transition: border-color .2s, background .2s; }
.missionlist li.done { border-color: rgba(110,231,160,.45); background: rgba(110,231,160,.06); }
.missionlist input { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; margin: 0; accent-color: #6ee7a0; cursor: pointer; }
.missionlist label { flex: 1 1 auto; min-width: 0; color: var(--text); cursor: pointer; }
.missionlist li.done label { color: #a4b0c8; text-decoration: line-through; text-decoration-color: rgba(110,231,160,.7); }
.missionlist a { flex: 0 0 auto; font-size: .875rem; font-weight: 700; }
.missionfoot { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.25rem; }
.missionfoot[hidden] { display: none; }
.mbar { flex: 1 1 14rem; height: .5rem; border-radius: 999px; background: #121b30; border: 1px solid var(--line); overflow: hidden; }
.mbar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, var(--accent-2), #6ee7a0); transition: width .4s; }
.mcount { margin: 0; color: var(--muted); font-size: .9375rem; }
.missionfoot .btn { padding: .5rem 1rem; font-size: .875rem; }

/* ---------- team: three cards ---------- */
#team .card a { font-weight: 700; }

/* ---------- easter egg: Kheron hears its name ---------- */
.kheron-quake .banner-hero .art { animation: qp-quake .9s ease-in-out 1; }
.kheron-quake .banner-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at 70% 30%, rgba(255,120,60,.25), transparent 55%); animation: qp-glow 2.4s ease-out 1 forwards; }
@keyframes qp-quake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3px, 1px); }
  40% { transform: translate(3px, -1px); }
  60% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -1px); }
}
@keyframes qp-glow { from { opacity: 1; } to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .mbar i, .missionlist li, .chip, .pcell { transition: none; }
  .pcell.marked { animation: none; }
  .kheron-quake .banner-hero .art { animation: none; }
  .kheron-quake .banner-hero::before { animation: none; opacity: .6; }
}

/* ---------- call to the live system page ---------- */
.sys-cta { margin-top: 2rem; }
.sys-cta + .note { margin-top: .75rem; }
