/* ------------------------------------------------------------------
   BlackVertex — Fit check.
   One locked viewport, never scrolls. Big and confident: the question
   and the indexed answer ledger command the screen. Progress lives on
   a vertical side slider with a moving knob, not a line on top. Warm
   paper, Geist sentence-case, mono only for small labels, no scoring
   on screen.
   ------------------------------------------------------------------ */

[hidden] { display: none !important; }

/* one screen, no scroll */
.case-shell {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.fit-return {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(1180px, calc(100% - (var(--site-gutter, 24px) * 2)));
  margin: 0 auto;
  padding: clamp(16px, 2.8vh, 30px) 0;
}

.fit-return__button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  padding: 0 16px;
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 260ms var(--ease-out), color 260ms var(--ease-out), transform 260ms var(--ease-out);
}

.fit-return__button--landing {
  justify-self: start;
}

.fit-return__button--library {
  justify-self: end;
}

.fit-return__button:hover,
.fit-return__button:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

.fit-return__brand {
  justify-self: center;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.fit-return__brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.fit-return__brand span {
  transform: translateY(1px);
}

.fit-return__brand:hover,
.fit-return__brand:focus-visible {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.case-shell > main {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
}

.fit {
  width: min(1180px, calc(100% - (var(--site-gutter, 24px) * 2)));
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: clamp(28px, 5vw, 92px);
}

/* ---- side progress slider ---- */
.fit__rail {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vh, 30px);
  padding: clamp(10px, 3vh, 40px) 0;
}
.fit__rail-num {
  writing-mode: vertical-rl;
  font-family: "Geist Mono", monospace;
  font-size: clamp(12px, 1.5vh, 15px);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.fit__rail-cap {
  writing-mode: vertical-rl;
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.fit__rail-trackwrap {
  position: relative;
  width: 2px;
  height: clamp(180px, 44vh, 440px);
}
.fit__rail-track {
  position: absolute;
  top: 0;
  left: 50%;
  width: clamp(180px, 44vh, 440px);
  height: 2px;
  background: var(--line);
  transform-origin: left center;
  transform: rotate(90deg);
}
.fit__rail-fill {
  display: block;
  width: 20%;
  height: 100%;
  background: var(--ink);
  position: relative;
  transition: width 540ms var(--ease-out);
}
.fit__rail-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--paper);
}

/* ---- body ---- */
.fit__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(14px, 3.5vh, 48px) 0;
}

.fit__back {
  align-self: flex-start;
  margin-bottom: clamp(14px, 2.2vh, 28px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 240ms var(--ease-out), border-color 240ms var(--ease-out), opacity 240ms var(--ease-out);
}
.fit__back:hover:not(:disabled),
.fit__back:focus-visible:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.fit__back:disabled { display: none; }

/* ---- question ---- */
.fit__form { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fit__step { display: none; min-width: 0; margin: 0; padding: 0; border: 0; }
.fit__step.is-active { display: block; }
.fit__legend { display: block; width: 100%; padding: 0; }
.fit__step-label {
  display: block;
  margin-bottom: clamp(12px, 1.8vh, 22px);
  font-family: "Geist Mono", monospace;
  font-size: clamp(11px, 1.3vh, 13px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.fit__question {
  display: block;
  max-width: 16ch;
  font-size: clamp(36px, 7.8vh, 100px);
  font-weight: 800;
  letter-spacing: -0.042em;
  line-height: 0.96;
  color: var(--ink);
  text-wrap: balance;
}

/* ---- answers: a big indexed ledger ---- */
.fit__options {
  margin-top: clamp(20px, 4vh, 50px);
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  counter-reset: fit-opt;
}
.fit__options button {
  counter-increment: fit-opt;
  display: grid;
  grid-template-columns: clamp(2.4ch, 4vw, 3.4ch) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  width: 100%;
  padding: clamp(12px, 2.3vh, 30px) clamp(2px, 0.6vw, 10px);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: "Geist", Arial, sans-serif;
  font-size: clamp(18px, 3vh, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  transition: transform 340ms var(--ease-out), border-color 260ms var(--ease-out);
}
.fit__options button::before {
  content: counter(fit-opt, lower-alpha);
  font-family: "Geist Mono", monospace;
  font-size: clamp(11px, 1.5vh, 15px);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  transition: color 260ms var(--ease-out);
}
.fit__options button::after {
  content: "\2192";
  justify-self: end;
  font-family: "Geist Mono", monospace;
  font-size: clamp(15px, 2vh, 22px);
  color: var(--ink);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .fit__options button:hover { transform: translateX(10px); border-color: var(--line-strong); }
  .fit__options button:hover::before { color: var(--ink); }
  .fit__options button:hover::after { opacity: 1; transform: none; }
}
.fit__options button:focus-visible { transform: translateX(10px); border-color: var(--line-strong); outline: none; }
.fit__options button:focus-visible::before { color: var(--ink); }
.fit__options button:focus-visible::after { opacity: 1; transform: none; }

.fit__hint {
  margin: auto 0 0;
  padding-top: clamp(20px, 4vh, 44px);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ---- result ---- */
.fit__kicker {
  margin: 0 0 clamp(14px, 2vh, 22px);
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.fit__result-title {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(34px, 6.6vh, 84px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.96;
  color: var(--ink);
  text-wrap: balance;
}
.fit__result-copy {
  margin: clamp(16px, 2.4vh, 30px) 0 0;
  max-width: 52ch;
  font-size: clamp(16px, 2.1vh, 21px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---- booking ---- */
.fit__booking { margin-top: clamp(20px, 3.2vh, 42px); max-width: 640px; }
.fit__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.4vh, 14px);
}
.fit__fields-notes { grid-column: 1 / -1; }
.fit__booking label { display: grid; gap: clamp(6px, 1vh, 10px); }
.fit__booking label > span {
  font-family: "Geist Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.fit__booking label em { font-style: normal; opacity: 0.7; }
.fit__booking input,
.fit__booking textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
  font-family: "Geist", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
}
.fit__booking input { height: clamp(46px, 6.2vh, 54px); padding: 0 16px; }
.fit__booking textarea { min-height: clamp(60px, 11vh, 104px); padding: 12px 16px; line-height: 1.45; resize: vertical; }
.fit__booking input:focus,
.fit__booking textarea:focus { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---- actions / buttons ---- */
.fit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vh, 38px);
}
.fit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(46px, 6.2vh, 54px);
  min-width: 210px;
  padding: 0 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  transition: transform 320ms var(--ease-out), background-color 320ms var(--ease-out), color 320ms var(--ease-out);
}
.fit-button:hover,
.fit-button:focus-visible { transform: translateY(-2px); }
.fit-button--primary { background: var(--ink); color: var(--paper); }
.fit-button--secondary:hover,
.fit-button--secondary:focus-visible { background: var(--ink); color: var(--paper); }

/* ---- motion ---- */
.fit__options button { animation: fit-rise 460ms var(--ease-out) both; }
.fit__options button:nth-child(2) { animation-delay: 50ms; }
.fit__options button:nth-child(3) { animation-delay: 100ms; }
.fit__options button:nth-child(4) { animation-delay: 150ms; }
.fit__options button:nth-child(5) { animation-delay: 200ms; }
.fit__options button:nth-child(6) { animation-delay: 250ms; }
.fit__kicker { animation: fit-fade 560ms var(--ease-out) both; }
.fit__result-title { animation: fit-rise 600ms var(--ease-out) 60ms both; }
.fit__result-copy { animation: fit-rise 600ms var(--ease-out) 140ms both; }
.fit__result .fit__booking,
.fit__result > .fit__actions { animation: fit-rise 600ms var(--ease-out) 220ms both; }

@keyframes fit-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fit-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- responsive: stack, slider becomes horizontal ---- */
@media (max-width: 860px) {
  .fit-return {
    padding-top: 14px;
  }

  .fit-return__button {
    min-width: 0;
    padding-inline: 12px;
  }

  .fit-return__brand {
    gap: 9px;
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .fit-return__brand img {
    width: 26px;
    height: 26px;
  }

  .fit { flex-direction: column; align-items: stretch; gap: clamp(18px, 3vh, 28px); }
  .fit__rail {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
  }
  .fit__rail-num { writing-mode: horizontal-tb; letter-spacing: 0.16em; }
  .fit__rail-cap { display: none; }
  .fit__rail-trackwrap { flex: 1; width: 100%; height: 2px; }
  .fit__rail-track { position: static; width: 100%; height: 2px; transform: none; }
  .fit__rail-fill::after { right: -6px; }
  .fit__body { padding: 0; }
  .fit__question { font-size: clamp(32px, 6.4vh, 56px); }
  .fit__options button { font-size: clamp(18px, 2.6vh, 24px); }
}

@media (max-width: 520px) {
  .fit-return {
    gap: 8px;
  }

  .fit-return__button {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .fit-return__brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fit__rail-fill,
  .fit__options button,
  .fit-button { transition: none; }
  .fit__options button,
  .fit__kicker,
  .fit__result-title,
  .fit__result-copy,
  .fit__result .fit__booking,
  .fit__result > .fit__actions { animation: none; }
}
