:root {
  --blue-900: #163a63;
  --blue-700: #1f5d9a;
  --blue-600: #256fb8;
  --green-600: #167d68;
  --red-600: #c83232;
  --ink: #17212f;
  --muted: #607086;
  --line: #d9e2ec;
  --surface: #ffffff;
  --background: #eef3f8;
  --shadow: 0 18px 50px rgba(22, 58, 99, 0.12);
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  background: var(--blue-900);
  color: #fff;
}

.brand-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}

.brand-logo {
  width: clamp(58px, 9vw, 82px);
  height: auto;
  flex: 0 0 auto;
  display: block;
  border-radius: 8px;
  background: #fff;
}

.brand-copy {
  min-width: 0;
}

.brand-copy .eyebrow {
  margin: 0;
  color: #dbe8f3;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.15;
}

.hero-banner {
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-banner-image {
  display: block;
  width: 100%;
  object-fit: contain;
  aspect-ratio: 1376 / 768;
  background: #0f345f;
}

.hero-banner-fallback {
  display: none;
  margin: 0;
  padding: clamp(22px, 5vw, 42px);
  background: var(--blue-900);
  color: #fff;
  font-size: clamp(1.45rem, 4vw, 2.4rem);
  font-weight: 900;
  line-height: 1.12;
  text-align: center;
}

.hero-banner.banner-missing .hero-banner-image {
  display: none;
}

.hero-banner.banner-missing .hero-banner-fallback {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.78;
}

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

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.app-shell {
  width: min(860px, calc(100% - 28px));
  margin: 28px auto 56px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.intro-panel,
.form-panel,
.question-panel,
.result-panel,
.loading-panel,
.data-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-panel,
.form-panel,
.question-panel,
.result-panel,
.loading-panel {
  padding: clamp(20px, 4vw, 34px);
}

.intro-panel {
  margin-top: 18px;
}

.intro-panel h2,
.section-heading h2,
.question-panel h2,
.loading-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.intro-panel p,
.result-panel p,
.loading-panel p {
  color: var(--muted);
  line-height: 1.65;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading .eyebrow {
  color: var(--blue-700);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  font-weight: 750;
}

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 3px solid rgba(37, 111, 184, 0.22);
  border-color: var(--blue-600);
}

.privacy-card {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #c8d7e4;
  border-radius: 8px;
  background: #f7fafc;
}

.privacy-card h3 {
  margin: 0 0 10px;
  color: var(--blue-900);
  font-size: 1.08rem;
  line-height: 1.25;
}

.privacy-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.55;
}

.privacy-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  margin-top: 14px;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.45;
}

.privacy-check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--green-600);
}

.field select:disabled {
  background: #eef2f6;
  color: #7a8899;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 8px;
  border: 0;
  padding: 0 20px;
  font-weight: 850;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.primary-button {
  width: 100%;
  color: #fff;
  background: var(--green-600);
  box-shadow: 0 10px 24px rgba(22, 125, 104, 0.22);
}

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

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  color: var(--blue-900);
  background: #e7edf4;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
  margin-top: 18px;
}

.form-message {
  min-height: 24px;
  margin: 4px 0 16px;
  color: var(--red-600);
  font-weight: 750;
  line-height: 1.4;
}

.data-list {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) 1fr;
  gap: 0;
  margin: 0;
  overflow: hidden;
}

.data-list dt,
.data-list dd {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.data-list dt {
  background: #f5f8fb;
  color: var(--muted);
  font-weight: 850;
}

.data-list dd {
  font-weight: 750;
}

.data-list dt:last-of-type,
.data-list dd:last-of-type {
  border-bottom: 0;
}

.progress-area {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--blue-900);
  font-weight: 850;
}

.progress-track {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d5e1ec;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green-600);
  transition: width 0.2s ease;
}

.section-description {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.question-id {
  margin: 0 0 6px;
  color: var(--blue-700);
  font-weight: 900;
}

.options-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.option-card {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  line-height: 1.45;
}

.option-card.selected {
  border-color: var(--green-600);
  background: #e9f7f3;
  box-shadow: inset 0 0 0 1px var(--green-600);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 14px 0 0;
  background: linear-gradient(to top, var(--background) 82%, rgba(238, 243, 248, 0));
}

.loading-panel {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #d6e2ec;
  border-top-color: var(--green-600);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-grid,
.section-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.orientation-card {
  border: 2px solid rgba(22, 125, 104, 0.42);
  border-radius: 8px;
  padding: clamp(18px, 4vw, 28px);
  background: #e9f7f3;
  margin-bottom: 18px;
}

.orientation-card p {
  margin: 0;
  color: var(--blue-900);
}

.orientation-card h3 {
  margin: 10px 0 0;
  color: var(--green-600);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.orientation-card-label {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  margin-bottom: 12px !important;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--green-600) !important;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.score-box {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f7fafc;
}

.score-box-highlighted {
  border: 2px solid var(--green-600);
  background: #e9f7f3;
  box-shadow: 0 12px 28px rgba(22, 125, 104, 0.12);
}

.score-badge {
  display: inline-flex !important;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--green-600);
  color: #fff !important;
  font-size: 0.74rem;
  font-weight: 900;
}

.score-box span {
  display: block;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.score-box strong {
  display: block;
  margin-top: 8px;
  color: var(--blue-900);
  font-size: 1.7rem;
}

.final-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.result-support-note {
  margin-top: 18px;
  color: var(--blue-900);
  font-weight: 800;
  line-height: 1.55;
}

.site-footer {
  width: min(860px, calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(96, 112, 134, 0.22);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0 0 4px;
  color: var(--blue-900);
  font-weight: 850;
  line-height: 1.45;
}

.site-footer span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .brand-shell {
    width: min(100% - 20px, 1120px);
    min-height: 66px;
    gap: 12px;
    padding: 10px 0;
  }

  .brand-logo {
    width: 54px;
  }

  .button-row,
  .result-grid,
  .section-scores,
  .data-list {
    grid-template-columns: 1fr;
  }

  .data-list dt {
    padding-bottom: 6px;
    border-bottom: 0;
  }

  .data-list dd {
    padding-top: 0;
  }
}
