:root {
  --ink: #17324d;
  --muted: #617787;
  --accent: #087f8c;
  --accent-dark: #075f68;
  --navy: #103a59;
  --bg: #f2f6f7;
  --card: #fff;
  --line: #d7e1e6;
  --soft: #eef8f8;
  --warning: #fff8e7;
  --warning-line: #e6c35c;
  --shadow: 0 8px 30px #17324d14;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 15px/1.65 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: #087784; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }
button, input { font: inherit; }

.manual-header {
  color: #fff;
  background: linear-gradient(120deg, #103a59 0%, #087f8c 100%);
  border-top: 5px solid #f9eeee;
}
.manual-header-inner {
  max-width: 1500px;
  margin: auto;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.manual-header h1 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.15; }
.manual-header p { margin: 7px 0 0; opacity: .92; }
.manual-header .eyebrow {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.viewer-version {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #ffffff1c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
}
.brand-link {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 16px #06263a44;
  transition: transform .15s ease;
}
.brand-link:hover { transform: translateY(-2px); }
.brand-link img { display: block; width: 191px; height: 42px; object-fit: contain; }

.manual-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffffee;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.manual-toolbar-inner {
  max-width: 1500px;
  min-height: 61px;
  margin: auto;
  padding: 9px 28px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.tool-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid #b9cbd3;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.tool-button:hover { background: #eaf5f6; color: var(--ink); }
.tool-button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.search-box {
  flex: 1 1 330px;
  min-width: 180px;
  max-width: 600px;
  position: relative;
}
.search-box input {
  width: 100%;
  min-height: 40px;
  padding: 8px 57px 8px 12px;
  border: 1px solid #b9cbd3;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}
.search-box input:focus { outline: 3px solid #66c4ca55; border-color: var(--accent); }
.search-box kbd {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #f5f7f8;
  font-size: 10px;
}
.search-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mobile-only { display: none; }

.manual-layout {
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px 28px 60px;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.manual-sidebar {
  position: sticky;
  top: 83px;
  max-height: calc(100vh - 103px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 5px 10px;
  border-bottom: 1px solid var(--line);
}
.close-toc { display: none; border: 0; color: var(--ink); background: transparent; font-size: 24px; cursor: pointer; }
#manualToc ul { margin: 10px 0 0; padding: 0; list-style: none; }
#manualToc li { margin: 1px 0; }
#manualToc a {
  display: block;
  padding: 5px 7px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: #466073;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
}
#manualToc li.level-3 a { padding-left: 18px; font-size: 11px; }
#manualToc a:hover, #manualToc a.active {
  border-left-color: var(--accent);
  color: var(--accent-dark);
  background: #eaf7f7;
}
.loading-small { color: var(--muted); font-size: 12px; }

.manual-document {
  min-width: 0;
  padding: clamp(22px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.manual-document > h1:first-child {
  margin-top: 0;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--accent);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}
.manual-document h2 {
  margin: 2.2em 0 .7em;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 25px;
  line-height: 1.25;
}
.manual-document h3 { margin: 1.7em 0 .55em; color: var(--accent-dark); font-size: 19px; }
.manual-document h4 { color: var(--navy); font-size: 16px; }
.manual-document p { margin: .65em 0 1em; }
.manual-document li { margin: .25em 0; }
.manual-document blockquote {
  margin: 1.25em 0;
  padding: 12px 16px;
  border-left: 5px solid var(--warning-line);
  border-radius: 0 8px 8px 0;
  background: var(--warning);
}
.manual-document blockquote p { margin: .35em 0; }
.manual-document hr { margin: 34px 0; border: 0; border-top: 1px solid var(--line); }
.manual-document code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #7a2943;
  background: #f4edf0;
  font: .9em ui-monospace, SFMono-Regular, Consolas, monospace;
}
.manual-document pre {
  max-width: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: 9px;
  color: #e8f2f4;
  background: #102c42;
}
.manual-document pre code { padding: 0; color: inherit; background: transparent; }
.manual-document table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0 25px;
  border-collapse: collapse;
  font-size: 13px;
}
.manual-document th, .manual-document td {
  min-width: 90px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.manual-document th { color: var(--navy); background: #eaf5f6; }
.manual-document tbody tr:nth-child(even) { background: #f8fafb; }
.manual-document mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px 0;
}
.manual-document mjx-container:not([display="true"]) {
  display: inline-block;
  max-width: 100%;
  margin: 0 .08em;
  vertical-align: -.08em;
  white-space: nowrap;
}
.manual-document li mjx-container:not([display="true"]),
.manual-document td mjx-container:not([display="true"]) {
  margin-inline: .04em;
}
.heading-anchor {
  margin-left: 8px;
  color: #87a4ad;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
}
h2:hover .heading-anchor, h3:hover .heading-anchor { opacity: 1; }
mark.manual-match { padding: 1px 2px; background: #ffe68a; border-radius: 2px; }
mark.manual-match.current { outline: 2px solid #d47500; background: #ffd064; }

.loading-card {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
}
.spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #dcebec;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-card {
  padding: 18px;
  border: 1px solid #e4a2a8;
  border-radius: 9px;
  color: #842431;
  background: #fff0f1;
}
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 20px #17324d44;
  cursor: pointer;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.noscript { margin: 20px; padding: 15px; background: #fff3cd; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 980px) {
  .manual-toolbar-inner { flex-wrap: wrap; }
  .mobile-only { display: inline-flex; }
  .manual-layout { grid-template-columns: 1fr; padding: 16px; }
  .manual-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    width: min(340px, 88vw);
    max-height: none;
    border-radius: 0 12px 12px 0;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .manual-sidebar.open { transform: translateX(0); box-shadow: 20px 0 80px #0005; }
  .close-toc { display: block; }
}
@media (max-width: 690px) {
  .manual-header-inner { align-items: flex-start; flex-direction: column; padding: 20px 16px; }
  .brand-link img { width: 155px; height: auto; }
  .manual-toolbar-inner { padding: 8px 12px; }
  .search-box { order: 5; flex-basis: 100%; max-width: none; }
  .search-status { order: 6; }
  .manual-document { padding: 20px 16px; border-radius: 10px; }
  .manual-document h2 { font-size: 21px; }
}
@media print {
  body { background: #fff; font-size: 11pt; }
  .manual-header, .manual-toolbar, .manual-sidebar, .back-to-top { display: none !important; }
  .manual-layout { display: block; max-width: none; padding: 0; }
  .manual-document { padding: 0; border: 0; box-shadow: none; }
  .manual-document h2 { break-after: avoid; }
  .manual-document table, .manual-document pre, .manual-document blockquote { break-inside: avoid; }
  .heading-anchor { display: none; }
  a { color: inherit; text-decoration: none; }
}
