:root {
  /* Surfaces: L0 canvas (60%), L1 surface (30%), one accent (10%) */
  --canvas: #f6f8f7;
  --surface: #ffffff;
  --ink: #10261f;
  --muted: #4d625a;
  --border: rgba(16, 38, 31, 0.12);
  --accent: #0a6b50;
  --accent-ink: #ffffff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --edge: none;

  /* 4/8pt spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;

  /* Type: 3 weights max, 12/14/16 base sizes */
  --w-regular: 400; --w-medium: 500; --w-semibold: 600;
  --text-meta: 0.75rem; --text-secondary: 0.875rem; --text-body: 1rem; --text-h3: 1.25rem;

  --vp-wide: 1280px;
  --prose: 68ch;

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0c1613; --surface: #131f1b; --ink: #e8f2ee; --muted: #9fb5ac;
    --border: rgba(232, 242, 238, 0.14);
    --accent: #3fcf9f; --accent-ink: #062018;
    --shadow: none; --edge: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0c1613; --surface: #131f1b; --ink: #e8f2ee; --muted: #9fb5ac;
  --border: rgba(232, 242, 238, 0.14);
  --accent: #3fcf9f; --accent-ink: #062018;
  --shadow: none; --edge: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; width: 100%;
  background: var(--canvas); color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-body); font-weight: var(--w-regular); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0 0 var(--s4); font-weight: var(--w-semibold); line-height: 1.2; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: var(--text-h3); }
p { margin: 0 0 var(--s4); max-width: var(--prose); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.page { width: 100%; max-width: var(--vp-wide); margin-inline: auto; padding-inline: var(--s6); }
.secondary { font-size: var(--text-secondary); }
.meta { font-size: var(--text-meta); line-height: 1.4; }
.muted { color: var(--muted); }

/* Chrome: full width, no max-width */
.site-header {
  width: 100%; position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s6);
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}
.logo { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--w-semibold); font-size: var(--text-h3); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: var(--s2); }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s3); color: var(--ink); text-decoration: none; font-weight: var(--w-medium); font-size: var(--text-secondary); }
.nav a:not(.btn):hover { color: var(--accent); }
.menu-btn {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; color: var(--ink); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
@media (max-width: 767.98px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: var(--s2) var(--s6) var(--s4);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding-inline: 0; border-bottom: 1px solid var(--border); }
  .nav .btn { margin-top: var(--s4); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: var(--s3) var(--s6);
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: var(--w-medium); text-decoration: none;
  border: 0; border-radius: 8px; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline-color: var(--ink); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s12); align-items: center; padding-block: var(--s16); }
@media (max-width: 899.98px) { .hero { grid-template-columns: 1fr; padding-block: var(--s12); } }
.lede { font-size: var(--text-h3); color: var(--muted); max-width: 52ch; margin-bottom: var(--s8); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4); }
.cta-row p { margin: 0; color: var(--muted); font-size: var(--text-secondary); }

.chat {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow), var(--edge);
  padding: var(--s6); display: grid; gap: var(--s3);
}
.chat-head { display: flex; align-items: center; gap: var(--s2); padding-bottom: var(--s3); border-bottom: 1px solid var(--border); font-weight: var(--w-medium); font-size: var(--text-secondary); }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.msg { margin: 0; max-width: 85%; padding: var(--s2) var(--s4); border-radius: 12px; line-height: 1.5; }
.msg.bot { background: var(--canvas); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: var(--accent-ink); margin-left: auto; border-bottom-right-radius: 4px; }
.chat-note { margin: var(--s1) 0 0; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .chat .msg { animation: rise 0.4s ease both; }
  .chat .msg:nth-of-type(2) { animation-delay: 0.3s; }
  .chat .msg:nth-of-type(3) { animation-delay: 0.6s; }
  .chat .msg:nth-of-type(4) { animation-delay: 0.9s; }
  .chat .msg:nth-of-type(5) { animation-delay: 1.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

/* Facts: L1 frame with hairline dividers */
.facts {
  list-style: none; margin: 0 0 var(--s16); padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow), var(--edge);
}
.facts li { padding: var(--s6); border-left: 1px solid var(--border); }
.facts li:first-child { border-left: 0; }
.facts strong { display: block; font-size: var(--text-h3); font-weight: var(--w-semibold); }
.facts span { font-size: var(--text-secondary); color: var(--muted); }
@media (max-width: 767.98px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li { border-left: 0; border-top: 1px solid var(--border); }
  .facts li:nth-child(odd) { border-right: 1px solid var(--border); }
  .facts li:nth-child(-n+2) { border-top: 0; }
}

section { padding-block: var(--s16); }
.band { background: var(--surface); border-block: 1px solid var(--border); }

.steps { list-style: none; margin: var(--s8) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s8); counter-reset: step; }
@media (max-width: 767.98px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; padding-top: var(--s4); border-top: 1px solid var(--border); }
.steps li::before { content: counter(step); display: block; margin-bottom: var(--s2); font-weight: var(--w-semibold); color: var(--accent); }
.steps p { color: var(--muted); }

.cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s12); margin-top: var(--s8); }
@media (max-width: 767.98px) { .cols { grid-template-columns: 1fr; gap: var(--s8); } }
.cols ul { margin: 0 0 var(--s4); padding-left: var(--s6); color: var(--muted); max-width: var(--prose); }
.cols li { margin-bottom: var(--s2); }
.cols p { color: var(--muted); }

.faq { max-width: var(--prose); margin-top: var(--s8); border: 1px solid var(--border); border-radius: 12px; background: var(--canvas); }
details { border-top: 1px solid var(--border); }
details:first-child { border-top: 0; }
details summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 56px; padding: var(--s3) var(--s6); cursor: pointer; list-style: none; font-weight: var(--w-medium);
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: var(--text-h3); line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: 0; padding: 0 var(--s6) var(--s4); color: var(--muted); }

.cta { text-align: left; }
.cta p { color: var(--muted); }

.site-footer { width: 100%; padding: var(--s8) var(--s6) var(--s12); border-top: 1px solid var(--border); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); margin-bottom: var(--s4); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: var(--text-secondary); }
.site-footer p { color: var(--muted); max-width: 80ch; margin: 0; }

/* Blog */
.post-list { list-style: none; margin: var(--s8) 0 var(--s6); padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow), var(--edge); }
.post-list li { border-top: 1px solid var(--border); }
.post-list li:first-child { border-top: 0; }
.post-list a { display: block; padding: var(--s6); color: var(--ink); text-decoration: none; }
.post-list a:hover h3 { color: var(--accent); }
.post-list h3 { margin: 0 0 var(--s2); }
.post-list p { margin: 0 0 var(--s2); color: var(--muted); }
.post-list time { font-size: var(--text-meta); color: var(--muted); }
.article { max-width: var(--prose); margin-inline: auto; padding-block: var(--s12) var(--s16); }
.article .crumbs { font-size: var(--text-secondary); color: var(--muted); margin-bottom: var(--s6); }
.article .crumbs a { color: var(--muted); }
.article .byline { font-size: var(--text-secondary); color: var(--muted); margin-bottom: var(--s8); }
.article h2 { margin-top: var(--s12); }
.article h3 { margin-top: var(--s8); }
.article ul, .article ol { padding-left: var(--s6); margin: 0 0 var(--s4); }
.article li { margin-bottom: var(--s2); }
.article blockquote { margin: var(--s6) 0; padding-left: var(--s4); border-left: 2px solid var(--accent); color: var(--muted); }
.article hr { border: 0; border-top: 1px solid var(--border); margin: var(--s8) 0; }
.article-cta { margin-top: var(--s12); padding: var(--s6); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow), var(--edge); }
.article-cta h2 { margin-top: 0; font-size: var(--text-h3); }
.article .disclaimer { margin-top: var(--s8); font-size: var(--text-meta); line-height: 1.4; color: var(--muted); }
