/* ===========================
   Base variables & theming
   =========================== */
/* Remove I-beam cursor on text content */
html, body,
h1, h2, h3, h4, h5, h6,
p, span, li, dt, dd,
blockquote, code, pre, strong, em, small,
label {
  cursor: default;
}

/* Keep expected cursors for interactive elements */
a, button, .btn {
  cursor: pointer;
}

input, textarea {
  cursor: text;
}


:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --page-max: 1040px;
  --radius: 8px;

  --bg: #ffffff;
  --bg-muted: #f6f8fa;
  --text: #0b1220;
  --text-muted: #57606a;
  --border: #d0d7de;

  --link: #0969da;
  --link-hover: #0550ae;

  --btn-bg: #f6f8fa;
  --btn-bg-hover: #eef1f4;

  --code-bg: #f6f8fa;

  --ok-bg: #dafbe1;
  --ok-border: #2da44e;
  --bad-bg: #ffebe9;
  --bad-border: #cf222e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-muted: #161b22;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --border: #30363d;

    --link: #2f81f7;
    --link-hover: #79c0ff;

    --btn-bg: #21262d;
    --btn-bg-hover: #30363d;

    --code-bg: #161b22;

    --ok-bg: rgba(46,160,67,0.15);
    --ok-border: #2ea043;
    --bad-bg: rgba(248,81,73,0.15);
    --bad-border: #f85149;
  }
}

/* ===========================
   Global
   =========================== */

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===========================
   Layout
   =========================== */

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 16px;
}

main {
  padding: 32px 0 64px;
}

/* ===========================
   Navigation
   =========================== */

.nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand {
  font-weight: 650;
  letter-spacing: 0.2px;
}

.tagline {
  color: var(--text-muted);
  font-size: 14px;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ===========================
   Hero
   =========================== */

.hero {
  padding: 24px 0;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero p {
  /* max-width: 70ch; */
  color: var(--text-muted);
}

.hero-claim {
  max-width: none;
  font-size: 18px;
  text-wrap: balance;
}

.hero-claim strong {
  color: var(--text);
}

.hero-desc {
  max-width: 70ch;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ===========================
   Sections
   =========================== */

.section {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   Buttons
   =========================== */

.btn {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--btn-bg);
  color: var(--text);
  font-weight: 600;
}

.btn:hover {
  background: var(--btn-bg-hover);
  text-decoration: none;
}

.btn-primary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 500;
}

.btn-primary:hover {
  background: var(--bg-muted);
  border-color: var(--accent);
}

/* ===========================
   Code
   =========================== */

pre {
  background: var(--code-bg);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ===========================
   Callouts
   =========================== */

.callout {
  padding: 12px;
  border-left: 4px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.callout.ok {
  background: var(--ok-bg);
  border-left-color: var(--ok-border);
}

.callout.bad {
  background: var(--bad-bg);
  border-left-color: var(--bad-border);
}

/* ===========================
   Footer
   =========================== */

.footer {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.footer .container {
  display: flex;
  justify-content: space-between;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--text);
}

/* ===========================
   Doc pages (markdown-like)
   =========================== */

.doc {
  max-width: 72ch;
  padding: 24px 0 40px;
}

.doc-head {
  margin: 8px 0 24px;
}

.doc h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 12px;
}

.doc h2 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 14px;
}

.doc ul,
.doc ol {
  padding-left: 20px;
}

.doc-lead {
  color: var(--text);
  font-size: 16px;
  margin: 0;
}

.doc-lead-muted {
  color: var(--text-muted);
  margin-left: 6px;
}

.diagram {
  margin: 16px 0;
}

/* Mermaid block should look like code until it renders */
.mermaid {
  background: var(--code-bg);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--border);
}

/* After mermaid renders, it becomes SVG; give it breathing room */
.mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.doc-cta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ===========================
   Mermaid: GitHub-ish styling
   =========================== */

.mermaid {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

/* Make the SVG inherit your palette */
.mermaid svg {
  font-family: var(--font-sans);
}

/* Nodes */
.mermaid .node rect,
.mermaid .node polygon,
.mermaid .node circle,
.mermaid .node ellipse {
  fill: var(--bg) !important;
  stroke: var(--border) !important;
  stroke-width: 1.25px !important;
}

/* Node labels */
.mermaid .node .label,
.mermaid .nodeLabel {
  color: var(--text) !important;
  fill: var(--text) !important;
  font-size: 13px !important;
}

/* Edges */
.mermaid .edgePath path {
  stroke: var(--text-muted) !important;
  stroke-width: 1.25px !important;
}

/* Arrowheads */
.mermaid marker path {
  fill: var(--text-muted) !important;
  stroke: var(--text-muted) !important;
}

/* Edge labels */
.mermaid .edgeLabel {
  background: var(--bg) !important;
  color: var(--text-muted) !important;
}

.mermaid .edgeLabel text {
  fill: var(--text-muted) !important;
  font-size: 12px !important;
}

/* Remove harsh “gray box” feel some Mermaid themes add */
.mermaid .label-container {
  fill: transparent !important;
  stroke: transparent !important;
}
.mermaid,
.mermaid svg {
  user-select: none;
  cursor: default;
}

.mermaid text {
  user-select: none;
  cursor: default;
}


.checklist {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

.checklist li {
  position: relative;
  padding-left: 1.25rem;
  margin: 8px 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* Use for definition-style sections to avoid card fatigue */
.section.section-plain {
  background: transparent;
  border: none;
  padding: 0;
}
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.cta-inline {
  display: flex;
  justify-content: flex-start;
}