:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #13233d;
  background: #eef3f8;
  --muted: #4d6078;
  --line: #dce5ef;
  --accent: #1556a1;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.shell { width: min(100% - 2rem, 69rem); margin-inline: auto; }
header { background: #13233d; color: #e6f2ff; padding: .88rem 0; font-size: .9rem; font-weight: 700; }
main { padding-bottom: 2rem; }
.intro { margin: clamp(1.5rem, 5vw, 2.65rem) 0 1.15rem; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(1.85rem, 5vw, 3rem); line-height: 1.09; letter-spacing: -.04em; }
h2 { font-size: 1.19rem; }
h3 { font-size: .98rem; }
p { line-height: 1.5; }
.intro > p { color: var(--muted); margin: .55rem 0 .95rem; }
.actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
button { font: inherit; font-weight: 675; color: #17416f; background: #fff; border: 1px solid #bfcfe0; padding: .57rem .84rem; min-height: 2.75rem; border-radius: .5rem; cursor: pointer; }
button:hover:not(:disabled) { background: #e7f0fa; }
.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover:not(:disabled) { background: #12457e; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #4685c9; outline-offset: 3px; }
.status { margin: 0 .25rem; font-size: .85rem; color: var(--muted); }
#error { color: #8b3227; background: #fff2ef; padding: .6rem .75rem; border-radius: .4rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: .75rem; padding: clamp(.9rem, 3vw, 1.3rem); margin-bottom: .85rem; }
.hint { color: var(--muted); margin: .35rem 0 .7rem; font-size: .86rem; }
.sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem 1.05rem; }
.sliders > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .35rem .55rem; font-size: .86rem; }
.sliders label { font-weight: 660; }
output { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 650; }
input { accent-color: var(--accent); }
input[type="range"] { grid-column: 1 / -1; width: 100%; margin: 0; min-height: 1.55rem; }
.switches { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem 1.1rem; margin-top: .65rem; font-size: .88rem; }
.switches label { display: flex; align-items: center; gap: .35rem; min-height: 1.75rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin: .85rem 0; }
.metrics div { background: #edf4fb; padding: .62rem .7rem; border-radius: .5rem; }
dt { font-size: .8rem; color: var(--muted); }
dd { margin: .22rem 0 0; font-size: clamp(1rem, 2.25vw, 1.4rem); font-weight: 720; font-variant-numeric: tabular-nums; }
.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.35rem; padding-top: .35rem; }
.charts ul { list-style: none; padding: 0; margin: .5rem 0 .15rem; }
.charts li { display: grid; grid-template-columns: 5.25rem 1fr minmax(3.3rem, auto); gap: .4rem; align-items: center; font-size: .78rem; margin: .2rem 0; }
.charts meter { width: 100%; height: .85rem; accent-color: #3976b9; }
.charts .custom { font-weight: 720; color: #104f87; }
.charts strong { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow: auto; margin: .5rem 0; }
table { border-collapse: collapse; width: 100%; font-size: .83rem; }
th, td { border-bottom: 1px solid var(--line); text-align: right; padding: .52rem .56rem; }
th { color: var(--muted); vertical-align: bottom; }
th:first-child, td:first-child { text-align: left; }
tr.custom { background: #eef5fd; font-weight: 680; }
details { margin-top: .8rem; font-size: .82rem; color: var(--muted); }
summary { cursor: pointer; font-weight: 675; }
details li { margin: .3rem 0; }
@media (max-width: 48rem) {
  .sliders { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr; }
  table { min-width: 40rem; }
}
