:root {
  --background: #ffffff;
  --surface-subtle: #f7f7f6;
  --ink: #111111;
  --muted: #595959;
  --line: #d8d8d5;
  --accent: #f03a16;
  --accent-dark: #c82b0d;
  --focus: #1565d8;
  --max-width: 1120px;
  --radius: 8px;
  --shadow: 0 16px 40px rgb(17 17 17 / 8%);
  color-scheme: light;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

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

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 4px;
}

.site-header {
  width: min(100% - 40px, var(--max-width));
  min-height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.brand span {
  font-weight: 650;
}

.section-shell {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.hero {
  padding: 92px 0 0;
}

.hero-copy {
  max-width: 840px;
}

.hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(48px, 7vw, 80px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.hero h1 span {
  display: block;
}

.hero-copy > p {
  max-width: 700px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.55;
}

.hero-actions,
.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 38px;
}

.button {
  min-height: 54px;
  padding: 13px 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.button-small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 15px;
}

.button-secondary {
  background: #ffffff;
  color: var(--accent);
}

.button-secondary:hover {
  background: #fff4f0;
  color: var(--accent-dark);
}

.text-link,
.text-button {
  color: var(--accent);
  font-weight: 800;
  text-underline-offset: 5px;
}

.text-link span {
  margin-left: 4px;
}

.text-button {
  padding: 6px 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.flow-strip {
  margin-top: 86px;
  padding: 38px 0 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.flow-strip > p {
  margin: 0 0 28px;
  text-align: center;
  font-weight: 800;
}

.flow-strip ol {
  position: relative;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.flow-strip ol::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 16.67%;
  left: 16.67%;
  height: 1px;
  background: var(--accent);
}

.flow-strip li {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.flow-strip li span,
.step-number {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #ffffff;
  color: var(--accent);
  font-weight: 850;
}

.flow-strip li strong {
  font-size: 24px;
}

.flow-summary {
  margin-top: 20px;
  text-align: center;
  color: var(--muted);
}

.flow-summary span {
  margin: 0 8px;
  color: var(--accent);
}

.method,
.audience,
.intake {
  padding: 112px 0;
}

.audience,
.intake {
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 40px;
  align-items: end;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
}

.section-heading h2,
.intake-intro h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-heading p,
.intake-intro p {
  margin: 0;
  color: var(--muted);
}

.diagnostic-list {
  margin: 0;
  padding: 0;
  max-width: 900px;
  list-style: none;
}

.diagnostic-list li {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 28px;
  padding-bottom: 42px;
}

.diagnostic-list li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50px;
  bottom: 0;
  left: 24px;
  width: 2px;
  background: var(--accent);
}

.step-number {
  background: var(--accent);
  color: #ffffff;
}

.diagnostic-list h3 {
  margin: -4px 0 4px;
  font-size: 28px;
}

.diagnostic-list p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
}

.audience-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.audience-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 650;
  line-height: 1.45;
}

.audience-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 900;
}

.intake {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100% - var(--max-width)) / 2));
  padding-left: max(20px, calc((100% - var(--max-width)) / 2));
  background: var(--surface-subtle);
}

.intake-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: 72px;
  align-items: start;
}

.intake-intro {
  position: sticky;
  top: 32px;
}

.intake-intro p {
  margin-top: 24px;
}

form {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.field {
  margin: 0 0 28px;
}

.field > label,
.field legend {
  display: block;
  margin-bottom: 9px;
  font-size: 16px;
  font-weight: 850;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

input[type="url"],
textarea {
  width: 100%;
  border: 1px solid #a9a9a5;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 13px 14px;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

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

input[type="url"]:focus,
textarea:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px rgb(21 101 216 / 16%);
}

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

.radio-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.radio-options label {
  position: relative;
  cursor: pointer;
}

.radio-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-options span {
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #a9a9a5;
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 15px;
  font-weight: 750;
}

.radio-options input:checked + span {
  border-color: var(--accent);
  background: #fff1ec;
  color: var(--accent-dark);
}

.radio-options input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent);
  outline-offset: 3px;
}

.button-full {
  width: 100%;
}

.privacy-note,
.copy-status {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.form-error {
  margin: -8px 0 16px;
  color: #b42318;
  font-size: 15px;
  font-weight: 700;
}

.result {
  grid-column: 2;
  padding: 34px;
  border: 1px solid var(--ink);
  border-radius: 12px;
  background: #ffffff;
}

.result-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
}

.result h3 {
  margin: 0;
  font-size: 27px;
}

.result-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.result pre {
  margin: 24px 0 0;
  padding: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  border-left: 4px solid var(--accent);
  background: var(--surface-subtle);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
}

footer {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 36px 0 54px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  color: var(--muted);
  font-size: 14px;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--ink);
  font-weight: 750;
  text-underline-offset: 4px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .site-header {
    min-height: 72px;
  }

  .brand {
    max-width: none;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .brand span {
    display: inline;
  }

  .button-small {
    min-height: 40px;
    padding: 7px 12px;
    font-size: 13px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero h1 {
    font-size: clamp(34px, 9.7vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.05em;
  }

  .hero-copy > p {
    margin-top: 22px;
    font-size: 19px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button,
  .hero-actions .text-link {
    width: 100%;
    text-align: center;
  }

  .flow-strip {
    margin-top: 64px;
  }

  .flow-strip li strong {
    font-size: 20px;
  }

  .method,
  .audience,
  .intake {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .section-heading,
  .intake-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section-heading {
    align-items: start;
    margin-bottom: 36px;
  }

  .intake-intro {
    position: static;
  }

  form,
  .result {
    padding: 24px 20px;
  }

  .result {
    grid-column: 1;
  }

  .radio-options {
    grid-template-columns: 1fr;
  }

  .result-heading,
  footer {
    flex-direction: column;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
