:root {
  --lunar: #FDFCFB;
  --arena: #F5F1EA;
  --dark: #333333;
  --deep: #123F35;
  --forest: #2F5D50;
  --gold: #B99A5F;
  --sage: #D8E4D6;
  --coral: #FF8360;
  --white: #FFFFFF;
  --border: rgba(18,63,53,.14);
  --shadow: 0 18px 46px rgba(18,63,53,.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 5%, rgba(216,228,214,.75), transparent 28rem),
    var(--lunar);
  color: var(--dark);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.kd-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.kd-topbar {
  width: 100%;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: var(--deep);
  color: var(--white);
}

.kd-topbar-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kd-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.kd-brand img {
  display: block;
  width: auto;
  max-width: 165px;
  max-height: 46px;
  object-fit: contain;
}

.kd-topbar-note {
  color: rgba(255,255,255,.76);
  font-size: 13px;
  text-align: right;
}

.kd-main {
  flex: 1;
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.kd-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}

.kd-screen {
  display: none;
  min-height: 620px;
  padding: clamp(28px, 5vw, 56px);
}

.kd-screen.is-active { display: block; }

.kd-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--sage);
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--deep);
  line-height: 1.15;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(36px, 6vw, 66px);
  letter-spacing: -.03em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.02em;
}

h3 { font-size: 22px; }

p { margin-top: 0; }

.kd-lead {
  max-width: 760px;
  color: #555;
  font-size: clamp(17px, 2.4vw, 20px);
}

.kd-story {
  max-width: 760px;
  margin: 28px 0;
  padding: 24px;
  border-left: 5px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--arena);
}

.kd-story p:last-child { margin-bottom: 0; }

.kd-story-question {
  color: var(--deep);
  font-size: 21px;
  font-weight: 800;
}

.kd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 28px;
}

.kd-badge {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--lunar);
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
}

.kd-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.kd-btn {
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.kd-btn:focus-visible {
  outline: 3px solid rgba(255,131,96,.32);
  outline-offset: 3px;
}

.kd-btn-primary {
  background: var(--coral);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(255,131,96,.24);
}

.kd-btn-primary:hover { background: #f67251; }

.kd-btn-secondary {
  border-color: var(--deep);
  background: transparent;
  color: var(--deep);
}

.kd-btn-secondary:hover { background: var(--sage); }

.kd-btn-deep {
  background: var(--deep);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(18,63,53,.20);
}

.kd-btn-deep:hover { background: var(--forest); }

.kd-progress-wrap { margin-bottom: 34px; }

.kd-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
}

.kd-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sage);
}

.kd-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--forest), var(--gold));
  transition: width .25s ease;
}

.kd-question-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.kd-question-area {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kd-question-title {
  margin-bottom: 10px;
  color: var(--deep);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
}

.kd-question-help {
  margin-bottom: 24px;
  color: #6a6a6a;
  font-size: 15px;
}

.kd-options {
  display: grid;
  gap: 12px;
}

.kd-option {
  position: relative;
  display: block;
}

.kd-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.kd-option-card {
  display: block;
  padding: 17px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--lunar);
  color: var(--dark);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.kd-option-card strong {
  display: block;
  color: var(--deep);
  font-size: 16px;
}

.kd-option-card span {
  display: block;
  margin-top: 4px;
  color: #6f6f6f;
  font-size: 14px;
}

.kd-option:hover .kd-option-card {
  transform: translateY(-1px);
  border-color: rgba(47,93,80,.5);
  box-shadow: 0 8px 20px rgba(18,63,53,.06);
}

.kd-option input:checked + .kd-option-card {
  border-color: var(--deep);
  background: var(--sage);
  box-shadow: inset 0 0 0 1px var(--deep);
}

.kd-option input:focus-visible + .kd-option-card {
  outline: 3px solid rgba(255,131,96,.32);
  outline-offset: 3px;
}

.kd-question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.kd-inline-note {
  margin-top: 16px;
  color: #707070;
  font-size: 13px;
}

.kd-partial-card,
.kd-result-card,
.kd-recommend-card {
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.kd-partial-card {
  background: linear-gradient(145deg, rgba(216,228,214,.75), rgba(255,255,255,.98));
}

.kd-result-card { background: var(--arena); }

.kd-result-name {
  margin: 8px 0 12px;
  color: var(--deep);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.1;
}

.kd-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin-top: 22px;
}

.kd-mini-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  border: 1px solid var(--border);
}

.kd-mini-box span {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kd-mini-box strong { color: var(--deep); }

.kd-lead-form {
  max-width: 660px;
  margin: 28px auto 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(18,63,53,.07);
}

.kd-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}

.kd-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kd-field label {
  color: var(--deep);
  font-weight: 800;
  font-size: 14px;
}

.kd-field input[type="text"],
.kd-field input[type="email"] {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--lunar);
  color: var(--dark);
  outline: none;
}

.kd-field input:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(47,93,80,.12);
}

.kd-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  color: #555;
  font-size: 13px;
}

.kd-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--deep);
}

.kd-form-error {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #ffc8b8;
  border-radius: 10px;
  background: #fff2ee;
  color: #8b321d;
  font-size: 13px;
  font-weight: 700;
}

.kd-result-layout {
  display: grid;
  gap: 20px;
}

.kd-stage-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: var(--white);
  color: #555;
}

.kd-result-section {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
}

.kd-result-section h3 { margin-bottom: 10px; }
.kd-result-section ul { margin: 0; padding-left: 20px; }

.kd-bars {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.kd-bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 48px 110px;
  gap: 10px;
  align-items: center;
}

.kd-bar-row strong {
  color: var(--deep);
  font-size: 13px;
}

.kd-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--sage);
}

.kd-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--forest);
  transition: width .5s ease;
}

.kd-bar-value {
  color: var(--forest);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.kd-status {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--lunar);
  border: 1px solid var(--border);
  color: var(--forest);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.kd-recommend-card {
  background: var(--deep);
  color: var(--white);
}

.kd-recommend-card h2,
.kd-recommend-card h3 { color: var(--white); }

.kd-recommend-kicker {
  color: var(--sage);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kd-recommend-name {
  margin: 8px 0 12px;
  color: var(--white);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
}

.kd-recommend-reason {
  color: rgba(255,255,255,.82);
}

.kd-recommend-list {
  margin: 18px 0 0;
  padding-left: 20px;
  color: rgba(255,255,255,.88);
}

.kd-recommend-card .kd-btn-secondary {
  border-color: rgba(255,255,255,.55);
  color: var(--white);
}

.kd-recommend-card .kd-btn-secondary:hover {
  background: rgba(255,255,255,.08);
}

.kd-footer {
  padding: 26px 16px;
  background: var(--deep);
  color: rgba(255,255,255,.72);
  text-align: center;
  font-size: 13px;
}

.kd-footer strong { color: var(--white); }

@media (max-width: 820px) {
  .kd-bar-row {
    grid-template-columns: 1fr 50px;
  }
  .kd-bar-row strong,
  .kd-status {
    grid-column: 1 / -1;
  }
  .kd-status { justify-self: start; }
}

@media (max-width: 720px) {
  .kd-topbar-note { display: none; }
  .kd-main { width: min(100% - 18px, 980px); padding-top: 18px; }
  .kd-shell { border-radius: 18px; }
  .kd-screen { min-height: 560px; padding: 24px 18px 30px; }
  .kd-form-grid, .kd-mini-grid { grid-template-columns: 1fr; }
  .kd-question-actions, .kd-button-row { flex-direction: column; align-items: stretch; }
  .kd-btn { width: 100%; }
}
