/* AI Readiness Self-Check (/ai-readiness-check). Site tokens only
   (var(--bg), var(--accent-text-safe), etc. from /css/style.css, loaded
   globally by layout.ejs) — light-only, no dark mode. Every class is
   selfcheck-prefixed so nothing here can collide with the rest of the
   site. */

.selfcheck-page {
  --selfcheck-gap: #C8102E; /* same red already used for Breach's wrong-answer state — reused, not new */
  --selfcheck-gap-soft: #FBE5E1;
}

.selfcheck-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px var(--pad) 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── Hero (server-rendered, crawlable) ── */
.selfcheck-eyebrow {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--accent-text-safe);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}
.selfcheck-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(34px, 5.5vw, 52px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.08;
  margin-bottom: 16px;
}
.selfcheck-lede {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.selfcheck-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.selfcheck-noscript {
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px;
  background: var(--surface);
}
.selfcheck-inline-link { color: var(--accent-text-safe); text-decoration: underline; text-underline-offset: 3px; }
.selfcheck-inline-link:hover { color: var(--ink); }

/* ── Shared panel shell ── */
.selfcheck-app { display: flex; flex-direction: column; gap: 20px; }
.selfcheck-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 32px;
}

/* ── Intro step ── */
.selfcheck-intro-screen { display: flex; flex-direction: column; gap: 18px; }
.selfcheck-intro-screen h2 { font-family: var(--font-heading); font-size: clamp(22px, 3vw, 28px); color: var(--ink); }
.selfcheck-meta-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.selfcheck-privacy-note {
  font-size: 14px;
  color: var(--text);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  padding: 14px 16px;
}

/* ── Progress ── */
.selfcheck-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}
.selfcheck-progress-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.selfcheck-progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}
.selfcheck-progress-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .selfcheck-progress-fill { transition: none; }
}

/* ── Question ── */
.selfcheck-question-fieldset { border: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 20px; }
.selfcheck-area-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text-safe);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
}
.selfcheck-legend {
  font-family: var(--font-heading);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  outline: none; /* focused programmatically for screen readers, not via click/tab ring */
}
.selfcheck-options { display: flex; flex-direction: column; gap: 10px; }
.selfcheck-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.selfcheck-option:hover { border-color: var(--accent-text-safe); background: var(--bg); }
.selfcheck-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent-text-safe);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.selfcheck-option input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent-text-safe);
  outline-offset: 2px;
}
.selfcheck-option-text { font-size: 15px; color: var(--text); line-height: 1.5; }

.selfcheck-nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }

/* ── Results ── */
.selfcheck-results { display: flex; flex-direction: column; gap: 28px; }
.selfcheck-result-top { display: flex; flex-direction: column; gap: 10px; }
.selfcheck-result-score {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  color: var(--ink);
}
.selfcheck-result-score span {
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.selfcheck-result-label {
  display: inline-block;
  align-self: flex-start;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text-safe);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 14px;
}
.selfcheck-result-summary { font-size: 16px; color: var(--text); line-height: 1.65; }

.selfcheck-priorities-heading {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text-safe);
  margin-bottom: 14px;
  display: block;
}
.selfcheck-priority-card {
  border: 1px solid var(--border);
  border-left: 3px solid var(--selfcheck-gap);
  border-radius: 4px;
  padding: 20px 22px;
}
.selfcheck-priority-card + .selfcheck-priority-card { margin-top: 12px; }
.selfcheck-priority-area {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.selfcheck-priority-field { margin-top: 10px; }
.selfcheck-priority-field-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.selfcheck-priority-field p { font-size: 14px; color: var(--text); line-height: 1.6; }

.selfcheck-rest-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.selfcheck-rest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}
.selfcheck-rest-row:last-child { border-bottom: none; }
.selfcheck-status {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.selfcheck-status--strong { color: var(--accent-text-safe); }
.selfcheck-status--partial { color: var(--muted); }
.selfcheck-status--gap { color: var(--selfcheck-gap); }

.selfcheck-disclaimer {
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ── After results: print / assessment / email ── */
.selfcheck-after { display: flex; flex-direction: column; gap: 20px; }
.selfcheck-after-row { display: flex; gap: 12px; flex-wrap: wrap; }

.selfcheck-assessment-plug {
  background: var(--ink);
  border-radius: 4px;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.selfcheck-assessment-plug p { font-size: 15px; color: #fff; line-height: 1.55; max-width: 42ch; margin: 0; }

.selfcheck-email-form { display: flex; flex-direction: column; gap: 14px; }
.selfcheck-email-row { display: flex; flex-direction: column; gap: 6px; }
.selfcheck-email-label { font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.selfcheck-email-input {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
}
.selfcheck-email-input:focus-visible { outline: 2px solid var(--accent-text-safe); outline-offset: 1px; }
.selfcheck-consent-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); }
.selfcheck-consent-row input { margin-top: 3px; accent-color: var(--accent-text-safe); }
.selfcheck-email-note { font-size: 12px; color: var(--muted); }
.selfcheck-email-success { font-size: 14px; color: var(--accent-text-safe); }
.selfcheck-email-error { font-size: 14px; color: var(--selfcheck-gap); }

/* Honeypot — present in the DOM for bots that auto-fill every field, never
   visible or reachable for a real visitor (off-screen, not display:none,
   so naive bots that skip hidden fields still fill it). */
.selfcheck-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Buttons: reuse the site's own classes directly (.btn-primary /
   .btn-ghost from style.css) wherever a button appears in this flow —
   nothing new to define here. ── */

@media (max-width: 640px) {
  .selfcheck-wrap { padding: 32px var(--pad) 64px; }
  .selfcheck-panel { padding: 22px; }
  .selfcheck-assessment-plug { flex-direction: column; align-items: stretch; flex-wrap: nowrap; padding: 20px; }
  .selfcheck-assessment-plug p { max-width: none; }
  .selfcheck-assessment-plug .btn-primary {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
  }
  .selfcheck-after-row { flex-direction: column; }
  .selfcheck-after-row .btn-primary,
  .selfcheck-after-row .btn-ghost { justify-content: center; }
}

/* ── Print ── */
@media print {
  .site-nav, .site-footer, .selfcheck-hero, .selfcheck-noscript,
  .selfcheck-after, #site-nav, footer.site-footer {
    display: none !important;
  }
  .selfcheck-wrap { padding: 0; max-width: 100%; }
  .selfcheck-panel { border: none; padding: 0; }
  body { background: #fff; }
}
