/* sepa — site styles. No JS, no webfonts: the page is text and should load like text. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-code: #f6f7f9;
  --fg: #14171a;
  --fg-muted: #5a6470;
  --border: #e3e6ea;
  --accent: #1c5d99;
  --accent-fg: #ffffff;
  --accent-soft: #e8f0f8;
  --warn-bg: #fff8e6;
  --warn-border: #e6c860;
  --radius: 10px;
  --wrap: 72rem;
  --prose: 46rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --bg-soft: #161b22;
    --bg-code: #161b22;
    --fg: #e6e9ee;
    --fg-muted: #99a3af;
    --border: #262d36;
    --accent: #7bb3e8;
    --accent-fg: #0f1216;
    --accent-soft: #17222e;
    --warn-bg: #241f11;
    --warn-border: #6b5a22;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--accent-fg);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0; z-index: 100;
}
.skip:focus { left: 0; top: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ── header ─────────────────────────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner { display: flex; align-items: center; gap: 1.5rem; height: 3.5rem; }
.brand {
  font-weight: 700; font-size: 1.05rem; color: var(--fg);
  text-decoration: none; letter-spacing: -.01em;
}
.brand-mark { color: var(--accent); }
.topbar nav { margin-left: auto; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar nav a { color: var(--fg-muted); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--fg); }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 4.5rem 0 3rem;
  background: linear-gradient(180deg, var(--accent-soft), transparent);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  margin: 0 0 .75rem; text-transform: uppercase; letter-spacing: .09em;
  font-size: .75rem; font-weight: 600; color: var(--accent);
}
.hero h1 {
  margin: 0 0 1rem; font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.1; letter-spacing: -.025em; max-width: 20ch;
}
.lede { font-size: 1.15rem; color: var(--fg-muted); max-width: 60ch; margin: 0 0 1.75rem; }

.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; }
.btn {
  display: inline-block; padding: .65rem 1.35rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
  color: var(--fg); text-decoration: none; font-weight: 600; font-size: .95rem;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.08); }

.install {
  display: inline-block; margin: 0 0 1.5rem; padding: .8rem 1.2rem;
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--radius); font-family: var(--mono); font-size: .95rem;
}
.install code::before { content: "$ "; color: var(--fg-muted); }
.badges { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }
.badges img { height: 20px; }

/* ── prose ──────────────────────────────────────────────────────────────── */
.prose { max-width: var(--prose); padding-block: 3rem; }
.hero + .prose, .wrap.prose { margin-inline: auto; }
.prose h2 {
  margin: 2.75rem 0 .85rem; font-size: 1.6rem; letter-spacing: -.015em;
  padding-bottom: .35rem; border-bottom: 1px solid var(--border);
}
.prose h3 { margin: 2rem 0 .6rem; font-size: 1.2rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin-bottom: .35rem; }
.prose img { max-width: 100%; height: auto; }

.prose code {
  font-family: var(--mono); font-size: .875em;
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: 5px; padding: .1em .35em;
}
.prose pre {
  background: var(--bg-code); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.1rem;
  overflow-x: auto; font-size: .875rem; line-height: 1.55; margin: 0 0 1.25rem;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }

.prose blockquote {
  margin: 0 0 1.25rem; padding: .85rem 1.1rem;
  background: var(--warn-bg); border-left: 3px solid var(--warn-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }

/* Tables scroll rather than forcing the page to. */
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 0 0 1.25rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: .55rem .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; white-space: nowrap; }
.prose tbody tr:hover { background: var(--bg-soft); }

.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.muted { color: var(--fg-muted); font-size: .92rem; }

/* Anchor links Zola inserts for headings. */
.prose .zola-anchor { color: var(--fg-muted); text-decoration: none; margin-left: .4rem; opacity: 0; }
.prose h2:hover .zola-anchor, .prose h3:hover .zola-anchor, .zola-anchor:focus { opacity: 1; }

/* ── docs layout ────────────────────────────────────────────────────────── */
.docs-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 60rem) { .docs-layout { grid-template-columns: 1fr; gap: 0; } }

.sidebar { padding-block: 3rem 1rem; position: sticky; top: 4.5rem; }
@media (max-width: 60rem) {
  .sidebar { position: static; padding-block: 2rem 0; border-bottom: 1px solid var(--border); }
}
.sidebar-title {
  margin: 0 0 .6rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--fg-muted);
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin: 0; }
.sidebar a {
  display: block; padding: .32rem .6rem; margin-left: -.6rem;
  border-radius: 6px; color: var(--fg-muted); text-decoration: none; font-size: .94rem;
}
.sidebar a:hover { color: var(--fg); background: var(--bg-soft); }
.sidebar a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.breadcrumb { font-size: .88rem; color: var(--fg-muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--fg-muted); }

.toc {
  margin: 0 0 1.75rem; padding: .7rem 1rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: .93rem;
}
.toc summary { cursor: pointer; font-weight: 600; }
.toc ul { margin: .6rem 0 0; padding-left: 1.1rem; }

/* ── cards ──────────────────────────────────────────────────────────────── */
.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: .75rem; }
.cards a {
  display: block; padding: .95rem 1.1rem; border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--fg);
}
.cards a:hover { border-color: var(--accent); background: var(--bg-soft); }
.cards strong { display: block; color: var(--accent); margin-bottom: .15rem; }
.cards span { color: var(--fg-muted); font-size: .93rem; }

.feature-grid {
  list-style: none; margin: 1.5rem 0 2rem; padding: 0;
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.feature-grid li {
  padding: 1.1rem 1.2rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-soft); margin: 0;
}
.feature-grid strong { display: block; margin-bottom: .3rem; }
.feature-grid p { margin: 0; color: var(--fg-muted); font-size: .93rem; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); background: var(--bg-soft);
  padding: 2.5rem 0; margin-top: 4rem; font-size: .93rem;
}
.footer p { margin: 0 0 .5rem; }
.footer p:last-child { margin-bottom: 0; }
