:root {
  --ink: #12161c;
  --ink-soft: #3d4754;
  --muted: #5c6775;
  --line: #d3dae2;
  --paper: #eef1f4;
  --card: #ffffff;
  --accent: #1769aa;
  --accent-soft: #e3f0f9;
  --rail: #1b232c;
  --rail-ink: #d7dee6;
  --rail-muted: #8090a0;
  --warn-bg: #fff6e8;
  --warn-ink: #7a4a00;
  --warn-line: #efd2a3;
  --ok: #1f7a4d;
  --ok-line: #cfe3d6;
  --code-bg: #1b232c;
  --code-ink: #d7dee6;
  --radius: 8px;
  --shadow: none;
  --rail-width: 248px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

.shell {
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  min-height: 100vh;
}

.site-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  background: var(--rail);
  color: var(--rail-ink);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
}

.site-brand {
  text-decoration: none;
  color: var(--rail-ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.site-brand:hover { color: #fff; }

.site-brand span {
  color: #7eb6e8;
  font-weight: 600;
}

.site-tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rail-muted);
  margin: 10px 0 18px;
}

.site-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav a {
  text-decoration: none;
  color: #b7c2cd;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(126, 182, 232, 0.12);
  color: #fff;
}

.site-nav a[aria-current="page"] {
  background: rgba(126, 182, 232, 0.12);
  color: #fff;
  font-weight: 600;
}

.site-access {
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 14px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.site-access:hover {
  background: #125890;
  color: #fff;
}

.site-access[aria-current="page"] {
  background: #fff;
  color: var(--rail);
}

.page {
  max-width: 42rem;
  padding: 36px 36px 80px;
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(1.75rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 36rem;
}

.path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.path.cols-4 {
  grid-template-columns: repeat(2, 1fr);
}

.path a,
a.card {
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.card {
  display: block;
  padding: 16px;
  margin-bottom: 10px;
}

.path a:hover,
a.card:hover {
  border-color: var(--accent);
  background: #f5f8fb;
}

.path .n {
  display: inline-flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.path strong,
a.card strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 2px;
}

a.card strong { font-size: 1.02rem; margin-bottom: 4px; }

.path span,
a.card span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

a.card span { font-size: 0.95rem; }

.card-list { margin-bottom: 28px; }

.manifest {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.manifest-row {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 15px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}

.manifest-row:last-child { border-bottom: 0; }

.manifest-row:hover { background: #f5f8fb; }

.manifest-row .code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  color: var(--accent);
  font-weight: 500;
}

.manifest-row strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 2px;
}

.manifest-row em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.9rem;
}

.manifest-row .arrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: #9aa7b5;
}

.note {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

.note a { color: var(--accent); font-weight: 500; }

section { margin-bottom: 40px; }

.section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.step-badge {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-weight: 600;
  font-size: 0.95rem;
}

.section-head h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.scan-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 32px;
}

.scan-jump a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.scan-jump a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.scan { margin-bottom: 36px; }

.scan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.scan-head h2 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.scan-count {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.scan-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.scan-row:last-child { border-bottom: 0; }

.scan-row strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.scan-row span {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.scan.shipped .scan-head { border-bottom-color: var(--ok-line); }

.scan.shipped .scan-row strong { color: var(--ok); }

.scan.shipped .scan-row strong::before {
  content: "✓ ";
  font-weight: 500;
}

.scan.later .scan-row { opacity: 0.78; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.card p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card p:last-child { margin-bottom: 0; }

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn-ink);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.92rem;
  margin: 12px 0 0;
}

.callout strong { color: var(--ink); }

ol.clean, ul.clean {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

ol.clean li, ul.clean li { margin: 0.4rem 0; }

ol.clean li::marker, ul.clean li::marker {
  color: var(--accent);
  font-weight: 600;
}

pre {
  margin: 0;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

code {
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--accent-soft);
  color: #123a5c;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

.url-pill {
  display: inline-block;
  margin-top: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 6px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #f7f9fb;
}

.option.preferred {
  border-color: #a8c8e4;
  background: var(--accent-soft);
}

.option .label {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.option h3 { margin: 0 0 6px; font-size: 1rem; }
.option p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
}

details summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  font-weight: 600;
  color: var(--ink);
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "+";
  float: right;
  color: var(--muted);
  font-weight: 500;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

details[open] summary::after { content: "–"; }

details .body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

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

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

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

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

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.checklist li:last-child { border-bottom: 0; }

.box {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  border: 1.5px solid var(--accent);
  border-radius: 3px;
  flex: 0 0 auto;
  background: #fff;
}

.footer {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer a { color: var(--accent); }

.figure {
  margin: 0 0 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.figure-expand {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}

.figure-expand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
}

.figure figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.lightbox-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1400px);
  width: 100%;
}

.lightbox-dialog::backdrop {
  background: rgba(18, 22, 28, 0.72);
}

.lightbox-dialog[open] {
  display: grid;
  place-items: center;
}

.lightbox-frame {
  position: relative;
  margin: 0;
  max-width: 100%;
}

.lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  background: var(--card);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 6px;
  background: rgba(18, 22, 28, 0.72);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--accent);
}

.group-label {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 8px 0 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cta:hover {
  background: var(--accent);
}

.cta-secondary {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 500;
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .site-rail {
    position: relative;
    height: auto;
    padding: 20px 16px;
  }
  .site-access { margin-top: 20px; }
  .page { padding: 28px 20px 72px; }
}

@media (max-width: 640px) {
  .path, .grid-2, .path.cols-4 { grid-template-columns: 1fr; }
  .manifest-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .manifest-row .arrow { display: none; }
}
