:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080b11;
  color: #eef2f7;
  font-synthesis: none;
  --cyan: #22d3ee;
  --gold: #eab308;
  --violet: #a78bfa;
  --line: rgba(255, 255, 255, 0.09);
  --muted: #8f9aaa;
  --panel: #0d1119;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 60% -20%, rgba(34, 211, 238, 0.08), transparent 32rem), #080b11; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 17, 0.9);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 760; letter-spacing: -0.02em; }
.brand svg { width: 25px; height: 18px; }
.brand span { font-size: 18px; }
.brand em { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-size: 13px; font-style: normal; font-weight: 550; letter-spacing: 0; }
.topbar nav { display: flex; align-items: center; gap: 24px; font-size: 13px; color: #aab3c0; }
.topbar nav a { text-decoration: none; }
.topbar nav a:hover { color: white; }
.topbar .terminal { padding: 9px 13px; border: 1px solid rgba(34, 211, 238, 0.25); border-radius: 8px; background: rgba(34, 211, 238, 0.07); color: #aaf4ff; }

.shell {
  width: min(1440px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 760px) 210px;
  justify-content: center;
}

.sidebar, .toc { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 64px); padding: 44px 24px; overflow: auto; }
.sidebar { border-right: 1px solid var(--line); }
.toc { border-left: 1px solid var(--line); }
.eyebrow { margin-bottom: 14px; color: #677386; font-size: 10px; font-weight: 750; letter-spacing: 0.13em; text-transform: uppercase; }
.sidebar nav, .toc nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a, .toc nav a { padding: 8px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; line-height: 1.25; text-decoration: none; }
.sidebar nav a:hover, .toc nav a:hover { color: #fff; }
.sidebar nav a[aria-current="page"] { background: rgba(34, 211, 238, 0.08); color: #b8f5ff; box-shadow: inset 2px 0 var(--cyan); }
.sidebar-note { display: flex; align-items: center; gap: 7px; margin: 30px 10px 0; color: #667284; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.sidebar-note span { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.65); }

main { min-width: 0; padding: 70px 72px 40px; }
article { min-height: calc(100vh - 220px); }
article h1 { max-width: 680px; margin: 0 0 24px; font-size: clamp(38px, 6vw, 62px); line-height: 0.98; letter-spacing: -0.055em; }
article h1::after { content: ""; display: block; width: 74px; height: 3px; margin-top: 26px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--gold), var(--violet)); }
article h2 { margin: 54px 0 17px; padding-top: 4px; font-size: 22px; letter-spacing: -0.025em; scroll-margin-top: 90px; }
article h3 { margin: 34px 0 12px; font-size: 17px; }
article p, article li { color: #aeb8c6; font-size: 15px; line-height: 1.78; }
article p { margin: 0 0 18px; }
article ul, article ol { margin: 12px 0 24px; padding-left: 23px; }
article li { margin: 7px 0; padding-left: 4px; }
article strong { color: #e8edf4; font-weight: 650; }
article a { color: #74e7f7; text-decoration-color: rgba(116, 231, 247, 0.35); text-underline-offset: 3px; }
article code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; background: #101620; color: #cdeff4; font: 0.86em ui-monospace, SFMono-Regular, Menlo, monospace; }
article pre { position: relative; margin: 22px 0 28px; padding: 21px 22px; overflow-x: auto; border: 1px solid rgba(34, 211, 238, 0.13); border-radius: 11px; background: linear-gradient(145deg, #0b1018, #0d141e); box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 18px 50px rgba(0, 0, 0, 0.2); }
article pre::before { content: "TERMINAL"; display: block; margin-bottom: 13px; color: #4f5b6d; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.14em; }
article pre code { padding: 0; border: 0; background: transparent; color: #d8e4ec; font-size: 12.5px; line-height: 1.75; }
article blockquote { margin: 28px 0; padding: 16px 18px; border: 1px solid rgba(167, 139, 250, 0.18); border-left: 3px solid var(--violet); border-radius: 0 9px 9px 0; background: rgba(167, 139, 250, 0.05); color: #bdc6d3; font-size: 14px; line-height: 1.65; }

main footer { display: flex; justify-content: space-between; margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); color: #667284; font-size: 11px; }
main footer a { color: #8f9aaa; text-decoration: none; }
main footer a:hover { color: white; }
.toc nav a { padding: 5px 0; font-size: 12px; }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 210px minmax(0, 760px); }
  .toc { display: none; }
}

@media (max-width: 720px) {
  .topbar { height: 58px; padding: 0 18px; }
  .topbar nav > a:first-child { display: none; }
  .shell { display: block; min-height: calc(100vh - 58px); }
  .sidebar { position: static; display: flex; gap: 6px; padding: 12px 18px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .eyebrow, .sidebar-note { display: none; }
  .sidebar nav { flex-direction: row; white-space: nowrap; }
  .sidebar nav a { padding: 8px 10px; }
  .sidebar nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--cyan); }
  main { padding: 48px 22px 30px; }
  article h1 { font-size: 42px; }
  article h2 { margin-top: 45px; }
  article pre { margin-left: -6px; margin-right: -6px; padding: 18px; }
}
