/* ============================================================================
   GTM AI Readiness Assessment
   Extends the site tokens in /styles.css (loaded first). No content strings here.
   ============================================================================ */

/* The main site is dark only. Provide a light palette so the assessment
   respects prefers-color-scheme, remapping the same tokens the site uses. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7f4;
    --surface: #ffffff;
    --surface2: #eeeeea;
    --red: #16a34a;
    --red-bright: #15803d;
    --on-green: #ffffff;
    --white: #14140f;
    --grey: #6b6b63;
    --grey-light: #3d3d38;
    --border: #d9d9d2;
  }
}

/* ---- Layout -------------------------------------------------------------- */

body.assessment-page {
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
}

.a-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

.a-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
}

.a-header .a-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.a-header .a-logo img { width: 30px; height: 28px; object-fit: contain; }

.a-logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 0.08em;
  color: var(--white);
}
.a-logo-name span { color: var(--red); }

.a-header .a-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: right;
}

/* ---- Progress ---------------------------------------------------------- */

.a-progress {
  height: 3px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 48px;
}

.a-progress-fill {
  height: 100%;
  background: var(--red);
  border-radius: 100px;
  width: 0;
  transition: width 0.3s ease;
}

.a-progress[hidden] { display: none; }

/* ---- Question screen -------------------------------------------------- */

/* Neutralise the site-wide `section { padding: 100px 0; border-bottom }` from
   styles.css - the assessment screens are <section> elements and don't want it. */
.a-screen {
  padding: 0;
  border-bottom: 0;
  animation: a-fade 0.25s ease;
}

@keyframes a-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.a-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

/* ---- Intro blurb (first screen only) -------------------------------- */
/* Mirrors the site's page hero: big Bebas title with a coloured accent line,
   then a lighter lead paragraph. */

.a-intro {
  margin-bottom: 44px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.a-intro-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 20px;
}
.a-intro-title em {
  font-style: normal;
  color: var(--red);
}

.a-intro-lead {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.65;
  color: var(--grey-light);
  max-width: 60ch;
  margin-bottom: 12px;
}
.a-intro-lead:last-child { margin-bottom: 0; }

.a-prompt {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(20px, 3.2vw, 26px);
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--white);
  margin-bottom: 14px;
  max-width: 38ch;
}

.a-help {
  font-size: 14px;
  font-style: italic;
  color: var(--grey);
  line-height: 1.6;
  margin-bottom: 8px;
  max-width: 52ch;
}

.a-options {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--grey-light);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.a-option-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.a-option-label {
  font-weight: 500;
}

.a-option-desc {
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--grey);
}

.a-option[aria-checked="true"] .a-option-desc,
.a-option[aria-pressed="true"] .a-option-desc {
  color: var(--grey-light);
}

.a-option:hover { border-color: var(--grey); }

.a-option:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.a-option[aria-checked="true"],
.a-option[aria-pressed="true"] {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--surface));
  color: var(--white);
}

.a-option-key {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--grey);
  margin-top: 1px;
}

.a-option[aria-checked="true"] .a-option-key,
.a-option[aria-pressed="true"] .a-option-key {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-green);
}

.a-multi-note {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 18px;
}

/* ---- Nav buttons ---------------------------------------------------- */

.a-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.a-btn {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 30px;
  border: 1px solid var(--red);
  background: var(--red);
  color: var(--on-green);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, opacity 0.2s;
}
.a-btn:hover { background: var(--red-bright); border-color: var(--red-bright); transform: translateY(-2px); }
.a-btn:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.a-btn[disabled] { opacity: 0.35; cursor: not-allowed; transform: none; }

.a-btn-ghost {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 22px;
  background: transparent;
  border: 1px solid var(--grey);
  color: var(--grey);
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.a-btn-ghost:hover { background: transparent; border-color: var(--white); color: var(--white); }
.a-btn-ghost:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---- Results ------------------------------------------------------- */

.a-result-kicker {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}

.a-archetype-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(44px, 9vw, 76px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--red);
  margin-bottom: 16px;
}

.a-archetype-line {
  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  max-width: 40ch;
  margin-bottom: 44px;
}

.a-caption {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--grey-light);
  margin: 0 0 14px;
  line-height: 1.5;
}

/* ---- Figures row: quadrant map + radar side by side ---- */
.a-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.a-figure { flex: 1 1 260px; min-width: 0; }

/* ---- Archetype quadrant map ---- */
.a-map-wrap { position: relative; --map-size: 100%; max-width: 300px; }

.a-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}

.a-map-quad {
  position: absolute;
  width: 50%;
  height: 50%;
  padding: 12px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.a-map-quad.q-tl { top: 0; left: 0; border-right: 1px dashed var(--border); border-bottom: 1px dashed var(--border); }
.a-map-quad.q-tr { top: 0; right: 0; border-bottom: 1px dashed var(--border); }
.a-map-quad.q-bl { bottom: 0; left: 0; border-right: 1px dashed var(--border); }
.a-map-quad.q-br { bottom: 0; right: 0; }
.a-map-quad.is-you {
  background: color-mix(in srgb, var(--red) 14%, var(--surface));
}
.a-map-quad-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--grey);
}
.a-map-quad.is-you .a-map-quad-name { color: var(--red); }

.a-map-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg);
  transform: translate(-50%, 50%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 35%, transparent);
}

.a-map-axis {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--grey-light);
  line-height: 1.5;
}
.a-map-axis-x { margin: 10px 0 0; }

/* ---- Radar ---- */
.a-radar-wrap { max-width: 320px; padding: 6px 0 0; }
.a-radar { width: 100%; height: auto; display: block; overflow: visible; }
.a-radar-grid { fill: none; stroke: var(--border); }
.a-radar-spoke { stroke: var(--border); }
.a-radar-area {
  fill: color-mix(in srgb, var(--red) 22%, transparent);
  stroke: var(--red);
  stroke-width: 2;
  stroke-linejoin: round;
}
.a-animate .a-radar-area { animation: a-radar-in 0.45s ease both; transform-origin: center; }
@keyframes a-radar-in { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.a-radar-dot { fill: var(--red); }
.a-radar-dot.is-low { r: 5; }
.a-radar-name {
  font-family: 'Space Mono', monospace;
  font-size: 8px;
  fill: var(--grey-light);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.a-radar-score {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  fill: var(--white);
}
.a-radar-name.is-low { fill: var(--red); }
.a-radar-score.is-low { fill: var(--red); }

/* ---- Bar chart ---- */
.a-chart { margin: 0 0 8px; max-width: 560px; }
.a-bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 40px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.a-bar-row:last-child { border-bottom: 1px solid var(--border); }
.a-bar-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey-light);
}
.a-bar-row.is-low .a-bar-label { color: var(--red); }
.a-bar-track {
  height: 10px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
}
.a-bar-fill {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: var(--red);
  opacity: 0.5;
  width: 0;
}
.a-animate .a-bar-fill { transition: width 0.45s ease; }
.a-bar-fill.is-low { opacity: 1; }
.a-bar-value {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--white);
}
.a-bar-row.is-low .a-bar-value { color: var(--red); }

/* Gate */
.a-divider {
  margin: 48px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.a-gate {
  margin-top: 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.a-gate-microcopy {
  font-size: 15px;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: 20px;
}

.a-field { margin-bottom: 16px; }

.a-field label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}

.a-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
}
.a-field input:focus-visible { outline: 2px solid var(--red); outline-offset: 1px; }

.a-field-help {
  font-size: 12px;
  color: var(--grey);
  margin-top: 5px;
}

.a-warning {
  font-size: 13px;
  color: var(--red);
  margin: -6px 0 16px;
}
.a-warning[hidden] { display: none; }

.a-reassurance {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--grey);
  margin-top: 16px;
}

.a-gate-sent {
  font-size: 14px;
  color: var(--grey);
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.a-gate-sent strong { color: var(--white); }

/* Stage two */
.a-detail[hidden] { display: none; }
.a-detail { margin-top: 8px; }

.a-section {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.a-section-title {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 20px;
}

.a-detail-archetype {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  letter-spacing: 0.01em;
  color: var(--red);
  margin-bottom: 12px;
}

.a-axis { margin-bottom: 26px; }
.a-axis-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.a-axis-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--white);
}
.a-axis-score {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}
.a-axis-blurb {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  margin-bottom: 8px;
}
.a-axis-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey-light);
}

.a-note {
  font-size: 15px;
  line-height: 1.7;
  color: var(--white);
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border-left: 3px solid var(--red);
  padding: 16px 20px;
  margin-bottom: 14px;
}

.a-flag {
  font-size: 14px;
  line-height: 1.65;
  color: var(--grey-light);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.a-flag:first-child { border-top: 1px solid var(--border); }

.a-actions { list-style: none; margin: 0; padding: 0; }
.a-action {
  display: flex;
  gap: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-light);
  padding: 12px 0;
}
.a-action::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  background: var(--red);
  border-radius: 50%;
}

.a-play {
  margin-top: 8px;
  padding: 24px;
  background: color-mix(in srgb, var(--red) 8%, var(--surface));
  border: 1px solid var(--red);
  border-radius: 10px;
}
.a-play-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.01em;
  color: var(--white);
}
.a-next {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grey-light);
  margin-top: 16px;
}

.a-retake {
  display: inline-block;
  margin-top: 48px;
  padding: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--grey);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.a-retake:hover { color: var(--red); border-color: var(--red); }
.a-retake:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---- Error / loading --------------------------------------------- */
.a-error {
  font-size: 15px;
  line-height: 1.7;
  color: var(--white);
  border-left: 3px solid var(--red);
  padding: 16px 20px;
  background: var(--surface);
}
.a-loading {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---- Footer note ------------------------------------------------- */
.a-foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--grey);
}
.a-foot a { color: var(--grey); }

/* ---- Reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .a-screen { animation: none; }
  .a-progress-fill { transition: none; }
  .a-animate .a-radar-area { animation: none; }
  .a-btn { transition: none; }
  .a-btn:hover { transform: none; }
}

/* ---- Small screens ---------------------------------------------- */
@media (max-width: 560px) {
  .a-figures { gap: 32px; }
  .a-map-wrap, .a-radar-wrap { max-width: 280px; margin: 0 auto; }
  .a-bar-row { grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; }
  .a-bar-track { grid-column: 1 / -1; order: 3; }
  .a-nav { flex-direction: column-reverse; align-items: stretch; }
  .a-btn, .a-btn-ghost { width: 100%; text-align: center; }
  .a-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .a-header .a-eyebrow { text-align: left; }
}

/* ---- Print: fit a result onto one page ------------------------- */
@media print {
  :root {
    --bg: #ffffff; --surface: #ffffff; --surface2: #e9e9e9;
    --white: #000000; --grey: #555555; --grey-light: #1c1c1c;
    --border: #b6b6b6; --red: #0a7a34; --red-bright: #0a7a34; --on-green: #ffffff;
  }
  @page { margin: 12mm; }
  body.assessment-page { background: #fff; font-size: 10px; }
  .a-progress, .a-nav, .a-gate, .a-gate-sent, .a-header .a-eyebrow, .a-foot,
  .a-help, .a-multi-note, .a-divider, .a-axis-blurb, .a-result-kicker,
  .a-section-title, .a-caption, .a-figures, .a-retake { display: none !important; }
  .a-shell { max-width: 100%; padding: 0; }
  .a-header { margin-bottom: 6px; }
  .a-detail[hidden] { display: block !important; }
  .a-screen { animation: none; }
  body.assessment-page { min-height: 0; }

  .a-archetype-name { font-size: 26px; margin-bottom: 3px; line-height: 1; }
  .a-archetype-line { font-size: 12px; line-height: 1.35; margin-bottom: 10px; max-width: none; font-weight: 500; }

  .a-chart { margin: 0 0 6px; max-width: none; }
  .a-bar-row { padding: 3px 0; grid-template-columns: 150px 1fr 28px; gap: 10px; }
  .a-bar-label { font-size: 9px; }
  .a-bar-value { font-size: 10px; }
  .a-bar-fill { transition: none !important; opacity: 0.55; }
  .a-bar-fill.is-low { opacity: 1; }

  .a-section { margin-top: 10px; padding-top: 6px; page-break-inside: avoid; }
  .a-section:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
  .a-detail-archetype { font-size: 18px; margin-bottom: 4px; }
  .a-axis { margin-bottom: 7px; page-break-inside: avoid; }
  .a-axis-head { margin-bottom: 2px; }
  .a-axis-name { font-size: 12px; }
  .a-axis-score { font-size: 9px; }
  .a-axis-body { font-size: 9.5px; line-height: 1.32; }
  .a-note { font-size: 9.5px; line-height: 1.32; padding: 6px 10px; margin-bottom: 8px; }
  .a-flag { font-size: 9.5px; line-height: 1.32; padding: 5px 0; }
  .a-actions { column-count: 2; column-gap: 20px; }
  .a-action { font-size: 9.5px; line-height: 1.3; padding: 3px 0; page-break-inside: avoid; }
  .a-action::before { margin-top: 6px; }
  .a-play { padding: 10px 12px; page-break-inside: avoid; }
  .a-play-name { font-size: 16px; }
  .a-play-lane { font-size: 9px; }
  .a-next { font-size: 9.5px; margin-top: 8px; }

  a[href]::after { content: ''; }
}
