/*
 * WAA survey pages: direction C, "teal band" (chosen 2026-10-16 from three
 * mockups). A teal band carries the question; answers sit on white below it.
 * Mobile first, one column, big tap targets.
 */

@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/aileron-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/aileron-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/aileron-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Aileron'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/aileron-latin-800-normal.woff2') format('woff2'); }

/*
 * Colour. Every colour the theme already has comes from its tokens
 * (src/tokens/colors.css, loaded first as build/tokens.css); this block holds
 * only what is unique to the survey, in the theme's three tiers:
 *   1. Primitives: survey-only raw values.
 *   2. Semantic, --survey-*: meanings the theme has no token for, each on a
 *      theme primitive or a survey-only one.
 *   3. Component, --ws-*: what a colour is for, read from the theme's --waa-*
 *      semantics or --survey-*. Every rule below reads this tier only.
 * `npm run surveys` fails if a name here repeats a theme token.
 */
:root {
  /* ============================ 1. Primitives ============================ */
  /* White glass over the teal band. */
  --white-alpha-16: rgba(255, 255, 255, 0.16);
  --white-alpha-22: rgba(255, 255, 255, 0.22);

  /* ============================= 2. Semantic ============================= */
  --survey-ink: var(--slate-800);          /* navy text; the theme's ink is grey */
  --survey-hairline: var(--grey-200);      /* section and table rules */
  --survey-field: var(--grey-300);         /* text field outline */
  --survey-glass: var(--white-alpha-16);
  --survey-glass-strong: var(--white-alpha-22);

  /* ============================ 3. Component ============================= */
  --ws-page-bg: var(--waa-surface);
  --ws-text: var(--survey-ink);
  --ws-text-muted: var(--waa-body);
  --ws-text-link: var(--waa-teal-deep);
  --ws-text-ok: var(--waa-teal-deep);
  --ws-text-error: var(--waa-red-dark);
  --ws-border-soft: var(--survey-hairline);

  --ws-band-bg: var(--waa-teal-deep);
  --ws-band-text: var(--waa-on-accent);
  --ws-band-text-muted: var(--waa-off-white);
  --ws-band-chip-bg: var(--survey-glass);
  --ws-band-track: var(--survey-glass-strong);
  --ws-band-fill: var(--waa-on-accent);
  --ws-band-seg-now: var(--survey-ink);
  --ws-iconbox-bg: var(--waa-surface);

  --ws-accent: var(--waa-teal-dark);
  --ws-accent-wash: var(--waa-teal-wash);

  --ws-option-bg: var(--waa-surface);
  --ws-option-text: var(--survey-ink);
  --ws-option-border: var(--waa-border);
  --ws-option-mark: var(--waa-body-light);
  --ws-option-on-bg: var(--waa-teal-deep);
  --ws-option-on-text: var(--waa-on-accent);
  --ws-option-mark-on: var(--survey-ink);

  --ws-input-bg: var(--waa-surface);
  --ws-input-text: var(--survey-ink);
  --ws-input-border: var(--survey-field);

  --ws-button-primary-bg: var(--waa-red);
  --ws-button-primary-text: var(--waa-on-accent);
  --ws-button-dark-bg: var(--survey-ink);
  --ws-button-dark-text: var(--waa-on-accent);

  --ws-quote-bg: var(--waa-off-white);
  --ws-share-bg: var(--waa-surface);
  --ws-share-text: var(--survey-ink);
  --ws-share-border: var(--waa-teal-deep);
  --ws-card-bg: var(--waa-teal-deep);
  --ws-card-text: var(--waa-on-accent);
  --ws-card-text-muted: var(--waa-off-white);
  --ws-drop: var(--waa-red);               /* the Iron Pulse drop in the share image */

  --ws-font: 'Aileron', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ws-radius: 14px;
}

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

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

body.ws {
  margin: 0;
  background: var(--ws-page-bg);
  color: var(--ws-text);
  font-family: var(--ws-font);
  line-height: 1.4;
}

.ws-app {
  max-width: 640px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  outline: none;
}

.ws-screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── band ─────────────────────────────────────────────────────────────── */

.ws-band {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px 24px 34px;
  background: var(--ws-band-bg);
  color: var(--ws-band-text);
}
.ws-band--q { gap: 18px; padding: 14px 24px 30px; }

.ws-band__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

.ws-site {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ws-band-text-muted);
  text-decoration: none;
}
a.ws-site { display: inline-flex; align-items: center; min-height: 44px; }
a.ws-site:hover { color: var(--ws-band-text); text-decoration: underline; text-underline-offset: 3px; }

.ws-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ws-band-chip-bg);
  color: var(--ws-band-text);
  font-size: 14px;
  font-weight: 700;
}
.ws-chip--badge { align-self: flex-start; margin-top: 16px; }

.ws-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 10px 0 0;
  margin-left: -4px;
  border: 0;
  background: transparent;
  color: var(--ws-band-text);
  font: 600 16px/1 var(--ws-font);
  cursor: pointer;
}
.ws-back span { display: inline-flex; }

.ws-title { margin: 0; font-size: 50px; line-height: 1; font-weight: 800; letter-spacing: -0.025em; }
.ws-title--sm { font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; }
.ws-tagline { margin: 0; font-size: 21px; line-height: 1.35; font-weight: 500; }
.ws-q { margin: 0; font-size: 27px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; outline: none; }
.ws-qnote { margin: -6px 0 0; font-size: 15px; line-height: 1.45; color: var(--ws-band-text-muted); }
.ws-kicker { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; color: var(--ws-band-text-muted); }

.ws-progress { height: 4px; border-radius: 999px; background: var(--ws-band-track); overflow: hidden; }
.ws-progress__fill { height: 100%; border-radius: 999px; background: var(--ws-band-fill); transition: width 200ms ease; }

.ws-titlerow { display: flex; align-items: center; gap: 14px; }
.ws-titlerow .ws-q { font-size: 29px; line-height: 1.15; font-weight: 800; }
.ws-iconbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--ws-radius);
  background: var(--ws-iconbox-bg);
}

.ws-rowcount { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--ws-band-text-muted); white-space: nowrap; }
.ws-segs { display: flex; gap: 6px; flex-grow: 1; }
.ws-seg { flex: 1 1 0; height: 6px; border-radius: 999px; background: var(--ws-band-track); }
.ws-seg.is-done { background: var(--ws-band-fill); }
.ws-seg.is-now { background: var(--ws-band-seg-now); }

/* ── body ─────────────────────────────────────────────────────────────── */

.ws-body {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px 24px calc(32px + env(safe-area-inset-bottom));
}
.ws-body--sections { gap: 0; padding: 0 0 env(safe-area-inset-bottom); }

.ws-options { display: flex; flex-direction: column; gap: 12px; }

.ws-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 12px 18px;
  border: 2px solid var(--ws-option-border);
  border-radius: var(--ws-radius);
  background: var(--ws-option-bg);
  color: var(--ws-option-text);
  font: 600 18px/1.3 var(--ws-font);
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
/* Hover only where there is a real pointer, and only once it has moved on this
   screen (survey.js clears .is-fresh), so the answer under the last tap is not
   outlined as if chosen. */
@media (hover: hover) {
  .ws-screen:not(.is-fresh) .ws-option:not(:disabled):hover { border-color: var(--ws-accent); }
}
.ws-option[aria-pressed="true"] { background: var(--ws-option-on-bg); border-color: var(--ws-option-on-bg); color: var(--ws-option-on-text); }
.ws-option:disabled { opacity: 0.45; cursor: default; }

.ws-option__mark {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid var(--ws-option-mark);
  border-radius: 999px;
}
.ws-option[aria-pressed="true"] .ws-option__mark { border-color: var(--ws-option-mark-on); background: var(--ws-option-mark-on); }
.ws-option[aria-pressed="true"] .ws-option__mark::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  background: var(--ws-option-on-text);
}
.ws-option--multi .ws-option__mark { border-radius: 6px; }
.ws-option--multi[aria-pressed="true"] .ws-option__mark::after {
  inset: 3px 6px 6px;
  border-radius: 0;
  background: none;
  border: solid var(--ws-option-on-text);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.ws-hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--ws-text-muted); text-align: center; }
.ws-hint--left { text-align: left; }
.ws-hint--right { text-align: right; }
.ws-body > .ws-hint:last-child { margin-top: auto; }

.ws-label { font-size: 15px; font-weight: 600; }
.ws-input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 2px solid var(--ws-input-border);
  border-radius: 12px;
  background: var(--ws-input-bg);
  color: var(--ws-input-text);
  font: 400 17px/1.4 var(--ws-font);
}
.ws-input--area { padding: 12px 14px; resize: vertical; }
.ws-input:focus { border-color: var(--ws-accent); outline: none; box-shadow: 0 0 0 3px var(--ws-accent-wash); }
.ws-options--country { min-height: 120px; }

.ws-gridwrap { overflow-x: auto; }
.ws-grid { width: 100%; border-collapse: collapse; }
.ws-grid th, .ws-grid td { padding: 14px 8px; border-bottom: 1px solid var(--ws-border-soft); }
.ws-grid thead th { font-size: 14px; font-weight: 600; color: var(--ws-text-muted); text-align: center; vertical-align: bottom; }
.ws-grid tbody th { font-size: 16px; font-weight: 600; text-align: left; }
.ws-grid td { text-align: center; }
.ws-grid input { width: 22px; height: 22px; margin: 0; accent-color: var(--ws-accent); cursor: pointer; }

/* ── buttons and links ────────────────────────────────────────────────── */

.ws-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--ws-radius);
  font: 700 19px/1.2 var(--ws-font);
  text-decoration: none;
  cursor: pointer;
}
.ws-btn span { display: inline-flex; }
.ws-btn--primary { background: var(--ws-button-primary-bg); color: var(--ws-button-primary-text); }
.ws-btn--dark { min-height: 54px; font-size: 18px; background: var(--ws-button-dark-bg); color: var(--ws-button-dark-text); }
.ws-btn:disabled { opacity: 0.5; cursor: default; }
.ws-body > .ws-btn { margin-top: 8px; }

.ws-textlink { align-self: center; font-size: 14px; font-weight: 600; color: var(--ws-text-link); }

:where(.ws a, .ws button, .ws input, .ws textarea):focus-visible { outline: 3px solid var(--ws-accent); outline-offset: 2px; }
.ws-band :where(a, button):focus-visible { outline-color: var(--ws-band-text); }

/* ── intro ────────────────────────────────────────────────────────────── */

.ws-intro .ws-body { flex: 0 0 auto; gap: 18px; padding-bottom: 18px; }
.ws-reassure {
  list-style: none;
  margin: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--ws-border-soft);
  border-radius: 16px;
}
.ws-reassure li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; font-weight: 500; }
.ws-reassure svg { flex-shrink: 0; margin-top: 1px; color: var(--ws-accent); }

.ws-counter { margin: 0; display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ws-text-muted); }
.ws-counter[hidden] { display: none; }
.ws-counter__dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 999px; background: var(--ws-accent); box-shadow: 0 0 0 4px var(--ws-accent-wash); }

.ws-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 24px calc(30px + env(safe-area-inset-bottom));
}
.ws-consent { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ws-text-muted); }
.ws-consent a { color: var(--ws-text-link); font-weight: 600; }
.ws-noscript { margin: 0; font-size: 15px; color: var(--ws-text-error); }

.ws-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── closing screens ──────────────────────────────────────────────────── */

.ws-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px;
  border-bottom: 1px solid var(--ws-border-soft);
}
.ws-section:last-child { border-bottom: 0; }

.ws-iconline { display: flex; gap: 14px; align-items: center; }
.ws-iconline > span { display: inline-flex; flex-shrink: 0; }
.ws-iconline p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ws-text-muted); }
.ws-iconline--head { gap: 12px; }

.ws-h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; }
.ws-lede { margin: 0; font-size: 17px; line-height: 1.5; }
.ws-note { margin: -6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ws-text-muted); }

.ws-quote { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--ws-quote-bg); font-size: 15px; line-height: 1.5; }

.ws-sharerow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ws-sharebtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 50px;
  padding: 0 6px;
  border: 2px solid var(--ws-share-border);
  border-radius: 12px;
  background: var(--ws-share-bg);
  color: var(--ws-share-text);
  font: 700 15px/1.2 var(--ws-font);
  text-decoration: none;
  cursor: pointer;
}
.ws-sharebtn span { display: inline-flex; }

.ws-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  background: var(--ws-card-bg);
  color: var(--ws-card-text);
  text-decoration: none;
}
.ws-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ws-card__head > span:last-child { display: inline-flex; flex-shrink: 0; }
.ws-card__title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.ws-card__body { font-size: 16px; line-height: 1.5; color: var(--ws-card-text-muted); }

.ws-field { display: flex; flex-direction: column; gap: 6px; }
.ws-checks { display: flex; flex-direction: column; gap: 14px; }
.ws-check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.45; cursor: pointer; }
.ws-check input { flex-shrink: 0; width: 24px; height: 24px; margin: 0; accent-color: var(--ws-accent); }

.ws-msg { margin: 0; font-size: 15px; font-weight: 600; color: var(--ws-text-error); }
.ws-msg--ok { color: var(--ws-text-ok); }

@media (min-width: 720px) {
  .ws-band { padding-left: 40px; padding-right: 40px; }
  .ws-body, .ws-foot, .ws-section { padding-left: 40px; padding-right: 40px; }
  .ws-app { min-height: auto; margin-top: 32px; margin-bottom: 32px; border: 1px solid var(--ws-border-soft); border-radius: 20px; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-option, .ws-progress__fill { transition: none; }
}
