:root {
    color-scheme: light;
    --navy: #0b284e;
    --navy-hover: #173b6b;
    --red: #df2443;
    --text: #142b49;
    --muted: #465c76;
    --line: #d8e0eb;
    --background: #f5f7fb;
    --white: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; border-top: .35rem solid var(--red); line-height: 1.5; }
[hidden] { display: none !important; }
.wrap { width: min(66rem, calc(100% - 3rem)); margin-inline: auto; }
.site-header { background: var(--red); border-bottom: 1px solid #af1b35; }
.header-content { min-height: 6.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-content img { width: 10.6rem; height: auto; display: block; }
.header-content span { text-align: right; color: var(--navy); background: var(--white); border-radius: .65rem; padding: .45rem .7rem; font-size: .9rem; }
.header-content strong { color: var(--text); white-space: nowrap; }
.intro { padding: clamp(2.5rem, 8vw, 5.5rem) 0 2.1rem; }
h1, h2, p { margin: 0; }
h1 { max-width: 16ch; font-size: clamp(2.1rem, 6vw, 4.3rem); line-height: 1.03; letter-spacing: -.045em; }
.intro p { margin-top: .95rem; color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.2rem); }
.manuals { display: grid; gap: 1.1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.manual, .reader { background: var(--white); border: 1px solid var(--line); border-radius: 1.15rem; }
.manual { padding: clamp(1.15rem, 3.2vw, 2rem); border-top: .25rem solid var(--red); }
.manual + .manual { border-top-color: var(--navy); }
.manual h2, .reader h2 { line-height: 1.2; font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.manual p { margin: .35rem 0 1.4rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.button, input, select { font: inherit; color: var(--navy); border: 1px solid var(--line); border-radius: .62rem; background: var(--white); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.85rem; padding: .56rem .9rem; font-weight: 650; text-decoration: none; cursor: pointer; }
.button.primary { color: var(--white); background: var(--navy); border-color: var(--navy); }
.button.primary:hover { background: var(--navy-hover); }
.button.secondary:hover { background: var(--background); }
.button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid #1769c0; outline-offset: 3px; }
.reader { margin-top: 1.6rem; overflow: hidden; scroll-margin-top: 1rem; }
.reader-header, .toolbar { display: flex; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; align-items: center; padding: 1rem; }
.toolbar { border-top: 1px solid var(--line); }
.page-control { gap: .35rem; }
.page-label, .zoom { display: inline-flex; gap: .35rem; align-items: center; font-size: .9rem; }
.page-label input { width: 3rem; padding: .5rem .25rem; text-align: center; appearance: textfield; }
.page-label input::-webkit-inner-spin-button { appearance: none; }
.zoom select { padding: .45rem; }
.reader-status { color: var(--muted); padding: .1rem 1rem .55rem; }
.surface { background: #e7edf5; overflow: auto; max-height: 78vh; padding: .55rem; }
#sheet { width: max-content; min-width: 100%; }
#sheet canvas { display: block; margin-inline: auto; background: var(--white); box-shadow: 0 .15rem .6rem #122f4e26; }
.site-footer { color: var(--muted); padding-block: 1.8rem; font-size: .9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 37rem) {
    .wrap { width: calc(100% - 1.5rem); }
    .header-content { min-height: 5rem; }
    .header-content img { width: 8rem; }
    .manuals { grid-template-columns: 1fr; }
    .manual .actions > * { flex: 1; }
    .reader-header, .toolbar { padding: .65rem; }
    .page-control .button { padding-inline: .45rem; }
}
