:root {
  color-scheme: light;
  --ink: #142c37;
  --muted: #536a70;
  --background: #edf3f1;
  --line: #d4e2de;
  --teal: #076c60;
  --teal-light: #deeee9;
  --red: #a44248;
  --navy: #092731;
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--teal); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid #a14c09; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1280px, 100%); margin-inline: auto; padding-inline: clamp(18px, 4vw, 54px); }
.mast { background: var(--navy); color: #f5fbfb; }
.top { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #33515a; }
.brand { font-size: .91rem; font-weight: 720; letter-spacing: .075em; white-space: nowrap; }
.brand span { color: #7bccc2; margin-inline: .22rem; }
.report { color: #e4f6f4; padding: .48rem .8rem; border: 1px solid #58817e; border-radius: 7px; text-decoration: none; font-size: .875rem; }
.report:hover { background: #1c444d; }
.hero { display: grid; align-items: end; grid-template-columns: 1.6fr 1fr; gap: 32px; padding-block: 37px 46px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(2.25rem, 4.7vw, 4.25rem); line-height: 1; letter-spacing: -.063em; font-weight: 750; }
.hero p { max-width: 53ch; color: #c3dadb; margin-top: 18px; }
.headline-result { background: #113740; border-left: 3px solid #7bccc2; border-radius: 0 8px 8px 0; padding: 15px 18px; }
.headline-result dt { color: #a9dfd9; font-weight: 700; font-size: .88rem; }
.headline-result dd { margin-top: .3rem; color: #d4e8e8; }
.headline-result strong { color: #fff; font-size: 1.3rem; }
main { padding-block: 24px 10px; }
.panel { min-width: 0; padding: clamp(15px, 2.2vw, 26px); background: white; border: 1px solid var(--line); border-radius: 13px; }
h2 { font-size: clamp(1.22rem, 2vw, 1.48rem); line-height: 1.2; letter-spacing: -.02em; }
h3 { font-size: 1rem; line-height: 1.3; }
.muted { color: var(--muted); }
h2 + p, .conditions + p { margin-top: 6px; }
.controls { display: flex; flex-wrap: wrap; gap: 15px 22px; align-items: end; }
.controls > div:first-child { margin-right: auto; align-self: center; }
.inputs, .scenario { display: flex; flex-wrap: wrap; gap: 9px; }
label, .condition > span { display: block; font-size: .875rem; font-weight: 670; }
select, .scenario button, .primary { min-height: 40px; border-radius: 7px; }
select { display: block; width: 100%; margin-top: 4px; padding: .38rem 2rem .38rem .64rem; appearance: none; border: 1px solid #adc4bc; background: linear-gradient(45deg, transparent 50%, #35645c 50%) right 15px center / 5px 5px no-repeat, linear-gradient(135deg, #35645c 50%, transparent 50%) right 10px center / 5px 5px no-repeat, #fff; font-weight: 570; }
.scenario button { padding: .4rem .7rem; border: 1px solid #bed5cd; background: var(--teal-light); color: #124e45; font-size: .875rem; font-weight: 640; }
.scenario button:hover { background: #cde8e0; }
.paired-layout { display: grid; grid-template-columns: minmax(300px, .84fr) minmax(400px, 1.16fr); align-items: start; gap: 16px; margin-block: 16px; }
.map { width: 100%; border-spacing: 5px; margin-top: 12px; text-align: center; table-layout: fixed; }
.map th { font-size: .875rem; font-weight: 700; }
.map th:first-child { width: 3rem; }
.rank-cell { display: block; width: 100%; height: 68px; border: 2px solid transparent; border-radius: 8px; line-height: 1.05; }
.rank-cell strong { display: block; font-size: 1.42rem; font-variant-numeric: tabular-nums; }
.rank-cell span { display: block; font-size: .77rem; margin-top: 6px; white-space: nowrap; }
.rank-cell[aria-pressed=true] { border-color: #142d2d; box-shadow: inset 0 0 0 1px #fff; }
.rank-cell:hover { filter: brightness(.94); }
.gradient { height: 8px; margin-top: 15px; border-radius: 6px; background: linear-gradient(90deg, #e9f5df, #89d0bd, #3492a6, #1d617d, #152c5e); }
.scale, .plot-axis, .plot-legend { display: flex; justify-content: space-between; gap: 9px; color: var(--muted); font-size: .8rem; }
.scale { margin-top: 3px; }
.method-note { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); }
.panel-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.panel-top h2 { align-self: center; }
.primary { color: #fff; background: var(--teal); border: 1px solid var(--teal); padding: .43rem .75rem; font-weight: 670; white-space: nowrap; font-size: .875rem; }
.primary:hover { background: #05594f; }
.conditions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; align-items: end; }
.condition strong { display: flex; min-height: 40px; align-items: center; margin-top: 4px; background: #e9f2ef; border-radius: 7px; padding-inline: .65rem; font-size: .875rem; }
.summary-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-block: 14px 17px; }
.summary-tiles > div { background: #edf5f3; border-radius: 8px; padding: .59rem .65rem; font-variant-numeric: tabular-nums; }
.summary-tiles span, .summary-tiles small { display: block; color: #3e655f; font-size: .78rem; }
.summary-tiles strong { display: block; color: #123c38; font-size: clamp(1.06rem, 1.75vw, 1.3rem); letter-spacing: -.025em; }
.plot-heading { display: flex; flex-wrap: wrap; column-gap: 14px; justify-content: space-between; align-items: baseline; }
.cell-medians { margin: -.35rem 0 .9rem; font-size: .875rem; }
.plot-legend span::before { content: ''; display: inline-block; width: .6em; height: .6em; margin-right: .34em; background: var(--point); border-radius: 2px; }
.higher, .pos { --point: var(--red); }
.lower, .neg { --point: var(--teal); }
.same { --point: #72938e; }
.plot { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); height: 104px; background: linear-gradient(0deg, transparent calc(50% - 1px), #99b4ae 50%, transparent calc(50% + 1px)), #f4f8f7; border-radius: 7px; margin-top: 8px; }
.point { position: relative; padding: 0; border: none; background: transparent; border-radius: 2px; min-width: 0; }
.point:hover, .point[aria-pressed=true] { background: #d8e6e1; }
.point span { position: absolute; width: min(66%, 11px); min-width: 3px; left: 50%; transform: translateX(-50%); height: var(--height); background: var(--point); border-radius: 2px; pointer-events: none; }
.pos span { bottom: 50%; }
.neg span { top: 50%; }
.same span { top: calc(50% - 1.5px); height: 3px; }
.plot-axis { margin-top: 4px; }
.plot-note { font-size: .875rem; margin-top: 7px; }
.proof .panel-top label { min-width: 82px; }
.table { border-collapse: collapse; width: 100%; text-align: left; font-variant-numeric: tabular-nums; font-size: .875rem; }
.table th, .table td { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: right; }
.table th:first-child, .table td:first-child { text-align: left; }
.table th { background: #eef4f2; }
.table caption { text-align: left; font-weight: 700; padding-block: 12px 6px; }
.ranking-highlight td { background: #f0f5ee; font-weight: 670; }
.table-scroll { overflow-x: auto; }
#ranking { min-width: 490px; }
summary { cursor: pointer; font-weight: 670; color: var(--teal); margin-block: 11px 6px; }
.run-ids { font-family: ui-monospace, Consolas, monospace; font-size: .75rem; margin-top: 12px; overflow-wrap: anywhere; }
.research { margin-top: 16px; }
.research p + p { margin-top: 7px; }
footer { margin-block: 14px 5px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; color: var(--muted); font-size: .875rem; }
.error { color: #9b282e; }
@media (max-width: 940px) {
  .paired-layout { grid-template-columns: minmax(250px, .88fr) minmax(340px, 1.12fr); }
  .controls > div:first-child { flex-basis: 100%; }
}
@media (max-width: 720px) {
  .hero, .paired-layout { grid-template-columns: 1fr; }
  .hero { gap: 18px; padding-block: 27px 28px; }
  .top { min-height: 59px; }
  main { padding-top: 15px; }
  .paired-layout { gap: 12px; margin-block: 12px; }
  .rank-cell { height: 61px; }
}
@media (max-width: 390px) {
  .summary-tiles { grid-template-columns: 1fr 1fr; }
  .summary-tiles > div:last-child { grid-column: 1 / -1; }
  .scenario button { min-height: 35px; }
}
