:root {
  --bg: #070b12;
  --side: #0c121c;
  --card: #111827;
  --line: #1f2a3c;
  --text: #e5eef7;
  --muted: #8aa0b8;
  --acc: #3ee0b2;
  --acc2: #6ea8ff;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", sans-serif; line-height: 1.7; overflow-x: clip; }
a { color: var(--acc); }
.layout { display: grid; min-height: 100vh; grid-template-columns: 1fr; }
@media (min-width: 960px) { .layout { grid-template-columns: 260px 1fr; } .side { position: sticky; top: 0; height: 100vh; } }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 1.4rem 1.2rem; }
.brand { font-family: "IBM Plex Mono", monospace; color: var(--acc); text-decoration: none; font-weight: 600; }
.side nav a { display: block; color: var(--muted); text-decoration: none; padding: 0.35rem 0; font-size: 0.92rem; }
.side nav a:hover { color: #fff; }
.content { padding: 2rem 6vw 4rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.03em; }
.lede { color: var(--muted); font-size: 1.08rem; max-width: 46rem; }
.cards { display: grid; gap: 1rem; margin-top: 1.6rem; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; }
.card h2 { margin: 0.2rem 0 0.5rem; font-size: 1.15rem; }
.card h2 a { color: #fff; text-decoration: none; }
.meta { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8rem; }
.prose code, .term { font-family: "IBM Plex Mono", monospace; font-size: 0.88em; }
.term { display: block; background: #0a1018; border: 1px solid var(--line); padding: 0.9rem 1rem; border-radius: 10px; color: #c9f7e6; overflow-x: auto; }
.callout { border-left: 3px solid var(--acc); background: #0e1a18; padding: 0.9rem 1rem; margin: 1.2rem 0; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 0.5rem; }
footer { margin-top: 3rem; color: var(--muted); font-size: 0.82rem; font-family: "IBM Plex Mono", monospace; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; margin: 0.6rem 0; }
img, video, iframe { max-width: 100%; height: auto; }
.prose, .lede, .card { overflow-wrap: anywhere; }
.prose, .content { overflow-x: auto; }
table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 959px) {
  .side {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 4.5vw 1rem;
  }
  .side nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.5rem;
    margin-top: 0.55rem;
  }
  .side nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0.35rem 0.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.2;
  }
  .content { padding: 1.25rem 4.5vw 2.8rem; }
  h1 { font-size: clamp(1.55rem, 7vw, 2.1rem); }
  .lede { font-size: 1rem; }
  .card, .callout, .term { padding: 0.9rem; }
  .term { font-size: 0.78rem; }
}

@media (min-width: 960px) {
  table { display: table; }
}
