:root {
  color-scheme: light dark;
  --page: #f2f3f5;
  --surface: #f8f9fa;
  --surface-strong: #fefefe;
  --surface-tint: #edf2ef;
  --ink: #202824;
  --muted: #53615b;
  --faint: #626d68;
  --line: #d9dfdc;
  --brand: #123c32;
  --brand-strong: #0b2d25;
  --brand-soft: #dcebe3;
  --accent: #28735b;
  --chrome: rgba(248, 250, 249, 0.91);
  --focus: #28735b;
  --danger: #a13d35;
  --shadow: 0 24px 70px rgba(18, 60, 50, 0.14);
  --radius-panel: 22px;
  --radius-control: 12px;
  --header-height: 72px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--page);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--page);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.site-shell {
  min-height: 100dvh;
  padding-bottom: 112px;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark,
.assistant-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--brand);
  color: #f6fbf8;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 17px;
  letter-spacing: 0.06em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.text-button,
.dialog-close,
.back-button,
.save-exit-button,
.skip-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.text-button {
  padding: 10px 0;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero {
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100dvh - var(--header-height) - 24px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(380px, 1.16fr);
  align-items: center;
  gap: clamp(36px, 7vw, 96px);
  padding: 28px 0 52px;
}

.hero-copy {
  position: relative;
  padding-left: clamp(0px, 3vw, 36px);
}

.hero-copy::before {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.065em;
}

.hero-summary {
  max-width: 19em;
  margin: 26px 0 30px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.75;
}

.primary-button,
.secondary-button {
  min-height: 50px;
  border-radius: 999px;
  padding: 0 24px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.primary-button {
  background: var(--brand);
  color: #f7fbf9;
  box-shadow: 0 12px 28px rgba(18, 60, 50, 0.22);
}

.primary-button:hover {
  background: var(--brand-strong);
}

.primary-button:active,
.secondary-button:active,
.choice-row button:active,
.upload-zone:active {
  transform: scale(0.98);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.secondary-button {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--ink);
}

.hero-button {
  min-width: 190px;
}

.hero-visual {
  position: relative;
  margin: 0;
  min-height: min(72dvh, 760px);
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--surface-tint);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: min(72dvh, 760px);
  object-fit: cover;
}

.hero-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 13px 16px;
  border-radius: var(--radius-control);
  background: rgba(11, 45, 37, 0.88);
  color: #f6fbf8;
  font-size: 13px;
  line-height: 1.55;
  backdrop-filter: blur(10px);
}

.service-note,
.information-guide,
.boundary-note {
  width: min(1080px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.service-note {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(48px, 8vw, 112px);
  align-items: start;
  padding: 104px 0;
}

.service-note h2,
.information-guide h2 {
  margin: 0;
  max-width: 13em;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.045em;
}

.service-note > div > p,
.guide-copy p {
  max-width: 38em;
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.service-flow {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}

.service-flow li {
  counter-increment: flow;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.service-flow li::before {
  content: counter(flow, decimal-leading-zero);
  grid-row: span 2;
  color: var(--accent);
  font-weight: 900;
}

.service-flow strong,
.service-flow span {
  display: block;
}

.service-flow strong {
  font-size: 18px;
}

.service-flow span {
  color: var(--muted);
  font-size: 14px;
}

.information-guide {
  padding: 92px clamp(26px, 5vw, 72px);
  border-radius: var(--radius-panel);
  background: var(--brand);
  color: #f1f7f4;
}

.guide-copy p {
  color: #c5d8d0;
}

.guide-layout {
  display: grid;
  grid-template-columns: 0.92fr 1.16fr 0.92fr;
  gap: 1px;
  margin-top: 56px;
  background: rgba(255, 255, 255, 0.18);
}

.guide-item {
  min-height: 230px;
  padding: 30px;
  background: var(--brand);
}

.guide-item-featured {
  background: #1e5547;
}

.guide-item span {
  color: #f4c77f;
  font-weight: 800;
}

.guide-item p {
  margin: 68px 0 0;
  color: #d6e4de;
  line-height: 1.75;
}

.boundary-note {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

.boundary-note strong {
  color: var(--brand);
}

.boundary-note p {
  max-width: 48em;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.sticky-action {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 20px;
  left: 24px;
  width: min(680px, calc(100% - 48px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px 12px 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(11, 45, 37, 0.94);
  box-shadow: 0 18px 60px rgba(10, 35, 29, 0.28);
  color: #f4f8f6;
  backdrop-filter: blur(16px);
}

.quick-consent {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
}

.quick-consent input,
.consent-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.sticky-action .primary-button {
  min-height: 46px;
  background: #f7faf8;
  color: var(--brand-strong);
  box-shadow: none;
}

.consent-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(760px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-panel);
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.consent-dialog::backdrop {
  background: rgba(8, 22, 18, 0.66);
  backdrop-filter: blur(5px);
}

.consent-panel {
  padding: clamp(24px, 5vw, 38px);
}

.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-head p,
.step-heading > p,
.success-content > p {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.dialog-head h2,
.step-heading h2,
.success-content h2 {
  margin: 0;
  font-size: clamp(25px, 5vw, 34px);
  line-height: 1.26;
  letter-spacing: -0.035em;
}

.dialog-close {
  padding: 8px;
  color: var(--muted);
}

.consent-copy {
  margin: 26px 0;
  padding: 18px;
  border-radius: var(--radius-control);
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.consent-copy p {
  margin: 0;
}

.consent-copy p + p {
  margin-top: 12px;
}

.consent-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  margin-top: 14px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
}

.consent-panel > .primary-button,
.consent-panel > .secondary-button {
  width: 100%;
  margin-top: 18px;
}

.consent-panel > .secondary-button {
  margin-top: 10px;
}

.form-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.wizard {
  position: fixed;
  z-index: 30;
  inset: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--page);
}

.wizard-header {
  min-height: calc(76px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 16px;
  padding: 0 max(18px, env(safe-area-inset-left));
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line);
  background: var(--chrome);
  /* Web approximation of macOS chrome, not an Apple native material. */
  backdrop-filter: blur(16px);
}

.back-button,
.save-exit-button {
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
}

.back-button {
  text-align: left;
}

.save-exit-button {
  text-align: right;
}

.wizard-progress {
  text-align: center;
}

.wizard-progress > span {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  width: min(160px, 100%);
  height: 3px;
  margin: 7px auto 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.wizard-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 32px max(24px, calc((100% - 720px) / 2)) 36px;
}

.assistant-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 24px;
}

.assistant-line p {
  width: fit-content;
  max-width: 580px;
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-step {
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface-strong);
  box-shadow: 0 2px 4px rgba(30, 50, 42, 0.025), 0 12px 32px rgba(30, 50, 42, 0.045);
}

.step-heading {
  margin-bottom: 28px;
}

.step-heading h2 {
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.step-heading h2:focus { outline: none; }

.wizard-progress small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.step-heading > span {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.65;
}

.field-block {
  display: grid;
  gap: 14px;
  margin: 24px 0 0;
  min-width: 0;
}

.field-block label,
.field-block legend {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

/* legend is outside fieldset's grid formatting context: reserve its own gap. */
.field-block legend { padding: 0 0 14px; }

.field-block label b {
  color: var(--danger);
  font-size: 12px;
}

.field-block input,
.field-block textarea,
.field-block select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field-block input {
  height: 50px;
  padding: 0 14px;
}

.field-block textarea {
  min-height: 92px;
  padding: 13px 14px;
  resize: vertical;
  line-height: 1.65;
}

.field-block input::placeholder,
.field-block textarea::placeholder {
  color: var(--faint);
}

.field-block input:focus,
.field-block textarea:focus,
.field-block select:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(18, 60, 50, 0.1);
  outline: none;
}

.field-block small {
  color: var(--faint);
  line-height: 1.55;
}

.choice-field {
  padding: 0;
  border: 0;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-row button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.choice-row button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 800;
}

.choice-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-card-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card-grid.four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-card-grid button {
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease,
    transform 150ms ease;
}

.choice-card-grid button:active {
  transform: translateY(1px);
}

.choice-card-grid button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.body-choice-stack {
  display: grid;
  gap: 18px;
}

.metric-field {
  gap: 12px;
}

.metric-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.metric-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  text-align: center;
}

.metric-picker > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.metric-control select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-strong);
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 700;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
}

.metric-control b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.chinese-observation-stack .compact-choice {
  position: relative;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.chinese-observation-stack .choice-card-grid button {
  background: var(--surface-strong);
}

.compact-choice {
  border: 0;
  padding: 0;
}

.compact-choice legend {
  float: left;
  width: 100%;
  margin: 0;
  padding: 0 0 16px;
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
}

.compact-choice::after {
  display: block;
  clear: both;
  content: "";
}

.optional-text label {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.optional-text label small {
  color: var(--faint);
  font-weight: 500;
}

.number-grid,
.status-grid {
  display: grid;
  gap: 12px;
}

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

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

.photo-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.photo-guide div {
  min-height: 112px;
  padding: 18px;
  border-radius: var(--radius-control);
  background: var(--surface-tint);
}

.photo-guide strong,
.photo-guide span {
  display: block;
}

.photo-guide span {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.upload-zone {
  min-height: 150px;
  margin-top: 18px;
  display: grid;
  place-content: center;
  gap: 8px;
  border: 1px dashed var(--brand);
  border-radius: var(--radius-control);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease;
}

.upload-zone:hover {
  background: var(--brand-soft);
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-zone strong {
  color: var(--brand);
}

.upload-zone span {
  color: var(--faint);
  font-size: 13px;
}

.upload-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.upload-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--radius-control);
  background: var(--surface-tint);
}

.upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-item button {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 48px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(11, 45, 37, 0.9);
  color: #f7fbf9;
  font-size: 12px;
  cursor: pointer;
}

.upload-item span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(11, 45, 37, 0.88);
  color: #f7fbf9;
  font-size: 11px;
  text-align: center;
}

.review-box {
  margin: 24px 0;
  padding: 18px;
  border-radius: var(--radius-control);
  background: var(--surface-tint);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.review-box strong {
  color: var(--ink);
}

.consent-check.compact {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.step-actions {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px);
  justify-content: end;
  gap: 12px;
  padding: 16px max(24px, calc((100% - 720px) / 2)) max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--chrome);
  backdrop-filter: blur(20px);
}

.step-actions .primary-button { min-height: 48px; border-radius: var(--radius-control); font-weight: 600; white-space: nowrap; }
.step-actions:has(.skip-button[hidden]) { grid-template-columns: minmax(150px, 300px); }
.choice-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.choice-title h3 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.choice-title > span { flex: none; color: var(--faint); font-size: 12px; }
.health-group + .health-group { padding-top: 24px; border-top: 1px solid var(--line); }
.health-group .optional-text { margin: 0; }
.segmented-choice { gap: 4px; padding: 4px; border-radius: 14px; background: var(--page); }
.segmented-choice button { min-height: 44px; background: transparent; border-color: transparent; }
.segmented-choice button[aria-pressed="true"] { background: var(--surface-strong); color: var(--brand); box-shadow: 0 2px 6px rgba(30, 50, 42, 0.1); }
.photo-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.photo-section { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.photo-hint { margin: 10px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.photo-section .upload-zone { min-height: 120px; margin-top: 16px; border-style: solid; border-color: var(--line); background: var(--surface-strong); }
.photo-section .upload-zone strong { font-size: 14px; color: var(--ink); font-weight: 600; }
.upload-zone:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.photo-section .upload-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-list:empty { margin: 0; }
.legacy-photos { margin-top: 24px; }
.upload-item button { min-height: 44px; }

.skip-button {
  min-height: 50px;
  padding: 0 18px;
  color: var(--muted);
}

.live-region {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.success-view {
  position: fixed;
  z-index: 40;
  inset: 0;
  min-height: 100dvh;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--brand);
  color: #f4f8f6;
}

.redirect-fallback {
  position: fixed;
  z-index: 40;
  inset: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--brand);
  color: #f4f8f6;
  text-align: center;
}

.redirect-fallback > div {
  width: min(480px, 100%);
}

.redirect-fallback p {
  color: #f4c77f;
  font-weight: 800;
}

.redirect-fallback h2 {
  margin: 12px 0;
  font-size: clamp(30px, 7vw, 48px);
}

.redirect-fallback span {
  display: block;
  margin-bottom: 28px;
  color: rgba(244, 248, 246, 0.78);
  line-height: 1.7;
}

.redirect-fallback .primary-button {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 12px;
  background: #f4f8f6;
  color: #123c32;
  text-decoration: none;
}

.success-content {
  width: min(520px, 100%);
  text-align: center;
}

.success-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  color: #f4c77f;
  font-weight: 900;
}

.success-content > p {
  color: #f4c77f;
}

.success-content h2 {
  color: #f7fbf9;
}

.success-content > span {
  display: block;
  margin: 18px auto 0;
  max-width: 29em;
  color: #c8dad3;
  line-height: 1.75;
}

.lead-reference {
  margin: 30px 0 20px;
  padding: 14px;
  border-radius: var(--radius-control);
  background: rgba(255, 255, 255, 0.09);
  color: #c8dad3;
  font-size: 13px;
}

.wecom-button,
.success-content .secondary-button {
  display: grid;
  width: 100%;
  place-items: center;
  text-decoration: none;
}

.wecom-button {
  background: #f7faf8;
  color: var(--brand-strong);
}

.wecom-button[aria-disabled="true"] {
  opacity: 0.52;
  pointer-events: none;
}

.wecom-note {
  min-height: 22px;
  margin: 12px 0 20px;
  color: #c8dad3;
  font-size: 13px;
  line-height: 1.6;
}

.success-content .secondary-button {
  border-color: rgba(255, 255, 255, 0.36);
  background: transparent;
  color: #f7fbf9;
}

@media (max-width: 767px) {
  :root {
    --header-height: 64px;
  }

  .site-shell {
    padding-bottom: 116px;
  }

  .site-header,
  .hero,
  .service-note,
  .information-guide,
  .boundary-note,
  .site-footer {
    width: calc(100% - 32px);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: calc(100dvh - var(--header-height));
    grid-template-columns: 1fr;
    gap: 20px;
    align-content: start;
    padding: 12px 0 72px;
  }

  .hero-copy {
    order: 2;
    padding: 0 0 0 17px;
  }

  .eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: clamp(36px, 11vw, 50px);
  }

  .hero-summary {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.65;
  }

  .hero-button {
    display: none;
  }

  .hero-visual {
    order: 1;
    min-height: 38dvh;
    height: 38dvh;
  }

  .hero-visual img {
    min-height: 0;
    height: 100%;
    object-position: center 42%;
  }

  .hero-visual figcaption {
    right: 12px;
    bottom: 12px;
    left: 12px;
    font-size: 11px;
  }

  .service-note {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 72px 0;
  }

  .information-guide {
    padding: 52px 24px;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }

  .guide-item {
    min-height: 0;
    padding: 22px 0;
  }

  .guide-item-featured {
    padding: 22px;
  }

  .guide-item p {
    margin-top: 18px;
  }

  .boundary-note {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 54px 0;
  }

  .site-footer {
    padding-bottom: 28px;
  }

  .sticky-action {
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    width: calc(100% - 24px);
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 9px 9px 9px 13px;
  }

  .quick-consent {
    font-size: 11px;
    line-height: 1.35;
  }

  .quick-consent input {
    width: 17px;
    height: 17px;
  }

  .sticky-action .primary-button {
    min-height: 46px;
    padding: 0 17px;
    font-size: 14px;
  }

  .wizard-header {
    grid-template-columns: 56px minmax(0, 1fr) 76px;
    gap: 8px;
    padding: 0 14px;
    padding-top: env(safe-area-inset-top);
  }

  .save-exit-button {
    font-size: 12px;
    white-space: nowrap;
  }

  .wizard-body {
    padding: 20px 16px 28px;
  }

  .assistant-line {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    margin-bottom: 18px;
  }

  .assistant-avatar {
    width: 36px;
    height: 36px;
  }

  .assistant-line p {
    padding: 12px 14px;
    font-size: 14px;
  }

  .form-step {
    padding: 24px 18px;
  }

  .photo-sections { grid-template-columns: 1fr; }
  .photo-section { padding: 18px; }
  .choice-card-grid button { padding: 10px 6px; font-size: 14px; }
  .choice-card-grid.four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-picker-grid { gap: 7px; }
  .metric-picker { padding: 12px 7px 10px; }
  .metric-control select { font-size: 21px; }
  .chinese-observation-stack .compact-choice { padding: 16px 12px; }

  .number-grid,
  .status-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .photo-guide {
    grid-template-columns: 1fr;
  }

  .upload-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-actions {
    grid-template-columns: 1fr 1.4fr;
    padding-right: 16px;
    padding-left: 16px;
  }

  .success-view {
    align-items: start;
    padding-top: max(72px, env(safe-area-inset-top));
  }
}

@media (prefers-color-scheme: dark) {
  .choice-card-grid button[aria-pressed="true"] {
    color: var(--ink);
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
  }

  :root {
    --page: #181d1b;
    --surface: #242a27;
    --surface-strong: #292f2c;
    --surface-tint: #24362f;
    --ink: #edf5f1;
    --muted: #b4c3bd;
    --faint: #95a79f;
    --line: #3a4a44;
    --brand: #2b725f;
    --brand-strong: #286752;
    --brand-soft: #25483c;
    --accent: #98cfb3;
    --focus: #98cfb3;
    --chrome: rgba(36, 42, 39, 0.94);
    --danger: #ff9188;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  }

  .wizard-header {
    background: var(--chrome);
  }

  .segmented-choice button[aria-pressed="true"] { color: var(--ink); }
  .dialog-head p, .step-heading > p { color: var(--accent); }

  .information-guide,
  .guide-item {
    background: #123c32;
  }

  .guide-item-featured {
    background: #1e5547;
  }

  .field-block input::placeholder,
  .field-block textarea::placeholder {
    color: #8ea099;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .wizard-header, .step-actions { background: var(--surface-strong); backdrop-filter: none; }
}

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

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

/* Continuous customer intake */
.text-link {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.text-link:hover { color: var(--brand); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.hero-facts span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--accent);
}

.intake-shell {
  width: min(980px, calc(100% - 40px));
  margin: 34px auto 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface-strong);
  box-shadow: 0 28px 80px rgba(18, 60, 50, 0.1);
  scroll-margin-top: 18px;
}

.intake-header {
  padding: 46px clamp(28px, 6vw, 72px) 38px;
  background: linear-gradient(145deg, #123c32, #286a59);
  color: #f7fbf9;
}

.intake-header p,
.intake-header h2,
.intake-header span { margin: 0; }

.intake-header p {
  color: #bcdacf;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.intake-header h2 {
  margin-top: 10px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.intake-header span {
  display: block;
  margin-top: 14px;
  color: #e0eee9;
  line-height: 1.7;
}

.form-section {
  padding: 46px clamp(28px, 6vw, 72px) 52px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.form-section:last-child { border-bottom: 0; }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 34px;
}

.section-heading > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 850;
}

.section-heading h2,
.section-heading p { margin: 0; }

.section-heading h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.form-section .field-block + .field-block { margin-top: 30px; }

.privacy-panel {
  margin-top: 32px;
  padding: 24px;
  border: 1px solid #cfdcd5;
  border-radius: 18px;
  background: var(--surface-tint);
}

.privacy-panel > strong { display: block; font-size: 16px; }

.privacy-panel > p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.privacy-panel .consent-check {
  padding: 10px 0;
  border: 0;
  background: transparent;
}

.boundary-copy {
  margin: 24px 0 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.7;
}

.submit-button {
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  font-size: 16px;
}

#friendCodeCard {
  max-width: 680px;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
}

#friendCodeText { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; user-select: all; }

@media (max-width: 767px) {
  .site-header { width: calc(100% - 32px); }
  .hero { min-height: auto; padding-bottom: 36px; }
  .hero-copy { padding-left: 0; }
  .hero-copy::before { display: none; }
  .hero-facts { gap: 8px 12px; }
  .intake-shell {
    width: 100%;
    margin: 18px 0 92px;
    border-right: 0;
    border-left: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: none;
  }
  .intake-header { padding: 34px 20px 30px; }
  .form-section { padding: 34px 20px 40px; }
  .section-heading { gap: 14px; margin-bottom: 28px; }
  .section-heading h2 { font-size: 25px; }
  .choice-card-grid.four-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-picker-grid { grid-template-columns: 1fr; }
  .photo-sections { grid-template-columns: 1fr; }
  .sticky-action { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .sticky-action .primary-button { width: 100%; }
}
