/* ─────────────────────────────────────────────
   CYHELP Design System — Angular-docs inspired
   ───────────────────────────────────────────── */

:root {
  /* Brand gradient */
  --grad: linear-gradient(135deg, #ff0080 0%, #ff4500 50%, #ffa500 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,0,128,0.12) 0%, rgba(255,69,0,0.10) 50%, rgba(255,165,0,0.10) 100%);

  /* Dark theme (default) */
  --bg:           #0d0d0d;
  --bg-2:        #131314;
  --surface:     #1a1a1c;
  --surface-2:   #1f1f22;
  --surface-3:   #25252a;
  --border:      rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --text:        #e5e5e5;
  --text-muted:  #9ca3af;
  --text-dim:    #6b7280;
  --code-bg:     rgba(255,255,255,0.06);
  --code-block-bg: #0a0a0b;

  /* Accents (kept subtle) */
  --accent-red:    #ff4d6a;
  --accent-orange: #ff9248;
  --accent-yellow: #facc15;
  --accent-green:  #34d399;
  --accent-blue:   #60a5fa;
  --accent-cyan:   #22d3ee;
  --accent-purple: #c084fc;

  /* Layout */
  --header-h: 56px;
  --left-w: 280px;
  --content-max: 880px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --bg:           #ffffff;
  --bg-2:        #fafafa;
  --surface:     #f7f7f8;
  --surface-2:   #f0f0f2;
  --surface-3:   #e7e7ea;
  --border:      rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.16);
  --text:        #18181b;
  --text-muted:  #52525b;
  --text-dim:    #71717a;
  --code-bg:     rgba(0,0,0,0.05);
  --code-block-bg: #f7f7f8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── Selection ── */
::selection { background: rgba(255, 69, 0, 0.35); color: #fff; }

/* ── Scrollbar (subtle) ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─────────────────────────────────────────────
   Header
   ───────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
  max-width: 1600px; margin: 0 auto;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--grad);
  display: grid; place-items: center;
  position: relative;
  box-shadow: 0 4px 18px rgba(255,69,0,0.3);
}
.brand-mark::before {
  content: ''; position: absolute; inset: 4px;
  background: var(--bg); border-radius: 4px;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 8px;
  background: var(--grad); border-radius: 2px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.tag-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}

.search-pill {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: border-color 150ms ease-out, background 150ms ease-out;
}
.search-pill:hover { border-color: var(--border-strong); }
.search-pill .search-icon {
  width: 14px; height: 14px; opacity: 0.7;
}
.search-pill .kbd {
  margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 5px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px; color: var(--text-muted);
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.nav-link-top {
  padding: 6px 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 150ms ease-out, background 150ms ease-out;
  white-space: nowrap;
}
.nav-link-top:hover { color: var(--text); background: var(--surface-2); }
.nav-link-top.active {
  color: var(--text);
  background: var(--surface-2);
}

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid transparent;
  border-radius: 8px; cursor: pointer;
  color: var(--text-muted);
  transition: color 150ms, background 150ms, border-color 150ms;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }

/* ─────────────────────────────────────────────
   Layout — three columns
   ───────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--left-w) minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 48px;
}

aside.left, aside.right {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 0;
}

aside.left { padding-right: 8px; }
aside.right { padding-left: 8px; font-size: 13px; }

/* Left sidebar */
.side-search {
  display: flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px;
  cursor: pointer;
}
.side-search:hover { border-color: var(--border-strong); }

.nav-group { margin-bottom: 16px; }
.nav-group-title {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  padding: 6px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: transparent; border: none; cursor: pointer;
  text-align: left;
}
.nav-group-title:hover { color: var(--text-muted); }
.nav-group-title .chev {
  width: 10px; height: 10px; opacity: 0.6;
  transition: transform 200ms ease-out;
}
.nav-group.collapsed .chev { transform: rotate(-90deg); }
.nav-group.collapsed ul { display: none; }

.nav-group ul { list-style: none; }
.nav-group li a {
  display: block;
  padding: 5px 10px 5px 14px;
  font-size: 13px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  margin-left: 6px;
  transition: color 150ms, border-color 150ms;
}
.nav-group li a:hover { color: var(--text); }
.nav-group li a.active {
  color: var(--text); font-weight: 500;
  border-image: var(--grad) 1;
  border-left: 2px solid;
}

/* Right sidebar - "On this page" */
.toc-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 10px;
  margin-bottom: 4px;
}
.toc { list-style: none; }
.toc li a {
  display: block;
  padding: 5px 10px 5px 14px;
  margin-left: 4px;
  font-size: 12.5px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
}
.toc li.h3 a { padding-left: 26px; font-size: 12px; }
.toc li a:hover { color: var(--text); }
.toc li a.active {
  color: var(--text);
  border-image: var(--grad) 1;
  border-left: 2px solid;
}
.back-top {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 18px; padding: 6px 10px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}
.back-top:hover { color: var(--text); }

/* ─────────────────────────────────────────────
   Main content
   ───────────────────────────────────────────── */
main.content {
  max-width: var(--content-max);
  width: 100%;
  padding: 56px 0 120px;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

h1 {
  font-size: 52px; line-height: 1.05;
  font-weight: 800; letter-spacing: -0.025em;
  margin-bottom: 16px;
}
.lead {
  font-size: 20px; line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 400;
}
.lead .grad-text,
.grad-text {
  background: var(--grad);
  background-clip: text; -webkit-background-clip: text;
  color: transparent;
  font-weight: 700;
}
.intro {
  font-size: 16px; color: var(--text-muted);
  margin-bottom: 56px;
  max-width: 680px;
}

main.content h2 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 96px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  position: relative;
  display: flex; align-items: baseline; gap: 10px;
}
main.content h2 .anchor {
  opacity: 0; color: var(--text-dim);
  font-size: 24px; font-weight: 400;
  transition: opacity 150ms ease-out;
}
main.content h2:hover .anchor { opacity: 1; }
main.content h2:first-of-type { margin-top: 80px; }

main.content h3 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  margin: 32px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

main.content h4 {
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 24px 0 8px;
}

main.content p {
  margin-bottom: 16px; color: var(--text-muted);
  font-size: 15px;
}
main.content p strong, main.content li strong { color: var(--text); font-weight: 600; }

main.content ul, main.content ol {
  margin: 0 0 16px 24px;
  color: var(--text-muted);
  font-size: 15px;
}
main.content ul li, main.content ol li { margin-bottom: 6px; }

/* Inline code */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 6px;
  background: var(--code-bg);
  border-radius: 4px;
  color: var(--text);
}

/* Code blocks */
.code-block {
  position: relative;
  margin: 16px 0 24px;
  background: var(--code-block-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 150ms ease-out;
}
.copy-btn:hover { color: var(--text); border-color: var(--border-strong); }
.copy-btn.copied { color: var(--accent-green); border-color: var(--accent-green); }

.code-block pre {
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
}
.code-block pre .comment { color: var(--text-dim); font-style: italic; }
.code-block pre .cmd, .code-block pre .fn { color: var(--accent-green); }
.code-block pre .flag, .code-block pre .num { color: var(--accent-orange); }
.code-block pre .string, .code-block pre .str { color: var(--accent-cyan); }
.code-block pre .path { color: var(--accent-yellow); }
.code-block pre .kw { color: var(--accent-purple); }
.code-block pre .pipe { color: var(--accent-red); }

/* ─────────────────────────────────────────────
   Cards
   ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 16px;
  margin: 16px 0 24px;
}
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) {
  .card-grid.cols-2, .card-grid.cols-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: transform 200ms ease-out, border-color 200ms ease-out, background 200ms ease-out;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.card h3 { margin-top: 0; font-size: 18px; }
.card p { font-size: 14px; line-height: 1.55; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  font-size: 13px; font-weight: 600;
  background: var(--grad);
  background-clip: text; -webkit-background-clip: text;
  color: transparent;
}
.card-link::after {
  content: '→'; color: #ff4500;
  transition: transform 150ms ease-out;
}
.card-link:hover::after { transform: translateX(3px); }

/* Note / tip / warning cards */
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-blue);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0 24px;
  font-size: 14px; color: var(--text-muted);
}
.note strong { color: var(--text); }
.note.warning { border-left-color: var(--accent-yellow); }
.note.tip { border-left-color: var(--accent-green); }
.note.threat { border-left-color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 5%, var(--surface)); }
.note.detect { border-left-color: var(--accent-blue); }
.note .label {
  display: block;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: 6px;
}
.note.warning .label { color: var(--accent-yellow); }
.note.tip .label { color: var(--accent-green); }
.note.threat .label { color: var(--accent-red); }

/* Tables */
table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
}
td { color: var(--text-muted); font-family: var(--mono); font-size: 13px; }
td:first-child { color: var(--text); }
tr:hover td { background: color-mix(in srgb, var(--surface) 50%, transparent); }

/* ─────────────────────────────────────────────
   Page-specific components (preserved)
   ───────────────────────────────────────────── */

/* Phase / status tags */
.tag, .phase-tag, .os-tag {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 4px;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.linux, .os-tag.linux { color: var(--accent-orange); border-color: color-mix(in srgb, var(--accent-orange) 30%, transparent); }
.tag.windows, .os-tag.windows { color: var(--accent-blue); border-color: color-mix(in srgb, var(--accent-blue) 30%, transparent); }
.tag.firewall { color: var(--accent-red); border-color: color-mix(in srgb, var(--accent-red) 30%, transparent); }
.tag.splunk { color: var(--accent-green); border-color: color-mix(in srgb, var(--accent-green) 30%, transparent); }
.os-tag.server { color: var(--accent-purple); border-color: color-mix(in srgb, var(--accent-purple) 30%, transparent); }
.tag.active { color: var(--accent-green); }
.tag.reserve { color: var(--accent-yellow); }
.tag.sleep { color: var(--text-dim); }
.phase-tag.prep { color: var(--accent-purple); }
.phase-tag.live { color: var(--accent-red); }
.phase-tag.ref { color: var(--accent-cyan); }

/* Phase banners */
.phase-banner {
  padding: 14px 20px;
  border-radius: 10px;
  margin: 20px 0;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.phase-banner.prep { border-left: 3px solid var(--accent-purple); color: var(--accent-purple); }
.phase-banner.live { border-left: 3px solid var(--accent-red); color: var(--accent-red); }

/* Checklist */
.checklist { list-style: none; margin: 12px 0 20px !important; }
.checklist li {
  padding: 8px 0 8px 30px !important;
  position: relative;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: color 150ms;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: '';
  position: absolute; left: 0; top: 11px;
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  transition: all 150ms;
}
.checklist li.done { color: var(--text-dim); text-decoration: line-through; }
.checklist li.done::before {
  background: var(--grad);
  border-color: transparent;
}

/* Architecture box (monitoring) */
.arch-box {
  display: flex; gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.arch-node {
  flex: 1; min-width: 160px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.arch-node .node-label {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.arch-node .node-sub { font-size: 12px; color: var(--text-muted); }
.arch-node.splunk-server { border-color: color-mix(in srgb, var(--accent-orange) 30%, var(--border)); }
.arch-node.splunk-server .node-label {
  background: var(--grad);
  background-clip: text; -webkit-background-clip: text;
  color: transparent;
}
.arch-arrow {
  display: flex; align-items: center;
  color: var(--text-dim); font-size: 18px;
}

/* Step list */
.step-list { list-style: none !important; margin: 16px 0 24px !important; }
.step-list li {
  padding: 10px 0 10px 38px !important;
  position: relative;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.step-list li:last-child { border-bottom: none; }
.step-list li .num {
  position: absolute; left: 0; top: 11px;
  width: 24px; height: 24px;
  background: var(--grad);
  color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  border-radius: 50%;
  display: grid; place-items: center;
}

/* Item grid (dashboards collapsible) */
.item-grid { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 28px; }
.item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 200ms;
}
.item:hover { border-color: var(--border-strong); }
.item-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  cursor: pointer; user-select: none;
}
.item-badge {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 4px;
  flex-shrink: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.badge-alert { color: var(--accent-red); border-color: color-mix(in srgb, var(--accent-red) 30%, transparent); }
.badge-dash  { color: var(--accent-blue); border-color: color-mix(in srgb, var(--accent-blue) 30%, transparent); }
.badge-sev-high { color: var(--accent-red); border-color: color-mix(in srgb, var(--accent-red) 30%, transparent); }
.badge-sev-med  { color: var(--accent-yellow); border-color: color-mix(in srgb, var(--accent-yellow) 30%, transparent); }
.badge-sev-low  { color: var(--text-dim); }
.item-title { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; }
.item-desc  { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.chevron {
  color: var(--text-dim); font-size: 11px;
  transition: transform 200ms ease-out;
}
.item.open .chevron { transform: rotate(90deg); }
.item-body { display: none; padding: 16px 18px; border-top: 1px solid var(--border); }
.item.open .item-body { display: block; }
.item-body p { font-size: 13.5px; margin-bottom: 12px; }

/* Severity legend */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 24px; font-size: 12.5px; color: var(--text-muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-high { background: var(--accent-red); }
.dot-med  { background: var(--accent-yellow); }
.dot-low  { background: var(--text-dim); }
.dot-dash { background: var(--accent-blue); }

/* Killchain banner (hardening) */
.killchain {
  display: flex; align-items: stretch;
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  flex-wrap: wrap;
}
.kc-step {
  flex: 1; min-width: 130px;
  padding: 16px 14px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.kc-step:last-child { border-right: none; }
.kc-step .kc-label {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  color: var(--text); margin-bottom: 4px;
}
.kc-step .kc-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.kc-step.red .kc-label {
  background: var(--grad);
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.kc-arrow {
  display: flex; align-items: center; padding: 0 4px;
  color: var(--accent-orange); font-size: 18px;
  background: var(--surface-2);
}

/* Two-col grid (hardening AD general) */
.two-col, .grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0 24px;
}
@media (max-width: 800px) {
  .two-col, .grid-2 { grid-template-columns: 1fr; }
}

/* Section label */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim);
  margin: 24px 0 10px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border); width: 40px;
}

/* ─────────────────────────────────────────────
   Footer
   ───────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 56px 24px 32px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { font-size: 13.5px; color: var(--text-muted); transition: color 150ms; }
.footer a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1280px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-dim);
}

/* ─────────────────────────────────────────────
   Command palette (cmd+K)
   ───────────────────────────────────────────── */
.palette-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 15vh;
}
.palette-overlay.open { display: flex; }
.palette {
  width: min(560px, 92vw);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  overflow: hidden;
}
.palette input {
  width: 100%;
  height: 50px; padding: 0 18px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.palette ul { list-style: none; max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette li a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px; color: var(--text);
  border-radius: 8px;
}
.palette li a:hover, .palette li.active a { background: var(--surface-2); }
.palette li .meta { color: var(--text-dim); font-size: 12px; }

/* ─────────────────────────────────────────────
   Mobile
   ───────────────────────────────────────────── */
.menu-toggle {
  display: none;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer;
  color: var(--text);
}

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  aside.left {
    position: fixed; top: var(--header-h); left: 0;
    width: 84vw; max-width: 320px; height: calc(100vh - var(--header-h));
    background: var(--bg);
    border-right: 1px solid var(--border);
    transform: translateX(-100%);
    transition: transform 250ms ease-out;
    padding: 24px 20px;
    z-index: 90;
  }
  aside.left.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  main.content { padding-top: 32px; }
  h1 { font-size: 36px; }
  main.content h2 { font-size: 26px; margin-top: 64px; }
  .nav-links .nav-link-top { display: none; }
}
