/* Thalamus AI Cloud documentation.
 *
 * Light-themed with a blue brand, matching docs.thalamus.sre. That is a third identity
 * alongside the marketing site (#0b0d12 amber) and the console (#0a0a0b orange), and it
 * is deliberate: docs are read at length rather than scanned, and a light background is
 * easier for that. The existing docs site already established it.
 */
:root {
  --bg: #ffffff;
  --bg-hero: #eef3fb;
  --bg-soft: #f7f9fc;
  --ink: #0c1322;
  --ink-soft: #44506a;
  --ink-faint: #6b7890;
  --line: #e3e8f0;
  --brand: #4f8cff;
  --brand-ink: #1f6feb;
  --card-bg: #ffffff;
  --nav-bg: #0e1525;
  --code-bg: #0f172a;
  --good: #1f9d57;
  --warn: #c79100;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ── nav ── */
nav { background: var(--nav-bg); position: sticky; top: 0; z-index: 30; }
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; }
.brand:hover { text-decoration: none; }
.mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--brand);
  display: grid; place-items: center; color: #0e1525; font-weight: 800; font-size: 13px;
}
.nav-actions { display: flex; gap: 20px; align-items: center; font-size: 14.5px; }
.nav-actions a { color: #b7c2d6; }
.nav-actions a:hover { color: #fff; text-decoration: none; }
.nav-cta {
  background: var(--brand); color: #0e1525 !important; padding: 7px 14px;
  border-radius: 8px; font-weight: 600;
}

/* ── layout ── */
.shell { max-width: 1180px; margin: 0 auto; display: flex; gap: 40px; padding: 0 24px; }
.side {
  width: 216px; flex-shrink: 0; padding: 30px 0 60px;
  position: sticky; top: 51px; align-self: flex-start; max-height: calc(100vh - 51px);
  overflow-y: auto;
}
.side h4 {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-faint); margin: 22px 0 8px; font-weight: 650;
}
.side h4:first-child { margin-top: 0; }
.side a {
  display: block; padding: 5px 0; color: var(--ink-soft); font-size: 14.5px;
  border-left: 2px solid transparent; padding-left: 11px; margin-left: -11px;
}
.side a:hover { color: var(--brand-ink); text-decoration: none; }
.side a.current {
  color: var(--brand-ink); font-weight: 600; border-left-color: var(--brand);
}
main { flex: 1; min-width: 0; padding: 30px 0 80px; max-width: 760px; }
@media (max-width: 900px) {
  .shell { display: block; }
  .side {
    width: auto; position: static; max-height: none; padding: 18px 0;
    border-bottom: 1px solid var(--line);
    display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline;
  }
  .side h4 { margin: 0; width: 100%; }
  .side a { border-left: none; padding-left: 0; margin-left: 0; }
}

/* ── type ── */
h1 { font-size: 33px; line-height: 1.18; letter-spacing: -.8px; margin: 0 0 12px; font-weight: 700; text-wrap: balance; }
h2 {
  font-size: 22px; letter-spacing: -.4px; margin: 44px 0 12px; font-weight: 660;
  padding-top: 14px; border-top: 1px solid var(--line); text-wrap: balance;
}
h3 { font-size: 17px; margin: 26px 0 8px; font-weight: 640; }
p { margin: 0 0 15px; color: var(--ink-soft); }
main > p:first-of-type { font-size: 17.5px; color: var(--ink-soft); }
ul, ol { color: var(--ink-soft); padding-left: 22px; margin: 0 0 15px; }
li { margin-bottom: 6px; }
strong { color: var(--ink); font-weight: 640; }

/* ── code ── */
code {
  font-family: ui-monospace, Menlo, monospace; font-size: 13.5px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; color: var(--ink);
}
pre {
  background: var(--code-bg); color: #e2e8f0; border-radius: 10px;
  padding: 15px 17px; overflow-x: auto; font-size: 13.5px; line-height: 1.6;
  margin: 0 0 16px;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ── tables scroll inside their own container, so the page never scrolls sideways ── */
.scroll { overflow-x: auto; margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th {
  text-align: left; font-weight: 600; color: var(--ink); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .3px; padding: 0 14px 8px 0;
  border-bottom: 1px solid var(--line);
}
td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }

/* ── callouts ── */
.note {
  border-left: 3px solid var(--brand); background: var(--bg-hero);
  border-radius: 8px; padding: 13px 16px; margin: 0 0 18px;
}
.note.warn { border-left-color: var(--warn); background: #fdf8e8; }
.note p:last-child { margin: 0; }
.note strong { display: block; margin-bottom: 3px; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 0 0 18px; }
.card {
  background: var(--card-bg); border: 1px solid var(--line); border-radius: 11px;
  padding: 17px 18px;
}
.card h3 { margin: 0 0 5px; font-size: 15.5px; }
.card p { margin: 0; font-size: 14.5px; }

.hero { background: var(--bg-hero); border-bottom: 1px solid var(--line); padding: 46px 0 40px; }
.hero .shell { display: block; }
.hero h1 { margin-bottom: 10px; }
.hero p { font-size: 18px; max-width: 60ch; margin: 0; }

footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 26px 0; }
.foot-in {
  max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 14px; color: var(--ink-faint);
}
.foot-in a { color: var(--ink-faint); }
