/* Tether pairing-steps page — the app's three steps, static. */

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0 0 var(--s-4);
}

.onboarding {
  max-width: 58rem;
  margin: 0 auto;
  padding: var(--s-7) var(--gutter) var(--s-8);
  min-width: 0;
}

.onboarding__header { margin-bottom: var(--s-6); }

.onboarding h1 {
  font-size: var(--t-display);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 22ch;
  margin-bottom: var(--s-2);
}

.onboarding__sub {
  text-wrap: pretty;
  font-size: var(--t-15);
  color: var(--text-2);
  line-height: 1.55;
}

/* The command builder used to sit in a closed <details> below the steps. It now opens
   as an intro above them and each step carries its own field + Copy inline. */
.command-intro {
  margin: 0 0 var(--s-6);
  padding: clamp(var(--s-4), 3vw, var(--s-6));
  background:
    radial-gradient(520px 180px at 4% 0%, var(--tint-info), transparent 72%),
    var(--surface-1);
  border: 1px solid var(--info-line);
  border-radius: var(--r-md);
  box-shadow: var(--depth-3);
}
.command-intro__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.command-intro__title {
  margin: 0 0 var(--s-2);
  font-size: clamp(var(--t-18), 2.2vw, var(--t-24));
  line-height: 1.22;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__label {
  margin: 0 0 var(--s-2);
  color: var(--info);
  font-size: var(--t-11);
  font-weight: 650;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.command-builder__note {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--text-2);
  line-height: 1.6;
}

.command-panel {
  min-width: 0;
  padding: var(--s-4);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.command-panel--inline { margin-top: var(--s-4); }
.command-panel__title {
  margin: 0 0 var(--s-3);
  font-size: var(--t-15);
  font-weight: 600;
}

.command-panel .field { margin-bottom: var(--s-3); }
/* shared.css removes the outline on .field__input:focus and leaves only a faint halo. These
   fields are now in the main flow (they used to sit in a closed disclosure), so a keyboard
   user needs the same solid 3px ring every other control gets. */
.command-panel .field__input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.command-preview {
  display: block;
  min-height: 3.9rem;
  margin: var(--s-4) 0;
  padding: var(--s-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-1);
  font-size: var(--t-12);
  line-height: 1.55;
  user-select: all;
}

.command-copy { width: 100%; min-height: var(--tap); }

.command-status {
  min-height: 1.5em;
  margin-top: var(--s-3);
  color: var(--text-2);
  font-size: var(--t-12);
  line-height: 1.45;
}

.command-status--ok { color: var(--pass); }
.command-status--error { color: var(--fail); }

.draft-note {
  margin-top: var(--s-3);
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--info-line);
  border-radius: var(--r-sm);
  background: var(--tint-info);
  color: var(--text-2);
  font-size: var(--t-11);
  line-height: 1.5;
}

.command-clear-draft {
  width: 100%;
  min-height: var(--tap);
  margin-top: var(--s-2);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  color: var(--text-2);
}
.command-clear-draft:hover { color: var(--text-1); border-color: var(--fail-line); }

@supports not (background: color-mix(in srgb, white, black)) {
  .command-panel { background: var(--surface-2); }
}

/* ---- setup diagnostic ---------------------------------------------------------- */
.doctor {
  margin: 0 0 var(--s-7);
  padding: clamp(var(--s-4), 3vw, var(--s-6));
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  box-shadow: var(--depth-2);
}

.doctor__head { margin-bottom: var(--s-4); }
.doctor__head h2 {
  font-size: clamp(var(--t-20), 3vw, var(--t-28));
  margin: var(--s-1) 0 var(--s-2);
}
.doctor__note {
  max-width: 52rem;
  color: var(--text-2);
  line-height: 1.6;
  font-size: var(--t-14);
}

.doctor__runcmd { margin-bottom: var(--s-5); }

.install-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.install-tabs__label {
  font-size: var(--t-12);
  color: var(--text-2);
  margin-right: var(--s-1);
}
.install-tabs__btn {
  min-height: var(--tap);
  padding: 0 var(--s-3);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--text-2);
  font-size: var(--t-13);
}
.install-tabs__btn[aria-pressed="true"] {
  color: var(--text-1);
  border-color: var(--info-line);
  background: var(--tint-info);
}
/* --tint-info is an --info-based tint (dim in dark mode, --surface-1 in
   light), so the shared :focus-visible outline (also --info) reads at ~1:1
   on top of it. --on-info is the wrong swap here: it is tuned to contrast a
   *solid* --info fill (e.g. .btn--primary) and inverts to white in light
   mode, which is invisible on the light-mode --surface-1 tint. --text-1
   contrasts reliably against the tint in both schemes. */
.install-tabs__btn[aria-pressed="true"]:focus-visible {
  outline-color: var(--text-1);
}

.install-panel { margin-bottom: var(--s-2); }
.install-panel code.cmd {
  display: block;
  padding: var(--s-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--surface-3);
  color: var(--text-1);
  font-size: var(--t-13);
  overflow-x: auto;
  box-shadow: var(--sunk);
}

.doctor__runcmd-hint {
  font-size: var(--t-12);
  color: var(--text-3);
}

.doctor__input {
  margin-bottom: var(--s-4);
  padding: var(--s-4);
  border: 1.5px dashed var(--hairline-strong);
  border-radius: var(--r-md);
  background:
    radial-gradient(360px 120px at 50% 0%, var(--tint-info), transparent 80%),
    var(--surface-2);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
/* Keyboard and pointer affordance: the whole drop area lights up while the textarea or
   any of its buttons holds focus, so it is clear the paste box IS the drop target. */
.doctor__input:focus-within {
  border-style: solid;
  border-color: var(--info-line);
  box-shadow: 0 0 0 3px var(--info-line);
}
.doctor__input[data-state="dragging"] {
  transform: translateY(-2px);
  border-style: solid;
  border-color: var(--info);
  box-shadow: var(--e-2), 0 0 0 4px var(--info-line);
  background: color-mix(in srgb, var(--tint-info) 60%, var(--surface-2));
}
.doctor__input[data-state="done"] { border-color: var(--pass-line); }
.doctor__input[data-state="refused"] { border-color: var(--fail-line); }

.doctor__textarea {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
  font-family: var(--mono);
  font-size: var(--t-12);
  line-height: 1.5;
}

.doctor__input-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.doctor__input-row .btn { min-height: var(--tap); }

.doctor__input-hint {
  margin-top: var(--s-2);
  font-size: var(--t-12);
  color: var(--text-3);
}

.doctor__summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.doctor__summary-count { color: var(--text-2); font-size: var(--t-14); }

.doctor__progress { margin-bottom: var(--s-4); }
.doctor__progress progress {
  display: block;
  width: 100%;
  height: 6px;
  appearance: none; -webkit-appearance: none;
  border: 0; border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
  accent-color: var(--pass);
}
.doctor__progress progress::-webkit-progress-bar { background: var(--surface-3); border-radius: var(--r-pill); }
.doctor__progress progress::-webkit-progress-value {
  background: var(--pass); border-radius: var(--r-pill);
  transition: width var(--dur) var(--ease);
}
.doctor__progress progress::-moz-progress-bar { background: var(--pass); border-radius: var(--r-pill); }
.doctor__progress .num {
  display: block;
  margin-top: var(--s-1);
  font-size: var(--t-12);
  color: var(--text-2);
}

.doctor__checks {
  list-style: none;
  margin: 0 0 var(--s-4);
  padding: 0;
  display: grid;
  gap: var(--s-3);
}

.check {
  padding: var(--s-4);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
  box-shadow: var(--depth-1);
}
.check[data-status="pass"] { border-color: var(--pass-line); }
.check[data-status="fail"] { border-color: var(--fail-line); }
.check[data-status="unmeasured"] { border-color: var(--warn-line); }

.check__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.check__label {
  font-size: var(--t-15);
  font-weight: 560;
  margin: 0;
}
.check__detail, .check__reason {
  margin: 0 0 var(--s-2);
  color: var(--text-2);
  font-size: var(--t-13);
  line-height: 1.5;
}
.check__reason { color: var(--warn); }

.check__next {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--hairline-strong);
  display: grid;
  gap: var(--s-2);
}
.check__next-label {
  font-size: var(--t-11);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.check__cmd {
  display: block;
  padding: var(--s-2) var(--s-3);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--text-1);
  font-size: var(--t-12);
  line-height: 1.5;
  overflow-x: auto;
}
.check__copy { min-height: var(--tap); justify-self: start; }

.doctor__disclaimer {
  margin-top: var(--s-3);
  padding: var(--s-3);
  border: 1px solid var(--info-line);
  border-radius: var(--r-sm);
  background: var(--tint-info);
  color: var(--text-2);
  font-size: var(--t-12);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .doctor { padding: var(--s-4); }
}

.pairing-steps {
  list-style: none;
  margin: 0 0 var(--s-6);
  padding: 0;
  display: grid;
  gap: var(--s-4);
}

.pairing-step {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  padding: var(--s-5);
}

/* The body fills the card, so the inline command fields in steps 1 and 3 share one width. */
.pairing-step > div { flex: 1 1 0; min-width: 0; }

.pairing-step__num {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--t-13);
  font-weight: 600;
  color: var(--info);
  /* Opaque tint: --info text on the translucent tint is ~4.2:1 in light mode. */
  background: var(--tint-info);
  border: 1.5px solid rgba(127, 176, 227, 0.42);
}

.pairing-step h2 {
  font-size: var(--t-18);
  margin-bottom: var(--s-2);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* Real inline SVG per step (CSP-legal markup, same technique as
   web/landing/styles.css .feature__icon), replacing what was a bare ordinal
   with nothing else to look at. Sits beside the h2 text rather than
   replacing the numbered badge, so the step sequence a returning visitor
   scans for is untouched. */
.pairing-step__icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--info);
}
.pairing-step--current .pairing-step__icon { color: var(--pass); }
.pairing-step--upcoming .pairing-step__icon { color: var(--text-3); }

.pairing-step p {
  font-size: var(--t-15);
  color: var(--text-2);
  line-height: 1.55;
}

.pairing-step {
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  transform-style: preserve-3d;
}
/* Pointer tilt, same rotateX/rotateY-on-pointermove technique as
   web/landing/landing.js's attachTilt (see onboarding.js). :not(:hover) lift
   is skipped here for the same reason landing.js skips it on [data-tilt]:
   the live tilt IS the hover personality; stacking translateY would fight
   the inline transform this page's own script writes on the same property. */
@media (hover: hover) {
  .pairing-step:hover {
    border-color: var(--hairline-strong);
    box-shadow: var(--depth-3);
  }
}
.pairing-step--current {
  border-color: rgba(127, 176, 227, 0.55);
}
.pairing-step--current .pairing-step__num {
  color: var(--text-1);
  background: rgba(127, 176, 227, 0.28);
  border-color: rgba(127, 176, 227, 0.7);
}
/* Upcoming steps are instructions the visitor still has to follow, not disabled
   controls: they keep full-strength text. "Current" is carried by the border, the
   filled badge and the raised shadow instead of by dimming everything else. */
.pairing-step--upcoming {
  opacity: 1;
}
.pairing-step--upcoming .pairing-step__num {
  color: var(--text-2);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.16);
}
.pairing-step--upcoming h2 {
  color: var(--text-1);
  font-weight: 500;
}
@media (hover: hover) {
  .pairing-step--current:hover {
    border-color: rgba(127, 176, 227, 0.8);
  }
}

/* Timeline spine: the three steps are one sequence across two Macs, so the
   badges are joined. The segment leaving the current step is solid (the next
   move); segments between upcoming steps are dashed (not reached). Static:
   it encodes the aria-current state already in the markup. */
.pairing-steps { gap: var(--s-5); }
.pairing-step { position: relative; }
.pairing-step__num { position: relative; z-index: 1; box-shadow: var(--depth-1); }
.pairing-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--s-5) + 15px);
  top: calc(var(--s-5) + 34px);
  bottom: calc(-2 * var(--s-5));
  width: 2px;
  border-radius: var(--r-pill);
  background: linear-gradient(to bottom, var(--info-line), var(--hairline-strong));
}
.pairing-step--upcoming:not(:last-child)::after {
  background: repeating-linear-gradient(to bottom, var(--hairline-strong) 0 4px, transparent 4px 8px);
}
.pairing-step--current { box-shadow: var(--depth-3); }
.pairing-step--upcoming .pairing-step__num { border-color: var(--hairline-strong); }

@media (max-width: 600px) {
  .pairing-step:not(:last-child)::after {
    left: calc(var(--s-4) + 15px);
    top: calc(var(--s-4) + 34px);
    bottom: calc(-1 * var(--s-5) - var(--s-4));
  }
}

@media (max-width: 600px) {
  .onboarding { padding: var(--s-6) var(--gutter) var(--s-7); }
  .pairing-step { padding: var(--s-4); }
}

@media (max-width: 760px) {
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .pairing-step--current:hover { border-color: rgba(127, 176, 227, 0.55); }
}
