/* Public presentation only. Install after page styles and opt in on the body.
   Authenticated application pages do not inherit this. Demo owns extra overrides. */
body.vp-stone-theme {
  --vp-card-radius: 24px;
  --vp-card-padding: 30px;
  --vp-section-space: 80px;
  --vp-canvas: #f7faff;
  --vp-stone: #f0efeb;
  --vp-teal-surface: #d9ebe7;
  --vp-ink: #292d2c;
  --vp-muted: #505954;
  --vp-teal: #155c56;
  --vp-line: #cdd2ca;
  --vp-charcoal: #17191c;
  --vp-mint: #9ee9ce;
  --vp-header-ink: var(--vp-ink);
  --vp-header-copy: var(--vp-ink);
  --vp-header-muted: var(--vp-muted);
  --vp-header-bg: var(--vp-canvas);
  --vp-header-bg-strong: var(--vp-canvas);
  --vp-header-panel: var(--vp-canvas);
  --vp-header-control: var(--vp-stone);
  --vp-header-control-hover: var(--vp-teal-surface);
  --vp-header-accent: var(--vp-teal);
  --vp-header-accent-strong: var(--vp-teal);
  background: var(--vp-canvas);
  color: var(--vp-ink);
  color-scheme: light;
}

body.vp-stone-theme :where(main, footer) {
  color: var(--vp-ink);
}

body.vp-stone-theme :where(main, footer) :where(p, small, figcaption) {
  color: var(--vp-muted);
}

body.vp-stone-theme :where(main, footer) a:where(:hover, :focus-visible) {
  color: var(--vp-teal);
}

body.vp-stone-theme :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--vp-teal);
  outline-offset: 3px;
}

body.vp-stone-theme ::selection {
  background: var(--vp-mint);
  color: var(--vp-charcoal);
}

/* Legacy public templates inherit these semantic aliases on opt-in only.
   Homepage has its own presentation and is intentionally excluded. */
body.vp-stone-theme[data-public-layout="flight"] {
  --public-navy: var(--vp-canvas);
  --public-navy-deep: var(--vp-stone);
  --public-navy-soft: var(--vp-teal-surface);
  --public-navy-raised: var(--vp-stone);
  --public-cyan: var(--vp-teal);
  --public-cyan-bright: var(--vp-teal);
  --public-white: var(--vp-ink);
  --public-copy: var(--vp-ink);
  --public-muted: var(--vp-muted);
  --public-line: var(--vp-line);
  --public-line-strong: var(--vp-line);
  --public-line-active: var(--vp-teal);
  --public-wash: var(--vp-teal-surface);
  --public-green: #176547;
  --public-amber: #875300;
  --public-danger: #b33329;
  --public-display: "Hanken Grotesk", "Avenir Next", sans-serif;
  --public-body: "Hanken Grotesk", "Avenir Next", sans-serif;
  --public-mono: "JetBrains Mono", ui-monospace, monospace;
  --vp-accent: var(--vp-teal);
  --vp-accent-soft: var(--vp-teal-surface);
  --vp-bg: var(--vp-canvas);
  --vp-bg-outer: var(--vp-stone);
  --vp-bg-mid: var(--vp-teal-surface);
  --vp-card: var(--vp-stone);
  --vp-rule: var(--vp-line);
  --vp-rule-strong: var(--vp-line);
  --vp-text: var(--vp-ink);
  --vp-text-mid: var(--vp-ink);
  --vp-text-muted: var(--vp-muted);
  --vp-text-faint: var(--vp-muted);
  --accent: var(--vp-teal);
  --accent-2: var(--vp-teal);
  --accent-hover: var(--vp-teal);
  --bg: var(--vp-canvas);
  --panel: var(--vp-stone);
  --panel-strong: var(--vp-teal-surface);
  --panel-soft: var(--vp-teal-surface);
  --line: var(--vp-line);
  --line-strong: var(--vp-line);
  --text: var(--vp-ink);
  --text-mid: var(--vp-ink);
  --text-dim: var(--vp-muted);
  --muted: var(--vp-muted);
  --faint: var(--vp-muted);
  --surface: var(--vp-stone);
  --surface2: var(--vp-teal-surface);
  --border: var(--vp-line);
  --border2: var(--vp-line);
  --red: var(--public-danger);
  --red-dim: var(--vp-teal-surface);
  --red-pale: var(--vp-teal-surface);
  --amber: var(--public-amber);
  --green: var(--public-green);
  --danger: var(--public-danger);
  --success: var(--public-green);
  --warning: var(--public-amber);
  --display: var(--public-display);
  --body: var(--public-body);
  --mono: var(--public-mono);
  --vp-display: var(--public-display);
  --vp-body: var(--public-body);
  --vp-mono: var(--public-mono);
  --bg2: var(--vp-stone);
  --bg3: var(--vp-teal-surface);
  --text-muted: var(--vp-muted);
  --text-faint: var(--vp-muted);
  --docs-bg: var(--vp-canvas);
  --docs-surface: var(--vp-stone);
  --docs-surface-raised: var(--vp-teal-surface);
  --docs-text: var(--vp-ink);
  --docs-copy: var(--vp-ink);
  --docs-muted: var(--vp-muted);
  --docs-rule: var(--vp-line);
  --docs-cyan: var(--vp-teal);
  --docs-font-display: var(--public-display);
  --docs-font-body: var(--public-body);
  --docs-font-mono: var(--public-mono);
  background: var(--vp-canvas) !important;
  color: var(--vp-ink) !important;
  font-family: var(--public-body) !important;
}

html:has(> body.vp-stone-theme[data-public-layout="flight"]) {
  background: #f7faff !important;
  color-scheme: light;
}

body.vp-stone-theme[data-public-layout="flight"] * {
  font-family: inherit !important;
}

body.vp-stone-theme[data-public-layout="flight"] :where(code, kbd, samp) {
  font-family: var(--public-mono) !important;
}

body.vp-stone-theme[data-public-layout="flight"] :where(.button.secondary, .btn-secondary) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

body.vp-stone-theme[data-public-layout="flight"] :where(.btn-primary, .btn-creative, .button.primary, .button-primary, .scan-button, .bg-brand, .bg-vp-accent, .offer-button-primary, .offer-submit, .docs-button-primary) {
  background: var(--vp-teal) !important;
  color: var(--vp-canvas) !important;
}

body.vp-stone-theme[data-public-layout="flight"] :where(.btn-primary, .btn-creative, .button.primary, .button-primary, .scan-button, .offer-button-primary, .offer-submit, .docs-button-primary) * {
  color: inherit !important;
}

body.vp-stone-theme[data-public-layout="flight"] .pricing-trial {
  background: var(--vp-teal-surface);
}

body.vp-stone-theme[data-public-layout="flight"] .pricing-trial :where(h2, p, dt, dd) {
  color: var(--vp-ink) !important;
}

body.vp-stone-theme[data-public-layout="flight"] .plan-rail--gateway .plan-summary:first-child {
  background: var(--vp-stone);
}

body.vp-stone-theme[data-public-layout="flight"] .plan-rail--gateway .plan-summary:last-child {
  background: var(--vp-teal-surface);
}

body.vp-stone-theme[data-public-layout="flight"] .plan-summary[data-featured="true"] {
  --public-white: #faf9f6;
  --public-copy: #faf9f6;
  --public-muted: #d9ebe7;
  --public-cyan-bright: #9ee9ce;
  background: var(--vp-charcoal);
  color: #faf9f6 !important;
}

body.vp-stone-theme[data-public-layout="flight"] .plan-summary[data-featured="true"] :where(h3, p, strong, span, a) {
  color: inherit;
}

body.vp-stone-theme[data-public-layout="flight"] :where(pre, .code-block, .code-card, .terminal-box, .terminal, .activity-receipt) {
  --public-copy: #faf9f6;
  --public-white: #faf9f6;
  --docs-text: #faf9f6;
  --text: #faf9f6;
  --text-dim: #d9ebe7;
  --public-cyan-bright: #9ee9ce;
  --docs-cyan: #9ee9ce;
  background: var(--vp-charcoal) !important;
  color: #faf9f6 !important;
  font-family: var(--public-mono) !important;
}

body.vp-stone-theme[data-public-layout="flight"] :where(pre, .code-block, .code-card, .terminal-box, .terminal, .activity-receipt) :where(code, span) {
  color: inherit !important;
}

body.vp-stone-theme[data-public-layout="flight"] .docs-button-primary:is(:hover, :focus-visible) {
  background: var(--vp-ink) !important;
  color: var(--vp-canvas) !important;
}

/* The homepage's spatial system, applied to public content surfaces only.
   Tables, code lines, status bars and navigation retain their own density. */
body.vp-stone-theme[data-public-layout="flight"] .scan-state-card {
  background: var(--vp-stone) !important;
  border: 0 !important;
  border-radius: var(--vp-card-radius) !important;
}
body.vp-stone-theme[data-public-layout="flight"] .terminal-box {
  border-radius: var(--vp-card-radius) !important;
  border: 0 !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.terminal-chrome, .terminal-line, .code-header, .code-block-header) {
  color: #d9ebe7 !important;
}
body.vp-stone-theme[data-public-layout="flight"] .terminal-line span {
  color: inherit !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.stat-card, .code-card, .code-block, div.rounded-card:not(.overflow-x-auto), a.card-hover) {
  border: 0 !important;
}
body.vp-stone-theme[data-public-layout="flight"] .scan-input {
  border-radius: 12px !important;
  background: var(--vp-canvas) !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.status-card, .history-panel, .incident-card, .urgency-card, .prev-card, .sb-card) {
  background: var(--vp-stone) !important;
  border-radius: var(--vp-card-radius) !important;
  border: 0 !important;
  box-shadow: none !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.prev-card.highlight, .callout-solution) {
  background: var(--vp-teal-surface) !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.impact-card, .callout-danger) {
  background: #fbe9e5 !important;
  color: #71251f !important;
  border-radius: var(--vp-card-radius) !important;
  border: 0 !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.callout, .docs-note) {
  border: 0 !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(.code-card, .code-block, .terminal) {
  border-radius: var(--vp-card-radius) !important;
}
body.vp-stone-theme[data-public-layout="flight"] pre {
  border-radius: 16px !important;
}
body.vp-stone-theme.public-blog-index :is(.hero-left, .hero-right, .post-card) {
  background: var(--vp-stone) !important;
  border: 0 !important;
  border-radius: 24px !important;
  box-shadow: none !important;
  backdrop-filter: none;
  padding: var(--vp-card-padding);
}
body.vp-stone-theme.public-blog-index .hero-right {
  background: var(--vp-teal-surface) !important;
}
body.vp-stone-theme.public-blog-index :is(.briefing, .briefing-chrome, .briefing-row) {
  background: transparent !important;
  border: 0;
  color: var(--vp-ink);
}
body.vp-stone-theme.public-blog-index .briefing-row {
  border-bottom: 1px solid var(--vp-line);
  border-radius: 0;
}
body.vp-stone-theme.public-blog-index .hero-note {
  background: var(--vp-teal-surface);
  border: 0;
}
body.vp-stone-theme.public-blog-index .post-card:hover {
  background: var(--vp-teal-surface) !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(a.bg-indigo-600, button.bg-indigo-600, .btn-dark) {
  background: var(--vp-teal) !important;
  color: var(--vp-canvas) !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(a.bg-indigo-600, button.bg-indigo-600, .btn-dark):hover {
  background: #104842 !important;
  color: var(--vp-canvas) !important;
}
body.vp-stone-theme[data-public-layout="flight"] :is(section.bg-vp-surface, div.bg-dark-blue-lighter.rounded-lg, div.card-hover) {
  border: 0 !important;
  box-shadow: none !important;
}
/* Layout scaffolding is canvas, not another card. Legacy docs CSS colored
   these wrappers and made their children merge into one rectangular slab. */
body.vp-stone-theme.docs-document :is(.docs-hero, .docs-layout, .docs-main) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.vp-stone-theme.docs-document :is(.hero-copy, .hero-panel) {
  border: 0 !important;
}

body.vp-stone-theme.docs-document .hero-panel {
  background: var(--vp-teal-surface) !important;
}

/* Separate surfaces with canvas space, not the legacy nested box outlines.
   Interactive focus outlines and table separators are intentionally untouched. */
body.vp-stone-theme.docs-document :is(.docs-section, .doc-card, .docs-sidebar) {
  border: 0 !important;
}

body.vp-stone-theme[data-public-layout="flight"] :is(.hero-copy, .hero-panel, .doc-card, .provider-group, .callout, .panel, .stat-card, .endpoint-card, .article-card, .featured-card, .status-card, .history-panel, .plan-summary, .plan-detail, .pricing-trial, .docs-note) {
  border-radius: var(--vp-card-radius) !important;
  padding: var(--vp-card-padding) !important;
}

body.vp-stone-theme[data-public-layout="flight"] :is(.rounded-2xl, .rounded-3xl, .rounded-xl, .rounded-lg, .rounded-card, .table-wrap, .docs-command-table, .faq-list details) {
  border-radius: var(--vp-card-radius) !important;
}

body.vp-stone-theme[data-public-layout="flight"] :is(.card-grid, .status-grid, .plan-rail, .plan-detail-list, .docs-hero) {
  gap: 24px !important;
}

body.vp-stone-theme[data-public-layout="flight"] .offer-shell {
  width: min(1152px, calc(100% - 48px));
  padding-top: 64px;
}

body.vp-stone-theme[data-public-layout="flight"] .offer-hero {
  gap: 24px;
  border: 0;
  background: transparent;
}

body.vp-stone-theme[data-public-layout="flight"] .offer-hero__copy {
  padding: var(--vp-card-padding);
  border-radius: var(--vp-card-radius);
  background: var(--vp-stone);
}

body.vp-stone-theme[data-public-layout="flight"] :is(.plan-rail, .plan-summary, .pricing-trial) {
  border: 0;
}

body.vp-stone-theme[data-public-layout="flight"] .plan-summary[data-featured="true"]::before {
  display: none;
}

body.vp-stone-theme[data-public-layout="flight"] .plan-rail {
  margin-top: 30px;
}

body.vp-stone-theme[data-public-layout="flight"] .offer-section {
  padding-top: var(--vp-section-space);
}

body.vp-stone-theme[data-public-layout="flight"] .docs-section {
  padding: 0 0 52px !important;
  margin-bottom: 52px !important;
  background: transparent !important;
  border-radius: 0 !important;
}

body.vp-stone-theme[data-public-layout="flight"] :is(.btn-primary, .btn-secondary, .btn-creative, .button.primary, .button.secondary, .button-primary, .scan-button, .offer-button-primary, .offer-submit, .docs-button) {
  border-radius: 999px !important;
  padding: 12px 22px !important;
}

@media (max-width: 800px) {
  body.vp-stone-theme {
    --vp-card-padding: 24px;
    --vp-section-space: 52px;
  }
  body.vp-stone-theme[data-public-layout="flight"] .offer-shell {
    width: calc(100% - 32px);
    padding-top: 40px;
  }
}
