/* Hallmark · genre: editorial · macrostructure: Letter (home) + one-question flow (assessment) + Long Document (result)
 * theme: custom · vibe: "blush paper, rose ink, quiet love letter" · anchor hue: 8 (rose, the existing #b4475a)
 * paper oklch(97.5% 0.010 20) · accent oklch(52% 0.150 8) · display: Latin old-style serif + mincho · body: gothic
 * axes: light / high-contrast-serif / warm · nav: N9 edge-aligned minimal · footer: Ft2 inline single line
 * enrichment: E5 hand-built SVG (two nine-point shapes, one per partner) · design-system: design.md
 */

/* ---------- Tokens ---------- */
:root {
  --color-paper:       oklch(97.5% 0.010 20);
  --color-paper-2:     oklch(94.5% 0.020 14);
  --color-paper-3:     oklch(91.5% 0.030 12);
  --color-rule:        oklch(86% 0.022 14);
  --color-muted:       oklch(47% 0.028 10);
  --color-ink:         oklch(25% 0.030 5);
  --color-accent:      oklch(52% 0.150 8);
  --color-accent-deep: oklch(44% 0.140 8);
  --color-accent-soft: oklch(93% 0.040 10);
  --color-accent-ink:  oklch(98.5% 0.006 20);
  --color-focus:       oklch(44% 0.160 8);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
                  "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "Noto Serif JP", "Noto Serif CJK JP", serif;
  --font-body:    "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP",
                  "Yu Gothic", YuGothic, Meiryo, sans-serif;

  --space-3xs: 0.25rem; --space-2xs: 0.5rem; --space-xs: 0.75rem;
  --space-sm: 1rem;     --space-md: 1.5rem;  --space-lg: 2rem;
  --space-xl: 3rem;     --space-2xl: 4.5rem; --space-3xl: 7rem;

  --text-xs: 0.75rem;  --text-sm: 0.875rem; --text-base: 1rem; --text-md: 1.125rem;
  --text-lg: 1.375rem; --text-xl: 1.75rem;  --text-2xl: 2.25rem;
  --text-display: clamp(3.25rem, 2rem + 7vw, 6.5rem);

  --measure: 36rem;
  --rule: 1px solid var(--color-rule);
  --radius-card: 1.25rem;
  --radius-pill: 999px;
  --radius-input: 0.625rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;
}

/* ---------- Base ---------- */
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.9;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
main, .colophon, .site { max-width: 44rem; margin: 0 auto; padding-inline: var(--space-md); }
main { padding-block: var(--space-lg) var(--space-2xl); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; font-style: normal; line-height: 1.45; letter-spacing: 0.04em; overflow-wrap: anywhere; min-width: 0; }
h1 { font-size: var(--text-xl); margin: 0 0 var(--space-sm); }
h2 { font-size: var(--text-lg); margin: var(--space-xl) 0 var(--space-sm); }
h3 { font-size: var(--text-md); margin: var(--space-md) 0 var(--space-3xs); }
p { margin: 0 0 var(--space-sm); }
a { color: var(--color-accent-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* Header: the wordmark, and the sign-in link or sign-out button at the far edge */
.site { padding-block: var(--space-md) 0; display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.site-nav { font-size: var(--text-sm); }
.site-nav a, .site-nav button {
  display: inline-flex; align-items: center; min-height: 2.25rem; padding: var(--space-3xs) var(--space-sm);
  border: 1px solid var(--color-rule); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-accent-deep); font-weight: 600; letter-spacing: 0.08em; text-decoration: none;
}
.site-nav a:hover, .site-nav button:hover { background: var(--color-paper-2); border-color: var(--color-accent); color: var(--color-accent-deep); }
.site-name { margin: 0; font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; letter-spacing: 0.12em; }
.site-name a { color: var(--color-ink); text-decoration: none; }
.site-name a:hover { color: var(--color-accent-deep); }

/* Footer: one line of fine print over a hairline */
.colophon { padding-block: var(--space-md) var(--space-xl); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; }
.colophon p { border-top: var(--rule); padding-top: var(--space-md); margin: 0; }

/* ---------- Buttons ---------- */
.button, button, input[type=submit] {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  min-height: 3rem; padding: var(--space-xs) var(--space-lg);
  border: 1px solid var(--color-accent); border-radius: var(--radius-pill);
  background: var(--color-accent); color: var(--color-accent-ink);
  font: inherit; font-weight: 600; letter-spacing: 0.08em; white-space: nowrap; text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.button:hover, button:hover, input[type=submit]:hover { background: var(--color-accent-deep); border-color: var(--color-accent-deep); text-decoration: none; }
.button:active, button:active, input[type=submit]:active { transform: translateY(1px); }
button:disabled, button[aria-disabled=true], input[type=submit][aria-disabled=true] { opacity: 0.55; cursor: progress; }
.button-quiet, .actions .back, .delete .danger, button.copy {
  background: transparent; color: var(--color-accent-deep); border-color: var(--color-rule);
}
.button-quiet:hover, .actions .back:hover, .delete .danger:hover, button.copy:hover {
  background: var(--color-paper-2); border-color: var(--color-accent); color: var(--color-accent-deep);
}
form.button_to { display: inline; }

/* ---------- Messages ---------- */
.notice, .alert { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-input); background: var(--color-paper-2); }
.alert { background: var(--color-accent-soft); color: var(--color-accent-deep); font-weight: 600; }
.page-alert:empty { display: none; }

/* ---------- Form fields ---------- */
.field { margin-bottom: var(--space-sm); }
.field label { display: block; font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-3xs); }
select, .field input[type=text], .field input[type=email], .field input[type=number], .field textarea, .share-url input {
  width: 100%; max-width: 22rem; min-height: 2.75rem; box-sizing: border-box;
  padding: var(--space-2xs) var(--space-xs);
  border: 1px solid var(--color-rule); border-radius: var(--radius-input);
  background: var(--color-paper); color: var(--color-ink); font: inherit;
}
select:hover, .share-url input:hover { border-color: var(--color-muted); }
.field_with_errors input, .field_with_errors textarea { border-color: var(--color-accent); }
#error_explanation { border: 1px solid var(--color-accent); border-radius: var(--radius-input); padding: var(--space-2xs) var(--space-sm); margin-bottom: var(--space-sm); }

/* ---------- Home: a letter-shaped cover ---------- */
.cover {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg);
  padding-top: var(--space-xl);
}
.cover-text { min-width: 0; }
.wordmark {
  font-size: var(--text-display); font-weight: 500; line-height: 1; letter-spacing: 0.02em;
  margin: 0 0 var(--space-md); color: var(--color-ink);
}
.tagline {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.6; letter-spacing: 0.06em;
  margin: 0 0 var(--space-lg); max-width: 18em;
  word-break: auto-phrase; text-wrap: balance;
}
.cover-lead { max-width: var(--measure); padding-left: var(--space-md); border-left: 2px solid var(--color-accent); }
.cover-lead p:last-child { margin-bottom: 0; }
.duration { color: var(--color-muted); font-size: var(--text-sm); }
.cover-action { margin-top: var(--space-xl); }
.motif { width: min(100%, 18rem); height: auto; justify-self: end; overflow: visible; }
.motif-ring { fill: none; stroke: var(--color-rule); stroke-width: 1; }
.motif-a { fill: var(--color-accent); fill-opacity: 0.16; stroke: var(--color-accent); stroke-width: 1.5; stroke-linejoin: round; }
.motif-b { fill: none; stroke: var(--color-ink); stroke-width: 1; stroke-linejoin: round; stroke-dasharray: 3 4; }
@media (min-width: 48rem) {
  main:has(> .cover), body:has(.cover) .site, body:has(.cover) .colophon { max-width: 64rem; }
  .cover { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: center; gap: var(--space-xl); padding-top: var(--space-2xl); }
  .motif { width: 100%; justify-self: stretch; }
}

/* Home: what the assessment tells you and what Affinia can do, below the cover */
.home-section { margin-top: var(--space-2xl); padding-top: var(--space-xl); border-top: var(--rule); }
.home-section h2 { margin-top: 0; }
.section-lead { max-width: var(--measure); }

/* The cover's motif moves: the rings turn, the solid shape is drawn and then
   breathes, the dashed one's line walks, three sparks pulse at its points. */
.motif-rings { transform-box: view-box; transform-origin: 160px 160px; animation: motif-turn 60s linear infinite; }
.motif-a { transform-box: view-box; transform-origin: 160px 160px; stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: motif-draw 1.8s var(--ease-out) both, motif-breathe 6s var(--ease-in-out) 1.8s infinite; }
.motif-b { animation: motif-march 14s linear infinite; }
.motif-spark { fill: var(--color-accent); transform-box: fill-box; transform-origin: center; animation: spark 3s var(--ease-in-out) infinite; }
.motif-spark:nth-of-type(2) { animation-delay: 1s; }
.motif-spark:nth-of-type(3) { animation-delay: 2s; }
@keyframes motif-turn { to { transform: rotate(360deg); } }
@keyframes motif-draw { from { stroke-dashoffset: 1; fill-opacity: 0; } to { stroke-dashoffset: 0; fill-opacity: 0.16; } }
@keyframes motif-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04) rotate(2deg); } }
@keyframes motif-march { to { stroke-dashoffset: -140; } }
@keyframes spark { 0%, 100% { opacity: 0.25; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.3); } }

/* Sample questions running across the page, the list twice for a seamless loop */
.questions-strip { margin-top: var(--space-2xl); }
.strip-heading { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.12em; color: var(--color-muted); margin: 0 0 var(--space-sm); }
.strip { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.strip-track { display: flex; width: max-content; animation: strip-run 70s linear infinite; }
.strip:hover .strip-track { animation-play-state: paused; }
.strip-list { display: flex; gap: var(--space-sm); list-style: none; margin: 0; padding: 0 var(--space-sm) 0 0; }
.strip-list li {
  white-space: nowrap; padding: var(--space-2xs) var(--space-md); border-radius: var(--radius-pill);
  background: var(--color-paper-2); font-family: var(--font-display); font-size: var(--text-sm); letter-spacing: 0.04em;
}
.strip-list li:nth-child(3n+2) { background: var(--color-accent-soft); color: var(--color-accent-deep); }
@keyframes strip-run { to { transform: translateX(-50%); } }

/* The nine dimensions, each with a line icon */
.dimensions {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm);
  margin: var(--space-md) 0 var(--space-lg); padding: 0;
}
.dimension {
  padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); min-width: 0;
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.dimension:hover { transform: translateY(-3px); background: var(--color-accent-soft); box-shadow: 0 10px 24px -16px oklch(44% 0.14 8 / 0.5); }
.dimension-icon {
  width: 2.25rem; height: 2.25rem; margin-bottom: var(--space-2xs);
  fill: none; stroke: var(--color-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  transition: transform var(--dur-long) var(--ease-out);
}
.dimension-icon .icon-heart { fill: var(--color-accent); fill-opacity: 0.25; }
.dimension:hover .dimension-icon { transform: rotate(-8deg) scale(1.12); }
.dimension dt { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; letter-spacing: 0.06em; color: var(--color-accent-deep); }
.dimension dd { margin: var(--space-3xs) 0 0; font-size: var(--text-sm); line-height: 1.8; }

/* A sample result: the result page's chart with made-up scores */
.sample { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); align-items: center; margin-top: var(--space-lg); }
.sample-chart { margin: 0; padding: var(--space-md); border: var(--rule); border-radius: var(--radius-card); background: var(--color-paper); }
.sample-chart figcaption { text-align: center; color: var(--color-muted); font-size: var(--text-xs); margin-top: var(--space-2xs); }
.sample-chart .radar-value { transform-box: view-box; transform-origin: 200px 200px; }
.sample-text h3 { margin-top: 0; }
.result-items, .promise ul { max-width: var(--measure); padding-left: var(--space-md); line-height: 1.8; }
.result-items li + li, .promise li + li { margin-top: var(--space-2xs); }
.result-items li::marker, .promise li::marker { color: var(--color-accent); }

/* Three ways to use it, each with a small moving picture */
.steps { list-style: none; counter-reset: step; margin: var(--space-md) 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
.step {
  counter-increment: step; position: relative; padding: var(--space-md); border: var(--rule); border-radius: var(--radius-card); min-width: 0;
  background: var(--color-paper);
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.step:hover { transform: translateY(-4px); border-color: var(--color-accent); box-shadow: 0 14px 28px -20px oklch(44% 0.14 8 / 0.55); }
.step::before {
  content: counter(step); position: absolute; top: var(--space-sm); left: var(--space-md);
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--color-accent); color: var(--color-accent-ink);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
}
.step-art { display: block; width: 100%; height: auto; max-height: 8rem; margin: var(--space-xs) 0 var(--space-sm); background: var(--color-paper-2); border-radius: calc(var(--radius-card) - 0.25rem); overflow: visible; }
.step h3 { margin-top: 0; }
.step p { margin: 0; font-size: var(--text-sm); line-height: 1.8; }
.art-ring { fill: none; stroke: var(--color-rule); stroke-width: 1; }
.art-shape { fill: var(--color-accent); fill-opacity: 0.2; stroke: var(--color-accent); stroke-width: 1.5; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.art-theirs { fill: none; stroke: var(--color-ink); stroke-width: 1.2; stroke-dasharray: 4 4; stroke-linejoin: round; transform-box: fill-box; transform-origin: center; }
.art-track { fill: var(--color-paper-3); }
.art-bar { fill: var(--color-accent); fill-opacity: 0.75; transform-box: fill-box; transform-origin: left center; }
.art-solo .art-shape { animation: art-breathe 5s var(--ease-in-out) infinite; }
.art-pair .art-mine { animation: art-sway 7s var(--ease-in-out) infinite; }
.art-pair .art-theirs { animation: art-sway 7s var(--ease-in-out) -3.5s infinite reverse, art-march 10s linear infinite; }
@keyframes art-breathe { 0%, 100% { transform: scale(0.92); } 50% { transform: scale(1.05); } }
@keyframes art-sway { 0%, 100% { transform: translateX(-4px) rotate(-3deg); } 50% { transform: translateX(4px) rotate(3deg); } }
@keyframes art-march { to { stroke-dashoffset: -160; } }
@keyframes art-grow { from { transform: scaleX(0); } }
@keyframes chart-grow { from { transform: scale(0); opacity: 0; } }

.can .note { color: var(--color-muted); font-size: var(--text-sm); max-width: var(--measure); }
.again { text-align: center; }
.again-art { display: block; width: 8rem; height: auto; margin: 0 auto var(--space-sm); overflow: visible; }
.again-art .art-shape { animation: art-sway 6s var(--ease-in-out) infinite; }
.again-art .art-theirs { animation: art-sway 6s var(--ease-in-out) -3s infinite reverse; }
.again-lead { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; letter-spacing: 0.04em; }

/* Reveal on scroll: the script adds .has-reveal (only when it runs and
   motion is welcome) and .is-visible as each part comes into view. Without
   the script everything is simply shown, in its final state. */
.has-reveal [data-reveal] { opacity: 0; transform: translateY(1.25rem); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.has-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
.has-reveal .dimension[data-reveal].is-visible:hover { transform: translateY(-3px); transition-delay: 0ms; }
.has-reveal .step[data-reveal].is-visible:hover { transform: translateY(-4px); transition-delay: 0ms; }
.has-reveal .is-visible .art-bar { animation: art-grow 1.2s var(--ease-out) both; animation-delay: calc(300ms + var(--d, 0) * 150ms); }
.has-reveal .is-visible .radar-value { transform-box: view-box; transform-origin: 200px 200px; animation: chart-grow 1.4s var(--ease-out) 300ms both; }
.has-reveal .is-visible .radar-grid { transform-box: view-box; transform-origin: 200px 200px; animation: ring-in 700ms var(--ease-out) both; }
.has-reveal .is-visible .radar-grid:nth-of-type(2) { animation-delay: 80ms; }
.has-reveal .is-visible .radar-grid:nth-of-type(3) { animation-delay: 160ms; }
.has-reveal .is-visible .radar-grid:nth-of-type(4) { animation-delay: 240ms; }
.has-reveal .is-visible .radar-label { animation: fade-in 600ms var(--ease-out) 1.1s both; }
@keyframes ring-in { from { transform: scale(0.6); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

@media (min-width: 40rem) {
  .dimensions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 48rem) {
  .dimensions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sample { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--space-xl); }
}
@media (prefers-reduced-motion: reduce) {
  .motif-rings, .motif-a, .motif-b, .motif-spark, .strip-track, .art-shape, .art-theirs, .art-bar, .sample-chart .radar-value { animation: none !important; }
  .motif-a { stroke-dasharray: none; }
  .strip { mask-image: none; }
  .strip-track { width: auto; }
  .strip-list { flex-wrap: wrap; padding: 0; }
  .strip-list li { white-space: normal; }
  .strip-copy { display: none; }
}

/* ---------- The questionnaire: one question at a time ---------- */
.assessment-head h1 { font-size: var(--text-lg); color: var(--color-muted); letter-spacing: 0.08em; }
.assessment-head .intro { max-width: var(--measure); }
.is-asking .assessment-head .intro { display: none; }
.is-asking .assessment-head h1 { font-size: var(--text-sm); font-family: var(--font-body); font-weight: 600; margin-bottom: var(--space-2xs); }

.consent { padding: var(--space-md); margin: var(--space-md) 0 var(--space-lg); background: var(--color-paper-2); border-radius: var(--radius-card); }
.consent-label { display: flex; gap: var(--space-xs); align-items: flex-start; font-weight: 600; line-height: 1.7; cursor: pointer; }
.consent-label input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; flex: none; accent-color: var(--color-accent); }
.consent .note { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; margin: var(--space-xs) 0 0; }
.before-check { padding: var(--space-md); margin: var(--space-md) 0 var(--space-lg); background: var(--color-paper-2); border-radius: var(--radius-card); }
.before-check h2 { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); margin: 0 0 var(--space-xs); }
.before-check ul { margin: 0; padding-left: var(--space-md); line-height: 1.8; }
.before-check li + li { margin-top: var(--space-2xs); }
.before-check li::marker { color: var(--color-accent); }
.attributes { margin-top: var(--space-md); padding-top: var(--space-md); border-top: var(--rule); }
.attributes > p { font-size: var(--text-sm); }

.prompt {
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.04em; line-height: 1.7;
  color: var(--color-muted); margin: var(--space-lg) 0 var(--space-xs);
}
.progress { display: flex; align-items: center; gap: var(--space-sm); margin: 0 0 var(--space-md); }
.progress-count { margin: 0; min-width: 4.5em; font-family: var(--font-display); font-size: var(--text-md); font-variant-numeric: tabular-nums lining-nums; color: var(--color-accent-deep); letter-spacing: 0.06em; }
.progress-track { flex: 1; height: 3px; border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
.progress-fill { display: block; height: 100%; background: var(--color-accent); transform-origin: left center; transform: scaleX(0); transition: transform var(--dur-long) var(--ease-out); }

.question { border: 0; margin: 0 0 var(--space-xl); padding: 0; min-width: 0; }
.question:focus { outline: none; }
.question legend {
  float: left; width: 100%; padding: 0; margin: 0 0 var(--space-md);
  font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.75; letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
.question legend + * { clear: both; }
.question.is-missing legend { color: var(--color-accent-deep); }
.question.is-missing .scale { outline: 2px solid var(--color-accent); outline-offset: var(--space-2xs); border-radius: var(--radius-card); }
.is-paged .question.is-entering { animation: question-in var(--dur-long) var(--ease-out); }
@keyframes question-in { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 1; transform: none; } }

.scale { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
.choice {
  --level: 0;
  display: flex; align-items: center; gap: var(--space-sm);
  min-height: 3.25rem; padding: var(--space-2xs) var(--space-sm);
  border: 1px solid var(--color-rule); border-radius: var(--radius-card);
  background: var(--color-paper);
  font-size: var(--text-base); line-height: 1.5; cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out);
}
.choice:hover { background: var(--color-paper-2); border-color: var(--color-accent); }
.choice-v1 { --level: 0.04; } .choice-v2 { --level: 0.1; } .choice-v3 { --level: 0.18; } .choice-v4 { --level: 0.28; }
.choice-v5 { --level: 0.45; } .choice-v6 { --level: 0.65; } .choice-v7 { --level: 0.9; }
/* The mark: a ring whose tint deepens toward "strongly", filled when chosen */
.choice input {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  border: 1.5px solid var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) calc(var(--level) * 100%), var(--color-paper));
  display: grid; place-content: center; cursor: pointer;
}
.choice input::after {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--color-accent-ink); transform: scale(0);
  transition: transform var(--dur-micro) var(--ease-out);
}
.choice input:checked { background: var(--color-accent); border-color: var(--color-accent); }
.choice input:checked::after { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.choice:has(input:checked) { background: var(--color-accent-soft); border-color: var(--color-accent); font-weight: 600; color: var(--color-accent-deep); }
.choice-na { margin-top: var(--space-2xs); }
.choice-na, .choice-skip { border-style: dashed; color: var(--color-muted); font-size: var(--text-sm); min-height: 2.75rem; }
.choice-na input, .choice-skip input { --level: 0; border-color: var(--color-muted); width: 1.25rem; height: 1.25rem; }
.choice-na input:checked, .choice-skip input:checked { background: var(--color-muted); border-color: var(--color-muted); }
.choice-na:has(input:checked), .choice-skip:has(input:checked) { background: var(--color-paper-2); border-color: var(--color-muted); color: var(--color-ink); }
/* Answers off the scale (the check's "not wanted", "prefer not to answer"):
   a group of their own under a hairline, so they do not read as scale points */
.scale-other { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); margin-top: var(--space-xs); padding-top: var(--space-sm); border-top: var(--rule); }
.scale-other .choice-na { margin-top: 0; }
.question-note { margin: 0 0 var(--space-md); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; max-width: var(--measure); }

.actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); justify-content: flex-end; align-items: center; margin-top: var(--space-lg); }
.actions .back { margin-right: auto; }
.actions .start { min-width: 12rem; }

/* ---------- The result: a long letter ---------- */
.result-heading { padding: var(--space-xl) 0 var(--space-lg); border-bottom: var(--rule); }
.kicker { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.16em; color: var(--color-accent-deep); margin-bottom: var(--space-xs); }
.result-heading h1 { font-size: var(--text-2xl); margin-bottom: var(--space-xs); }
.result-heading h1.profile { font-size: clamp(2.25rem, 1.5rem + 4vw, 3.75rem); font-weight: 500; line-height: 1.15; letter-spacing: 0.01em; }
.profile-ja { display: block; margin-top: var(--space-xs); font-size: var(--text-lg); font-weight: 600; letter-spacing: 0.1em; color: var(--color-accent-deep); }
.shape-name { display: inline-block; margin: var(--space-2xs) 0 0; padding: var(--space-3xs) var(--space-sm); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 600; color: var(--color-accent-deep); }
.result-heading h2 { font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-muted); letter-spacing: 0.08em; margin: var(--space-lg) 0 var(--space-2xs); }
.top { list-style: none; padding: 0; margin: 0 0 var(--space-md); display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); }
.top li { display: flex; align-items: baseline; gap: var(--space-2xs); }
.top-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; }
.top-score { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-accent); font-variant-numeric: tabular-nums lining-nums; }
.shape-text { max-width: var(--measure); }
.insufficient { padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }

.chart { margin: var(--space-md) 0 var(--space-lg); padding: 0 var(--space-xl); }
.radar { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 auto; overflow: visible; }
.radar-grid { fill: none; stroke: var(--color-rule); stroke-width: 1; }
.radar-axis { stroke: var(--color-rule); stroke-width: 1; }
.radar-value { fill: var(--color-accent); fill-opacity: 0.2; stroke: var(--color-accent); stroke-width: 2; stroke-linejoin: round; }
.radar-label { fill: var(--color-ink); font-family: var(--font-body); font-size: 14px; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: var(--space-xs) var(--space-2xs); border-bottom: var(--rule); }
.scores thead th { white-space: nowrap; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); }
.scores tbody th { font-family: var(--font-display); font-weight: 600; }
.scores th .summary { display: block; margin-top: var(--space-3xs); font-family: var(--font-body); font-weight: normal; font-size: var(--text-sm); line-height: 1.7; color: var(--color-muted); }
.scores td.score { font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; color: var(--color-accent-deep); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.scores td.band { font-size: var(--text-sm); white-space: nowrap; }

.moments, .requests { margin-top: var(--space-xl); }
.moments h3, .requests h3 { color: var(--color-accent-deep); }
.moments p { max-width: var(--measure); }
.requests ul { margin: 0; padding-left: var(--space-md); }
.requests li::marker { color: var(--color-accent); }

.notes { margin-top: var(--space-xl); padding: var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); font-size: var(--text-sm); color: var(--color-muted); }
.notes ul { margin: 0 0 var(--space-xs); padding-left: var(--space-md); }
.versions { font-size: var(--text-xs); margin: 0; }

.share { margin-top: var(--space-xl); }
.share-url { display: flex; flex-wrap: wrap; gap: var(--space-2xs); align-items: center; }
.share-url label { flex-basis: 100%; font-size: var(--text-sm); font-weight: 600; }
.share-url input { flex: 1 1 12rem; max-width: none; min-width: 0; }
.share-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin-top: var(--space-sm); }
.share-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); text-decoration: none; font-weight: 600; white-space: nowrap; }
.share-links a:hover { border-color: var(--color-accent); background: var(--color-paper-2); }
.save-note, .delete-note { font-size: var(--text-sm); color: var(--color-muted); }
.delete { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--rule); }
.again { margin-top: var(--space-xl); text-align: center; }

/* ---------- Small screens ---------- */
@media (max-width: 30rem) {
  main, .colophon, .site { padding-inline: var(--space-sm); }
  .tagline { font-size: var(--text-lg); }
  .question legend { font-size: var(--text-md); }
  .choice { padding-inline: var(--space-xs); gap: var(--space-xs); }
  .chart { padding: 0 var(--space-md); }
  .actions .start { width: 100%; }
  .scores thead th:first-child { width: 55%; }
  .scores td.band { white-space: normal; }
  .scores th, .scores td { padding-inline: var(--space-3xs); }
}

/* The result page in motion: the heading rises in on load, the top
   dimensions pop in with their icons (their scores count up, by script),
   the chart grows when it comes into view, each score's bar fills, and the
   texts below fade in (the reveal above). */
.result-motion > * { animation: rise 800ms var(--ease-out) both; }
.result-motion > :nth-child(2) { animation-delay: 80ms; }
.result-motion > :nth-child(3) { animation-delay: 200ms; }
.result-motion > :nth-child(4) { animation-delay: 320ms; }
.result-motion > :nth-child(5) { animation-delay: 440ms; }
.result-motion > :nth-child(6) { animation-delay: 560ms; }
.result-motion > :nth-child(7) { animation-delay: 680ms; }
@keyframes rise { from { opacity: 0; transform: translateY(1rem); } }
.result-sparks { display: block; width: 7.5rem; height: auto; margin-bottom: var(--space-2xs); overflow: visible; }
.profile-ja { width: fit-content; background: linear-gradient(var(--color-accent-soft), var(--color-accent-soft)) no-repeat left 88% / 100% 0.45em; animation: highlight 1.2s var(--ease-out) 900ms both; }
@keyframes highlight { from { background-size: 0 0.45em; } }
.top li { animation: pop 700ms var(--ease-out) both; }
.top li:nth-child(1) { animation-delay: 500ms; }
.top li:nth-child(2) { animation-delay: 650ms; }
.top li:nth-child(3) { animation-delay: 800ms; }
@keyframes pop { 0% { opacity: 0; transform: scale(0.8); } 60% { opacity: 1; transform: scale(1.05); } 100% { transform: none; } }
.top .dimension-icon { align-self: center; width: 1.75rem; height: 1.75rem; margin: 0; }
.moments h3 .dimension-icon, .requests h3 .dimension-icon { width: 1.5rem; height: 1.5rem; margin: 0 var(--space-2xs) 0 0; vertical-align: -0.3em; }
.has-reveal h3.is-visible .dimension-icon { animation: icon-pop 800ms var(--ease-out) 200ms both; }
@keyframes icon-pop { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.2) rotate(6deg); } 100% { transform: none; } }
.score-bar { display: block; width: 4.5rem; height: 4px; margin-top: var(--space-3xs); border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
.score-bar::after { content: ""; display: block; height: 100%; width: calc(var(--score, 0) * 1%); border-radius: inherit; background: var(--color-accent); transform-origin: left center; }
.has-reveal table.is-visible .score-bar::after, .has-reveal .matrix.is-visible .score-bar::after { animation: art-grow 1s var(--ease-out) both; animation-delay: 400ms; }
.has-reveal table.is-visible tr:nth-child(2) .score-bar::after { animation-delay: 470ms; }
.has-reveal table.is-visible tr:nth-child(3) .score-bar::after { animation-delay: 540ms; }
.has-reveal table.is-visible tr:nth-child(4) .score-bar::after { animation-delay: 610ms; }
.has-reveal table.is-visible tr:nth-child(5) .score-bar::after { animation-delay: 680ms; }
.has-reveal table.is-visible tr:nth-child(6) .score-bar::after { animation-delay: 750ms; }
.has-reveal table.is-visible tr:nth-child(7) .score-bar::after { animation-delay: 820ms; }
.has-reveal table.is-visible tr:nth-child(8) .score-bar::after { animation-delay: 890ms; }
.has-reveal table.is-visible tr:nth-child(9) .score-bar::after { animation-delay: 960ms; }
.result-motion ~ .scores tbody tr, table[data-reveal] tbody tr { transition: background-color var(--dur-short) var(--ease-out); }
.result-motion ~ .scores tbody tr:hover, table[data-reveal] tbody tr:hover { background: var(--color-paper-2); }
@media (prefers-reduced-motion: reduce) {
  .result-motion > *, .profile-ja, .top li, .score-bar::after, .radar-value, .radar-grid, .radar-label, .dimension-icon { animation: none !important; }
}

/* ---------- The mutual-understanding matrix (/pair/guess) ---------- */
/* Five columns that fit 375px: the dimension name on one line, the three
   numbers as narrow as their header words, the band and direction given
   the rest. Header words wrap only between words, not inside them. */
.guess-matrix { margin-top: var(--space-md); }
.guess-matrix caption { text-align: left; font-family: var(--font-display); font-weight: 600; padding-bottom: var(--space-2xs); }
.scores .guess-matrix thead th { white-space: normal; word-break: keep-all; vertical-align: bottom; letter-spacing: 0; }
.guess-matrix thead th .detail { display: inline-block; font-size: 0.9em; letter-spacing: 0; }
.guess-matrix tbody th { white-space: nowrap; }
.guess-matrix td.own, .guess-matrix td.guess, .guess-matrix td.gap { white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.guess-matrix td.judgement { font-size: var(--text-sm); line-height: 1.6; }
@media (max-width: 30rem) {
  .scores .guess-matrix thead th:first-child { width: auto; }
}

/* The relationship check, the partner guess and the pair's pages in motion,
   in the result page's manner: the heading rises in (.result-motion above),
   the chips of fulfilled dimensions pop in, the map's points land one by
   one, each score gets a bar (added by script to the cells marked
   data-bar) that fills when its table comes into view, and the cards and
   guide steps fade in and lift under the pointer. */
.comparison-heading.result-motion .person { animation: pop 700ms var(--ease-out) both; }
.comparison-heading.result-motion .person.theirs { animation-delay: 150ms; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li { animation: pop 600ms var(--ease-out) both; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li:nth-child(2) { animation-delay: 90ms; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li:nth-child(3) { animation-delay: 180ms; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li:nth-child(4) { animation-delay: 270ms; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li:nth-child(5) { animation-delay: 360ms; }
.has-reveal :is(.is-visible .pop-list, .pop-list.is-visible) li:nth-child(n+6) { animation-delay: 450ms; }
.pop-list li { transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.pop-list li:hover { background: var(--color-accent-soft); transform: translateY(-2px); }
.has-reveal .map-chart.is-visible .map-area { animation: fade-in 800ms var(--ease-out) both; }
.has-reveal .map-chart.is-visible .map-guide { animation: fade-in 800ms var(--ease-out) 200ms both; }
.has-reveal .map-chart.is-visible .map-point { transform-box: fill-box; transform-origin: center; animation: point-land 700ms var(--ease-out) both; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(2) { animation-delay: 380ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(3) { animation-delay: 460ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(4) { animation-delay: 540ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(5) { animation-delay: 620ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(6) { animation-delay: 700ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(7) { animation-delay: 780ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(8) { animation-delay: 860ms; }
.has-reveal .map-chart.is-visible .map-point:nth-of-type(n+9) { animation-delay: 940ms; }
.has-reveal .map-chart.is-visible .map-point:first-of-type { animation-delay: 300ms; }
.has-reveal .map-chart.is-visible .map-label { animation: fade-in 600ms var(--ease-out) 1.1s both; }
@keyframes point-land { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.4); opacity: 1; } 100% { transform: none; } }
.pair-score .score-bar { margin-top: 2px; }
.matrix td .score-bar { width: 3.5rem; }
.theme { transition: transform var(--dur-short) var(--ease-out); }
.theme h3 .dimension-icon { width: 1.5rem; height: 1.5rem; margin: 0 var(--space-2xs) 0 0; vertical-align: -0.3em; }
.has-reveal .theme.is-visible h3 .dimension-icon { animation: icon-pop 800ms var(--ease-out) 200ms both; }
.theme .questions dd { transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.theme .questions dd:hover { border-left-color: var(--color-accent-deep); background: var(--color-paper-2); }
.has-reveal .dialogue-guide.is-visible li { animation: rise 600ms var(--ease-out) both; }
.has-reveal .dialogue-guide.is-visible li:nth-child(2) { animation-delay: 100ms; }
.has-reveal .dialogue-guide.is-visible li:nth-child(3) { animation-delay: 200ms; }
.has-reveal .dialogue-guide.is-visible li:nth-child(4) { animation-delay: 300ms; }
.has-reveal .dialogue-guide.is-visible li:nth-child(5) { animation-delay: 400ms; }
.dialogue-guide li::marker { color: var(--color-accent); font-weight: 600; }
.different h3 .dimension-icon, .prompts dt .dimension-icon { width: 1.5rem; height: 1.5rem; margin: 0 var(--space-2xs) 0 0; vertical-align: -0.3em; }
.has-reveal .different h3.is-visible .dimension-icon { animation: icon-pop 800ms var(--ease-out) 200ms both; }
.has-reveal .prompts dl.is-visible dt .dimension-icon { animation: icon-pop 800ms var(--ease-out) 300ms both; }
.has-reveal .prompts dl.is-visible dd { animation: rise 600ms var(--ease-out) 200ms both; }
.comparison .radar-theirs { transform-box: view-box; transform-origin: 200px 200px; }
.has-reveal .chart.is-visible .radar-theirs { animation-delay: 700ms; }
.has-reveal .chart.is-visible .radar-legend li { animation: rise 600ms var(--ease-out) 1.2s both; }
@media (prefers-reduced-motion: reduce) {
  .comparison-heading .person, .pop-list li, .radar-legend li, .prompts dd, .map-area, .map-guide, .map-point, .map-label, .dialogue-guide li { animation: none !important; }
}

/* The user's page (/me) in motion: the heading rises in with its sparks,
   each section fades in with an icon that pops beside its heading, the
   rows of a list slide in one by one and light up under the pointer, and
   the pair's state cards lift under it. */
.account-heading { padding-top: var(--space-md); }
.account-heading h1 { margin-bottom: 0; }
.section-icon {
  width: 1.5rem; height: 1.5rem; margin: 0 var(--space-2xs) 0 0; vertical-align: -0.3em;
  fill: none; stroke: var(--color-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.section-icon .icon-fill { fill: var(--color-accent); fill-opacity: 0.25; }
.has-reveal .is-visible > h2 .section-icon { animation: icon-pop 800ms var(--ease-out) 200ms both; }
.has-reveal .account .is-visible ul li { animation: slide-in 600ms var(--ease-out) both; }
.has-reveal .account .is-visible ul li:nth-child(2) { animation-delay: 80ms; }
.has-reveal .account .is-visible ul li:nth-child(3) { animation-delay: 160ms; }
.has-reveal .account .is-visible ul li:nth-child(4) { animation-delay: 240ms; }
.has-reveal .account .is-visible ul li:nth-child(n+5) { animation-delay: 320ms; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-0.75rem); } }
.my-assessments li, .my-checks li, .my-guesses li { transition: background-color var(--dur-short) var(--ease-out), padding var(--dur-short) var(--ease-out); }
.my-assessments li:hover, .my-checks li:hover, .my-guesses li:hover { background: var(--color-paper-2); padding-inline: var(--space-2xs); }
.my-assessments .name, .my-checks .name, .my-guesses .name { transition: color var(--dur-micro) var(--ease-out); }
.pair .check-share, .pair .guess-share { transition: transform var(--dur-short) var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  .section-icon, .account ul li { animation: none !important; }
}

/* The login pages in motion: each rises in (.result-motion), over an
   envelope that tells the step: the letter floats in and out of it while
   the address is asked for, it flies off once the link is sent, it stands
   open with a beating heart when the link is opened, and it sways
   (dashed) when a link no longer works. The address field glows on focus. */
.mail-art { display: block; width: 9rem; height: auto; margin: var(--space-md) 0 var(--space-sm); overflow: visible; }
.mail-body { fill: var(--color-paper-2); stroke: var(--color-accent); stroke-width: 1.6; stroke-linejoin: round; }
.mail-flap, .mail-flap-open { fill: none; stroke: var(--color-accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.mail-letter rect { fill: var(--color-paper); stroke: var(--color-rule); stroke-width: 1.2; }
.mail-heart { fill: var(--color-accent); fill-opacity: 0.8; transform-box: fill-box; transform-origin: center; }
.mail-trail { fill: none; stroke: var(--color-accent); stroke-width: 1.4; stroke-dasharray: 3 5; stroke-linecap: round; }
.mail-new .mail-letter { animation: letter-float 4s var(--ease-in-out) infinite; }
.mail-new .mail-heart { animation: heart-beat 2s var(--ease-in-out) infinite; }
.mail-sent .mail-fly { transform-box: fill-box; transform-origin: center; animation: mail-fly 1.6s var(--ease-out) both, mail-hover 3.2s var(--ease-in-out) 1.6s infinite; }
.mail-sent .mail-trail { stroke-dashoffset: 0; animation: motif-march 6s linear infinite, fade-in 1s var(--ease-out) 600ms both; }
.mail-open .mail-letter { animation: letter-rise 1.2s var(--ease-out) 300ms both; }
.mail-open .mail-heart { animation: heart-beat 1.4s var(--ease-in-out) 1.5s infinite; }
.mail-invalid { opacity: 0.7; }
.mail-invalid .mail-body, .mail-invalid .mail-flap { stroke-dasharray: 4 4; }
.mail-invalid { transform-origin: 50% 100%; animation: mail-sway 3s var(--ease-in-out) infinite; }
@keyframes letter-float { 0%, 100% { transform: translateY(16px); } 50% { transform: translateY(0); } }
@keyframes letter-rise { from { transform: translateY(30px); } }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
@keyframes mail-fly { from { transform: translate(-60px, 40px) rotate(-12deg) scale(0.6); opacity: 0; } }
@keyframes mail-hover { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes mail-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.login-form input[type=email] { transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.login-form input[type=email]:focus { border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); outline: none; }
.login .button, .login button, .login input[type=submit] { transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.login .button:hover, .login button:hover, .login input[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -14px oklch(44% 0.14 8 / 0.7); }
@media (prefers-reduced-motion: reduce) {
  .mail-art, .mail-art * { animation: none !important; }
}

/* The question pages in motion: the heading rises in over a speech bubble
   (dots typing for the questionnaire, a beating heart for the check, a
   thought bubble for the guess), the points before the questions come in
   one by one, each question's choices follow its text in, the ring picked
   pulses, the progress count nudges forward, going back slides the
   question in from the left, an unanswered question shakes, and the last
   page's submit button glows. */
.question-art { display: block; width: 7.5rem; height: auto; margin-bottom: var(--space-2xs); overflow: visible; }
.is-asking .question-art { display: none; }
.q-bubble { fill: var(--color-paper-2); stroke: var(--color-accent); stroke-width: 1.6; stroke-linejoin: round; }
.q-dot { fill: var(--color-accent); transform-box: fill-box; transform-origin: center; animation: q-typing 1.4s var(--ease-in-out) infinite; }
.q-dot:nth-of-type(2) { animation-delay: 200ms; }
.q-dot:nth-of-type(3) { animation-delay: 400ms; }
.q-heart { fill: var(--color-accent); fill-opacity: 0.85; transform-box: fill-box; transform-origin: center; animation: heart-beat 2s var(--ease-in-out) infinite; }
.q-trail { transform-box: fill-box; transform-origin: center; animation: q-float 3s var(--ease-in-out) infinite; }
.q-trail:nth-of-type(3) { animation-delay: 400ms; }
@keyframes q-typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes q-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.consent, .before-check { animation: rise 800ms var(--ease-out) 300ms both; }
.before-check li { animation: slide-in 600ms var(--ease-out) both; animation-delay: 500ms; }
.before-check li:nth-child(2) { animation-delay: 580ms; }
.before-check li:nth-child(3) { animation-delay: 660ms; }
.before-check li:nth-child(4) { animation-delay: 740ms; }
.before-check li:nth-child(5) { animation-delay: 820ms; }
.before-check li:nth-child(n+6) { animation-delay: 900ms; }
.is-paged .question.is-entering .scale > .choice, .is-paged .question.is-entering .scale-other { animation: rise 500ms var(--ease-out) both; animation-delay: 120ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(2) { animation-delay: 160ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(3) { animation-delay: 200ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(4) { animation-delay: 240ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(5) { animation-delay: 280ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(6) { animation-delay: 320ms; }
.is-paged .question.is-entering .scale > .choice:nth-child(n+7) { animation-delay: 360ms; }
.is-paged .question.is-entering .scale-other { animation-delay: 420ms; }
.is-paged .is-going-back .question.is-entering { animation-name: question-back; }
@keyframes question-back { from { opacity: 0; transform: translateX(-1rem); } to { opacity: 1; transform: none; } }
.choice input:checked { animation: choice-pick 420ms var(--ease-out); }
.choice:has(input:checked) { animation: choice-chosen 420ms var(--ease-out); }
@keyframes choice-pick { 0% { transform: scale(0.7); } 60% { transform: scale(1.25); } 100% { transform: none; } }
@keyframes choice-chosen { 0% { transform: scale(0.98); } 50% { transform: scale(1.01); } 100% { transform: none; } }
.progress-count.is-bumping { animation: count-bump 420ms var(--ease-out); }
@keyframes count-bump { 0% { transform: translateY(0.4rem); opacity: 0.3; } 100% { transform: none; opacity: 1; } }
.progress-fill { background: linear-gradient(90deg, var(--color-accent), var(--color-accent-deep), var(--color-accent)) 0 0 / 200% 100%; animation: progress-shine 3s linear infinite; }
@keyframes progress-shine { to { background-position: -200% 0; } }
.question.is-missing .scale { animation: q-shake 420ms var(--ease-out); }
@keyframes q-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.is-paged .actions input[type=submit] { animation: submit-glow 2.4s var(--ease-in-out) 600ms infinite; }
@keyframes submit-glow { 0%, 100% { box-shadow: 0 0 0 0 oklch(44% 0.14 8 / 0); } 50% { box-shadow: 0 0 0 6px var(--color-accent-soft); } }
form.assessment .next, form.assessment .back, form.assessment .start, form.assessment input[type=submit] { transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out); }
form.assessment .start:hover, form.assessment .next:hover, form.assessment input[type=submit]:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .question-art *, .consent, .before-check, .before-check li, .question .choice, .question .scale, .scale-other, .choice input, .progress-count, .progress-fill, .actions input[type=submit] { animation: none !important; }
}

/* The other pages in motion (sharing, invitations, safety, leaving a pair,
   deleting the account): each rises in piece by piece under a small
   picture of its step (a card passing between two people, a partner
   coming closer, a shield around a heart, two people drawing apart, a
   dashed ring fading), its lists come in one by one, the shared scores
   fill their bars and the choices lift under the pointer. */
.page-motion > * { animation: rise 700ms var(--ease-out) both; }
.page-motion > :nth-child(2) { animation-delay: 80ms; }
.page-motion > :nth-child(3) { animation-delay: 160ms; }
.page-motion > :nth-child(4) { animation-delay: 240ms; }
.page-motion > :nth-child(5) { animation-delay: 320ms; }
.page-motion > :nth-child(6) { animation-delay: 400ms; }
.page-motion > :nth-child(7) { animation-delay: 480ms; }
.page-motion > :nth-child(n+8) { animation-delay: 560ms; }
.page-art { display: block; width: 7.5rem; height: auto; margin: var(--space-sm) 0 var(--space-2xs); overflow: visible; }
.art-person { fill: var(--color-paper-2); stroke: var(--color-accent); stroke-width: 1.6; transform-box: fill-box; transform-origin: center; }
.art-partner { fill: var(--color-accent-soft); stroke-dasharray: 4 4; }
.art-dashed { fill: none; stroke-dasharray: 4 4; }
.art-path { fill: none; stroke: var(--color-rule); stroke-width: 1.4; stroke-dasharray: 3 4; stroke-linecap: round; }
.art-card { fill: var(--color-paper); stroke: var(--color-accent); stroke-width: 1.4; transform-box: fill-box; animation: card-pass 3.2s var(--ease-in-out) infinite; }
.art-heart { fill: var(--color-accent); fill-opacity: 0.85; transform-box: fill-box; transform-origin: center; animation: heart-beat 2s var(--ease-in-out) infinite; }
.art-shield { fill: var(--color-paper-2); stroke: var(--color-accent); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: motif-draw 1.4s var(--ease-out) 200ms both; }
.art-coming { animation: come-closer 3.6s var(--ease-in-out) infinite; }
.art-unavailable, .art-delete { opacity: 0.75; }
.art-safety, .art-unavailable, .art-delete { width: 3.25rem; }
.art-invite, .art-leave { width: 5.5rem; }
.art-dashed { animation: motif-turn 18s linear infinite; }
.art-fading { animation: motif-turn 18s linear infinite, ring-fade 3s var(--ease-in-out) infinite; }
.art-apart-a { animation: drift-left 4s var(--ease-in-out) infinite; }
.art-apart-b { animation: drift-right 4s var(--ease-in-out) infinite; }
@keyframes card-pass { 0%, 10% { transform: translateX(-8px); opacity: 0; } 30% { opacity: 1; } 70% { opacity: 1; } 90%, 100% { transform: translateX(24px); opacity: 0; } }
@keyframes come-closer { 0%, 100% { transform: translateX(8px); } 50% { transform: translateX(0); } }
@keyframes ring-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes drift-left { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
@keyframes drift-right { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }
.page-motion ul li { animation: slide-in 600ms var(--ease-out) both; animation-delay: 400ms; }
.page-motion ul li:nth-child(2) { animation-delay: 470ms; }
.page-motion ul li:nth-child(3) { animation-delay: 540ms; }
.page-motion ul li:nth-child(4) { animation-delay: 610ms; }
.page-motion ul li:nth-child(5) { animation-delay: 680ms; }
.page-motion ul li:nth-child(n+6) { animation-delay: 750ms; }
.page-motion .score-bar { width: 3.5rem; }
.page-motion .score-bar::after { animation: art-grow 1s var(--ease-out) 500ms both; }
.page-motion tbody tr { transition: background-color var(--dur-short) var(--ease-out); }
.page-motion tbody tr:hover { background: var(--color-paper-2); }
.share-option { transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.share-option:hover { transform: translateY(-2px); }
.page-motion .share-option { animation: rise 500ms var(--ease-out) 300ms both; }
.page-motion .share-option:nth-of-type(2) { animation-delay: 380ms; }
.page-motion .share-option:nth-of-type(n+3) { animation-delay: 460ms; }
.page-motion .field input[type=text], .share-url input { transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out); }
.page-motion .field input[type=text]:focus, .share-url input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 4px var(--color-accent-soft); outline: none; }
.page-motion button, .page-motion input[type=submit], .page-motion .button { transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.page-motion button:hover, .page-motion input[type=submit]:hover, .page-motion .button:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .page-motion > *, .page-motion ul li, .page-art *, .page-motion .share-option, .page-motion .score-bar::after { animation: none !important; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 150ms !important; animation-duration: 150ms !important; animation-iteration-count: 1 !important; }
  @keyframes question-in { from { opacity: 0; } to { opacity: 1; } }
}

/* ---------- Login ---------- */
.login .lead { margin-bottom: var(--space-md); overflow-wrap: anywhere; }
.login .note { color: var(--color-muted); font-size: var(--text-sm); }
.login .actions { margin-top: var(--space-md); }

/* ---------- The user's page (/me) and deleting the account ---------- */
.account h2 { font-size: var(--text-md); margin-top: var(--space-xl); }
.account .note { color: var(--color-muted); font-size: var(--text-sm); }
.account .adopted { margin-top: var(--space-sm); }
.my-assessments ul, .my-checks ul { list-style: none; padding: 0; margin: 0 0 var(--space-sm); border-top: var(--rule); }
.my-assessments li, .my-checks li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); padding: var(--space-xs) 0; border-bottom: var(--rule); }
.my-assessments .day, .my-checks .day { min-width: 8.5em; color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums lining-nums; }
.my-assessments .name, .my-checks .name { flex: 1 1 12rem; min-width: 0; font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.my-assessments button.danger, .my-checks button.danger, .account-actions button, .name-form input[type=submit] {
  min-height: 2.5rem; padding: var(--space-3xs) var(--space-md); font-size: var(--text-sm);
  background: transparent; color: var(--color-accent-deep); border-color: var(--color-rule);
}
.my-assessments button.danger:hover, .my-checks button.danger:hover, .account-actions button:hover, .name-form input[type=submit]:hover {
  background: var(--color-paper-2); border-color: var(--color-accent); color: var(--color-accent-deep);
}
.take { margin-top: var(--space-md); }
.name-form .actions { justify-content: flex-start; margin-top: var(--space-xs); }
.account-data .email { overflow-wrap: anywhere; }
.account-actions { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-xs); }
.account-delete ul { padding-left: var(--space-md); }
.account-delete .actions { justify-content: space-between; }

/* ---------- The pair on /me, invitations and the safety page ---------- */
.pair .pair-state { font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.pair .verify { padding: var(--space-xs) var(--space-sm); border-left: 2px solid var(--color-accent); background: var(--color-paper-2); }
.pair .expires, .invitation .expires { font-variant-numeric: tabular-nums lining-nums; }
.pair-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-sm); }
.pair-actions form { display: inline; }
.safety-link { margin-top: var(--space-md); font-size: var(--text-sm); }
.invitation .lead { margin-bottom: var(--space-md); overflow-wrap: anywhere; }
.invitation .note { color: var(--color-muted); font-size: var(--text-sm); }
.invitation .once { font-weight: 600; }
.invitation .share-url { margin-bottom: var(--space-sm); }
.invitation-points { padding-left: var(--space-md); }
.invitation .actions { margin-top: var(--space-md); }
.accept-form { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: var(--rule); }
.safety h2 { font-size: var(--text-md); }
.safety ul { padding-left: var(--space-md); }

/* ---------- Sharing with the partner, the comparison, ending the pair ---------- */
.pair .share-state { font-weight: 600; }
.pair .shared-assessment { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.pair-leave { margin-top: var(--space-md); font-size: var(--text-sm); }
.pair-share h2, .pair-leave-confirm h2 { font-size: var(--text-md); }
.pair-share .lead, .pair-leave-confirm .lead { overflow-wrap: anywhere; }
.pair-share .note { color: var(--color-muted); font-size: var(--text-sm); }
.sharing-now { padding: var(--space-xs) var(--space-sm); background: var(--color-paper-2); border-radius: var(--radius-input); overflow-wrap: anywhere; }
.share-choice fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.share-choice legend { padding: 0; margin-bottom: var(--space-sm); overflow-wrap: anywhere; }
.share-option {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3xs) var(--space-sm);
  min-height: 3.25rem; padding: var(--space-2xs) var(--space-sm); margin-bottom: var(--space-2xs);
  border: 1px solid var(--color-rule); border-radius: var(--radius-card); cursor: pointer;
}
.share-option:hover { background: var(--color-paper-2); border-color: var(--color-accent); }
.share-option:has(input:checked) { background: var(--color-accent-soft); border-color: var(--color-accent); }
.share-option input { width: 1.25rem; height: 1.25rem; margin: 0; flex: none; accent-color: var(--color-accent); }
.share-option .day { color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums lining-nums; }
.share-option .name { flex: 1 1 10rem; min-width: 0; font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.share-preview { padding: var(--space-md); margin-bottom: var(--space-sm); border: var(--rule); border-radius: var(--radius-card); }
.share-preview .preview-name { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; margin-bottom: 0; }
.share-preview .preview-day { color: var(--color-muted); font-size: var(--text-sm); }
.preview-scores th, .preview-scores td { padding-inline: var(--space-3xs); }
.preview-scores thead th { font-size: var(--text-xs); color: var(--color-muted); letter-spacing: 0.08em; }
.preview-scores tbody th { font-family: var(--font-display); font-weight: 600; }
.preview-scores td.score { font-family: var(--font-display); font-weight: 600; color: var(--color-accent-deep); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.preview-scores td.band { font-size: var(--text-sm); }
.share-cautions { padding-left: var(--space-md); }
.share-cautions li { margin-bottom: var(--space-2xs); }
.pair-leave-confirm ul { padding-left: var(--space-md); }

.comparison-heading { padding: var(--space-xl) 0 var(--space-lg); border-bottom: var(--rule); }
.comparison-heading h1 { font-size: var(--text-2xl); overflow-wrap: anywhere; }
.not-compatibility { max-width: var(--measure); padding-left: var(--space-md); border-left: 2px solid var(--color-accent); }
.people { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-sm); margin: var(--space-md) 0 0; }
.people dt { font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.people dd { margin: 0; font-size: var(--text-sm); overflow-wrap: anywhere; }
.people .taken { color: var(--color-muted); font-variant-numeric: tabular-nums lining-nums; }
.person { padding-top: var(--space-2xs); border-top: 2px solid var(--color-accent); }
.person.theirs { border-top: 2px dashed var(--color-ink); }

.radar-mine { fill: var(--color-accent); fill-opacity: 0.2; stroke: var(--color-accent); stroke-width: 2; }
.radar-theirs { fill: none; stroke: var(--color-ink); stroke-width: 2; }
.radar-legend { list-style: none; padding: 0; margin: var(--space-sm) 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs) var(--space-lg); font-size: var(--text-sm); }
.radar-legend li { display: inline-flex; align-items: center; gap: var(--space-2xs); overflow-wrap: anywhere; }
.legend-line { display: inline-block; width: 2rem; flex: none; border-top: 2px solid var(--color-accent); }
.legend-theirs .legend-line { border-top: 2px dashed var(--color-ink); }

.comparison-scores thead th.col-mine, .comparison-scores thead th.col-theirs { overflow-wrap: anywhere; white-space: normal; }
.comparison-scores td.pair-score { white-space: normal; }
.pair-score .score { display: block; font-family: var(--font-display); font-size: var(--text-md); font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.pair-score.mine .score { color: var(--color-accent-deep); }
.pair-score.theirs .score { color: var(--color-ink); }
.pair-score .band { display: block; font-size: var(--text-xs); line-height: 1.6; color: var(--color-muted); }
.common, .different, .prompts { margin-top: var(--space-xl); }
.common-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.common-list li { padding: var(--space-3xs) var(--space-sm); border: 1px solid var(--color-accent); border-radius: var(--radius-pill); font-weight: 600; color: var(--color-accent-deep); }
.different h3 { color: var(--color-accent-deep); }
.different .subject { font-weight: 600; margin-bottom: var(--space-3xs); overflow-wrap: anywhere; }
.different .summary { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
.prompts dt { font-family: var(--font-display); font-weight: 600; color: var(--color-accent-deep); margin-top: var(--space-sm); }
.prompts dd { margin: 0; padding-left: var(--space-md); border-left: 2px solid var(--color-rule); }
.comparison-links { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-lg); margin-top: var(--space-lg); font-size: var(--text-sm); }
.comparison-unavailable .note { color: var(--color-muted); font-size: var(--text-sm); }

@media (max-width: 30rem) {
  .comparison-heading h1 { font-size: var(--text-xl); }
  .comparison-scores thead th:first-child { width: 40%; }
  .comparison-scores th, .comparison-scores td { padding-inline: var(--space-3xs); }
  .share-preview { padding: var(--space-sm); }
}

/* ---------- The relationship check's result (/checks/:token) ---------- */
.check-heading .taken, .check-heading .reception-on { margin: 0; color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums lining-nums; }
.fulfilled, .map, .fulfillment, .changes, .themes, .sharing { margin-top: var(--space-xl); }
.fulfilled .note, .map .lead, .themes .lead { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
.map-chart { padding: 0; }
.fulfillment-map { display: block; width: 100%; max-width: 28rem; height: auto; margin: 0 auto; overflow: visible; }
.map-frame { fill: none; stroke: var(--color-rule); stroke-width: 1; }
.map-area { fill: var(--color-accent); fill-opacity: 0.08; }
.map-guide { stroke: var(--color-muted); stroke-width: 1; stroke-dasharray: 4 4; }
.map-point { fill: var(--color-accent); stroke: var(--color-paper); stroke-width: 2; }
.map-label { fill: var(--color-ink); font-family: var(--font-body); font-size: 15px; font-weight: 600; paint-order: stroke; stroke: var(--color-paper); stroke-width: 3px; stroke-linejoin: round; }
.map-axis { fill: var(--color-muted); font-family: var(--font-body); font-size: 13px; }
.map-axis-name, .map-area-name { fill: var(--color-ink); font-family: var(--font-body); font-size: 14px; }
.map-area-name { fill: var(--color-accent-deep); font-weight: 600; }
.map-none { padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }
.fulfillment td.reference { font-family: var(--font-body); font-size: var(--text-sm); font-weight: normal; color: var(--color-ink); white-space: normal; }
.changes td.change { font-size: var(--text-sm); }
.theme { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: var(--rule); }
.theme h3 { color: var(--color-accent-deep); margin-bottom: var(--space-3xs); }
.theme .kind { margin: 0 0 var(--space-xs); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); }
.theme .observation { max-width: var(--measure); }
.theme .questions dt { font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); margin-top: var(--space-xs); }
.theme .questions dd { margin: 0; padding-left: var(--space-md); border-left: 2px solid var(--color-accent); }
.themes-none { padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }

/* ---------- Sharing a check, the pair's check page (/pair/check) ---------- */
.pair .check-share { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: var(--rule); }
.pair .check-share h3 { font-size: var(--text-md); margin-bottom: var(--space-2xs); }
.pair-check-share caption { caption-side: top; text-align: left; font-weight: 600; padding-bottom: var(--space-3xs); }
.preview-changes { margin-bottom: var(--space-sm); }
.preview-changes td.change { font-size: var(--text-sm); }
.timing { margin-top: var(--space-lg); }
.timing-note { max-width: var(--measure); padding: var(--space-sm) var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }
.both-fulfilled, .pair-check-scores, .pair-check-changes, .dialogue-guide { margin-top: var(--space-xl); }
.both-fulfilled .lead { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
.pair-check-scores thead th.col-mine, .pair-check-scores thead th.col-theirs,
.pair-check-changes thead th.col-mine, .pair-check-changes thead th.col-theirs { overflow-wrap: anywhere; white-space: normal; }
.pair-check-scores td.pair-score { white-space: normal; }
.pair-check-changes td.change { font-size: var(--text-sm); white-space: normal; }
.theme .questions dt .role { margin-left: var(--space-2xs); padding: 0 var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; color: var(--color-accent-deep); white-space: nowrap; }
.theme .questions dd.observation { border-left-color: var(--color-rule); }
.dialogue-guide ol { max-width: var(--measure); padding-left: var(--space-md); }
.dialogue-guide li { margin-bottom: var(--space-2xs); }
.dialogue-guide .note { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }

/* ---- Hybrid Assessment: the draft, one item per page ---- */
.draft-progress { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); margin: var(--space-xs) 0 0; padding: 0; font-size: var(--text-sm); color: var(--color-muted); font-variant-numeric: tabular-nums lining-nums; }
.draft-progress li { padding: var(--space-3xs) var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); }
.draft-progress li.is-current { border-color: var(--color-accent); color: var(--color-accent-deep); font-weight: 600; }
.draft-item .place { margin: var(--space-md) 0 var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); }
.draft-item .prompt-note { margin: 0 0 var(--space-md); color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; }
.draft-item .scene-label { display: block; font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); margin-bottom: var(--space-3xs); }
/* The one skip, under the scale or the two actions: no legend over it, so
   the hairline alone sets it apart, with room above to breathe */
.draft-item .scale-other { margin-top: var(--space-md); }
/* The two actions of a comparison: full sentences, side by side when there
   is room, one above the other on a narrow screen; never cut short */
.actions-pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-xs); }
.actions-pair .choice { align-items: flex-start; min-height: 4.5rem; padding: var(--space-sm); line-height: 1.7; }
.actions-pair .choice span { min-width: 0; overflow-wrap: anywhere; }
.actions-pair .choice input { margin-top: 0.15rem; }
@media (min-width: 40rem) {
  .actions-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.draft-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; }
.draft-links { margin-top: var(--space-md); font-size: var(--text-sm); }
.draft-resume { padding: var(--space-md); margin: var(--space-md) 0 var(--space-lg); background: var(--color-paper-2); border-radius: var(--radius-card); }
.draft-resume h2 { font-size: var(--text-lg); margin: 0 0 var(--space-xs); }
.draft-resume .draft-progress { display: block; margin: 0 0 var(--space-2xs); font-size: var(--text-base); color: var(--color-ink); font-weight: 600; }
.draft-resume .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; margin-top: var(--space-sm); }
.review-open ul { padding-left: var(--space-md); line-height: 2; }
.review-answers { margin: var(--space-lg) 0; }
.review-answers summary { cursor: pointer; font-weight: 600; }
.review-answers h2 { font-size: var(--text-md); margin: var(--space-md) 0 var(--space-2xs); }
.review-list { padding-left: var(--space-md); }
.review-list li { padding: var(--space-2xs) 0; border-bottom: var(--rule); line-height: 1.7; }
.review-list .review-label { display: block; }
.review-list .review-answer { font-weight: 600; color: var(--color-accent-deep); margin-right: var(--space-xs); }
.review-list li.is-open .review-answer { color: var(--color-muted); }
.not-ready { color: var(--color-accent-deep); }

/* ---- Hybrid Assessment: the owner's result ---- */
.hybrid-measures { list-style: none; padding: 0; margin: var(--space-sm) 0; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); line-height: 1.8; }
.hybrid-measures strong { display: inline-block; margin-right: var(--space-xs); color: var(--color-accent-deep); }
/* One scene from the answers first: the page's title stays small, the
   card's headline carries the page */
.hybrid-top { margin-top: var(--space-lg); }
.hybrid-top .hybrid-title { font-size: var(--text-md); font-weight: 600; color: var(--color-muted); margin: 0 0 var(--space-md); }
.hybrid-top .top-kicker { font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.16em; color: var(--color-accent-deep); margin: 0; }
.hybrid-top .top-note { color: var(--color-muted); font-size: var(--text-xs); margin: 0 0 var(--space-sm); }
.hybrid-top .top-summary, .hybrid-top .no-choice { line-height: 1.8; }
.hybrid-top .no-choice { color: var(--color-muted); font-size: var(--text-sm); }
.scene-card { padding: var(--space-md); margin-bottom: var(--space-sm); border: var(--rule); border-left: 3px solid var(--color-accent); border-radius: var(--radius-card); background: var(--color-paper); }
.scene-card .scene-headline { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; line-height: 1.5; margin: 0 0 var(--space-sm); }
.scene-card p { margin: 0 0 var(--space-2xs); line-height: 1.8; }
.scene-card .scene-question { margin-top: var(--space-sm); font-weight: 600; }
.scene-answer, .another-scene { margin-top: var(--space-xs); font-size: var(--text-sm); }
.scene-answer summary, .another-scene summary, .hybrid-breakdown > summary { cursor: pointer; color: var(--color-accent-deep); }
.another-scene .scene-card { margin-top: var(--space-xs); font-size: var(--text-base); }
.hybrid-reflect { margin-top: var(--space-xl); }
.hybrid-reflect .reflect-question { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; line-height: 1.7; }
.hybrid-breakdown { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--rule); }
.hybrid-breakdown > summary { font-weight: 600; }
.scene-source { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: var(--space-sm) 0 0; padding-top: var(--space-xs); border-top: var(--rule); font-size: var(--text-sm); }
.scene-source dt { font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); margin-top: var(--space-2xs); }
.scene-source dd { margin: 0; }
.hybrid-row { padding: var(--space-md) 0; border-top: var(--rule); }
.hybrid-row h3 { display: flex; align-items: center; gap: var(--space-2xs); margin: 0 0 var(--space-3xs); font-size: var(--text-lg); }
.hybrid-row h3 svg { width: 1.5rem; height: 1.5rem; flex: none; }
.hybrid-row .row-name { color: var(--color-muted); font-size: var(--text-sm); margin: 0 0 var(--space-sm); }
/* The two readings of one dimension: one above the other on a phone,
   side by side when there is room; never on one axis */
.hybrid-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); }
@media (min-width: 40rem) {
  .hybrid-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--space-lg); }
}
.hybrid-columns h4 { margin: 0 0 var(--space-3xs); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); }
.hybrid-columns p { margin: 0 0 var(--space-3xs); line-height: 1.7; }
.hybrid-sensitivity .sensitivity-text { font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.score-bar { display: block; height: 0.375rem; margin: var(--space-3xs) 0 var(--space-2xs); border-radius: var(--radius-pill); background: linear-gradient(to right, var(--color-accent) calc(var(--score) * 1%), var(--color-rule) calc(var(--score) * 1%)); }
.hybrid-columns .valid-count, .hybrid-columns .preference-equal, .hybrid-columns .preference-missing { color: var(--color-muted); font-size: var(--text-sm); }
.hybrid-details { margin-top: var(--space-xs); font-size: var(--text-sm); }
.hybrid-details summary { cursor: pointer; color: var(--color-accent-deep); }
.hybrid-details h5 { margin: var(--space-sm) 0 var(--space-3xs); font-size: var(--text-xs); font-weight: 600; color: var(--color-muted); }
.hybrid-details ul { list-style: none; padding: 0; margin: 0; }
.hybrid-details li { padding: var(--space-2xs) 0; border-bottom: var(--rule); line-height: 1.7; }
.hybrid-details li span { display: block; }
.hybrid-details .detail-answer { font-weight: 600; color: var(--color-accent-deep); }
.hybrid-details .detail-scene { color: var(--color-muted); }
.hybrid-next { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: var(--rule); }
.legacy-note { color: var(--color-muted); font-size: var(--text-sm); }

/* ---- Deleting an assessment: what goes, what stays ---- */
.result-delete h2 { font-size: var(--text-md); margin: var(--space-lg) 0 var(--space-2xs); }
.result-delete ul { padding-left: var(--space-md); line-height: 1.9; }
.result-delete .kept { padding: var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }
.result-delete .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); align-items: center; margin-top: var(--space-lg); }
.danger-link { color: var(--color-accent-deep); font-size: var(--text-sm); }

/* ---- Sharing a Hybrid Assessment: chosen dimensions only ---- */
.area-option { align-items: flex-start; flex-wrap: wrap; }
.area-option .summary { flex: 1 1 100%; padding-left: calc(1.25rem + var(--space-xs)); color: var(--color-muted); font-size: var(--text-sm); }
.share-option .kind, .my-assessments .kind { color: var(--color-muted); font-size: var(--text-xs); }
.hybrid-share-heading { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; color: var(--color-muted); margin: var(--space-sm) 0 var(--space-3xs); }
.hybrid-share-areas dt { font-family: var(--font-display); font-weight: 600; margin-top: var(--space-xs); }
.hybrid-share-areas dd { margin: 0; color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; }
.share-withheld { list-style: none; padding: 0; font-size: var(--text-sm); color: var(--color-muted); }
.share-withheld .withheld-mark { margin-left: var(--space-xs); padding: 0 var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); font-size: var(--text-xs); }
.shared-side { margin-top: var(--space-lg); padding: var(--space-md); border: var(--rule); border-radius: var(--radius-card); }
.shared-side h2 { margin-top: 0; font-size: var(--text-lg); }
.separate-note { color: var(--color-muted); font-size: var(--text-sm); line-height: 1.8; }
.my-drafts { padding: var(--space-sm); margin-bottom: var(--space-md); background: var(--color-paper-2); border-radius: var(--radius-card); }
.my-drafts h3 { margin: 0 0 var(--space-2xs); font-size: var(--text-base); }
.my-drafts li { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); align-items: center; }

/* The Hybrid Assessment in motion, like the paged questionnaire: each
   item's question rises in and its choices follow one by one, the current
   part's progress pill breathes, and the review page rises in piece by
   piece (.page-motion). */
.draft-item .place, .draft-item .prompt, .draft-item .question legend { animation: rise 600ms var(--ease-out) both; }
.draft-item .prompt { animation-delay: 60ms; }
.draft-item .question legend { animation-delay: 120ms; }
.draft-item .scale > .choice { animation: rise 500ms var(--ease-out) both; animation-delay: 200ms; }
.draft-item .scale > .choice:nth-child(2) { animation-delay: 240ms; }
.draft-item .scale > .choice:nth-child(3) { animation-delay: 280ms; }
.draft-item .scale > .choice:nth-child(4) { animation-delay: 320ms; }
.draft-item .scale > .choice:nth-child(5) { animation-delay: 360ms; }
.draft-item .scale > .choice:nth-child(6) { animation-delay: 400ms; }
.draft-item .scale > .choice:nth-child(n+7) { animation-delay: 440ms; }
.draft-item .scale-other > .choice { animation-delay: 480ms; }
.draft-progress li.is-current { animation: pill-breathe 2.4s var(--ease-in-out) infinite; }
@keyframes pill-breathe { 0%, 100% { box-shadow: 0 0 0 0 oklch(44% 0.14 8 / 0); } 50% { box-shadow: 0 0 0 4px var(--color-accent-soft); } }
.draft-actions button { transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.draft-actions button:hover { transform: translateY(-2px); }
.review-list li { transition: background-color var(--dur-short) var(--ease-out); }
.review-list li:hover { background: var(--color-paper-2); }
@media (prefers-reduced-motion: reduce) {
  .draft-item *, .draft-progress li { animation: none !important; }
}
