/* Generated by tools/build-docs.mjs — do not edit by hand. */
:root {
  --crt-bg: #070a1c;
  --ui-bg: #0b0e24;
  --panel-bg: #11142e;
  --border: #2c2f63;
  --accent: #706deb;
  --green: #8fe985;
  --amber: #e6dd6b;
  --red: #d76b70;
  --text: #ccd0ec;
  --dim: #6e6ea4;
  --maxw: 820px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 50% -10%, #10143a 0%, transparent 60%),
    var(--crt-bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .brand, kbd { font-family: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── top bar ─────────────────────────────────────────────── */
.doc-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 24px;
  background: rgba(11, 14, 36, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; }
.brand:hover { text-decoration: none; }
.brand:hover .logo-text { filter: brightness(1.12); }

/* ── C64 READY. logo (mirrors the app header) ────────────── */
.logo-text {
  display: inline-flex; align-items: flex-end; gap: 2px;
  font-family: 'PetMe64', 'Share Tech Mono', monospace;
  font-size: clamp(0.74rem, 2.2vw, 1rem);
  line-height: 1; white-space: nowrap; letter-spacing: 1px;
  position: relative; padding-bottom: 2px;
}
.lt-main { position: relative; top: 0.2em; }
.lt-c64 {
  color: #dff4ff;
  text-shadow: 0 0 2px var(--accent), 0 0 10px rgba(112, 109, 235, 0.7), 2px 2px 0 #07071a;
}
.lt-ready {
  color: var(--accent); margin-left: calc(-0.333em - 3px);
  text-shadow: 0 0 2px var(--accent), 0 0 12px rgba(112, 109, 235, 0.6), 2px 2px 0 #07071a;
}
.lt-blocks {
  font-family: 'Share Tech Mono', monospace; font-size: 0.85em;
  text-shadow: 0 0 8px rgba(112, 109, 235, 0.4); margin-right: 6px;
}
.lt-blocks .b4 { color: #9b98ff; }
.lt-blocks .b3 { color: var(--accent); }
.lt-blocks .b2 { color: #5a57b8; }
.lt-blocks .b1 { color: #43407c; }
.logo-text::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg,
      rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.28) 3px, rgba(0,0,0,0) 4px);
}
.hero-logo { margin-bottom: 16px; }
.hero-logo .logo-text { font-size: clamp(1.5rem, 6vw, 2.7rem); letter-spacing: 2px; }
.top-nav { display: flex; align-items: center; gap: 18px; }
.top-nav a { color: var(--dim); font-size: 0.92rem; letter-spacing: 0.5px; }
.top-nav a:hover { color: var(--text); text-decoration: none; }
.top-nav .cta {
  color: var(--text);
  border: 1px solid var(--border); border-radius: 7px;
  padding: 6px 12px; background: var(--panel-bg);
}
.top-nav .cta:hover { border-color: var(--accent); color: #fff; }

/* ── layout ──────────────────────────────────────────────── */
.doc-main { max-width: 1160px; margin: 0 auto; padding: 34px 24px 80px; }
.doc-main.has-toc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 42px; align-items: start;
}
.doc-content { max-width: var(--maxw); min-width: 0; }
.doc-main.has-toc .doc-content { max-width: none; }

.crumbs { color: var(--dim); font-size: 0.85rem; margin: 0 0 22px; }
.crumbs span { opacity: 0.5; margin: 0 4px; }

/* ── on-this-page TOC ────────────────────────────────────── */
.doc-toc {
  position: sticky; top: 78px;
  font-size: 0.86rem; line-height: 1.5;
  border-left: 1px solid var(--border); padding-left: 16px;
  max-height: calc(100vh - 110px); overflow: auto;
}
.toc-title {
  color: var(--dim); text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.7rem; margin-bottom: 10px;
}
.doc-toc ul { list-style: none; margin: 0; padding: 0; }
.doc-toc li { margin: 3px 0; }
.doc-toc a { color: var(--dim); }
.doc-toc a:hover { color: var(--text); text-decoration: none; }
.toc-l3 { padding-left: 14px; font-size: 0.82rem; }

/* ── prose ───────────────────────────────────────────────── */
.doc-content h1, .doc-content h2, .doc-content h3,
.doc-content h4, .doc-content h5, .doc-content h6 {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  color: var(--text); line-height: 1.25; scroll-margin-top: 84px;
}
.doc-content h1 { font-size: 2rem; margin: 0 0 18px; letter-spacing: 0.5px; }
.doc-content h2 {
  font-size: 1.4rem; margin: 60px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); color: var(--accent);
  text-shadow: 0 0 8px rgba(112, 109, 235, 0.3);
}
.doc-content h3 { font-size: 1.12rem; margin: 30px 0 10px; color: var(--green); }
.doc-content h4 { font-size: 1rem; margin: 24px 0 8px; color: var(--amber); }
.doc-content p, .doc-content li { color: var(--text); }
.doc-content strong { color: #fff; }
.doc-content em { color: var(--green); }
.doc-content ul, .doc-content ol { padding-left: 24px; }
.doc-content li { margin: 4px 0; }
.doc-content li::marker { color: var(--accent); }
/* Section breaks: no rule — the --- before each heading renders nothing; the
   heading's own top margin carries the separation as padding instead. */
.doc-content hr { display: none; }
/* Exception: a doc's closing footer note (the --- + paragraph that ends the
   article) gets a visible rule + breathing room above it. hr is display:none,
   so the following paragraph draws the line via border-top. Scoped with
   :last-child so only the final footer matches, never a mid-doc --- + text. */
.doc-content hr + p:last-child {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 28px;
}
/* No frame by default: the panel/modal control screenshots already carry the
   card's own rounded border, so a wrapper border would double up in the
   corners. The full-window shots (overviews, header, 3D scene) have no frame of
   their own and sit on a near-identical page background, so they get one back. */
.doc-content img { max-width: 100%; height: auto; display: block; margin: 22px 0; border-radius: 8px; }
.doc-content img[src*="overview"],
.doc-content img[src*="/guide/header"],
.doc-content img[src*="retro-vibes"] { border: 1px solid var(--border); }

/* underline inline prose links only — not the block-level doc cards */
.doc-content p a, .doc-content li a, .doc-content td a, .doc-content blockquote a {
  text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(112, 109, 235, 0.4);
}
.doc-card, .doc-card:hover { text-decoration: none; }
h1 .anchor, h2 .anchor, h3 .anchor, h4 .anchor, h5 .anchor, h6 .anchor {
  margin-left: 10px; color: var(--dim); opacity: 0; text-decoration: none;
  font-weight: normal; transition: opacity 0.12s;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor,
h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { opacity: 0.6; }

/* code */
.doc-content :not(pre) > code {
  font-size: 0.88em; background: var(--panel-bg);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; color: var(--green);
}
.doc-content pre {
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 18px; overflow-x: auto;
  font-size: 0.86rem; line-height: 1.5;
  /* A real system monospace, NOT Share Tech Mono: that webfont has no
     box-drawing (─│┌┐) or block (█▓▒░) glyphs, so in the ASCII schematics those
     chars fall back to a different-width font and the columns drift. These
     system fonts carry those glyphs at a consistent cell width, so diagrams
     line up. Inline code keeps Share Tech Mono (it never uses box glyphs). */
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', 'DejaVu Sans Mono', monospace;
}
.doc-content pre code { color: var(--text); background: none; border: 0; padding: 0; font-family: inherit; }

/* blockquote */
.doc-content blockquote {
  margin: 18px 0; padding: 2px 18px; color: var(--dim);
  border-left: 3px solid var(--accent);
  background: rgba(112, 109, 235, 0.06); border-radius: 0 8px 8px 0;
}

/* tables */
.doc-content table {
  border-collapse: collapse; width: 100%; margin: 20px 0;
  font-size: 0.9rem; display: block; overflow-x: auto;
}
.doc-content th, .doc-content td {
  border: 1px solid var(--border); padding: 7px 12px; text-align: left;
}
.doc-content thead th {
  background: var(--panel-bg); color: var(--accent);
  font-family: 'Share Tech Mono', monospace; font-weight: normal;
}
.doc-content tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }

/* ── index / landing ─────────────────────────────────────── */
.docs-hero { margin-bottom: 8px; }
.docs-hero h1 {
  font-size: 1.5rem; margin: 0 0 12px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 6px;
}
.lede { font-size: 1.15rem; color: var(--dim); max-width: 60ch; }
.overview p { color: var(--text); }
.cards-heading {
  font-family: 'Share Tech Mono', monospace; color: var(--dim);
  text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem;
  margin: 40px 0 16px;
}
.doc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.doc-card {
  display: flex; flex-direction: column;
  background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 18px 16px; color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.doc-card:hover {
  border-color: var(--accent); transform: translateY(-2px); text-decoration: none;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.doc-card h3 { font-family: 'Share Tech Mono', monospace; color: var(--accent); margin: 0 0 8px; font-size: 1.05rem; }
.doc-card p { color: var(--dim); font-size: 0.9rem; margin: 0 0 14px; flex: 1; }
.doc-card .read { color: var(--green); font-size: 0.85rem; font-family: 'Share Tech Mono', monospace; }

/* ── footer ──────────────────────────────────────────────── */
.doc-foot {
  border-top: 1px solid var(--border); color: var(--dim); font-size: 0.82rem;
  max-width: 1160px; margin: 0 auto; padding: 22px 24px 40px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.doc-foot code { color: var(--dim); }

@media (max-width: 860px) {
  .doc-main.has-toc { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { display: none; }
  .docs-hero h1 { font-size: 1.9rem; }
}
