/* ============================================================
   BADGE SHERPA · CORE
   Structure and shared primitives. Consumes theme tokens,
   defines no raw colors. Module-specific CSS lives with each
   module (modules/sherpa-nav.css, modules/sherpa-trail.css…).
   ============================================================ */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:var(--font-body);
  background:var(--bg);
  color:var(--ink);
  min-height:100vh;
  padding:calc(64px + 34px) 0 calc(96px + 30px);
  transition:background .2s ease, color .2s ease;
}
h1,h2,h3,h4,.head{font-family:var(--font-head);font-weight:800;letter-spacing:-.01em}
button{font-family:inherit;cursor:pointer;color:inherit}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}

/* layout helpers */
.page{width:min(1240px,calc(100% - 28px));margin:0 auto}
.stage-head{text-align:center;margin:26px 0}
.stage-head h1{font-size:clamp(1.6rem,3.2vw,2.3rem)}
.stage-head p{color:var(--ink-soft);margin-top:8px}

/* primitives */
.card{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-s);
  border:1.5px solid transparent}
.pick{transition:transform .12s ease, border-color .12s ease, box-shadow .12s ease}
.pick:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.pick.sel{border-color:var(--green);box-shadow:0 0 0 3px rgba(34,211,102,.18), var(--shadow)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;
  border:0;border-radius:999px;font-weight:800;font-family:var(--font-head);
  padding:16px 34px;font-size:1.02rem;transition:transform .1s ease, background .12s ease}
.btn:active{transform:scale(.98)}
.btn-go{background:var(--green);color:#001D40}
.btn-go:hover{background:var(--green-dark);color:#fff}
.btn-go:disabled{background:var(--surface-2);color:var(--ink-soft);cursor:not-allowed}
.btn-ghost{background:none;border:2px solid var(--line);color:var(--ink);
  font-size:.9rem;padding:12px 24px}
.btn-ghost:hover{border-color:var(--ink)}

.chip{display:inline-block;background:var(--surface-2);color:var(--ink-soft);
  border-radius:999px;padding:4px 12px;font-size:.72rem;font-weight:700;
  text-transform:uppercase;letter-spacing:.06em}
.chip.live{background:rgba(34,211,102,.16);color:var(--green-dark)}

.field label{display:block;font-size:.78rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.05em;color:var(--ink-soft);margin-bottom:7px}
.field input,.field select{width:100%;border:1.5px solid var(--line);
  border-radius:var(--radius-s);padding:15px 16px;font-family:var(--font-body);
  font-size:1rem;background:var(--surface);color:var(--ink)}
.field input:focus,.field select:focus{border-color:var(--green);outline:none}

/* bold direction: display scale up, tracking down */
:root[data-theme="bold"] .stage-head h1{
  font-size:clamp(2rem,4.2vw,2.9rem);letter-spacing:-.03em;font-weight:700}
:root[data-theme="bold"] .stage-head{text-align:left;margin:34px 0 20px}
:root[data-theme="bold"] .stage-head p{margin-top:8px}

/* ============================================================
   SMOOTH NAVIGATION
   1) Chrome skeletons: the nav and trail are JS-mounted, which
      painted a bar-less page for a beat. These :empty pseudo
      placeholders draw the pills instantly in pure CSS; the
      moment the modules mount, :empty stops matching and the
      real bars take over in the same spot. Zero layout shift.
   2) Cross-document view transitions: a ~0.2s native crossfade
      between pages. Pure CSS, no JS, no weight — browsers
      without support simply keep the instant cut.
   ============================================================ */

@view-transition{navigation:auto}
::view-transition-old(root){animation-duration:.18s}
::view-transition-new(root){animation-duration:.18s}
@media (prefers-reduced-motion: reduce){
  @view-transition{navigation:none}
}
