/* ==========================================================================
   PULSE V2 — download.css
   Page layer for /download. Requires tokens.css + base.css first.
   The page's job: make a small unsigned installer feel trustworthy —
   version block as a build manifest, SHA-256 as a first-class instrument.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  padding-top: clamp(3.5rem, 7vw, 6.5rem);
}

.hero-copy > h1 {
  margin-top: var(--sp-4);
  max-width: 14ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.hero-meta {
  margin-top: var(--sp-5);
  font: 400 var(--fs-body-sm) / 1.6 var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

.hero-copy > .trust-strip {
  margin-top: var(--sp-3);
}

/* Hero art: build manifest card with its live trace */
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Build manifest card (the big version block + subtle live waveform)
   -------------------------------------------------------------------------- */
.build-card {
  width: 100%;
  max-width: 26rem;
  display: grid;
  gap: var(--sp-4);
  background: linear-gradient(180deg, var(--panel-tint-1), var(--panel-tint-2));
  box-shadow: var(--shadow-slab);
}

.build-version {
  font: 700 clamp(2.75rem, 5vw, 3.75rem) / 1 var(--font-mono);
  letter-spacing: -0.03em;
  color: var(--accent-bright);
}

/* The packet stream descending into the install baseline — the build
   arriving (motifs.js · packets) */
.build-trace {
  margin-top: calc(-1 * var(--sp-2));
  pointer-events: none;
}
.build-trace .motif-svg {
  width: 100%;
  height: auto;
}
.build-card > .trace-caption { margin-top: calc(-1 * var(--sp-3)); }

.build-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line-1);
  padding-top: var(--sp-5);
}

.build-row dd {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-body-sm);
  color: var(--text-1);
  overflow-wrap: anywhere;
}

.build-verify-link {
  justify-self: start;
  font: 700 var(--fs-micro) / 1.5 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-decoration-color: var(--line-2);
}
.build-verify-link:hover { color: var(--text-1); }

/* --------------------------------------------------------------------------
   01 · Verify band — full-bleed instrument
   -------------------------------------------------------------------------- */
.verify-band {
  background: var(--surface-1);
  border-block: 1px solid var(--line-1);
  scroll-margin-top: 5rem;
}

/* SHA-256 instrument panel */
.sha-panel {
  background: var(--surface-2);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  display: grid;
  gap: var(--sp-5);
  transition: border-color var(--dur-2) ease;
}
.sha-panel:hover { border-color: var(--line-2); }

/* Break the intrinsic min-content chain: the unwrappable PowerShell
   one-liner must scroll inside its <pre>, never widen the panel. */
.sha-panel > *,
.cmd-wrap > * { min-width: 0; }

.sha-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.sha-shield {
  flex: none;
  color: var(--text-3);
}
.sha-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* The hash readout — placeholder text-3, live hash text-1.
   background-color (not the shorthand) so the .texture-scan film survives. */
.sha-hash {
  display: block;
  background-color: var(--canvas);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: 0.9375rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--text-3);
  word-break: break-all;
}
.sha-hash.sha-live { color: var(--text-1); }

.sha-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

/* Copy buttons: disabled until JS confirms clipboard support / hash load */
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-ghost[disabled]:hover {
  border-color: var(--line-2);
  background: transparent;
}
.btn.is-copied {
  border-color: var(--accent-line);
  color: var(--accent-bright);
}

/* PowerShell one-liner */
.cmd-wrap {
  display: grid;
  gap: var(--sp-3);
  border-top: 1px solid var(--line-1);
  padding-top: var(--sp-5);
}
.cmd-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}
.cmd-block {
  flex: 1 1 24rem;
  min-width: 0;
  margin: 0;
  background: var(--canvas);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  overflow-x: auto;
}
.cmd-block::before {
  content: "PS> ";
  font: 700 0.875rem / 1.7 var(--font-mono);
  color: var(--text-3);
  user-select: none;
}
.cmd-block code {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
}

.sha-noscript {
  font-size: var(--fs-body-sm);
  color: var(--text-2);
}

/* Verify flow — a visual stepper: three cards joined by flow chevrons.
   Download → Verify SHA-256 → Install; the last chip lands the "match". */
.verify-steps {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-7);
  display: grid;
  gap: var(--sp-6);
  counter-reset: vstep;
}
@media (min-width: 56em) {
  .verify-steps { grid-template-columns: repeat(3, 1fr); }
}
.vstep {
  position: relative;
  background: var(--surface-2);
  padding: var(--sp-5);
}
.vstep:hover { border-color: var(--line-2); }

/* Flow connector — a chevron between cards (pure CSS, no text content) */
.vstep:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid var(--accent-line);
  border-right: 1.5px solid var(--accent-line);
  /* mobile: vertical flow, chevron points down, centered below the card */
  left: 50%;
  bottom: calc(-1 * var(--sp-6) / 2 - 5px);
  transform: translateX(-50%) rotate(135deg);
}
@media (min-width: 56em) {
  .vstep:not(:last-child)::after {
    /* desktop: horizontal flow, chevron points right, centered in the gap */
    left: auto;
    right: calc(-1 * var(--sp-6) / 2 - 5px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
  }
}

.vstep-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--line-1);
}
.vstep-num {
  font-weight: 700;
  font-size: var(--fs-body-sm);
  color: var(--text-4); /* decorative numeral only */
}
.vstep-title {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-2);
}
.vstep-body {
  color: var(--text-3);
  font-size: var(--fs-body-sm);
}

/* --------------------------------------------------------------------------
   02 · Why Windows may warn you
   -------------------------------------------------------------------------- */
.warn-head { margin-bottom: 0; }
.warn-body {
  margin-top: var(--sp-4);
  color: var(--text-2);
  max-width: 58ch;
}

.fact-rows {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line-1);
}
.fact-row {
  display: grid;
  grid-template-columns: minmax(8.5rem, 38%) 1fr;
  align-items: baseline;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line-1);
}
.fact-val {
  font-family: var(--font-sans);
  font-size: var(--fs-body-sm);
  color: var(--text-1);
  text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width: 35.99em) {
  .fact-row { grid-template-columns: 1fr; gap: var(--sp-1); }
  .fact-val { text-align: left; }
}

/* --------------------------------------------------------------------------
   02b · SmartScreen walkthrough — stylized abstract dialog diagrams
   (CSS/SVG in the design language, never a fake OS screenshot).
   Decorative SVGs are aria-hidden; the information lives in the step text.
   -------------------------------------------------------------------------- */
.ss-walk {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line-1);
}
.ss-walk-label { display: block; }

.ss-steps {
  list-style: none;
  padding: 0;
  margin-top: var(--sp-5);
  display: grid;
  gap: var(--sp-6);
}
@media (min-width: 56em) {
  .ss-steps { grid-template-columns: repeat(3, 1fr); }
}

.ss-step {
  position: relative;
  background: var(--surface-2);
  padding: var(--sp-5);
}
.ss-step:hover { border-color: var(--line-2); }

/* Flow chevron between steps — same connector language as .vstep */
.ss-step:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-top: 1.5px solid var(--accent-line);
  border-right: 1.5px solid var(--accent-line);
  left: 50%;
  bottom: calc(-1 * var(--sp-6) / 2 - 5px);
  transform: translateX(-50%) rotate(135deg);
}
@media (min-width: 56em) {
  .ss-step:not(:last-child)::after {
    left: auto;
    right: calc(-1 * var(--sp-6) / 2 - 5px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%) rotate(45deg);
  }
}

/* The abstract dialog illustration */
.ss-art {
  display: flex;
  justify-content: center;
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-1);
}
.ss-art-svg {
  width: 100%;
  max-width: 14rem;
  height: auto;
}
.ssd-frame {
  fill: var(--surface-1);
  stroke: var(--line-2);
  stroke-width: 1.5;
}
.ssd-glyph {
  fill: var(--accent-tint-2);
  stroke: var(--accent-line);
  stroke-width: 1.5;
}
.ssd-glyph-mark {
  stroke: var(--accent-bright);
  stroke-width: 2;
  stroke-linecap: round;
}
.ssd-bar { fill: var(--line-2); }
.ssd-bar--strong { fill: var(--line-3); }
.ssd-link { fill: var(--line-3); }
.ssd-link--hot { fill: var(--accent); }
.ssd-btn {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.5;
}
.ssd-btn--hot {
  fill: var(--accent);
  stroke: none;
}
.ssd-ring {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.5;
}

.ss-step-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.ss-step-num {
  font-weight: 700;
  font-size: var(--fs-body-sm);
  color: var(--text-4); /* decorative numeral only */
}
.ss-step-title {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-2);
}
.ss-step-body {
  color: var(--text-3);
  font-size: var(--fs-body-sm);
}

.ss-caption {
  margin-top: var(--sp-4);
  font: 400 var(--fs-micro) / 1.5 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.ss-note {
  margin-top: var(--sp-2);
  color: var(--text-2);
  font-size: var(--fs-body-sm);
}
.ss-note a { color: var(--text-1); }

/* --------------------------------------------------------------------------
   03 · System requirements — hairline instrument grid
   -------------------------------------------------------------------------- */
.req-grid {
  display: grid;
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 36em) {
  .req-grid { grid-template-columns: repeat(2, 1fr); }
}
.req-cell {
  background: var(--surface-1);
  padding: var(--sp-6);
  transition: background-color var(--dur-2) ease;
}
.req-cell:hover { background: var(--surface-2); }
.req-label { margin-bottom: var(--sp-3); }
.req-value {
  color: var(--text-1);
  font-size: var(--fs-body);
}

/* --------------------------------------------------------------------------
   04 · Install in three steps — vertical rail
   -------------------------------------------------------------------------- */
.install-steps {
  list-style: none;
  padding: 0;
  display: grid;
}
.istep {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-5);
  padding-bottom: var(--sp-7);
}
.istep:last-child { padding-bottom: 0; }

/* connector line between step dots */
.istep:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.0625rem; /* center of the 2.125rem dot */
  top: 2.5rem;
  bottom: var(--sp-3);
  width: 1px;
  background: var(--line-1);
}

.istep-dot {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--surface-1);
  font-weight: 700;
  font-size: var(--fs-body-sm);
  color: var(--accent-bright);
}
.istep-title {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-2);
}
.istep-body {
  color: var(--text-3);
  font-size: var(--fs-body-sm);
  max-width: 52ch;
}

/* --------------------------------------------------------------------------
   More links + page note
   -------------------------------------------------------------------------- */
.more-title { font-size: var(--fs-h3); }

.more-grid {
  display: grid;
  gap: var(--sp-5);
}
@media (min-width: 56em) {
  .more-grid { grid-template-columns: repeat(3, 1fr); }
}
.more-card {
  display: block;
  text-decoration: none;
}
.more-card .card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.more-card .card-title::after {
  content: "→";
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-3);
  transition: color var(--dur-1) ease, transform var(--dur-2) var(--ease-glide);
}
.more-card:hover .card-title::after {
  color: var(--text-1);
  transform: translateX(3px);
}

.page-note {
  margin-top: var(--sp-7);
  font: 400 var(--fs-body-sm) / 1.8 var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--text-3);
  max-width: none;
}
.page-note a { color: var(--text-3); }
.page-note a:hover { color: var(--text-1); }
