:root {
  color-scheme: light;
  --background: #f8f6f1;
  --surface: #fffefa;
  --ink: #14253f;
  --muted: #596473;
  --border: #cfd3d3;
  --line: #dfe2e0;
  --teal: #006b70;
  --teal-dark: #00545a;
  --ochre: #c68a32;
  --humane: #edf3eb;
  --technocratic: #e9f0f3;
  --tribal: #f7efe0;
  --unreality: #f4e8e5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--ink);
}

.page-shell {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 20px;
}

h1,
h2,
.quadrant-summary strong,
.quadrant span {
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.page-header p {
  max-width: 900px;
  margin: 10px 0 18px;
  color: #3d4650;
  font-size: 1.08rem;
  line-height: 1.55;
}

.explores-note {
  max-width: 980px;
  margin: 0 0 16px;
}

.explores-note h2 {
  margin: 0 0 9px;
  padding: 0;
  border: 0;
  color: var(--teal-dark);
  font-size: 1.25rem;
}

.explores-note p {
  margin: 8px 0 0;
  color: #48525d;
  font-size: 0.96rem;
  line-height: 1.58;
}

.read-model-note {
  max-width: 980px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border) 78%, var(--teal) 22%);
  border-left: 4px solid color-mix(in srgb, var(--teal) 46%, var(--border) 54%);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 88%, var(--humane) 12%);
  color: #48525d;
  font-size: 0.92rem;
  line-height: 1.5;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(290px, 0.94fr) minmax(360px, 1.08fr) minmax(300px, 1fr);
  gap: 20px;
}

.panel {
  min-width: 0;
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

h2 {
  margin: 0;
  padding: 0 2px 11px;
  border-bottom: 1px solid var(--border);
  font-size: 1.65rem;
  line-height: 1.1;
}

.panel-intro {
  min-height: 45px;
  margin: 20px 2px 0;
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.preset-control {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

select:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}

.preset-note {
  margin: 12px 2px 0;
  color: #596473;
  font-size: 0.78rem;
  line-height: 1.42;
}

.preset-analysis {
  margin: 12px 2px 0;
  padding: 11px 12px;
  border-left: 3px solid color-mix(in srgb, var(--teal) 42%, var(--border) 58%);
  background: color-mix(in srgb, var(--surface) 88%, var(--humane) 12%);
  color: #4d5865;
  font-size: 0.78rem;
  line-height: 1.42;
}

.preset-analysis p {
  margin: 0;
}

.preset-analysis p + p {
  margin-top: 8px;
}

.sliders {
  display: grid;
  gap: 31px;
  margin-top: 22px;
}

.dimension-section-label {
  display: grid;
  gap: 5px;
  padding-top: 3px;
}

.dimension-section-label span,
.reference-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.dimension-section-label span {
  color: #65707b;
}

.reference-label {
  color: var(--teal-dark);
}

.dimension-section-label p {
  margin: 0;
  color: #596473;
  font-size: 0.78rem;
  line-height: 1.42;
}

.supporting-dimension-label {
  margin-top: -3px;
}

.slider-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

label {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.25;
}

output {
  flex: 0 0 auto;
  color: var(--teal-dark);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  --range-value: 50%;
  display: block;
  width: 100%;
  height: 18px;
  margin: 12px 0 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 99px;
  background: linear-gradient(
    to right,
    var(--teal) 0,
    var(--teal) var(--range-value),
    #d9dcdb var(--range-value),
    #d9dcdb 100%
  );
}

input[type="range"]::-moz-range-track {
  height: 7px;
  border-radius: 99px;
  background: #d9dcdb;
}

input[type="range"]::-moz-range-progress {
  height: 7px;
  border-radius: 99px;
  background: var(--teal);
}

input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -6.5px;
  appearance: none;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 1px 3px rgb(20 37 63 / 32%);
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 1px 3px rgb(20 37 63 / 32%);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 4px;
}

.range-limits {
  display: flex;
  justify-content: space-between;
  margin: 2px 1px 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.slider-helper {
  margin: 7px 1px 0;
  color: #596473;
  font-size: 0.78rem;
  line-height: 1.42;
}

.analysis-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.scenario-label {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  width: fit-content;
  margin: 16px 2px 0;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--border) 80%, var(--teal) 20%);
  border-radius: 3px;
  background: color-mix(in srgb, var(--surface) 82%, var(--humane) 18%);
  color: #596473;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.analysis-panel .scenario-label {
  align-self: center;
}

.scenario-label span {
  color: #596473;
  font-weight: 600;
}

.scenario-label strong {
  color: var(--teal-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.score-block,
.quadrant-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.score-block {
  margin-top: 22px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border);
}

.score-block span,
.quadrant-summary span {
  color: #4a535c;
  font-size: 0.93rem;
}

.score-block strong {
  margin: -4px 0 6px;
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5rem, 9vw, 7rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-block small {
  color: #4a535c;
  font-size: 0.85rem;
}

.quadrant-summary {
  gap: 5px;
  margin-top: 14px;
}

.quadrant-summary strong {
  color: var(--teal-dark);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.chart-layout {
  display: grid;
  grid-template-columns: 22px minmax(240px, 420px);
  grid-template-rows: auto 18px;
  justify-content: center;
  margin-top: 16px;
}

.quadrant-chart {
  position: relative;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: min(100%, 420px);
  aspect-ratio: 1 / 0.78;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 4px;
}

.quadrant {
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
}

.quadrant span {
  color: var(--ink);
  font-size: clamp(0.84rem, 1.6vw, 1.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.quadrant-tribal {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--tribal);
}

.quadrant-humane {
  border-bottom: 1px solid var(--ink);
  background: var(--humane);
}

.quadrant-unreality {
  border-right: 1px solid var(--ink);
  background: var(--unreality);
}

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

.chart-dot {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 1px 5px rgb(20 37 63 / 38%);
  transform: translate(-50%, -50%);
  transition: left 160ms ease-out, top 160ms ease-out;
}

.axis-label {
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.y-axis-label {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.x-axis-label {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  justify-self: center;
}

.chart-note {
  max-width: 370px;
  margin: 10px auto 0;
  color: #55606b;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
}

.outcome-list {
  display: grid;
  gap: 25px;
  margin-top: 30px;
}

.outcome-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.outcome-name {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.2;
}

.outcome-percent {
  color: var(--teal-dark);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.outcome-track {
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #eceeec;
}

.outcome-bar {
  height: 100%;
  background: var(--teal);
  transition: width 160ms ease-out;
}

.outcome-note {
  margin: 37px 0 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.drivers-panel,
.calculation-reference,
.about-model,
.model-foundations {
  margin-top: 20px;
}

.calculation-reference,
.about-model,
.model-foundations {
  border-left: 4px solid color-mix(in srgb, var(--teal) 38%, var(--border) 62%);
  background: color-mix(in srgb, var(--surface) 90%, var(--tribal) 10%);
}

.drivers-scenario-label {
  margin-top: 14px;
}

.reference-label {
  display: inline-block;
  margin: 0 2px 10px;
}

.driver-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 20px;
}

.driver-lists h3 {
  margin: 0;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
}

.driver-lists ul {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding-left: 20px;
}

.driver-lists li {
  padding-left: 2px;
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.45;
}

.driver-score {
  color: var(--teal-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.driver-interpretation {
  margin: 20px 2px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.6;
}

.calculation-reference p,
.about-model p,
.model-foundations p {
  margin: 16px 2px 0;
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.6;
}

.calculation-reference h3,
.model-foundations h3 {
  margin: 22px 2px 0;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.2;
}

.formula-block {
  margin: 16px 2px 0;
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--teal) 18%);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 86%, var(--humane) 14%);
  color: #34404c;
  font-size: 0.94rem;
  line-height: 1.55;
}

.formula-block span {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.formula-block ul,
.reference-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 21px;
}

.formula-block li,
.reference-list li {
  padding-left: 2px;
}

.reference-list {
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.5;
}

.external-link {
  color: var(--teal-dark);
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--teal) 58%, var(--border) 42%);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
}

.external-link:hover {
  color: var(--teal);
  text-decoration-thickness: 2px;
}

.external-link:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
  border-radius: 2px;
}

.note-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.back-link {
  margin: 0 0 16px;
  font-size: 0.92rem;
}

.note-article {
  line-height: 1.65;
}

.note-article h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  letter-spacing: 0;
}

.note-article h2 {
  margin-top: 34px;
}

.note-article p {
  margin: 16px 0 0;
}

.note-subtitle {
  margin-top: 8px;
  color: var(--teal-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.note-disclaimer {
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--teal) 18%);
  border-left: 4px solid color-mix(in srgb, var(--teal) 46%, var(--border) 54%);
  border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 88%, var(--humane) 12%);
  color: #48525d;
  font-size: 0.95rem;
}

.note-article table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.note-article th,
.note-article td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.note-article th {
  color: var(--teal-dark);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-article sup {
  font-size: 0.75em;
}

.footnotes {
  margin-top: 36px;
  color: #48525d;
  font-size: 0.95rem;
}

.footnotes ol {
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.lab-notes p {
  margin: 16px 2px 0;
  color: #48525d;
  font-size: 0.95rem;
  line-height: 1.5;
}

footer {
  margin: 22px 12px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .dashboard {
    grid-template-columns: minmax(280px, 0.9fr) minmax(390px, 1.1fr);
  }

  .outcomes-panel {
    grid-column: 1 / -1;
  }

  .outcome-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }

  .outcome-heading {
    min-height: 52px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .outcome-note {
    margin-top: 24px;
  }
}

@media (max-width: 740px) {
  .page-shell {
    width: min(100% - 28px, 590px);
    padding-top: 20px;
  }

  .page-header p {
    margin-bottom: 16px;
    font-size: 0.98rem;
  }

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

  .panel {
    padding: 22px 18px;
  }

  .outcomes-panel {
    grid-column: auto;
  }

  .outcome-list {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 26px;
  }

  .outcome-heading {
    min-height: auto;
    flex-direction: row;
    align-items: baseline;
  }

  .driver-lists {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .quadrant-chart {
    aspect-ratio: 1 / 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
