:root {
  color-scheme: light;
  --ink: #17151c;
  --muted: #706b78;
  --line: #e9e5ec;
  --surface: #ffffff;
  --soft: #f7f4f8;
  --accent: #6e3fd2;
  --accent-soft: #eee7fb;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--surface); }
a { color: inherit; }
.nav, .topbar { height: 4rem; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1.25rem, 5vw, 5rem); border-bottom: 1px solid var(--line); }
.brand { font-weight: 720; letter-spacing: -.03em; text-decoration: none; }
.phase { padding: .35rem .65rem; border-radius: 999px; background: var(--accent-soft); color: #5530a8; font-size: .8125rem; font-weight: 700; }
.home main { min-height: calc(100vh - 8.5rem); }
.hero { width: min(74rem, calc(100% - 2.5rem)); margin: 0 auto; padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem); }
.eyebrow { margin: 0 0 1rem; color: var(--accent); font-size: .8125rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 12ch; margin: 0; font-size: clamp(3.2rem, 9vw, 7rem); line-height: .93; letter-spacing: -.075em; }
.lead { max-width: 42rem; margin: 2rem 0; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.6; }
.primary { display: inline-flex; min-height: 3rem; align-items: center; padding: 0 1.2rem; border-radius: .7rem; background: var(--ink); color: white; font-weight: 700; text-decoration: none; }
.status { display: grid; grid-template-columns: repeat(3, 1fr); width: min(74rem, calc(100% - 2.5rem)); margin: 0 auto 5rem; border-top: 1px solid var(--line); }
.status article { padding: 1.75rem 2rem 1rem 0; }
.status article + article { padding-left: 2rem; border-left: 1px solid var(--line); }
.status span { color: var(--accent); font-size: .8rem; font-weight: 800; }
.status h2 { margin: .8rem 0 .4rem; font-size: 1.1rem; }
.status p { margin: 0; color: var(--muted); line-height: 1.5; }
.home-footer { min-height: 4.5rem; display: flex; align-items: center; justify-content: center; padding: 1rem; border-top: 1px solid var(--line); }
.home-footer a { color: var(--muted); font-size: .9375rem; text-underline-offset: .25em; }
.topbar { position: sticky; top: 0; z-index: 20; padding: 0 1.5rem; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.menu-button { display: none; min-height: 2.5rem; padding: 0 .8rem; border: 1px solid var(--line); border-radius: .5rem; background: white; color: var(--ink); font: inherit; }
.docs-layout { display: grid; grid-template-columns: 18rem minmax(0, 1fr); min-height: calc(100vh - 4rem); }
.sidebar { position: sticky; top: 4rem; height: calc(100vh - 4rem); overflow-y: auto; padding: 2rem 1.25rem; border-right: 1px solid var(--line); background: var(--soft); }
.sidebar-label { margin: 0 0 .75rem; color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-link { display: block; margin: .15rem 0; padding: .65rem .75rem; border-radius: .5rem; color: #504b56; font-size: .9375rem; line-height: 1.35; overflow-wrap: anywhere; text-decoration: none; }
.doc-link:hover { background: #ece7ef; color: var(--ink); }
.doc-link.active { background: var(--accent-soft); color: #5530a8; font-weight: 650; }
.docs-home-link { margin-bottom: .75rem; color: var(--accent); font-weight: 700; }
.doc-folder { margin: .2rem 0; }
.doc-folder > summary { padding: .55rem .5rem; border-radius: .4rem; color: #5e5863; cursor: pointer; font-size: .875rem; font-weight: 700; }
.doc-folder-children { margin-left: .65rem; padding-left: .45rem; border-left: 1px solid #ddd5e2; }
.doc-folder-children .doc-link { padding-top: .5rem; padding-bottom: .5rem; font-size: .875rem; }
.document-shell { min-width: 0; padding: 4.5rem clamp(1.5rem, 6vw, 6rem) 7rem; }
.document { width: min(100%, 52rem); margin: 0 auto; font-size: 1.0625rem; line-height: 1.75; }
.document h1, .document h2, .document h3, .document h4 { line-height: 1.22; letter-spacing: -.025em; scroll-margin-top: 5rem; }
.document h1 { margin: 0 0 2.5rem; font-size: clamp(2rem, 5vw, 3rem); }
.document h2 { margin: 3.5rem 0 1rem; font-size: 1.6rem; }
.document h3 { margin: 2.5rem 0 .75rem; font-size: 1.25rem; }
.document p { margin: 1rem 0; }
.document ul, .document ol { padding-left: 1.6rem; }
.document li { margin: .35rem 0; }
.document hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--line); }
.document blockquote { margin: 1.5rem 0; padding: .25rem 1.25rem; border-left: 3px solid #b99ce7; color: #55505d; }
.document code { padding: .15em .35em; border-radius: .3rem; background: var(--soft); font-size: .9em; }
.document pre { overflow-x: auto; padding: 1rem 1.2rem; border-radius: .65rem; background: #201d24; color: #f7f4f8; }
.document pre code { padding: 0; background: none; }
.document a { color: var(--accent); text-underline-offset: .2em; }
.document table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.document th, .document td { padding: .65rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.docs-index > h1 { margin-bottom: .75rem; }
.docs-index-tree { margin-top: 2rem; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--soft); }
.muted { color: var(--muted); }
.error { color: #9a2d2d; }
@media (max-width: 760px) {
  .nav, .topbar { padding: 0 1rem; }
  .status { grid-template-columns: 1fr; }
  .status article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .menu-button { display: inline-flex; align-items: center; }
  .docs-layout { display: block; }
  .sidebar { position: fixed; inset: 4rem 0 auto; z-index: 10; height: auto; max-height: calc(100vh - 4rem); border-right: 0; border-bottom: 1px solid var(--line); transform: translateY(-115%); transition: transform 160ms ease; }
  .sidebar.open { transform: translateY(0); }
  .document-shell { padding: 2.5rem 1.25rem 5rem; }
  .document { font-size: 1rem; line-height: 1.7; }
}
