:root {
  --paper: #f6f7f5;
  --paper-deep: #e9ece8;
  --card: #ffffff;
  --ink: #171a18;
  --muted: #5d655f;
  --faint: #6f7973;
  --line: #d9ddd7;
  --line-strong: #aeb8b1;
  --accent: #285b46;
  --accent-strong: #1d4937;
  --accent-soft: #edf4f0;
  --error: #a33b32;
  --error-soft: #fff1ef;
  --success: #276248;
  --shadow: 0 20px 55px rgba(23, 26, 24, 0.07);
  --shadow-small: 0 6px 20px rgba(23, 26, 24, 0.05);
  --radius: 16px;
  --radius-small: 10px;
  --content: 920px;
  --wide: 1120px;
  --header-height: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --scroll-offset: calc(var(--header-height) + var(--safe-top) + 12px);
}

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

html {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  width: 100%;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--safe-bottom);
  overscroll-behavior-x: none;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

main,
.app {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

html[lang="yue-Hant-HK"] body {
  font-family: "PingFang HK", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.65;
  word-break: break-word;
  line-break: strict;
}

html[lang="yue-Hant-HK"] .step-header h2,
html[lang="yue-Hant-HK"] .access-card--single h1,
html[lang="yue-Hant-HK"] .success-card h2 {
  line-height: 1.22;
  letter-spacing: 0;
}

html[lang="yue-Hant-HK"] .step-kicker,
html[lang="yue-Hant-HK"] .eyebrow {
  letter-spacing: 0.06em;
}

button,
input,
textarea {
  font: inherit;
}

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

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: calc(0.75rem + var(--safe-top));
}

.sr-only {
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  border-bottom: 1px solid rgba(217, 221, 215, 0.88);
  background: rgba(246, 247, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Clean client login chrome */
body.is-locked .site-header {
  border-bottom-color: transparent;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.is-locked .site-header__inner {
  min-height: 56px;
}

body.is-locked .language-switch {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(23, 26, 24, 0.04);
}

body.is-locked .footer {
  display: none;
}

html[lang="yue-Hant-HK"] .access-card--single h1 {
  letter-spacing: 0;
  line-height: 1.25;
}

.site-header__inner {
  width: min(calc(100% - 2rem), var(--wide));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.brand__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 254, 251, 0.78);
}

.language-switch button {
  min-width: 46px;
  min-height: 44px;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}

.access-gate {
  min-height: calc(100vh - 65px);
  min-height: calc(100dvh - 65px - var(--safe-top));
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 4.5rem) 1rem;
}

body.is-locked .access-gate {
  min-height: calc(100vh - 64px - var(--safe-top));
  min-height: calc(100dvh - 64px - var(--safe-top));
  padding: clamp(0.5rem, 4vw, 3rem) 1rem 2.5rem;
}

.access-shell {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(310px, 0.88fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.access-shell--single {
  width: min(100%, 420px);
  grid-template-columns: minmax(0, 1fr);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(23, 26, 24, 0.08);
}

.access-intro {
  padding: clamp(2rem, 5vw, 4.5rem);
  background: var(--card);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.access-intro h1,
.hero h1 {
  margin: 0;
  max-width: 13em;
  font-family: inherit;
  font-size: clamp(2.1rem, 5vw, 3.8rem);
  font-weight: 680;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

html[lang="yue-Hant-HK"] .access-intro h1,
html[lang="yue-Hant-HK"] .hero h1 {
  font-family: inherit;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.access-intro__lede {
  max-width: 33rem;
  margin: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.expectations {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.expectations li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.86rem;
}

.expectations span:first-child {
  color: var(--accent);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.access-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-left: 1px solid var(--line);
  background: #fbfaf6;
}

.access-card--single {
  padding: clamp(1.75rem, 5vw, 2.4rem);
  border-left: 0;
  background: var(--card);
}

.access-card--single h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.65rem, 5vw, 1.95rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.access-card--single > .eyebrow {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 720;
  letter-spacing: 0.12em;
}

.access-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.access-card > p:not(.eyebrow),
.access-lede {
  margin: 0 0 1.45rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.access-card--single .field-label {
  margin-bottom: 0.5rem;
}

.access-card--single .button {
  margin-top: 1rem;
  min-height: 50px;
}

.field-label {
  display: block;
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 680;
}

.required-mark {
  color: var(--error);
}

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="password"],
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
  padding: 0.82rem 0.9rem;
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

#product-story {
  min-height: 120px;
}

input::placeholder,
textarea::placeholder {
  color: #737d77;
  opacity: 1;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(49, 95, 77, 0.13);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--error);
  background: var(--error-soft);
}

input[readonly] {
  border-color: var(--line);
  background: var(--paper-deep);
  color: var(--ink);
  cursor: default;
  opacity: 1;
}

input[readonly]:focus {
  border-color: var(--line-strong);
  box-shadow: none;
}

.button {
  min-height: 48px;
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  padding: 0.72rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(49, 95, 77, 0.18);
}

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

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

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

.button:disabled {
  transform: none;
  opacity: 0.58;
  cursor: wait;
}

.access-card .button {
  width: 100%;
  margin-top: 0.75rem;
}

.inline-error {
  min-height: 1.2rem;
  margin: 0.5rem 0 0;
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 630;
}

.app {
  padding-bottom: clamp(2.5rem, 7vw, 6rem);
}

.hero {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(1.75rem, 4vw, 2.75rem);
}

.hero h1 {
  max-width: 10em;
  font-size: clamp(2.35rem, 6vw, 3.6rem);
}

.hero__lede {
  max-width: 37rem;
  margin: 1.25rem 0 1.75rem;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.12rem);
}

.assurances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.assurance {
  min-width: 0;
  padding: 0;
}

.assurance strong,
.assurance span {
  display: block;
}

.assurance strong {
  margin-bottom: 0.08rem;
  font-size: 0.78rem;
}

.assurance span {
  color: var(--muted);
  font-size: 0.75rem;
}

.form-shell {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  scroll-margin-top: var(--scroll-offset);
}

.step-panel,
.step-header h2,
.step-error,
.success-card,
#success-title {
  scroll-margin-top: var(--scroll-offset);
}

.step-status {
  margin-bottom: 0.85rem;
}

.step-status__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.55rem;
}

.step-status__copy {
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 680;
  line-height: 1.35;
}

.draft-status {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 180ms ease;
}

.draft-status.is-visible {
  opacity: 1;
}

.step-status__tools {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.draft-clear {
  min-height: 44px;
  max-width: 100%;
  padding: 0 0.35rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.3;
  text-align: right;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
  cursor: pointer;
}

.draft-restored,
.storage-note {
  margin: 0 0 1rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid #cbdcd2;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.storage-note {
  margin: -0.4rem 0 1.4rem;
  border-color: var(--line);
  background: #faf9f4;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe2dc;
}

.progress-fill {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 280ms ease;
}

.step-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.step-nav li {
  position: relative;
  min-width: 0;
  padding-right: 0.5rem;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 620;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-nav li::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 0.38rem;
  border-radius: 50%;
  background: var(--line-strong);
  vertical-align: 1px;
  flex: 0 0 auto;
}

.step-nav li.is-active {
  color: var(--ink);
}

.step-nav li.is-active::before,
.step-nav li.is-complete::before {
  background: var(--accent);
}

.form-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-small);
}

.step-panel {
  padding: clamp(1.25rem, 5vw, 3.2rem);
}

.step-panel[hidden] {
  display: none !important;
}

.step-header {
  margin-bottom: clamp(1.8rem, 5vw, 2.8rem);
}

.step-kicker {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-header h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

html[lang="yue-Hant-HK"] .step-header h2 {
  font-family: inherit;
  letter-spacing: -0.02em;
}

.step-header p {
  max-width: 36rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-stack {
  display: grid;
  gap: 1.4rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  min-width: 0;
}

.field-hint {
  margin: 0.42rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  padding: 0;
}

.question-title {
  display: block;
  margin: 0 0 0.25rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.35;
}

.question-help {
  display: block;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 450;
  line-height: 1.45;
}

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

.choice-grid--single {
  grid-template-columns: 1fr;
}

/* Avoid a half-width orphan on 2-column choice grids */
.choice-grid:not(.choice-grid--single) > .choice-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.choice-card {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.choice-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.choice-card.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(49, 95, 77, 0.09);
}

.choice-card input,
.segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  opacity: 0;
  pointer-events: none;
}

.choice-mark {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin-top: 0.08rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
}

.choice-card[data-choice="radio"] .choice-mark {
  border-radius: 50%;
}

.choice-card input:checked + .choice-mark {
  border-color: var(--accent);
  background: var(--accent);
}

.choice-card input:checked + .choice-mark::after {
  content: "";
  width: 7px;
  height: 4px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.choice-card[data-choice="radio"] input:checked + .choice-mark::after {
  width: 6px;
  height: 6px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  transform: none;
}

.choice-copy {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.choice-copy strong,
.choice-copy span {
  display: block;
}

.choice-copy strong {
  font-size: 0.86rem;
  font-weight: 680;
  line-height: 1.35;
}

.choice-copy span {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.group-error {
  display: none;
  margin: 0.5rem 0 0;
  color: var(--error);
  font-size: 0.79rem;
  font-weight: 630;
}

.has-error .group-error {
  display: block;
}

.has-error .choice-grid,
.has-error .asset-list {
  border-radius: var(--radius-small);
  box-shadow: 0 0 0 3px rgba(163, 59, 50, 0.1);
}

.example {
  margin-top: 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #faf9f4;
}

.example summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.85rem;
  color: var(--accent-strong);
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}

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

.example summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 500;
}

.example[open] summary::after {
  content: "−";
}

.example p {
  margin: 0;
  padding: 0 0.85rem 0.85rem;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.55;
}

.scope-recap {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
}

.scope-recap__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfa;
}

.scope-recap__header h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 730;
}

.scope-recap__badge {
  flex: 0 0 auto;
  padding: 0.24rem 0.5rem;
  border: 1px solid #c7d8cf;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.65rem;
  font-weight: 730;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scope-recap__summary {
  margin: 0;
  padding: 1rem;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.6;
}

.scope-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px 0;
  list-style: none;
  background: var(--line);
}

.scope-flow li {
  min-width: 0;
  display: grid;
  gap: 0.28rem;
  padding: 0.72rem 0.75rem;
  background: #fafbfa;
}

.scope-flow span {
  color: var(--accent);
  font-size: 0.62rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.scope-flow strong {
  font-size: 0.74rem;
  font-weight: 670;
  line-height: 1.3;
}

.scope-recap__boundary {
  margin: 0;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.5;
}

.recap-features {
  border-top: 1px solid var(--line);
}

.recap-features summary,
.deliverable-guide summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.78rem 1rem;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
}

.recap-features summary::-webkit-details-marker,
.deliverable-guide summary::-webkit-details-marker {
  display: none;
}

.recap-features summary::after,
.deliverable-guide summary::after {
  content: "+";
  font-size: 1rem;
  font-weight: 500;
}

.recap-features[open] summary::after,
.deliverable-guide[open] summary::after {
  content: "−";
}

.recap-features ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 1.25rem;
  margin: 0;
  padding: 0 1rem 1rem 2rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.deliverable-guide {
  margin: 0 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fafbfa;
}

.deliverables-summary {
  margin: 0.45rem 0 0.85rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.deliverable-guide__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0 0.8rem 0.85rem;
}

.deliverable-stage {
  min-width: 0;
}

.deliverable-stage > strong,
.deliverable-stage > span {
  display: block;
}

.deliverable-stage > strong {
  margin-top: 0.48rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.deliverable-stage > span {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.3;
}

.deliverable-stage__canvas {
  position: relative;
  height: 96px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.deliverable-stage__canvas > span {
  position: absolute;
  display: block;
  border-radius: 3px;
  background: #d9ddda;
}

.mini-nav {
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: 6px;
}

.mini-hero {
  top: 25px;
  left: 10px;
  width: calc(100% - 20px);
  height: 28px;
}

.mini-line {
  top: 61px;
  left: 10px;
  width: 58%;
  height: 5px;
}

.mini-line--short {
  top: 71px;
  width: 39%;
}

.mini-action {
  right: 10px;
  bottom: 10px;
  width: 29%;
  height: 13px;
}

.deliverable-stage--wireframe .deliverable-stage__canvas > span {
  border: 1px solid #c8ceca;
  background: #f2f4f2;
}

.deliverable-stage--ui .mini-nav,
.deliverable-stage--prototype .mini-nav {
  background: var(--ink);
}

.deliverable-stage--ui .mini-hero,
.deliverable-stage--prototype .mini-hero {
  background: var(--accent-soft);
}

.deliverable-stage--ui .mini-action,
.deliverable-stage--prototype .mini-action {
  background: var(--accent);
}

.mini-cursor {
  right: 19%;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50% !important;
  background: var(--ink) !important;
  box-shadow: 0 0 0 1px var(--ink);
}

.handoff-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid #c7d8cf;
  border-radius: var(--radius-small);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.handoff-note__mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.handoff-note > span:last-child > strong,
.handoff-note > span:last-child > span {
  display: block;
}

.handoff-note > span:last-child > strong {
  font-size: 0.82rem;
}

.handoff-note > span:last-child > span {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.handoff-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: 0.7rem 0 0;
  padding: 0.7rem 0 0 1rem;
  border-top: 1px solid #c7d8cf;
  color: var(--accent-strong);
  font-size: 0.7rem;
  line-height: 1.4;
}

.asset-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
}

.asset-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.asset-row:last-child {
  border-bottom: 0;
}

.asset-name {
  font-size: 0.84rem;
  font-weight: 680;
}

.asset-name > span {
  display: block;
}

.asset-name > span:first-child {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 680;
}

.asset-name > span + span {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 450;
}

.segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.segment {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segment span {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 0.4rem 0.3rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 670;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.segment input:checked + span,
.segment:focus-within span {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 5px rgba(23, 34, 29, 0.12);
}

.segment input:focus-visible + span {
  outline: 3px solid rgba(49, 95, 77, 0.34);
  outline-offset: 3px;
}

.conditional {
  margin-top: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #faf9f4;
}

.conditional[hidden] {
  display: none !important;
}

.date-field {
  max-width: 300px;
  margin-top: 0.75rem;
}

.step-error {
  display: none;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #edc8c3;
  border-radius: 10px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 630;
}

.step-error.is-visible {
  display: block;
}

.form-actions {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.form-actions .button {
  flex: 0 1 auto;
}

.form-actions .button--primary {
  min-width: min(100%, 10.5rem);
}

.form-actions--end {
  justify-content: flex-end;
}

.review-intro {
  margin: -0.5rem 0 1.25rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.review-sections {
  display: grid;
  gap: 0.8rem;
}

.review-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: #fff;
}

.review-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #faf9f4;
}

.review-section__header h3 {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 730;
}

.review-edit {
  min-height: 44px;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.review-list {
  margin: 0;
  padding: 0.2rem 0.9rem;
}

.review-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
}

.review-item:last-child {
  border-bottom: 0;
}

.review-item dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.review-item dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 570;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.privacy-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.submit-error {
  display: none;
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #edc8c3;
  border-radius: 10px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 0.82rem;
  font-weight: 630;
}

.submit-error.is-visible {
  display: block;
}

.success-card {
  width: min(calc(100% - 2rem), 650px);
  margin: clamp(2.5rem, 8vw, 5.5rem) auto 0;
  padding: clamp(1.5rem, 6vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.success-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--success);
  font-size: 1.25rem;
  font-weight: 800;
}

.success-card h2 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 680;
  letter-spacing: -0.035em;
}

.success-card > p {
  margin: 0.7rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.93rem;
}

.next-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.next-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}

.next-list span:first-child {
  color: var(--accent);
  font-weight: 740;
}

.footer {
  width: min(calc(100% - 2rem), var(--content));
  margin: 0 auto;
  padding: 2.5rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.date-field input[type="date"] {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
}

:focus-visible {
  outline: 3px solid rgba(49, 95, 77, 0.34);
  outline-offset: 3px;
}

/*
  Programmatic focus targets (step titles, alerts, success).
  Keep focus for screen readers, but never show a "mystery box" outline.
*/
.step-header h2:focus,
.step-header h2:focus-visible,
.step-error:focus,
.step-error:focus-visible,
.submit-error:focus,
.submit-error:focus-visible,
#success-title:focus,
#success-title:focus-visible,
.js-quiet-focus:focus,
.js-quiet-focus:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Choice cards: selected state is enough — don't keep a second focus box after click */
.choice-card:focus-within:not(.is-selected) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(49, 95, 77, 0.09);
}

.choice-card.is-selected:focus-within {
  box-shadow: 0 0 0 3px rgba(49, 95, 77, 0.09);
}

.choice-card input:focus-visible + .choice-mark {
  outline: 3px solid rgba(49, 95, 77, 0.34);
  outline-offset: 3px;
}

/* Large tablet / small laptop */
@media (max-width: 1024px) {
  .step-panel {
    padding: clamp(1.35rem, 3.5vw, 2.4rem);
  }

  .handoff-list {
    grid-template-columns: 1fr;
  }
}

/* Tablet portrait and below */
@media (max-width: 900px) {
  .form-shell,
  .footer,
  .success-card {
    width: min(calc(100% - 1.5rem), var(--content));
  }

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

  .asset-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

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

  .recap-features ul {
    grid-template-columns: 1fr;
  }

  .step-nav li {
    font-size: 0.68rem;
  }
}

@media (max-width: 760px) {
  .access-shell {
    max-width: 560px;
    grid-template-columns: 1fr;
  }

  .access-intro {
    padding: 2.2rem 1.5rem;
  }

  .access-intro h1 {
    max-width: 10em;
    font-size: clamp(2.25rem, 11vw, 3.5rem);
  }

  .access-card {
    padding: 1.5rem;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .access-card--single {
    border-top: 0;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .deliverable-guide__grid {
    grid-template-columns: 1fr;
  }

  /* Step labels get tight around this width — switch to dots */
  .step-nav {
    gap: 0.25rem;
  }

  .step-nav li {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 0;
    color: transparent;
    font-size: 0;
    line-height: 0;
    overflow: visible;
  }

  .step-nav li::before {
    width: 9px;
    height: 9px;
    margin: 0;
    vertical-align: 0;
  }

  .step-nav li.is-active {
    color: transparent;
  }

  .step-nav li.is-active::before {
    box-shadow: 0 0 0 3px rgba(40, 91, 70, 0.18);
  }
}

/* Phones and small tablets */
@media (max-width: 620px) {
  :root {
    --header-height: 56px;
  }

  .site-header__inner {
    width: min(calc(100% - 1.25rem), var(--wide));
    min-height: 56px;
  }

  .language-switch button {
    min-width: 42px;
    min-height: 44px;
    padding-inline: 0.55rem;
  }

  .access-gate {
    min-height: calc(100dvh - 57px - var(--safe-top));
    align-items: start;
    padding: 0.8rem 0.65rem 2rem;
  }

  .access-shell {
    border-radius: 17px;
  }

  .access-intro {
    padding: 1.75rem 1.15rem;
  }

  .access-intro__lede {
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
  }

  .expectations li {
    padding: 0.58rem 0;
    font-size: 0.79rem;
  }

  .access-card {
    padding: 1.25rem 1.15rem 1.35rem;
  }

  .access-card--single h1 {
    font-size: clamp(1.75rem, 9vw, 2.2rem);
  }

  .hero,
  .form-shell,
  .footer,
  .success-card {
    width: min(calc(100% - 1.25rem), var(--content));
  }

  .form-shell {
    padding-top: 1.15rem;
  }

  .step-status__row {
    align-items: flex-start;
  }

  .step-status__tools {
    width: 100%;
    justify-content: space-between;
  }

  .form-card {
    border-radius: 14px;
  }

  .step-panel {
    padding: 1.25rem 1rem;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice-grid:not(.choice-grid--single) > .choice-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .scope-flow {
    grid-template-columns: 1fr;
  }

  .deliverable-guide__grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding-inline: 0.65rem;
  }

  .deliverable-stage__canvas {
    height: 82px;
  }

  .choice-grid[data-compact-mobile="true"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid[data-compact-mobile="true"] > .choice-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .review-section__header {
    align-items: flex-start;
    gap: 0.65rem;
  }

  .review-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .form-actions--end {
    grid-template-columns: 1fr;
  }

  .form-actions .button,
  .form-actions--end .button {
    width: 100%;
    flex: initial;
    min-width: 0;
  }

  .success-card {
    margin-top: 1.75rem;
    padding: 1.35rem 1.15rem 1.5rem;
  }

  .scope-recap__header {
    align-items: flex-start;
  }

  .date-field {
    max-width: none;
  }
}

/* Small phones — asset segments become full-width rows */
@media (max-width: 480px) {
  .segments {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .segment span {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 0.8rem;
    text-align: left;
  }

  .segment input:checked + span,
  .segment:focus-within span {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(49, 95, 77, 0.09);
  }

  .asset-row {
    padding: 0.85rem 0.75rem;
  }

  .choice-card {
    padding: 0.8rem 0.75rem;
  }

  .scope-recap__summary,
  .scope-recap__boundary {
    padding-inline: 0.85rem;
  }
}

/* Very small phones */
@media (max-width: 360px) {
  .brand__text {
    font-size: 0.78rem;
  }

  .language-switch button {
    min-width: 38px;
    padding-inline: 0.4rem;
  }

  .step-panel {
    padding-inline: 0.82rem;
  }

  .form-actions {
    grid-template-columns: 1fr;
  }

  .choice-grid[data-compact-mobile="true"] {
    grid-template-columns: 1fr;
  }

  .choice-grid[data-compact-mobile="true"] > .choice-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .button {
    padding-inline: 0.9rem;
  }
}

/* Phone landscape / short viewports */
@media (max-height: 480px) and (orientation: landscape) {
  .access-gate {
    min-height: auto;
    align-items: start;
    padding: 0.75rem 1rem 1.25rem;
  }

  .form-shell {
    padding-top: 0.85rem;
  }

  .step-panel {
    padding-block: 1rem;
  }

  .site-header__inner {
    min-height: 52px;
  }
}

/* Prefer stacked asset choices whenever Chinese labels would crush */
html[lang="yue-Hant-HK"] .segment span {
  font-size: 0.7rem;
  line-height: 1.25;
}

@media (max-width: 900px) {
  html[lang="yue-Hant-HK"] .segments {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  html[lang="yue-Hant-HK"] .segment span {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 0.8rem;
    text-align: left;
  }

  html[lang="yue-Hant-HK"] .segment input:checked + span,
  html[lang="yue-Hant-HK"] .segment:focus-within span {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(49, 95, 77, 0.09);
  }
}

@media (hover: none) {
  .button:hover,
  .choice-card:hover {
    transform: none;
  }
}

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

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

@media print {
  .site-header,
  .hero,
  .step-status,
  .step-nav,
  .form-actions,
  .footer {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .form-shell {
    width: 100%;
  }

  .form-card {
    border: 0;
    box-shadow: none;
  }
}
