:root {
  color-scheme: light;
  --navy: #092b49;
  --ink: #183044;
  --muted: #536978;
  --gold: #92772e;
  --line: #dce5ea;
  --paper: #f4f6f8;
  --shadow: #1d6747;
  --region: #275580;
  font: 15px/1.45 "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { color: var(--navy); }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #b1923f; outline-offset: 3px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header-inner, .shell { width: min(100%, 1510px); margin: auto; padding-inline: clamp(16px, 3vw, 44px); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; padding-block: 15px; }
.site-name { font-size: 16px; font-weight: 700; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 20px; font-size: 13px; }
.shell { padding-bottom: 36px; }
.intro { padding-block: 26px 19px; }
.eyebrow { margin-bottom: 3px; color: var(--gold); font-size: 11px; letter-spacing: .1em; font-weight: 700; text-transform: uppercase; }
h1 { font-size: clamp(27px, 3.6vw, 47px); line-height: 1.13; letter-spacing: -.035em; }
.question { margin-top: 6px; color: var(--muted); font-size: clamp(14px, 1.36vw, 19px); }
.controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px 24px; padding: 10px 15px 12px; border: 1px solid var(--line); background: #fff; border-radius: 9px; }
.control-block { display: grid; gap: 4px; }
.control-label, .weights legend { color: var(--muted); font-size: 12px; font-weight: 650; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f4f7f8; width: fit-content; }
.segmented button { padding: 5px 10px; line-height: 1.25; color: var(--navy); background: transparent; border: 1px solid transparent; border-radius: 5px; font-weight: 650; white-space: nowrap; }
.segmented button:hover { background: #eaf0f4; }
.segmented button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.weights { min-width: 0; margin: 0; padding: 0; border: 0; }
.weights legend { padding: 0; }
.weights legend span { font-weight: 400; }
.weights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 24px); }
.weight { display: grid; gap: 3px; min-width: 0; }
.weight > span { display: flex; align-items: baseline; gap: 1px; color: var(--weight-color); font-weight: 650; font-size: 15px; }
.weight output { margin-left: auto; color: var(--ink); font-size: 12px; font-variant-numeric: tabular-nums; }
.weight input { width: 100%; margin: 0; accent-color: var(--weight-color); cursor: pointer; }
.weight-one { --weight-color: #2563eb; }
.weight-two { --weight-color: #b75a22; }
.weight-three { --weight-color: #087d71; }
.quiet-button { padding: 5px 9px; border: 1px solid #cbd8e0; border-radius: 6px; background: #fff; color: var(--navy); font-size: 13px; font-weight: 600; white-space: nowrap; }
.quiet-button:hover, .quiet-button[aria-pressed="true"] { background: #eaf2f3; }
#resetCamera { align-self: center; }
.figure-context { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 3px 14px; color: var(--muted); font-size: 12px; padding: 10px 1px 7px; }
.formula, .formula-badge, math { font-family: "Cambria Math", "STIX Two Text", Georgia, serif; }
.figure-context .formula { font-size: 15px; color: var(--navy); }
.separator { color: #8194a0; padding-inline: 2px; }
.figure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.45vw, 22px); }
.figure-card { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.figure-heading { display: flex; align-items: flex-start; gap: 7px; padding: 12px 14px 1px; }
.figure-heading > div { flex: 1; min-width: 0; }
.figure-heading h2 { font-size: clamp(17px, 1.66vw, 24px); line-height: 1.18; letter-spacing: -.015em; }
.figure-heading p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.design-matrix {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-height: 4.6em;
  margin: .35em 0 .1em;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
}
.design-matrix-name { align-self: center; color: var(--navy); font: 1.18em Georgia, serif; }
.design-matrix-values {
  position: relative;
  display: grid;
  gap: .15em;
  padding: .1em .55em;
  font-variant-numeric: tabular-nums;
}
.design-matrix-values::before, .design-matrix-values::after {
  content: "";
  position: absolute;
  inset-block: .03em;
  width: .32em;
  border-block: 1px solid var(--muted);
}
.design-matrix-values::before { left: 0; border-left: 1px solid var(--muted); }
.design-matrix-values::after { right: 0; border-right: 1px solid var(--muted); }
.design-matrix-vector {
  display: grid;
  grid-auto-columns: 3.1em;
  justify-items: center;
  padding: .17em .15em;
  border: 1px solid var(--vector-color);
  border-radius: .32em;
  color: var(--vector-color);
  font-weight: 650;
}
.design-matrix-label { font-family: Georgia, serif; }
.design-matrix[data-orientation="columns"] .design-matrix-values {
  grid-auto-flow: column;
  margin-top: 1.25em;
}
.design-matrix[data-orientation="columns"] .design-matrix-vector { position: relative; }
.design-matrix[data-orientation="columns"] .design-matrix-label { position: absolute; bottom: calc(100% + .18em); }
.design-matrix[data-orientation="columns"] .design-matrix-name { margin-top: 1.06em; }
.design-matrix[data-orientation="rows"] .design-matrix-values { margin-right: 3.4em; }
.design-matrix[data-orientation="rows"] .design-matrix-vector { position: relative; grid-auto-flow: column; }
.design-matrix[data-orientation="rows"] .design-matrix-label { position: absolute; left: calc(100% + .85em); align-self: center; }
.right-heading { display: block; }
.region-title-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.region-area-equation { display: flex; flex: 0 0 100%; flex-wrap: wrap; align-items: center; gap: 2px 12px; color: var(--navy); }
.region-area-equation math { font-size: 17px; }
.region-area-equation math mfrac { math-style: normal; }
.area-expression { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.region-area-equation > .formula, .area-pair-note { color: var(--muted); font-size: 13px; }
.area-pair-note { flex-basis: 100%; }
.region-caption-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; margin-top: 3px; }
.region-caption-row p { flex: 1 1 auto; margin: 0; }
.region-caption-row .formula-badge { padding: 1px 5px; font-size: 14px; }
.area-control { display: inline-flex; }
.area-readout { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid #bcd8d1; border-radius: 5px; background: #edf5f2; color: #16584b; font-size: 12px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.area-readout:hover, .area-readout[aria-expanded="true"] { background: #deeee8; }
.area-info { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border: 1px solid currentColor; border-radius: 50%; font-size: .85em; font-weight: 650; }
.area-tooltip { position: absolute; z-index: 2; bottom: 100%; right: 0; display: grid; gap: .55em; width: min(100%, 360px); padding: .75em .85em; border: 1px solid #b9c9d2; border-radius: 7px; background: #fff; color: var(--navy); box-shadow: 0 5px 18px #18304426; font-size: 13px; line-height: 1.4; }
.formula-badge { color: var(--navy); padding: 3px 8px; line-height: 1.25; border: 1px solid var(--line); border-radius: 5px; font-size: 17px; white-space: nowrap; }
.canvas-wrap { height: clamp(275px, 29vw, 440px); position: relative; min-width: 0; }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
canvas:active { cursor: grabbing; }
canvas:focus-visible { outline-offset: -4px; }
figcaption { min-height: 35px; padding: 7px 14px; border-top: 1px solid #edf1f3; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 12px; color: var(--muted); }
.projection-footer, .region-footer { align-content: center; }
.region-footer { position: relative; }
.projection-footer #pairDet { order: -1; flex-basis: 100%; }
@supports (grid-template-rows: subgrid) {
  @media (min-width: 721px) {
    body:not(.embed) .figure-grid { row-gap: 0; }
    body:not(.embed) .figure-card { grid-row: span 3; grid-template-rows: subgrid; }
  }
}
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.shadow-dot { background: var(--shadow); }
.region-dot { background: var(--region); }
.slice-dot { background: #93672a; }
#referenceKey { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.dashed-key { width: 15px; border-top: 2px dashed #748e9b; }
.region-notice { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(84%, 290px); text-align: center; padding: 10px; color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; pointer-events: none; }
.data-controls { background: #fff; border: 1px solid var(--line); padding: 10px 14px; margin-top: 10px; border-radius: 7px; }
.data-values { display: flex; align-items: center; gap: 7px 12px; flex-wrap: wrap; }
.data-values label { font-family: Georgia, serif; }
.data-values input { width: 76px; border: 1px solid #bfcdd6; border-radius: 5px; margin-left: 2px; padding: 3px 4px; color: var(--ink); font: 13px "Segoe UI", Arial, sans-serif; }
.data-controls p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.takeaway { margin-top: 12px; padding: 9px 14px; background: #f7f3e7; border-left: 3px solid #a89448; border-radius: 0 6px 6px 0; }
.takeaway strong { color: var(--navy); font-size: 16px; }
.takeaway p { margin-top: 2px; color: #4c5662; font-size: 13px; }
.notes { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.notes summary { cursor: pointer; padding: 11px 14px; color: var(--navy); font-weight: 650; }
.notes-body { padding: 0 14px 14px; }
.notes-body p { color: var(--muted); font-size: 14px; }
.notes-body .setup-equation { margin-bottom: 5px; color: var(--navy); font-size: 18px; }
.calculation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 12px 0; }
.calculation-grid > div { border: 1px solid var(--line); padding: 11px; border-radius: 6px; }
.calculation-grid h3, .tradeoff h3 { font-size: 15px; }
math { color: var(--navy); margin-block: 8px; font-size: clamp(15px, 1.5vw, 20px); }
.table-scroll { overflow-x: auto; }
.numbers { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.numbers caption { color: var(--navy); text-align: left; font-weight: 650; margin-bottom: 3px; }
.numbers td, .numbers th { padding: 5px 7px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.numbers th:first-child { text-align: left; }
.numbers thead th { color: var(--muted); font-weight: 650; }
.numbers tbody th { font-weight: 550; }
.area-values { display: flex; flex-wrap: wrap; gap: 5px 20px; margin-top: 7px; }
.area-values strong { color: var(--navy); font-variant-numeric: tabular-nums; }
.tradeoff { margin-top: 15px; }
.tradeoff-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; }
.tradeoff p { margin-block: 5px; }
.tradeoff tr.selected { background: #edf5f3; }
@media (max-width: 720px) {
  .controls { grid-template-columns: minmax(0, 1fr) auto; }
  .weights { grid-row: 2; grid-column: 1 / -1; }
  .figure-grid, .calculation-grid { grid-template-columns: minmax(0, 1fr); }
  .canvas-wrap { height: clamp(250px, 68vw, 370px); }
  #dataView { font-size: 12px; padding-inline: 6px; }
}
/* Use a 16:9 stage within the slide or add-in window. */
body.embed {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}
.slide {
  --slide-unit: min(1vw, 1.77777778vh);
  --caption-size: clamp(10px, calc(var(--slide-unit) * 1.25), 15px);
  --equation-size: clamp(13px, calc(var(--slide-unit) * 1.65), 20px);
  width: min(100vw, 177.77777778vh);
  height: min(100vh, 56.25vw);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 4px;
  padding: clamp(4px, calc(var(--slide-unit) * .55), 9px) calc(var(--slide-unit) * 1.2);
  padding-bottom: clamp(9px, var(--slide-unit), 16px);
  overflow: hidden;
}
.slide-title {
  margin: 0;
  font-size: clamp(14px, calc(var(--slide-unit) * 1.8), 24px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
canvas[data-dimension="2d"], canvas[data-dimension="2d"]:active { cursor: default; }
.slide .segmented { flex: none; padding: 1px; gap: 1px; border-radius: 5px; }
.slide .segmented button {
  padding: 2px clamp(4px, calc(var(--slide-unit) * .55), 9px);
  min-height: 22px;
  font-size: var(--caption-size);
  border-radius: 4px;
}
.slide .figure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); min-height: 0; column-gap: calc(var(--slide-unit) * 1.2); }
.slide .figure-card { grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 0; border: 0; }
.slide .figure-card + .figure-card { border-left: 1px solid var(--line); padding-left: calc(var(--slide-unit) * 1.1); }
.slide .figure-heading { padding: 2px 0 0; }
.slide .figure-heading h2 { font-size: clamp(13px, calc(var(--slide-unit) * 1.65), 22px); }
.slide .figure-visibility-label { gap: 5px; }
.slide .figure-visibility-label input { width: 13px; height: 13px; }
.slide .region-title-row { gap: 2px 6px; }
.slide .region-area-equation { justify-content: center; gap: 2px 8px; text-align: center; }
.slide .area-expression { justify-content: center; }
.slide #pairDet, .slide .region-area-equation math, .slide .area-readout {
  font-family: "Cambria Math", "STIX Two Text", Georgia, serif;
  font-size: var(--equation-size);
  font-weight: 400;
}
.slide .region-area-equation > .formula, .slide .area-pair-note { font-size: var(--caption-size); }
.slide .area-readout { gap: 3px; padding: 1px 4px; }
.slide #rightArea { font-weight: inherit; }
.slide .area-info { font: 650 .7em/1 "Segoe UI", Arial, sans-serif; }
.slide .area-tooltip { font-size: var(--caption-size); }
.slide .projection-meta { display: flex; flex: 0 0 100%; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1px 8px; text-align: center; }
.slide #leftSubtitle { line-height: 1.2; }
.slide .design-matrix {
  margin: 0;
  min-height: 0;
  font-size: clamp(9px, calc(var(--slide-unit) * 1.1), 14px);
}
.slide .design-matrix-vector { grid-auto-columns: 2.8em; padding: .05em .1em; }
.slide .design-matrix[data-orientation="columns"] .design-matrix-values { margin-top: 1.1em; }
.slide .canvas-wrap { height: auto; min-height: 0; }
.figure-zoom { position: absolute; top: 3px; right: 3px; display: flex; padding: 1px; border: 1px solid var(--line); border-radius: 5px; background: #fffffff2; }
.figure-zoom button { min-width: 21px; min-height: 21px; padding: 0 3px; border: 0; border-radius: 3px; background: transparent; color: var(--navy); font-size: var(--caption-size); line-height: 1; }
.figure-zoom [data-zoom="reset"] { min-width: 32px; font-variant-numeric: tabular-nums; }
.figure-zoom button:hover { background: #eaf2f3; }
.figure-zoom button:focus-visible { outline-offset: -2px; }

.design-actions { display: grid; grid-template-columns: repeat(2, auto); gap: 5px; }
.design-actions .quiet-button { padding: 4px 7px; font-size: 12px; }
.shadow-key, .pair-legend { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.pair-legend { font-variant-numeric: tabular-nums; }
.pair-legend [data-pair-term] { color: var(--pair-color); border-bottom: 2px solid var(--pair-color); white-space: nowrap; font-weight: 650; }
.projection-footer strong { color: var(--navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
.action-menu { font: inherit; color: var(--navy); font-weight: 650; border: 1px solid #cbd8e0; border-radius: 6px; background: #fff; cursor: pointer; }
.slide-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px clamp(4px, calc(var(--slide-unit) * .7), 10px);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.slide-tools .weights { flex: 1 1 32rem; }
.slide-tools .weights-grid { gap: clamp(4px, calc(var(--slide-unit) * 1.1), 15px); }
.slide-tools .weight { grid-template-columns: auto minmax(0, 1fr) 4ch; align-items: center; gap: 4px; }
.slide-tools .weight > span, .slide-tools .weight output { font-size: var(--caption-size); line-height: 1; }
.slide-tools .weight output { text-align: right; }
.slide-tools .weight input {
  --track-height: 4px;
  --thumb-size: 12px;
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  height: 24px;
  padding: 0;
  background: transparent;
}
.slide-tools .weight input::-webkit-slider-runnable-track {
  height: var(--track-height);
  border-radius: 999px;
  background: #c8d3db;
}
.slide-tools .weight input::-moz-range-track {
  height: var(--track-height);
  border-radius: 999px;
  background: #c8d3db;
}
.slide-tools .weight input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  margin-top: calc((var(--track-height) - var(--thumb-size)) / 2);
  border: 0;
  border-radius: 50%;
  background: var(--weight-color);
}
.slide-tools .weight input::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  border: 0;
  border-radius: 50%;
  background: var(--weight-color);
}
.slide-tools .action-menu { min-height: 22px; padding: 0 2px; font-size: var(--caption-size); }
.slide .projection-footer, .slide .region-footer {
  justify-content: center;
  min-height: clamp(78px, calc(var(--slide-unit) * 11.25), 106px);
  padding: 4px 0 3px;
  gap: 2px 8px;
  border-top: 1px solid var(--line);
  font-size: var(--caption-size);
  line-height: 1.25;
}
.slide #pairDet { text-align: center; }
.slide .region-notice { font-size: var(--caption-size); }
@media (max-width: 820px) {
  .controls { grid-template-columns: minmax(0, 1fr) auto; }
  .controls .weights { grid-row: 2; grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .controls { grid-template-columns: minmax(0, 1fr); }
  .controls .weights { grid-row: auto; grid-column: auto; }
  .design-actions { display: flex; flex-wrap: wrap; }
}
