/* IA Security Self-Assessment — layer over /css/calculator.css
   Uses the calculator's tokens (--c-line, --c-glass, --c-text, --c-muted,
   --c-blue-lite, --c-cyan ...), which are defined on .iacalc. Nothing here
   redefines them. Everything is scoped to .chk / chk-* so it cannot leak
   onto other pages. The tool root is <div class="iacalc chk">.

   Contrast note: calculator.css --c-muted (#8aaccc) is ~7.5:1 on the dark
   card, so it is safe for small text. The older site-v4.css --muted (#5f7fa0)
   would be only ~4:1 and must NOT be used here. */

/* Status colours. *-t variants are lighter and used for TEXT (>= 4.5:1 on the
   dark card); the plain variants are for fills and borders. */
.chk{
  --chk-yes:#10b981;     --chk-yes-t:#34d399;
  --chk-partial:#d97706; --chk-partial-t:#fbbf24;
  --chk-no:#ef4444;      --chk-no-t:#f87171;
}

/* The `hidden` attribute must beat the display set by calculator.css. */
.chk-flash[hidden],.chk .iacalc-warn[hidden]{display:none!important}
.chk-printonly{display:none}
.chk-book{margin:20px 0 8px}

/* calculator.css gives .iacalc overflow:hidden plus a decorative ::before glow
   at right:-176px. hidden still lets script scroll the box, so scrollIntoView
   or focus on a child could shift the whole tool sideways. clip cannot be
   scrolled at all; the hidden from calculator.css stays as the fallback. */
.iacalc.chk{overflow:clip}

/* ── Resume banner + inline link-buttons ─────────────────────────────────── */
.chk-resume{margin:0 0 18px;padding:12px 14px;border:1px solid rgba(0,212,255,.4);
  border-radius:12px;background:rgba(0,212,255,.07);font-size:.88rem;line-height:1.6;color:var(--c-text)}
.chk-link{background:none;border:0;padding:2px 0;color:var(--c-blue-lite);font:inherit;
  font-weight:700;cursor:pointer;text-decoration:underline}
.chk-link:hover{color:var(--c-cyan)}
.chk-link:focus-visible{outline:2px solid var(--c-cyan);outline-offset:2px;border-radius:3px}

/* Marker appended to required field labels */
.iacalc-req{color:var(--c-muted);font-weight:400;font-size:.76rem}

/* Invalid field (set by the JS on the first offending input) */
.chk [aria-invalid="true"]{border-color:var(--chk-no)!important}

/* ── Question sections and rows ──────────────────────────────────────────── */
.chk-sec{margin:28px 0 12px;font-size:1.02rem;letter-spacing:.01em;color:var(--c-text-hi)}
.chk-rows{display:flex;flex-direction:column;gap:12px}

.chk-row{border:1px solid var(--c-line);border-radius:14px;padding:14px 16px 12px;
  background:var(--c-glass);transition:border-color .2s ease,background .2s ease}
.chk-row.answered{border-color:rgba(0,112,243,.45);background:rgba(0,112,243,.06)}
/* Not counted for the chosen plan: dashed and muted instead of faded, so the
   text keeps its contrast. */
.chk-row-na{border-style:dashed}
.chk-row-na .chk-q{color:var(--c-muted)}
.chk-row-head{display:flex;gap:12px;align-items:flex-start}
.chk-num{flex:0 0 auto;min-width:48px;font-weight:800;font-size:.78rem;letter-spacing:.06em;
  color:var(--c-cyan);padding-top:2px}
.chk-row-q{flex:1;min-width:0}
.chk-q{margin:0 0 4px;font-weight:600;line-height:1.45;color:var(--c-text-hi);overflow-wrap:anywhere}
.chk-where{display:block;font-size:.78rem;color:var(--c-muted);line-height:1.4;overflow-wrap:anywhere}
.chk-na{margin:10px 0 0;font-size:.82rem;color:var(--c-muted)}

/* ── Answer pills ────────────────────────────────────────────────────────── */
.chk-choices{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 4px}
.chk-choice{position:relative;display:inline-flex;align-items:center;min-height:40px;
  padding:8px 14px;border:1px solid var(--c-line-hi);border-radius:999px;font-size:.84rem;
  line-height:1.2;cursor:pointer;color:var(--c-text);user-select:none;
  transition:border-color .18s ease,background .18s ease}
.chk-choice:hover{border-color:var(--c-muted)}
/* Visually hidden but still focusable and operable (not display:none). */
.chk-choice input{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;opacity:0;pointer-events:none}
/* Focus ring: :focus-within everywhere; where :has() exists, only for keyboard
   focus so a mouse click does not leave a ring behind. */
.chk-choice:focus-within{outline:3px solid var(--c-cyan);outline-offset:2px}
@supports selector(:has(*)){
  .chk-choice:focus-within{outline:0}
  .chk-choice:has(input:focus-visible){outline:3px solid var(--c-cyan);outline-offset:2px}
}
/* Selected is shown by a checkmark and bold weight as well as colour. */
.chk-choice.on{font-weight:700;color:var(--c-text-hi)}
.chk-choice.on::before{content:"\2713";margin-right:6px;font-weight:800}
.chk-choice-yes.on{border-color:var(--chk-yes);background:rgba(16,185,129,.18)}
.chk-choice-partial.on{border-color:var(--chk-partial);background:rgba(217,119,6,.18)}
.chk-choice-no.on{border-color:var(--chk-no);background:rgba(239,68,68,.18)}
.chk-choice-unknown.on,.chk-choice-na.on{border-color:rgba(255,255,255,.5);background:rgba(255,255,255,.1)}

/* ── "Why it matters" disclosure ─────────────────────────────────────────── */
.chk-detail{margin-top:8px;border-top:1px solid var(--c-line);padding-top:4px;
  font-size:.86rem;color:var(--c-muted)}
.chk-detail summary{cursor:pointer;color:var(--c-blue-lite);font-weight:600;
  display:flex;align-items:center;min-height:40px}
.chk-detail summary:hover{color:var(--c-cyan)}
.chk-detail summary:focus-visible{outline:2px solid var(--c-cyan);outline-offset:2px;border-radius:4px}
.chk-detail p{margin:8px 0 0;line-height:1.55;overflow-wrap:anywhere}
.chk-detail p strong{color:var(--c-text)}
.chk-detail a,.chk-gap a{color:var(--c-blue-lite);text-decoration:underline}
.chk-detail a:hover,.chk-gap a:hover{color:var(--c-cyan)}

/* ── Meter ───────────────────────────────────────────────────────────────── */
.chk-meter{margin:18px 0 22px}
.chk-meter-static{margin:6px 0 20px}
.chk-meter-status{margin:4px 0 0}
.chk-meter-bar{display:flex;height:10px;border-radius:999px;overflow:hidden;
  background:rgba(255,255,255,.08);border:1px solid var(--c-line)}
.chk-seg{display:block;height:100%;transition:width .35s ease}
.chk-seg-yes{background:var(--chk-yes)}
.chk-seg-partial{background:var(--chk-partial)}
.chk-seg-no{background:var(--chk-no)}
.chk-meter-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin-top:10px;font-size:.78rem;
  color:var(--c-muted);align-items:center}
.chk-key{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:6px;vertical-align:middle}
.chk-key-yes{background:var(--chk-yes)}
.chk-key-partial{background:var(--chk-partial)}
.chk-key-no{background:var(--chk-no)}
.chk-key-unknown{background:rgba(255,255,255,.35)}
.chk-meter-count{margin-left:auto;font-weight:700;color:var(--c-text)}

/* ── Results: score tile, lanes, gaps ────────────────────────────────────── */
.chk-band-A strong,.chk-band-B strong{color:var(--chk-yes-t)}
.chk-band-C strong{color:var(--chk-partial-t)}
.chk-band-D strong,.chk-band-F strong{color:var(--chk-no-t)}
.chk-band-none strong{color:var(--c-muted)}

.chk-lane{margin-top:14px}
.chk-lane summary{display:flex;align-items:center;min-height:40px}
.chk-gap{padding:12px 0;overflow-wrap:anywhere}
.chk-tag{display:inline-block;font-size:.72rem;font-weight:700;padding:3px 9px;border-radius:999px;
  border:1px solid var(--c-line-hi);white-space:nowrap}
.chk-tag-no{border-color:var(--chk-no);color:#fca5a5;background:rgba(239,68,68,.12)}
.chk-tag-partial{border-color:var(--chk-partial);color:#fcd34d;background:rgba(217,119,6,.14)}

/* ── Notices ─────────────────────────────────────────────────────────────── */
.chk-unlocked,.chk-notice{margin:0 0 16px;padding:12px 14px;border-radius:12px;font-size:.88rem;line-height:1.5}
.chk-unlocked{border:1px solid rgba(16,185,129,.5);background:rgba(16,185,129,.1);color:var(--c-text)}
/* .iacalc-warn supplies the red palette for the soft-fail notice. */
.chk-flash{line-height:1.5}
.chk-flash .chk-link{color:#fff;display:inline-flex;align-items:center;min-height:40px;padding:0 8px}

/* ── Small screens (375px and up) ────────────────────────────────────────── */
@media (max-width:480px){
  .chk-row{padding:12px 12px 10px}
  .chk-row-head{gap:8px}
  .chk-num{min-width:40px}
  .chk-choices{gap:8px}
  .chk-meter-count{margin-left:0;flex-basis:100%}
}

/* ── Motion ──────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion:reduce){
  .chk-seg,.chk-row,.chk-choice{transition:none}
}

/* ── Print: only the results, no site chrome, no controls, all lanes open ── */
@media print{
  .utility,.site-header,.site-footer,.iacalc-nav,.iacalc-progress,.chk-noprint,
  .chk-unlocked,.chk-notice,.chk-flash,.chk-flash-live,.iacalc-turnstile-wrap,.page-hero,
  #aria-widget,#aria-widget-root,#argos-trust-seal,#ia-cc-banner,#ia-cc-spacer,#ia-cc-modal-bg,
  .section-space:not(.chk-print-keep){display:none!important}

  .iacalc.chk .chk-printonly{display:block;margin:0 0 16px;padding:0 0 10px;border-bottom:1px solid #999;font-size:.95rem;line-height:1.5}
  body{background:#fff!important;color:#111!important}
  .iacalc.chk{background:#fff;border:0;box-shadow:none;color:#111;max-width:100%;padding:0;overflow:visible}
  .iacalc.chk::before{display:none}
  .iacalc.chk *{color:#111;box-shadow:none;text-shadow:none}
  .iacalc.chk .iacalc-fine,.iacalc.chk .iacalc-sub,.iacalc.chk .chk-where{color:#444}

  /* Cards print as plain bordered boxes; meter fills keep their colours. */
  .chk .iacalc-total-single,.chk .iacalc-breakdown,.chk .iacalc-disclaimer,.chk .iacalc-line{
    background:#fff;border-color:#bbb}
  .chk .chk-meter-bar{background:#eee;border-color:#bbb}
  .chk .chk-seg,.chk .chk-key{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .chk .chk-tag{background:#fff;border-color:#666}

  /* Every lane is expanded. The JS opens them; this is the fallback. */
  details.chk-lane>*{display:block}
  details.chk-lane::details-content{content-visibility:visible;display:block}
  .chk .chk-lane summary{break-after:avoid;color:#111}
  .chk .chk-lane>summary+.iacalc-fine{break-after:avoid;break-before:avoid}

  .chk-gap{break-inside:avoid}
  .chk a{color:#111;text-decoration:none}
  .chk a[href]:after{content:""}
}

/* ── Quick check, carry-over suggestions and contact request ─────────────── */
.chk-suggest{margin:8px 0 0;padding:8px 12px;border-left:3px solid #A9C200;
  background:rgba(169,194,0,.09);border-radius:0 8px 8px 0;font-size:.88rem;line-height:1.55;color:var(--c-text)}
.chk-carry{margin:4px 0 14px}
.chk-contact{margin:18px 0 8px;padding:16px 18px;border:1px solid rgba(0,145,124,.5);
  border-radius:12px;background:rgba(0,145,124,.08)}
.chk-contact .chk-choices{margin-top:10px}
.chk-contact-form{margin-top:16px}
.chk-contact-form[hidden]{display:none!important}
.chk-contact-sent{border-color:#00917C;line-height:1.6;color:var(--c-text)}
.chk-textarea{min-height:5rem;resize:vertical;font:inherit}
@media print{.chk-contact,.chk-suggest,.chk-carry{display:none!important}}

/* Platform chooser (neutral engine only; the original tool had no chooser). */
.chk-platforms{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:16px 0}
.chk-platform{display:flex;flex-direction:column;gap:6px;text-align:left;padding:16px;border-radius:12px;
  border:1px solid var(--c-line,#2a4a6a);background:var(--c-glass,rgba(255,255,255,.04));color:var(--c-text,#e6f0fa);
  font:inherit;cursor:pointer}
.chk-platform:hover,.chk-platform:focus-visible{border-color:var(--c-cyan,#00d4ff);outline:2px solid transparent}
.chk-platform:focus-visible{outline:2px solid var(--c-cyan,#00d4ff);outline-offset:2px}
.chk-platform-name{font-weight:700;font-size:1.05rem}
.chk-platform-sub{color:var(--c-muted,#8aaccc);font-size:.9rem}
.chk-switch{margin-top:14px}
@media print{.chk-platforms,.chk-switch{display:none!important}}

/* Plain-language intro above the tool */
.chk-page-intro p{margin:0 0 12px}
.chk-page-intro p:last-child{margin-bottom:0}

/* ── Shared report viewer (checklist-report.html). Drawn by checklist-report.js inside <div class="iacalc chk chk-rep"> ── */
.chk-rep{max-width:860px;margin:0 auto}
.chk-rep h1{margin:0 0 6px;font-size:1.7rem;line-height:1.2}
.chk-rep-meta{margin:0 0 8px;font-weight:700;color:var(--c-text)}
.chk-rep-fine{margin:0 0 12px;font-size:.84rem;line-height:1.55;color:var(--c-muted,#8aaccc)}
.chk-rep-print{margin:4px 0 18px}
.chk-rep-sec{margin:26px 0 0}
.chk-rep-sec h2{margin:0 0 4px;font-size:1.15rem}
.chk-rep-sub{margin:0 0 10px;font-size:.88rem;color:var(--c-muted,#8aaccc)}
.chk-rep-item{margin:10px 0;padding:12px 14px;border:1px solid var(--c-line,rgba(255,255,255,.14));border-radius:12px;background:var(--c-glass,rgba(255,255,255,.04))}
.chk-rep-head{display:flex;gap:10px;align-items:flex-start;flex-wrap:wrap}
.chk-rep-q{flex:1 1 220px;min-width:0;overflow-wrap:anywhere;margin:0;font-size:1rem;font-weight:700;line-height:1.45}
.chk-rep-list{list-style:none;margin:0;padding:0}
.chk-rep-note{margin:0 0 12px;padding:10px 12px;border:1px solid rgba(0,212,255,.4);border-radius:10px;background:rgba(0,212,255,.07);font-size:.88rem;line-height:1.55}
.chk-rep-line{margin:6px 0 0;font-size:.88rem;line-height:1.55;overflow-wrap:anywhere}
.chk-rep-msg{padding:8px 0}
.chk-rep a{color:var(--c-blue-lite)}
@media (max-width:480px){.chk-rep h1{font-size:1.4rem}.chk-rep-item{padding:10px 11px}}
@media print{
  .chk-rep-print{display:none!important}
  .chk-rep-item{break-inside:avoid;background:#fff;border-color:#bbb}
  .chk-rep-sec h2{break-after:avoid}
  .chk-rep-fine,.chk-rep-sub{color:#444}
  .chk-rep-note{background:#fff;border-color:#999}
  .chk-rep a{color:#111}
}
