/* Brand tokens, generated from site.config.json. */
:root {
  --paper: #ffffff;
  --surface: #f3f5f8;
  --ink: #14181f;
  --muted: #535c68;
  --border: #d5dbe3;
  --primary: #2147c6;
  --on-primary: #ffffff;
  --accent: #0b6e5c;
  --focus: #b45309;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1116;
    --surface: #161b22;
    --ink: #e7eaee;
    --muted: #a3adb9;
    --border: #2b333d;
    --primary: #8eaaff;
    --on-primary: #0b1220;
    --accent: #5fd3b6;
    --focus: #ffb547;
  }
}
.logo-bg { fill: var(--primary); }
.logo-fg { fill: var(--on-primary); font: 700 34px system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* The public site. Colours come only from the brand tokens above; system fonts, no images,
   no web fonts. Mobile first: 16px gutters at phone width, no horizontal page scroll. */

:root {
  --primary-soft: color-mix(in srgb, var(--primary) 9%, var(--paper));
  --accent-soft: color-mix(in srgb, var(--accent) 10%, var(--paper));
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  --radius: 12px;
  --gutter: 16px;
  --max: 72rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 100%;
  line-height: 1.6;
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
a { color: var(--primary); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.9em; }
:not(pre) > code { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 0.05em 0.35em; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--paper); color: var(--primary); padding: 12px 16px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid var(--border); backdrop-filter: saturate(1.4) blur(8px); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.main-nav { order: 3; flex-basis: 100%; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 0 -10px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; border-radius: 8px; white-space: nowrap; }
.main-nav a:hover { background: var(--surface); }
.main-nav a[aria-current="page"], .main-nav a.in-section { color: var(--primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--primary); border-radius: 0; }
.header-cta { margin-left: auto; }
@media (min-width: 60rem) {
  .main-nav { order: 0; flex-basis: auto; }
  .main-nav ul { margin: 0; flex-wrap: nowrap; }
  .header-inner { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
}

/* ---- buttons ---- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 10px; border: 2px solid var(--primary); font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.button-primary { background: var(--primary); color: var(--on-primary); }
.button-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--ink)); border-color: color-mix(in srgb, var(--primary) 88%, var(--ink)); }
.button-secondary { background: transparent; color: var(--primary); }
.button-secondary:hover { background: var(--primary-soft); }
.button:disabled { opacity: 0.6; cursor: not-allowed; }
.header-cta { padding: 8px 14px; }

/* ---- breadcrumbs ---- */
.breadcrumbs { padding-top: 12px; font-size: 0.9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); display: inline-block; padding: 6px 0; }
.breadcrumbs a[aria-current="page"] { color: var(--ink); text-decoration: none; }

/* ---- hero ---- */
.hero { padding: clamp(2.5rem, 8vw, 5.5rem) 0 clamp(2rem, 6vw, 4rem); background:
  radial-gradient(60rem 24rem at 85% -10%, var(--primary-soft), transparent 70%),
  radial-gradient(40rem 20rem at 0% 110%, var(--accent-soft), transparent 70%); }
.hero-compact { padding: clamp(1.5rem, 5vw, 3rem) 0 clamp(1rem, 3vw, 2rem); }
.hero-compact h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.75rem; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 46rem; }
.hero h1 { max-width: 22ch; }
.hero-compact h1 { max-width: none; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.hero-visual { min-width: 0; }
.mock { background: var(--paper); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 2px 4px rgb(0 0 0 / 6%), 0 18px 48px rgb(0 0 0 / 10%); overflow: hidden; }
.mock-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.mock-pill { font-size: 0.8rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 2px 10px; border-radius: 999px; }
.mock-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.mock-icon { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.mock-text { display: grid; min-width: 0; }
.mock-text strong { font-size: 0.95rem; }
.mock-text span { color: var(--muted); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-meta { color: var(--muted); font: 600 0.8rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mock-foot { padding: 12px 18px; background: var(--surface); color: var(--muted); font-size: 0.9rem; }
.hero-compact + .section, .hero-compact + .section-prose { padding-top: clamp(0.5rem, 2vw, 1.5rem); }
.hero-note { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }

/* ---- sections ---- */
.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.section + .section:not(.tone-surface):not(.cta-band) { padding-top: 0; }
.tone-surface { background: var(--surface); border-block: 1px solid var(--border); }
.intro { color: var(--muted); font-size: 1.1rem; max-width: 46rem; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); margin-top: 1.5rem; }
.cards-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.card { position: relative; background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tone-surface .card { background: var(--paper); }
.card h3 { margin-top: 12px; }
.card p { margin: 0; color: var(--muted); }
.card-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.card-link h3 a { color: var(--ink); text-decoration: none; }
.card-link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card-link:hover { border-color: var(--primary); }
.card-link:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-link h3 a:focus-visible { outline: none; }
.icon { width: 24px; height: 24px; flex: none; }
.icon-inline { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); counter-reset: step; margin-top: 1.5rem; }
.steps li { counter-increment: step; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--paper); }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; margin-bottom: 12px; }
.steps p { color: var(--muted); margin: 0; }

.split { display: grid; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; } }
.checklist { display: grid; gap: 12px; align-content: start; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.icon-check { color: var(--accent); margin-top: 2px; }

.faq { display: grid; gap: 10px; margin-top: 1.5rem; max-width: 52rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); }
.faq-item summary { cursor: pointer; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--primary); flex: none; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item summary h3 { margin: 0; font-size: 1.05rem; }
.faq-answer { padding: 0 18px 4px; color: var(--muted); }

.cta-band { background: var(--primary); color: var(--on-primary); }
.cta-band h2 { color: var(--on-primary); }
.cta-band p { color: var(--on-primary); opacity: 0.92; margin: 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.cta-band .actions { margin-top: 0; }
.cta-band .button-primary { background: var(--on-primary); color: var(--primary); border-color: var(--on-primary); }
.cta-band .button-secondary { color: var(--on-primary); border-color: var(--on-primary); }
.cta-band .button-secondary:hover { background: color-mix(in srgb, var(--on-primary) 12%, transparent); }
.cta-band a:focus-visible { outline-color: var(--on-primary); }

.prose { max-width: 48rem; }
.prose-sub { margin-top: 1.75rem; }
.prose-list { padding-left: 1.25rem; }
.prose-list li { margin-bottom: 0.5em; }
.section-prose + .section-prose { padding-top: 0; }

.notice { border-left: 4px solid var(--focus); background: var(--surface); padding: 12px 16px; border-radius: 8px; }

/* ---- channels ---- */
.cards-channels { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.channel-facts { margin: 12px 0 0; display: grid; gap: 4px; }
.channel-facts dt { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); margin-top: 8px; }
.channel-facts dd { margin: 0; color: var(--muted); }

/* ---- pricing ---- */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); margin: 1.5rem 0 2.5rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 4px; padding: 24px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.plan-featured { border: 2px solid var(--primary); }
.plan-badge { align-self: flex-start; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; margin-bottom: 6px; }
.plan-summary { color: var(--muted); }
.price { margin: 4px 0 12px; }
.price-amount { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.02em; }
.price-text { font-size: 1.5rem; }
.price-unit { color: var(--muted); }
.plan-base { font-weight: 600; margin-bottom: 8px; }
.plan .checklist { margin-bottom: 20px; flex: 1; gap: 8px; }
.plan .button { width: 100%; }
.contact-split .checklist { margin-bottom: 1.25rem; }
.trial-box { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--border); border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table thead th { background: var(--surface); font-size: 0.85rem; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody th { font-weight: 600; }
.fields .field-name { white-space: nowrap; }
.fields .depth-1 { padding-left: 28px; }
.fields .depth-2 { padding-left: 44px; }
.fields .depth-3 { padding-left: 60px; }
.fields .depth-4 { padding-left: 76px; }
.note { display: inline-block; color: var(--muted); font-size: 0.88rem; }
.note + .note::before { content: "\00b7 "; }

/* ---- form ---- */
.lead-form { background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(16px, 4vw, 28px); box-shadow: var(--shadow); }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, var(--paper)); border-radius: 8px;
}
.field textarea { resize: vertical; }
.field [aria-invalid="true"] { border-color: var(--focus); border-width: 2px; }
.help { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.field-error { color: var(--ink); font-weight: 600; font-size: 0.92rem; margin: 6px 0 0; padding-left: 10px; border-left: 4px solid var(--focus); }
.req { color: var(--muted); margin-left: 2px; }
.check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; min-height: 44px; padding-top: 8px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.check-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.field-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-note { color: var(--muted); font-size: 0.9rem; }
.form-errors { border: 2px solid var(--focus); border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; }
.form-errors p { font-weight: 700; margin-bottom: 6px; }
.form-errors ul { margin: 0; padding-left: 1.2rem; }
.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.6em; }

/* ---- developer docs ---- */
.docs-layout { display: grid; gap: 0 40px; padding-top: 0; }
.docs-content { min-width: 0; }
.docs-content .wrap { padding: 0; max-width: none; }
.docs-content > .section:first-of-type, .docs-content .hero { background: none; }
.docs-jump { margin: 16px 0 0; }
.docs-nav { border-top: 1px solid var(--border); padding: 24px 0 40px; }
.docs-nav-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 16px 0 6px; }
.docs-nav a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.docs-nav a:hover { background: var(--surface); }
.docs-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
@media (min-width: 60rem) {
  .docs-layout { grid-template-columns: 15rem minmax(0, 1fr); }
  .docs-nav { grid-column: 1; grid-row: 1; border-top: 0; position: sticky; top: 72px; align-self: start; max-height: calc(100vh - 88px); overflow-y: auto; padding-top: 24px; }
  .docs-content { grid-column: 2; grid-row: 1; }
  .docs-jump { display: none; }
}
.toc { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 2rem; background: var(--surface); }
.toc-title { font-size: 1rem; margin-bottom: 8px; }
.toc a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; overflow-wrap: anywhere; }
.op { border-top: 1px solid var(--border); padding-top: 2rem; margin-top: 2rem; }
.op h2 { font-size: 1.3rem; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.op-path { font-size: 1rem; overflow-wrap: anywhere; }
.op-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 1rem; }
.op-meta dt { font-weight: 600; }
.op-meta dd { margin: 0; }
.method { display: inline-block; min-width: 4.2em; text-align: center; font: 700 0.78rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 8px; border-radius: 6px; border: 1px solid currentColor; color: var(--ink); background: var(--surface); }
.method-get { color: var(--accent); }
.method-post, .method-put, .method-patch { color: var(--primary); }
.code { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; overflow-x: auto; line-height: 1.5; font-size: 0.88rem; }
.code code { font-size: inherit; }

/* ---- footer ---- */
.site-footer { margin-top: 0; border-top: 1px solid var(--border); background: var(--surface); padding: 40px 0 24px; font-size: 0.95rem; }
.footer-grid { display: grid; gap: 28px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 60rem) { .footer-grid { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); } .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); }
.footer-heading { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.footer-col a { display: inline-block; padding: 6px 0; color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--primary); text-decoration: underline; }
.footer-meta { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .site-header, .site-footer, .docs-nav, .skip-link, .actions { display: none; }
}
