/* ==========================================================================
   /discovery: Discovery brief (fog register)
   Tokens only (no raw hex). Frosted card is never animated; the step panel
   inside it fades in at 180ms, and nothing moves under reduced motion.
   ========================================================================== */

/* Page frame: hero copy and the form share one fog field so the glass has
   something to frost. */
.disc{position:relative;overflow:hidden;background:var(--bg-gradient)}
.disc__layers{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.disc__orb{right:4%;top:-120px;width:620px;height:620px}
.disc__fog{position:absolute}
.disc__fog--a{left:-15%;top:300px;width:90%;height:380px}
.disc__fog--b{right:-20%;top:620px;width:80%;height:340px}
.disc__inner{position:relative;z-index:1;padding-top:clamp(2.5rem, 6vw, 5rem);padding-bottom:clamp(4rem, 8vw, 6.5rem)}

.disc__hero{display:flex;flex-direction:column;gap:1.25rem;margin-bottom:clamp(2rem, 4vw, 3rem)}
.disc__title{font-size:clamp(2.75rem, 6vw, 5rem);max-width:12ch}
.disc__lead{max-width:40ch}

.disc__grid{display:grid;grid-template-columns:minmax(0, 1fr);gap:clamp(1.75rem, 3vw, 2.5rem);align-items:start}
@media (min-width: 1024px){
  .disc__grid{grid-template-columns:minmax(0, 1fr) 320px}
  .disc-aside{position:sticky;top:24px}
}

/* Frosted card: solid fallbacks come from site.css (.card--glass). */
.disc-card{padding:clamp(1.25rem, 3.5vw, 2.5rem);border-radius:var(--radius-card)}

/* Interest line (?interest=) */
.disc-interest{display:flex;align-items:center;gap:12px;margin-bottom:1.25rem;padding:10px 16px;border-radius:var(--radius-pill);background:var(--card-bg);border:1px solid var(--line);font-weight:500;width:fit-content;max-width:100%}

/* Step indicator: text plus a progress bar */
.disc-progress{display:flex;flex-direction:column;gap:10px;margin-bottom:1.5rem}
.disc-progress__text{font-size:.9375rem;font-weight:500;color:var(--text-soft)}
.disc-progress__bar{position:relative;height:6px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--navy) 10%, transparent);overflow:hidden}
.disc-progress__fill{position:absolute;inset:0;background:var(--navy);border-radius:inherit;transform-origin:left center;transform:scaleX(.1667)}

.disc-noscript{padding:1rem 0}
.disc-form__note{font-size:.9375rem;color:var(--text-muted);margin-bottom:1.75rem}

/* Step panels */
.disc-step__head{display:flex;flex-direction:column;gap:.625rem;margin-bottom:1.75rem}
.disc-step__title{font-weight:400;font-size:clamp(1.75rem, 3.2vw, 2.375rem);line-height:1.12;letter-spacing:-.015em;max-width:22ch}
.disc-step__title strong{font-weight:600}
.disc-step__title:focus{outline:none}
/* Headings take focus programmatically on step change (tabindex=-1); they are not
   controls, so no ring. Screen readers announce them; the card is scrolled into view. */
.disc-step__desc{color:var(--text-soft);max-width:56ch}

.disc-step__alert{display:none;margin-bottom:1.5rem;padding:14px 18px;border-radius:14px;border:2px solid var(--error);background:var(--white);color:var(--error);font-weight:500}
.disc-step__alert.is-shown{display:block}
.disc-step__alert:focus{outline:none}
.disc-step__alert:focus-visible{outline:2px solid var(--focus);outline-offset:3px}

.disc-fields{display:flex;flex-direction:column;gap:1.5rem}
.field-row{display:grid;grid-template-columns:repeat(auto-fit, minmax(min(240px, 100%), 1fr));gap:1.5rem}
.field{display:flex;flex-direction:column;gap:8px;min-width:0}
fieldset.field{border:0;margin:0;padding:0}
.field__label{font-weight:600;font-size:1rem;line-height:1.35;color:var(--text);padding:0}
.req{display:inline-block;margin-left:6px;font-family:var(--font-sans);font-size:.8125rem;font-weight:500;letter-spacing:0;color:var(--text-muted);vertical-align:1px}
.field__hint{font-size:.9375rem;line-height:1.5;color:var(--text-muted)}
.field__error{display:flex;gap:8px;align-items:baseline;font-size:.9375rem;font-weight:500;line-height:1.45;color:var(--error)}
.field__error::before{content:"!";flex:none;display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--error);color:var(--white);font-size:.75rem;font-weight:700;transform:translateY(2px)}

.field__input{
  width:100%;min-height:52px;padding:12px 16px;
  border:1px solid color-mix(in srgb, var(--navy) 22%, transparent);border-radius:14px;
  background:var(--white);color:var(--text);
  font:inherit;font-size:1.0625rem;line-height:1.4;
  transition:border-color var(--dur-ui) ease-out, box-shadow var(--dur-ui) ease-out;
}
.field__input::placeholder{color:var(--muted);opacity:1}
.field__input:hover{border-color:color-mix(in srgb, var(--navy) 40%, transparent)}
.field__input:focus{outline:none}
.field__input:focus-visible{border-color:var(--navy);box-shadow:0 0 0 3px color-mix(in srgb, var(--blue) 28%, transparent)}
.field__input[aria-invalid="true"]{border:2px solid var(--error);padding:11px 15px}
.field__select{appearance:none;-webkit-appearance:none;padding-right:44px;cursor:pointer;
  background-image:linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%);
  background-position:calc(100% - 22px) 52%, calc(100% - 16px) 52%;background-size:6px 6px, 6px 6px;background-repeat:no-repeat}
.field__textarea{min-height:128px;resize:vertical;line-height:1.55}
.field__textarea--sm{min-height:96px}

.disc-sub{padding-top:1.5rem;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:6px}
.disc-sub__title{font-size:1.125rem;font-weight:600;line-height:1.3}

/* Choices: real checkboxes and radios under pill, card and tile faces */
.choice-grid{display:flex;flex-wrap:wrap;gap:10px;margin-top:4px}
.choice-cards{display:grid;grid-template-columns:repeat(auto-fill, minmax(min(190px, 100%), 1fr));gap:10px;margin-top:4px}
.choice-tiles{display:grid;grid-template-columns:repeat(auto-fill, minmax(min(140px, 100%), 1fr));gap:10px;margin-top:4px}
.choice{position:relative;display:flex;cursor:pointer}
.choice__input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.choice__face{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 16px;
  border:1px solid color-mix(in srgb, var(--navy) 22%, transparent);border-radius:var(--radius-pill);
  background:var(--white);color:var(--text);font-size:.9844rem;font-weight:500;line-height:1.3;
  transition:background-color var(--dur-ui) ease-out, border-color var(--dur-ui) ease-out, color var(--dur-ui) ease-out}
.choice-cards .choice__face, .choice-tiles .choice__face{align-items:flex-start;border-radius:16px;padding:14px 16px}
.choice__mark{flex:none;position:relative;width:18px;height:18px;border:1.5px solid color-mix(in srgb, var(--navy) 45%, transparent);border-radius:5px;background:var(--white)}
.choice-cards .choice__mark, .choice-tiles .choice__mark{margin-top:2px}
.choice__input[type="radio"] + .choice__face .choice__mark{border-radius:50%}
.choice__body{display:flex;flex-direction:column;gap:2px}
.choice__title{font-weight:600}
.choice__desc{font-size:.9375rem;font-weight:400;color:var(--text-soft)}
.choice:hover .choice__face{border-color:var(--navy)}
.choice__input:focus-visible + .choice__face{outline:2px solid var(--focus);outline-offset:3px}
.choice__input:checked + .choice__face{background:var(--navy);border-color:var(--navy);color:var(--btn-text)}
.choice__input:checked + .choice__face .choice__desc{color:var(--fog-deep)}
.choice__input:checked + .choice__face .choice__mark{background:var(--btn-text);border-color:var(--btn-text)}
.choice__input:checked + .choice__face .choice__mark::after{content:"";position:absolute;left:5px;top:1px;width:5px;height:10px;border:solid var(--navy);border-width:0 2px 2px 0;transform:rotate(45deg)}
.choice__input[type="radio"]:checked + .choice__face .choice__mark::after{left:4px;top:4px;width:7px;height:7px;border:0;border-radius:50%;background:var(--navy);transform:none}
.choice-set.is-invalid .choice__face{border-color:var(--error)}

/* Hexagon sliders and radar */
.radar{display:flex;flex-direction:column;align-items:center;gap:10px;margin:0 0 1.75rem;padding:1.25rem 1rem 1rem;border-radius:20px;background:var(--card-bg);border:1px solid var(--card-line)}
.radar__title{font-family:var(--font-label);font-weight:500;font-size:.8125rem;letter-spacing:.2em;text-transform:uppercase;color:var(--text-muted)}
.radar__svg{width:100%;max-width:360px}
.radar__grid{fill:none;stroke:color-mix(in srgb, var(--navy) 12%, transparent);stroke-width:1}
.radar__axis{stroke:color-mix(in srgb, var(--navy) 12%, transparent);stroke-width:1}
.radar__shape{fill:color-mix(in srgb, var(--blue) 16%, transparent);stroke:var(--blue);stroke-width:2;stroke-linejoin:round}
.radar__dot{fill:var(--blue)}
.radar__label{font-family:var(--font-label);font-size:10px;font-weight:500;letter-spacing:1px;fill:var(--muted)}

.axes{display:flex;flex-direction:column;gap:1.5rem}
.axis{display:flex;flex-direction:column;gap:6px;padding-bottom:1.25rem;border-bottom:1px solid var(--line)}
.axis:last-child{border-bottom:0;padding-bottom:0}
.axis__head{display:flex;justify-content:space-between;align-items:baseline;gap:1rem}
.axis__name{font-weight:600;font-size:1.0625rem}
.axis__score{font-size:1.375rem;font-weight:500;min-width:2ch;text-align:right}
.axis__desc{font-size:.9375rem;line-height:1.5;color:var(--text-soft)}
.axis__scale{display:flex;justify-content:space-between;font-size:.8125rem;color:var(--text-muted)}
.axis__range{-webkit-appearance:none;appearance:none;width:100%;height:44px;margin:0;background:transparent;cursor:pointer}
.axis__range:focus{outline:none}
.axis__range::-webkit-slider-runnable-track{height:6px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--navy) 14%, transparent)}
.axis__range::-moz-range-track{height:6px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--navy) 14%, transparent)}
.axis__range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:24px;height:24px;margin-top:-9px;border-radius:50%;background:var(--navy);border:3px solid var(--white);box-shadow:0 2px 8px color-mix(in srgb, var(--navy) 25%, transparent)}
.axis__range::-moz-range-thumb{width:24px;height:24px;border-radius:50%;background:var(--navy);border:3px solid var(--white);box-shadow:0 2px 8px color-mix(in srgb, var(--navy) 25%, transparent)}
.axis__range:focus-visible::-webkit-slider-thumb{outline:2px solid var(--focus);outline-offset:3px}
.axis__range:focus-visible::-moz-range-thumb{outline:2px solid var(--focus);outline-offset:3px}

/* Step navigation: navy pill primary, quiet ghost Back */
.step-nav{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:12px;margin-top:2.25rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.step-nav [data-back]{margin-right:auto}
.step-nav .btn{min-width:132px}
.step-nav .btn[disabled]{cursor:progress;opacity:.75}

/* Summary */
.disc-summary{display:flex;flex-direction:column;gap:12px;margin-bottom:1.5rem}
.sum-profile{display:flex;flex-wrap:wrap;gap:1rem 1.5rem;align-items:center;justify-content:space-between;padding:1.25rem 1.5rem;border-radius:20px;background:var(--navy);color:var(--btn-text)}
.sum-profile__text{flex:1 1 320px;display:flex;flex-direction:column;gap:4px}
.sum-profile__type{font-size:1.375rem;font-weight:600}
.sum-profile__desc{font-size:.9375rem;line-height:1.5;color:var(--fog-deep)}
.sum-profile__avg{flex:none;padding:8px 16px;border-radius:var(--radius-pill);border:1px solid color-mix(in srgb, var(--btn-text) 35%, transparent);font-size:.9375rem;font-weight:500}
.sum-block{display:flex;flex-direction:column;gap:8px;padding:1.125rem 1.25rem;border-radius:16px;background:var(--card-bg);border:1px solid var(--card-line)}
.sum-block__label{font-family:var(--font-label);font-weight:500;font-size:.8125rem;letter-spacing:.2em;text-transform:uppercase;color:var(--text-muted)}
.sum-line{line-height:1.55;overflow-wrap:anywhere}
.sum-line--strong{font-weight:600}
.sum-line--soft{color:var(--text-soft);font-size:.9375rem}
.sum-tags{list-style:none;display:flex;flex-wrap:wrap;gap:6px}
.sum-tag{padding:4px 12px;border-radius:var(--radius-pill);border:1px solid var(--line);background:var(--white);font-size:.875rem}
.sum-scores{list-style:none;display:flex;flex-direction:column;gap:8px}
.sum-score{display:grid;grid-template-columns:minmax(8.5rem, auto) 1fr auto;align-items:center;gap:12px;font-size:.9375rem}
.sum-score__track{position:relative;height:6px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--navy) 10%, transparent);overflow:hidden}
.sum-score__fill{position:absolute;inset:0;background:var(--blue);transform-origin:left center}
.sum-score__val{min-width:3.5rem;text-align:right}

.disc-legal{margin-top:1rem;font-size:.875rem;line-height:1.55;color:var(--text-muted)}

/* Success */
.disc-success{display:flex;flex-direction:column;gap:1.25rem;align-items:flex-start}
.disc-success__title{font-size:clamp(2.25rem, 4.4vw, 3.25rem);font-weight:300}
.disc-next{display:flex;flex-direction:column;gap:6px;padding-left:1.4em;color:var(--text-soft)}
.disc-next li::marker{font-family:var(--font-mono);color:var(--text-muted)}

/* Aside: What to expect */
.disc-aside{display:flex;flex-direction:column;gap:1rem;padding-top:.5rem}
.disc-aside__title{font-size:1.375rem;font-weight:600;line-height:1.3}
.disc-aside__list > li{font-size:1.0625rem}
.disc-aside__note{font-size:.9375rem;line-height:1.55;color:var(--text-muted)}

/* Motion: step panels only (never the frosted card), 180ms, opacity and transform */
@keyframes disc-step-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: no-preference){
  .disc-step.is-entering, .disc-success.is-entering{animation:disc-step-in var(--dur-ui) var(--ease-out) both}
  .disc-progress__fill{transition:transform var(--dur-ui) var(--ease-out)}
}

@media (max-width: 719.98px){
  .disc__orb{right:-40%;top:-160px;width:480px;height:480px}
  .disc-card{border-radius:var(--radius-card-sm)}
  .step-nav .btn{flex:1 1 auto}
  .step-nav [data-back]{flex:0 1 auto;min-width:104px}
  .sum-score{grid-template-columns:1fr auto}
  .sum-score__track{grid-column:1 / -1;grid-row:2}
}
@media (forced-colors: active){
  .choice__input:checked + .choice__face{outline:3px solid Highlight}
  .disc-progress__fill, .sum-score__fill{background:CanvasText}
}
