:root {
  --background-primary: #111317;
  --background-secondary: #18212b;
  --surface-primary: #f7f9fb;
  --surface-secondary: #e9eff6;
  --text-primary: #f7f9fb;
  --text-secondary: #c7d0dc;
  --text-inverse: #111317;
  --text-muted-inverse: #4b5563;
  --border-subtle: rgba(214, 222, 232, .18);
  --border-strong: rgba(24, 200, 255, .34);
  --accent-primary: #18c8ff;
  --accent-hover: #7ce4ff;
  --accent-offensive: #ff6b2c;
  --status-critical: #9f1239;
  --status-high: #ff6b2c;
  --status-medium: #18c8ff;
  --status-low: #047857;
  --shadow: 0 18px 45px rgba(0, 0, 0, .26);
  --radius-0: 0;
  --radius-4: 4px;
  --radius-8: 8px;
  --radius-12: 12px;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-96: 96px;
  --space-128: 128px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(24, 200, 255, .12), transparent 32rem),
    linear-gradient(180deg, #111317 0%, #151a21 48%, #101418 100%);
  color: var(--text-primary);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid rgba(24, 200, 255, .42); outline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 19, 23, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-color: var(--border-subtle); }
.nav {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 var(--space-24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(24, 200, 255, .32);
  color: transparent;
  display: inline-block;
  font-size: 0;
  background: #090c10 url("assured-ai-mark.png") center / 118% auto no-repeat;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(24, 200, 255, .16);
  overflow: hidden;
  flex: 0 0 auto;
}
.nav-links { display: flex; align-items: center; gap: 26px; color: var(--text-secondary); font-size: 14px; }
.nav-links a:hover { color: var(--text-primary); }
.nav-toggle { display: none; border: 1px solid var(--border-subtle); background: rgba(247, 249, 251, .08); width: 42px; height: 42px; }
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 4px auto; background: var(--text-primary); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--text-primary);
  border-radius: var(--radius-4);
  font-weight: 680;
  font-size: 14px;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button.primary { background: var(--accent-offensive); border-color: var(--accent-offensive); color: #111317; }
.button.secondary { border-color: var(--border-strong); background: rgba(24, 200, 255, .08); color: var(--text-primary); }
.button.ghost { border-color: transparent; color: var(--accent-primary); padding-left: 0; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.button.primary:hover { background: #ff8554; }
.button.ghost:hover { box-shadow: none; color: var(--accent-hover); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 var(--space-24); }
.section { padding: var(--space-96) 0; }
.section.tight { padding: var(--space-64) 0; }
.band { background: var(--background-secondary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.eyebrow { color: var(--accent-primary); font-size: 13px; font-weight: 760; margin: 0 0 var(--space-12); }
h1, h2, h3 { letter-spacing: 0; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(42px, 7vw, 76px); max-width: 930px; }
h2 { font-size: clamp(30px, 4vw, 48px); max-width: 820px; }
h3 { font-size: 21px; }
p { margin: 0; color: var(--text-secondary); }
.lead { font-size: clamp(18px, 2vw, 22px); max-width: 780px; margin-top: var(--space-24); color: var(--text-secondary); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: var(--space-32); margin-bottom: var(--space-48); }
.section-head p { max-width: 520px; }

.hero { padding: var(--space-96) 0 var(--space-64); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--space-64); align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); margin-top: var(--space-32); }
.cred-line { margin-top: var(--space-16); font-size: 14px; color: var(--text-secondary); }
.hero-visual {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-8);
  background: var(--surface-primary);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-visual img { aspect-ratio: 16 / 11; object-fit: cover; }

.grid { display: grid; gap: var(--space-24); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card {
  background: var(--surface-primary);
  border: 1px solid rgba(214, 222, 232, .52);
  border-radius: var(--radius-8);
  padding: var(--space-24);
  min-height: 100%;
  color: var(--text-inverse);
}
.card:hover { box-shadow: 0 14px 32px rgba(0, 0, 0, .2); }
.card h3 { margin-bottom: var(--space-12); }
.card ul, .check-list { margin: var(--space-16) 0 0; padding: 0; list-style: none; }
.card li, .check-list li { color: var(--text-secondary); margin: 8px 0; padding-left: 18px; position: relative; }
.card p, .card li { color: var(--text-muted-inverse); }
.card li::before, .check-list li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; background: var(--accent-primary); }
.meta { color: var(--text-secondary); font-size: 14px; }
.card .meta { color: var(--text-muted-inverse); }
.card .button.secondary { color: var(--text-inverse); background: #fff; border-color: #ccd6e1; }
.card .button.ghost { color: #0b7fb0; }
.card .text-link { color: #086f9c; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card .text-link:hover { color: #064f70; }
.featured-resource { border-top: 3px solid var(--accent-offensive); }
.featured-resource > p:not(.meta):not(.lead) { margin-top: var(--space-16); }
.process .card:nth-child(3) { border-color: rgba(255, 107, 44, .7); box-shadow: inset 0 3px 0 var(--accent-offensive); }
.process .card:nth-child(3)::before { color: var(--accent-offensive); }

.founder-profile { align-items: center; }
.founder-profile > div:first-child p:not(.eyebrow):not(.lead) { margin-top: var(--space-16); max-width: 720px; }
.founder-card { display: grid; gap: var(--space-16); }
.founder-card h3 { margin-bottom: 0; }
.founder-headshot {
  width: 160px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-8);
  border: 3px solid var(--accent-primary);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.process { counter-reset: step; }
.process .card { position: relative; padding-top: 56px; }
.process .card::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 22px;
  left: 24px;
  color: var(--accent-primary);
  font-weight: 760;
  font-size: 13px;
}

.diagram {
  background: rgba(247, 249, 251, .96);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-8);
  padding: var(--space-24);
  display: grid;
  gap: var(--space-16);
}
.diagram-row { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: var(--space-12); }
.node { border: 1px solid #cbd5e1; padding: 14px; border-radius: var(--radius-4); background: #fcfdff; color: var(--text-muted-inverse); font-size: 14px; }
.node strong { display: block; color: var(--text-inverse); margin-bottom: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-8); background: var(--surface-primary); }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { padding: 18px; text-align: left; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
th { font-size: 13px; color: var(--text-inverse); background: var(--surface-secondary); }
td { color: var(--text-muted-inverse); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16); }
label { display: grid; gap: 6px; font-weight: 650; font-size: 14px; color: var(--text-primary); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-4);
  padding: 12px 14px;
  font: inherit;
  color: var(--text-primary);
  background: var(--surface-primary);
}
textarea { min-height: 140px; resize: vertical; }
.full { grid-column: 1 / -1; }
.notice { padding: var(--space-16); background: var(--surface-primary); border: 1px solid rgba(214, 222, 232, .52); border-left: 3px solid var(--accent-offensive); border-radius: var(--radius-4); color: var(--text-muted-inverse); }
.success { display: none; margin-top: var(--space-16); color: var(--status-low); font-weight: 700; }

.footer { padding: var(--space-64) 0; border-top: 1px solid var(--border-subtle); background: #0f1217; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(3, .7fr); gap: var(--space-32); }
.footer a { display: block; color: var(--text-secondary); margin-top: 8px; font-size: 14px; }
.footer a:hover { color: var(--text-primary); }

.article-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--space-48); align-items: start; }
.toc { position: sticky; top: 100px; border: 1px solid rgba(214, 222, 232, .52); background: var(--surface-primary); color: var(--text-inverse); padding: var(--space-16); border-radius: var(--radius-8); }
.toc a { color: var(--text-muted-inverse); }
.prose { max-width: 780px; }
.prose h2 { font-size: 30px; margin-top: var(--space-48); }
.prose p, .prose li { color: var(--text-secondary); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: #111317;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-24);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .hero-grid, .grid.two, .grid.three, .grid.four, .grid.five, .footer-grid, .article-layout { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: var(--space-16); }
  .diagram-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container, .nav { padding-left: var(--space-16); padding-right: var(--space-16); }
  .hero, .section { padding: var(--space-64) 0; }
  .form-grid { grid-template-columns: 1fr; }
  .cta-row .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.spaced { margin-top: var(--space-32); }
.nav-links a[aria-current="page"] { color: var(--text-primary); }

.lifecycle, .flow { list-style: none; margin: var(--space-32) 0 0; padding: 0; display: grid; gap: var(--space-12); counter-reset: stage; }
.lifecycle { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.flow { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-top: 0; }
.flow.vertical { grid-template-columns: 1fr; max-width: 640px; }
.lifecycle li, .flow li {
  position: relative;
  counter-increment: stage;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-4);
  background: rgba(24, 200, 255, .06);
  padding: 14px;
  display: grid;
  gap: 4px;
  font-size: 14px;
}
.lifecycle li strong, .flow li strong { color: var(--text-primary); font-size: 15px; }
.lifecycle li strong::before, .flow li strong::before { content: counter(stage) ". "; color: var(--accent-primary); }
.lifecycle li span, .flow li span { color: var(--text-secondary); }
.flow li:not(:last-child)::after { content: "\2192"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: var(--accent-primary); font-weight: 700; z-index: 1; }
.flow.vertical li:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); }
.flow.vertical li { margin-bottom: 8px; }

.scope-grid { margin-top: var(--space-24); }
.table-wrap table caption { text-align: left; }
tbody th[scope="row"] { font-size: 14px; font-weight: 680; }
.example { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.example dt { font-weight: 700; color: var(--text-inverse); }
.example dd { margin: 0; color: var(--text-muted-inverse); }
.status { display: inline-block; padding: 2px 10px; border-radius: var(--radius-4); font-size: 13px; font-weight: 700; border: 1px solid currentColor; line-height: 1.5; }
.status.implemented { color: #065f46; background: #d1fae5; }
.status.fixture { color: #1e40af; background: #dbeafe; }
.status.not-offered { color: #374151; background: #e5e7eb; }

@media (max-width: 900px) {
  .lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: 1fr; }
  .flow li:not(:last-child)::after { content: "\2193"; right: auto; left: 50%; top: auto; bottom: -15px; transform: translateX(-50%); }
  .flow li { margin-bottom: 8px; }
  .example { grid-template-columns: 1fr; gap: 2px; }
  .example dd { margin-bottom: 8px; }
}
.lifecycle.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
@media (max-width: 900px) { .lifecycle.four { grid-template-columns: 1fr; } }
.lifecycle.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .lifecycle.three { grid-template-columns: 1fr; } }

/* Seven nav links plus the CTA need more room than the 900px breakpoint allows. */
.nav-links a, .brand { white-space: nowrap; }
@media (max-width: 1180px) { .nav-links { gap: 18px; } }
@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    background: #111317;
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-24);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
}
