:root {
  --paper: #F6F5F1;
  --paper-2: #EEECE6;
  --card: #FFFFFF;
  --ink: #0D0F14;
  --ink-2: #2E323C;
  --muted: #646a78;
  --line: #E1DED6;
  --accent: #3B4CF5;
  --accent-soft: #E7E9FE;

  --night: #0D0F14;
  --night-2: #151821;
  --night-line: #252a36;
  --night-text: #EDEBE5;
  --night-muted: #9AA0AE;
  --night-accent: #8F9BFF;

  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--mono); font-size: .86em; }
p code, li code {
  background: rgba(13, 15, 20, .06);
  padding: .1em .36em;
  border-radius: 5px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 245, 241, .82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14.5px; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  font-weight: 500; font-size: 15px;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-small { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #262a35; }
.btn-ghost { border: 1px solid var(--line); background: var(--card); }
.btn-ghost:hover { border-color: #cfcbc1; }
.btn-light { background: var(--night-text); color: var(--ink); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.eyebrow.plain {
  padding: 0; border: 0; background: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.display {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 8.4vw, 108px);
  line-height: .98; letter-spacing: -.025em;
  margin-top: 28px;
}
.display em, .display-2 em { font-style: italic; color: var(--accent); }
.display-2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04; letter-spacing: -.02em;
}
.lede { max-width: 640px; margin-top: 28px; font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.muted { color: var(--muted); font-size: 17px; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 0; text-align: center; overflow: hidden; }
.hero .lede { margin-left: auto; margin-right: auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }

.mock {
  position: relative;
  margin: 72px auto -1px;
  max-width: 1040px;
  text-align: left;
  background: var(--night);
  border-radius: 16px 16px 0 0;
  border: 1px solid #1d212b; border-bottom: 0;
  box-shadow: 0 40px 80px -30px rgba(13, 15, 20, .45), 0 0 0 8px rgba(13, 15, 20, .03);
  color: var(--night-text);
  overflow: hidden;
}
.mock-bar {
  display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
  height: 40px; padding: 0 14px;
  border-bottom: 1px solid var(--night-line);
  font: 12px var(--mono); color: var(--night-muted);
}
.mock-title { text-align: center; }
.lights { display: flex; gap: 7px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: #2c313d; }
.mock-body { display: grid; grid-template-columns: 1.35fr 1fr; min-height: 380px; }

.mock-editor { border-right: 1px solid var(--night-line); }
.tabs { display: flex; font: 12px var(--mono); border-bottom: 1px solid var(--night-line); }
.tab { padding: 9px 16px; color: var(--night-muted); border-right: 1px solid var(--night-line); }
.tab.on { color: var(--night-text); background: var(--night-2); box-shadow: inset 0 -2px 0 var(--night-accent); }
.code {
  margin: 0; padding: 18px 0;
  font: 13px/1.85 var(--mono); color: #c9cdd8;
  white-space: pre; overflow: hidden;
}
.code .ln { display: inline-block; width: 44px; padding-right: 16px; text-align: right; color: #4b5162; user-select: none; }
.code .add { display: inline-block; width: 100%; background: rgba(76, 201, 140, .09); box-shadow: inset 2px 0 0 #4cc98c; }
.code .k { color: #c792ea; }
.code .f { color: #82aaff; }
.code .t { color: #ffcb6b; }
.code .s { color: #c3e88d; }
.code .n { color: #f78c6c; }
.code .c { color: #5f6779; font-style: italic; }

.mock-panel { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--night-2); font-size: 13.5px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; }
.panel-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 11.5px var(--mono); color: var(--night-muted); border: 1px solid var(--night-line); border-radius: 999px; padding: 3px 10px; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: #4cc98c; }
.msg.user { align-self: flex-end; max-width: 92%; background: #232838; padding: 10px 13px; border-radius: 12px 12px 4px 12px; line-height: 1.5; }
.tool {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border: 1px solid var(--night-line); border-radius: 9px;
  font-size: 12.5px; background: rgba(255, 255, 255, .015);
}
.tool code { color: var(--night-text); font-size: 12px; }
.tool .path { color: var(--night-muted); font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool .tick { color: #4cc98c; font-size: 12px; }
.tool .diff { margin-left: auto; font: 12px var(--mono); }
.tool .diff b { color: #4cc98c; font-weight: 500; }
.tool .diff s { color: #f07178; text-decoration: none; }
.perm { border: 1px solid rgba(143, 155, 255, .45); background: rgba(143, 155, 255, .07); border-radius: 10px; padding: 11px; }
.perm-head { display: flex; gap: 9px; align-items: center; font: 12px var(--mono); }
.perm-head span { color: var(--night-muted); }
.perm-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pbtn { font-size: 12px; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--night-line); color: var(--night-muted); }
.pbtn.on { background: var(--night-accent); border-color: var(--night-accent); color: var(--night); font-weight: 600; }
.meter { margin-top: auto; display: flex; align-items: center; gap: 10px; font: 11.5px var(--mono); color: var(--night-muted); }
.meter .bar { flex: 1; height: 4px; border-radius: 4px; background: var(--night-line); overflow: hidden; }
.meter .bar i { display: block; width: 18%; height: 100%; background: var(--night-accent); }

/* ---------- Principles ---------- */
.principles { background: var(--night); color: var(--night-text); padding: 64px 0; border-top: 1px solid var(--night-line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.principles h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 10px 0 8px; letter-spacing: -.01em; }
.principles p { color: var(--night-muted); font-size: 15.5px; }
.principles .kicker { color: var(--night-accent); }
.principles code { background: rgba(255, 255, 255, .07); }

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section.tint { background: var(--paper-2); }
.section-head { max-width: 640px; }
.section-head .display-2 { margin-top: 16px; }
.section-head .muted { margin-top: 20px; }

.features {
  margin-top: 64px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.feature { padding: 36px 32px 40px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); transition: background .2s; }
.feature:hover { background: var(--card); }
.feature svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 22px 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.feature p { color: var(--muted); font-size: 15.5px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.sticky { position: sticky; top: 120px; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.tools code { font-size: 12.5px; padding: 6px 11px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 64px 1fr; gap: 8px; padding: 34px 0; border-top: 1px solid #d6d2c8; }
.steps li:last-child { border-bottom: 1px solid #d6d2c8; }
.step-n { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--accent); }
.steps h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; letter-spacing: -.01em; }
.steps p { color: var(--muted); }

/* ---------- Safety (dark) ---------- */
.section.dark { background: var(--night); color: var(--night-text); }
.dark .eyebrow.plain { color: var(--night-accent); }
.dark .display-2 em { color: var(--night-accent); }
.dark .muted { color: var(--night-muted); }
.guards { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guard { padding: 30px; border: 1px solid var(--night-line); border-radius: var(--radius); background: var(--night-2); }
.guard h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.guard h3::before { content: ""; display: block; width: 22px; height: 2px; background: var(--night-accent); margin-bottom: 20px; }
.guard p { color: var(--night-muted); font-size: 15px; }
.guard code { background: rgba(255, 255, 255, .07); color: var(--night-text); }

/* ---------- Models ---------- */
.checks { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 30px; color: var(--ink-2); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%233B4CF5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat;
}
.profiles {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 60px -36px rgba(13, 15, 20, .3);
  padding: 10px;
}
.profiles-head { padding: 12px 14px 14px; font: 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.profile { display: flex; align-items: center; gap: 14px; padding: 16px 14px; border-radius: 12px; }
.profile.on { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.profile div { display: flex; flex-direction: column; line-height: 1.35; }
.profile b { font-weight: 600; font-size: 15px; }
.profile span { font-size: 13.5px; color: var(--muted); }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: #c5c1b7; flex: none; }
.pdot.green { background: #2fb37a; box-shadow: 0 0 0 4px rgba(47, 179, 122, .14); }
.pdot.amber { background: #e3a43a; box-shadow: 0 0 0 4px rgba(227, 164, 58, .16); }
.profile .tag { margin-left: auto; font: 11.5px var(--mono); color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.profiles-foot { margin: 8px 4px 4px; padding: 14px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid #d6d2c8; }
.timeline li { position: relative; padding: 32px 24px 0 0; }
.timeline li::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--paper-2); border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); }
.ver { font: 500 13px var(--mono); color: var(--accent); }
.timeline h3 { font-size: 17px; font-weight: 600; margin: 10px 0 6px; }
.timeline p { color: var(--muted); font-size: 14.5px; }

/* ---------- CTA ---------- */
.cta { background: var(--night); color: var(--night-text); padding: 128px 0; text-align: center; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: auto 50% -320px auto; transform: translateX(50%);
  width: 900px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 76, 245, .32), transparent);
  pointer-events: none;
}
.cta-inner { position: relative; }
.cta .display-2 em { color: var(--night-accent); }
.cta .muted { color: var(--night-muted); margin: 22px 0 36px; }

/* ---------- Footer ---------- */
.footer { background: var(--night); color: var(--night-muted); border-top: 1px solid var(--night-line); padding: 56px 0 32px; font-size: 14.5px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 40px; align-items: start; }
.footer .brand { color: var(--night-text); }
.footer-brand p { margin-top: 12px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a:hover, .footer-contact a:hover { color: var(--night-text); }
.footer-contact { display: flex; flex-direction: column; gap: 4px; text-align: right; }
.footer-contact span { font: 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.footer-contact a { color: var(--night-text); font-size: 16px; }
.footer-base { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--night-line); font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .features, .guards { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 56px; }
  .sticky { position: static; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid #d6d2c8; margin-left: 4px; }
  .timeline li { padding: 0 0 32px 28px; }
  .timeline li::before { top: 4px; left: -6px; }
  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .meter { margin-top: 6px; }
  .mock-editor { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding-top: 56px; }
  .lede { font-size: 17px; }
  .section, .cta { padding: 88px 0; }
  .grid-3, .features, .guards { grid-template-columns: 1fr; gap: 28px; }
  .features { gap: 0; }
  .feature { padding: 28px 24px 32px; }
  .mock { margin-top: 52px; }
  .mock-bar { grid-template-columns: 60px 1fr 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-contact { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .feature { transition: none; }
}
