/* ============================================================
   Relationship Vision Alignment
   Shares the visual system with Survival Instinct Assessment:
   Figtree, teal/gold palette, sage neutrals, warm cream paper.
   ============================================================ */

:root {
  /* Brand */
  --teal-50:   #ECF6F5;
  --teal-100:  #D6EAE9;
  --teal-200:  #A9D7D4;
  --teal-300:  #6FC0BC;
  --teal:      #3DBDB9;
  --teal-dark: #297E7B;
  --teal-deep: #1E5F5C;

  --sage:      #BABBA9;
  --sage-soft: #DEDED4;
  --sage-pale: #F1F0EA;

  --gold:      #D3A71D;
  --gold-soft: #E5D289;
  --gold-pale: #F6EFD1;

  /* Alignment heatmap colours */
  --green:      #4FA36B;
  --green-pale: #DBEBDF;
  --amber:      #D68A2A;
  --amber-pale: #F6E4C6;
  --red:        #C25848;
  --red-pale:   #F1D8D2;

  /* Partner colours on comparison */
  --you-color:     #297E7B;
  --partner-color: #C25848;

  --ink:       #1A1A1A;
  --ink-soft:  #363833;
  --muted:     #5F6360;
  --line:      #D8D8D8;
  --line-soft: #ECECEC;

  --paper:      #FFFFFF;
  --paper-warm: #FBFAF7;

  /* Typography */
  --font-body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Layout */
  --container:      720px;
  --container-wide: 920px;
  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-soft: 0 2px 12px rgba(45, 80, 75, 0.06);
  --shadow-card: 0 4px 24px rgba(45, 80, 75, 0.08);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 280ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; color: inherit; }
::selection { background: var(--teal-100); color: var(--ink); }

a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--teal-deep); }

#app {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 24px 96px;
  animation: fadeUp 360ms var(--ease) both;
}
.result-view { max-width: var(--container-wide); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.18;
  margin: 1.4em 0 0.5em;
}
h1 { font-size: clamp(30px, 5vw, 44px); margin-top: 0.4em; font-weight: 800; }
h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 700; }
h3 { font-size: clamp(19px, 2.4vw, 22px); margin-top: 1.8em; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }
h5 { font-size: 16px; font-weight: 700; }

p { margin: 0.7em 0; color: var(--ink-soft); }
em { font-style: italic; color: var(--ink); }
strong { color: var(--ink); font-weight: 700; }

.meta { font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }
.lede { font-size: 18px; line-height: 1.6; color: var(--ink-soft); }

.step-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: var(--teal-50);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

hr.section-break {
  border: none;
  border-top: 1px solid var(--line-soft);
  margin: 56px 0 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  line-height: 1.2;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform 120ms var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn.lg { padding: 14px 30px; font-size: 16px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn.primary { background: var(--teal-dark); color: #fff; }
.btn.primary:not(:disabled):hover {
  background: var(--teal-deep);
  box-shadow: var(--shadow-soft);
}
.btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn.ghost:not(:disabled):hover {
  border-color: var(--teal-dark);
  color: var(--teal-dark);
  background: var(--teal-50);
}

/* ---------- Welcome ---------- */
.welcome { text-align: left; padding-top: 8px; }
.site-mark {
  display: block;
  width: 52px;
  margin: 0 auto 18px;
  line-height: 0;
}
.site-mark img { width: 52px; height: 52px; }

.welcome h1 { text-align: center; margin-bottom: 6px; }
.welcome-subtitle {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 24px;
  font-weight: 500;
}
.welcome .lede { margin: 16px 0 22px; }
.welcome .meta { text-align: center; margin: 6px 0; }

.hero-visual {
  display: flex;
  justify-content: center;
  margin: 12px 0 26px;
}

.invite-banner {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 22px 0;
  font-size: 15.5px;
  color: var(--ink-soft);
}

.resume-banner {
  background: var(--teal-50);
  border: 1px solid var(--teal-200);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  margin: 28px 0 8px;
  text-align: center;
}
.resume-banner p { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; }
.resume-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Inputs ---------- */
input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  margin: 4px 0;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
  line-height: 1.5;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-50);
}

/* ---------- Lead capture ---------- */
.lead-capture {
  background: var(--paper-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  margin: 28px 0 18px;
}
.lead-capture .lead-title {
  font-size: clamp(22px, 3vw, 26px);
  margin: 0 0 8px;
  text-align: left;
}
.lead-capture .lead-body {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 15.5px;
}
.lead-capture .form-row { margin: 14px 0; }
.lead-capture .form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.client-question {
  border: none;
  margin: 20px 0 8px;
  padding: 0;
}
.client-question legend {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
  line-height: 1.4;
}
.form-error {
  color: #B23A2B;
  font-size: 14px;
  margin: 8px 0 0;
  min-height: 1em;
}
.lead-capture .btn {
  display: block;
  width: 100%;
  margin: 18px 0 0;
  min-width: 0;
}

.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 160ms var(--ease);
  font-size: 15.5px;
  color: var(--ink-soft);
}
.radio-pill:hover {
  border-color: var(--teal-300);
  background: var(--teal-50);
}
.radio-pill input { margin: 0; cursor: pointer; accent-color: var(--teal-dark); }
.radio-pill.selected {
  background: var(--teal-50);
  border-color: var(--teal-dark);
  color: var(--ink);
  font-weight: 500;
}

/* ---------- Progress ---------- */
.progress {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  padding: 14px 0 12px;
  z-index: 10;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.progress-bar {
  height: 4px;
  background: var(--teal);
  border-radius: 999px;
  transition: width 360ms var(--ease);
  min-width: 4px;
}
.progress-text {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 0.02em;
  font-weight: 500;
}

/* ---------- Chapter intro ---------- */
.chapter-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 32px 30px 26px;
  box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--teal);
}
.chapter-card.dom-money    { border-top-color: var(--gold); }
.chapter-card.dom-family   { border-top-color: var(--teal); }
.chapter-card.dom-time     { border-top-color: var(--teal-300); }
.chapter-card.dom-growth   { border-top-color: var(--sage); }
.chapter-card.dom-conflict { border-top-color: var(--red); }
.chapter-card.dom-intimacy { border-top-color: var(--partner-color); }

.chapter-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin-top: -0.2em;
  margin-bottom: 18px;
  font-style: italic;
}
.chapter-intro {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin: 16px 0 22px;
}
.chapter-intro p { margin: 14px 0; }
.chapter-count { text-align: right; margin-bottom: 16px; }

/* ---------- Question card ---------- */
.question-card {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px 20px;
  box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--teal);
  margin-bottom: 18px;
}
.question-card.dom-money    { border-left-color: var(--gold); }
.question-card.dom-family   { border-left-color: var(--teal); }
.question-card.dom-time     { border-left-color: var(--teal-300); }
.question-card.dom-growth   { border-left-color: var(--sage); }
.question-card.dom-conflict { border-left-color: var(--red); }
.question-card.dom-intimacy { border-left-color: var(--partner-color); }

.question {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 22px);
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 18px;
  color: var(--ink);
}

/* ---------- Answer / predict split ---------- */
.answer-block {
  margin: 16px 0 8px;
}
.answer-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.answer-label .who {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.answer-label .who.you {
  color: var(--teal-dark);
  background: var(--teal-50);
}
.answer-label .who.predict {
  color: var(--partner-color);
  background: var(--red-pale);
}
.answer-label .hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Likert ---------- */
.likert { display: flex; flex-direction: column; gap: 6px; }
.likert-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  width: 100%;
  color: var(--ink-soft);
  transition: all 160ms var(--ease);
}
.likert-btn:hover {
  border-color: var(--teal-300);
  background: var(--teal-50);
}
.likert-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  transition: all 160ms var(--ease);
}
.likert-btn.selected {
  background: var(--teal-50);
  border-color: var(--teal-dark);
  color: var(--ink);
  font-weight: 600;
}
.likert-btn.selected .likert-num {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #fff;
}
/* Predict-side uses partner colour when selected */
.predict-side .likert-btn:hover {
  border-color: var(--partner-color);
  background: var(--red-pale);
}
.predict-side .likert-btn.selected {
  background: var(--red-pale);
  border-color: var(--partner-color);
}
.predict-side .likert-btn.selected .likert-num {
  border-color: var(--partner-color);
  background: var(--partner-color);
  color: #fff;
}

/* ---------- Rank builder ---------- */
.rank-builder { display: flex; flex-direction: column; gap: 6px; }
.rank-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  text-align: left;
  width: 100%;
  color: var(--ink-soft);
  transition: all 160ms var(--ease);
}
.rank-option:hover:not(.ranked) {
  border-color: var(--teal-300);
  background: var(--teal-50);
}
.rank-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  transition: all 160ms var(--ease);
}
.rank-option.ranked {
  background: var(--teal-50);
  border-color: var(--teal-dark);
  color: var(--ink);
  font-weight: 600;
}
.rank-option.ranked .rank-badge {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #fff;
}
.rank-option.top-pick { border-width: 2px; }
.rank-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}
.rank-clear {
  background: transparent;
  border: none;
  color: var(--teal-dark);
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.rank-clear:hover { color: var(--teal-deep); }

/* Predict side (top pick only) */
.predict-side .rank-option:hover {
  border-color: var(--partner-color);
  background: var(--red-pale);
}
.predict-side .rank-option.ranked {
  background: var(--red-pale);
  border-color: var(--partner-color);
}
.predict-side .rank-option.ranked .rank-badge {
  border-color: var(--partner-color);
  background: var(--partner-color);
  color: #fff;
}

/* ---------- Nav ---------- */
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ---------- Result ---------- */
.result-greeting {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 4px;
  font-style: italic;
}
.result-title {
  font-size: clamp(28px, 4.4vw, 40px);
  margin-top: 6px;
  margin-bottom: 8px;
  font-weight: 800;
}

.radar-wrap {
  margin: 22px 0 28px;
  display: flex;
  justify-content: center;
}
.radar-wrap svg { width: 100%; max-width: 520px; height: auto; }

.radar-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 6px 0 18px;
  font-size: 14px;
}
.radar-legend .swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: -2px;
  margin-right: 6px;
}
.radar-legend .swatch.you { background: var(--you-color); }
.radar-legend .swatch.partner { background: var(--partner-color); }

/* ---------- Heatmap ---------- */
.heatmap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0 32px;
}
.heatmap-cell {
  background: #fff;
  border: 1.5px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  position: relative;
  overflow: hidden;
  transition: transform 120ms var(--ease);
  cursor: default;
}
.heatmap-cell.green  { background: var(--green-pale); border-color: var(--green); }
.heatmap-cell.amber  { background: var(--amber-pale); border-color: var(--amber); }
.heatmap-cell.red    { background: var(--red-pale);   border-color: var(--red); }
.heatmap-cell .cell-domain {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.heatmap-cell .cell-score {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0 2px;
}
.heatmap-cell.green .cell-score { color: var(--green); }
.heatmap-cell.amber .cell-score { color: var(--amber); }
.heatmap-cell.red   .cell-score { color: var(--red); }
.heatmap-cell .cell-band {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}
@media (max-width: 640px) {
  .heatmap { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Domain detail (conversation prompts) ---------- */
.domain-detail {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 14px 0;
  box-shadow: var(--shadow-soft);
}
.domain-detail.red {
  border-left: 4px solid var(--red);
  background: linear-gradient(0deg, var(--paper-warm), var(--paper-warm));
}
.domain-detail.amber { border-left: 4px solid var(--amber); }
.domain-detail.green { border-left: 4px solid var(--green); }
.domain-detail h4 {
  margin: 0 0 6px;
  font-size: 18px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.domain-detail .score-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.domain-detail.red   .score-pill { background: var(--red);   color: #fff; }
.domain-detail.amber .score-pill { background: var(--amber); color: #fff; }
.domain-detail.green .score-pill { background: var(--green); color: #fff; }
.domain-detail .prompt-body {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

/* ---------- Top pick call ---------- */
.top-pick-row {
  background: var(--paper-warm);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 10px 0;
}
.top-pick-row .tp-domain {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 8px;
}
.top-pick-row .tp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
@media (max-width: 520px) {
  .top-pick-row .tp-grid { grid-template-columns: 1fr; }
}
.tp-cell { padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14.5px; }
.tp-cell .tp-who {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}
.tp-cell.you     { background: var(--teal-50);  color: var(--teal-dark); }
.tp-cell.you .tp-who { color: var(--teal-dark); }
.tp-cell.partner { background: var(--red-pale); color: var(--partner-color); }
.tp-cell.partner .tp-who { color: var(--partner-color); }
.tp-cell .tp-value { color: var(--ink); font-weight: 500; }
.tp-call {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}
.tp-call.correct { color: var(--green); font-weight: 600; }
.tp-call.miss { color: var(--amber); font-weight: 600; }

/* ---------- Prediction accuracy bars ---------- */
.pred-bars { margin: 16px 0 28px; }
.pred-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pred-row:last-child { border-bottom: none; }
.pred-row .pr-name { font-weight: 600; font-size: 14.5px; }
.pred-row .pr-track {
  height: 8px;
  background: var(--sage-pale);
  border-radius: 999px;
  overflow: hidden;
}
.pred-row .pr-fill {
  height: 100%;
  background: var(--teal-dark);
  border-radius: 999px;
  transition: width 600ms var(--ease);
}
.pred-row .pr-score {
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Share / session ---------- */
.share-box {
  display: flex;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
#share-url {
  flex: 1;
  min-width: 200px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink-soft);
}
#share-status, #result-url-status, #crossref-status {
  min-height: 1.2em;
  color: var(--teal-dark);
  font-weight: 500;
}

.session-box {
  background: var(--teal-50);
  border-radius: var(--radius-lg);
  padding: 26px 26px 20px;
  border-left: 4px solid var(--teal-dark);
  margin: 16px 0;
}
.session-box h3 { margin-top: 0; }
.session-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}

.crossref-box {
  background: var(--gold-pale);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  border-left: 4px solid var(--gold);
  margin: 16px 0;
}
.crossref-box h3 { margin-top: 0; }

/* ---------- Site footer ---------- */
.site-footer {
  max-width: var(--container-wide);
  margin: 24px auto 0;
  padding: 28px 24px 48px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.site-footer-logo img { height: 40px; width: auto; opacity: 0.9; }
.site-footer-text {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
  max-width: 480px;
}
.site-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 13px;
}
.site-footer-links a {
  color: var(--teal-dark);
  text-decoration: none;
  font-weight: 500;
}
.site-footer-links a:hover {
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 480px) {
  .site-footer { padding: 24px 18px 40px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  body { font-size: 16px; }
  #app { padding: 28px 18px 80px; }
  .question-card, .chapter-card { padding: 22px 20px 18px; }
  .session-box { padding: 22px 20px 16px; }
  .pred-row { grid-template-columns: 100px 1fr 50px; gap: 8px; }
}

/* ---------- Accessibility ---------- */
.btn:focus-visible,
.likert-btn:focus-visible,
.rank-option:focus-visible,
.radio-pill:focus-within,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--teal-200);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */
@media print {
  body { background: #fff; font-size: 12pt; color: #000; }
  .site-footer, .nav-row, .session-box, .share-box, .crossref-box,
  #share-url, #share-status, #result-url-status, #crossref-status,
  .progress { display: none !important; }
  #app { max-width: 100%; padding: 0; }
  .heatmap-cell, .domain-detail, .top-pick-row {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
  hr.section-break { page-break-before: always; border: none; margin: 0; }
  h2, h3 { page-break-after: avoid; }
  a { color: #000; text-decoration: none; }
}
