:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-soft: #edf7f6;
  --ink: #171b24;
  --muted: #5f6b7a;
  --line: #dbe4ea;
  --primary: #0b7a75;
  --primary-dark: #075f5b;
  --action: #e85d3f;
  --action-dark: #c8462e;
  --amber: #d38b18;
  --red: #b94336;
  --blue: #2f6fed;
  --shadow: 0 18px 38px rgba(23, 27, 36, 0.12);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.7;
}

a {
  color: inherit;
}

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

.disclosure {
  background: #111827;
  color: #f8faf8;
  font-size: 12px;
  padding: 8px 18px;
  text-align: center;
}

.site-header {
  align-items: center;
  background: rgba(247, 249, 251, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-weight: 800;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  height: 32px;
  justify-content: center;
  letter-spacing: 0;
  width: 32px;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.hero {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.78fr);
  min-height: calc(100vh - 102px);
  padding: 56px min(6vw, 72px) 72px;
}

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

.eyebrow {
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(38px, 5vw, 68px);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 22px;
  max-width: 780px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  max-width: 660px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 30px 0 24px;
}

.primary-action,
.secondary-action,
.question-step button,
.cta-block button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-action {
  background: var(--action);
  box-shadow: 0 12px 24px rgba(232, 93, 63, 0.24);
  color: #fff;
  display: inline-flex;
  padding: 15px 20px;
  text-decoration: none;
}

.primary-action:hover {
  background: var(--action-dark);
}

.hero-note,
.signal-list {
  color: var(--muted);
  font-size: 14px;
}

.signal-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.signal-list li {
  align-items: center;
  display: flex;
  gap: 10px;
}

.signal-list li::before {
  background: var(--primary);
  content: "";
  display: inline-block;
  height: 8px;
  width: 8px;
}

.comic-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 14px;
}

.comic-toolbar {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 6px;
  padding-bottom: 12px;
}

.comic-toolbar span {
  background: #cad3cd;
  display: block;
  height: 9px;
  width: 9px;
}

.comic-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 14px;
}

.comic-panel {
  background:
    linear-gradient(135deg, rgba(11, 122, 117, 0.12), rgba(232, 93, 63, 0.10)),
    #fbfdff;
  border: 2px solid #171b24;
  min-height: 136px;
  padding: 16px;
  position: relative;
}

.comic-panel::after {
  background: rgba(47, 111, 237, 0.14);
  content: "";
  height: 36px;
  position: absolute;
  right: 16px;
  top: 18px;
  width: 52px;
}

.panel-large {
  min-height: 210px;
}

.panel-wide {
  grid-column: 1 / -1;
  min-height: 116px;
}

.panel-label {
  color: var(--blue);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 34px;
}

.comic-panel p {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  max-width: 220px;
}

.diagnosis-band,
.content-band {
  padding: 72px min(6vw, 72px);
}

.diagnosis-band {
  background: #eaf3f4;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.section-heading {
  margin: 0 auto 28px;
  max-width: 980px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  margin-bottom: 0;
}

.diagnosis-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 980px;
  padding: 28px;
}

.progress-meta {
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: space-between;
  margin-bottom: 8px;
}

.progress-track,
.score-track {
  background: var(--surface-soft);
  height: 8px;
  overflow: hidden;
}

.progress-bar,
.score-fill {
  background: var(--primary);
  height: 100%;
  transition: width 0.25s ease;
  width: 0;
}

.question-form {
  margin-top: 26px;
}

.question-step {
  border: 0;
  display: none;
  margin: 0;
  padding: 0;
}

.question-step.is-active {
  display: grid;
  gap: 12px;
}

.question-step legend {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 22px;
}

.question-step button {
  background: #f7fbfb;
  border: 1px solid #d7e7e5;
  color: var(--ink);
  padding: 16px 18px;
  text-align: left;
  width: 100%;
}

.question-step button:hover,
.question-step button:focus {
  background: #fff;
  border-color: var(--action);
  box-shadow: 0 8px 18px rgba(232, 93, 63, 0.12);
  outline: none;
}

.diagnosis-controls {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.secondary-action {
  background: #dde9ec;
  color: var(--ink);
  padding: 11px 14px;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.result-panel {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 28px;
}

.result-kicker {
  color: var(--action);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.result-panel h3 {
  font-size: clamp(24px, 3.4vw, 36px);
  line-height: 1.25;
  margin-bottom: 12px;
}

.result-panel p {
  color: var(--muted);
}

.score-meter {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}

#scoreLabel {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-grid,
.criteria-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-grid div,
.criteria-grid article,
.faq-list details {
  border: 1px solid var(--line);
  padding: 18px;
}

.result-grid h4,
.criteria-grid h3 {
  margin-bottom: 8px;
}

.result-grid ul {
  color: var(--muted);
  margin: 0;
  padding-left: 20px;
}

.cta-block {
  align-items: center;
  background: #fff3ef;
  border: 1px solid #f0b5a6;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 22px;
  padding: 18px;
}

.cta-block p {
  margin: 0;
}

.cta-status {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.cta-slot {
  display: flex;
  justify-content: flex-end;
}

.cta-slot a,
.cta-block button {
  background: #d6dde3;
  color: #5d6670;
  border-radius: var(--radius);
  cursor: not-allowed;
  display: inline-flex;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  min-width: 150px;
  padding: 13px 16px;
  text-decoration: none;
}

.cta-slot a {
  background: var(--action);
  box-shadow: 0 12px 24px rgba(232, 93, 63, 0.22);
  color: #fff;
  cursor: pointer;
}

.cta-slot a:hover {
  background: var(--action-dark);
}

.content-band {
  margin: 0 auto;
  max-width: 1120px;
}

.content-band.muted {
  background: #171b24;
  color: #fff;
  max-width: none;
}

.content-band.muted .section-heading,
.content-band.muted .wide-copy {
  margin-left: auto;
  margin-right: auto;
  max-width: 980px;
}

.content-band.muted .eyebrow {
  color: #f0b76b;
}

.content-band.muted .wide-copy {
  color: #dbe4ea;
  font-size: 18px;
}

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

.criteria-grid article {
  background: var(--surface);
}

.criteria-grid p,
.faq-list p {
  color: var(--muted);
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--surface);
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.faq-list details[open] summary {
  margin-bottom: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
    position: static;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 18px 54px;
  }

  .comic-preview {
    order: -1;
  }

  .diagnosis-band,
  .content-band {
    padding: 52px 18px;
  }

  .diagnosis-shell {
    padding: 20px;
  }

  .result-grid,
  .criteria-grid,
  .cta-block {
    grid-template-columns: 1fr;
  }

  .cta-block {
    align-items: stretch;
    display: grid;
  }

  .cta-slot {
    justify-content: stretch;
  }
}

@media (max-width: 520px) {
  .nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: 36px;
  }

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

  .primary-action {
    justify-content: center;
  }

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

  .panel-wide {
    grid-column: auto;
  }

  .diagnosis-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
