:root {
  --bg: #ffffff;
  --fg: #0d0d0f;
  --muted: #5c5f66;
  --faint: #9aa0a8;
  --line: #ececec;
  --line-2: #f4f4f4;
  --green: #1f9d63;
  --sidebar-w: 232px;
  --maxw: 1180px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica,
    Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
code, pre, .mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
a { color: inherit; }

/* HEADER — minimal, no navbar chrome */
.docs-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 40px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.home-logo { display: inline-block; line-height: 0; }
.home-logo img { width: 116px; height: auto; }
.header-links { display: flex; align-items: center; gap: 22px; padding-top: 8px; }
.header-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color .15s;
}
.header-links a:hover { color: var(--fg); }

/* LAYOUT */
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* SIDEBAR */
.sidebar {
  position: sticky;
  top: 36px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 14px 0 60px;
}
.sidebar-group { margin-bottom: 24px; }
.sidebar-group h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 600;
}
.sidebar a {
  display: block;
  padding: 5px 10px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 7px;
  transition: color .12s, background .12s;
}
.sidebar a:hover { color: var(--fg); background: var(--line-2); }
.sidebar a.active { color: var(--fg); font-weight: 600; background: var(--line-2); }

/* CONTENT */
.content {
  padding: 14px 0 120px;
  min-width: 0;
  max-width: 760px;
}
.content section { scroll-margin-top: 32px; }
.content section + section { margin-top: 56px; }

.doc-hero { margin-bottom: 44px; }
.doc-hero .eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--faint); font-weight: 600; margin: 0 0 12px;
}
.doc-hero h1 {
  font-size: 40px; line-height: 1.08; letter-spacing: -0.03em;
  margin: 0 0 16px; font-weight: 600;
}
.doc-hero h1 em { font-style: italic; }
.doc-hero p { font-size: 18px; color: var(--muted); margin: 0; max-width: 56ch; }

h2 {
  font-size: 25px;
  letter-spacing: -0.022em;
  line-height: 1.18;
  margin: 0 0 14px;
  font-weight: 600;
}
h3 { font-size: 16px; letter-spacing: -0.01em; margin: 26px 0 10px; font-weight: 600; }
h2 + p, h3 + p { margin-top: 0; }
p { margin: 0 0 14px; }
.content a.inline { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.content a.inline:hover { text-decoration-color: var(--muted); }

ul, ol { margin: 0 0 16px; padding-left: 20px; }
li { margin: 4px 0; }
li::marker { color: var(--faint); }

/* inline code */
:not(pre) > code {
  background: #f4f4f4;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.86em;
  color: #1c1c20;
}

/* code blocks — light, matching the hero terminal */
.code {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0 0 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(20, 20, 30, 0.06);
}
.code .code-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 15px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}
.code .code-head .dot { width: 11px; height: 11px; border-radius: 50%; background: #dcdce0; }
.code .code-head .dot:nth-child(1) { background: #ff5f57; }
.code .code-head .dot:nth-child(2) { background: #febc2e; }
.code .code-head .dot:nth-child(3) { background: #28c840; }
.code .code-head .label {
  margin-left: 8px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--faint);
}
.code pre {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  color: #1f2328;
}
.code pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
/* restrained palette: grey comments, green prompt, red failure — like the hero */
.code .c { color: #9aa0a8; }
.code .p { color: var(--green); }
.code .g { color: var(--green); }
.code .x { color: #dc2626; }
.code .k { color: inherit; font-weight: 600; }   /* yaml key — weight, not color */
.code .s { color: inherit; }                       /* value — plain */
.code-copy {
  position: absolute;
  top: 9px; right: 11px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 11px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.code-copy:hover { background: #f1f1f0; color: var(--fg); }
.code-copy.copied { color: var(--green); border-color: var(--green); }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
thead th {
  text-align: left;
  background: #fafafa;
  color: var(--fg);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody td code { white-space: nowrap; }
td.req { color: var(--muted); font-weight: 600; }

/* callouts — subtle, monochrome */
.note {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: 14.5px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-left: 3px solid #d6d7da;
}
.note.warn { border-left-color: #e2c389; }
.note.good { border-left-color: var(--green); }
.note strong { display: block; margin-bottom: 3px; }

/* tier badges — quiet */
.pill {
  display: inline-block;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 6px;
  background: #f4f4f4;
  color: #44464c;
  border: 1px solid var(--line);
}
.pill.real { color: #126c43; border-color: #cdeadd; background: #f1faf5; }

.tier { border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; margin: 0 0 12px; }
.tier-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.tier p { margin: 0; color: var(--muted); font-size: 14px; }

/* footer */
.doc-footer {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 24px;
  color: var(--faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.doc-footer a { color: var(--muted); text-decoration: none; }
.doc-footer a:hover { color: var(--fg); }

/* responsive */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .docs-header { padding: 28px 20px 0; }
  .home-logo img { width: 96px; }
  .layout { grid-template-columns: 1fr; gap: 0; padding: 0 20px; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 20px 0 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }
  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 14px 0 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
    display: none;
  }
  .sidebar.open { display: block; }
  .content { padding: 24px 0 90px; }
  .doc-hero h1 { font-size: 31px; }
}
