/* ============================================================
   START — the funnel page.
   Rides the gv2 token system; adds only what a form surface needs.
   ============================================================ */

.st-main { padding-top: clamp(96px, 12vh, 140px); padding-bottom: clamp(52px, 7vh, 82px); }

.st-shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

/* One spine: the shell resolves to the site edge; the funnel keeps its
   working measure with a cap rather than a second centred column. */
.st-head, .st-rail, .st-stage, .st-honesty { max-width: 880px; }

.st-head { max-width: 44ch; margin-bottom: 44px; }

.st-title {
  margin: 8px 0 18px;
  color: var(--bone-strong);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.02;
  text-wrap: balance;
}

.st-lede {
  margin: 0;
  color: var(--bone);
  font-family: var(--body);
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- progress rail ---------- */
.st-rail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0 0 26px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--rule);
}

.st-rail-step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 220ms ease;
}

.st-rail-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--rule-strong);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.st-rail-step.is-on { color: var(--bone); }
.st-rail-step.is-on .st-rail-dot { background: var(--brass); border-color: var(--brass); }
.st-rail-step.is-current { color: var(--bone-strong); }
.st-rail-step.is-current .st-rail-dot {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-line);
}

/* ---------- panels ---------- */
.st-panel[hidden] { display: none; }

.st-panel.is-active { animation: st-in 380ms cubic-bezier(0.2, 0, 0.15, 1) both; }
@keyframes st-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .st-panel.is-active { animation: none; } }

.st-card { padding: clamp(24px, 3.4vw, 40px); }

.st-h2 {
  margin: 10px 0 12px;
  color: var(--bone-strong);
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.7vw, 33px);
  line-height: 1.12;
}

.st-body {
  margin: 0 0 22px;
  color: var(--bone);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.62;
  max-width: 62ch;
}
.st-body-sm { font-size: 15px; margin-bottom: 0; }
.st-body em, .st-note em { font-family: var(--italic-accent); font-style: italic; color: var(--brass-lift); }

.st-note {
  margin: 16px 0 0;
  color: var(--bone-mute);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.6;
  max-width: 66ch;
}

.st-step-label {
  margin: 26px 0 9px;
  color: var(--brass-lift);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- choices ---------- */
.st-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}

.st-choice {
  display: block;
  width: 100%;
  padding: 17px 18px;
  text-align: left;
  background: var(--glass-bg);
  border: 1px solid var(--glass-edge);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.st-choice:hover { background: var(--glass-bg-hover); border-color: var(--glass-edge-lit); }
.st-choice:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.st-choice.is-on {
  border-color: var(--cyan);
  background: var(--glass-bg-hover);
  box-shadow: inset 0 0 0 1px var(--cyan);
}

.st-choice-name {
  display: block;
  margin-bottom: 4px;
  color: var(--bone-strong);
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
}
.st-choice-sub {
  display: block;
  color: var(--bone-mute);
  font-family: var(--sans);
  font-size: 13px;
}

/* ---------- code ---------- */
.st-code {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-edge);
  border-radius: 3px;
  overflow-x: auto;
}
.st-code code {
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--bone-strong);
  white-space: pre;
}
.st-code-block { display: block; padding: 0; }
.st-code-block pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.st-code-block pre code { font-size: 13.5px; line-height: 1.65; display: block; }
.st-code-block .st-copy { position: absolute; top: 10px; right: 12px; }

.st-copy {
  flex-shrink: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--cyan);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color 160ms ease;
}
.st-copy:hover { color: var(--bone-strong); }

/* ---------- actions ---------- */
.st-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.st-actions-end { margin-top: 30px; }

/* ---------- the minted receipt ---------- */
.st-receipt { margin: 6px 0 26px; }
.st-hash {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}

/* The record mints row by row rather than arriving as a block:
   head, workspace, policy, decision, seal time, digest. Reuses st-in. */
.st-panel.is-active .st-receipt > * { animation: st-in 380ms cubic-bezier(0.2, 0, 0.15, 1) both; }
.st-panel.is-active .st-receipt > :nth-child(1) { animation-delay: 80ms; }
.st-panel.is-active .st-receipt > :nth-child(2) { animation-delay: 180ms; }
.st-panel.is-active .st-receipt > :nth-child(3) { animation-delay: 280ms; }
.st-panel.is-active .st-receipt > :nth-child(4) { animation-delay: 380ms; }
.st-panel.is-active .st-receipt > :nth-child(5) { animation-delay: 480ms; }
.st-panel.is-active .st-receipt > :nth-child(6) { animation-delay: 580ms; }
@media (prefers-reduced-motion: reduce) {
  .st-panel.is-active .st-receipt > * { animation: none; }
}

.st-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

/* ---------- honesty note ---------- */
.st-honesty {
  margin-top: 34px;
  padding: 18px 20px;
  border: 1px dashed var(--rule-strong);
  border-radius: 3px;
}
.st-honesty p {
  margin: 0;
  color: var(--bone-mute);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.65;
}
.st-honesty strong { color: var(--bone); font-weight: 500; }

@media (max-width: 640px) {
  .st-rail { gap: 8px 16px; }
  .st-rail-label { font-size: 10.5px; }
  .st-choices { grid-template-columns: 1fr; }

  /* A code sample that requires a hidden horizontal swipe reads like broken
     copy on a phone. Keep the exact snippet, but let it resolve into the
     available measure. */
  .st-code-block pre code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* The shared specimen stacks its three columns on mobile. Status is a pill,
     not a full-width field, so keep it at its intrinsic size. */
  .st-receipt .gv2-receipt-tag {
    justify-self: start;
    width: auto;
  }
}

/* Brass sentence-ending period on the page title. */
.gv2-full-stop { color: var(--brass); }

/* Small screens: this page has no drawer; keep the four links inline. */
@media (max-width: 980px) {
  .glacis-nav .glacis-nav-links { display: flex !important; gap: 14px; }
  .glacis-nav .glacis-nav-links .glacis-nav-link { font-size: 12px; }
}

/* Four inline links plus the theme control cannot fit on a phone. This page has
   no drawer, so collapse to the one useful action instead of pushing 103px of
   navigation beyond the viewport. */
@media (max-width: 720px) {
  .glacis-nav .glacis-nav-links,
  .glacis-nav .gv2-theme { display: none !important; }
  .glacis-nav > .glacis-nav-inner > .glacis-nav-cta {
    display: inline-flex;
    min-height: 42px;
    margin-left: auto;
    padding-inline: 16px;
  }
}
