/*
 * ADRS Marine documentation.
 *
 * Follows DESIGN_LANGUAGE.md so the docs read as part of the product rather
 * than as a separate site: white canvas, one indigo accent, hairline borders,
 * radii capped at 8px, monospace reserved for technical labels and data.
 *
 * Tokens mirror the platform's own light and dark palettes, so a reader who
 * runs the product in dark mode does not get flashbanged by its manual.
 */

:root {
  --canvas: #f5f6fb;
  --bg: #ffffff;
  --bg2: #eff1f7;
  --ink: #0a0c12;
  --ink2: #565e6b;
  --ink3: #8f97a4;
  --line: #e1e4ec;
  --line2: #eaecf2;
  --blue: #4c57f0;
  --blue-ink: #3b45d6;
  --blue-soft: #eceefe;
  --success: #16a34a;
  --success-soft: #e3f5eb;
  --warn: #d97706;
  --warn-soft: #fbefda;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --shadow: 0 18px 44px rgba(10, 12, 18, 0.14);

  --aurora1: rgba(76, 87, 240, 0.4);
  --aurora2: rgba(56, 189, 248, 0.26);
  --aurora3: rgba(251, 146, 60, 0.42);
  --aurora4: rgba(244, 114, 182, 0.3);
  --aurora-blend: normal;

  --sans: "General Sans", -apple-system, BlinkMacSystemFont, "Inter", system-ui,
    sans-serif;
  --mono: "Space Mono", ui-monospace, Menlo, monospace;

  --sidebar: 268px;
  --toc: 208px;
  --measure: 760px;
}

/*
 * Dark follows the system unless the reader has chosen otherwise, which is the
 * same contract the platform's appearance setting uses.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #101216;
    --bg: #171a1f;
    --bg2: #20242b;
    --ink: #f3f4f6;
    --ink2: #a8aeb8;
    --ink3: #757c87;
    --line: #2a2f37;
    --line2: #23272e;
    --blue: #6b76ff;
    --blue-ink: #959dff;
    --blue-soft: rgba(107, 118, 255, 0.16);
    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.15);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.15);
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
    --aurora1: rgba(129, 140, 248, 0.62);
    --aurora2: rgba(125, 211, 252, 0.38);
    --aurora3: rgba(251, 170, 90, 0.55);
    --aurora4: rgba(244, 150, 200, 0.44);
    --aurora-blend: screen;
  }
}

:root[data-theme="dark"] {
  --canvas: #101216;
  --bg: #171a1f;
  --bg2: #20242b;
  --ink: #f3f4f6;
  --ink2: #a8aeb8;
  --ink3: #757c87;
  --line: #2a2f37;
  --line2: #23272e;
  --blue: #6b76ff;
  --blue-ink: #959dff;
  --blue-soft: rgba(107, 118, 255, 0.16);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.15);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --aurora1: rgba(129, 140, 248, 0.62);
  --aurora2: rgba(125, 211, 252, 0.38);
  --aurora3: rgba(251, 170, 90, 0.55);
  --aurora4: rgba(244, 150, 200, 0.44);
  --aurora-blend: screen;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------- layout -- */

.layout {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--canvas);
  padding: 28px 20px 24px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: none;
  margin-bottom: 16px;
}

.brand img {
  width: 30px;
  height: auto;
}

.brand span {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.nav-group {
  margin-bottom: 22px;
}

.nav-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 0 10px;
  margin-bottom: 8px;
}

.sidebar a.nav-item {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ink2);
  text-decoration: none;
  border-bottom: none;
  font-size: 14px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar a.nav-item:hover {
  background: var(--bg2);
  color: var(--ink);
}

.sidebar a.nav-item.active {
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-weight: 500;
}

/*
 * Sticky, not just bottom-aligned: the nav is taller than the viewport on a
 * laptop, so `margin-top: auto` alone scrolled the theme control out of reach.
 */
.sidebar-foot {
  margin-top: auto;
  position: sticky;
  bottom: -24px;
  padding: 12px 0 24px;
  background: var(--canvas);
  border-top: 1px solid var(--line2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.version {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink2);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--ink3);
}

.theme-toggle .moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .moon {
    display: block;
  }
}

/* --------------------------------------------------------- search box -- */

.search-open {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink3);
  font-family: var(--sans);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.search-open:hover {
  border-color: var(--ink3);
}

.search-open kbd {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 4px;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
}

.search-backdrop.open {
  display: flex;
}

.search-panel {
  width: 100%;
  max-width: 560px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-panel input {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 15px 18px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  outline: none;
}

.search-results {
  max-height: 46vh;
  overflow-y: auto;
}

.search-results a {
  display: block;
  padding: 11px 18px;
  border-bottom: 1px solid var(--line2);
  text-decoration: none;
  color: inherit;
}

.search-results a:last-child {
  border-bottom: none;
}

.search-results a.sel,
.search-results a:hover {
  background: var(--blue-soft);
}

.search-results .r-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.search-results .r-crumb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 2px;
}

.search-results .r-snip {
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-empty {
  padding: 22px 18px;
  font-size: 13.5px;
  color: var(--ink3);
}

/* ------------------------------------------------------------ content -- */

.content {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  gap: 40px;
  align-items: flex-start;
  padding: 56px clamp(24px, 5vw, 72px) 120px;
}

.page {
  max-width: var(--measure);
  min-width: 0;
  flex: 1;
  position: relative;
  z-index: 1;
}

/*
 * The same dawn-over-water wash the product opens with, anchored to the top
 * left of the reading column. Only `transform` animates, so it composites on
 * the GPU and never re-rasterises the blur; it stops entirely for anyone who
 * asked for reduced motion.
 */
.aurora {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 460px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora i {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(52px);
  mix-blend-mode: var(--aurora-blend);
  will-change: transform;
}

.aurora i:nth-child(1) {
  width: 520px;
  height: 520px;
  top: -58%;
  left: -8%;
  background: radial-gradient(closest-side, var(--aurora1), transparent 72%);
  animation: auroraDrift0 26s ease-in-out 0s infinite alternate;
}

.aurora i:nth-child(2) {
  width: 460px;
  height: 460px;
  top: -40%;
  left: 18%;
  background: radial-gradient(closest-side, var(--aurora3), transparent 72%);
  animation: auroraDrift1 32s ease-in-out -6s infinite alternate;
}

.aurora i:nth-child(3) {
  width: 400px;
  height: 400px;
  top: -14%;
  left: 40%;
  background: radial-gradient(closest-side, var(--aurora4), transparent 72%);
  animation: auroraDrift2 29s ease-in-out -14s infinite alternate;
}

.aurora i:nth-child(4) {
  width: 480px;
  height: 480px;
  top: -46%;
  left: 60%;
  background: radial-gradient(closest-side, var(--aurora2), transparent 72%);
  animation: auroraDrift3 36s ease-in-out -20s infinite alternate;
}

@keyframes auroraDrift0 {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(90px, 26px, 0) scale(1.12);
  }
}
@keyframes auroraDrift1 {
  from {
    transform: translate3d(0, 0, 0) scale(1.06);
  }
  to {
    transform: translate3d(-70px, 34px, 0) scale(0.94);
  }
}
@keyframes auroraDrift2 {
  from {
    transform: translate3d(0, 0, 0) scale(0.96);
  }
  to {
    transform: translate3d(56px, -30px, 0) scale(1.14);
  }
}
@keyframes auroraDrift3 {
  from {
    transform: translate3d(0, 0, 0) scale(1.1);
  }
  to {
    transform: translate3d(-48px, 40px, 0) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurora i {
    animation: none !important;
  }
}

/* --------------------------------------------------------- typography -- */

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-ink);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.45rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 14px;
}

h2 {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 52px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line2);
  scroll-margin-top: 24px;
}

h3 {
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 30px 0 8px;
  scroll-margin-top: 24px;
}

.lede {
  font-size: 1.06rem;
  color: var(--ink2);
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--ink2);
}

p strong,
li strong {
  color: var(--ink);
  font-weight: 500;
}

a {
  color: var(--blue-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s ease;
}

a:hover {
  border-bottom-color: var(--blue);
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--ink2);
}

li {
  margin-bottom: 7px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink);
}

pre {
  background: #0a0c12;
  color: #e8eaf0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  margin: 0 0 18px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* -------------------------------------------------------- components -- */

figure {
  margin: 22px 0 26px;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
}

figcaption {
  font-size: 13px;
  color: var(--ink3);
  margin-top: 9px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 14.5px;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line2);
  vertical-align: top;
}

th {
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

td {
  color: var(--ink2);
}

.note,
.warn,
.danger {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 20px;
  font-size: 14.5px;
  border: 1px solid;
}

.note {
  background: var(--blue-soft);
  border-color: rgba(76, 87, 240, 0.22);
}

.warn {
  background: var(--warn-soft);
  border-color: rgba(217, 119, 6, 0.26);
}

.danger {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.24);
}

.note p:last-child,
.warn p:last-child,
.danger p:last-child {
  margin-bottom: 0;
}

.note-title {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
}

.note .note-title {
  color: var(--blue-ink);
}
.warn .note-title {
  color: var(--warn);
}
.danger .note-title {
  color: var(--danger);
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg2);
  color: var(--ink2);
  white-space: nowrap;
}

.pill.low {
  background: var(--success-soft);
  color: var(--success);
}
.pill.med {
  background: var(--warn-soft);
  color: var(--warn);
}
.pill.high {
  background: var(--danger-soft);
  color: var(--danger);
}
.pill.admin {
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 22px 0 28px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  background: var(--bg);
}

.card h4 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 500;
}

.card p {
  margin: 0;
  font-size: 13.5px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 20px 0 26px;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 20px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.steps > li > strong:first-child {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 2px;
}

/* ------------------------------------------------------ on this page -- */

.toc {
  width: var(--toc);
  flex-shrink: 0;
  position: sticky;
  top: 56px;
  font-size: 13px;
  z-index: 1;
}

.toc-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 8px;
}

.toc a {
  display: block;
  padding: 4px 0 4px 11px;
  border-left: 2px solid var(--line);
  border-bottom: none;
  color: var(--ink2);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.active {
  color: var(--blue-ink);
  border-left-color: var(--blue);
}

/* -------------------------------------------------------- pager/foot -- */

.pager {
  display: flex;
  gap: 14px;
  margin-top: 64px;
}

.pager a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  background: var(--bg);
  transition: border-color 0.15s ease;
}

.pager a:hover {
  border-color: var(--ink3);
}

.pager .dir {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 3px;
}

.pager .ttl {
  color: var(--ink);
  font-weight: 500;
}

.pager .next {
  text-align: right;
}

.page-footer {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line2);
  font-size: 13.5px;
  color: var(--ink3);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footnote {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink3);
}

/* ------------------------------------------------------------- mobile -- */

@media (max-width: 1180px) {
  .toc {
    display: none;
  }
}

@media (max-width: 900px) {
  /*
   * `align-items: flex-start` is right for the two-column desktop layout, but
   * once the layout stacks it makes each child shrink-to-fit its own content
   * instead of the viewport — which is what pushed the page wider than the
   * screen and scrolled every paragraph off the left edge.
   */
  .layout {
    flex-direction: column;
    align-items: stretch;
  }

  .content {
    display: block;
  }

  /*
   * The full contents list is twelve entries, which on a phone would push the
   * page itself below the fold. Capping it turns the nav into a short
   * scrollable strip so the page you actually came for starts on screen.
   */
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: 45vh;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 18px 20px 24px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .search-open,
  .nav-group {
    margin-bottom: 14px;
  }

  .content {
    padding: 32px 16px 80px;
  }

  .aurora {
    height: 320px;
  }

  /*
   * A role matrix has four columns and will not fit a phone. Letting the table
   * scroll inside itself keeps the page from scrolling sideways as a whole,
   * which otherwise knocks every paragraph off the left edge.
   */
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  table td,
  table th {
    white-space: normal;
    min-width: 108px;
  }

  .pager {
    flex-direction: column;
  }

  .pager .next {
    text-align: left;
  }
}

/* -------------------------------------------------------------- print -- */

/*
 * Operators print the runbook and carry it to a machine that is not working.
 * Drop the furniture, keep the content, and spell out link targets.
 */
@media print {
  .sidebar,
  .toc,
  .pager,
  .aurora,
  .search-backdrop {
    display: none !important;
  }

  body {
    font-size: 11pt;
    background: #fff;
    color: #000;
  }

  .content {
    display: block;
    padding: 0;
  }

  .page {
    max-width: none;
  }

  a {
    border-bottom: none;
    color: #000;
  }

  .page a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
  }

  pre,
  figure,
  table,
  .note,
  .warn,
  .danger {
    break-inside: avoid;
  }

  h2,
  h3 {
    break-after: avoid;
  }
}

/* ------------------------------------------------------- download row -- */

.dl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dl-btn:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.dl-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink3);
}

.dl-note {
  margin-top: -6px;
  font-size: 13px;
  color: var(--ink3);
}

@media print {
  .dl-row,
  .dl-note {
    display: none !important;
  }
}

/* ============================================================ PDF document ==
   Cover, contents and back page for the downloadable runbooks. All print-only:
   hidden on the website, shown only when a runbook page is printed to PDF. */

.pdf-cover,
.pdf-toc,
.pdf-end,
.pdf-part {
  display: none;
}

@media print {
  @page {
    margin: 0;
  }

  /* @page now has no margin, so the reading pages carry their own. */
  .page {
    padding: 0.75in 0.85in 0.9in;
  }

  .pdf-cover,
  .pdf-toc,
  .pdf-end,
  .pdf-part {
    display: block;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* -------- front cover -------- */
  .pdf-cover {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    break-after: page;
  }
  .pdf-cover-bg {
    position: absolute;
    inset: 0;
    /* Frosted-glass dot-matrix, baked to match the platform login: near-white
       rounded panes over a dark-veiled photo, brightness carried by the image. */
    background: #05070f url("images/cover-dots.jpg") center / cover no-repeat;
  }
  .pdf-cover-scrim {
    position: absolute;
    inset: 0;
    /* A corner vignette (the "tint" toward the upper corners) over a top+bottom
       scrim that keeps the logo and the title legible, in the login's #05070F. */
    background:
      radial-gradient(120% 90% at 50% 40%, rgba(5, 7, 15, 0) 42%, rgba(5, 7, 15, 0.46) 100%),
      linear-gradient(
        180deg,
        rgba(5, 7, 15, 0.82) 0%,
        rgba(5, 7, 15, 0.45) 12%,
        rgba(5, 7, 15, 0) 32%,
        rgba(5, 7, 15, 0) 52%,
        rgba(5, 7, 15, 0.5) 74%,
        rgba(5, 7, 15, 0.95) 100%
      );
  }
  .pdf-cover-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.85in 0.8in 0.9in;
    box-sizing: border-box;
  }
  .pdf-cover-logo {
    width: 165px;
    height: auto;
  }
  .pdf-cover-kicker {
    font-family: var(--mono);
    font-size: 10.5pt;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #bcd0ff;
    margin-bottom: 14px;
  }
  .pdf-cover-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 47pt;
    line-height: 1.0;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #fff;
  }
  .pdf-cover-sub {
    font-family: var(--sans);
    font-size: 13.5pt;
    line-height: 1.5;
    max-width: 32ch;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
  }
  .pdf-cover-rule {
    width: 66px;
    height: 3px;
    background: #4c57f0;
    margin: 24px 0 18px;
  }
  .pdf-cover-foot {
    display: flex;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 9pt;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.82);
  }

  /* -------- contents -------- */
  .pdf-toc {
    padding: 1in 0.85in;
    break-after: page;
  }
  .pdf-toc-kicker {
    font-family: var(--mono);
    font-size: 10pt;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-ink);
  }
  .pdf-toc-title {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 30pt;
    letter-spacing: -0.02em;
    margin: 6px 0 26px;
    color: #0a0c12;
  }
  .pdf-toc-part {
    font-family: var(--mono);
    font-size: 9.5pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
    margin: 22px 0 4px;
  }
  .pdf-toc-part:first-child {
    margin-top: 0;
  }
  .pdf-toc-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 12px 2px;
    border-top: 1px solid #e1e4ec;
  }
  .pdf-toc-mark {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: #4c57f0;
    transform: translateY(-1px);
  }
  .pdf-toc-t {
    font-family: var(--sans);
    font-size: 12.5pt;
    color: #1c2028;
  }

  /* -------- back cover -------- */
  .pdf-end {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(158deg, #0a0c12 0%, #141a2e 55%, #1b2547 100%);
    break-before: page;
  }
  .pdf-end-inner {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.9in 0.85in;
    box-sizing: border-box;
  }
  .pdf-end-logo {
    width: 150px;
    height: auto;
    margin-bottom: 26px;
  }
  .pdf-end-line {
    font-family: var(--sans);
    font-weight: 500;
    font-size: 22pt;
    line-height: 1.15;
    letter-spacing: -0.01em;
    max-width: 20ch;
    color: #fff;
    margin-bottom: 44px;
  }
  .pdf-end-cols {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
  }
  .pdf-end a {
    color: inherit;
    text-decoration: none;
  }
  .pdf-end-contact {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .pdf-end-item {
    font-family: var(--sans);
    font-size: 12pt;
    color: #e8ecf6;
  }
  .pdf-end-lbl {
    display: block;
    font-family: var(--mono);
    font-size: 8.5pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8ea0d8;
    margin-bottom: 3px;
  }
  .pdf-end-demo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    padding: 16px 22px 16px 16px;
    color: #0a0c12;
  }
  .pdf-end-qr {
    width: 104px;
    height: 104px;
    display: block;
  }
  .pdf-end-demo-txt {
    display: flex;
    flex-direction: column;
    max-width: 2in;
  }
  .pdf-end-demo-lbl {
    font-family: var(--mono);
    font-size: 9pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
    margin-bottom: 5px;
  }
  .pdf-end-demo-cap {
    font-family: var(--sans);
    font-size: 11pt;
    line-height: 1.4;
    color: #2b303a;
  }
  .pdf-end-foot {
    position: absolute;
    left: 0.85in;
    right: 0.85in;
    bottom: 0.85in;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .pdf-end-foot > span:first-child {
    font-family: var(--sans);
    font-size: 11pt;
    color: rgba(255, 255, 255, 0.9);
  }
  .pdf-end-fine {
    font-family: var(--mono);
    font-size: 8pt;
    line-height: 1.5;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
  }

  /* -------- part divider (combined runbook only) -------- */
  .pdf-part {
    margin: 8px 0 28px;
    padding-bottom: 12px;
    border-bottom: 2px solid #4c57f0;
    font-family: var(--mono);
    font-size: 12pt;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue-ink);
  }
  .pdf-part-break {
    break-before: page;
  }
}
