:root {
  --ink: #13201d;
  --muted: #68746f;
  --surface: #ffffff;
  --surface-soft: #f6f8f6;
  --line: #d9dfdc;
  --teal: #116d70;
  --teal-dark: #0b4d50;
  --green: #229a59;
  --green-bg: #e8f7ee;
  --yellow: #c99a13;
  --yellow-bg: #fff4c7;
  --orange: #dc6b21;
  --orange-bg: #ffead8;
  --red: #c93636;
  --red-bg: #ffe3e3;
  --shadow: 0 16px 40px rgba(17, 32, 29, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-soft);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img,
svg {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: var(--teal);
  border-radius: 50%;
}

.brand-mark svg,
.mini-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 10px 13px;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--teal-dark);
  background: #e8f3f1;
}

.main-nav .nav-cta {
  color: #ffffff;
  background: var(--teal);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta.is-active {
  color: #ffffff;
  background: var(--teal-dark);
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.hero {
  position: relative;
  min-height: clamp(560px, calc(100svh - 138px), 760px);
  overflow: hidden;
  background: #eef4f2;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(246, 250, 248, 0.98) 0%, rgba(246, 250, 248, 0.9) 34%, rgba(246, 250, 248, 0.24) 68%, rgba(246, 250, 248, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.12));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: inherit;
  width: min(680px, calc(100% - 36px));
  padding: clamp(36px, 7vw, 92px) clamp(18px, 7vw, 88px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.hero h1,
.form-intro h1,
.auth-panel h1,
.report-empty h1 {
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 6vw, 5.75rem);
  line-height: 0.96;
  max-width: 10ch;
}

.hero p:not(.eyebrow) {
  max-width: 660px;
  margin-bottom: 28px;
  color: #2f3b37;
  font-size: clamp(1.05rem, 2vw, 1.36rem);
  line-height: 1.55;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

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

.button.primary {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 10px 22px rgba(17, 109, 112, 0.22);
}

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

.button.secondary,
.button.ghost {
  color: var(--teal-dark);
  background: #ffffff;
  border-color: var(--line);
}

.button.ghost {
  align-self: flex-start;
}

.button.full {
  width: 100%;
}

.phase-preview,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.phase-preview {
  padding: clamp(28px, 5vw, 56px) 0;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.section-heading h2,
.panel-title h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

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

.mini-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--teal-dark);
  background: #e8f3f1;
  border-radius: 50%;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.phase-card {
  min-height: 120px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.phase-card strong,
.phase-card span {
  display: block;
}

.phase-card strong {
  margin-bottom: 9px;
  font-size: 1.15rem;
}

.phase-card span {
  color: #3c4743;
}

.phase-card.green {
  border-top: 6px solid var(--green);
  background: var(--green-bg);
}

.phase-card.yellow {
  border-top: 6px solid var(--yellow);
  background: var(--yellow-bg);
}

.phase-card.orange {
  border-top: 6px solid var(--orange);
  background: var(--orange-bg);
}

.phase-card.red {
  border-top: 6px solid var(--red);
  background: var(--red-bg);
}

.page-shell {
  padding: clamp(26px, 5vw, 56px) 0;
}

.form-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.form-intro h1 {
  max-width: 18ch;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
}

.form-intro p:not(.eyebrow) {
  max-width: 880px;
  color: #33413c;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.55;
}

.assessment-form {
  display: grid;
  gap: 24px;
}

.form-panel {
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.panel-title small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-grid {
  display: grid;
  align-items: start;
  gap: 22px;
  margin-bottom: 22px;
}

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

.field-grid:last-child {
  margin-bottom: 0;
}

.field-grid .field {
  margin-bottom: 0;
}

.field {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  margin-bottom: 22px;
  font-weight: 800;
}

.field > span {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
  line-height: 1.2;
}

.field:last-child {
  margin-bottom: 0;
}

.field small {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 700;
}

.field input,
.field select {
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  min-height: 0;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  outline: none;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2313201d' d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 18px;
  padding-right: 46px;
}

.field input[type="number"] {
  appearance: textfield;
}

.field input[type="number"]::-webkit-inner-spin-button,
.field input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.field input::placeholder {
  color: #7b8581;
}

.field input:focus,
.field select:focus,
.chip input:focus-visible + span,
.button:focus-visible,
.main-nav a:focus-visible {
  border-color: var(--teal);
  outline: 3px solid rgba(17, 109, 112, 0.2);
  outline-offset: 2px;
}

.choice-group {
  padding: 0;
  margin: 0 0 24px;
  border: 0;
}

.choice-group:last-child {
  margin-bottom: 0;
}

.choice-group legend {
  margin-bottom: 12px;
  font-size: 1.08rem;
  font-weight: 800;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
}

.chip input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 17px;
  color: #17221f;
  border: 1px solid #d3d8d4;
  border-radius: 999px;
  background: #f3f3ec;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.15;
}

.chip input:checked + span {
  color: #ffffff;
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: 0 8px 18px rgba(17, 109, 112, 0.18);
}

.form-actions {
  padding-bottom: 6px;
}

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

.report-empty,
.auth-panel,
.report-summary,
.report-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.report-empty {
  padding: clamp(28px, 5vw, 48px);
}

.report-empty h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.report-summary {
  overflow: hidden;
}

.report-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
}

.report-hero.green {
  background: linear-gradient(135deg, var(--green-bg), #ffffff);
}

.report-hero.yellow {
  background: linear-gradient(135deg, var(--yellow-bg), #ffffff);
}

.report-hero.orange {
  background: linear-gradient(135deg, var(--orange-bg), #ffffff);
}

.report-hero.red {
  background: linear-gradient(135deg, var(--red-bg), #ffffff);
}

.phase-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 900;
}

.phase-badge.green {
  background: var(--green);
}

.phase-badge.yellow {
  color: #2f2400;
  background: #f0c647;
}

.phase-badge.orange {
  background: var(--orange);
}

.phase-badge.red {
  background: var(--red);
}

.report-hero h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.report-hero p {
  color: #33413c;
  line-height: 1.55;
}

.score-meter {
  align-self: center;
  padding: 20px;
  border: 1px solid rgba(19, 32, 29, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
}

.score-value {
  display: block;
  margin-bottom: 10px;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
}

.meter-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green) 0 25%, var(--yellow) 25% 50%, var(--orange) 50% 75%, var(--red) 75% 100%);
}

.meter-fill {
  height: 100%;
  width: var(--meter-width, 0%);
  border-right: 3px solid #ffffff;
  background: rgba(19, 32, 29, 0.45);
}

.report-section {
  padding: clamp(20px, 4vw, 30px);
  box-shadow: none;
}

.report-section h2 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}

.finding-list,
.action-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.finding-list li,
.action-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
}

.phase-legend {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.legend-item {
  padding: 12px;
  border-radius: var(--radius);
  font-weight: 800;
}

.legend-item span {
  display: block;
  margin-top: 4px;
  color: #48534f;
  font-size: 0.9rem;
  font-weight: 700;
}

.legend-item.green {
  background: var(--green-bg);
}

.legend-item.yellow {
  background: var(--yellow-bg);
}

.legend-item.orange {
  background: var(--orange-bg);
}

.legend-item.red {
  background: var(--red-bg);
}

.auth-page {
  min-height: calc(100svh - 146px);
  background:
    linear-gradient(120deg, rgba(17, 109, 112, 0.92), rgba(35, 154, 89, 0.84)),
    url("assets/ckd-hero.png") center right / cover;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100svh - 146px);
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 16px;
}

.auth-panel {
  width: min(470px, 100%);
  padding: clamp(24px, 5vw, 38px);
}

.auth-panel h1 {
  max-width: none;
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

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

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.auth-form .field {
  margin-bottom: 0;
}

.auth-options,
.auth-switch {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.94rem;
}

.auth-options a,
.auth-switch a,
.site-footer a {
  color: var(--teal-dark);
  font-weight: 800;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.demo-note {
  min-height: 22px;
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #ffffff;
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: 78svh;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(246, 250, 248, 0.98) 0%, rgba(246, 250, 248, 0.86) 46%, rgba(246, 250, 248, 0.26) 100%);
  }

  .hero img {
    object-position: 65% center;
  }

  .hero-content {
    justify-content: flex-start;
    padding-top: 52px;
  }

  .phase-grid,
  .phase-legend,
  .field-grid.two,
  .report-hero {
    grid-template-columns: 1fr;
  }

  .form-intro {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: auto;
    padding: 12px 14px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .main-nav {
    gap: 6px;
  }

  .main-nav a {
    padding: 9px 10px;
    font-size: 0.92rem;
  }

  .hero h1,
  .form-intro h1 {
    max-width: 12ch;
  }

  .button {
    width: 100%;
  }

  .chip-row {
    gap: 9px;
  }

  .chip,
  .chip span {
    width: 100%;
  }

  .form-panel {
    padding: 18px;
  }

  .auth-options,
  .site-footer {
    flex-direction: column;
  }
}
