:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #192e43;
  background: #f2f5f8;
}

* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 960px; margin: 0 auto; padding: 48px 24px; }
a { color: #174f77; }
.eyebrow { font-size: .78rem; letter-spacing: .13em; text-transform: uppercase; color: #536b82; }
.eyebrow a { color: inherit; }
h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.03em; margin: 12px 0; line-height: 1.12; }
.intro { font-size: 1.1rem; color: #536b82; max-width: 66ch; }
p, footer { line-height: 1.6; }
.panel { margin-top: 24px; padding: 24px 28px; background: white; border: 1px solid #d7e1ea; border-radius: 14px; }
h2 { margin: 0 0 16px; font-size: 1.2rem; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
input, select {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-weight: 400;
  color: #192e43;
  padding: 7px 9px;
  border: 1px solid #b9c8d6;
  border-radius: 6px;
  background: white;
}
input:disabled { background: #f2f5f8; }
button {
  font: inherit;
  padding: 9px 15px;
  border-radius: 7px;
  border: 1px solid #174f77;
  background: #174f77;
  color: white;
  cursor: pointer;
}
button:hover:not(:disabled) { filter: brightness(.93); }
button:disabled { opacity: .45; cursor: not-allowed; }
.secondary { background: white; color: #174f77; }
:focus-visible { outline: 3px solid #e7a840; outline-offset: 3px; }
.hint, footer { color: #536b82; font-size: .88rem; }
#status { margin: 12px 0 0; }
#error { color: #9a2323; font-size: .9rem; font-weight: 600; }
footer { margin-top: 28px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 600px) {
  main { padding: 24px 16px; }
  .panel { padding: 18px; }
}


.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; }
.toolbar label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; }
.toolbar input, .toolbar select { min-width: 5rem; }
.toolbar button { padding: 7px 11px; font-size: .9rem; }
.secondary-toolbar { margin-top: 14px; }
.matrix-wrap { overflow-x: auto; padding: 2px; }
#matrix { border-collapse: separate; border-spacing: 0; }
#matrix td, #matrix th { text-align: center; padding: 8px; }
#matrix td { min-width: 6rem; }
#matrix td input { width: 5.5rem; text-align: right; font-variant-numeric: tabular-nums; }
#matrix td:last-child { border-left: 2px solid #b9c8d6; }
#matrix thead th { color: #536b82; font-size: .86rem; }
#matrix .diagonal { background: #eef5fb; }
.pivot { display: block; width: 100%; margin-top: 5px; padding: 4px 6px; font-size: .78rem; }
