/* Dutybook. Colors from research/07: Engine Red, Duty Navy, green, dark amber.
   Bright amber only as a fill under navy text. Fonts are self-hosted later
   (CSP allows only 'self'); the stacks fall back cleanly until then. */
:root {
  --red: #B3261E; --navy: #1B2A41; --green: #1E7B45; --amber-dark: #8A5300; --amber: #F2A900;
  --bg: #F6F5F1; --card: #FFFFFF; --text: #1B2A41; --muted: #4A5568; --line: #D9D6CC;
  --focus: #1B2A41;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F1724; --card: #172235; --text: #EEF1F6; --muted: #B8C2D3; --line: #2C3A52;
          --focus: #F2A900; --red: #F28B82; --green: #7BD3A0; --amber-dark: #F2C46B; }
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.3rem; margin-top: 1rem; } h3 { font-size: 1.1rem; margin-top: 1rem; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: var(--card); padding: .5rem; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem 1rem;
       background: #1B2A41; color: #fff; }
.top a { color: #fff; text-decoration: none; } .top a:hover { text-decoration: underline; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.badge-test { background: var(--amber); color: #1B2A41; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 3px; }
.top nav { margin-left: auto; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.top button.link { color: #fff; }
main { max-width: 64rem; margin: 0 auto; padding: 1rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem; margin: 0 0 1rem; }
.card.narrow { max-width: 28rem; margin: 2rem auto; }
.lede { color: var(--muted); margin-top: 0; }
label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
input, select { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #8A8F99; border-radius: 6px;
                background: var(--card); color: var(--text); min-height: 44px; }
button { font: inherit; cursor: pointer; min-height: 44px; }
button.primary, button.secondary { display: inline-block; margin-top: 1rem; padding: .6rem 1.2rem; border-radius: 6px; font-weight: 600; }
button.primary { background: var(--red); color: #fff; border: 0; width: 100%; }
@media (prefers-color-scheme: dark) { button.primary { background: #B3261E; } }
button.secondary { background: transparent; color: var(--text); border: 2px solid var(--text); }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; color: inherit; min-height: 0; }
button.danger, .danger { color: var(--red); }
form.inline { display: inline; }
.grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); align-items: end; }
.error { border-left: 4px solid var(--red); padding: .5rem .75rem; background: color-mix(in srgb, var(--red) 8%, transparent); }
.notice { border-left: 4px solid var(--green); padding: .5rem .75rem; }
.small { font-size: .875rem; color: var(--muted); }
.or { text-align: center; color: var(--muted); margin: 1rem 0 0; }
.tag { font-size: .75rem; border: 1px solid currentColor; border-radius: 3px; padding: 0 .35rem; white-space: nowrap; }
.tag.warn { color: var(--amber-dark); }
table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
th, td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td.actions form { display: block; margin: .15rem 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; }
.facts dt { font-weight: 600; } .facts dd { margin: 0; }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; }
code.secret { word-break: break-all; font-size: .95rem; }
.switcher { display: flex; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.switcher label { margin: 0; } .switcher button { margin-top: 0; }
footer { max-width: 64rem; margin: 2rem auto; padding: 0 1rem; color: var(--muted); font-size: .875rem; }
@media (max-width: 40rem) { table { font-size: .9rem; } th, td { padding: .4rem .25rem; } }
