/* Shared presentation layer for the public site and pilot console.
   Loaded after the legacy page styles while their layouts are migrated. */
:root {
  color-scheme: light;
  --paper: #f7f6f0;
  --surface: #ffffff;
  --white: #ffffff;
  --soft: #eef1e8;
  --ink: #17332c;
  --muted: #52655d;
  --green: #17634c;
  --green-dark: #102f27;
  --accent: #d9edaa;
  --line: #d7dfd4;
  --focus: #a85b16;
  --allow-bg: #e7f4e8;
  --allow-text: #205f3b;
  --review-bg: #fff2d9;
  --review-text: #765000;
  --deny-bg: #fff0e9;
  --deny-text: #903e28;
  --font-ui: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

html { scroll-padding-top: 28px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body, button, input, select, textarea { font-family: var(--font-ui); }
body :target { scroll-margin-top: 28px; }
::selection { background: var(--accent); color: var(--green-dark); }

/* Editorial headlines give the marketing site a recognizable voice while
   controls, labels and technical content remain compact and utilitarian. */
:is(.home-page, .demo-page, .docs-page, .legal-page, .console-page) h1 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
}
:is(.home-page, .demo-page, .docs-page, .legal-page, .console-page) h2 {
  line-height: 1.18;
  letter-spacing: -.035em;
  text-wrap: balance;
}
:is(.home-page, .demo-page, .docs-page, .legal-page, .console-page) :is(.eyebrow, .step, .doc-kicker) {
  color: var(--green);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}
:is(.home-page, .demo-page, .docs-page, .legal-page) :is(.intro, .lead) {
  color: #42564d;
  line-height: 1.65;
}

/* Every route uses the same site navigation. A wrapping layout keeps all
   links available at narrow widths instead of hiding them by position. */
.site-header {
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-header-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 44px);
  width: min(100%, 1240px);
  min-height: 82px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3vw, 36px);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  color: var(--green-dark);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
.site-brand:hover { color: var(--green); text-decoration: none; }
.site-brand-logo {
  display: block;
  flex: none;
  width: clamp(160px, 18vw, 220px);
  height: auto;
}
.site-header .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px clamp(6px, 1.4vw, 18px);
  max-width: none;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.site-header .site-nav-link,
.site-header .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 8px;
  border-bottom: 2px solid transparent;
  color: #45594f;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}
.site-header .site-nav-link:hover,
.site-header .site-nav a:hover { color: var(--green); border-bottom-color: #b5d7bb; }
.site-header .site-nav-link[aria-current="page"],
.site-header .site-nav a[aria-current="page"] {
  color: var(--green-dark);
  border-bottom-color: var(--green);
  font-weight: 800;
}
.site-header .site-nav a.site-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--green-dark);
  border-radius: var(--radius-sm);
  background: var(--green-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.site-header .site-nav a.site-header-cta:hover {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  text-decoration: none;
}
.site-mobile-menu { display: none; }

/* Repeatable controls and surfaces. Existing page classes remain supported
   while Astro components take over the markup. */
:is(.button, .site-button, .btn-primary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 19px;
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
:is(.button, .site-button, .btn-primary):hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
  text-decoration: none;
}
:is(.btn-secondary, .site-button-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid #bfcbbf;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}
:is(.btn-secondary, .site-button-secondary):hover { background: var(--soft); text-decoration: none; }
:is(.secondary, .text-link) { color: var(--green); font-weight: 750; text-underline-offset: 4px; }
:is(.secondary, .text-link):hover { text-decoration: underline; }
:is(.workspace-card, .card, .docs-cards article, .scope-grid > div, .proof-grid p, .demo-panel, .legal, .docs-search-wrap) {
  border-color: var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 8px 24px #102f2707;
}
:is(.scope-note, .docs-callout, .demo-takeaway) { border-left-color: var(--green); }
input, select, textarea { accent-color: var(--green); }
:is(input, select, textarea):focus { border-color: var(--green); }
button:disabled { cursor: not-allowed; }

/* A real product artifact is the visual focal point, not generic decoration. */
.home-page .receipt {
  transform: none;
  border: 1px solid #315449;
  border-radius: var(--radius-lg);
  background: var(--green-dark);
  color: #f5f7ef;
  box-shadow: 0 24px 48px #102f2721;
}
.home-page .receipt :is(h2, dd) { color: #f5f7ef; }
.home-page .receipt h2 span { color: #b9cfc3; }
.home-page .receipt :is(dt, .fine, .receipt-head) { color: #c3d3c8; }
.home-page .receipt .pill { background: #294b3f; color: #e1edd9; }
.home-page .receipt .deny { background: #66352f; color: #ffdfd1; }
.home-page .receipt .fine { border-top: 1px solid #ffffff24; padding-top: 15px; }

/* The docs, demo and console retain their distinct information density but
   share a rhythm, radius and readable content width. */
.home-page .hero { gap: clamp(30px, 5vw, 70px); }
.home-page .grid { gap: clamp(20px, 3vw, 36px); }
.home-page .grid article { border-top-width: 1px; }
.home-page .value-band { border-radius: var(--radius-md); }
.home-page .pilot { border-radius: var(--radius-lg); }
.home-page .pilot .button {
  gap: 10px;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--green-dark);
}
.home-page .pilot .button:hover {
  border-color: #e2f7c5;
  background: #e2f7c5;
  color: var(--green-dark);
}
.home-page .pilot .price { white-space: nowrap; }
.docs-page .docs-sidebar a { min-height: 32px; text-underline-offset: 3px; }
.docs-page .docs-sidebar a.active { border-right: 2px solid var(--green); }
.docs-page .code-block,
.console-page .policy-panel { border-radius: var(--radius-sm); }
.console-page .access-panel { border-radius: var(--radius-lg); }
.console-page .service-state { border-radius: 999px; }
.console-page :is(input, select) { background-color: var(--surface); }
.legal-page .legal { box-shadow: none; }

/* A short, progressive walkthrough replaces the former long demo article. */
.demo-page [hidden] { display: none !important; }
.demo-page .demo-hero { align-items: center; gap: clamp(28px, 5vw, 64px); padding: 56px 0 36px; }
.demo-page .demo-hero h1 { max-width: 720px; }
.demo-page .demo-hero .intro { max-width: 650px; }
.demo-illustrative { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.demo-illustrative strong { color: var(--green-dark); }
.demo-preview {
  padding: 25px;
  border: 1px solid #315449;
  border-radius: var(--radius-lg);
  background: var(--green-dark);
  box-shadow: 0 18px 35px #102f271b;
  color: #f5f7ef;
}
.demo-preview-label { display: block; margin-bottom: 8px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.demo-preview > strong { font-size: 18px; }
.demo-preview ol { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.demo-preview li { display: flex; gap: 13px; align-items: baseline; font-size: 13px; }
.demo-preview li span { color: var(--accent); font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.demo-recording { padding: 30px 0 52px; border-top: 1px solid var(--line); }
.demo-recording-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 390px); align-items: end; gap: 20px 55px; margin-bottom: 22px; }
.demo-recording-copy h2 { max-width: 650px; margin: 7px 0 0; font-family: var(--font-display); font-size: clamp(30px, 3.2vw, 46px); }
.demo-recording-copy > p { margin: 0; color: var(--muted); font-size: 14px; }
.demo-video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid #315449; border-radius: var(--radius-md); background: var(--green-dark); box-shadow: 0 20px 48px #102f271a; }
.demo-recording-note { max-width: 850px; margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.demo-transcript { max-width: 850px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.demo-transcript summary { width: fit-content; padding: 7px 0; color: var(--green); font-weight: 750; cursor: pointer; }
.demo-transcript summary:hover { text-decoration: underline; }
.demo-transcript div { padding: 10px 20px; border-left: 3px solid var(--line); }
.demo-transcript p { margin: 0 0 10px; }
.demo-transcript strong { color: var(--ink); }
.demo-tour { scroll-margin-top: 8px; }
.demo-step-status { margin: 0 0 10px; color: var(--green-dark); font-size: 12px; font-weight: 750; letter-spacing: .03em; }
.demo-page .demo-progress { position: static; }
.demo-progress a[aria-current="step"] { background: #27634c; box-shadow: inset 0 -4px var(--accent); }
.demo-page .demo-step { min-height: 430px; padding: 42px 0 24px; gap: 26px clamp(26px, 5vw, 65px); align-items: center; }
.demo-page .demo-step .demo-copy > p:not(.eyebrow) { max-width: 520px; }
.demo-page .demo-step h2 { max-width: 580px; }
.demo-page .demo-panel dl a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.demo-step-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.demo-step-actions .demo-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--green); font-size: 13px; font-weight: 750; }
.demo-step-actions .demo-next { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-left: auto; padding: 9px 17px; border: 1px solid var(--green-dark); border-radius: var(--radius-sm); background: var(--green-dark); color: #fff; font-size: 13px; font-weight: 750; text-align: center; }
.demo-step-actions .demo-next:hover { background: var(--green); text-decoration: none; }
.demo-pass-status { padding: 3px 8px; border-radius: 4px; background: var(--allow-bg); color: var(--allow-text); }
.demo-resolution-list { display: grid; gap: 0; margin: 0; padding: 8px 20px; list-style: none; }
.demo-resolution-list li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.demo-resolution-list li:last-child { border-bottom: 0; }
.demo-resolution-marker { display: grid; place-items: center; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.demo-resolution-marker.deny-marker { background: var(--deny-bg); color: var(--deny-text); }
.demo-resolution-marker.allow-marker { background: var(--allow-bg); color: var(--allow-text); }
.demo-resolution-list li div { display: flex; flex-direction: column; gap: 2px; }
.demo-resolution-list li strong { color: var(--ink); font-size: 13px; }
.demo-resolution-list li div span { color: var(--muted); font-size: 12px; }
.demo-page .demo-close { padding: 55px 0 70px; }

/* Shared footer and universal keyboard affordances. */
.site-footer {
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: #eef1e9;
}
.docs-page .site-footer { max-width: none; }
.legal-page .site-footer { display: block; }
.site-footer-inner {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 40px clamp(18px, 3vw, 36px) 24px;
}
.legal-page .site-footer .site-footer-inner { display: block; }
.site-footer .site-footer-brand { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.site-footer-brand p { max-width: 440px; margin: 0; font-size: 13px; }
.site-footer .site-footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(200px, 1.25fr);
  gap: 24px;
  max-width: none;
  min-height: 0;
  margin: 28px 0;
  padding: 0;
  border: 0;
}
.site-footer .site-footer-links > div {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.site-footer-links > div > span:first-child {
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-footer-links > div > span:not(:first-child) { color: var(--muted); font-size: 13px; }
.site-footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  color: #395248;
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
  text-underline-offset: 4px;
}
.site-footer-links a::after {
  content: "↗";
  flex: none;
  color: var(--green);
  font-size: 14px;
  opacity: .45;
  transition: transform .18s ease, opacity .18s ease;
}
.site-footer-links a:hover,
.site-footer-links a:focus-visible { color: var(--green-dark); text-decoration: underline; }
.site-footer-links a:hover::after,
.site-footer-links a:focus-visible::after { opacity: 1; transform: translate(2px, -2px); }
:is(.home-page, .demo-page, .docs-page, .legal-page, .console-page) .site-footer .site-footer-links > div > a {
  display: inline-flex;
}
.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-top: 18px;
  padding-inline: clamp(18px, 3vw, 36px);
  padding-bottom: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.site-footer-bottom p { margin: 0; font-size: inherit; }
.legal-page .site-footer .site-footer-bottom { gap: 8px 24px; font-size: 12px; }
.skip-link,
.site-skip-link {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 100;
  padding: 10px 15px;
  border: 2px solid var(--green-dark);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--green-dark);
  font-weight: 750;
  text-decoration: none;
}
.skip-link:focus,
.site-skip-link:focus { top: 12px; }
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 960px) {
  .site-header .site-nav { gap: 0 6px; }
  .site-header .site-nav-link,
  .site-header .site-nav a { padding-inline: 5px; font-size: 12px; }
}
@media (max-width: 760px) {
  .demo-page .demo-hero { padding: 28px 0 18px; gap: 22px; }
  .demo-preview { display: none; }
  .demo-recording { padding: 22px 0 38px; }
  .demo-recording-copy { display: block; }
  .demo-recording-copy > p { margin-top: 12px; }
  .demo-video { border-radius: var(--radius-sm); }
  .demo-page .demo-step { min-height: 0; padding: 32px 0 20px; gap: 20px; }
  .demo-page .demo-progress a { min-height: 48px; font-size: 12px; }
  .demo-step-actions { padding-top: 18px; }
  .site-header-inner { min-height: 68px; padding-inline: 18px; }
  .site-brand-logo { width: 190px; }
  .site-header .site-nav { display: none; }
  .site-mobile-menu { display: block; justify-self: end; }
  .site-mobile-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 86px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 750;
    list-style: none;
    cursor: pointer;
  }
  .site-mobile-menu summary::-webkit-details-marker { display: none; }
  .site-mobile-menu[open] summary { border-color: var(--green); background: var(--soft); }
  .site-mobile-menu[open] summary span { transform: rotate(45deg); }
  .site-mobile-menu nav {
    position: absolute;
    top: calc(100% - 1px);
    right: 18px;
    left: 18px;
    z-index: 20;
    display: flex;
    align-items: stretch;
    flex-direction: column;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    background: var(--surface);
    box-shadow: 0 18px 32px #102f2724;
  }
  .site-mobile-menu nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--green-dark);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
  }
  .site-mobile-menu nav a:hover,
  .site-mobile-menu nav a[aria-current="page"] { background: var(--soft); }
  .site-mobile-menu nav a:last-child { gap: 8px; margin-top: 5px; background: var(--green-dark); color: #fff; }
  .site-mobile-menu nav a:last-child:hover { background: var(--green); }
  .site-footer .site-footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer-inner { padding: 32px 18px 22px; }
  .site-footer .site-footer-brand { align-items: flex-start; flex-direction: column; gap: 9px; }
  .site-footer .site-footer-links { margin: 20px 0; }
  .home-page .receipt { box-shadow: none; }
}
@media (max-width: 380px) {
  .site-brand-logo { width: 170px; }
  .site-footer .site-footer-links { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
