 :root {
  --teal: #0E4E6B;
  --blue: #739BB9;
  --white: #FFFFFF;
  --black: #000000;
  --ink: #102027;
  --muted: #65737a;
  --line: #d8e1e6;
  --soft: #f5f8fa;
  --warning: #8a5a00;
  --danger: #8a1f1f;
  --success: #22543d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
  min-height: 100vh;
}

.app-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--teal);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  position: relative;
}

.brand-icon::after {
  content: "";
  width: 10px;
  height: 24px;
  border-left: 4px solid var(--blue);
  border-right: 4px solid var(--blue);
  position: absolute;
  right: -13px;
  top: 10px;
}

.brand-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
  letter-spacing: -0.04em;
}

.brand-name span {
  color: var(--black);
}

.tagline {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(14, 78, 107, 0.08);
  padding: 28px;
}

.intro-card {
  max-width: 860px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

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

h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

h2 {
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.lead {
  font-size: 19px;
  line-height: 1.5;
  color: #30424b;
  max-width: 720px;
}

.notice {
  background: #eef5f8;
  border-left: 4px solid var(--teal);
  padding: 14px 16px;
  border-radius: 10px;
  margin: 22px 0;
  line-height: 1.45;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin: 24px 0;
}

ul {
  padding-left: 18px;
  line-height: 1.6;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 15px;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 800;
}

.primary-btn {
  background: var(--teal);
  color: var(--white);
}

.secondary-btn {
  background: #e9f0f4;
  color: var(--teal);
}

.ghost-btn {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

.progress-wrap {
  margin-bottom: 24px;
}

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

.progress-track {
  background: #e8eef1;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  background: var(--teal);
  height: 100%;
  width: 0%;
  transition: width 0.2s ease;
}

.question-help {
  color: var(--muted);
  line-height: 1.45;
}

.options-wrap {
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.option-btn {
  text-align: left;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.option-btn:hover {
  border-color: var(--blue);
  background: #f7fbfd;
}

.option-btn.selected {
  border-color: var(--teal);
  background: #eef6f9;
}

.option-letter {
  color: var(--teal);
  font-weight: 900;
  flex: 0 0 24px;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-header {
  margin-bottom: 20px;
}

.result-header h1 {
  font-size: clamp(34px, 4vw, 52px);
  margin-bottom: 22px;
}

.result-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fbfdfe;
}

.badge span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.badge strong {
  display: block;
  font-size: 16px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.result-grid .card {
  padding: 22px;
}

.wide-card {
  grid-column: 1 / -1;
}

.cleaner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.cleaner-grid > div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdfe;
}

.next-step-card {
  border-color: var(--teal);
}

.debug-panel {
  box-shadow: none;
  background: #f8fafb;
}

.debug-panel summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--teal);
}

pre {
  white-space: pre-wrap;
  background: #101820;
  color: #d7f5ff;
  border-radius: 12px;
  padding: 16px;
  overflow-x: auto;
  font-size: 12px;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1080px);
    padding-top: 14px;
  }

  .brand-header {
    align-items: flex-start;
    gap: 14px;
  }

  .brand-name {
    font-size: 19px;
  }

  .intro-grid,
  .result-grid,
  .result-badges,
  .cleaner-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }

  .nav-row {
    flex-direction: column-reverse;
  }

  .nav-row button,
  #startBtn,
  #restartBtn {
    width: 100%;
  }
}
