:root {
  color-scheme: light;
  --wko-red: #e30613;
  --wko-red-dark: #aa000d;
  --wko-yellow: #ffd200;
  --ink: #1d1d1f;
  --muted: #5d6573;
  --line: #d8dde6;
  --soft: #f3f5f8;
  --paper: #ffffff;
  --green: #0f8a5f;
  --shadow: 0 18px 50px rgba(20, 31, 48, 0.1);
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  z-index: 20;
}

.skip-link:focus {
  top: 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: white;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 92px;
  height: auto;
  object-fit: contain;
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.top-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.top-status strong {
  display: inline-grid;
  place-items: center;
  min-width: 70px;
  min-height: 40px;
  background: var(--wko-red);
  color: white;
}

.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 46px) clamp(18px, 4vw, 32px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
  padding: 24px 0 30px;
}

.hero h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(2.3rem, 6vw, 5rem);
  line-height: 1;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: #384150;
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions,
.workspace-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-score,
.score-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 6px solid var(--wko-red);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-score strong,
.score-summary strong {
  display: block;
  margin: 8px 0;
  color: var(--wko-red);
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
}

.overview-section {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.section-head,
.progress-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2,
.progress-row h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
}

.progress-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: max-content;
  background: #fff4b3;
  color: #4f3b00;
  padding: 4px 9px;
  font-size: 0.84rem;
  font-weight: 800;
}

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

.overview-card {
  display: grid;
  grid-template-rows: auto minmax(44px, auto) auto;
  min-height: 140px;
  border: 1px solid var(--line);
  background: white;
  padding: 14px;
  min-width: 0;
}

.number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--soft);
  font-weight: 800;
}

.overview-card h3 {
  margin: 12px 0 8px;
  font-size: clamp(0.88rem, 0.9vw, 1rem);
  line-height: 1.18;
  overflow-wrap: normal;
}

.overview-card footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.88rem;
}

.check-view {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
}

.stepper {
  align-self: start;
  position: sticky;
  top: 104px;
}

.link-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  background: white;
  color: var(--wko-red);
  font-weight: 800;
  margin-bottom: 12px;
}

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

.dimension-stepper button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-align: left;
}

.dimension-stepper button.is-active {
  border-color: var(--wko-red);
  box-shadow: inset 4px 0 0 var(--wko-red);
}

.dimension-intro {
  max-width: 720px;
  margin: 8px 0 0;
  color: #384150;
  line-height: 1.5;
}

.progress-meter {
  min-width: 190px;
  color: var(--muted);
  font-weight: 700;
}

.meter-track {
  height: 8px;
  margin-top: 8px;
  background: var(--soft);
  overflow: hidden;
}

.meter-track div {
  width: 0;
  height: 100%;
  background: var(--wko-red);
  transition: width 180ms ease;
}

.advisor-context,
.advisor-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 16px;
}

.advisor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--ink);
  resize: vertical;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  background: white;
  padding: clamp(16px, 2.5vw, 22px);
}

.question-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.question-card p {
  margin: 0;
  color: #384150;
  line-height: 1.5;
}

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

.scale button {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 62px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.scale button strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.scale button.is-selected {
  border-color: var(--wko-red);
  background: var(--wko-red);
  color: white;
}

.scale button.is-selected strong {
  color: white;
}

.evidence {
  display: none;
}

.advisor .evidence {
  display: block;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 2px solid var(--wko-red);
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  background: var(--wko-red);
  color: white;
}

.secondary-button {
  background: white;
  color: var(--wko-red);
}

.primary-button:focus,
.primary-button:hover {
  background: var(--wko-red-dark);
  border-color: var(--wko-red-dark);
}

.secondary-button:focus,
.secondary-button:hover,
.link-button:focus,
.link-button:hover {
  background: #fff3f3;
}

.workspace-actions {
  justify-content: space-between;
}

.results-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.score-summary p {
  color: #384150;
  line-height: 1.5;
}

.radar-panel {
  border: 1px solid var(--line);
  background: white;
  padding: 18px;
}

.radar-panel h3,
.dimension-results-section h3 {
  margin: 0 0 14px;
}

.radar-chart {
  width: 100%;
  min-height: 430px;
}

.radar-chart svg {
  display: block;
  width: 100%;
  max-height: 560px;
}

.radar-ring {
  fill: none;
  stroke: #dfe3eb;
  stroke-width: 1.4;
}

.radar-axis {
  stroke: #c7ced9;
  stroke-width: 1;
}

.radar-value {
  fill: rgba(227, 6, 19, 0.2);
  stroke: var(--wko-red);
  stroke-width: 4;
}

.radar-dot {
  fill: var(--wko-red);
  stroke: white;
  stroke-width: 3;
}

.radar-label {
  fill: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.radar-center {
  fill: var(--wko-red);
  font-size: 32px;
  font-weight: 800;
}

.dimension-results-section,
.actions-band {
  margin-top: 28px;
}

.dimension-results,
.recommendations {
  display: grid;
  gap: 10px;
}

.result-row,
.recommendation {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 14px;
  background: white;
}

.result-row header,
.recommendation header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.bar {
  height: 12px;
  background: var(--soft);
}

.bar div {
  height: 100%;
  background: var(--wko-red);
}

.recommendation p {
  margin: 0;
  color: #384150;
  line-height: 1.45;
}

.export-actions {
  justify-content: flex-end;
}

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

@media (max-width: 1120px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar,
  .footer,
  .progress-row,
  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .top-status {
    width: 100%;
    justify-content: space-between;
  }

  .hero,
  .check-view,
  .results-layout,
  .advisor-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .stepper {
    position: static;
  }

  .dimension-stepper {
    grid-template-columns: 1fr;
  }

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

  .radar-chart {
    min-height: 300px;
  }

  .radar-label {
    font-size: 12px;
  }
}

@media (max-width: 560px) {
  .brand-logo {
    width: 74px;
  }

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

  .hero-actions,
  .workspace-actions,
  .export-actions {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media print {
  .topbar,
  .stepper,
  .workspace-actions,
  .export-actions,
  .footer,
  .skip-link,
  #landingView,
  #checkView {
    display: none !important;
  }

  #resultsView {
    display: block !important;
    max-width: none;
    padding: 12px;
  }

  .score-summary,
  .radar-panel,
  .recommendation,
  .result-row {
    box-shadow: none;
    break-inside: avoid;
  }
}
