/* ============================================================================
   AI Fluency Check: the one page on the site that runs light-on-dark instead
   of dark-on-light. Deliberate, agreed with Sebastian: it should feel like a
   focused app sitting inside the site, not another scroll section. Reuses
   every token from site.css (--navy-*, --gold*, --alabaster, --radius,
   --sc-font-display, --sc-font-text, --gutter, --bar-h). Nothing here is a
   new colour.
   ========================================================================== */

.afc-hairline { --afc-line: rgba(11, 31, 77, 0.14); }

.afc-hero, .afc-app {
  --afc-line: rgba(11, 31, 77, 0.14);
  position: relative; z-index: 10;
  background: var(--alabaster); color: var(--navy-900);
}

/* ------------------------------------------------------------- top bar --- */
/* the page bar is fixed and expects a dark page behind it until it scrolls;
   force the solid state look from the first frame on this light page */
body.afc-page .bar { background: var(--navy-900); border-bottom: 1px solid rgba(197, 160, 89, 0.22); }

/* ---------------------------------------------------------------- hero --- */
.afc-hero { padding: calc(var(--bar-h) + clamp(3rem, 8vh, 5.5rem)) 0 clamp(3rem, 7vh, 4.5rem); text-align: center; }
.afc-hero .wrap { max-width: 50rem; }
.afc-hero .eyebrow { display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--navy-700); }
.afc-hero .eyebrow::before, .afc-hero .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--gold); }

.afc-title {
  margin: 0 0 1.5rem; font-family: var(--sc-font-display); font-weight: 600;
  font-size: clamp(2.1rem, 1.5rem + 2.2vw, 3.4rem); line-height: 1.1; letter-spacing: -0.01em;
  color: var(--navy-900);
}
.afc-title .afc-accent { color: var(--gold-deep); }

.afc-sub { max-width: 34rem; margin: 0 auto 2.8rem; color: rgba(11, 31, 77, 0.68); font-size: 1.06rem; line-height: 1.6; }

.afc-tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 0 auto 2.4rem; max-width: 38rem; text-align: left; }
.afc-track {
  display: block; width: 100%; border: 1px solid var(--afc-line); border-radius: var(--radius);
  padding: 1.6rem 1.5rem; cursor: pointer; background: #fff; font-family: var(--sc-font-text);
  transition: border-color 160ms, background-color 160ms; min-height: 44px;
}
.afc-track:hover, .afc-track:focus-visible { border-color: rgba(197, 160, 89, 0.6); }
.afc-track.is-active { border-color: var(--gold); background: rgba(197, 160, 89, 0.07); }
.afc-track__n { display: block; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 0.6rem; }
.afc-track b { display: block; font-family: var(--sc-font-display); font-weight: 600; font-size: 1.3rem; color: var(--navy-900); margin-bottom: 0.4rem; }
.afc-track__meta { display: block; font-size: 0.84rem; color: rgba(11, 31, 77, 0.6); }

.afc-foot { font-size: 0.84rem; color: rgba(11, 31, 77, 0.55); margin-top: 1.4rem; }

/* -------------------------------------------------------------- shared --- */
.afc-app { padding: var(--bar-h) 0 clamp(3rem, 7vh, 5rem); scroll-margin-top: var(--bar-h); }
.afc-app .wrap { max-width: 46rem; }
.afc-app[hidden] { display: none; }

.afc-screen[hidden] { display: none; }

/* --------------------------------------------------------- question UI --- */
.afc-q { padding-top: clamp(2.5rem, 6vh, 4rem); max-width: 40rem; margin: 0 auto; }
.afc-progress { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 2.1rem; }
.afc-progress__bar { flex: 1; height: 2px; background: var(--afc-line); border-radius: 2px; overflow: hidden; }
.afc-progress__fill { display: block; height: 100%; background: var(--gold); transition: width 220ms ease; }
.afc-progress__count { font-size: 0.74rem; letter-spacing: 0.04em; color: rgba(11, 31, 77, 0.55); white-space: nowrap; }

.afc-q__hint { font-size: 0.82rem; font-style: italic; color: var(--gold-deep); margin: 0.7rem 0 0; }
.afc-q__title { font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); line-height: 1.25; margin: 0.4rem 0 0; color: var(--navy-900); }

.afc-options { list-style: none; margin: 2rem 0 2.2rem; padding: 0; display: grid; gap: 0.7rem; }
.afc-option {
  display: flex; align-items: flex-start; gap: 0.7rem; width: 100%; text-align: left;
  border: 1px solid var(--afc-line); border-radius: var(--radius); padding: 0.9rem 1.15rem;
  font-family: var(--sc-font-text); font-size: 0.94rem; line-height: 1.45; color: rgba(11, 31, 77, 0.88);
  background: #fff; cursor: pointer; min-height: 44px; transition: border-color 140ms, background-color 140ms;
}
.afc-option:hover, .afc-option:focus-visible { border-color: rgba(197, 160, 89, 0.55); }
.afc-option[aria-pressed="true"] { border-color: var(--gold); background: rgba(197, 160, 89, 0.08); color: var(--navy-900); font-weight: 500; }
.afc-option__dot { flex: none; width: 0.55rem; height: 0.55rem; margin-top: 0.4rem; border-radius: 50%; border: 1px solid rgba(11, 31, 77, 0.3); }
.afc-option[aria-pressed="true"] .afc-option__dot { border-color: var(--gold); background: var(--gold); }

.afc-q__nav { display: flex; justify-content: space-between; align-items: center; }
.afc-back { font-size: 0.85rem; color: rgba(11, 31, 77, 0.5); background: none; border: 0; cursor: pointer; padding: 0.5rem 0; font-family: var(--sc-font-text); min-height: 44px; }
.afc-back:hover, .afc-back:focus-visible { color: var(--navy-900); }
.afc-back[hidden] { visibility: hidden; }
.afc-next[disabled] { opacity: 0.4; cursor: not-allowed; }

/* -------------------------------------------------------- contact gate --- */
.afc-gate { padding-top: clamp(3rem, 7vh, 4.5rem); max-width: 36rem; margin: 0 auto; text-align: center; }
.afc-gate .eyebrow { justify-content: center; display: flex; gap: 0.6rem; }
.afc-gate .eyebrow::before, .afc-gate .eyebrow::after { content: ""; width: 28px; height: 1px; background: var(--gold); }
.afc-gate h2 { font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.8rem, 1.5rem + 1.1vw, 2.4rem); line-height: 1.15; margin: 0 0 0.9rem; color: var(--navy-900); }
.afc-gate__sub { color: rgba(11, 31, 77, 0.65); font-size: 0.98rem; max-width: 28rem; margin: 0 auto 0.5rem; line-height: 1.55; }
.afc-gate__required { display: block; font-size: 0.76rem; color: rgba(11, 31, 77, 0.45); margin-bottom: 1.8rem; }

.afc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.6rem; text-align: left; }
.afc-field { display: flex; flex-direction: column; gap: 0.4rem; }
.afc-field label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(11, 31, 77, 0.55); }
.afc-field .req { color: var(--gold-deep); }
.afc-field input {
  background: #fff; border: 1px solid var(--afc-line); border-radius: var(--radius);
  padding: 0.75rem 0.9rem; color: var(--navy-900); font-family: var(--sc-font-text); font-size: 0.92rem; min-height: 44px;
}
.afc-field input::placeholder { color: rgba(11, 31, 77, 0.32); }
.afc-field input[aria-invalid="true"] { border-color: #B23A3A; }
.afc-gate__error { font-size: 0.82rem; color: #B23A3A; margin: 0 0 1rem; display: none; }
.afc-gate__error.is-visible { display: block; }
.afc-gate__privacy { font-size: 0.76rem; color: rgba(11, 31, 77, 0.5); margin-top: 1.1rem; }

/* ---------------------------------------------------------------- score --- */
.afc-summary { background: var(--navy-900); color: var(--alabaster); margin: 0 -1.5rem clamp(2rem, 3vw, 2.8rem); padding: clamp(2.2rem, 4vh, 3rem) 1.5rem; }
@media (min-width: 40em) { .afc-summary { border-radius: var(--radius); margin-left: 0; margin-right: 0; } }
.afc-summary__inner { max-width: 43rem; margin: 0 auto; }
.afc-summary .eyebrow { display: flex; align-items: center; gap: 0.6rem; color: var(--gold-hi); margin-bottom: 0; }

.afc-stages { display: flex; gap: 0.5rem; margin: 1.6rem 0 1.6rem; }
.afc-stage { flex: 1; text-align: center; padding: 0 0.3rem 0.7rem; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; border-bottom: 2px solid rgba(251, 249, 244, 0.18); color: rgba(251, 249, 244, 0.45); }
.afc-stage.is-current { border-bottom-color: var(--gold); color: var(--alabaster); font-weight: 500; }

.afc-score-name { font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem); margin: 0 0 0.2rem; color: var(--alabaster); }
.afc-score-num { font-size: 0.92rem; color: var(--gold-hi); font-weight: 500; margin-bottom: 0.9rem; display: block; }
.afc-score-desc { color: rgba(251, 249, 244, 0.8); max-width: 38rem; line-height: 1.6; font-size: 1.02rem; margin: 0; }

.afc-next-line { margin-top: 1.4rem; padding-top: 1.3rem; border-top: 1px solid rgba(251, 249, 244, 0.16); font-size: 0.9rem; color: rgba(251, 249, 244, 0.7); }
.afc-next-line b { color: var(--gold-hi); font-weight: 500; }

/* -------------------------------------------------------------- pillars --- */
.afc-section-head { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin: 0 0 1.1rem; }
.afc-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0 0 2.2rem; list-style: none; padding: 0; }
.afc-pillar { border: 1px solid var(--afc-line); border-radius: var(--radius); padding: 1.3rem; background: #fff; }
.afc-pillar__tag { display: inline-block; font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); background: rgba(197, 160, 89, 0.12); border-radius: var(--radius); padding: 0.18rem 0.5rem; margin-bottom: 0.6rem; }
.afc-pillar__label { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(11, 31, 77, 0.5); margin: 0; }
.afc-pillar__pct { font-family: var(--sc-font-display); font-size: 2rem; margin: 0.3rem 0 0.7rem; color: var(--navy-900); }
.afc-pillar__meter { height: 3px; background: var(--afc-line); border-radius: 2px; overflow: hidden; margin-bottom: 0.9rem; }
.afc-pillar__meter i { display: block; height: 100%; background: var(--gold); }
.afc-pillar__verdict { font-size: 0.96rem; font-weight: 500; color: var(--navy-900); line-height: 1.35; margin: 0 0 0.4rem; }
.afc-pillar__detail { font-size: 0.82rem; color: rgba(11, 31, 77, 0.58); line-height: 1.5; margin: 0; }

/* ------------------------------------------------------------ close cta --- */
.afc-cta { background: var(--navy-900); color: var(--alabaster); margin: 2.4rem -1.5rem 0; padding: clamp(2rem, 4vh, 2.6rem) 1.5rem; }
@media (min-width: 40em) { .afc-cta { border-radius: var(--radius); margin-left: 0; margin-right: 0; } }
.afc-cta__inner { max-width: 43rem; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1.6rem; align-items: center; justify-content: space-between; }
.afc-cta h3 { font-family: var(--sc-font-display); font-weight: 600; font-size: 1.3rem; margin: 0 0 0.4rem; color: var(--alabaster); }
.afc-cta p { font-size: 0.92rem; color: rgba(251, 249, 244, 0.72); max-width: 24rem; margin: 0 0 0.9rem; }
.afc-cta__contacts { display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.92rem; }
.afc-cta__contacts a { color: var(--alabaster); text-decoration: none; border-bottom: 1px solid var(--gold); }
.afc-restart { display: block; text-align: center; margin: 1.8rem auto 0; font-size: 0.84rem; color: rgba(11, 31, 77, 0.5); background: none; border: 0; cursor: pointer; min-height: 44px; }
.afc-restart:hover, .afc-restart:focus-visible { color: var(--navy-900); }

/* ------------------------------------------------------------- loading --- */
.afc-loading { padding: clamp(3rem, 7vh, 5rem) 0; text-align: center; color: rgba(11, 31, 77, 0.6); }

/* -------------------------------------------------------- homepage card -- */
/* the discoverability block dropped into the dark homepage, between sections */
.afc-promo {
  position: relative; z-index: 10;
  padding: clamp(3.5rem, 10vh, 6.5rem) 0; border-top: 1px solid var(--sc-hairline);
}
.afc-promo__card {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  padding: clamp(1.8rem, 3.6vw, 3rem); background: linear-gradient(180deg, rgba(18, 49, 112, 0.92) 0%, rgba(10, 30, 72, 0.95) 100%);
  border: 1px solid rgba(197, 160, 89, 0.4); border-radius: var(--radius);
  box-shadow: 0 2px 4px hsl(var(--sc-shadow-color) / 0.3), 0 34px 70px -24px hsl(var(--sc-shadow-color) / 0.75), inset 0 1px 0 rgba(251, 249, 244, 0.08);
}
.afc-promo__title { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(1.7rem, 1.25rem + 1vw, 2.2rem); line-height: 1.1; color: var(--alabaster); }
.afc-promo__body { margin: 0.7rem 0 0; color: var(--sc-ink-soft); font-size: 1rem; line-height: 1.6; max-width: 32rem; }
.afc-promo__meta { margin: 1.1rem 0 0; font-size: 0.82rem; color: var(--gold-hi); }
.afc-promo__actions { display: flex; justify-content: flex-start; }
@media (max-width: 860px) {
  .afc-promo__card { grid-template-columns: 1fr; }
  .afc-promo__actions { justify-content: stretch; }
  .afc-promo__actions .btn { width: 100%; }
}

/* ------------------------------------------------------------- phones ---- */
@media (max-width: 640px) {
  .afc-tracks, .afc-pillars, .afc-fields { grid-template-columns: 1fr; }
}

/* Tighter still on phones: "Start the check" should not need a scroll to
   reach on a typical handset. Shrinks the landing hero's vertical rhythm
   without touching its content or hierarchy. */
@media (max-width: 480px) {
  .afc-hero { padding-top: calc(var(--bar-h) + 1.6rem); padding-bottom: 2.4rem; }
  .afc-hero .eyebrow { margin-bottom: 1rem; }
  .afc-title { font-size: 1.85rem; line-height: 1.16; margin-bottom: 1rem; }
  .afc-sub { font-size: 0.96rem; margin-bottom: 1.8rem; }
  .afc-tracks { gap: 0.8rem; margin-bottom: 1.6rem; }
  .afc-track { padding: 1.1rem 1.2rem; }
  .afc-track b { font-size: 1.15rem; margin-bottom: 0.25rem; }
  .afc-track__n { margin-bottom: 0.35rem; }
}
