:root {
  --ink: #17212b;
  --muted: #5b6773;
  --paper: #f5f7f8;
  --white: #ffffff;
  --line: #d9e0e6;
  --blue: #1d5f8f;
  --blue-dark: #123c5b;
  --green: #2f7d62;
  --gold: #c77b2a;
  --red: #a64b3c;
  --shadow: 0 16px 44px rgba(23, 33, 43, 0.13);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 14px max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--blue-dark);
  color: var(--white);
  font-weight: 850;
  font-size: 0.86rem;
}

.brand strong,
.brand em {
  display: block;
}

.brand strong {
  color: var(--blue-dark);
}

.brand em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

nav {
  display: flex;
  gap: 20px;
  font-weight: 750;
  color: #334657;
}

nav a {
  text-decoration: none;
}

main > section {
  padding: 76px max(20px, calc((100vw - var(--max)) / 2));
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(18, 60, 91, 0.96), rgba(23, 33, 43, 0.94)),
    radial-gradient(circle at 85% 18%, rgba(47, 125, 98, 0.55), transparent 34%);
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero .eyebrow {
  color: #b8e3cf;
}

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

h1 {
  margin-bottom: 22px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.hero p {
  color: #dce7ef;
  font-size: 1.12rem;
}

.hero-actions,
.next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.send-status {
  width: 100%;
  margin: 2px 0 0;
  color: #d3dee7;
  font-size: 0.92rem;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--blue);
  color: var(--white);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: var(--white);
  border-color: var(--line);
  color: var(--blue-dark);
}

.button.full {
  width: 100%;
}

.hero-card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.hero-card ul {
  margin: 0;
  padding-left: 20px;
  color: #e8f0f5;
}

.hero-card li + li {
  margin-top: 10px;
}

.instructions {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  background: var(--paper);
  border-block: 1px solid var(--line);
}

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

#scaleList {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  list-style: none;
}

#scaleList li {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

#scaleList strong {
  color: var(--blue-dark);
  font-size: 1.4rem;
}

.diagnostic-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

.progress-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(23, 33, 43, 0.08);
}

progress {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
}

progress::-webkit-progress-bar {
  background: var(--paper);
}

progress::-webkit-progress-value {
  background: var(--green);
}

progress::-moz-progress-bar {
  background: var(--green);
}

.question-form {
  display: grid;
  gap: 22px;
}

.dimension {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}

.dimension-header {
  padding: 24px;
  background: linear-gradient(135deg, #eef6fb, #ffffff);
  border-bottom: 1px solid var(--line);
}

.dimension-header h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.dimension-header p {
  margin-bottom: 0;
  color: var(--muted);
}

.question {
  padding: 22px 24px;
  display: grid;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.question:last-child {
  border-bottom: 0;
}

.question legend {
  padding: 0;
  font-weight: 750;
}

.rating-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.rating-row label {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
}

.rating-row input {
  accent-color: var(--blue);
}

.rating-row label:has(input:checked) {
  border-color: var(--blue);
  background: #eaf4fb;
  color: var(--blue-dark);
  font-weight: 800;
}

.rating-number {
  font-size: 1.1rem;
  font-weight: 850;
}

.rating-label {
  font-size: 0.78rem;
  text-align: center;
}

.results-section {
  background: var(--paper);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 30px;
}

.section-heading p:last-child {
  color: var(--muted);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.score-card {
  min-height: 210px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.score-label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.score-card strong {
  display: block;
  margin: 10px 0;
  color: var(--blue-dark);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1;
}

.score-card p {
  color: var(--muted);
}

.chart-wrap {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

canvas {
  display: block;
  width: 100%;
  max-width: 100%;
}

.recommendations {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.recommendation {
  padding: 22px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--white);
}

.recommendation.priority {
  border-left-color: var(--gold);
}

.recommendation h3 {
  margin-bottom: 8px;
}

.recommendation p {
  margin-bottom: 10px;
  color: var(--muted);
}

.recommendation strong {
  color: var(--blue-dark);
}

.next-steps {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  background: var(--ink);
  color: var(--white);
}

.next-steps p {
  color: #d3dee7;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px max(20px, calc((100vw - var(--max)) / 2));
  background: #101820;
  color: #bac4cc;
}

@media (max-width: 900px) {
  .site-header,
  nav,
  .hero,
  .instructions,
  .diagnostic-layout,
  .results-grid,
  .next-steps {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  #scaleList {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  main > section {
    padding-block: 54px;
  }

  .rating-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-header,
  .hero-actions,
  .progress-panel,
  .next-actions,
  .question-form {
    display: none;
  }

  body {
    color: #000;
  }

  main > section {
    padding: 24px 0;
  }

  .hero,
  .next-steps {
    color: #000;
    background: #fff;
  }

  .results-section {
    background: #fff;
  }
}
