:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5c626a;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #d9d2c7;
  --teal: #0e756b;
  --teal-dark: #084d48;
  --coral: #cf5549;
  --gold: #c6902b;
  --plum: #6d5576;
  --shadow: 0 18px 42px rgba(42, 36, 25, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(14, 117, 107, 0.14), transparent 36%),
    linear-gradient(250deg, rgba(207, 85, 73, 0.12), transparent 42%),
    var(--paper);
}

button,
input {
  font: inherit;
}

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

.intro {
  min-height: 86vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: 44px;
  align-items: center;
  padding: 34px 0 28px;
}

.intro-copy {
  max-width: 720px;
}

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

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

h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(3.6rem, 6.5rem, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 3rem, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.intro-copy p:not(.eyebrow) {
  max-width: 58ch;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

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

.button {
  min-height: 46px;
  border: 1px solid var(--teal-dark);
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(198, 144, 43, 0.52);
  outline-offset: 3px;
}

.primary {
  color: white;
  background: var(--teal);
  box-shadow: 0 10px 24px rgba(14, 117, 107, 0.2);
}

.ghost {
  color: var(--teal-dark);
  background: transparent;
}

.symbol-panel {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.symbol-panel img {
  width: min(360px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 18px 25px rgba(32, 33, 36, 0.18));
}

.symbol-panel figcaption,
.helper {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.test-area {
  padding: 44px 0 0;
}

.test-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.progress-wrap {
  width: min(310px, 100%);
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 12px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--coral), var(--gold));
  transition: width 180ms ease;
}

.quiz-form,
.result-card {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quiz-form {
  padding: 22px;
}

.questions {
  display: grid;
  gap: 16px;
}

.question {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.question-title {
  display: flex;
  gap: 12px;
  align-items: start;
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.45;
}

.question-number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: white;
  background: var(--plum);
  font-size: 0.88rem;
}

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

.scale label {
  min-height: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  background: #fbfaf7;
  cursor: pointer;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 750;
}

.scale input {
  width: 18px;
  height: 18px;
  accent-color: var(--coral);
}

.scale label:has(input:checked) {
  border-color: var(--coral);
  color: var(--ink);
  background: rgba(207, 85, 73, 0.12);
}

.helper {
  margin: 18px 0 0;
}

.results {
  --result-accent: var(--coral);
  --result-accent-soft: rgba(207, 85, 73, 0.16);
  --result-accent-glow: rgba(207, 85, 73, 0.24);
  --result-deep: var(--teal-dark);
  --result-secondary: var(--gold);
  --result-spectrum: linear-gradient(135deg, var(--result-accent), var(--result-secondary));
  padding-top: 32px;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    radial-gradient(circle at top right, var(--result-accent-soft), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 248, 242, 0.96));
}

.result-card::before,
.result-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.result-card::before {
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--result-accent-glow), transparent 68%);
}

.result-card::after {
  left: 34px;
  top: 24px;
  width: 110px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--result-accent), var(--result-secondary));
}

.result-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: start;
}

.result-copy {
  max-width: 72ch;
}

.result-badge {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 20px;
  border: 1px solid rgba(8, 77, 72, 0.14);
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, var(--result-deep), var(--result-accent));
  box-shadow: 0 20px 40px var(--result-accent-glow);
}

.result-aside {
  display: grid;
  gap: 14px;
}

.result-motif {
  position: relative;
  min-height: 240px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--result-accent-soft);
  border-radius: 22px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 26%, transparent 27%),
    var(--result-spectrum);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 22px 40px var(--result-accent-glow);
  overflow: hidden;
}

.motif-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.motif-orbit-a {
  inset: 24px;
  transform: rotate(14deg);
}

.motif-orbit-b {
  inset: 50px;
  transform: rotate(-18deg);
}

.motif-core {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border-radius: 50%;
  color: var(--result-deep);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 34px rgba(32, 33, 36, 0.16);
  text-align: center;
}

.motif-code {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.motif-name {
  max-width: 9ch;
  font-size: 1.45rem;
  line-height: 1;
}

.motif-tags {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.motif-tag {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: white;
  background: rgba(17, 20, 24, 0.18);
  backdrop-filter: blur(6px);
  font-size: 0.76rem;
  font-weight: 800;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.result-badge-label,
.panel-eyebrow,
.type-label {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-badge strong {
  font-size: 2.4rem;
  line-height: 0.95;
}

.result-badge span:last-child {
  color: rgba(255, 255, 255, 0.8);
}

#resultSummary {
  max-width: 72ch;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.wing-notes {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.wing-card {
  padding: 16px 18px;
  border: 1px solid var(--result-accent-soft);
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--result-accent-soft), transparent 55%),
    rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.wing-title {
  margin: 0 0 6px;
  color: var(--result-deep);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.insight-card {
  padding: 18px;
  border: 1px solid var(--result-accent-soft);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.7)),
    linear-gradient(135deg, var(--result-accent-soft), transparent 62%);
  box-shadow: 0 14px 24px rgba(42, 36, 25, 0.06);
}

.insight-label {
  margin: 0 0 6px;
  color: var(--result-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insight-card h3 {
  margin-bottom: 12px;
}

.insight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.insight-list li + li {
  margin-top: 8px;
}

.wing-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.results-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 26px;
}

.results-panel {
  padding: 18px;
  border: 1px solid var(--result-accent-soft);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
  backdrop-filter: blur(8px);
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading h3 {
  font-size: 1.25rem;
}

.score-list {
  display: grid;
  gap: 12px;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.15fr) 68px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(8, 77, 72, 0.08);
  border-radius: 16px;
  background: rgba(247, 244, 238, 0.72);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.score-row:hover {
  transform: translateY(-2px);
  border-color: var(--result-accent-soft);
  box-shadow: 0 14px 24px rgba(42, 36, 25, 0.08);
}

.score-row.is-top {
  border-color: var(--result-accent-soft);
  background: linear-gradient(90deg, var(--result-accent-soft), rgba(255, 255, 255, 0.12));
  box-shadow: 0 18px 28px var(--result-accent-soft);
}

.score-meta {
  display: flex;
  gap: 12px;
  align-items: start;
}

.score-rank {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--result-deep);
  background: var(--result-accent-soft);
  font-size: 0.82rem;
  font-weight: 900;
}

.score-name {
  display: block;
  font-weight: 800;
  line-height: 1.25;
}

.score-short {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.score-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.score-meter {
  height: 14px;
  border-radius: 999px;
  background: #ece6dc;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--result-deep), var(--result-accent), var(--result-secondary));
}

.score-percent {
  min-width: 44px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: right;
}

.score-value {
  font-size: 1.25rem;
  font-weight: 900;
  text-align: right;
}

.score-value small {
  color: var(--muted);
  font-size: 0.72em;
}

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

.type-card {
  position: relative;
  min-height: 0;
  border: 1px solid var(--result-accent-soft);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 250, 247, 0.92));
  overflow: hidden;
}

.type-card.is-primary {
  border-color: var(--result-accent-soft);
  box-shadow: 0 16px 30px var(--result-accent-soft);
}

.type-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--result-accent), var(--result-secondary), var(--result-deep));
}

.type-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.type-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.type-label {
  color: var(--result-deep);
}

.type-short {
  margin: 8px 0 10px;
  color: var(--ink);
  font-weight: 700;
}

.type-accent {
  flex: 0 0 auto;
  color: var(--result-accent-soft);
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 800px) {
  .app-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 16px;
  }

  .intro,
  .test-heading,
  .score-row {
    grid-template-columns: 1fr;
  }

  .intro {
    min-height: auto;
    gap: 30px;
    padding-top: 36px;
  }

  h1 {
    font-size: clamp(3rem, 3rem, 3rem);
    max-width: 100%;
  }

  h2 {
    font-size: clamp(1.9rem, 1.9rem, 1.9rem);
  }

  .test-heading {
    display: grid;
    align-items: start;
  }

  .progress-wrap {
    width: 100%;
  }

  .quiz-form,
  .result-card {
    padding: 14px;
  }

  .result-hero,
  .results-grid,
  .score-visual {
    grid-template-columns: 1fr;
  }

  .result-motif {
    min-height: 210px;
  }

  .motif-core {
    width: 118px;
    height: 118px;
  }

  .result-badge {
    padding: 18px;
  }

  .wing-card {
    padding: 14px;
  }

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


@media print {
  body {
    background: white;
  }

  .intro,
  .test-area,
  .result-actions-screen,
  .button,
  .progress-wrap {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .results {
    padding-top: 0;
  }

  .result-card,
  .results-panel,
  .wing-card,
  .insight-card,
  .type-card,
  .score-row,
  .result-badge,
  .result-motif {
    box-shadow: none;
    backdrop-filter: none;
  }

  .result-card {
    border: 0;
    padding: 0;
    background: white;
  }

  .result-card::before,
  .result-card::after,
  .motif-orbit {
    display: none;
  }

  .result-hero,
  .results-grid,
  .insight-grid {
    display: block;
  }

  .result-motif,
  .result-badge,
  .results-panel,
  .wing-card,
  .insight-card,
  .type-card,
  .score-row {
    break-inside: avoid;
    margin-bottom: 14px;
    border: 1px solid #d6d6d6;
  }

  .score-row,
  .score-visual {
    display: block;
  }

  .score-meter {
    margin: 8px 0;
  }
}
  .scale,
  .type-details {
    grid-template-columns: 1fr;
  }

  .results-panel,
  .score-row {
    padding: 14px;
  }

  .score-row {
    gap: 10px;
  }

  .score-value,
  .score-percent {
    text-align: left;
  }

  .scale label {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }
}
