:root {
  color-scheme: light;
  --navy-950: #08131f;
  --navy-900: #102033;
  --navy-800: #17324d;
  --navy-700: #244a6c;
  --ink: #142033;
  --muted: #58677b;
  --line: #d8e1ea;
  --paper: #ffffff;
  --wash: #f4f7fa;
  --cyan: #0099b8;
  --cyan-soft: #e5f7fb;
  --blue: #2467df;
  --amber: #d57800;
  --amber-soft: #fff4da;
  --red: #b42318;
  --red-soft: #fff0ef;
  --green: #14804a;
  --green-soft: #eaf8f0;
  --shadow: 0 18px 50px rgba(13, 38, 62, 0.12);
  --sidebar: 300px;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.58;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--wash);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: #075e9f;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

a:hover {
  color: #003e72;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: #fff;
  color: #000;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  transform: translateY(0);
}

.reading-progress {
  position: fixed;
  z-index: 1500;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), #f5b82e);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 191, 220, 0.16), transparent 30%),
    var(--navy-950);
  color: #dbe8f4;
}

.brand {
  padding: 26px 24px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  border: 1px solid rgba(69, 217, 238, 0.55);
  border-radius: 11px;
  color: #50d9ef;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #fff;
  font-size: 1.02rem;
}

.brand span {
  margin-top: 2px;
  color: #91a9bd;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-tools {
  padding: 16px 18px 10px;
}

.search-label {
  display: block;
  margin-bottom: 6px;
  color: #9fb5c8;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#help-search {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #42586d;
  border-radius: 7px;
  outline: 0;
  background: #14263a;
  color: #fff;
}

#help-search::placeholder {
  color: #8da1b3;
}

#help-search:focus {
  border-color: #4dd8ef;
  box-shadow: 0 0 0 3px rgba(77, 216, 239, 0.18);
}

.search-status {
  min-height: 22px;
  margin: 6px 2px 0;
  color: #9fb5c8;
  font-size: 0.76rem;
}

.toc {
  padding: 4px 12px 28px;
}

.toc a {
  display: block;
  margin: 2px 0;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: #bbcad8;
  font-size: 0.86rem;
  line-height: 1.25;
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.toc a.active {
  border-left-color: #44d7ee;
  background: rgba(54, 201, 227, 0.12);
  color: #fff;
}

.toc a[data-level="3"] {
  padding-left: 24px;
  color: #93aabc;
  font-size: 0.79rem;
}

.sidebar-footer {
  padding: 14px 22px 26px;
  color: #7f97aa;
  font-size: 0.73rem;
}

.content {
  grid-column: 2;
  min-width: 0;
  padding: 0 38px 80px;
}

.document {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.cover {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  margin: 24px 0 34px;
  border-radius: 18px;
  background:
    linear-gradient(115deg, rgba(7, 19, 31, 0.98) 0 45%, rgba(7, 19, 31, 0.7) 70%, rgba(7, 19, 31, 0.42)),
    url("screens/00-splash.png") center / cover no-repeat;
  color: #fff;
  box-shadow: var(--shadow);
}

.cover-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 660px;
  min-height: 560px;
  padding: 62px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #65dced;
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cover h1 {
  max-width: 620px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  font-weight: 760;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.cover .subtitle {
  max-width: 560px;
  margin: 22px 0 26px;
  color: #d7e6f1;
  font-size: 1.15rem;
}

.cover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.cover-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #dbe8f3;
  font-size: 0.78rem;
}

.cover-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.button.primary {
  background: #24c3dc;
  color: #071923;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button:hover {
  filter: brightness(1.05);
}

.manual-section {
  margin: 0 0 28px;
  padding: 42px 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 5px 20px rgba(16, 42, 66, 0.05);
}

.manual-section[hidden] {
  display: none;
}

.search-result-target {
  scroll-margin-top: 22px;
  outline: 3px solid rgba(8, 145, 178, 0.42);
  outline-offset: 6px;
  border-radius: 4px;
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2,
h3,
h4 {
  color: var(--navy-900);
  line-height: 1.2;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  letter-spacing: -0.025em;
}

h3 {
  margin: 34px 0 13px;
  font-size: 1.28rem;
}

h4 {
  margin: 25px 0 10px;
  font-size: 1.02rem;
}

p,
ul,
ol,
table,
figure,
.callout,
.step-flow,
.storage-map,
.metric-grid {
  margin-top: 0;
  margin-bottom: 20px;
}

li + li {
  margin-top: 7px;
}

.lead {
  color: #334760;
  font-size: 1.08rem;
}

.muted,
.figure-note {
  color: var(--muted);
}

.small {
  font-size: 0.86rem;
}

.callout {
  position: relative;
  padding: 18px 20px 17px 56px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 9px;
  background: #f8fafc;
}

.callout::before {
  position: absolute;
  top: 17px;
  left: 19px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: #fff;
  content: "i";
  font-weight: 800;
}

.callout strong:first-child {
  display: block;
  margin-bottom: 4px;
}

.callout.info {
  border-left-color: var(--blue);
  background: #eef5ff;
}

.callout.info::before {
  background: var(--blue);
}

.callout.warning {
  border-left-color: var(--amber);
  background: var(--amber-soft);
}

.callout.warning::before {
  background: var(--amber);
  content: "!";
}

.callout.danger {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.callout.danger::before {
  background: var(--red);
  content: "!";
}

.callout.success {
  border-left-color: var(--green);
  background: var(--green-soft);
}

.callout.success::before {
  background: var(--green);
  content: "✓";
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.quick-strip a {
  padding: 14px;
  border: 1px solid #cae0e8;
  border-radius: 9px;
  background: var(--cyan-soft);
  color: #15455a;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.step-flow {
  counter-reset: procedure;
  padding: 0;
  list-style: none;
}

.step-flow > li {
  position: relative;
  min-height: 56px;
  margin: 0 0 12px;
  padding: 13px 18px 13px 66px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
}

.step-flow > li::before {
  position: absolute;
  top: 10px;
  left: 13px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  content: counter(procedure);
  counter-increment: procedure;
  font-weight: 800;
}

.step-flow > li strong {
  color: var(--navy-900);
}

.two-col,
.three-col,
.metric-grid,
.storage-map {
  display: grid;
  gap: 16px;
}

.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.storage-map {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.metric,
.storage-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcfd;
}

.card h3,
.card h4,
.metric h4,
.storage-card h4 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child,
.metric p:last-child,
.storage-card p:last-child {
  margin-bottom: 0;
}

.metric .value {
  display: block;
  margin: 3px 0 7px;
  color: var(--cyan);
  font-size: 1.3rem;
  font-weight: 800;
}

.storage-card .tag,
.chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9eff5;
  color: #34506a;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.chip.operator {
  background: var(--green-soft);
  color: var(--green);
}

.chip.service {
  background: var(--amber-soft);
  color: #8a4a00;
}

.chip.raw {
  background: var(--red-soft);
  color: var(--red);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

th {
  background: #eaf0f5;
  color: #243c55;
  font-size: 0.79rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td {
  background: #fafcfd;
}

code,
kbd {
  border: 1px solid #d4dde5;
  border-radius: 4px;
  background: #f2f5f7;
  color: #17324d;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.9em;
}

code {
  padding: 1px 5px;
}

kbd {
  padding: 2px 6px;
  box-shadow: inset 0 -1px 0 #c5cfd8;
}

figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f6f8fa;
}

.screenshot-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: #101820;
}

.screenshot-button img {
  display: block;
  width: 100%;
  height: auto;
}

.screenshot-button::after {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 5px;
  background: rgba(7, 18, 29, 0.8);
  color: #fff;
  content: "Open full size";
  font-size: 0.72rem;
  font-weight: 700;
}

figcaption {
  padding: 12px 15px;
  color: #4c5f73;
  font-size: 0.84rem;
}

.annotated {
  position: relative;
}

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f5a400;
  color: #122034;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
  font-weight: 900;
}

.figure-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  font-size: 0.84rem;
}

.figure-key span b {
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-right: 6px;
  border-radius: 50%;
  background: #f5a400;
  color: #142033;
}

.report-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-gallery figure {
  margin-bottom: 0;
}

.report-gallery .screenshot-button {
  max-height: 420px;
  overflow: hidden;
  background: #e7ebef;
}

.report-gallery img {
  object-fit: cover;
  object-position: top;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.green { background: var(--green); }
.status-dot.amber { background: var(--amber); }
.status-dot.red { background: var(--red); }
.status-dot.blue { background: var(--blue); }

.formula {
  margin: 20px 0;
  padding: 22px;
  border-radius: 9px;
  background: var(--navy-900);
  color: #fff;
  text-align: center;
  font-family: Cambria, Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.formula small {
  display: block;
  margin-top: 8px;
  color: #a9c2d7;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.75rem;
}

.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  position: absolute;
  top: 0.05em;
  left: 0;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #7590a8;
  border-radius: 4px;
  content: "";
}

.decision {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 20px;
}

.decision > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.decision .arrow {
  display: grid;
  place-items: center;
  border: 0;
  color: var(--cyan);
  font-size: 1.6rem;
  font-weight: 800;
}

details {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

summary {
  padding: 14px 16px;
  cursor: pointer;
  color: var(--navy-800);
  font-weight: 750;
}

details > div {
  padding: 0 16px 16px;
}

details > div p:last-child,
details > div ul:last-child {
  margin-bottom: 0;
}

.no-results {
  display: none;
  margin: 24px 0;
  padding: 26px;
  border: 1px dashed #9eafbf;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.no-results.visible {
  display: block;
}

.page-footer {
  margin: 40px 0 0;
  padding: 28px 6px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.mobile-bar {
  display: none;
}

.lightbox {
  width: min(96vw, 1800px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #09131e;
  color: #fff;
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.6);
}

.lightbox::backdrop {
  background: rgba(0, 8, 16, 0.88);
}

body.modal-open::before {
  position: fixed;
  z-index: 1990;
  inset: 0;
  background: rgba(0, 8, 16, 0.88);
  content: "";
}

.lightbox.fallback-open {
  position: fixed;
  z-index: 2000;
  inset: 3vh 2vw;
  display: block;
  max-height: 94vh;
  margin: auto;
  overflow: auto;
}

.lightbox img {
  display: block;
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 16px;
}

.lightbox-close {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #698096;
  border-radius: 5px;
  cursor: pointer;
  background: #1d3043;
  color: #fff;
}

.back-to-top {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 20px;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: var(--navy-800);
  color: #fff;
  box-shadow: 0 8px 24px rgba(8, 27, 44, 0.25);
}

.back-to-top.visible {
  display: block;
}

@media (max-width: 1080px) {
  :root { --sidebar: 260px; }
  .content { padding: 0 22px 60px; }
  .manual-section { padding: 34px 32px; }
  .quick-strip { grid-template-columns: repeat(2, 1fr); }
  .report-gallery { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .layout { display: block; }
  .sidebar {
    display: none;
    width: min(88vw, 330px);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.4);
  }
  .sidebar.open { display: block; }
  .content { padding: 66px 14px 50px; }
  .mobile-bar {
    position: fixed;
    z-index: 95;
    inset: 0 0 auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 7px 12px;
    border-bottom: 1px solid #263b50;
    background: var(--navy-950);
    color: #fff;
  }
  .mobile-bar button {
    padding: 6px 10px;
    border: 1px solid #536a7f;
    border-radius: 5px;
    background: #162a3e;
    color: #fff;
  }
  .cover,
  .cover-inner { min-height: 480px; }
  .cover { margin-top: 0; }
  .cover-inner { padding: 34px; }
  .manual-section { padding: 30px 24px; }
  .two-col,
  .three-col,
  .metric-grid,
  .storage-map,
  .report-gallery { grid-template-columns: 1fr; }
  .figure-key { grid-template-columns: 1fr; }
  .decision { grid-template-columns: 1fr; }
  .decision .arrow { transform: rotate(90deg); }
}

@media (max-width: 520px) {
  .content { padding-inline: 8px; }
  .cover { border-radius: 10px; }
  .cover-inner { padding: 28px 23px; }
  .cover h1 { font-size: 2.4rem; }
  .cover-actions { flex-direction: column; }
  .manual-section {
    padding: 27px 18px;
    border-radius: 10px;
  }
  .quick-strip { grid-template-columns: 1fr; }
  .step-flow > li { padding-left: 58px; }
  th,
  td { padding: 9px 10px; }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 15mm 13mm 16mm;
  }

  :root {
    font-size: 10.3pt;
    --line: #b9c4ce;
  }

  html { scroll-padding-top: 0; }
  body { background: #fff; }
  .sidebar,
  .mobile-bar,
  .reading-progress,
  .cover-actions,
  .back-to-top,
  .screenshot-button::after,
  .no-results,
  .lightbox { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  .document { width: 100%; }
  .cover {
    min-height: 245mm;
    margin: 0;
    border-radius: 0;
    break-after: page;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .cover-inner { min-height: 245mm; }
  .manual-section {
    margin: 0 0 10mm;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-before: page;
  }
  .manual-section[hidden] { display: block; }
  .search-result-target { outline: 0; }
  h2,
  h3,
  h4 { break-after: avoid; }
  h2 { font-size: 22pt; }
  h3 { margin-top: 7mm; }
  p,
  li { orphans: 3; widows: 3; }
  figure,
  .callout,
  .card,
  .metric,
  .storage-card,
  .step-flow > li,
  tr { break-inside: avoid; }
  figure { max-height: none; }
  .screenshot-button { cursor: default; }
  .table-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  details { break-inside: avoid; }
  details > div { display: block !important; }
  .report-gallery { grid-template-columns: 1fr; }
  .report-gallery .screenshot-button { max-height: none; }
}
