/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 · macrostructure: Continuous Clinical Path · theme: Kinetic Clinical · contrast: pass (40-41) · nav: N3 · footer: Ft5 · slop: pass (42-45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34, 49, 50-57) */
@import url("./premium-tokens.css");

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

html,
body {
  margin: 0;
  min-width: 0;
  overflow-x: clip;
}

html {
  scroll-behavior: smooth;
  background: var(--color-paper);
  color-scheme: light dark;
}

body {
  min-height: 100dvh;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

* {
  scrollbar-color: var(--color-rule-strong) var(--color-paper-deep);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--color-paper-deep);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid var(--color-paper-deep);
  border-radius: var(--radius-control);
  background: var(--color-rule-strong);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  border: 0;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 4px;
}

button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

section[id],
p[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  font-family: var(--font-heading);
  font-style: normal;
  letter-spacing: 0;
  text-wrap: balance;
}

h3 {
  font-family: var(--font-body);
  font-style: normal;
  letter-spacing: 0;
  text-wrap: balance;
}

.section-kicker {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-accent-strong);
  font-family: var(--font-editorial);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.journey-section .section-kicker,
.finale-section .section-kicker {
  color: var(--color-accent-bright);
}

.scenario-section .section-kicker {
  color: var(--color-cobalt-field);
}

.compliance-section .section-kicker {
  color: var(--color-night-ink-soft);
}

.latin-ui,
.stage-number,
.flow-index,
.site-footer-records {
  font-family: var(--font-latin);
}

p {
  text-wrap: pretty;
}

.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 100;
  transform: translateY(-180%);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-control);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur-short) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-xs) max(var(--space-lg), calc((100vw - var(--content-max)) / 2));
  border-bottom: var(--rule-hair) solid color-mix(in oklch, var(--color-rule) 72%, transparent);
  background: var(--color-glass);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--color-paper-raised) 78%, transparent);
}

.wordmark,
.footer-wordmark {
  display: inline-grid;
  width: max-content;
  color: var(--color-ink);
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 0.88;
  letter-spacing: 0;
  text-decoration: none;
}

.wordmark span:last-child,
.footer-wordmark span:last-child {
  color: var(--color-accent);
}

.header-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  font-weight: 650;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.header-action:hover {
  color: var(--color-accent-strong);
}

.header-action {
  justify-content: center;
  min-width: 112px;
  padding-inline: var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-control);
  color: var(--color-ink);
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.header-action:hover {
  border-color: var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) 8%, transparent);
}

.header-action:active {
  transform: translateY(1px);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - var(--header-height) - 54px);
  overflow: clip;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
}

#heroCanvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.96;
}

.motion-toggle {
  position: absolute;
  right: max(var(--space-lg), calc((100vw - var(--content-max)) / 2));
  bottom: var(--space-md);
  z-index: 2;
  min-height: 44px;
  padding: var(--space-2xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-control);
  background: color-mix(in oklch, var(--color-paper-raised) 90%, transparent);
  color: var(--color-ink-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.motion-toggle:hover {
  border-color: var(--color-accent);
  background: var(--color-paper-raised);
  color: var(--color-ink);
}

.motion-toggle:active {
  transform: translateY(1px);
}

.hero-shell {
  width: min(calc(100% - var(--space-2xl)), var(--content-max));
  min-height: inherit;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr);
  align-items: center;
  gap: var(--space-2xl);
  padding: var(--space-xl) 0;
}

.hero-copy {
  min-width: 0;
  width: 100%;
  max-width: 960px;
}

.hero h1 {
  max-width: 12ch;
  margin: 0;
  font-size: var(--text-hero);
  font-weight: 780;
  line-height: 0.96;
}

.hero h1 span,
.hero h1 strong {
  display: block;
}

.hero h1 span {
  color: var(--color-accent);
  font-size: 0.46em;
  font-weight: 760;
  line-height: 1.1;
}

.hero h1 strong {
  color: var(--color-ink);
  font-weight: 780;
}

.hero-copy > p {
  max-width: 34ch;
  margin: var(--space-lg) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-lg);
  line-height: 1.55;
}

.hero-actions,
.finale-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-control);
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 720;
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}

.button:hover {
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 12px 28px var(--color-shadow);
}

.button-primary:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.button-secondary {
  border-color: var(--color-rule-strong);
  background: color-mix(in oklch, var(--color-paper-raised) 94%, transparent);
  color: var(--color-ink);
}

.button-secondary:hover {
  border-color: var(--color-accent);
  background: color-mix(in oklch, var(--color-accent) 8%, var(--color-paper-raised));
}

.hero-boundary {
  align-self: end;
  max-width: 34ch;
  margin: 0 0 var(--space-xl);
  padding-top: var(--space-sm);
  border-top: var(--rule-hair) solid var(--color-rule-strong);
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

html:not(.is-ready) .hero h1,
html:not(.is-ready) .hero-copy > p,
html:not(.is-ready) .hero-actions,
html:not(.is-ready) .hero-boundary {
  opacity: 0;
  transform: translateY(14px);
}

.hero h1,
.hero-copy > p,
.hero-actions,
.hero-boundary {
  transition: opacity var(--dur-long) var(--ease-out), transform var(--dur-long) var(--ease-out);
}

.hero-copy > p {
  transition-delay: 80ms;
}

.hero-actions {
  transition-delay: 140ms;
}

.hero-boundary {
  transition-delay: 180ms;
}

.flow-index {
  min-height: 54px;
  display: flex;
  align-items: stretch;
  border-bottom: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper-raised);
}

.flow-index ol {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
}

.flow-index li {
  min-width: 0;
  padding: var(--space-xs) var(--space-md);
  border-left: var(--rule-hair) solid var(--color-rule);
}

.flow-index li:last-child {
  border-right: var(--rule-hair) solid var(--color-rule);
}

.flow-index span,
.flow-index small {
  display: block;
  letter-spacing: 0;
}

.flow-index span {
  color: var(--color-ink);
  font-size: var(--text-sm);
  font-weight: 740;
}

.flow-index small {
  margin-top: 2px;
  color: var(--color-ink-faint);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.journey-section,
.audience-section,
.boundary-section,
.compliance-section {
  width: min(calc(100% - var(--space-2xl)), var(--content-max));
  margin: 0 auto;
}

.journey-section {
  padding: var(--space-4xl) 0;
}

.section-heading {
  max-width: 820px;
}

.section-heading h2,
.audience-statement h2,
.finale-section h2 {
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-3xl);
  font-weight: 750;
  line-height: 1.04;
}

.section-heading > p {
  max-width: 58ch;
  margin: var(--space-md) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-body-lg);
}

.journey-layout {
  margin-top: var(--space-3xl);
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
  align-items: start;
}

.journey-visual {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  min-width: 0;
  overflow: clip;
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-panel);
  background: color-mix(in oklch, var(--color-paper-raised) 82%, transparent);
  box-shadow: 0 24px 60px var(--color-shadow), inset 0 1px 0 color-mix(in oklch, var(--color-paper-raised) 88%, transparent);
}

.journey-status {
  min-height: 118px;
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  align-items: start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.journey-status span {
  color: var(--color-accent);
  font-size: var(--text-lg);
  font-weight: 780;
}

.journey-status p {
  margin: 0;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

#journeyCanvas {
  width: 100%;
  height: 410px;
  display: block;
  background: var(--color-paper-deep);
}

.journey-controls,
.scenario-controls {
  display: grid;
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  background: var(--color-paper-raised);
}

.journey-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--rule-hair) solid var(--color-rule);
}

.journey-controls button,
.scenario-controls button {
  min-width: 0;
  min-height: 44px;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-press) var(--ease-out);
}

.journey-controls button:hover,
.scenario-controls button:hover {
  background: var(--color-paper-deep);
  color: var(--color-ink);
}

.journey-controls button[aria-pressed="true"],
.scenario-controls button[aria-pressed="true"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.journey-controls button:active,
.scenario-controls button:active {
  transform: translateY(1px);
}

.journey-copy {
  position: relative;
  min-width: 0;
  padding-left: var(--space-xl);
}

.journey-copy::before,
.journey-copy::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  transform-origin: top;
}

.journey-copy::before {
  background: var(--color-rule);
}

.journey-copy::after {
  transform: scaleY(var(--journey-progress, 0));
  background: var(--color-accent);
}

.journey-copy::after { transition: transform 120ms linear; }

.journey-stage {
  position: relative;
  min-width: 0;
  padding: var(--space-xl) 0 var(--space-3xl);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.journey-stage:first-child {
  padding-top: var(--space-xs);
}

.journey-stage::before {
  content: "";
  position: absolute;
  top: calc(var(--space-xl) + 0.45rem);
  left: calc(var(--space-xl) * -1 - 5px);
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-paper);
  border-radius: 50%;
  background: var(--color-rule-strong);
  box-shadow: 0 0 0 1px var(--color-rule-strong);
  transition: background-color var(--dur-medium) var(--ease-out), box-shadow var(--dur-medium) var(--ease-out), transform var(--dur-medium) var(--ease-out);
}

.journey-stage:first-child::before {
  top: calc(var(--space-xs) + 0.45rem);
}

.journey-stage[aria-current="step"]::before {
  transform: scale(1.18);
  background: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent), 0 0 0 7px color-mix(in oklch, var(--color-accent) 12%, transparent);
}

.stage-number {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
  font-weight: 760;
}

.journey-stage h3 {
  max-width: 20ch;
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-2xl);
  font-weight: 730;
  line-height: 1.1;
}

.journey-stage p {
  max-width: 58ch;
  margin: var(--space-md) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-body-lg);
}

.scenario-section {
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper-deep);
}

.scenario-shell {
  width: min(calc(100% - var(--space-2xl)), var(--content-max));
  margin: 0 auto;
  padding: var(--space-4xl) 0;
}

.section-heading-compact {
  max-width: 760px;
}

.scenario-tool {
  margin-top: var(--space-2xl);
  overflow: clip;
  border: var(--rule-hair) solid var(--color-rule-strong);
  border-radius: var(--radius-panel);
  background: var(--color-paper-raised);
  box-shadow: 0 24px 60px var(--color-shadow);
}

.scenario-controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.scenario-output {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scenario-output article {
  min-width: 0;
  padding: var(--space-xl);
}

.scenario-output article + article {
  border-left: var(--rule-hair) solid var(--color-rule);
}

.scenario-output h3 {
  margin: 0;
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: 760;
}

.scenario-output p {
  margin: var(--space-sm) 0 0;
  color: var(--color-ink);
  font-size: var(--text-body-lg);
}

.text-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: var(--space-lg);
  color: var(--color-accent-strong);
  font-weight: 720;
  text-decoration-color: var(--color-accent);
  transition: color var(--dur-short) var(--ease-out);
}

.text-action:hover {
  color: var(--color-accent);
}

.audience-section {
  padding: var(--space-4xl) 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
}

.audience-statement h2 {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
  max-width: 10ch;
}

.audience-list article {
  padding: var(--space-lg) 0 var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.audience-list article:last-child {
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.audience-list h3 {
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-xl);
  font-weight: 720;
}

.audience-list p {
  max-width: 52ch;
  margin: var(--space-sm) 0 0;
  color: var(--color-ink-soft);
}

.boundary-section {
  padding: var(--space-4xl) 0;
  border-top: var(--rule-hair) solid var(--color-rule);
}

.boundary-grid {
  margin-top: var(--space-2xl);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--rule-hair) solid var(--color-rule-strong);
  border-bottom: var(--rule-hair) solid var(--color-rule-strong);
}

.boundary-grid article {
  min-width: 0;
  padding: var(--space-xl) var(--space-xl) var(--space-2xl) 0;
}

.boundary-grid article + article {
  padding-right: 0;
  padding-left: var(--space-xl);
  border-left: var(--rule-hair) solid var(--color-rule-strong);
}

.boundary-grid h3 {
  margin: 0;
  color: var(--color-accent);
  font-size: var(--text-lg);
  font-weight: 760;
}

.boundary-grid ul {
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
}

.boundary-grid li {
  position: relative;
  padding: var(--space-xs) 0 var(--space-xs) var(--space-md);
  color: var(--color-ink-soft);
}

.boundary-grid li::before {
  content: "";
  position: absolute;
  top: 1.22em;
  left: 0;
  width: 8px;
  height: 2px;
  background: var(--color-accent);
}

.finale-section {
  width: min(calc(100% - var(--space-2xl)), 1120px);
  margin: 0 auto;
  padding: var(--space-4xl) 0;
  text-align: left;
}

.finale-section h2 {
  max-width: 14ch;
}

.finale-section > p {
  max-width: 54ch;
  margin: var(--space-lg) 0 0;
  color: var(--color-ink-soft);
  font-size: var(--text-body-lg);
}

.compliance-section {
  padding: var(--space-xl) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  justify-items: center;
  text-align: center;
}

.compliance-section .section-kicker,
.compliance-section h2 {
  grid-column: 1;
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-lg);
  text-align: center;
}

.compliance-section .section-kicker {
  color: var(--color-night-ink-soft);
}

.compliance-section nav {
  grid-column: 1;
  width: min(100%, 760px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm) var(--space-lg);
}

.compliance-section nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--dur-short) var(--ease-out);
}

.compliance-section nav a:hover {
  color: var(--color-accent);
}

.site-footer {
  width: min(calc(100% - var(--space-2xl)), var(--content-max));
  margin: 0 auto;
  padding: var(--space-xl) 0 var(--space-lg);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
  border-top: var(--rule-hair) solid var(--color-rule-strong);
}

.footer-wordmark {
  font-size: 1.8rem;
}

.site-footer > p {
  justify-self: end;
  max-width: 44ch;
  margin: 0;
  color: var(--color-ink-soft);
  text-align: right;
  font-size: var(--text-sm);
}

.site-footer-records {
  grid-column: 1 / -1;
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
  text-align: center;
}

.site-footer-records .site-icp,
.site-footer-records .site-police-beian {
  display: block;
  width: 100%;
  text-align: center;
}

.site-footer-records p {
  margin: 0;
}

.site-icp {
  color: var(--color-ink);
  font-size: var(--text-body);
  font-weight: 680;
}

.site-police-beian {
  min-height: 1.5em;
  margin-top: var(--space-xs) !important;
  color: var(--color-ink-soft);
  font-size: var(--text-sm);
}

[hidden],
[data-release-hidden="true"] {
  display: none !important;
}

@media (max-width: 1100px) {
  :root {
    --text-hero: 4.5rem;
    --text-3xl: 3.2rem;
  }

  .site-header {
    padding-inline: var(--space-lg);
  }

  .hero-shell,
  .journey-section,
  .scenario-shell,
  .audience-section,
  .boundary-section,
  .compliance-section,
  .site-footer {
    width: min(calc(100% - var(--space-xl)), var(--content-max));
  }

  .hero-shell {
    grid-template-columns: minmax(0, 3fr) minmax(240px, 1fr);
  }

  .journey-layout {
    grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
    gap: var(--space-2xl);
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: 64px;
    --text-hero: 4rem;
    --text-3xl: 2.9rem;
    --text-2xl: 2.2rem;
  }

  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .hero-shell {
    grid-template-columns: minmax(0, 1fr);
    align-content: end;
    align-items: stretch;
    padding-top: var(--space-2xl);
  }

  .hero-boundary {
    max-width: 52ch;
    margin-top: 0;
  }

  .journey-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .journey-visual {
    position: relative;
    top: auto;
  }

  .journey-copy {
    padding-left: var(--space-lg);
  }

  .journey-stage::before {
    left: calc(var(--space-lg) * -1 - 5px);
  }

  .audience-section {
    grid-template-columns: minmax(0, 1fr);
  }

  .audience-statement h2 {
    position: static;
    max-width: 14ch;
  }
}

@media (max-width: 680px) {
  :root {
    --text-hero: 3.2rem;
    --text-3xl: 2.35rem;
    --text-2xl: 1.9rem;
    --text-xl: 1.55rem;
    --text-lg: 1.2rem;
  }

  .site-header {
    gap: var(--space-sm);
    padding-inline: var(--space-md);
  }

  .wordmark {
    font-size: 1.3rem;
  }

  .hero {
    min-height: calc(100dvh - var(--header-height) - 44px);
  }

  #heroCanvas {
    inset: 42% 0 0;
    height: 58%;
    opacity: 0.78;
  }

  .motion-toggle {
    right: var(--space-md);
    bottom: var(--space-sm);
  }

  .hero-shell,
  .journey-section,
  .scenario-shell,
  .audience-section,
  .boundary-section,
  .compliance-section,
  .site-footer,
  .finale-section {
    width: min(calc(100% - var(--space-lg)), var(--content-max));
  }

  .hero-shell {
    gap: var(--space-xl);
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .hero h1 {
    max-width: 10ch;
  }

  .hero h1 span {
    font-size: 0.5em;
  }

  .hero-copy > p {
    max-width: 28ch;
    font-size: var(--text-body-lg);
  }

  .hero-actions,
  .finale-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .button {
    width: 100%;
  }

  .flow-index {
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .flow-index ol {
    min-width: 660px;
  }

  .flow-index li {
    scroll-snap-align: start;
  }

  .journey-section,
  .scenario-shell,
  .audience-section,
  .boundary-section,
  .finale-section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .journey-layout {
    margin-top: var(--space-2xl);
    gap: var(--space-2xl);
  }

  .journey-status {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: var(--space-xs);
    padding: var(--space-md);
  }

  #journeyCanvas {
    height: 300px;
  }

  .journey-controls,
  .scenario-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-stage {
    padding-bottom: var(--space-2xl);
  }

  .scenario-output {
    grid-template-columns: minmax(0, 1fr);
  }

  .scenario-output article {
    padding: var(--space-lg);
  }

  .scenario-output article + article {
    border-top: var(--rule-hair) solid var(--color-rule);
    border-left: 0;
  }

  .boundary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .boundary-grid article,
  .boundary-grid article + article {
    padding: var(--space-lg) 0;
    border-left: 0;
  }

  .boundary-grid article + article {
    border-top: var(--rule-hair) solid var(--color-rule-strong);
  }

  .compliance-section {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .compliance-section nav {
    justify-content: center;
    gap: 0 var(--space-lg);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer > p {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 414px) {
  :root {
    --text-hero: 2.85rem;
    --text-3xl: 2.1rem;
  }

  .site-header {
    padding-inline: var(--space-sm);
  }

  .hero-shell,
  .journey-section,
  .scenario-shell,
  .audience-section,
  .boundary-section,
  .compliance-section,
  .site-footer,
  .finale-section {
    width: min(calc(100% - var(--space-md)), var(--content-max));
  }

  .hero h1 {
    max-width: 9ch;
  }

  .journey-copy {
    padding-left: var(--space-md);
  }

  .journey-stage::before {
    left: calc(var(--space-md) * -1 - 5px);
  }
}

@media (max-width: 375px) {
  :root {
    --text-hero: 2.6rem;
    --text-3xl: 1.95rem;
    --text-2xl: 1.7rem;
  }

  .hero-copy > p {
    max-width: 26ch;
  }
}

@media (max-width: 320px) {
  :root {
    --text-hero: 2.3rem;
    --text-3xl: 1.78rem;
  }

  .wordmark {
    font-size: 1.12rem;
  }

}

/* Focus-led refinement: one visual event per major section. */
.site-header {
  grid-template-columns: auto auto;
  justify-content: space-between;
  gap: var(--space-md);
  background: color-mix(in oklch, var(--color-paper-raised) 86%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in oklch, var(--color-paper-raised) 78%, transparent), 0 12px 36px color-mix(in oklch, var(--color-shadow) 42%, transparent);
}

.wordmark {
  font-size: 1.95rem;
}

.header-action {
  display: inline-flex;
  justify-self: end;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 64%;
  z-index: -2;
  border-left: var(--rule-hair) solid color-mix(in oklch, var(--color-accent) 28%, transparent);
  background: var(--color-cobalt-wash);
  opacity: 0.72;
}

.hero::after {
  content: "";
  position: absolute;
  top: 12%;
  right: max(var(--space-lg), calc((100vw - var(--content-max)) / 2));
  z-index: -1;
  width: 1px;
  height: 24%;
  background: var(--color-accent);
  opacity: 0.55;
}

.flow-index {
  border-color: color-mix(in oklch, var(--color-cobalt-field) 62%, var(--color-night));
  background: color-mix(in oklch, var(--color-cobalt-field) 78%, var(--color-night));
}

.flow-index li {
  border-color: var(--color-night-rule);
  transition: background-color var(--dur-short) var(--ease-out);
}

.flow-index li:last-child {
  border-color: var(--color-night-rule);
}

.flow-index li:hover {
  background: var(--color-night-raised);
}

.flow-index span {
  color: var(--color-night-ink);
}

.flow-index small {
  color: var(--color-night-ink-soft);
}

.journey-section {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: clip;
  padding: var(--space-4xl) max(var(--space-2xl), calc((100vw - var(--content-max)) / 2));
  background: color-mix(in oklch, var(--color-night) 82%, var(--color-cobalt-field));
  color: var(--color-night-ink);
}

.journey-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(color-mix(in oklch, var(--color-night-rule) 34%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in oklch, var(--color-night-rule) 26%, transparent) 1px, transparent 1px);
  background-size: 100% 112px, 112px 100%;
  opacity: 0.38;
}

.journey-section::after {
  content: "";
  position: absolute;
  top: 0;
  left: max(var(--space-2xl), calc((100vw - var(--content-max)) / 2));
  width: clamp(140px, 24vw, 360px);
  height: 3px;
  background: var(--color-accent-bright);
}

.journey-section > * {
  position: relative;
}

.journey-section .section-heading h2 {
  color: var(--color-night-ink);
}

.journey-section .section-heading h2 strong {
  display: block;
  color: var(--color-accent-bright);
  font-weight: inherit;
}

.journey-section .section-heading > p,
.journey-stage p,
.journey-status p {
  color: var(--color-night-ink-soft);
}

.journey-visual {
  border-color: var(--color-night-rule);
  background: color-mix(in oklch, var(--color-night-raised) 84%, transparent);
  box-shadow: 0 28px 80px color-mix(in oklch, var(--color-night) 80%, transparent), inset 0 1px 0 color-mix(in oklch, var(--color-night-ink) 9%, transparent);
}

.journey-status,
.journey-controls,
.journey-stage {
  border-color: var(--color-night-rule);
}

.journey-status span,
.stage-number {
  color: var(--color-accent-bright);
}

#journeyCanvas {
  background: var(--color-night-raised);
}

.journey-controls {
  background: var(--color-night);
}

.journey-controls button {
  color: var(--color-night-ink-soft);
}

.journey-controls button:hover {
  background: var(--color-night-raised);
  color: var(--color-night-ink);
}

.journey-controls button[aria-pressed="true"] {
  background: var(--color-accent-bright);
  color: var(--color-night);
}

.journey-copy::before {
  background: var(--color-night-rule);
}

.journey-copy::after {
  background: var(--color-accent-bright);
}

.journey-stage::before {
  border-color: var(--color-night);
  background: var(--color-night-rule);
  box-shadow: 0 0 0 1px var(--color-night-rule);
}

.journey-stage[aria-current="step"]::before {
  background: var(--color-accent-bright);
  box-shadow: 0 0 0 1px var(--color-accent-bright), 0 0 0 7px color-mix(in oklch, var(--color-accent-bright) 14%, transparent);
}

.journey-stage h3 {
  color: var(--color-night-ink);
}

.scenario-section {
  position: relative;
  overflow: clip;
  border-color: color-mix(in oklch, var(--color-cobalt-field) 28%, transparent);
  background: color-mix(in oklch, var(--color-cobalt-wash) 88%, var(--color-paper-deep));
}

.scenario-section::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(var(--space-2xl), calc((100vw - var(--content-max)) / 2));
  width: 0;
  background: transparent;
}

.scenario-shell {
  position: relative;
}

.scenario-section .section-heading h2,
.scenario-section .section-heading > p {
  color: var(--color-night);
}

.scenario-section .section-heading h2 strong {
  display: block;
  color: var(--color-cobalt-field);
  font-weight: inherit;
}

.scenario-tool {
  position: relative;
  border-color: var(--color-night-rule);
  background: var(--color-night);
  box-shadow: 0 34px 90px color-mix(in oklch, var(--color-cobalt-field) 20%, transparent);
}

.scenario-tool::before {
  content: "";
  position: absolute;
  top: 60px;
  right: 0;
  left: 0;
  z-index: 2;
  height: 2px;
  pointer-events: none;
  transform: scaleX(0.08);
  transform-origin: left;
  background: var(--color-accent-bright);
  box-shadow: 0 0 24px color-mix(in oklch, var(--color-accent-bright) 62%, transparent);
  animation: scenario-trace 4.8s var(--ease-in-out) infinite alternate;
}

@keyframes scenario-trace {
  to { transform: scaleX(1); }
}

.scenario-controls {
  border-color: var(--color-night-rule);
  background: var(--color-night-raised);
}

.scenario-controls button {
  color: var(--color-night-ink-soft);
}

.scenario-controls button:hover {
  background: color-mix(in oklch, var(--color-accent-bright) 10%, var(--color-night-raised));
  color: var(--color-night-ink);
}

.scenario-controls button[aria-pressed="true"] {
  background: var(--color-accent-bright);
  color: var(--color-night);
}

.scenario-output article + article {
  border-color: var(--color-night-rule);
}

.scenario-output h3 {
  color: var(--color-accent-bright);
}

.scenario-output p {
  color: var(--color-night-ink);
}

.scenario-section .text-action {
  color: var(--color-night);
  text-decoration-color: var(--color-cobalt-field);
}

.scenario-section .text-action:hover {
  color: var(--color-cobalt-field);
}

.audience-section {
  position: relative;
  width: 100%;
  margin: 0;
  padding-inline: max(var(--space-2xl), calc((100vw - var(--content-max)) / 2));
  background: color-mix(in oklch, var(--color-paper-deep) 84%, var(--color-cobalt-wash));
}

.audience-statement {
  position: relative;
  padding-left: var(--space-lg);
}

.audience-statement::before {
  content: "";
  position: absolute;
  top: 0.2em;
  bottom: 0.1em;
  left: 0;
  width: 4px;
  background: var(--color-accent);
}

.audience-list {
  counter-reset: audience;
}

.audience-list article {
  position: relative;
  counter-increment: audience;
  padding-left: calc(var(--space-2xl) + var(--space-sm));
}

.audience-list article::before {
  content: "0" counter(audience);
  position: absolute;
  top: var(--space-lg);
  left: 0;
  color: var(--color-accent);
  font-family: var(--font-latin);
  font-size: var(--text-xl);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.boundary-section {
  width: 100%;
  margin: 0;
  padding: var(--space-4xl) 0 0;
  border: 0;
  background: color-mix(in oklch, var(--color-paper-deep) 88%, var(--color-cobalt-wash));
}

.boundary-section > .section-heading {
  width: min(calc(100% - var(--space-2xl)), var(--content-max));
  margin: 0 auto var(--space-2xl);
}

.boundary-section > .section-heading h2 strong {
  display: block;
  color: var(--color-accent);
  font-weight: inherit;
}

.boundary-grid {
  margin-top: 0;
  border: 0;
}

.boundary-grid article {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-3xl) var(--space-3xl) var(--space-3xl) max(var(--space-2xl), calc((100vw - var(--content-max)) / 2));
  background: var(--color-cobalt-wash);
}

.boundary-grid article + article {
  padding: var(--space-3xl) max(var(--space-2xl), calc((100vw - var(--content-max)) / 2)) var(--space-3xl) var(--space-3xl);
  border: 0;
  background: color-mix(in oklch, var(--color-night) 82%, var(--color-cobalt-field));
}

.boundary-grid article:first-child h3 {
  color: var(--color-cobalt-field);
}

.boundary-grid article + article h3 {
  color: var(--color-accent-bright);
}

.boundary-grid article + article li {
  color: var(--color-night-ink-soft);
}

.boundary-grid article + article li::before {
  background: var(--color-accent-bright);
}

.boundary-grid ul {
  max-width: 44ch;
}

.finale-section {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: clip;
  padding: var(--space-4xl) max(var(--space-2xl), calc((100vw - 1120px) / 2));
  background: var(--color-cobalt-field);
  color: var(--color-on-cobalt);
}

.finale-section::before {
  content: "";
  position: absolute;
  top: 18%;
  right: 0;
  width: 34%;
  height: 2px;
  transform: scaleX(0.24);
  transform-origin: right;
  background: color-mix(in oklch, var(--color-on-cobalt) 74%, transparent);
  animation: finale-measure 5.6s var(--ease-in-out) infinite alternate;
}

.finale-section::after {
  content: "";
  position: absolute;
  top: calc(18% - 5px);
  right: 12%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--color-cobalt-field);
  border-radius: 50%;
  background: var(--color-on-cobalt);
}

@keyframes finale-measure {
  to { transform: scaleX(1); }
}

.finale-section h2,
.finale-section > p {
  position: relative;
  color: var(--color-on-cobalt);
}

.finale-section .button-primary {
  background: var(--color-night);
  color: var(--color-night-ink);
  box-shadow: 0 18px 40px color-mix(in oklch, var(--color-night) 34%, transparent);
}

.finale-section .button-primary:hover {
  background: var(--color-night-raised);
  color: var(--color-night-ink);
}

.finale-section .button-secondary {
  border-color: color-mix(in oklch, var(--color-on-cobalt) 66%, transparent);
  background: transparent;
  color: var(--color-on-cobalt);
}

.finale-section .button-secondary:hover {
  border-color: var(--color-on-cobalt);
  background: color-mix(in oklch, var(--color-on-cobalt) 10%, transparent);
}

.compliance-section,
.site-footer {
  border-color: var(--color-night-rule);
  background: color-mix(in oklch, var(--color-night) 90%, var(--color-cobalt-field));
  box-shadow: 0 0 0 100vmax color-mix(in oklch, var(--color-night) 90%, var(--color-cobalt-field));
  clip-path: inset(0 -100vmax);
}

.compliance-section h2,
.site-footer .footer-wordmark,
.site-icp {
  color: var(--color-night-ink);
}

.compliance-section nav a,
.site-footer > p,
.site-police-beian {
  color: var(--color-night-ink-soft);
}

.compliance-section nav a:hover {
  color: var(--color-accent-bright);
}

.site-footer-records {
  border-color: var(--color-night-rule);
}

.motion-paused .scenario-tool::before,
.motion-paused .finale-section::before {
  animation-play-state: paused;
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .header-action {
    display: inline-flex;
  }

  .journey-section {
    padding-inline: var(--space-xl);
  }

  .audience-section {
    width: 100%;
    padding-inline: var(--space-xl);
  }

  .journey-section::after,
  .scenario-section::before {
    left: var(--space-xl);
  }

  .boundary-grid article,
  .boundary-grid article + article {
    min-height: 440px;
    padding: var(--space-3xl) var(--space-xl);
  }

  .finale-section {
    padding-inline: var(--space-xl);
  }
}

@media (max-width: 680px) {
  .wordmark {
    font-size: 1.35rem;
  }

  .header-action {
    min-width: 104px;
    padding-inline: var(--space-xs);
  }

  .hero::before {
    inset: 48% 0 0;
    border-top: var(--rule-hair) solid color-mix(in oklch, var(--color-accent) 28%, transparent);
    border-left: 0;
    opacity: 0.62;
  }

  .hero::after {
    top: 54%;
    right: var(--space-md);
    height: 17%;
  }

  .journey-section {
    width: 100%;
    padding-inline: var(--space-md);
  }

  .audience-section {
    width: 100%;
    padding-inline: var(--space-md);
  }

  .journey-section::after,
  .scenario-section::before {
    left: var(--space-md);
  }

  .scenario-tool::before {
    top: 112px;
  }

  .audience-statement {
    padding-left: var(--space-md);
  }

  .audience-list article {
    padding-left: calc(var(--space-xl) + var(--space-sm));
  }

  .boundary-section > .section-heading {
    width: min(calc(100% - var(--space-lg)), var(--content-max));
  }

  .boundary-grid article,
  .boundary-grid article + article {
    min-height: 0;
    padding: var(--space-3xl) var(--space-md);
  }

  .finale-section {
    padding-inline: var(--space-md);
  }

  .finale-section::before {
    top: 12%;
    width: 46%;
  }

  .finale-section::after {
    top: calc(12% - 5px);
  }
}

@media (max-width: 414px) {
  .site-header {
    padding-inline: var(--space-sm);
  }

  .journey-section {
    padding-inline: var(--space-sm);
  }

  .audience-section {
    padding-inline: var(--space-sm);
  }

  .journey-section::after,
  .scenario-section::before {
    left: var(--space-sm);
  }
}

@media (prefers-color-scheme: dark) {
  .scenario-section .section-heading h2,
  .scenario-section .section-heading > p,
  .scenario-section .text-action {
    color: var(--color-night-ink);
  }

  .scenario-section .section-heading h2 strong,
  .scenario-section .text-action:hover,
  .boundary-grid article:first-child h3 {
    color: var(--color-accent-bright);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header,
  .journey-visual {
    background: var(--color-paper-raised);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html:not(.is-ready) .hero h1,
  html:not(.is-ready) .hero-copy > p,
  html:not(.is-ready) .hero-actions,
  html:not(.is-ready) .hero-boundary {
    opacity: 1;
    transform: none;
  }

  .journey-copy::after {
    transform: scaleY(1);
  }

  .scenario-tool::before,
  .finale-section::before {
    animation: none;
    transform: scaleX(1);
  }
}

@media print {
  .site-header,
  #heroCanvas,
  #journeyCanvas,
  .journey-controls,
  .scenario-controls {
    display: none !important;
  }

  .hero,
  .journey-section,
  .scenario-section,
  .audience-section,
  .boundary-section,
  .finale-section {
    min-height: 0;
    break-inside: avoid;
  }
}

/* Footer contract: description and links share the upper band; records own the bottom band. */
.site-footer {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: var(--space-2xl);
  row-gap: var(--space-lg);
}

.site-footer .footer-wordmark {
  grid-column: 1;
  grid-row: 1;
}

.site-footer > p {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  text-align: right;
}

.site-footer-records {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin: 0;
  padding: var(--space-md) 0 0;
  display: grid;
  grid-template-rows: auto minmax(1.5em, auto);
  justify-items: center;
  align-content: start;
  text-align: center;
}

.site-footer-records .site-icp,
.site-footer-records .site-police-beian {
  width: 100%;
  margin: 0;
  text-align: center;
}

@media (max-width: 900px) {
  .site-footer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }

  .site-footer .footer-wordmark {
    grid-column: 1;
    grid-row: 1;
  }

  .site-footer > p {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .site-footer-records {
    grid-row: 3;
  }
}

/* V3 keeps the ICP line in the exact same color as the surrounding footer framework text. */
.site-footer {
  color: var(--color-night-ink-soft);
}

.site-footer .site-footer-records .site-icp,
.site-footer .site-footer-records .site-police-beian {
  color: inherit;
}
