/* ---- Font + brand accents (ties the wiki to the dashboard family) ---- */
:root {
  --md-text-font: "Arial", "Helvetica", sans-serif;
  --md-code-font: "Consolas", "Roboto Mono", monospace;
  --md-primary-fg-color: #0f151d;
  --md-accent-fg-color:  #35c9d6;
  --md-typeset-a-color:  #0b8f99;
}
.md-header, .md-tabs { background-color: #0f151d; }

/* ---- Bigger logo, hugging the top-left ---- */
.md-header__button.md-logo { padding: .2rem .35rem; margin-left: 0; }
.md-header__button.md-logo img,
.md-header__button.md-logo svg { height: 2rem; width: auto; }

/* ---- Full-width layout: nav flush-left + wider, more room for content ---- */
.md-grid { max-width: none; }
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary { width: 14.5rem; }
  .md-sidebar--secondary { width: 11.5rem; }
}
.md-sidebar--primary .md-sidebar__scrollwrap { margin-right: 0; }
/* let nav titles use the full sidebar width before wrapping */
.md-nav__link { padding-right: .15rem; }
.md-sidebar--primary .md-sidebar__scrollwrap { margin-right: .1rem; }

/* sidebar scrollbar: neutral always, accent only while click-dragging (not on hover) */
.md-sidebar__scrollwrap,
.md-sidebar__scrollwrap:hover { scrollbar-color: #c4c4c4 transparent; }
.md-sidebar__scrollwrap::-webkit-scrollbar { width: 6px; height: 6px; }
.md-sidebar__scrollwrap::-webkit-scrollbar-track { background: transparent; }
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb,
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover { background: #c4c4c4; border-radius: 3px; }
.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:active { background: #35c9d6; }

/* ---- Entry template: labeled meta rows ---- */
.md-typeset .meta { border:1px solid #e2e2e2; border-radius:10px; overflow:hidden; margin:18px 0; }
.md-typeset .meta .row { display:flex; border-top:1px solid #e2e2e2; }
.md-typeset .meta .row:first-child { border-top:none; }
.md-typeset .meta .k { flex:0 0 210px; background:#fafbfc; padding:12px 16px; font-weight:bold; color:#161616; font-size:13px; }
.md-typeset .meta .v { padding:12px 16px; font-size:14px; }
.md-typeset .comp { list-style:none; margin:0; padding:0; }
.md-typeset .comp li { padding:3px 0; font-size:14px; }
.md-typeset .ok  { color:#1a7f4b; font-weight:bold; }
.md-typeset .na  { color:#6f6f6f; font-weight:bold; }
.md-typeset .pend{ color:#b26a00; font-weight:bold; }
.md-typeset .notes { background:#f2f2f2; border-left:3px solid #35c9d6; padding:12px 16px; border-radius:0 6px 6px 0; font-size:14px; }
.md-typeset .notes ul { margin:6px 0 0; padding-left:20px; }

/* Compliance table */
.md-typeset .comp-table { border-collapse:collapse; width:auto; margin:2px 0; }
.md-typeset .comp-table td { border:none; padding:4px 22px 4px 0; font-size:14px; vertical-align:middle; }
.md-typeset .comp-table td:first-child { color:#2b3138; }
.md-typeset .badge { display:inline-block; font-size:12px; font-weight:700; padding:2px 11px; border-radius:20px; letter-spacing:.02em; white-space:nowrap; }
.md-typeset .badge.ok   { background:#e6f4ea; color:#1a7f4b; border:1px solid #bfe3cd; }
.md-typeset .badge.na   { background:#eef0f2; color:#6f7680; border:1px solid #dcdfe3; }
.md-typeset .badge.pend { background:#fdf3e3; color:#a4700f; border:1px solid #f0d8a8; }

/* Data / conditions table */
.md-typeset .data-table { border-collapse:collapse; width:100%; margin:6px 0 4px; }
.md-typeset .data-table th { text-align:left; background:#f2f4f6; color:#2b3138; font-weight:700; font-size:12.5px; padding:8px 12px; border:1px solid #e2e2e2; }
.md-typeset .data-table td { font-size:13.5px; padding:7px 12px; border:1px solid #e6e6e6; vertical-align:top; }

/* ---- Drawings: render large + readable ---- */
.md-typeset .draw-label { color:#161616; font-weight:bold; font-size:13px; margin:26px 0 8px; }
.md-typeset figure { margin:0 0 26px; width:100%; max-width:1000px; }
.md-typeset .frame { border:1px solid #e2e2e2; border-radius:8px; background:#fff; padding:16px; max-width:1300px; }
.md-typeset figure svg { width:100%; height:auto; display:block; }
.md-typeset figcaption { font-size:12px; color:#6f6f6f; font-style:italic; margin-top:8px; text-align:left; }
.md-typeset .ph { border:2px dashed #c3ccd8; border-radius:8px; background:#fafbfc; padding:34px 20px; text-align:center; color:#6f6f6f; max-width:1300px; }
.md-typeset .ph .big { font-size:14px; color:#8894a3; }
.md-typeset .ph .sm  { font-size:12px; margin-top:6px; }

/* ---- misc ---- */
.md-typeset .sample-tag { display:inline-block; background:#ededed; color:#555; border:1px solid #ccc;
  font-size:11px; padding:2px 8px; border-radius:20px; margin-left:8px; vertical-align:middle; }

/* ---- Header quick-links: text button + dropdown (mirrors the dashboard) ---- */
.wiki-ql { position:relative; display:flex; align-items:center; margin-left:auto; margin-right:.4rem; }
.wiki-ql__rail { display:flex; align-items:center; gap:8px; padding:6px 14px; border:1px solid rgba(255,255,255,.22);
  border-radius:8px; background:rgba(255,255,255,.06); cursor:pointer; color:#e6edf3;
  font-family:var(--md-text-font); font-size:.8rem; font-weight:600; letter-spacing:.01em; }
.wiki-ql__rail:hover { border-color:#35c9d6; color:#fff; }
.wiki-ql__caret { color:#9fb0bd; font-size:10px; }
.wiki-ql__panel { position:fixed; top:3rem; right:.6rem; z-index:100; width:min(92vw,560px);
  background:#121821; border:1px solid #1f2a37; border-radius:12px; box-shadow:0 20px 60px rgba(0,0,0,.6);
  padding:14px 16px; display:none; }
.wiki-ql__panel.open { display:block; }
.wiki-ql__cols { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.wiki-ql__col-head { display:flex; align-items:center; gap:8px; padding-bottom:8px; margin-bottom:6px; border-bottom:1px solid #1f2a37; }
.wiki-ql__col-head img { width:24px; height:24px; object-fit:contain; background:#fff; border-radius:4px; padding:2px; }
.wiki-ql__col-title { font-size:11px; letter-spacing:.09em; text-transform:uppercase; color:#7d8895; font-weight:700; }
.wiki-ql__link { display:block; padding:6px 8px; border-radius:7px; color:#e6edf3; text-decoration:none; font-size:13px; }
.wiki-ql__link:hover { background:#0f151d; color:#35c9d6; }
.wiki-ql__link .ext { font-size:10px; opacity:.5; margin-left:4px; }
@media (max-width:760px){ .wiki-ql__cols{ grid-template-columns:1fr; } }

/* ---- Nav expand/collapse controls + stable state ---- */
.nav-tools { display:flex; gap:6px; padding:2px .6rem 12px; }
.nav-tools__btn { flex:1; font-family:var(--md-text-font); font-size:.72rem; font-weight:600;
  padding:6px 8px; border:1px solid #d8dce2; border-radius:6px; background:#fff; color:#495057;
  cursor:pointer; transition:border-color .12s, color .12s, background .12s; }
.nav-tools__btn:hover { border-color:#35c9d6; color:#0f151d; background:#f4fdfe; }
.nav-no-anim .md-nav { transition:none !important; }

/* ---- Hide the redundant sidebar site title (already shown in the header) ---- */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title { display:none; }
}

/* ---- Stub entries (not yet written) show red in the sidebar ---- */
.md-nav--primary .md-nav__link.nav-stub { color: #c0281f; }

/* ---- Red "Needs manual review" pill ---- */
.md-typeset .review-flag { display:inline-block; vertical-align:middle; margin-left:12px;
  background:#fdeaea; color:#c0281f; border:1px solid #f0b6b1; font-size:12px; font-weight:700;
  padding:3px 11px; border-radius:20px; letter-spacing:.02em; white-space:nowrap; }

/* ---- Remove dead space around nav + content; drawings fill their frame ---- */
.md-grid { max-width: 100% !important; }
.md-main__inner { max-width: 100% !important; margin-top: .6rem; }
.md-content { flex: 1 1 auto; min-width: 0; }
@media screen and (min-width: 76.25em) {
  .md-content__inner { padding: .4rem 1.4rem 1.2rem; }
}
.md-typeset figure svg { width: 100% !important; }
.md-typeset .frame { width: 100%; }

/* ---- App-shell: frozen left index + always-visible slim footer ---- */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    position: fixed !important;
    top: 2.9rem !important;
    left: 0;
    width: 14.5rem;
    height: calc(100vh - 2.9rem - 2.3rem) !important;   /* viewport minus header and footer */
    margin: 0 !important;
    padding-left: .5rem;
  }
  .md-sidebar--primary .md-sidebar__scrollwrap { height: 100% !important; margin: 0; }
  .md-main__inner { padding-left: 15rem; }
}
/* footer: drop the bulky prev/next block, pin a slim bar to the bottom always */
.md-footer__inner { display: none; }
.md-footer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; }
.md-main { padding-bottom: 2.4rem; }

/* ---- Keep the site title in the header always; never swap to the page title on scroll ---- */
.md-header__topic:first-child { opacity: 1 !important; transform: none !important; }
.md-header__topic[data-md-component="header-topic"] { display: none !important; }
