:root {
  --ink: #0b100d;
  --surface: #121a15;
  --surface-2: #182219;
  --surface-3: #1e2a20;
  --line: rgba(237, 238, 233, 0.09);
  --line-strong: rgba(237, 238, 233, 0.16);
  --paper: #edeee7;
  --muted: #98a39d;
  --muted-2: #758079;
  --moss: #5fa679;
  --moss-bright: #8fd1a8;
  --moss-dim: rgba(95, 166, 121, 0.14);
  --amber: #e3a34c;
  --amber-dim: rgba(227, 163, 76, 0.12);
  --display: "Space Grotesk", sans-serif;
  --body: "Inter", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
::selection { background: var(--moss); color: var(--ink); }
:focus-visible { outline: 2px solid var(--moss-bright); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 13, 0.86);
  backdrop-filter: blur(12px);
}
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; width: 122px; flex: 0 0 auto; }
.logo img:first-child { width: 22px; height: 22px; }
.logo img:last-child { width: 86px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 30px; color: var(--muted); font-size: 14px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--paper); }
.nav-links a[aria-current="page"] { position: relative; }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -23px; height: 2px; background: var(--moss-bright); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #08130d; background: var(--moss); }
.button-primary:hover { background: var(--moss-bright); }
.button-ghost { color: var(--paper); border-color: var(--line-strong); background: transparent; cursor: pointer; }
.button-ghost:hover { color: var(--moss-bright); border-color: var(--moss); }

.page-hero { padding: 86px 0 54px; border-bottom: 1px solid var(--line); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--moss-bright);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--moss-bright); box-shadow: 0 0 8px var(--moss-bright); }
h1, h2, h3 { margin-top: 0; color: var(--paper); font-family: var(--display); line-height: 1.15; letter-spacing: -0.015em; }
h1 { max-width: 780px; margin-bottom: 18px; font-size: clamp(38px, 6vw, 66px); }
.page-hero .lede { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 26px; color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--moss); }

.page-section { padding: 72px 0 96px; }
.section-heading { max-width: 680px; margin-bottom: 36px; }
.section-heading h2 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 40px); }
.section-heading p { margin: 0; color: var(--muted); }

.resource-search { position: relative; max-width: 760px; margin: 32px 0 56px; }
.resource-search label { display: block; margin-bottom: 9px; color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.resource-search input {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--paper);
  background: var(--surface);
  font-size: 16px;
}
.resource-search input::placeholder { color: var(--muted-2); }
.resource-search input:focus { border-color: var(--moss); outline: none; box-shadow: 0 0 0 3px var(--moss-dim); }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 72px; }
.card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.card:hover { border-color: rgba(95, 166, 121, 0.45); }
.card h2, .card h3 { margin-bottom: 10px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card p + p, .card p + ul, .card p + ol { margin-top: 14px; }
.card ul, .card ol { margin: 14px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.card li + li { margin-top: 8px; }
.card a, .doc a { color: var(--moss-bright); text-decoration: underline; text-decoration-color: rgba(143, 209, 168, 0.4); text-underline-offset: 3px; }
.card code, .doc code { border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; color: var(--moss-bright); background: var(--surface-2); font-family: var(--mono); font-size: 0.9em; }
.faq-empty { margin: -48px 0 64px; color: var(--muted); }

.quick-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 72px; }
.quick-link { display: flex; justify-content: space-between; gap: 16px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; }
.quick-link span { color: var(--moss-bright); }
.quick-link:hover { border-color: var(--moss); }

.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 720px); align-items: start; gap: 72px; }
.toc { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.toc strong { padding: 6px 9px 10px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.toc a { padding: 8px 9px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.toc a:hover { color: var(--paper); background: var(--surface-2); }
.doc section { padding: 0 0 42px; scroll-margin-top: 94px; }
.doc section + section { padding-top: 42px; border-top: 1px solid var(--line); }
.doc h2 { margin-bottom: 16px; font-size: 26px; }
.doc h3 { margin-bottom: 8px; font-size: 17px; }
.doc p, .doc li { color: var(--muted); font-size: 15px; }
.doc p { margin: 0 0 15px; }
.doc ul { margin: 0; padding-left: 22px; }
.doc li + li { margin-top: 9px; }
.callout { margin-top: 20px; padding: 20px; border: 1px solid rgba(227, 163, 76, 0.3); border-radius: 10px; background: var(--amber-dim); }
.callout h3 { color: var(--amber); }
.callout p:last-child { margin-bottom: 0; }

.site-footer { padding: 42px 0; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.footer-logo { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.footer-logo img:first-child { width: 18px; height: 18px; }
.footer-logo img:last-child { width: 70px; height: auto; }
.footer-meta { color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 22px; color: var(--muted); font-size: 13px; }
.footer-links a:hover { color: var(--moss-bright); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .legal-layout { grid-template-columns: 1fr; gap: 36px; }
  .toc { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc strong { grid-column: 1 / -1; }
  .quick-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 40px, 1180px); }
  .site-nav .wrap { height: 60px; }
  .button { min-height: 40px; padding: 8px 12px; font-size: 12px; }
  .page-hero { padding: 60px 0 42px; }
  .page-section { padding: 52px 0 72px; }
  .card-grid, .quick-links { grid-template-columns: 1fr; }
  .card { padding: 21px; }
  .toc { grid-template-columns: 1fr; }
  .site-footer .wrap { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: 0.001ms !important; }
}

/* Shared components for every public route. */
.container { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(11, 16, 13, 0.92); backdrop-filter: blur(12px); }
.nav { min-height: 66px; }
.nav__inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; width: 122px; flex: 0 0 auto; }
.brand img:first-child { width: 22px; height: 22px; }
.brand img:last-child { width: 86px; height: auto; }
.nav__links, .nav__right { display: flex; align-items: center; gap: 28px; }
.nav__link { color: var(--muted); font-size: 14px; }
.nav__link:hover, .nav__link.is-active { color: var(--paper); }
.nav__link.is-active { font-weight: 600; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 8px; color: var(--paper); background: transparent; font-family: var(--body); font-size: 14px; font-weight: 600; cursor: pointer; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { color: #08130d; background: var(--moss); }
.btn--primary:hover { background: var(--moss-bright); }
.btn--ghost, .btn--outline { border-color: var(--line-strong); color: var(--paper); }
.btn--ghost:hover, .btn--outline:hover { border-color: var(--moss); color: var(--moss-bright); }
.btn--sm { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: wait; transform: none; }

.page { min-height: 65vh; padding: 82px 0 96px; }
.page h1 { max-width: 900px; }
.sub { max-width: 760px; margin: 0 0 34px; color: var(--muted); font-size: clamp(16px, 2vw, 19px); }
.meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--muted-2); font-family: var(--mono); font-size: 12px; }
.hr { margin: 34px 0 48px; border: 0; border-top: 1px solid var(--line); }
.hero__actions, .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 38px; }
.plan { position: relative; padding: 30px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.plan--plus { border-color: rgba(95, 166, 121, 0.48); }
.plan h2 { margin: 10px 0; font-size: 28px; }
.plan > p { color: var(--muted); }
.tag { display: inline-flex; padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--moss-bright); background: var(--moss-dim) !important; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; }
.price { display: flex; align-items: baseline; gap: 7px; margin: 28px 0 4px; }
.amount { font-family: var(--display); font-size: clamp(36px, 5vw, 52px); font-weight: 600; line-height: 1; }
.per, .price-note { color: var(--muted); font-size: 13px; }
.cta { margin: 24px 0; }
.list { padding-top: 22px; border-top: 1px solid var(--line); }
.list .label { margin-bottom: 12px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.list ul { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 9px; padding: 8px 0; color: var(--muted); font-size: 14px; }
.check { color: var(--moss-bright); }
.toggle { display: flex; justify-content: flex-start; margin: 26px 0 0; }
.toggle__pill { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.toggle button { min-height: 36px; padding: 7px 13px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; cursor: pointer; }
.toggle button.is-on { color: var(--paper); background: var(--surface-3); }
.checkout-panel { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; margin-top: 64px; padding: 32px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.checkout-panel h2 { font-size: 30px; }
.checkout-panel p, .checkout-hint { color: var(--muted); }
.checkout-form { display: grid; gap: 14px; }
.checkout-form label, .field { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.checkout-form input, .checkout-form select, .checkout-form textarea, .field input, .field select, .field textarea, .goal-form input, .goal-form textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--paper); background: var(--surface); font: 16px var(--body); }
textarea { resize: vertical; }
.checkout-actions, .feedback-form__footer { display: flex; flex-wrap: wrap; gap: 9px; }
.checkout-status { color: var(--muted); font-size: 13px; }
.checkout-status[data-kind="error"] { color: #e89880; }
.checkout-status[data-kind="success"] { color: var(--moss-bright); }
.arch { margin-top: 72px; }
.arch-grid, .docs-grid, .output-grid, .metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.arch-card, .doc-card, .output-card, .support-card, .metric-tile { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.arch-card h3, .arch-card h4, .doc-card h2, .doc-card h3, .output-card h3, .support-card h2 { margin-bottom: 10px; font-size: 18px; }
.arch-card p, .doc-card p, .doc-card li, .output-card p, .support-card p, .metric-tile span { color: var(--muted); font-size: 14px; }

.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 720px); align-items: start; gap: 72px; }
.toc .title { padding: 6px 9px 10px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field--full, .field--hidden { grid-column: 1 / -1; }
.field--hidden { position: absolute; left: -10000px; }
.feedback-form { max-width: 780px; }
.docs-grid { margin-top: 34px; }
.docs-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-card pre, .output-card pre, .goal-preview pre { overflow: auto; padding: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--moss-bright); background: var(--surface-2); font: 12px/1.6 var(--mono); }
.doc-card code, .output-card code { color: var(--moss-bright); font-family: var(--mono); }
.doc-card a { color: var(--moss-bright); text-decoration: underline; text-underline-offset: 3px; }
.release-list { display: grid; gap: 14px; max-width: 820px; }
.release-list .support-card { background: transparent; border-width: 0 0 1px; border-radius: 0; padding: 24px 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.chip { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); cursor: pointer; }
.chip.is-on { color: var(--paper); border-color: var(--line-strong); background: var(--surface-3); }
.metrics-form { max-width: 620px; margin: 30px 0; }
.metric-tile { display: grid; gap: 6px; }
.metric-tile strong { font-family: var(--display); font-size: 22px; }
.analytics-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.analytics-breakdown[hidden] { display: none; }
.analytics-breakdown article { padding: 22px; border-top: 1px solid var(--line-strong); }
.analytics-breakdown h2 { margin-bottom: 14px; font-size: 17px; }
.analytics-breakdown ol { margin: 0; padding: 0; list-style: none; }
.analytics-breakdown li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.analytics-breakdown li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.analytics-breakdown li strong { color: var(--paper); font-family: var(--mono); font-size: 12px; }
.permission-matrix { width: 100%; border-collapse: collapse; }
.permission-matrix th, .permission-matrix td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; color: var(--muted); }

.footer { margin-top: 0; padding: 42px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; }
.footer__brand { order: 3; display: flex; align-items: center; gap: 7px; margin-left: auto; }
.footer__brand img:first-child { width: 18px; height: 18px; }
.footer__brand img:last-child { width: 70px; height: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 13px; }
.footer__links a:hover { color: var(--moss-bright); }
.footer__copy { color: var(--muted-2); font-family: var(--mono); font-size: 11px; }
.footer__row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; color: var(--muted); font-size: 13px; }
.footer__row .footer__brand { margin-left: auto; }
.notice-banner { display: flex; justify-content: center; gap: 10px; padding: 10px 20px; border-bottom: 1px solid var(--line); color: var(--paper); background: var(--surface); font-size: 13px; }

@media (max-width: 860px) {
  .nav__links { display: none; }
  .pricing-grid, .checkout-panel, .legal-grid, .docs-grid--compact, .analytics-breakdown { grid-template-columns: 1fr; }
  .checkout-panel { gap: 24px; padding-inline: 0; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 40px, 1180px); }
  .nav, .nav__inner { min-height: 60px; }
  .page { padding: 58px 0 72px; }
  .pricing-grid, .arch-grid, .docs-grid, .output-grid, .metrics-grid, .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .plan, .arch-card, .doc-card, .output-card, .support-card, .metric-tile { padding: 20px; }
  .footer__inner { align-items: flex-start; flex-direction: column; }
  .footer__brand { order: 0; margin-left: 0; }
}
