/* ==========================================================================
   FIT FINDER — guided five-step size assistant on the product page.
   Uses the Sohraaz theme tokens; no external stylesheet or library.
   ========================================================================== */

/* Trigger — the gradient pill from the reference, in Sohraaz tokens -------- */
html body button.size-link.size-link--calc.fys-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 13px 16px;
  border: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--btn-studio-deep, #8a6a22), var(--btn-studio-base, #d9b45a));
  color: #fff; font-family: var(--caps, var(--sans)); font-size: 13px;
  font-weight: 600; letter-spacing: 0; text-transform: none;
  box-shadow: none; animation: none; line-height: 1.2;
}
html body button.size-link.size-link--calc.fys-trigger strong { font-weight: 800; }
html body button.size-link.size-link--calc.fys-trigger svg {
  width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor;
}
html body button.size-link.size-link--calc.fys-trigger .fys-caret { width: 13px; height: 13px; flex-basis: 13px; opacity: .85; }
html body button.size-link.size-link--calc.fys-trigger::after { display: none; }
html body button.size-link.size-link--calc.fys-trigger:hover,
html body button.size-link.size-link--calc.fys-trigger:focus-visible {
  background: linear-gradient(90deg, var(--btn-studio-deep, #8a6a22), var(--btn-studio-light, #f5df9b));
  color: #fff; animation: none; transform: translateY(-1px); outline: 2px solid var(--gold, #ad8765); outline-offset: 2px;
}

.fys-scrim { z-index: 1200; }
.fys-box.modal-box {
  max-width: 470px;
  padding: 0;
  overflow: hidden;
  background: var(--ivory, var(--paper, #faf8f4));
  border: 1px solid var(--gold-soft, rgba(173,135,101,.35));
  border-radius: 18px;
  box-shadow: 0 30px 90px color-mix(in srgb, var(--theme-scrim, #120c08) 32%, transparent);
}
.fys-close.modal-close {
  top: 12px; right: 12px;
  background: color-mix(in srgb, var(--bg2, #eae0d4) 70%, transparent);
  color: var(--ink, #30251f);
  border: 0;
  z-index: 3;
}

.fys-card { position: relative; padding: 30px 28px 26px; }

.fys-head { margin: 0 32px 20px 0; text-align: center; }
.fys-kicker {
  display: block;
  font-family: var(--caps, var(--sans));
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold-text, #70513e); margin-bottom: 8px;
}
.fys-head h3 {
  margin: 0 0 8px;
  font-family: var(--serif, Georgia, serif);
  font-size: 27px; line-height: 1.15; color: var(--ink, #30251f);
}
.fys-head h3 em { display: block; font-style: normal; color: var(--gold-text, #70513e); font-size: 17px; }
.fys-head p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--mute, #796d62); }

/* Stepper --------------------------------------------------------------- */
.fys-stepper { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 0 0 22px; }
.fys-track {
  position: absolute; left: 8%; right: 8%; bottom: -7px; height: 2px;
  background: var(--gold-soft, rgba(173,135,101,.22));
}
.fys-track::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: var(--fys-progress, 0%);
  background: var(--gold, #ad8765); transition: width .35s ease;
}
.fys-step-btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  padding: 7px 2px 12px; font-family: var(--caps, var(--sans));
  font-size: 10px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mute, #796d62); opacity: .62; transition: color .2s, opacity .2s;
}
.fys-step-btn.is-active { color: var(--ink, #30251f); opacity: 1; font-weight: 700; }
.fys-step-btn.is-done { opacity: .9; }
.fys-step-btn:focus-visible { outline: 2px solid var(--gold, #ad8765); outline-offset: 2px; }

/* Screens ---------------------------------------------------------------- */
.fys-screens { position: relative; }
.fys-screen { display: none; animation: fysIn .28s ease both; }
.fys-screen.is-active { display: block; }
@keyframes fysIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.fys-screen h4 {
  margin: 0 0 5px; font-family: var(--serif, Georgia, serif);
  font-size: 22px; line-height: 1.2; color: var(--ink, #30251f);
}
.fys-sub { margin: 0 0 18px; font-size: 12px; line-height: 1.5; color: var(--mute, #796d62); }

.fys-inputs { display: flex; gap: 14px; flex-wrap: wrap; }
.fys-field { flex: 1 1 130px; }
.fys-field-lbl {
  display: block; margin-bottom: 7px; font-family: var(--caps, var(--sans));
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute, #796d62);
}
.fys-spin { display: flex; align-items: stretch; border: 1px solid var(--line, #e4d8ca); border-radius: 10px; overflow: hidden; background: var(--paper, #fff); }
.fys-spin button {
  width: 42px; flex: 0 0 42px; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; color: var(--gold-text, #70513e);
}
.fys-spin button:hover { background: color-mix(in srgb, var(--gold, #ad8765) 12%, transparent); }
.fys-spin input {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; text-align: center;
  padding: 11px 2px; font-family: var(--serif, Georgia, serif); font-size: 24px;
  color: var(--ink, #30251f); background: transparent; -moz-appearance: textfield;
}
.fys-spin input::-webkit-outer-spin-button, .fys-spin input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.fys-span2 { grid-column: 1 / -1; }
.fys-select {
  width: 100%; padding: 12px; border: 1px solid var(--line, #e4d8ca); border-radius: 10px;
  background: var(--paper, #fff); color: var(--ink, #30251f); font-size: 14px;
}
.fys-measures { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fys-measure span {
  display: block; margin-bottom: 7px; font-family: var(--caps, var(--sans));
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute, #796d62);
}
.fys-measure input {
  width: 100%; padding: 12px; border: 1px solid var(--line, #e4d8ca); border-radius: 10px;
  background: var(--paper, #fff); color: var(--ink, #30251f); font-size: 16px;
}
.fys-how { margin-top: 14px; font-size: 12px; color: var(--mute, #796d62); }
.fys-how summary { cursor: pointer; color: var(--gold-text, #70513e); }
.fys-how ul { margin: 8px 0 4px; padding-left: 18px; line-height: 1.55; }

.fys-builds { display: grid; gap: 8px; }
.fys-build {
  display: block; text-align: left; cursor: pointer; padding: 13px 15px;
  border: 1px solid var(--line, #e4d8ca); border-radius: 11px;
  background: var(--paper, #fff); color: var(--ink, #30251f);
  transition: border-color .2s, background .2s, transform .2s;
}
.fys-build b { display: block; font-family: var(--serif, Georgia, serif); font-size: 17px; font-weight: 600; }
.fys-build small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--mute, #796d62); }
.fys-build:hover { transform: translateY(-1px); border-color: var(--gold, #ad8765); }
.fys-build.is-selected { border-color: var(--gold, #ad8765); background: color-mix(in srgb, var(--gold, #ad8765) 9%, var(--paper, #fff)); }

.fys-usual-options { display: flex; flex-wrap: wrap; gap: 8px; }
.fys-usual-pill {
  min-width: 48px; padding: 9px 12px; cursor: pointer; border-radius: 999px;
  border: 1px solid var(--line, #e4d8ca); background: var(--paper, #fff);
  color: var(--ink, #30251f); font-family: var(--caps, var(--sans)); font-size: 12px;
  transition: border-color .2s, background .2s;
}
.fys-usual-pill--wide { min-width: auto; }
.fys-usual-pill:hover { border-color: var(--gold, #ad8765); }
.fys-usual-pill.is-selected { border-color: var(--gold, #ad8765); background: color-mix(in srgb, var(--gold, #ad8765) 12%, var(--paper, #fff)); font-weight: 700; }

.fys-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.fys-continue {
  flex: 1 1 auto; min-height: 44px; cursor: pointer; border: 0; border-radius: 10px;
  background: linear-gradient(100deg, var(--btn-studio-deep, #8a6a22), var(--btn-studio-base, #d9b45a));
  color: var(--on, #fff); font-family: var(--caps, var(--sans));
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
}
.fys-continue[disabled] { opacity: .6; cursor: not-allowed; }
.fys-back {
  flex: 0 0 auto; min-height: 44px; padding: 0 12px; cursor: pointer;
  border: 0; background: transparent; color: var(--mute, #796d62); font-size: 12px;
}
.fys-skip-btn { flex: 0 0 auto; min-height: 44px; padding: 0 10px; cursor: pointer; border: 0; background: transparent;
  color: var(--gold-text, #70513e); font-family: var(--caps, var(--sans)); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.fys-actions .fys-continue { flex: 1 1 auto; }

/* Result ----------------------------------------------------------------- */
.fys-loading { padding: 26px 0; text-align: center; color: var(--mute, #796d62); font-size: 13px; }
.fys-badge {
  display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 12px;
  border: 1px solid var(--gold, #ad8765); border-radius: 50%;
  font-family: var(--serif, Georgia, serif); font-size: 20px; color: var(--gold-text, #70513e);
  background: color-mix(in srgb, var(--gold, #ad8765) 8%, transparent);
}
.fys-result h4 { text-align: center; font-size: 21px; }
.fys-variant-b-note { margin: 8px 0 14px; text-align: center; font-size: 12px; line-height: 1.55; color: var(--mute, #796d62); }
.fys-fitnote {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid var(--gold-soft, rgba(173,135,101,.28)); border-radius: 9px;
  font-size: 11.5px; color: var(--ink, #30251f);
}
.fys-fitnote::before { content: "\2713"; color: var(--gold-text, #70513e); font-weight: 700; }
.fys-slim-note { padding: 9px 12px; margin-bottom: 8px; border-radius: 9px; background: color-mix(in srgb, var(--gold, #ad8765) 8%, transparent); font-size: 11.5px; }
.fys-slim-l { font-weight: 700; color: var(--gold-text, #70513e); margin-right: 5px; }
.fys-context { margin: 10px 0 2px; text-align: center; font-size: 11px; color: var(--mute, #796d62); line-height: 1.5; }
.fys-stock-note {
  margin: 10px 0 2px; padding: 10px 12px; border-radius: 9px;
  background: color-mix(in srgb, var(--gold, #ad8765) 10%, transparent);
  color: var(--gold-text, #70513e); font-size: 11.5px; line-height: 1.5;
}
.fys-result-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.fys-startover {
  flex: 0 0 auto; min-height: 44px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--line, #e4d8ca); border-radius: 10px;
  background: transparent; color: var(--ink, #30251f); font-size: 11.5px;
}
.fys-chart {
  display: block; width: 100%; margin-top: 10px; min-height: 42px; cursor: pointer;
  border: 1px solid var(--line, #e4d8ca); border-radius: 10px;
  background: transparent; color: var(--ink, #30251f);
  font-family: var(--caps, var(--sans)); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.fys-support { margin: 12px 0 0; text-align: center; font-size: 11.5px; color: var(--mute, #796d62); }
.fys-support a { color: var(--gold-text, #70513e); text-decoration: underline; text-underline-offset: 3px; }
.fys-result-oor h4 { color: #a3372b; }
.fys-result-oor p { font-size: 12.5px; line-height: 1.55; color: var(--mute, #796d62); }
.fys-pick-note { margin-top: 8px; text-align: center; font-size: 11.5px; color: #a3372b; }

@media (max-width: 520px) {
  .fys-scrim { padding: 10px; }
  .fys-card { padding: 26px 18px 20px; }
  .fys-head h3 { font-size: 23px; }
  .fys-step-btn { font-size: 9px; letter-spacing: .02em; }
  .fys-measures { grid-template-columns: 1fr; }
  .fys-result-actions { flex-direction: column; align-items: stretch; }
  .fys-startover { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .fys-screen, .fys-track::after, .fys-build, .fys-usual-pill { animation: none !important; transition: none !important; }
}
