:root {
  color-scheme: light;
  --ink: #142e38;
  --muted: #4f6367;
  --paper: #f7f3ed;
  --surface: #fcf9f5;
  --line: #d9d1c7;
  --copper: #984820;
  --copper-soft: #f3e3d4;
  --green: #185752;
  --blue: #286784;
  --display: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: 'Trebuchet MS', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.45 var(--sans); }
a { color: inherit; }
button, select { font: inherit; }
button, select, summary { cursor: pointer; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.07; }
h1, h2, .detail-panel h3, .verification-metrics h3 { font-family: var(--display); font-weight: 600; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 3; left: 1rem; top: 1rem; padding: .7rem 1rem; background: var(--surface); }
.shell, .masthead-inner, .hero-inner { width: min(100% - 4.5rem, 1640px); margin-inline: auto; }
.masthead { background: #faf6f0; border-bottom: 1px solid #dfd8cf; }
.masthead-inner { min-height: 83px; display: grid; grid-template-columns: minmax(220px, .92fr) minmax(0, 2.25fr) minmax(158px, .8fr); align-items: center; gap: 1.2rem; }
.brand { display: inline-flex; width: max-content; align-items: center; text-decoration: none; }
.brand img { width: clamp(82px, 8vw, 115px); height: auto; }
.brand span { border-left: 1px solid var(--line); padding-left: .85rem; margin-left: .5rem; font-size: 1.55rem; line-height: .98; letter-spacing: -.035em; }
.navigation { min-width: 0; display: flex; align-items: center; gap: clamp(.9rem, 3vw, 3rem); }
.navigation a { text-decoration: none; padding-block: 1rem .75rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.navigation a:hover, .navigation a[aria-current] { border-color: var(--copper); }
.hero { position: relative; isolation: isolate; background: #f4eee7; border-bottom: 1px solid #e3dbd0; }
.hero::before { content: ''; position: absolute; inset: 0 0 0 auto; width: min(76%, 1100px); z-index: -1; background: url('/assets/alpi.webp') right center / cover no-repeat; mask-image: linear-gradient(90deg, transparent 2%, #000 65%); }
.hero-inner { padding: 1.55rem .65rem 1.1rem; }
.hero h1 { font-size: clamp(2.7rem, 4.2vw, 4.3rem); letter-spacing: -.055em; }
.hero p { margin-top: .35rem; font-size: clamp(1rem, 1.5vw, 1.32rem); letter-spacing: -.02em; }
.chart { min-width: 0; }
.chart svg { width: 100%; display: block; overflow: visible; touch-action: pan-y; }
.chart svg text { font-family: var(--sans); fill: var(--muted); }
.chart svg .gridline { stroke: #dcd6cd; stroke-width: 1; }
.chart svg .axis { stroke: #948d84; stroke-width: 1; }
.chart svg .zero { stroke: #aba195; stroke-dasharray: 4 3; }
.chart svg .cursor { stroke: var(--ink); stroke-width: 1; stroke-opacity: .47; }
.chart svg .window { fill: #eee0d1; opacity: .65; }
.chart svg .highlight { stroke: var(--surface); stroke-width: 1.5; }
.chart svg .cursor-time { fill: var(--ink); font-weight: 700; }
.chart-key { margin-top: .16rem; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .68rem; font-size: .72rem; color: var(--muted); }
.chart-key span { display: inline-flex; align-items: center; gap: .34rem; }
.swatch { width: 1.25rem; border-top: 2px solid var(--series); }
.swatch.dashed { border-top-style: dashed; }
.swatch.band { border: 0; height: .64rem; border-radius: 2px; background: #eee0d1; }
.chart-output { display: block; min-height: 1.18rem; margin-top: .3rem; color: var(--muted); font-size: .76rem; }
.shell, .masthead-inner { width: min(100% - 3rem, 1170px); }
.masthead-inner { grid-template-columns: 1fr auto; min-height: 74px; gap: 1rem; }
.navigation { gap: clamp(1.1rem, 3vw, 2.7rem); }
.navigation a { padding-block: 1rem .65rem; border-bottom-width: 2px; }
.brand img { width: 94px; }
.brand span { font-size: 1.42rem; }
.hero { min-height: 155px; }
.hero-inner { padding: 1.24rem 0 1.25rem; }
.hero h1 { font-size: clamp(2.55rem, 5vw, 3.65rem); }
.hero p { margin-top: .37rem; font-size: clamp(1rem, 1.6vw, 1.2rem); }
.workspace { padding-block: 1.05rem .4rem; }
.panel { border: 1px solid var(--line); border-radius: 11px; padding: clamp(1rem, 2.2vw, 1.65rem); background: var(--surface); margin-bottom: .9rem; min-width: 0; }
.panel h2, .prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.035em; }
.panel h3 { font-family: var(--display); font-size: 1.22rem; font-weight: 650; }
.run-fields, .observation-fields { display: flex; align-items: end; gap: .76rem; flex-wrap: wrap; margin-top: .8rem; }
label { display: grid; gap: .28rem; font-size: .9rem; font-weight: 650; }
input, select { min-width: 0; font: inherit; color: var(--ink); }
input[type=date], select { min-height: 2.5rem; padding: .45rem .7rem; background-color: #fffdf9; border: 1px solid #c6bcb0; border-radius: 5px; }
select { appearance: none; padding-right: 1.9rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='8'%3E%3Cpath fill='none' stroke='%23142e38' d='m1 1 5.5 5L12 1'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .65rem center; background-size: .65rem auto; }
input[type=file] { max-width: 100%; padding: .3rem; border: 1px solid var(--line); border-radius: 5px; background: #fffdf9; font-size: .85rem; }
input[type=file]::file-selector-button { margin-right: .55rem; border: 1px solid #cfc7bd; border-radius: 4px; padding: .4rem .6rem; background: #f5ede4; color: var(--ink); font: inherit; cursor: pointer; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .5rem .82rem; border: 1px solid transparent; border-radius: 5px; font-size: .92rem; line-height: 1.2; font-weight: 650; text-decoration: none; text-align: center; }
.button.primary { background: #214f4c; border-color: #173e3c; color: #fffaf3; }
.button.primary:hover:not(:disabled) { background: #173e3c; }
.button.quiet { color: var(--ink); background: #faf6f0; border-color: #cfc7bd; }
.button.quiet:hover:not(:disabled) { background: #eee6dc; }
button:disabled { cursor: wait; opacity: .58; }
.comparison-figure button:disabled, .inline-actions .button:disabled { cursor: default; }
.inline-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; margin-top: .75rem; }
.text-button, .file-link { position: relative; display: inline-block; padding: .18rem 0; border: 0; background: transparent; font: 650 .88rem/1.3 var(--sans); color: var(--green); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.text-button:hover, .file-link:hover { color: var(--copper); }
.file-link input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-link:focus-within { outline: 2px solid var(--copper); outline-offset: 4px; }
.inline-status { margin-top: .65rem; font-size: .87rem; color: var(--muted); }
.inline-status[data-tone=error] { color: #913d2a; }
.hint { color: var(--muted); font-size: .9rem; margin-top: .35rem; }
.section-head { display: flex; align-items: end; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.summary { display: flex; gap: .65rem 1.2rem; flex-wrap: wrap; margin: .85rem 0 .7rem; padding: .6rem .75rem; border-left: 3px solid var(--copper); background: #f5e8da; font-size: .91rem; }
.summary span { white-space: normal; }
.summary strong { color: #783e23; }
.chart-key { font-size: .85rem; gap: .3rem .85rem; }
.chart-output { font-size: .85rem; min-height: 1.25rem; }
.fold { margin-top: .76rem; padding-block: .55rem; border-top: 1px solid var(--line); }
.fold + .fold { margin-top: 0; }
.fold summary { font-weight: 650; }
.fold[open] summary { margin-bottom: .75rem; }
.diagnostics { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1.3rem; }
.diagnostics > div { min-width: 0; }
.diagnostics h3 { margin-bottom: .45rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; min-height: 2.5rem; font-weight: 500; }
input[type=checkbox] { appearance: auto; accent-color: var(--green); width: 1rem; height: 1rem; flex-shrink: 0; }
.comparison-figure { padding-top: .9rem; margin-top: .9rem; border-top: 1px solid var(--line); }
.comparison-figure figure { margin-top: .5rem; }
.metrics-layout { display: grid; grid-template-columns: 1.05fr 1fr; align-items: start; gap: 1rem 1.6rem; margin-top: .4rem; }
.metric-bars { display: grid; gap: .45rem; }
.metric-bar { display: grid; grid-template-columns: minmax(7.5rem, 1fr) 1fr 3.1rem; align-items: center; gap: .45rem; font-size: .82rem; }
.metric-bar-track { height: .75rem; border-radius: 3px; background: #eee8df; overflow: hidden; }
.metric-bar-track i { display: block; height: 100%; border-radius: inherit; }
.metric-bar b { justify-self: end; font-variant-numeric: tabular-nums; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: right; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: .48rem .55rem; white-space: nowrap; }
thead th { color: var(--muted); }
th:first-child, td:first-child { text-align: left; }
tr.highlight-row { background: #f5ede4; }
.prose { padding-top: 1.6rem; padding-bottom: 1rem; }
.prose h2, .prose p, .prose dl, .prose ul { max-width: 760px; }
.prose h2:not(:first-child) { margin-top: 1.7rem; }
.prose p { margin-top: .7rem; }
.prose dt { font-weight: 700; margin-top: .5rem; }
.prose dd { margin-left: 0; color: var(--muted); }
.prose .button { margin-top: 1rem; }
.sources { padding-left: 1.1rem; color: var(--green); }
.sources a { text-underline-offset: .19em; }
.footer { border-top: 1px solid var(--line); padding: .75rem 0 1rem; margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .7rem; color: var(--muted); font-size: .83rem; }
@media(max-width: 760px) {
  .shell, .masthead-inner { width: calc(100% - 1.6rem); }
  .masthead-inner { min-height: 65px; }
  .brand img { width: 66px; }
  .brand span { font-size: 1.13rem; padding-left: .48rem; margin-left: .28rem; }
  .navigation { gap: .85rem; }
  .navigation a { font-size: .88rem; padding-block: .55rem .34rem; }
  .hero { min-height: 147px; }
  .hero::before { width: 100%; opacity: .63; mask-image: linear-gradient(90deg, transparent 20%, #000 100%); }
  .diagnostics, .metrics-layout { grid-template-columns: 1fr; }
}
@media(max-width: 390px) {
  .masthead-inner { width: calc(100% - 1.25rem); gap: .5rem; }
  .brand img { width: 54px; }
  .brand span { font-size: 1.02rem; }
  .navigation { gap: .58rem; }
  .navigation a { font-size: .8rem; }
  .run-fields label { flex: 1 1 100%; }
}

@media(max-width:520px) {
  .masthead-inner { grid-template-columns:1fr; gap:.15rem; padding-block:.45rem 0; }
  .navigation { gap:clamp(.65rem,3vw,1.15rem); }
  .navigation a { padding-block:.58rem .32rem; }
}
