/* ==========================================================================
   /audit: 60-second Hexagon Audit (fog register)
   Tokens only (no raw hex). The frosted questionnaire card is never animated;
   the only motion is the hexagon draw-in (transform and opacity), and nothing
   moves under reduced motion. Field and choice patterns match /discovery.
   ========================================================================== */

/* Page frame: hero copy and the questionnaire share one fog field so the glass
   has something to frost. */
.audit{position:relative;overflow:hidden;background:var(--bg-gradient)}
.audit__layers{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.audit__orb{right:2%;top:-140px;width:620px;height:620px}
.audit__fog--a{left:-15%;top:340px;width:90%;height:380px}
.audit__fog--b{right:-20%;top:820px;width:80%;height:340px}
.audit__inner{position:relative;z-index:1;padding-top:clamp(2.5rem, 6vw, 5rem);padding-bottom:clamp(4rem, 8vw, 6rem)}

.audit__hero{display:flex;flex-direction:column;gap:1.25rem;margin-bottom:clamp(1.5rem, 3vw, 2rem)}
/* Headline stays on 2 lines at every width: a fixed break plus a size that fits the longer line. */
.audit__title{font-size:clamp(2.75rem, 6.8vw, 4.75rem);max-width:none} /* shared hero scale: 44px floor like the other page h1s (design review m11) */
.audit__title-line{display:block}
.audit__lead{max-width:40ch}
.audit__answer{max-width:64ch;margin-bottom:clamp(2rem, 4vw, 3rem);padding-left:18px;border-left:2px solid color-mix(in srgb, var(--blue-bright) 55%, transparent);font-size:1.0625rem;line-height:1.65;color:var(--text-soft)}

/* Frosted card: solid fallbacks come from site.css (.card--glass). */
.audit-card{max-width:880px;padding:clamp(1.25rem, 3.5vw, 2.5rem);border-radius:var(--radius-card)}
.audit-card__title{font-weight:400;font-size:clamp(1.75rem, 3.2vw, 2.375rem);line-height:1.12;letter-spacing:-.015em}
.audit-card__intro{margin-top:.75rem;max-width:60ch;color:var(--text-soft)}
.audit-card__note{margin-top:.75rem;margin-bottom:1.25rem;font-size:.9375rem;line-height:1.5;color:var(--text-muted)}
.audit-noscript{padding:1rem 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}
.audit-card__note .req{margin-left:0}

.audit-form__alert{display:none;margin-bottom:1.25rem;padding:14px 18px;border-radius:14px;border:2px solid var(--signal-text);background:var(--white);color:var(--signal-text);font-weight:500}
.audit-form__alert.is-shown{display:block}

/* One question group per axis: fieldset, legend, ten native radios as pill tiles */
.aq{min-width:0;margin:0;padding:1.5rem 0;border:0;border-top:1px solid var(--line)}
.aq__legend{display:block;width:100%;padding:0;font-weight:600;font-size:1.125rem;line-height:1.35;color:var(--text)}
.aq__num{display:inline-block;min-width:2.25ch;margin-right:10px;font-size:.9375rem;font-weight:500;color:var(--text-muted)}
.aq__q{display:block;margin-top:6px;font-weight:400;font-size:1.0625rem;line-height:1.5;color:var(--text-soft)}
.aq__options{display:grid;grid-template-columns:repeat(10, minmax(0, 1fr));gap:8px;margin-top:1rem}
.aq__opt{position:relative;display:flex;cursor:pointer}
.aq__input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.aq__face{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;
  border:1px solid color-mix(in srgb, var(--navy) 22%, transparent);border-radius:var(--radius-pill);
  background:var(--white);color:var(--text);font-size:1.0625rem;font-weight:500;
  transition:background-color var(--dur-ui) ease-out, border-color var(--dur-ui) ease-out, color var(--dur-ui) ease-out}
.aq__opt:hover .aq__face{border-color:var(--navy)}
.aq__input:focus-visible + .aq__face{outline:2px solid var(--focus);outline-offset:3px}
.aq__input:checked + .aq__face{background:var(--navy);border-color:var(--navy);color:var(--btn-text)}
.aq.is-invalid .aq__face{border-color:var(--signal-text)}
.aq__anchors{display:flex;justify-content:space-between;gap:1rem;margin-top:.75rem;font-size:.9375rem;line-height:1.45;color:var(--text-muted)}
.aq__anchors > span:last-child{text-align:right}

.field{display:flex;flex-direction:column;gap:8px;min-width:0}
.field__label{font-weight:600;font-size:1rem;line-height:1.35;color:var(--text)}
.field__error{display:flex;gap:8px;align-items:baseline;margin-top:.5rem;font-size:.9375rem;font-weight:500;line-height:1.45;color:var(--signal-text)}
.field__error:empty{display:none}
.field__error::before{content:"!";flex:none;display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;background:var(--signal-text);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(--signal-text);padding:11px 15px}

.audit-form__actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:.5rem;padding-top:1.5rem;border-top:1px solid var(--line)}
.audit-form__actions .btn{min-width:200px}

/* Results ================================================================== */
.audit-results{position:relative;padding-block:var(--section-y);background:linear-gradient(180deg, var(--fog-deep) 0%, var(--fog) 100%);border-top:1px solid var(--line)}
.audit-results__title:focus{outline:none}
/* The heading takes focus programmatically when results appear (tabindex=-1); it is
   not a control, so no ring. */

.res-grid{display:grid;grid-template-columns:minmax(0, 1.1fr) minmax(0, 1fr);gap:clamp(1.5rem, 4vw, 3.5rem);align-items:center}
.res-chart{display:flex;flex-direction:column;gap:12px;margin:0;background:var(--mist)}
.res-chart__cap{font-size:.9375rem;line-height:1.5;color:var(--text-muted);text-align:center}

.hex{display:block;width:100%;max-width:500px;height:auto;margin-inline:auto;overflow:visible}
.hex__ring{fill:none;stroke:color-mix(in srgb, var(--navy) 12%, transparent);stroke-width:1}
.hex__ring--outer{stroke:color-mix(in srgb, var(--navy) 22%, transparent)}
.hex__axis{stroke:color-mix(in srgb, var(--navy) 12%, transparent);stroke-width:1}
.hex__poly{fill:color-mix(in srgb, var(--beacon) 26%, transparent);stroke:var(--navy);stroke-width:2.5;stroke-linejoin:round}
.hex__dot{fill:var(--navy);stroke:var(--white);stroke-width:2}
.hex__label{font-family:var(--font-sans);font-size:19px;font-weight:600;fill:var(--navy)}
.hex__value{font-family:var(--font-mono);font-size:17px;font-weight:500;fill:var(--muted)}
.hex__shape{transform-box:view-box;transform-origin:220px 200px}

.res-side{display:flex;flex-direction:column;gap:1.25rem}
.res-score{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.res-score__label{font-weight:600;color:var(--text-soft)}
.res-score__num{display:flex;align-items:baseline;gap:6px;line-height:1}
.res-score__num > .mono:first-child{font-size:clamp(3.5rem, 7vw, 5rem);font-weight:500;letter-spacing:-.02em;color:var(--navy)}
.res-score__of{font-size:1.5rem;color:var(--text-muted)}
.res-score__tier{display:inline-flex;align-items:center;min-height:36px;padding:6px 16px;border-radius:var(--radius-pill);background:var(--navy);color:var(--btn-text);font-weight:600}
.res-lead{max-width:48ch;font-size:1.1875rem;line-height:1.6;color:var(--text-soft)}
.res-focus{max-width:48ch;font-size:1.0625rem;line-height:1.6;color:var(--text)}
.res-focus strong{font-weight:600}

/* Score table: the text equivalent of the chart, with gear links */
.res-table-wrap{margin-top:clamp(2.5rem, 5vw, 3.5rem)}
.res-table{width:100%;border-collapse:collapse}
.res-table__cap{margin-bottom:.75rem;text-align:left;font-weight:600;font-size:1.25rem;line-height:1.3}
.res-table th, .res-table td{padding:12px 12px 12px 0;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.res-table thead th{padding-block:8px;font-size:.9375rem;font-weight:600;color:var(--text-muted)}
.res-table__axis{font-weight:600;font-size:1.0625rem;white-space:nowrap}
.res-table tr.is-focus .res-table__axis::before{content:"";display:inline-block;width:8px;height:8px;margin-right:10px;border-radius:50%;background:var(--blue);vertical-align:2px}
.res-table__score{white-space:nowrap}
.res-table__val{font-size:1.25rem;font-weight:500}
.res-table__of{margin-left:2px;color:var(--text-muted)}
.res-table__track{position:relative;display:block;width:140px;height:6px;margin-top:8px;border-radius:var(--radius-pill);background:color-mix(in srgb, var(--navy) 10%, transparent);overflow:hidden}
.res-table__fill{position:absolute;inset:0;border-radius:inherit;background:var(--navy);transform-origin:left center}
.res-gears{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.res-gear{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 16px;border-radius:var(--radius-pill);border:1px solid var(--ghost-line);background:var(--card-bg);color:var(--text);font-size:.9844rem;font-weight:500;text-decoration:none;transition:border-color var(--dur-ui) ease-out, background-color var(--dur-ui) ease-out}
.res-gear:hover{border-color:var(--navy);background:var(--card-bg-hover)}
.res-gear__num{font-size:.8125rem;color:var(--text-muted)}

/* Report form */
.report{max-width:760px;margin-top:clamp(2.5rem, 5vw, 3.5rem)}
.report__form-wrap, .report__success{display:flex;flex-direction:column;gap:1rem;align-items:flex-start}
.report__form-wrap[hidden], .report__success[hidden]{display:none}
.report__title{font-size:1.5rem;font-weight:600;line-height:1.25}
.report__title:focus{outline:none}
.report__text{max-width:56ch;color:var(--text-soft)}
.report__form{width:100%}
.report__row{display:flex;flex-wrap:wrap;gap:10px}
.report__row .field__input{flex:1 1 260px;width:auto}
.report__row .btn{flex:none;min-width:160px}
.report__row .btn[disabled]{cursor:progress;opacity:.75}
.report__fine{font-size:.9375rem;color:var(--text-muted)}

/* Closing band layers */
.audit-band__orb{left:50%;top:50%;width:880px;height:880px;margin:-440px 0 0 -440px}
.audit-band__fog{left:-10%;bottom:-60px;width:120%;height:260px}

/* Motion: the hexagon draws in once per score, transform and opacity only */
@keyframes audit-hex-in{from{opacity:0;transform:scale(.2)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion: no-preference){
  .hex__shape.is-drawing{animation:audit-hex-in .6s var(--ease-out) both}
}

@media (max-width: 900px){
  .res-grid{grid-template-columns:minmax(0, 1fr)}
}
@media (max-width: 719.98px){
  .audit__orb{right:-40%;top:-160px;width:480px;height:480px}
  .audit-card{border-radius:var(--radius-card-sm)}
  .aq__options{grid-template-columns:repeat(5, minmax(0, 1fr))}
  .audit-form__actions .btn{flex:1 1 auto}
  .report__row .btn{flex:1 1 auto}
  /* Score table stacks into one block per axis; explicit ARIA roles keep table semantics. */
  .res-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .res-table tbody tr{display:grid;grid-template-columns:1fr auto;column-gap:1rem;row-gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
  .res-table tbody th, .res-table tbody td{display:block;padding:0;border:0}
  .res-table__score{text-align:right}
  .res-table__track{width:96px;margin-left:auto}
  .res-table__gears{grid-column:1 / -1}
}
@media (forced-colors: active){
  .aq__input:checked + .aq__face{outline:3px solid Highlight}
  .res-table__fill{background:CanvasText}
  .hex__poly{stroke:CanvasText}
}
