/* Plain styling for the walking skeleton. The design pass replaces the look,
   not the structure. Every color is a token from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.45 var(--font-sans);
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-4);
}

.site-name { font: 500 0.95rem/1.2 var(--font-sans); }

.theme-toggle {
  min-height: var(--tap);
  padding: 0 var(--space-4);
  background: transparent;
  border: 1px solid var(--control-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: 0.875rem;
}

.draft-banner {
  max-width: var(--content);
  margin: 0 auto var(--space-4);
  padding: var(--space-2) var(--space-4);
  border: 1px dashed var(--control-border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}
@media (max-width: 40rem) {
  .draft-banner { margin-inline: var(--space-4); }
}

.screen {
  max-width: var(--content);
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-12);
}

/* Headings get focus on each new screen so screen readers announce it. */
.screen h1:focus { outline: none; }

.error h1 { font: 500 1.5rem/1.3 var(--font-sans); }

/* ---------- Shared text and buttons ---------- */

.eyebrow {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
  font: 500 0.75rem/1.2 var(--font-sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.display, .prompt {
  margin: 0 0 var(--space-6);
  font-family: var(--font-serif);
  font-weight: 400;
  text-wrap: balance;
}
.display { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); line-height: 1.1; }
.prompt { font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem); line-height: 1.25; }
.accent-word { color: var(--accent); }

.lede { margin: 0 0 var(--space-4); font-size: 1.125rem; line-height: 1.4; }

.primary, .secondary {
  min-height: var(--tap);
  padding: 0 var(--space-6);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
}
.primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.secondary { background: transparent; border: 1px solid var(--control-border); }

.actions { display: flex; gap: var(--space-3); margin-top: var(--space-8); }

/* ---------- Intro ---------- */

.intro { text-align: center; padding-top: var(--space-8); }
.facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-6);
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.resume { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }
.resume-note { width: 100%; margin: 0 0 var(--space-1); color: var(--text-muted); font-size: 0.9375rem; }
.fine-print { margin-top: var(--space-8); color: var(--text-muted); font-size: 0.875rem; line-height: 1.35; }
.fine-print p { margin: 0 0 var(--space-2); }

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

.progress { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-8); }
.progress-track { flex: 1; height: 3px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 300ms ease; }
.counter { margin: 0; color: var(--text-muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

.likert {
  display: grid;
  grid-template-columns: repeat(var(--points), minmax(0, 1fr));
  gap: var(--space-1);
}
.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: var(--space-2) 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 200ms ease;
}
.likert-dot {
  width: var(--size);
  height: var(--size);
  /* Every dot takes the same height, so the labels line up under circles of any size. */
  margin-block: calc((36px - var(--size)) / 2);
  border: 2px solid var(--control-border);
  border-radius: 50%;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.likert-label { color: var(--text-muted); font-size: 0.8125rem; line-height: 1.25; text-align: center; }
.likert-option[aria-checked="true"] .likert-dot { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface); }
.likert-option[aria-checked="true"] .likert-label { color: var(--text); font-weight: 500; }
/* The fade lasts only for the short pause before the next question. */
.likert.advancing .likert-option[aria-checked="false"] { opacity: 0.55; }

/* Hover only where there is a pointer: touchscreens have no hover. */
@media (hover: hover) and (pointer: fine) {
  .likert-option:hover .likert-dot { transform: translateY(-2px); border-color: var(--accent); }
}
/* Phones: seven labels do not fit in one row, so only the two endpoint labels
   stay visible, below the circles. The others are still read by screen readers. */
@media (max-width: 30rem) {
  .likert { position: relative; padding-bottom: 2.75rem; }
  .likert-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .likert-option:first-child .likert-label,
  .likert-option:last-child .likert-label {
    top: 3.75rem; width: 45%; height: auto; overflow: visible; clip: auto; white-space: normal;
  }
  .likert-option:first-child .likert-label { left: 0; text-align: left; }
  .likert-option:last-child .likert-label { right: 0; text-align: right; }
}

/* ---------- Result ---------- */

.result h2 { margin: var(--space-8) 0 var(--space-2); font: 500 1.125rem/1.3 var(--font-sans); }
.result p { margin: 0 0 var(--space-3); }
.chart { margin: var(--space-6) 0; }
.grid-chart { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto; overflow: visible; }
.grid-frame { fill: none; stroke: var(--control-border); stroke-width: 1; }
.grid-zone { fill: var(--zone); }
.grid-cut { stroke: var(--control-border); stroke-width: 1; stroke-dasharray: 4 4; }
.grid-type { fill: var(--text-muted); font: 500 13px var(--font-sans); }
.grid-axis { fill: var(--text-muted); font: 400 13px var(--font-sans); }
.grid-tick { fill: var(--text-muted); font: 400 12px var(--font-sans); }
.grid-dot { fill: var(--text); stroke: var(--bg); stroke-width: 3; }
.grid-dot-previous { fill: var(--bg); stroke: var(--text-muted); stroke-width: 2; }
.grid-trajectory { stroke: var(--text-muted); stroke-width: 2; }
.grid-arrowhead { fill: var(--text-muted); }
.save { margin-top: var(--space-8); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius); }
.save h2 { margin-top: 0; }
.save .actions { margin-top: var(--space-3); flex-wrap: wrap; }
.save .status { color: var(--text-muted); font-size: 0.875rem; }
.journey-link { overflow-wrap: anywhere; }
.journey-link code { font-size: 0.875rem; }

/* ---------- Journey page ---------- */

.journey-quiz { margin-top: var(--space-8); }
.journey-quiz h2 { margin: 0 0 var(--space-2); font: 500 1.125rem/1.3 var(--font-sans); }
.journey-results { margin: 0; padding: 0; list-style: none; }
.journey-results li { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.journey-results li > span:first-child { color: var(--text-muted); min-width: 10rem; }
.journey-results strong { font-weight: 500; }
.journey-scores { color: var(--text-muted); font-size: 0.9375rem; width: 100%; }
.journey-quiz .actions { margin-top: var(--space-3); }

.scores { display: grid; gap: var(--space-2); margin: 0 0 var(--space-2); padding: 0; list-style: none; }
.scores li { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.scores strong { font-weight: 500; font-variant-numeric: tabular-nums; }
.score-note { color: var(--text-muted); font-size: 0.875rem; line-height: 1.35; }
.support-note { padding-left: var(--space-4); border-left: 2px solid var(--control-border); color: var(--text-muted); }

/* ---------- Tally ---------- */

.tally { padding-top: var(--space-12); text-align: center; }
.tally h1 { font: 400 1.5rem/1.3 var(--font-serif); color: var(--text-muted); }
.error li { color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
