/* ——— Self-hosted fonts ——— */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-acb6ad8efbc88ce55fcc0639a5d0a211.woff2?vsn=d') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-e6b53aaa79daa03aa9adcd425f386253.woff2?vsn=d') format('woff2');
}

/* ——— Design tokens ——— */
:root {
  --bg: #fafaf9;
  --bg-subtle: #f3f2ef;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #404040;
  --muted: #6b7280;
  --border: #e5e5e3;
  --border-strong: #d4d4d1;

  /* Signature palette — pink-coral gradient */
  --accent: #e84393;
  --accent-soft: rgba(232, 67, 147, 0.08);
  --accent-mid: rgba(232, 67, 147, 0.15);
  --warm: #f97316;
  --warm-soft: rgba(249, 115, 22, 0.1);
  --green: #059669;
  --green-soft: rgba(5, 150, 105, 0.08);

  --font: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Menlo, monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --white: #ffffff;
  --accent-hover: #d63384;
  --accent-shadow: rgba(232, 67, 147, 0.3);
  --bg-alpha: rgba(250, 250, 249, 0.85);
  --radius-sm: 4px;

  --code-bg: #1e1e2e;
  --code-fg: #cdd6f4;

  /* Syntax highlighting (Catppuccin-inspired) */
  --syntax-comment: #6c7086;
  --syntax-punctuation: #9399b2;
  --syntax-tag: #f38ba8;
  --syntax-number: #fab387;
  --syntax-string: #a6e3a1;
  --syntax-operator: #89dceb;
  --syntax-keyword: #cba6f7;
  --syntax-function: #89b4fa;
  --syntax-variable: #f9e2af;

  --max-w: 1080px;
  --transition: 0.2s ease;
}

/* ——— Reset ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { overflow-x: hidden; }
img { max-width: 100%; display: block; }

/* ——— Base ——— */
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ——— Layout ——— */
.container {
  width: min(var(--max-w), 90vw);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-alpha);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo:hover { text-decoration: none; }

.logo-icon {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 500;
}

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

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

.nav-links a.nav-cta {
  color: var(--surface);
  background: var(--ink);
  padding: 0.35rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  transition: opacity var(--transition);
}

.nav-links a.nav-cta:hover {
  color: var(--surface);
  opacity: 0.85;
}

.locale-dropdown {
  position: relative;
  margin-left: 1rem;
}

.locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: all var(--transition);
}

.locale-toggle:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.locale-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  padding: 0.3rem;
  margin: 0;
  min-width: 130px;
  z-index: 200;
}

.locale-dropdown.open .locale-menu {
  display: block;
}

.locale-option {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--muted);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.locale-option:hover {
  color: var(--ink);
  background: var(--bg-subtle);
  text-decoration: none;
}

.locale-option.active {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ——— Hero ——— */
.hero {
  padding-top: 5rem;
  padding-bottom: 3rem;
  position: relative;
}

.hero-content {
  max-width: 640px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-mid);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero .lead {
  font-size: 1.15rem;
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 540px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.button:hover { text-decoration: none; }

.button.primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 1px 3px var(--accent-shadow);
}
.button.primary:hover {
  background: var(--accent-hover);
}

.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.button.secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

/* ——— Origin story card ——— */
.origin-card {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  max-width: 600px;
  box-shadow: var(--shadow-sm);
}

.origin-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.origin-logo {
  height: 1.4rem;
  width: auto;
  display: inline-block;
}

.origin-card p {
  color: var(--ink-2);
  font-size: 0.925rem;
}

/* ——— Geometric accent ——— */
.geo-accent {
  position: absolute;
  top: 2rem;
  right: 0;
  width: 320px;
  height: 320px;
  pointer-events: none;
  opacity: 0.5;
}

.geo-accent svg {
  width: 100%;
  height: 100%;
}

/* ——— Steps (How it works) ——— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
  min-width: 0;
}

.step:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.step strong {
  display: block;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ——— Tools ——— */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
  min-width: 0;
}

.tool-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.tool-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.tool-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: grid;
  gap: 0.4rem;
}

.tool-list li {
  font-size: 0.9rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tool-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.4;
}

.tool-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* ——— Config section ——— */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.config-card pre[class*="language-"],
.config-card pre.code-block,
.config-card .file-tree {
  flex: 1;
}

.config-card h3 {
  margin-bottom: 0.5rem;
}

.config-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ——— File tree ——— */
.file-tree {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.file-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
}

.file-tree > ul {
  padding-left: 0;
}

.file-tree li {
  position: relative;
  padding: 0.05rem 0;
}

.file-tree li::before {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.file-tree > ul > li::before {
  display: none;
}

.file-tree li::after {
  content: "";
  position: absolute;
  left: -0.9rem;
  top: 0.75em;
  width: 0.65rem;
  height: 1px;
  background: var(--border);
}

.file-tree > ul > li::after {
  display: none;
}

.file-tree li:last-child::before {
  bottom: calc(100% - 0.75em);
}

.file-tree .dir::before,
.file-tree .file::before,
.file-tree .highlight::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.35rem;
  vertical-align: -2px;
  background-size: contain;
  background-repeat: no-repeat;
}

.file-tree .dir::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%237c3aed'%3E%3Cpath d='M2 4a2 2 0 0 1 2-2h3.17a2 2 0 0 1 1.41.59l1.42 1.41H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4z'/%3E%3C/svg%3E");
}

.file-tree .file::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M4 4a2 2 0 0 1 2-2h4.59a2 2 0 0 1 1.41.59l3.41 3.41A2 2 0 0 1 16 7.41V16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.file-tree .highlight::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23f59e0b'%3E%3Cpath fill-rule='evenodd' d='M4 4a2 2 0 0 1 2-2h4.59a2 2 0 0 1 1.41.59l3.41 3.41A2 2 0 0 1 16 7.41V16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.file-tree .dir {
  color: var(--violet);
  font-weight: 500;
}

.file-tree .file {
  color: var(--muted);
}

.file-tree .highlight {
  color: var(--amber);
  font-weight: 600;
}

/* ——— Code blocks ——— */
.code-block,
pre[class*="language-"] {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  margin-top: 0.75rem;
  max-width: 100%;
}

code[class*="language-"],
.code-block code {
  font-family: var(--mono);
  font-size: 0.82rem;
}

/* Prism token colors (Catppuccin-inspired) */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata { color: var(--syntax-comment); }
.token.punctuation { color: var(--syntax-punctuation); }
.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted { color: var(--syntax-tag); }
.token.boolean,
.token.number { color: var(--syntax-number); }
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted { color: var(--syntax-string); }
.token.operator,
.token.entity,
.token.url,
.language-css .token.string { color: var(--syntax-operator); }
.token.atrule,
.token.attr-value,
.token.keyword { color: var(--syntax-keyword); }
.token.function,
.token.class-name { color: var(--syntax-function); }
.token.regex,
.token.important,
.token.variable { color: var(--syntax-variable); }
.token.table-header { color: var(--syntax-keyword); }

/* ——— CLI commands ——— */
.cli-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: grid;
  gap: 0.5rem;
}

.cli-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.cli-cmd {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

.cli-desc {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ——— Features ——— */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), border-color var(--transition);
  min-width: 0;
}

.feature:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.feature-icon.violet { background: var(--accent-soft); color: var(--accent); }
.feature-icon.amber { background: var(--warm-soft); color: var(--warm); }
.feature-icon.green { background: var(--green-soft); color: var(--green); }

.feature p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ——— Progressive Refinement ——— */
.refinement-text {
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 640px;
  margin-bottom: 2rem;
}

.refinement-steps {
  display: grid;
  gap: 0;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.refinement-step {
  display: flex;
  gap: 1.25rem;
  align-items: stretch;
}

.refinement-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 1.5rem;
}

.refinement-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.refinement-line {
  width: 2px;
  flex: 1;
  background: var(--accent-mid);
}

.refinement-content {
  padding-bottom: 1.5rem;
}

.refinement-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.refinement-content p {
  color: var(--muted);
  font-size: 0.9rem;
}

.refinement-prior-art {
  font-size: 0.875rem;
  max-width: 640px;
  line-height: 1.7;
  border-left: 3px solid var(--accent-mid);
  padding-left: 1rem;
}

/* ——— FAQ ——— */
.faq {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.faq-item {
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.faq-item summary {
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--muted);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ——— Blog / Updates ——— */
.blog-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.blog-card a {
  text-decoration: none;
  color: var(--ink);
}

.blog-card a:hover { text-decoration: none; }

.blog-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.blog-card .meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--mono);
  margin-bottom: 0.35rem;
}

.blog-card .summary {
  color: var(--ink-2);
  font-size: 0.9rem;
}

/* ——— Blog listing page ——— */
.blog-hero {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-top: 0.5rem;
  transition: color var(--transition);
}

.rss-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.blog-hero h1 {
  margin-bottom: 0.5rem;
}

.blog-listing {
  padding-top: 1rem;
}

/* ——— Post page ——— */
.post-hero {
  padding-top: 4rem;
  padding-bottom: 2rem;
  text-align: center;
}

.post-hero .badge {
  margin-bottom: 1rem;
}

.post-hero h1 {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

.post-hero .lead {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.post-hero .meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-top: 0.75rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  justify-content: center;
}

.post-author-name {
  font-weight: 600;
  color: var(--ink);
}

.post-author-links {
  display: flex;
  gap: 0.5rem;
}

.post-author-links a {
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color var(--transition);
}

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

.prose {
  font-size: 1rem;
  color: var(--ink-2);
  padding-bottom: 4rem;
}

.prose h1 {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.prose .meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.82rem;
  margin-bottom: 1.5rem;
}

.prose h2,
.prose h3 {
  position: relative;
  scroll-margin-top: 5rem;
}

.prose h2 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.heading-anchor {
  color: inherit;
  text-decoration: none;
}

.heading-anchor:hover {
  color: var(--accent);
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.25rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.35rem;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-sm);
}

.prose pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.prose pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.prose pre {
  position: relative;
}

.code-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  color: #a0a0a0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  font-family: var(--font);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}

.prose pre:hover .code-copy-btn {
  opacity: 1;
}

.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #e0e0e0;
}

/* ——— Tables ——— */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.prose th, .prose td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
}

.prose th {
  background: var(--bg-subtle);
  font-weight: 600;
  font-size: 0.85rem;
}

.prose td code {
  font-size: 0.8rem;
}

/* ——— Flash bar ——— */
.flash-bar {
  width: 100%;
  padding: 0.75rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
}
.flash-bar-info {
  background: #eff6ff;
  color: #1e40af;
  border-bottom: 1px solid #bfdbfe;
}
.flash-bar-error {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 1px solid #fecaca;
}
.flash-bar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.flash-bar-content p {
  margin: 0;
}
.flash-bar-title {
  font-weight: 600;
}
.flash-bar-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  padding: 0.25rem;
  flex-shrink: 0;
}
.flash-bar-close:hover {
  opacity: 1;
}

/* ——— Auth page ——— */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-header {
  margin-bottom: 2rem;
}

.auth-logo {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  margin: 0 auto 1rem;
  display: block;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.875rem;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 500;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition);
  cursor: pointer;
}

.auth-button-github {
  background: #24292e;
  color: #ffffff;
  border: 1px solid #24292e;
}

.auth-button-github:hover {
  background: #2f363d;
  text-decoration: none;
  color: #ffffff;
}

.auth-button-gitlab {
  background: #6b4fbb;
  color: #ffffff;
  border: 1px solid #6b4fbb;
}

.auth-button-gitlab:hover {
  background: #5943a0;
  text-decoration: none;
  color: #ffffff;
}

.auth-terms {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

.auth-terms a {
  color: var(--accent);
  text-decoration: none;
}

.auth-terms a:hover {
  text-decoration: underline;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .logo {
  margin-bottom: 0.5rem;
  display: inline-block;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.legal-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-links li {
  padding: 0.2rem 0;
}

.legal-links a {
  color: var(--ink-2);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--transition);
}

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

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.roadmap-list li {
  color: var(--ink-2);
  font-size: 0.875rem;
  padding: 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.roadmap-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

/* ——— Divider between sections (not inside posts) ——— */
.section + .section {
  border-top: 1px solid var(--border);
}

.post .section + .section,
.post .post-hero {
  border-top: none;
}

/* ——— Utility ——— */
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--ink-2); line-height: 1.7; }

.mono {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
}


/* ——— Mobile menu ——— */
.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.4rem;
  cursor: pointer;
  color: var(--muted);
  transition: all var(--transition);
}

.mobile-menu-toggle:hover {
  color: var(--ink);
  border-color: var(--border-strong);
}

.mobile-menu-toggle .close-icon { display: none; }
.mobile-menu-toggle.open .menu-icon { display: none; }
.mobile-menu-toggle.open .close-icon { display: block; }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 5vw 1rem;
  gap: 0;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  display: block;
  padding: 0.65rem 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ——— Responsive: Tablet ——— */
@media (max-width: 960px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }

  .geo-accent {
    width: 200px;
    height: 200px;
  }
}

/* ——— Responsive: Mobile ——— */
@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .tools-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .locale-dropdown {
    margin-left: auto;
  }

  .geo-accent {
    display: none;
  }

  .hero {
    padding-top: 3rem;
  }

  .section {
    padding: 3rem 0;
  }

  .cta-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .code-block,
  pre[class*="language-"] {
    font-size: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cli-item {
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
  }

  .cli-cmd {
    font-size: 0.78rem;
  }

  .cli-desc {
    font-size: 0.82rem;
  }

  h2 {
    font-size: clamp(1.3rem, 5vw, 1.75rem);
  }

  .lead {
    font-size: 1.05rem;
  }

  .origin-card {
    padding: 1.25rem;
  }

  .config-card {
    padding: 1.25rem;
  }

  .config-card pre[class*="language-"],
  .config-card pre.code-block {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
    border-radius: 0;
    padding: 1rem 1.25rem;
    width: calc(100% + 2.5rem);
    max-width: calc(100% + 2.5rem);
  }
}

/* ——— Responsive: Small phones ——— */
@media (max-width: 400px) {
  .container {
    width: 92vw;
  }

  .hero {
    padding-top: 2rem;
  }

  .section {
    padding: 2.25rem 0;
  }

  .step, .tool-card, .feature, .config-card {
    padding: 1.15rem;
  }

  .config-card pre[class*="language-"],
  .config-card pre.code-block {
    margin-left: -1.15rem;
    margin-right: -1.15rem;
    padding: 0.85rem 1.15rem;
    width: calc(100% + 2.3rem);
    max-width: calc(100% + 2.3rem);
  }

  .code-block,
  pre[class*="language-"] {
    font-size: 0.7rem;
    padding: 0.85rem;
  }

  .badge {
    font-size: 0.7rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Documentation
   ═══════════════════════════════════════════════════════════════ */

.docs-hero {
  padding-top: 4rem;
  padding-bottom: 1rem;
}

.docs-hero .lead {
  color: var(--ink-2);
  margin-top: 0.5rem;
}

/* ——— Index: category cards ——— */
.docs-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.docs-category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.docs-category-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  text-decoration: none;
}

.docs-category-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  color: var(--accent);
  margin-bottom: 1rem;
}

.docs-category-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.docs-category-card p {
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ——— Docs layout ——— */
.docs-page {
  padding-top: 2rem;
}

.docs-single {
  max-width: 720px;
}

/* ——— Collapsible Table of Contents ——— */
.docs-toc-collapse {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.docs-toc-collapse summary {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  user-select: none;
}

.docs-toc-collapse summary:hover {
  color: var(--ink);
}

.docs-toc-collapse[open] summary {
  border-bottom: 1px solid var(--border);
}

.docs-toc-list {
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
}

.docs-toc-item a {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  transition: color var(--transition);
}

.docs-toc-item a:hover {
  color: var(--accent);
}

.docs-toc-nested a {
  padding-left: 1.5rem;
  font-size: 0.78rem;
}

/* ——— Breadcrumbs ——— */
.docs-breadcrumbs {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.docs-breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.docs-breadcrumbs a:hover {
  text-decoration: underline;
}

.docs-breadcrumb-sep {
  margin: 0 0.4rem;
  color: var(--border-strong);
}

/* ——— Content area ——— */
.docs-single h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.docs-single .lead {
  margin-bottom: 2rem;
}

/* ——— Category page: page list ——— */
.docs-page-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.docs-page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow var(--transition), border-color var(--transition);
}

.docs-page-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  text-decoration: none;
}

.docs-page-card h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.docs-page-card p {
  color: var(--ink-2);
  font-size: 0.88rem;
}

/* ——— Docs responsive ——— */
@media (max-width: 768px) {
  .docs-category-grid {
    grid-template-columns: 1fr;
  }
}
