/* ── Linear-inspired design tokens for Agent Smith docs ──
 *
 * Source: docs/DESIGN.md (Linear.app design system from awesome-design-md)
 * Approach: CSS variables only — no custom templates.
 * Loaded via mkdocs.yml extra_css, layered on top of custom.css.
 *
 * Brand adaptation: Agent Smith green (#00a854/#00d46a) replaces
 * Linear's indigo-violet (#5e6ad2/#7170ff) as the accent color.
 */

/* ── Inter Variable font with Linear's OpenType features ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700&display=swap');

/* ── Dark mode — Linear-inspired near-black surfaces ── */

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #0f1011;
  --md-default-fg-color: #d0d6e0;
  --md-primary-fg-color: #0f1011;
  --md-primary-bg-color: #0f1011;
  --md-accent-fg-color: #00d46a;
  --md-typeset-a-color: #00d46a;

  /* Linear text hierarchy */
  --md-default-fg-color--light: #8a8f98;
  --md-default-fg-color--lighter: #62666d;
  --md-default-fg-color--lightest: rgba(255,255,255,0.08);
}

[data-md-color-scheme="slate"] .md-header {
  background: rgba(15,16,17,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

[data-md-color-scheme="slate"] .md-tabs {
  background: #0f1011;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

[data-md-color-scheme="slate"] .md-sidebar {
  background: #0f1011;
}

[data-md-color-scheme="slate"] .md-typeset code {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

[data-md-color-scheme="slate"] .md-typeset pre > code {
  background: #08090a;
  border: 1px solid rgba(255,255,255,0.05);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(255,255,255,0.04);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover td {
  background: rgba(255,255,255,0.02);
}

[data-md-color-scheme="slate"] .md-footer {
  background: #08090a;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ── Light mode refinements ── */

[data-md-color-scheme="default"] {
  --md-default-bg-color: #f7f8f8;
}

/* ── Typography — Inter with Linear-inspired tracking ── */

:root {
  --md-text-font: "Inter", "DM Sans", -apple-system, system-ui, sans-serif;
}

.md-typeset {
  font-feature-settings: "cv01", "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.md-typeset h1 {
  letter-spacing: -0.04em;
  font-feature-settings: "cv01", "ss03";
}

.md-typeset h2 {
  letter-spacing: -0.03em;
  font-feature-settings: "cv01", "ss03";
}

.md-typeset h3 {
  letter-spacing: -0.02em;
  font-feature-settings: "cv01", "ss03";
}

/* ── Mermaid diagram styling for dark mode ── */

[data-md-color-scheme="slate"] .mermaid {
  --md-mermaid-font-family: "Inter", sans-serif;
}

/* ── Admonition refinements ── */

[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background: rgba(255,255,255,0.02);
  border-color: rgba(255,255,255,0.08);
}

/* ── Content max-width for readability ── */

.md-content__inner {
  max-width: 52rem;
}
