
:root {
  --ink: #123e4a;
  --ink-soft: #45656d;
  --teal: #0c6b66;
  --mint: #7ed9c4;
  --wash: #e7f6f2;
  --paper: #f5f8f7;
  --card: #ffffff;
  --line: #d5e3df;
  --sand: #f3eee4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 24px 60px rgba(18, 62, 74, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(880px 380px at 110% -8%, rgba(126, 217, 196, 0.55), transparent 62%),
    linear-gradient(180deg, #f8fbfa 0%, var(--paper) 280px);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
a { color: inherit; }
img, svg { display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 5;
}
.skip:focus { top: 12px; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
[hidden] { display: none !important; }
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.03em; font-size: 20px; }
.logo svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-size: 14px; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--teal); }
.nav-toggle { display: none; }
.button, button.send, button.launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: white;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.button-quiet { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button-quiet:hover, .button:hover, button.send:hover { background: var(--teal); color: white; }
.eyebrow { letter-spacing: 0.16em; text-transform: uppercase; color: var(--teal); font-size: 12px; font-weight: 700; margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(40px, 5vw, 68px); margin: 0 0 16px; }
h2 { font-size: clamp(28px, 3vw, 40px); margin: 0 0 12px; }
h3 { font-size: 22px; margin: 0 0 8px; }
.lede, .muted { color: var(--ink-soft); }
.lede { font-size: 19px; max-width: 46rem; }
.home-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: start; padding: 42px 0 18px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 28px 0 0; }
.stats div { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stats dt { color: var(--ink-soft); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.stats dd { margin: 4px 0 0; font-family: var(--serif); font-size: 28px; }
.section { padding: 28px 0 64px; }
.gap-top { margin-top: 22px; }
.gap-top-lg { margin-top: 28px; }
.grid-4, .grid-3, .grid-2 { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card, .story, .role, .status-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
}
.card p, .story p, .role p { color: var(--ink-soft); margin: 0; }
.card strong, .kicker { color: var(--teal); font-size: 13px; letter-spacing: 0.04em; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 22px; }
.flow div { background: var(--wash); border-radius: 14px; padding: 14px; min-height: 92px; }
.flow strong { display: block; margin-bottom: 6px; }
.flow span { color: var(--ink-soft); font-size: 14px; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.sand { background: var(--sand); border-radius: 22px; padding: 22px; }
.prose { padding: 42px 0 72px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose h1 { font-size: clamp(36px, 4vw, 56px); }
.person { display: flex; flex-direction: column; gap: 4px; }
.person b { font-family: var(--serif); font-size: 20px; }
.meta { color: var(--ink-soft); font-size: 14px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 16px; overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #1f9d72; display: inline-block; margin-right: 8px; }
form.stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 140px; resize: vertical; }
.errors { background: #fff4ef; border: 1px solid #efd2c6; color: #8c4a32; border-radius: 12px; padding: 12px 14px; }
.footer { background: var(--ink); color: white; padding: 36px 0 48px; margin-top: 20px; }
.footer a { color: white; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.footer p, .footer li { color: rgba(255,255,255,0.78); font-size: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.assist-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 680px;
  overflow: hidden;
}
.assist-head, .assist-context, .sources, .suggests, .composer { padding-left: 16px; padding-right: 16px; }
.assist-head {
  background: var(--ink);
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
}
.assist-head strong { display: block; font-size: 16px; }
.assist-head span { color: rgba(255,255,255,0.72); font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--mint) !important; font-weight: 700; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); display: block; box-shadow: 0 0 0 0 rgba(126, 217, 196, 0.7); animation: pulse 2.4s infinite; }
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(126, 217, 196, 0); }
}
.assist-context { margin: 0; padding-top: 12px; color: var(--ink-soft); font-size: 13px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding-bottom: 8px; }
.sources li { background: var(--wash); color: var(--teal); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.log { flex: 1; overflow: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 280px; }
.bubble { max-width: min(100%, 520px); padding: 10px 12px; border-radius: 14px; white-space: pre-wrap; font-size: 15px; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--wash); }
.bubble.assistant { align-self: flex-start; background: #fbfcfc; border: 1px solid var(--line); }
.bubble.note { align-self: stretch; background: #fff8f3; color: #8c4a32; }
.bubble p { margin: 0 0 8px; }
.bubble p:last-child { margin-bottom: 0; }
.bubble table { margin-top: 8px; }
.bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--wash); padding: 0 4px; border-radius: 4px; }
.suggests { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
.suggests button, .text-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.composer { display: flex; gap: 8px; padding-bottom: 14px; align-items: end; }
.composer textarea { min-height: 52px; max-height: 140px; }
.composer button { height: 52px; border-radius: 14px; }
.launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  box-shadow: var(--shadow);
}
.drawer {
  position: fixed;
  right: 18px;
  bottom: 76px;
  width: min(420px, calc(100% - 24px));
  z-index: 35;
}
.drawer:not([hidden]) + .launcher { display: none; }
.drawer .assist-card { min-height: 540px; max-height: min(70vh, 640px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body[data-assist-primary] .launcher,
body[data-assist-primary] .drawer { display: none; }
@media (max-width: 980px) {
  .home-grid, .split, .grid-4, .grid-3, .flow, .footer-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    left: 0; right: 0; top: 74px;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 18px;
  }
  .home-grid, .split, .grid-4, .grid-3, .grid-2, .flow, .footer-grid, .stats { grid-template-columns: 1fr; }
  .home-grid { padding-top: 22px; }
  .assist-card { min-height: 560px; }
  h1 { font-size: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .live i { animation: none; }
  html { scroll-behavior: auto; }
}
