:root {
  --ink: #151515;
  --muted: #686661;
  --paper: #efede7;
  --surface: #fffdf8;
  --accent: #c7ff3e;
  --accent-dark: #6f9811;
  --line: #d7d2c7;
  --soft: #f6f3ec;
  --shadow: 0 28px 80px rgba(24, 23, 20, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 4%, rgba(199, 255, 62, 0.2), transparent 27rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #759f18; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.site-header, main, footer { width: min(1080px, calc(100% - 38px)); margin-inline: auto; }
.site-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; font-weight: 850; letter-spacing: -0.03em; }
.brand-mark, .assistant-avatar { display: grid; place-items: center; background: var(--ink); color: var(--accent); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.06em; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; }
.prototype-badge { border: 1px solid var(--line); border-radius: 99px; padding: 7px 11px; background: rgba(255,255,255,.55); color: var(--muted); font-size: .76rem; font-weight: 750; }

.hero { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 80px; padding: 85px 0 70px; }
.eyebrow { margin: 0 0 12px; color: #557412; font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 25px; font-size: clamp(3.6rem, 8.2vw, 7.2rem); line-height: .88; letter-spacing: -.075em; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.05em; }
.lede { max-width: 650px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.scope-card { border-left: 3px solid var(--accent-dark); padding: 8px 0 8px 23px; }
.scope-card span { display: block; margin-bottom: 10px; color: var(--muted); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.scope-card strong { display: block; font-size: 1.7rem; letter-spacing: -.04em; }
.scope-card p { margin: 6px 0 0; color: var(--muted); }

.assistant-shell { overflow: hidden; border: 1px solid rgba(215,210,199,.9); border-radius: 25px; background: var(--surface); box-shadow: var(--shadow); }
.assistant-header { min-height: 82px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 16px 22px; }
.assistant-avatar { flex: 0 0 auto; width: 45px; height: 45px; border-radius: 50%; }
.assistant-header h2 { margin: 0 0 3px; font-size: 1rem; letter-spacing: -.02em; }
.assistant-header p { margin: 0; color: var(--muted); font-size: .78rem; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #78a916; }
.reset-button { margin-left: auto; border: 0; padding: 8px; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 750; text-decoration: underline; }
.privacy-strip { border-bottom: 1px solid #dfe6c8; padding: 10px 22px; background: #f1f7df; color: #536038; font-size: .78rem; }

.chat-log { height: min(620px, 68vh); min-height: 480px; overflow-y: auto; padding: 34px clamp(18px, 5vw, 58px); background: linear-gradient(180deg, #fbf9f4 0%, #f5f2eb 100%); scroll-behavior: smooth; }
.message-row { display: flex; margin-bottom: 13px; }
.message-row-user { justify-content: flex-end; }
.message { max-width: min(680px, 86%); border-radius: 19px; padding: 14px 17px; }
.message p { margin: 0; }
.message-assistant { border: 1px solid var(--line); border-bottom-left-radius: 5px; background: var(--surface); }
.message-user { border-bottom-right-radius: 5px; background: var(--ink); color: white; }
.message-eyebrow { display: block; margin-bottom: 5px; color: var(--accent-dark); font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.typing { display: flex; gap: 4px; border: 1px solid var(--line); border-radius: 18px 18px 18px 5px; padding: 14px 17px; background: var(--surface); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8d8980; animation: pulse 800ms infinite alternate; }
.typing i:nth-child(2) { animation-delay: 140ms; }
.typing i:nth-child(3) { animation-delay: 280ms; }
@keyframes pulse { to { opacity: .3; transform: translateY(-2px); } }

.composer { min-height: 112px; border-top: 1px solid var(--line); padding: 18px 22px; background: white; }
.quick-replies { display: flex; flex-wrap: wrap; gap: 9px; }
.quick-replies button, .route-actions button { min-height: 43px; border: 1px solid #b7b1a5; border-radius: 99px; padding: 9px 15px; background: var(--surface); color: var(--ink); font-weight: 750; transition: transform 140ms ease, border-color 140ms ease, background 140ms ease; }
.quick-replies button:hover, .route-actions button:not(:disabled):hover { transform: translateY(-1px); border-color: #738f31; background: #f3f8e5; }
.text-composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.text-composer input { min-width: 0; border: 1px solid #b7b1a5; border-radius: 99px; padding: 11px 17px; }
.text-composer button, .route-actions button:first-child { border-color: #a8d82d; background: var(--accent); }

.route-card { width: min(720px, 94%); border: 1px solid #aab88c; border-radius: 20px 20px 20px 6px; padding: 22px; background: #fbfff2; }
.route-card > strong { display: block; font-size: 1.35rem; letter-spacing: -.03em; }
.route-card > p { margin: 7px 0 0; color: var(--muted); }
.route-card dl { margin: 19px 0 0; }
.route-card dl div { display: grid; grid-template-columns: 155px 1fr; gap: 14px; border-top: 1px solid #dce4c9; padding: 9px 0; }
.route-card dt { color: var(--muted); }
.route-card dd { margin: 0; font-weight: 750; }
.route-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.route-actions .secondary-action { background: transparent; }

.workflow-notes { display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; padding: 120px 0; }
.workflow-notes ol { margin: 0; padding: 0; list-style: none; }
.workflow-notes li { display: grid; grid-template-columns: 42px 1fr; gap: 16px; border-top: 1px solid #bbb6ac; padding: 20px 0; }
.workflow-notes li > span { color: var(--accent-dark); font-size: .75rem; font-weight: 900; }
.workflow-notes strong { font-size: 1.05rem; }
.workflow-notes li p { margin: 4px 0 0; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 28px 0 45px; color: var(--muted); font-size: .82rem; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 26px, 1080px); }
  .hero, .workflow-notes { grid-template-columns: 1fr; gap: 35px; }
  .hero { padding: 55px 0; }
  .chat-log { min-height: 460px; padding: 24px 14px; }
  .message { max-width: 92%; }
  .composer { padding: 15px; }
  .route-card dl div { grid-template-columns: 1fr; gap: 2px; }
  .workflow-notes { padding: 85px 0; }
}

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