:root {
  color-scheme: light;
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-soft: #eef5f8;
  --ink: #17232b;
  --text: #24343d;
  --muted: #61727d;
  --line: #d6e0e6;
  --brand: #155c85;
  --brand-strong: #0f4868;
  --brand-soft: #dcecf3;
  --brand-gold: #d6bd10;
  --brand-gold-soft: #fff8d6;
  --accent: #b9272f;
  --driver: #ce202f;
  --socializer: #d6bd10;
  --analyzer: #2057a8;
  --empathizer: #138f55;
  --shadow: 0 16px 36px rgba(21, 92, 133, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(220, 236, 243, 0.7) 0, rgba(244, 247, 249, 0) 320px),
    var(--bg);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 0 16px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
.button:hover {
  background: var(--brand-strong);
  text-decoration: none;
}

button.secondary,
.button.secondary {
  background: #ffffff;
  color: var(--brand);
}

button.secondary:hover,
.button.secondary:hover {
  background: var(--brand-soft);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 9px clamp(16px, 4vw, 34px);
  border-top: 4px solid var(--brand);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 24px rgba(21, 92, 133, 0.08);
}

.brand,
.footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.topbar nav a {
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  font-weight: 850;
}

.topbar nav a.is-active,
.topbar nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}

main,
.site-footer {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

main {
  padding: 28px 0 62px;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.assessment-main,
.survey-form,
.result-detail,
.band {
  display: grid;
  gap: 16px;
}

.intro-band,
.page-hero,
.model-band,
.info-card,
.detail-panel,
.result-facts,
.metric-card,
.survey-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-band,
.page-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: end;
  padding: 22px;
  background:
    linear-gradient(135deg, #ffffff 0%, #e7f2f7 68%, var(--brand-gold-soft) 100%);
}

.page-hero {
  margin-bottom: 20px;
}

.style-hero {
  border-top-width: 5px;
}

.style-driver {
  border-top-color: var(--driver);
}

.style-socializer {
  border-top-color: var(--socializer);
}

.style-analyzer {
  border-top-color: var(--analyzer);
}

.style-empathizer {
  border-top-color: var(--empathizer);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.12;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

h3 {
  font-size: 1.05rem;
}

p {
  margin: 0;
  line-height: 1.52;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.04rem;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.survey-context {
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--brand-soft);
  line-height: 1.48;
}

.survey-context span {
  display: block;
  color: var(--muted);
}

.scale-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 8px;
}

.scale-strip span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #ffffff;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.survey-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
}

.question-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.statement-pair,
.slider-choice-row {
  display: grid;
  gap: 10px;
}

.slider-choice-row {
  align-items: center;
}

.statement {
  line-height: 1.45;
}

.statement.first {
  color: var(--ink);
  font-weight: 800;
}

.statement.second {
  color: var(--muted);
}

.score-slider {
  --percent: 33.333%;
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
}

.score-slider-heading,
.score-balance {
  font-size: 0.82rem;
}

.score-slider-heading {
  color: var(--brand);
  font-weight: 900;
  text-transform: uppercase;
}

.score-slider-control {
  position: relative;
  display: block;
  padding-top: 30px;
}

.score-value {
  position: absolute;
  top: 0;
  left: clamp(16px, var(--percent), calc(100% - 16px));
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
}

.score-value::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--brand);
}

.score-slider input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 42px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.score-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0 var(--percent), var(--line) var(--percent) 100%);
}

.score-slider input[type="range"]::-moz-range-track {
  height: 9px;
  border-radius: 999px;
  background: var(--line);
}

.score-slider input[type="range"]::-moz-range-progress {
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
}

.score-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: -9.5px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--brand-strong);
  box-shadow: 0 4px 12px rgba(21, 92, 133, 0.28);
}

.score-slider input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--brand-strong);
  box-shadow: 0 4px 12px rgba(21, 92, 133, 0.28);
}

.score-slider input[type="range"]:focus-visible {
  outline: 3px solid rgba(21, 92, 133, 0.28);
  outline-offset: 4px;
}

.score-ticks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.score-ticks span:nth-child(2),
.score-ticks span:nth-child(3) {
  text-align: center;
}

.score-ticks span:last-child {
  text-align: right;
}

.score-balance {
  color: var(--muted);
  font-weight: 800;
}

.action-row {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: stretch;
  padding: 14px 0;
  background: var(--bg);
}

.action-row button {
  flex: 1 1 180px;
}

.quadrant-chart {
  --x: 0%;
  --y: 100%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.quadrant {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #ffffff;
  font-size: clamp(0.68rem, 1.8vw, 0.92rem);
  font-weight: 900;
  text-align: center;
}

.quadrant.empathizer {
  background: var(--empathizer);
}

.quadrant.socializer {
  background: var(--socializer);
  color: #1f2707;
}

.quadrant.analyzer {
  background: var(--analyzer);
}

.quadrant.driver {
  background: var(--driver);
}

.axis-x,
.axis-y {
  position: absolute;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.axis-x {
  right: 8px;
  bottom: 8px;
}

.axis-y {
  top: 8px;
  left: 8px;
}

.result-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.55);
}

.score-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.score-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

dd {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
  text-align: right;
}

.mini-actions {
  display: flex;
}

.mini-actions .button {
  width: 100%;
}

.result-detail,
.two-col,
.three-col,
.detail-grid,
.metric-grid,
.card-grid,
.result-heading,
.result-layout {
  display: grid;
  gap: 16px;
}

.result-detail {
  margin-top: 28px;
}

.result-detail[hidden] {
  display: none;
}

.result-heading,
.result-layout {
  align-items: start;
}

.result-facts {
  padding: 18px;
}

.info-card,
.detail-panel,
.metric-card,
.model-band {
  padding: 18px;
}

.info-card h2,
.detail-panel h2,
.band h2 {
  margin-top: 0;
}

.style-preview {
  border-top-width: 5px;
}

.clean-list,
.info-card ul,
.detail-panel ul {
  padding-left: 1.1rem;
  line-height: 1.5;
}

.clean-list li + li,
.info-card li + li,
.detail-panel li + li {
  margin-top: 7px;
}

.metric-grid,
.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.metric-card span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-weight: 900;
}

.model-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.model-chart {
  max-width: 520px;
  width: 100%;
  justify-self: center;
}

.site-footer {
  padding: 24px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-lockup img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
}

.site-footer p {
  margin-top: 8px;
  font-size: 0.92rem;
}

@media (min-width: 760px) {
  .intro-band,
  .page-hero {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .survey-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .slider-choice-row {
    grid-template-columns: minmax(180px, 1fr) minmax(260px, 0.9fr) minmax(180px, 1fr);
    gap: 18px;
  }

  .statement.second {
    text-align: right;
  }

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

  .three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .result-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .result-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(260px, 1.1fr);
  }

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

@media (min-width: 1040px) {
  .tool-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
  }

  .brand span {
    font-size: 0.95rem;
  }
}
