:root {
  color-scheme: light;
  --navy: #08235f;
  --blue: #163e78;
  --ink: #172235;
  --muted: #536683;
  --light: #eff3f9;
  --rule: #b8c8df;
  --line: #d7e1ef;
  --gutter: clamp(18px, 4vw, 48px);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: white; }
a { color: var(--blue); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid #286acf; outline-offset: 3px; }
h1, h2, h3 { color: var(--navy); line-height: 1.14; margin: 0; }
h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); letter-spacing: -.018em; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 20px; }
.container { width: min(100%, 1272px); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; z-index: 3; top: .5rem; left: .5rem; transform: translateY(-200%); padding: .65rem; background: white; }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.header-inner a { text-decoration: none; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 1.32rem; font-weight: 700; color: var(--navy); white-space: nowrap; }
.header-title { padding-left: 16px; border-left: 1px solid var(--line); font-size: .92rem; }
.header-pdf { margin-left: auto; padding: 8px 13px; border: 1px solid var(--rule); border-radius: 5px; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.header-pdf:hover, .button.copy:hover { background: var(--light); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .55rem 1rem; padding-block: 20px 26px; color: var(--muted); font-size: .875rem; }
.site-footer::before { content: ""; flex: 0 0 100%; border-top: 1px solid var(--line); margin-bottom: 10px; }

.home-layout { padding-top: clamp(20px, 4vw, 40px); padding-bottom: 30px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); border-radius: 10px; overflow: hidden; background: var(--navy); color: white; }
.hero-copy { padding: clamp(28px, 5vw, 66px); align-self: center; }
.hero h1 { color: white; font-size: clamp(2.3rem, 5.1vw, 4.4rem); }
.hero p { margin: 12px 0; }
.hero .edition { margin: 0 0 17px; color: #c5d5f0; font-size: .85rem; }
.hero .platforms { margin-top: 20px; margin-bottom: 2px; font-weight: 700; }
.hero .firmware-note { margin: 0 0 23px; color: #d7e4f9; font-size: .91rem; }
.hero > img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; min-height: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 5px; font: inherit; font-size: .9rem; font-weight: 700; background: white; color: var(--navy); text-decoration: none; cursor: pointer; }
.button.primary:hover { background: #dce7f7; }
.home-section { margin-top: clamp(32px, 5vw, 55px); }
.home-section > h2 { margin-bottom: 16px; }
.quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.quick-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 100%; min-height: 65px; padding: 12px 15px; border-radius: 5px; background: var(--light); color: var(--navy); font-weight: 700; line-height: 1.35; text-decoration: none; }
.quick-links a::after { content: "→"; color: var(--blue); font-weight: 400; }
.quick-links a:hover { background: #e0e9f7; text-decoration: underline; }
.directory { list-style: none; padding: 0; margin: 0; }
.directory a { display: grid; grid-template-columns: 2ch 1fr; gap: 10px; align-items: baseline; padding: 8px 9px; border-radius: 4px; line-height: 1.35; color: var(--navy); text-decoration: none; }
.directory a:hover { background: var(--light); text-decoration: underline; }
.directory .section-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.contents .directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; border-top: 1px solid var(--line); }
.contents li { border-bottom: 1px solid var(--line); }
.contents a { padding: 13px 10px; }
.about { max-width: 850px; }
.foreword { margin-top: 22px; padding: 13px 17px; background: var(--light); border-radius: 5px; }
.foreword summary { font-weight: 700; color: var(--navy); cursor: pointer; }

.chapter-layout { display: grid; grid-template-columns: minmax(210px, 255px) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); padding-block: 28px 32px; align-items: start; }
.sidebar { position: sticky; top: 18px; max-height: calc(100svh - 36px); overflow: auto; padding-right: 13px; padding-bottom: 4px; border-right: 1px solid var(--line); font-size: .875rem; }
.side-title { display: block; margin: 2px 9px 10px; font-size: 1rem; font-weight: 700; text-decoration: none; }
.directory a[aria-current="page"] { background: var(--light); font-weight: 700; }
.mobile-directory { display: none; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; font-size: .88rem; color: var(--muted); }
.chapter-title { padding: 13px 0 20px; border-bottom: 1px solid var(--line); }
.chapter-title h1 { margin-bottom: 16px; }
.copy-status { display: inline-block; margin-left: .65rem; color: var(--muted); font-size: .875rem; }
.local-nav { margin: 21px 0 27px; padding: 16px 19px; border: 1px solid var(--line); border-radius: 5px; background: var(--light); }
.local-mobile { display: none; }
.local-nav h2 { font-size: 1rem; margin: 0 0 .6rem; }
.local-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; margin: 0; padding: 0; list-style: none; }
.local-nav a { display: block; padding: 4px 0; font-size: .94rem; line-height: 1.35; }
.prose { overflow-wrap: anywhere; }
.chapter .prose { padding-top: 4px; }
.prose p { margin: .85em 0; }
.prose h2 { margin: 1.34em 0 .65em; }
.prose h2:target { box-shadow: -4px 0 0 var(--rule); padding-left: 9px; }
.permalink { display: inline-block; margin-left: .2em; color: var(--muted); font-size: .82em; font-weight: 400; text-decoration: none; }
.permalink:hover { text-decoration: underline; }
.prose ul, .prose ol { padding-inline-start: 1.55rem; margin: .75em 0 1em; }
.prose li + li { margin-top: .35em; }
.guide-label, .prose li::marker { color: var(--navy); }
.prose code { background: var(--light); padding: .05em .22em; border-radius: 3px; font-size: .93em; }
.callout { background: var(--navy); color: white; margin: 1.2em 0; padding: .95em 1.1em; border-radius: 4px; }
.callout p { margin: .25em 0 0; }
.callout a { color: white; }
table { border-collapse: collapse; width: 100%; margin: 1.1em 0; font-size: .94rem; line-height: 1.45; }
th, td { padding: .62em .82em; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
thead { background: var(--navy); color: white; }
tbody th { width: 35%; font-weight: 600; }
tbody tr:nth-child(even) { background: var(--light); }
.cell-label { display: none; }
figure { margin: 1.4em 0; }
figure > a { display: block; width: fit-content; margin-inline: auto; }
figure img { margin: auto; border: 1px solid var(--line); border-radius: 5px; }
figcaption { margin: .5rem 0 0; color: var(--muted); text-align: center; font-size: .9rem; }
.signal-map { margin-top: 1em; }
.signal-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.signal-flow > div { height: 100%; display: grid; align-content: center; gap: 4px; padding: 12px 8px; color: var(--navy); text-align: center; background: var(--light); border: 1px solid var(--rule); border-radius: 5px; }
.signal-flow div span { font-size: .85rem; }
.signal-arrow { color: var(--blue); }
.neighbours { display: flex; gap: 10px; margin-top: 30px; }
.neighbours a { flex: 1; padding: 12px 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.neighbours a:hover { background: var(--light); text-decoration: underline; }
.neighbours small { display: block; color: var(--muted); }

@media (max-width: 900px) {
  .chapter-layout { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .sidebar { display: none; }
  .mobile-directory { display: block; margin: 0 0 20px; background: var(--light); border-radius: 5px; border: 1px solid var(--line); }
  .mobile-directory summary { padding: 10px 12px; cursor: pointer; color: var(--navy); font-weight: 700; }
  .mobile-directory nav { padding: 0 6px 7px; }
  .mobile-directory a { padding-block: 9px; }
  .mobile-directory a[aria-current="page"] { background: white; }
  .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .header-inner { gap: 9px; min-height: 62px; }
  .brand { font-size: 1.15rem; }
  .brand img { width: 28px; }
  .header-title { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero > img { max-height: 198px; object-position: center 73%; }
  .hero-copy { padding: 24px 20px; }
  .quick-links, .contents .directory, .local-nav ul { grid-template-columns: minmax(0, 1fr); }
  .quick-links a { min-height: 44px; }
  .contents a { padding: 11px 5px; }
  .local-desktop { display: none; }
  .local-mobile { display: block; padding: 0; }
  .local-mobile summary { padding: 11px 14px; cursor: pointer; color: var(--navy); font-weight: 700; }
  .local-mobile nav { padding: 0 14px 8px; }
  .local-nav a { padding: 7px 0; }
  table, tbody, tbody tr, tbody th, tbody td { display: block; width: 100%; }
  thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
  tbody tr { margin: .55rem 0; background: var(--light); border: 1px solid var(--line); border-radius: 5px; }
  tbody th, tbody td { border: 0; }
  tbody th { padding-bottom: .15em; color: var(--navy); }
  tbody td { padding-top: .3em; }
  .cell-label { display: block; margin-top: .2em; font-size: .86em; font-weight: 700; color: var(--muted); }
  .signal-flow { grid-template-columns: minmax(0, 1fr); }
  .signal-arrow { transform: rotate(90deg); justify-self: center; }
  .neighbours { flex-direction: column; }
}
@media print {
  .site-header, .sidebar, .mobile-directory, .button, .neighbours, .local-nav, .permalink { display: none; }
  .chapter-layout { display: block; padding: 0; }
  .callout { border: 1px solid var(--rule); background: white; color: var(--ink); }
  .callout a { color: var(--blue); }
  tr, figure, h2 { break-inside: avoid; }
}
