: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; }
}


.viewer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 15.5rem); gap: 20px; }
canvas { width: 100%; height: auto; display: block; border: 1px solid #cbd8e4; border-radius: 8px; background: #f5f8fb; }
.facts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 16px; margin-bottom: 0; }
.facts dt { color: #536b82; font-size: .83rem; }
.facts dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; font-weight: 650; }
legend { font-weight: 650; padding: 0; margin-bottom: 8px; }
.field { display: grid; gap: 5px; font-size: .86rem; font-weight: 600; margin-bottom: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.form-grid .full { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 740px) {
  .viewer { grid-template-columns: 1fr; }
}
.key { display: flex; align-items: center; gap: 7px; }
.key span { width: .8em; height: .8em; border-radius: 2px; background: #b43e35; }
