:root {
  --ink: #08232d;
  --paper: #ffffff;
  --canvas: #eef7fa;
  --line: #173039;
  --green: #aeea45;
  --green-action: #ffec41;
  --green-soft: #e7f9ec;
  --cyan: #44c7e5;
  --cyan-soft: #e9f8fb;
  --coral: #fb6377;
  --coral-soft: #ffe8ec;
  --teal: #ff6e8c;
  --cream: #fff7dc;
  --border: 2px;
  --radius: 20px;
  --fixed-footer-height: calc(76px + env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 15px;
  font-family: "LINE Seed JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  font-weight: 400;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

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

.site-shell {
  width: min(100%, 420px);
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(180deg, #f1f9fb 0%, #ffffff 49%, #f3fafc 100%);
  box-shadow: 0 0 0 1px rgba(8, 35, 45, 0.04);
}

.site-header {
  position: relative;
  z-index: 10;
  height: 84px;
  --header-inset: clamp(20px, 9vw, 38px);
  margin-top: 25px;
}

.header-candidate {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.18em;
}

.brand-plate {
  position: absolute;
  top: 35px;
  right: var(--header-inset);
  left: var(--header-inset);
  padding: 13px 12px 12px;
  border: var(--border) solid var(--line);
  background: #ceff6d;
  box-shadow: 4px 4px 0 rgb(8 35 45);
  text-align: center;
}

.brand-plate p {
  display: block;
  margin: 0;
  font-size: clamp(20px, 5.8vw, 25px);
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero {
  position: relative;
  width: calc(100% - 30px);
  height: 630px;
  margin: 0 auto;
  border: var(--border) solid var(--line);
  background: rgb(244 248 236);
}

.hero-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-route-path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hero-node-outer {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.hero-node-inner {
  fill: var(--paper);
}

.hero-node-halo {
  display: none;
}

.hero-route-orb-halo {
  opacity: 0.5;
}

.hero-route-orb-outer {
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.hero-route-orb-inner {
  stroke: none;
}

.hero-route-orb-outer,
.hero-route-orb-inner {
  vector-effect: non-scaling-stroke;
}

.hero-copy {
  position: absolute;
  z-index: 1;
  color: var(--ink);
}

.hero-copy p,
.hero-copy h1,
.hero-copy h2,
.hero-copy strong {
  margin: 0;
}

.hero-copy p {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.07em;
}

.hero-copy h1,
.hero-copy h2 {
  font-size: clamp(51px, 15vw, 62px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.hero-copy--send {
  top: 65px;
  left: 110px;
  animation: hero-copy-send 10s steps(1, end) infinite;
}

.hero-copy--send h1 {
  margin-top: 2px;
}

.hero-copy--check {
  top: 229px;
  left: 65px;
  animation: hero-copy-check 10s steps(1, end) infinite;
}

.hero-copy--check strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.hero-copy--check h2 {
  margin-top: 9px;
}

.hero-copy--show {
  top: 428px;
  left: 115px;
  animation: hero-copy-show 10s steps(1, end) infinite;
}

.hero-copy--show p {
  line-height: 1.6;
}

.hero-copy--show h2 {
  margin-top: 4px;
}

.hero-actions {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: -113px;
  left: 20px;
  display: grid;
  gap: 14px;
}

@keyframes hero-copy-send {
  0%, 37.99% {
    color: #568d00;
  }
  38%, 100% {
    color: var(--ink);
  }
}

@keyframes hero-copy-check {
  0%, 37.99%, 76%, 100% {
    color: var(--ink);
  }
  38%, 75.99% {
    color: #067f9e;
  }
}

@keyframes hero-copy-show {
  0%, 75.99% {
    color: var(--ink);
  }
  76%, 100% {
    color: #cc3f55;
  }
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 17px;
  border: var(--border) solid var(--line);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.button svg,
.text-link svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--dark {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 5px 0 #06171d;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.text-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 13px;
  margin: 0 auto;
  padding: 2px 1px 5px;
  border-bottom: 2px solid var(--line);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.text-link svg {
  width: 19px;
  height: 19px;
}

.section-pad {
  padding-right: 15px;
  padding-left: 15px;
}

.intro {
  padding-top: 122px;
  padding-bottom: 54px;
}

.problem-board {
  position: relative;
  padding: 46px 16px 30px;
  border: var(--border) solid var(--line);
  background: var(--green-soft);
  box-shadow: 4px 4px 0 rgba(8, 35, 45, 0.08);
}

.overlap-title {
  position: absolute;
  top: -78px;
  left: -3px;
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: 0.02em;
}

.overlap-title span {
  display: block;
  width: fit-content;
  padding: 5px 11px 3px;
  border: var(--border) solid var(--line);
  background: var(--paper);
}

.overlap-title span + span {
  margin-top: -2px;
}

.problem-board ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.problem-board li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: start;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
}

.speech-icon {
  width: 17px;
  height: 21px;
  margin-top: 1px;
  fill: var(--paper);
  stroke: var(--line);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.down-arrow {
  width: 20px;
  height: 20px;
  margin: 18px auto 38px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  animation: scroll-cue 1.55s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes scroll-cue {
  0% {
    opacity: 0.2;
    transform: translateY(-9px) rotate(45deg);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0.15;
    transform: translateY(11px) rotate(45deg);
  }
}

.intro-copy__headline {
  margin: 0;
  font-size: clamp(20px, 6vw, 27px);
  font-weight: 700;
  line-height: 1.48;
  letter-spacing: -0.02em;
  text-align: center;
}

.intro-copy__line {
  display: block;
  white-space: nowrap;
}

.intro-copy__mark {
  position: relative;
  z-index: 0;
  display: inline-block;
  padding: 0 0.03em;
  color: inherit;
  background: transparent;
  isolation: isolate;
}

.intro-copy__mark::after {
  position: absolute;
  z-index: -1;
  right: -0.05em;
  bottom: 0.1em;
  left: -0.05em;
  height: 0.5em;
  border-radius: 2px;
  background: var(--marker-color);
  content: "";
  opacity: 0.76;
  transform: skewX(-4deg) rotate(-1deg);
}

.intro-copy__mark--green {
  --marker-color: var(--green);
}

.intro-copy__mark--cyan {
  --marker-color: var(--cyan);
}

.intro-copy__mark--coral {
  --marker-color: var(--coral);
}

.intro-copy p {
  margin: 22px 0 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.95;
  letter-spacing: 0.015em;
  text-wrap: pretty;
}

.intro-copy p + p {
  margin-top: 10px;
}

.flow {
  padding-top: 28px;
  padding-bottom: 108px;
}

.flow-box {
  position: relative;
  padding: 45px 22px 32px;
  border: var(--border) solid var(--line);
  background: rgb(242 255 255);
  box-shadow: 4px 4px 0 rgba(8, 35, 45, 0.07);
}

.box-title {
  position: absolute;
  top: -25px;
  left: 50%;
  margin: 0;
  padding: 9px 24px 7px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  font-size: clamp(21px, 5.8vw, 25px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.flow-lead {
  max-width: 300px;
  margin: 0 auto 32px;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.flow-timeline {
  position: relative;
  isolation: isolate;
  --flow-line-start: 13px;
  --flow-line-total: 330px;
  --flow-line-height: 0px;
  --flow-orb-y: 13px;
  --flow-orb-color: var(--green);
}

.flow-timeline::before {
  position: absolute;
  z-index: 0;
  top: var(--flow-line-start);
  left: 12px;
  width: 2px;
  height: var(--flow-line-total);
  content: "";
  background: var(--line);
}

.flow-progress-line {
  position: absolute;
  z-index: 1;
  top: var(--flow-line-start);
  left: 12px;
  width: 2px;
  height: var(--flow-line-height);
  background: var(--line);
  transition: height 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flow-orb {
  position: absolute;
  z-index: 4;
  top: var(--flow-orb-y);
  left: 13px;
  width: 26px;
  height: 26px;
  border: var(--border) solid var(--line);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 6px var(--flow-orb-color);
  outline: 4px solid #fff;
  transform: translate(-50%, -50%);
  transition: top 420ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}

.flow-orb::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  content: "";
  background: var(--flow-orb-color);
  transform: translate(-50%, -50%);
}

.flow-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 26px 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  opacity: 0.44;
  filter: saturate(0.55);
  transition: opacity 320ms ease, filter 320ms ease;
}

.flow-node {
  position: relative;
  z-index: 2;
  width: 26px;
  height: 26px;
  margin-top: 14px;
  border: var(--border) solid var(--line);
  border-radius: 50%;
  background: #fff;
  outline: 4px solid #fff;
}

.flow-node::after {
  display: none;
}

.step-number {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: var(--border) solid var(--line);
  background: var(--tone);
  box-shadow: 3px 3px 0 rgba(8, 35, 45, 0.13);
  font-size: 27px;
  font-weight: 700;
}

.flow-step h3 {
  position: relative;
  margin: 1px 0 10px;
  padding: 10px 11px 9px;
  border: var(--border) solid var(--line);
  background: var(--tone);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.flow-step h3::before {
  position: absolute;
  top: 50%;
  left: -14px;
  width: 12px;
  height: 2px;
  content: "";
  background: var(--line);
}

.flow-step p {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  text-wrap: pretty;
}

.flow-timeline[data-stage="1"] .flow-step:nth-child(1),
.flow-timeline[data-stage="2"] .flow-step:nth-child(-n + 2),
.flow-timeline[data-stage="3"] .flow-step {
  opacity: 1;
  filter: saturate(1);
}

.flow-step--green {
  --tone: var(--green);
}

.flow-step--cyan {
  --tone: #8de2ee;
}

.flow-step--coral {
  --tone: #ff8996;
}

.voice-entry {
  padding-bottom: 88px;
}

.voice-entry-link {
  display: flex;
  width: fit-content;
  min-height: 70px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0 auto;
  padding: 6px 12px 2px;
  text-align: center;
}

.voice-entry-link span {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.voice-entry-link svg {
  width: 28px;
  height: 24px;
  fill: none;
  stroke: var(--line);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: next-section-cue 1.8s ease-in-out infinite;
}

.snap-deck {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior-y: auto;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.snap-deck.is-active {
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

.snap-deck::-webkit-scrollbar {
  display: none;
}

.content-section {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  flex: 0 0 100%;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding-top: max(calc(env(safe-area-inset-top) + 12px), clamp(30px, 4.5svh, 44px));
  padding-bottom: calc(var(--fixed-footer-height) + 14px);
  overflow: hidden;
  scroll-margin-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.content-section--voice {
  --card-min-height: 300px;
  background: var(--green);
}

.content-section--progress {
  --card-min-height: 360px;
  background: var(--cyan);
}

.content-section--result {
  --card-min-height: 360px;
  background: var(--coral);
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  display: inline-flex;
  margin: 0;
  padding: 8px 15px 7px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.015em;
}

.section-heading > span {
  display: none;
}

.section-heading p {
  margin: 22px 0 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.025em;
}

.section-heading--green {
  --tone: var(--green);
}

.section-heading--cyan {
  --tone: var(--cyan);
}

.section-heading--coral {
  --tone: var(--coral);
}

.content-card {
  position: relative;
  display: flex;
  min-height: var(--card-min-height);
  flex: 1;
  flex-direction: column;
  padding: 22px 20px 20px;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  width: 100%;
}

.content-card--green {
  box-shadow: 7px 7px 0 var(--line);
}

.content-card--cyan {
  box-shadow: 7px 7px 0 var(--line);
}

.content-card--coral {
  box-shadow: 7px 7px 0 var(--line);
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 4px;
  border: var(--border) solid var(--line);
  border-radius: 3px;
  background: var(--paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 2px 2px 0 rgba(8, 35, 45, 0.08);
}

.status-badge span {
  width: 5px;
  height: 17px;
  border-radius: 4px;
  background: var(--tone);
}

.status-badge--green {
  --tone: var(--green);
}

.status-badge--cyan {
  --tone: var(--cyan);
}

.status-badge--coral {
  --tone: var(--coral);
  border-color: #bc4054;
  background: var(--coral-soft);
  color: #bc4054;
}

.content-card > h3 {
  margin: 0 0 13px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.06em;
}

.card-rule {
  height: 2px;
  background: var(--line);
}

.speech-card {
  padding-bottom: 30px;
  border-radius: 24px;
}

.speech-card::before,
.speech-card::after {
  position: absolute;
  bottom: -19px;
  left: 43px;
  width: 33px;
  height: 34px;
  content: "";
  transform: rotate(55deg) skewX(20deg);
}

.speech-card::before {
  bottom: -25px;
  left: 46px;
  z-index: -1;
  background: var(--line);
}

.speech-card::after {
  border-right: var(--border) solid var(--line);
  border-bottom: var(--border) solid var(--line);
  background: var(--paper);
}

.voice-actions {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.support-button,
.related-voices-button {
  display: grid;
  width: 100%;
  min-height: 54px;
  align-items: center;
  border: var(--border) solid var(--line);
  border-radius: 42px;
  font-size: 15px;
  font-weight: 700;
}

.support-button {
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 7px 23px 7px 30px;
  background: var(--green-action);
  box-shadow: 0 5px 0 var(--ink);
  text-align: left;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.support-button > span {
  font-size: 17px;
  letter-spacing: 0.03em;
}

.support-button > strong {
  display: grid;
  min-width: 64px;
  height: 34px;
  place-items: center;
  border: var(--border) solid var(--line);
  border-radius: 0px;
  background: var(--paper);
  font-size: 17px;
  font-weight: 700;
}

.related-voices-button {
  grid-template-columns: 1fr auto;
  padding: 7px 21px 7px 25px;
  background: var(--paper);
  box-shadow: 0 4px 0 var(--line);
}

.related-voices-meta {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.related-voices-meta strong {
  font-size: 20px;
  font-weight: 700;
}

.related-voices-verb {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: var(--border) solid var(--line);
}

.related-voices-verb svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: var(--border) solid var(--line);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.action-button--green {
  margin-top: auto;
  background: var(--green-action);
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.carousel-block {
  width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  scrollbar-width: none;
}

.carousel-block::-webkit-scrollbar {
  display: none;
}

.carousel-viewport {
  width: calc(100% + 20px);
  margin-right: -20px;
  padding-right: 20px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-padding-left: 0;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}

.carousel-viewport::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 2px 26px 29px 0;
}

.carousel-slide {
  position: relative;
  display: flex;
  flex: 0 0 calc(min(100vw, 420px) - 42px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  isolation: isolate;
}

.carousel-slide .content-card {
  height: 100%;
  transition: opacity 220ms ease, transform 220ms ease;
}

.carousel-slide[data-active="false"] .content-card {
  opacity: 0.76;
  transform: scale(0.975);
  transform-origin: center left;
}

.carousel-slide[data-active="false"] .progress-node--current,
.carousel-slide[data-active="false"] .progress-node--current::after,
.carousel-slide[data-active="false"] .current-label {
  animation-play-state: paused;
}

.carousel-nav {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 20px;
  align-items: center;
  width: 210px;
  margin: 9px auto 0;
}

.carousel-nav button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: var(--border) solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 2px 2px 0 rgba(8, 35, 45, 0.09);
  font-size: 22px;
  font-weight: 700;
  transition: background-color 150ms ease, transform 150ms ease;
}

.carousel-nav strong {
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
}

.next-section-link {
  --tone: var(--green);
  display: flex;
  width: fit-content;
  max-width: 100%;
  min-height: 72px;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  z-index: 4;
  margin: auto auto 2px;
  padding: 6px 12px 2px;
  text-align: center;
}

.next-section-link span {
  color: #61757b;
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}

.next-section-link strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}

.next-section-link svg {
  width: 28px;
  height: 24px;
  fill: none;
  stroke: var(--line);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: next-section-cue 1.8s ease-in-out infinite;
}

@keyframes next-section-cue {
  0%,
  12%,
  26%,
  40%,
  100% {
    opacity: 0.72;
    transform: translateY(0);
  }

  19%,
  33% {
    opacity: 1;
    transform: translateY(5px);
  }
}

.next-section-link--green {
  --tone: var(--green);
}

.next-section-link--cyan {
  --tone: var(--cyan);
}

.next-section-link--coral {
  --tone: var(--coral);
}

.progress-card > h3,
.result-card > h3 {
  margin-top: 0;
  margin-bottom: 13px;
  font-size: 23px;
  line-height: 1.35;
}

.progress-label {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 700;
  color: #5f747b;
  display: none;
}

.progress-map {
  position: relative;
  height: 133px;
  margin: 26px 2px 8px;
}

.progress-line {
  position: absolute;
  top: 56px;
  height: 3px;
}

.progress-line--done {
  left: 0;
  background: var(--teal);
}

.progress-line--next {
  right: 0;
  background-image: repeating-linear-gradient(90deg, #8da0a6 0 6px, transparent 6px 11px);
}

.progress-node {
  position: absolute;
  top: 43px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: var(--border) solid var(--line);
  border-radius: 50%;
  transform: translateX(-50%);
}

.progress-node svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-node--done {
  border-color: var(--teal);
  background: var(--teal);
}

.progress-node--current {
  width: 40px;
  height: 40px;
  top: 37px;
  border-width: 4px;
  border-color: #a52f48;
  background: var(--coral);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--line);
  animation: current-node-glow 2.2s ease-in-out infinite;
}

.progress-node--current::after {
  position: absolute;
  inset: -10px;
  content: "";
  border: 2px solid var(--coral);
  border-radius: 50%;
  animation: current-node-ring 2.2s ease-out infinite;
}

.progress-node--current span {
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
}

.progress-node--future {
  border-color: var(--line);
  background: var(--paper);
}

.progress-node--first {
  transform: none;
}

.progress-node--last {
  transform: translateX(-100%);
}

.current-label {
  position: absolute;
  top: -10px;
  left: 66.66%;
  min-width: 82px;
  padding: 6px 9px;
  border: var(--border) solid var(--line);
  border-radius: 3px;
  background: var(--coral-soft);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 2px 2px 0 rgba(8, 35, 45, 0.1), 0 0 0 rgba(251, 99, 119, 0);
  animation: current-label-glow 2.2s ease-in-out infinite;
  z-index: 100;
}

.current-label::after {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 9px;
  height: 9px;
  content: "";
  border-right: var(--border) solid var(--line);
  border-bottom: var(--border) solid var(--line);
  background: var(--coral-soft);
  transform: translateX(-50%) rotate(45deg);
}

.progress-steps {
  position: absolute;
  top: 92px;
  right: -10px;
  left: -10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.progress-steps span {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

@keyframes current-node-glow {
  0%, 100% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--line), 0 0 0 rgba(251, 99, 119, 0); }
  50% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--line), 0 0 22px 9px rgba(251, 99, 119, 0.58); }
}

@keyframes current-node-ring {
  0% { opacity: 0.75; transform: scale(0.72); }
  75%, 100% { opacity: 0; transform: scale(1.35); }
}

@keyframes current-label-glow {
  0%, 100% { box-shadow: 2px 2px 0 rgba(8, 35, 45, 0.1), 0 0 0 rgba(251, 99, 119, 0); }
  50% { box-shadow: 2px 2px 0 rgba(8, 35, 45, 0.1), 0 0 16px 5px rgba(251, 99, 119, 0.38); }
}

.progress-note {
  margin-top: 2px;
  padding: 12px 14px 13px;
  background: var(--cyan-soft);
}

.progress-note p {
  margin: 0 0 8px;
  color: #178ba3;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.progress-note strong {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.result-summary {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 16px;
  padding: 18px 17px 17px;
  border: var(--border) solid var(--line);
  border-radius: 13px;
  background: #fff1f3;
  box-shadow: 3px 3px 0 rgba(8, 35, 45, 0.08);
}

.result-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--coral);
  font-size: 15px;
  font-weight: 700;
}

.result-kicker span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
}

.result-kicker svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-summary h4 {
  margin: 14px 0 9px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.result-summary > p:last-of-type {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
}

.action-button--teal {
  gap: 13px;
  margin-top: auto;
  border-radius: 28px;
  background: var(--teal);
  color: white;
  box-shadow: 0 5px 0 var(--ink);
  font-size: 15px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.action-button--teal svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fixed-footer {
  position: fixed;
  z-index: 1000;
  right: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 420px);
  height: var(--fixed-footer-height);
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  border-top: var(--border) solid var(--line);
  background: var(--paper);
  box-shadow: 0 -5px 0 rgba(8, 35, 45, 0.12);
  transform: translateX(-50%);
}

.fixed-footer-button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: var(--border) solid var(--line);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.fixed-footer-button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fixed-footer-button--send {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 4px 0 #06171d;
}

.fixed-footer-button--voices {
  background: var(--green);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--line);
}

@media (hover: hover) {
  .button--dark:hover,
  .support-button:hover,
  .action-button--teal:hover {
    box-shadow: 0 3px 0 var(--ink);
    transform: translateY(2px);
  }

  .carousel-nav button:hover {
    background: var(--cyan-soft);
    transform: translateY(-1px);
  }

  .voice-entry-link:hover span,
  .next-section-link:hover strong {
    text-decoration-thickness: 2px;
  }

  .voice-entry-link:hover svg,
  .next-section-link:hover svg {
    animation-duration: 1.25s;
  }
}

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

  .snap-deck {
    scroll-behavior: auto;
  }

  .hero-route-orb,
  .hero-node-halo,
  .flow-orb,
  .progress-node--current::after {
    display: none;
  }

  .progress-node--current,
  .current-label {
    animation: none;
  }

  .flow-progress-line,
  .flow-orb,
  .flow-step,
  .carousel-slide .content-card {
    transition: none;
  }

  .down-arrow {
    animation: none;
    transform: rotate(45deg);
  }

  .voice-entry-link svg,
  .next-section-link svg {
    animation: none;
  }

  .hero-copy--send,
  .hero-copy--check,
  .hero-copy--show {
    animation: none;
  }

  .carousel-viewport {
    scroll-behavior: auto;
  }
}

@media (max-width: 370px) {
  .section-pad {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero {
    width: calc(100% - 36px);
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(45px, 15vw, 52px);
  }

  .hero-copy--send {
    left: 90px;
  }

  .hero-copy--check {
    left: 52px;
  }

  .hero-copy--show {
    left: 72px;
  }

  .fixed-footer {
    gap: 4px;
    padding-right: 6px;
    padding-left: 6px;
  }

  .fixed-footer-button {
    gap: 4px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .fixed-footer-button svg {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
  }

  .flow-box {
    padding-right: 20px;
    padding-left: 20px;
  }

  .content-card {
    padding-right: 18px;
    padding-left: 18px;
  }

  .carousel-viewport {
    width: calc(100% + 16px);
    margin-right: -16px;
    padding-right: 16px;
  }

  .progress-steps {
    right: -14px;
    left: -14px;
  }
}

/* Phase 1: database-backed cards, forms and bottom sheets. */
.speech-card .status-badge {
  margin-bottom: 15px;
}

.case-card .status-badge {
  margin-bottom: 15px;
}

.theme-summary {
  margin: -2px 0 14px;
  color: #36515a;
  line-height: 1.8;
}

.voice-content {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.voice-card__location {
  margin: 0 0 16px !important;
  font-size: 14px;
}

.related-voices-empty {
  margin: 0;
  padding: 14px 18px;
  border: var(--border) solid var(--line);
  border-radius: 42px;
  background: rgb(255 255 255 / 66%);
  color: #48616a;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.case-summary {
  margin: -2px 0 14px;
  color: #36515a;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.case-linked-voices {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #71858b;
  border-radius: 11px;
  background: rgb(255 255 255 / 78%);
}

.case-linked-voices h4,
.case-linked-voices p {
  margin: 0;
}

.case-linked-voices h4 {
  font-size: 14px;
}

.case-linked-voices ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.case-linked-voices li + li {
  padding-top: 8px;
  border-top: 1px solid #aebbc0;
}

.case-linked-voices a {
  display: -webkit-box;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.support-form {
  display: grid;
  gap: 8px;
}

.support-message {
  min-height: 1.5em;
  padding: 0 8px;
  color: #36515a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.support-button:disabled {
  cursor: default;
  opacity: 0.78;
  box-shadow: 0 2px 0 var(--ink);
  transform: translateY(3px);
}

.support-button[data-supported="true"] {
  background: var(--green-soft);
}

.support-button[data-support-closed="true"] {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-right: 18px;
  padding-left: 20px;
  background: #e7ecea;
}

.support-button[data-support-closed="true"] > span {
  font-size: 15px;
  line-height: 1.25;
}

.related-voices-button {
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  padding: 30px;
  border: var(--border) dashed var(--line);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 72%);
  text-align: center;
}

.empty-state p {
  margin: 0;
  font-weight: 700;
  line-height: 1.8;
}

.content-card.is-highlighted {
  animation: theme-highlight 1.8s ease both;
}

@keyframes theme-highlight {
  0%, 100% {
    background: var(--paper);
    box-shadow: 7px 7px 0 var(--line);
  }
  25%, 70% {
    background: #fbffd9;
    box-shadow: 0 0 0 6px var(--green), 7px 7px 0 var(--line);
  }
}

.site-meta-footer {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 24px 20px calc(var(--fixed-footer-height) + 28px);
  background: var(--paper);
}

.site-meta-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
}

.site-meta-footer a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.global-feedback {
  position: fixed;
  z-index: 950;
  right: 14px;
  bottom: calc(var(--fixed-footer-height) + 12px);
  left: 14px;
  width: fit-content;
  max-width: min(calc(100% - 28px), 390px);
  margin: auto;
  padding: 10px 15px;
  border: var(--border) solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
  font-weight: 700;
  text-align: center;
}

body.sheet-open {
  position: fixed;
  top: var(--sheet-scroll-y);
  right: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.bottom-sheet {
  position: fixed;
  z-index: 2000;
  inset: auto auto 0 50%;
  display: none;
  width: min(100%, 420px);
  max-width: none;
  height: min(94dvh, 940px);
  max-height: 94dvh;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
  opacity: 0;
  transform: translate(-50%, 102%);
  transition: transform 220ms cubic-bezier(0.22, 0.9, 0.35, 1), opacity 180ms ease;
}

.bottom-sheet[open] {
  display: block;
}

.bottom-sheet.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bottom-sheet.is-closing {
  opacity: 0;
  transform: translate(-50%, 102%);
}

.bottom-sheet::backdrop {
  background: rgb(8 35 45 / 46%);
  backdrop-filter: blur(1px);
}

.bottom-sheet__surface {
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: var(--border) solid var(--line);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -8px 30px rgb(8 35 45 / 24%);
}

.bottom-sheet__header {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 16px 14px 20px;
  border-bottom: var(--border) solid var(--line);
  background: var(--paper);
}

.bottom-sheet__header h2 {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.35;
}

.bottom-sheet__eyebrow {
  margin: 0;
  color: #48616a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.bottom-sheet__close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0 0 3px;
  border: var(--border) solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--line);
  font-size: 29px;
  line-height: 1;
}

.bottom-sheet__body {
  min-height: 0;
  flex: 1 1 auto;
  padding: 20px 20px calc(30px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.related-voices {
  display: grid;
  align-content: start;
}

.related-voice-group {
  scroll-margin-top: 8px;
  outline: none;
}

.related-voice-group:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.related-voice-group__lead,
.related-voice-group__empty,
.related-voice-group__note {
  margin: 0;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.related-voice-group__lead {
  margin-bottom: 15px;
  font-weight: 700;
}

.related-voice-group__empty {
  padding: 18px;
  border: var(--border) dashed var(--line);
  border-radius: 12px;
  background: var(--green-soft);
}

.related-voice-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related-voice-list li {
  padding: 15px;
  border: var(--border) solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 3px 3px 0 var(--line);
}

.related-voice-list p {
  margin: 0;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.related-voice-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid #91a0a5;
  font-size: 13px;
  font-weight: 700;
}

.related-voice-list__meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-location {
  margin-top: 8px !important;
  color: #36515a;
  font-size: 13px;
}

.public-location span {
  margin-right: 8px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-weight: 700;
}

.related-voice-group__note {
  margin-top: 18px;
  color: #48616a;
  font-size: 13px;
}

/* Submission form: shared by the bottom sheet and the no-JavaScript page. */
.submission-form {
  display: grid;
  gap: 20px;
}

.form-notice {
  padding: 13px 14px;
  border-left: 5px solid var(--cyan);
  background: var(--cyan-soft);
  line-height: 1.75;
}

.form-notice--important {
  border-color: var(--coral);
  background: var(--coral-soft);
}

.form-notice p {
  margin: 0;
}

.form-notice p + p {
  margin-top: 10px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field label,
.form-check label {
  font-weight: 700;
  line-height: 1.65;
}

.form-field label span {
  margin-left: 7px;
  color: #a92f43;
  font-size: 12px;
}

.form-field textarea,
.form-field input {
  width: 100%;
  padding: 12px 13px;
  border: var(--border) solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  line-height: 1.7;
}

.form-field textarea {
  min-height: 180px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.form-field [aria-invalid="true"] {
  border-color: #b52e45;
  background: #fff6f7;
}

.form-field-meta {
  display: flex;
  justify-content: space-between;
  color: #48616a;
  font-size: 12px;
}

.form-check {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px 10px;
  align-items: start;
}

.form-check input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.form-check p,
.form-check .form-field-error {
  grid-column: 2;
  margin: 0;
  color: #48616a;
  font-size: 13px;
  line-height: 1.65;
}

.form-check a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-errors,
.form-error-summary {
  padding: 12px 14px;
  border: 2px solid #b52e45;
  border-radius: 6px;
  background: #fff0f2;
  color: #8d1c2f;
}

.form-errors p,
.form-errors ul,
.form-error-summary p {
  margin: 0;
}

.form-errors ul {
  margin-top: 7px;
  padding-left: 1.4em;
}

.form-field-error,
.field-error {
  margin: 0;
  color: #a32238;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.submission-honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

.submission-submit {
  min-height: 56px;
  padding: 10px 20px;
  border: var(--border) solid var(--line);
  border-radius: 30px;
  background: var(--green-action);
  box-shadow: 0 5px 0 var(--ink);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
}

.submission-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.submission-form-status {
  min-height: 1.5em;
  margin: 0;
}

.submission-complete {
  padding: 20px;
  border: var(--border) solid var(--line);
  border-radius: 16px;
  background: var(--green-soft);
  box-shadow: 5px 5px 0 var(--line);
}

.submission-complete h1,
.submission-complete h2,
.submission-complete h3 {
  margin: 0 0 14px;
  font-size: 24px;
}

.submission-complete p {
  margin: 0;
  line-height: 1.85;
}

.submission-complete p + p {
  margin-top: 10px;
}

.submission-complete .action-button,
.submission-complete a {
  margin-top: 20px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.submission-page,
.legal-page {
  min-height: 100vh;
  padding: 20px 14px 50px;
  background: var(--canvas);
}

.submission-page__main,
.legal-shell {
  width: min(100%, 620px);
  margin: 0 auto;
}

.submission-page__back,
.legal-back {
  display: inline-flex;
  margin-bottom: 18px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.submission-page__header,
.legal-card {
  padding: 24px 20px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--line);
}

.submission-page__header {
  margin-bottom: 20px;
  background: var(--green-soft);
}

.submission-page__header p,
.submission-page__header h1 {
  margin: 0;
}

.submission-page__header h1 {
  margin-top: 5px;
  font-size: 28px;
}

.submission-page__main > .submission-form,
.submission-page__main > .submission-complete,
.submission-page__main > .submission-closed {
  padding: 22px 20px;
  border: var(--border) solid var(--line);
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--line);
}

.legal-card h1 {
  margin: 0 0 20px;
  font-size: clamp(28px, 8vw, 38px);
  line-height: 1.35;
}

.legal-card section {
  margin-top: 30px;
}

.legal-card h2 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 3px solid var(--green);
  font-size: 20px;
}

.legal-card h3 {
  margin: 20px 0 8px;
}

.legal-card p,
.legal-card dd {
  line-height: 1.9;
}

.legal-kicker {
  margin: 0 0 5px;
  color: #48616a;
  font-weight: 700;
}

.legal-notice {
  padding: 11px 13px;
  border-left: 5px solid var(--coral);
  background: var(--coral-soft);
}

.operator-list {
  display: grid;
  gap: 22px;
  margin: 0;
}

.operator-list div {
  padding-bottom: 18px;
  border-bottom: 1px solid #a8b8bd;
}

.operator-list dt {
  margin-bottom: 6px;
  font-weight: 700;
}

.operator-list dd {
  margin: 0;
}

/* Phase 2: published investigation history and result-report snapshots. */
.progress-card .progress-steps span {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.investigation-history,
.result-details {
  margin-top: 14px;
  border: var(--border) solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.investigation-history > summary,
.result-details > summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.investigation-history > summary {
  padding: 12px 14px;
}

.investigation-history > ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 14px 14px 34px;
}

.investigation-history li {
  padding-top: 12px;
  border-top: 1px solid #a8b8bd;
}

.investigation-history li p {
  margin: 7px 0 0;
  font-size: 15px;
  line-height: 1.75;
}

.investigation-history__meta {
  color: #176f83;
  font-weight: 700;
}

.investigation-history a,
.result-reference-links a {
  color: #075f75;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-reported-on {
  color: #5f747b;
  font-size: 15px;
  font-weight: 700;
}

.result-details {
  border: 0;
  background: transparent;
}

.result-details > summary {
  list-style: none;
}

.result-details > summary::-webkit-details-marker {
  display: none;
}

.result-details[open] > summary {
  margin-bottom: 12px;
  box-shadow: 0 2px 0 var(--ink);
  transform: translateY(3px);
}

.result-details__body,
.result-reference-links {
  padding: 14px;
  border: 2px solid #ca737f;
  background: var(--paper);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.result-reference-links {
  margin-top: 10px;
}

.result-reference-links h5 {
  margin: 0 0 8px;
  font-size: 16px;
}

.result-reference-links ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 20px;
}

/* Phase 2 R2: public theme detail pages. */
.theme-detail-page {
  min-height: 100vh;
  padding: clamp(14px, 4vw, 32px) 12px 48px;
  background: var(--canvas);
}

.theme-detail-page--green { --detail-tone: var(--green); --detail-soft: var(--green-soft); }
.theme-detail-page--cyan { --detail-tone: var(--cyan); --detail-soft: var(--cyan-soft); }
.theme-detail-page--coral { --detail-tone: var(--coral); --detail-soft: var(--coral-soft); }

.theme-detail-shell {
  width: min(100%, 760px);
  margin: 0 auto;
}

.theme-detail-back {
  display: inline-flex;
  margin-bottom: 18px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.theme-detail-card {
  padding: clamp(18px, 5vw, 38px);
  border: var(--border) solid var(--line);
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--line);
}

.theme-detail-header {
  padding-bottom: 28px;
  border-bottom: 5px solid var(--detail-tone);
}

.theme-detail-header .status-badge { margin-bottom: 18px; }
.theme-detail-header h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.35;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.theme-detail-summary {
  margin: 16px 0 0;
  color: #36515a;
  font-size: 16px;
  line-height: 1.85;
}

.theme-detail-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 0;
}

.theme-detail-stats div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #9aabb0;
  background: var(--detail-soft);
}

.theme-detail-stats dt { color: #48616a; font-size: 13px; font-weight: 700; }
.theme-detail-stats dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }

.theme-detail-section { margin-top: 34px; }
.theme-detail-section > h2 {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--detail-tone);
  font-size: clamp(20px, 5vw, 25px);
}

.theme-detail-section > p { line-height: 1.85; }
.theme-detail-help { color: #48616a; font-size: 14px; }
.theme-detail-empty { padding: 18px; border: 1px dashed #71858b; background: #f7fafb; }

.theme-detail-voices,
.theme-detail-history {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theme-detail-voices li,
.theme-detail-history li {
  min-width: 0;
  padding: 17px;
  border: 1px solid #91a0a5;
  border-radius: 10px;
  background: #fff;
}

.theme-detail-voices p,
.theme-detail-history p { margin: 0; line-height: 1.8; overflow-wrap: anywhere; }
.theme-detail-voices .case-detail-voice-link { margin-top: 12px; text-align: right; }
.case-detail-voice-link a { color: #075f75; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.theme-detail-history p + p { margin-top: 8px; }
.theme-detail-history a,
.theme-detail-result a { color: #075f75; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }

.theme-detail-result {
  padding: clamp(16px, 4vw, 24px);
  border: 2px solid #ca737f;
  background: var(--coral-soft);
}

.theme-detail-result > h2 { border-bottom-color: var(--coral); }
.theme-detail-result h3 { margin: 12px 0 8px; font-size: 22px; line-height: 1.5; }
.theme-detail-result__summary { font-weight: 700; }
.theme-detail-result__body { margin-top: 16px; padding: 16px; border: 1px solid #ca737f; background: #fff; line-height: 1.9; overflow-wrap: anywhere; }
.theme-detail-result .result-reference-links { border-width: 1px; }
.theme-detail-result .result-reference-links h4 { margin: 0 0 8px; }

.theme-detail-support .support-form { max-width: 500px; }
.theme-detail-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  padding: 28px 12px 0;
}
.theme-detail-footer a { text-decoration: underline; text-underline-offset: 4px; }

.theme-detail-link,
.case-detail-link {
  border-radius: 28px;
  background: var(--cyan-soft);
  box-shadow: 0 4px 0 var(--line);
}

@media (max-width: 370px) {
  .theme-detail-stats { grid-template-columns: 1fr; }
  .theme-detail-card { padding: 16px 14px; box-shadow: 5px 5px 0 var(--line); }
  .theme-detail-result { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-sheet,
  .content-card.is-highlighted {
    transition: none;
    animation: none;
  }

  .content-card.is-highlighted {
    background: #fbffd9;
    outline: 5px solid var(--green);
  }
}

/* On phones, keep the three public sections in the document flow.
   This avoids nested vertical scrolling and lets long cards expand safely. */
@media (max-width: 640px), (pointer: coarse) {
  .snap-deck,
  .snap-deck.is-active {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .content-section {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    max-height: none;
    align-content: start;
    grid-template-rows: auto auto auto;
    overflow: visible;
    scroll-snap-align: none;
  }

  .carousel-block {
    overflow: visible;
  }

  .carousel-viewport {
    width: 100%;
    margin-right: 0;
    padding: 2px 9px 34px 2px;
  }

  .carousel-track {
    align-items: flex-start;
    padding: 0;
  }

  .carousel-slide {
    min-width: 0;
    max-width: 100%;
    flex-basis: 100%;
  }

  .carousel-slide .content-card {
    min-width: 0;
    height: auto;
  }

  .next-section-link {
    margin: clamp(32px, 8svh, 64px) auto 0;
  }
}
