/* Left-hand menu and extra pages (17 Nov 2026). Loaded after style.css and mast.css. */
.hd [hidden] { display: none !important; }

/* the content column is the width the page's own size rules measure */
.hd-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; }
.hd-body { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; container: hd / inline-size; }
.hd-body > .hd-foot { margin-top: auto; padding-top: 56px; border-top: 0; }
.hd-body > .hd-foot .hd-foot__in { border-top: 1px solid var(--hd-line); }

/* ---------- The menu: a dark rail that stays in view ---------- */
.hd-side {
  --color-fg: #ffffff; --color-fg-muted: rgba(255, 255, 255, .6); --color-bg: #111013;
  --color-border-line: rgba(255, 255, 255, .14); --hd-line: rgba(255, 255, 255, .14); --hd-soft: rgba(255, 255, 255, .06);
  --hd-side-accent: #b48af5;
  --hd-accent: var(--hd-side-accent); /* always dark here, whatever the page theme */
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 26px; padding: 22px 16px 26px;
  background: #111013; color: var(--color-fg); border-right: 1px solid rgba(255, 255, 255, .08);
}
.hd-side__brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; text-decoration: none; color: var(--color-fg); }
.hd-side__brand .hd-mark { width: 34px; height: 34px; }
.hd-side__name { font: 600 15.5px/1.15 var(--hd-display); letter-spacing: -.01em; }
.hd-side__name small { display: block; margin-top: 3px; font: 400 11.5px/1.2 var(--hd-text); letter-spacing: 0; color: var(--color-fg-muted); }
.hd-side__nav { display: grid; gap: 2px; }
.hd-side__label { margin: 0 0 6px; padding: 0 10px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.hd-side__page {
  display: block; padding: 9px 10px; text-decoration: none; border-left: 2px solid transparent;
  font: 500 14px/1.3 var(--hd-display); color: var(--color-fg-muted);
}
.hd-side__page:hover { color: var(--color-fg); background: var(--hd-soft); }
.hd-side__page[aria-current="page"] { color: var(--color-fg); border-left-color: var(--hd-side-accent); background: rgba(255, 255, 255, .05); }
.hd-side__gap { height: 14px; }
.hd-side .hd-side__sub {
  display: grid; flex: none; align-self: auto; overflow: visible; min-height: 0;
  margin: 4px 0 6px 12px; padding-left: 8px; border-left: 1px solid var(--hd-line);
}
.hd-side .hd-side__sub a { display: block; padding: 5px 8px; font-size: 13px; font-weight: 400; white-space: normal; box-shadow: none; color: var(--color-fg-muted); }
.hd-side .hd-side__sub a:hover { color: var(--color-fg); }
.hd-side .hd-side__sub a.is-current { color: var(--color-fg); box-shadow: inset 2px 0 0 var(--hd-side-accent); }
.hd-side__page:focus-visible, .hd-side .hd-side__sub a:focus-visible, .hd-side__brand:focus-visible { outline: 2px solid var(--hd-side-accent); outline-offset: -2px; }
.hd-side .hd-range { align-self: flex-start; margin: 0 6px; }

/* ---------- Extra pages (blank for now) ---------- */
.hd-mast--page { padding: 46px 0 54px; }
.hd-mast--page .hd-kicker { margin-bottom: 16px; color: var(--color-fg-muted); }
.hd-mast--page .hd-kicker::before { background: var(--hd-mast-accent); }
.hd-mast--page .hd-title { font-size: clamp(36px, 5.2cqi, 60px); }
.hd-blank__body { padding-block: 44px 40px; }
.hd-blank__note { max-width: 40em; padding: 18px 20px; border: 1px dashed var(--hd-line); font-size: 15px; color: var(--color-fg-muted); }

/* ---------- Narrow: the menu becomes a bar across the top ---------- */
@container hd (max-width: 900px) {
  .hd-shell { grid-template-columns: minmax(0, 1fr); }
  .hd-side {
    z-index: 7; height: auto; overflow: visible; flex-direction: row; flex-wrap: wrap; align-items: center;
    gap: 8px 14px; padding: 10px 14px 0; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .hd-side__brand { padding: 0; }
  .hd-side__brand .hd-mark { width: 28px; height: 28px; }
  .hd-side__name small, .hd-side__label, .hd-side__gap { display: none; }
  .hd-side .hd-range { order: 2; margin: 0 0 0 auto; }
  .hd-side__nav { order: 3; flex: 1 1 100%; display: flex; overflow-x: auto; scrollbar-width: none; gap: 0; margin: 0 -4px; }
  .hd-side__nav::-webkit-scrollbar { display: none; }
  .hd-side__page { flex: none; white-space: nowrap; padding: 10px 10px 11px; border-left: 0; border-bottom: 2px solid transparent; font-size: 13px; background: none; }
  .hd-side__page[aria-current="page"] { border-bottom-color: var(--hd-side-accent); background: none; }
  .hd-side .hd-side__sub { display: none; }
}
@container hd (max-width: 520px) {
  .hd-side .hd-range__label { display: none; }
}
