/* ---------- Tokens ---------- */
:root {
  --paper: #f7f6f2;
  --ink: #28312b;
  --muted: #6c7169;
  --line: #dedfd6;
  --accent: #b45b3f;
  --soft: #eeefe8;
  --card: #fbfaf7;
  --sage: #5d6c54;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 400; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
svg { display: block; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: #e3c9b6; color: var(--ink); }
[hidden] { display: none !important; }

.shell { width: calc(100% - 112px); max-width: 1060px; margin-inline: auto; }

.skip-link {
  position: absolute; top: -80px; left: 20px; z-index: 30;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header { display: flex; align-items: center; height: 104px; gap: 34px; }
.wordmark { font-size: 23px; font-weight: 600; letter-spacing: -.6px; line-height: 1; }
.wordmark > span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
.site-header nav a, .header-resume { font-size: 14px; color: #5d655b; position: relative; }
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-header nav a:hover::after { transform: scaleX(1); }
.header-resume { margin-left: 8px; color: var(--ink); }
.header-resume > span { display: inline-block; margin-left: 6px; transition: transform .3s var(--ease); }
.header-resume:hover > span { transform: translate(2px, -2px); }

/* ---------- Hero ---------- */
.hero { padding-top: 65px; padding-bottom: 92px; text-align: center; }
.hello { display: inline-flex; align-items: center; gap: 15px; text-align: left; margin-bottom: 29px; }
.avatar-frame {
  width: 66px; height: 66px; flex: 0 0 66px; overflow: hidden; border-radius: 50%;
  background: #e6e9df; border: 1px solid #d8ddcf;
}
.avatar-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.greeting { font-size: 18px; line-height: 1.4; }
.hello-caption { font-size: 13px; line-height: 1.5; margin-top: 2px; color: var(--muted); }
.hero h1 { font-size: clamp(64px, 7.3vw, 92px); line-height: 1.04; letter-spacing: -.045em; }
.hero h1 > span { display: block; }
.hero h1 em { color: var(--accent); letter-spacing: -.02em; padding-right: .04em; }
.hero-description { font-size: 19px; color: var(--muted); line-height: 1.7; margin: 26px auto 0; max-width: 560px; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: 30px; margin-top: 30px; }
.primary-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 50px;
  border-radius: 30px; background: var(--ink); color: var(--paper); font-size: 14px; padding: 13px 24px;
  transition: background .25s, transform .35s var(--ease);
}
.primary-link > span { font-size: 18px; line-height: 1; transition: transform .35s var(--ease); }
.primary-link:hover { background: #3c4b3f; transform: translateY(-2px); }
.primary-link:hover > span { transform: translateY(3px); }
.quiet-link { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.5; }
.quiet-link > span { font-size: 17px; line-height: 1; display: inline-block; transition: transform .3s var(--ease); }
.quiet-link:hover { color: var(--accent); }
.quiet-link:hover > span { transform: translate(2px, -2px); }
.hero-location { font-size: 13px; color: #6f746a; margin-top: 26px; }
.hero-location > span { margin: 0 8px; }

.hero-enter { animation: hero-arrive .85s var(--ease) both; }
.delay-1 { animation-delay: 80ms; }
.delay-2 { animation-delay: 160ms; }
.delay-3 { animation-delay: 240ms; }
@keyframes hero-arrive { from { opacity: 0; transform: translateY(17px); } to { opacity: 1; transform: none; } }

/* ---------- Section scaffolding ---------- */
.eyebrow { font-size: 12px; letter-spacing: 1.4px; color: var(--muted); }
.work-section { padding-top: 46px; padding-bottom: 86px; border-top: 1px solid var(--line); }
.section-header { margin-bottom: 34px; }
.section-header h2 { font-size: 38px; letter-spacing: -1.2px; line-height: 1.2; margin-top: 12px; }
.section-header > p:last-child { font-size: 15px; line-height: 1.7; color: var(--muted); margin-top: 10px; }

/* ---------- Projects ---------- */
.project { border-top: 1px solid var(--line); padding: 40px 0 8px; }
.project + .project { margin-top: 40px; }
.project-head { display: flex; gap: 32px; }
.project-number { font-size: 12px; color: #979c90; letter-spacing: .5px; padding-top: 4px; flex: 0 0 24px; }
.project-content { flex: 1; min-width: 0; }
.project-category { font-size: 12px; letter-spacing: 1px; color: #6f7a64; }
.project-title { font-size: 32px; line-height: 1.2; letter-spacing: -.9px; margin: 10px 0 12px; }
.project-lead { font-size: 16px; color: var(--muted); line-height: 1.75; max-width: 680px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 18px; }
.tags li {
  font-size: 12px; color: #5f6a58; border: 1px solid var(--line); border-radius: 20px;
  padding: 3px 10px; background: var(--card);
}

.project-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 34px 0 6px 56px; }
.solved-label, .diagram-cap, .mini-label {
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent);
}
.solved h4 { font-size: 22px; letter-spacing: -.5px; line-height: 1.3; margin: 10px 0 10px; }
.solved p { font-size: 14px; line-height: 1.85; color: var(--muted); }

.diagram-cap { color: var(--muted); margin-bottom: 12px; }
.flow { display: grid; gap: 0; counter-reset: flow; }
.flow li {
  position: relative; display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: baseline;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.flow li + li { margin-top: 18px; }
.flow li + li::before {
  content: "↓"; position: absolute; left: 22px; top: -19px; font-size: 13px; line-height: 18px; color: #a2a79a;
}
.flow strong { font-size: 13px; font-weight: 500; }
.flow span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.flow .flow-split { border-style: dashed; }
.flow-band {
  margin-top: 14px; font-size: 12px; line-height: 1.6; color: #5f6a58;
  padding: 9px 12px; border-radius: 8px; background: var(--soft);
}

summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
.expand-icon {
  position: relative; display: block; width: 13px; height: 13px; flex: 0 0 13px; margin-left: auto;
  color: #828a78; transition: transform .3s var(--ease);
}
.expand-icon::before, .expand-icon::after {
  content: ""; position: absolute; left: 1px; top: 6px; width: 11px; height: 1px; background: currentColor;
}
.expand-icon::after { transform: rotate(90deg); transition: transform .3s var(--ease); }
details[open] > summary .expand-icon::after { transform: rotate(0); }

.built { margin: 26px 0 0 56px; border-top: 1px solid var(--line); }
.built > summary { display: flex; align-items: center; padding: 20px 0; font-size: 15px; color: var(--ink); }
.built > summary:hover { color: var(--accent); }
.built-body { padding-bottom: 18px; }
.built-intro { font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 720px; margin-bottom: 8px; }
.built-body section { border-top: 1px solid var(--line); padding: 16px 0; display: grid; grid-template-columns: 230px 1fr; gap: 24px; }
.built-body h4 { font-size: 14px; color: #4a5643; font-weight: 500; }
.built-body section p { font-size: 14px; line-height: 1.8; color: var(--muted); }

.earlier-projects { border-top: 1px solid var(--line); margin-top: 52px; }
.earlier-projects > summary { display: flex; align-items: center; padding: 22px 0; font-size: 14px; color: var(--muted); }
.earlier-projects > summary:hover { color: var(--accent); }
.earlier-list { padding-left: 56px; padding-bottom: 6px; }
.earlier-item { border-top: 1px solid var(--line); }
.earlier-item > summary { display: flex; align-items: center; gap: 20px; padding: 18px 0; }
.earlier-item > summary:hover .role > strong { color: var(--accent); }
.earlier-body { padding: 0 120px 22px 0; }
.earlier-eyebrow { font-size: 12px; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.earlier-body > p:not(.earlier-eyebrow) { font-size: 14px; line-height: 1.8; color: var(--muted); }
.earlier-body .tags { margin-top: 12px; }

/* ---------- About & experience ---------- */
.about-section { border-top: 1px solid var(--line); padding-top: 66px; padding-bottom: 74px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 69px; }
.about-grid h2 { font-size: 36px; line-height: 1.2; letter-spacing: -1.2px; margin-top: 18px; }
.about-grid h2 em { color: var(--sage); }
.about-copy > p { font-size: 15px; line-height: 1.9; color: var(--muted); }
.about-copy > p + p { margin-top: 15px; }
.about-copy > p:first-child { font-size: 18px; color: #46513f; line-height: 1.7; }
.about-copy > p.education { font-size: 14px; color: #424e3b; margin-top: 24px; line-height: 1.5; }
.education > span { display: block; font-size: 13px; color: #6f795f; margin-top: 2px; }

.experience-block { margin-top: 62px; }
.experience-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.experience-heading h3 { font-size: 22px; letter-spacing: -.4px; }
.experience-heading .quiet-link { font-size: 13px; color: var(--muted); }
.experience-item { border-top: 1px solid var(--line); }
.experience-item > summary { display: flex; align-items: center; gap: 24px; padding: 20px 0; }
.role { flex: 1; min-width: 0; }
.role > strong { display: block; font-size: 15px; font-weight: 400; color: #404c39; line-height: 1.5; }
.role > span { font-size: 13px; color: #6d775f; display: block; margin-top: 2px; }
.years { font-size: 13px; color: #6d775f; white-space: nowrap; flex: 0 0 105px; text-align: right; }
.experience-item > summary .expand-icon { margin-left: 12px; }
.experience-item > summary:hover .role > strong { color: var(--accent); }
.experience-description { padding: 0 150px 22px 0; }
.experience-description > p { font-size: 14px; line-height: 1.8; color: var(--muted); }
.experience-description > p.role-note { font-size: 13px; margin-top: 10px; color: #6f795f; }

.toolkit { border-top: 1px solid var(--line); margin-top: 20px; }
.toolkit > summary { display: flex; align-items: center; gap: 20px; padding: 22px 0; font-size: 14px; color: var(--muted); }
.toolkit > summary:hover { color: var(--accent); }
.toolkit-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 60px; row-gap: 22px; padding-bottom: 20px; }
.toolkit-grid h4 { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.toolkit-grid p { font-size: 14px; color: var(--muted); line-height: 1.8; }

details[open] > .earlier-list, details[open] > .earlier-body, details[open] > .experience-description,
details[open] > .toolkit-grid, details[open] > .built-body { animation: details-arrive .35s var(--ease); }
@keyframes details-arrive { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- Contact & footer ---------- */
.contact-section { text-align: center; border-top: 1px solid var(--line); padding-top: 80px; padding-bottom: 86px; }
.contact-section h2 { font-size: 60px; letter-spacing: -2.2px; line-height: 1.08; margin-top: 22px; }
.contact-section h2 em { color: var(--accent); }
.contact-lead { font-size: 16px; color: var(--muted); margin-top: 22px; }
.contact-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
.email-link { font-size: 20px; letter-spacing: -.3px; transition: color .2s; }
.email-link > span { display: inline-block; margin-left: 8px; color: var(--accent); transition: transform .3s var(--ease); }
.email-link:hover { color: var(--accent); }
.email-link:hover > span { transform: translate(2px, -2px); }
.copy-email {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%; color: #6f7866;
  transition: color .2s, border-color .2s, background .2s;
}
.copy-email:hover { color: var(--ink); border-color: #b8c2aa; background: var(--soft); }
.copy-email svg { width: 15px; height: 15px; }
.contact-note { font-size: 14px; color: var(--muted); margin-top: 28px; }

.site-footer {
  border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 84px; color: #6f7766; font-size: 13px;
}
.site-footer > span > span { margin: 0 8px; }
.site-footer a { display: flex; align-items: center; gap: 10px; }
.site-footer a > span { font-size: 16px; transition: transform .3s var(--ease); }
.site-footer a:hover { color: var(--accent); }
.site-footer a:hover > span { transform: translateY(-3px); }

.toast {
  position: fixed; left: 50%; bottom: 25px; z-index: 20; transform: translate(-50%, 12px); opacity: 0;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 30px; font-size: 13px;
  white-space: nowrap; box-shadow: 0 5px 20px #0001; pointer-events: none;
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.reveal { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-pending { opacity: 0; transform: translateY(18px); }

/* ---------- Demo frame (shared) ---------- */
.demo {
  margin: 30px 0 0 56px; border: 1px solid var(--line); border-radius: 14px; background: var(--card);
  overflow: hidden;
}
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.demo-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: #b9bdb1; }
[data-state="playing"] .demo-dot { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.demo-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-btn {
  font-size: 13px; padding: 6px 13px; border: 1px solid #cfd3c6; border-radius: 20px; background: var(--card);
  transition: border-color .2s, background .2s;
}
.demo-btn:hover { border-color: var(--ink); }
.demo-btn:disabled { opacity: .45; border-color: #cfd3c6; }
.live-pill {
  font-size: 12px; color: #80867a; padding: 5px 11px; border: 1px dashed #cfd3c6; border-radius: 20px;
  white-space: nowrap;
}
.primary-btn {
  font-size: 13px; background: var(--ink); color: var(--paper); border-radius: 20px; padding: 9px 16px;
  transition: background .2s;
}
.primary-btn:hover { background: #3c4b3f; }
.primary-btn:disabled { background: #8b9386; }
.demo-empty { font-size: 13px; color: var(--muted); padding: 4px 0 6px; }

/* ---------- Voice demo ---------- */
.call { padding: 18px 20px 16px; }
.call-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.call-company { font-size: 15px; font-weight: 500; }
.call-role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.call-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.call-agent {
  font-size: 12px; color: var(--sage); background: var(--soft); border-radius: 20px; padding: 3px 10px;
  transition: background .3s, color .3s;
}
.call-agent.is-changed { background: #f1dfd5; color: #8f432c; }
.call-timer { font-family: var(--mono); font-size: 13px; color: var(--ink); min-width: 46px; text-align: right; }

.wave { display: flex; align-items: center; gap: 3px; height: 36px; margin: 14px 0 6px; }
.wave span {
  flex: 1; max-width: 6px; height: 4px; border-radius: 3px; background: #cfd3c6;
  transition: background .3s;
}
.wave.is-agent span, .wave.is-caller span { animation: wave 900ms ease-in-out infinite; }
.wave.is-agent span { background: var(--sage); }
.wave.is-caller span { background: var(--accent); }
.wave span:nth-child(4n+1) { animation-delay: -100ms; }
.wave span:nth-child(4n+2) { animation-delay: -450ms; animation-duration: 700ms; }
.wave span:nth-child(4n+3) { animation-delay: -250ms; animation-duration: 1100ms; }
.wave span:nth-child(4n) { animation-delay: -600ms; animation-duration: 800ms; }
.wave span:nth-child(3n) { animation-duration: 1000ms; }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 30px; } }

.transcript { max-height: 330px; overflow-y: auto; scroll-behavior: smooth; padding-right: 6px; }
.transcript:empty { display: none; }
.line { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 7px 0; animation: line-in .35s var(--ease); }
@keyframes line-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.line-who { font-size: 12px; color: var(--muted); padding-top: 2px; }
.line-agent .line-who { color: var(--sage); }
.line-caller .line-who { color: var(--accent); }
.line-text { font-size: 14px; line-height: 1.65; }
.line-system { grid-template-columns: 1fr; }
.system-note {
  justify-self: start; font-size: 12px; color: #5f6a58; background: var(--soft); border-radius: 6px;
  padding: 4px 10px;
}
.system-note.is-handoff { background: #f1dfd5; color: #8f432c; }
.source-tag {
  display: inline-block; margin-left: 6px; font-size: 12px; color: #5f6a58; border: 1px solid var(--line);
  border-radius: 4px; padding: 0 6px; background: var(--paper); white-space: nowrap;
}

.redact { border-radius: 3px; transition: background .4s, color .4s; }
.redact.is-flagged { background: #f3d9cd; box-shadow: 0 0 0 2px #f3d9cd; }
.redact.is-removed { background: var(--ink); color: var(--paper); padding: 0 5px; font-size: 13px; }
.redact-cat {
  display: inline-block; margin-left: 4px; font-size: 12px; color: var(--accent); vertical-align: 1px;
}

.demo-sublabel { padding: 10px 20px 0; }
.sound-btn[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.mms-thumb {
  width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line);
  margin-top: 6px; animation: line-in .45s var(--ease);
}

.vision {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start;
  margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  animation: line-in .45s var(--ease);
}
.photo-frame { position: relative; border-radius: 8px; overflow: hidden; line-height: 0; }
.photo-frame img { display: block; width: 100%; height: auto; }
.box {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  border: 2px solid #7fbf6a; border-radius: 4px; animation: box-in .45s var(--ease);
}
.box.is-missing { border-color: #e2754f; border-style: dashed; }
.box-label {
  position: absolute; left: -2px; top: -2px; transform: translateY(-100%);
  font-size: 12px; line-height: 1.5; white-space: nowrap; padding: 1px 6px; border-radius: 4px 4px 4px 0;
  background: #3d6b33; color: #fff;
}
.box.is-missing .box-label { background: #a8452a; }
.box-label.is-inside { transform: none; border-radius: 0 0 4px 0; }
.box-label.is-right { left: auto; right: -2px; border-radius: 4px 4px 0 4px; }
@keyframes box-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
.vision-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.vision-title span {
  font-size: 12px; font-weight: 400; color: var(--muted); border: 1px dashed #cfd3c6; border-radius: 20px; padding: 1px 8px;
}
.ppe-summary {
  margin-top: 10px; font-size: 13px; font-weight: 500; color: #8a5a12; background: #f6ead2;
  border-radius: 6px; padding: 6px 10px; animation: line-in .35s var(--ease);
}
.ppe-list { display: grid; gap: 6px; margin-top: 10px; }
.ppe-list li { font-size: 13px; display: flex; align-items: center; gap: 8px; animation: line-in .35s var(--ease); }
.ppe-list li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5e9a4c; flex: 0 0 8px; }
.ppe-list li.is-missing { color: #8f432c; }
.ppe-list li.is-missing::before { background: #e2754f; }
.vision-note { font-size: 12px; color: var(--muted); line-height: 1.55; margin-top: 12px; }

.after-call { border-top: 1px solid var(--line); padding: 16px 20px 20px; background: var(--paper); }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pipeline li {
  display: grid; grid-template-columns: 12px 1fr; column-gap: 8px; row-gap: 2px; align-items: center;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  opacity: .55; transition: opacity .3s, border-color .3s;
}
.step-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #a7ad9f; }
.step-name { font-size: 13px; font-weight: 500; }
.step-detail { grid-column: 2; font-size: 12px; color: var(--muted); line-height: 1.4; }
.pipeline li.is-running { opacity: 1; border-color: var(--accent); }
.pipeline li.is-running .step-dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.pipeline li.is-done { opacity: 1; }
.pipeline li.is-done .step-dot { background: var(--sage); border-color: var(--sage); }
@keyframes spin { to { transform: rotate(360deg); } }

.report {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  padding: 18px 20px; animation: line-in .45s var(--ease);
}
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.report-kicker { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.report-title { font-size: 17px; margin-top: 3px; }
.status-chip {
  font-size: 12px; color: #8a5a12; background: #f6ead2; border-radius: 20px; padding: 4px 11px; white-space: nowrap;
}
.status-chip.is-approved { color: #3f5a34; background: #e1ead8; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin-top: 16px; }
.report-grid dt { font-size: 12px; color: var(--muted); }
.report-grid dd { font-size: 14px; line-height: 1.6; margin-top: 2px; }
.report-wide { grid-column: 1 / -1; }
.report-note { font-size: 12px; color: var(--muted); margin-top: 14px; }
.report-actions { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.report-toast { font-size: 13px; color: #3f5a34; }

/* ---------- Forms demo ---------- */
.tabs { display: flex; gap: 4px; background: var(--soft); border-radius: 22px; padding: 3px; }
.tabs [role="tab"] { font-size: 13px; padding: 6px 14px; border-radius: 20px; color: var(--muted); transition: background .2s, color .2s; }
.tabs [role="tab"][aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px #0000000f; }
.tab-panel { padding: 18px 20px 20px; }

.fill-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper);
  text-align: left; transition: border-color .2s, background .2s;
}
.chip:hover { border-color: #b8bfae; }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--card); }
.chip:disabled { opacity: .5; }

.message { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.mini-label { color: var(--muted); }
.message-text { font-size: 15px; line-height: 1.6; margin-top: 6px; min-height: 1.6em; }
.message-text .placeholder { color: #9ba095; }
.caret { display: inline-block; width: 1px; height: 1.05em; background: var(--ink); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.assistant-reply {
  margin-top: 12px; font-size: 14px; line-height: 1.6; padding: 10px 12px; border-radius: 8px;
  background: #f1dfd5; color: #6e3523;
}

.fill-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.fill-form { display: grid; gap: 8px; margin-top: 8px; }
.ff { display: grid; gap: 3px; }
.ff label { font-size: 12px; color: var(--muted); }
.ff label .req { color: var(--accent); }
.ff input {
  font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card);
  transition: border-color .3s, background .3s;
}
.ff.is-filled input { border-color: #b9c6ad; background: #f1f4ec; }
.ff.is-missing input { border-color: var(--accent); background: #fbf1ec; }
.ff.is-missing label { color: var(--accent); }
.json-panel { border: 1px solid var(--line); border-radius: 10px; background: #2a332d; color: #e6e8e0; padding: 12px 14px; min-width: 0; }
.json-panel .mini-label { color: #aeb5a6; }
.json-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.json { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; margin: 10px 0 0; white-space: pre-wrap; word-break: break-word; }
.badge { font-size: 12px; border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.badge.is-valid { background: #3d5a3a; color: #dff0d6; }
.badge.is-invalid { background: #6b3a2a; color: #fbe0d4; }

.ask { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.benefits { display: grid; gap: 12px; align-content: start; }
.benefits-kicker { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.benefits-title { font-size: 18px; margin-top: -8px; }
.field { display: grid; gap: 4px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field legend { font-size: 12px; color: var(--muted); padding: 0; margin-bottom: 2px; }
.field input[type="text"], .field select {
  font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); width: 100%;
}
.option { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-right: 14px; }
.option input { accent-color: var(--ink); }
.check { margin: 2px 0 4px; }
.benefits .primary-btn { justify-self: start; }
.benefits-status { font-size: 13px; color: var(--muted); min-height: 1.4em; }

.ask-panel {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  padding: 14px 16px; min-width: 0;
}
.ask-title { font-size: 15px; font-weight: 500; }
.ask-hint { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.thread { display: grid; gap: 8px; margin: 12px 0; max-height: 280px; overflow-y: auto; }
.thread:empty { display: none; }
.bubble { font-size: 14px; line-height: 1.55; padding: 8px 12px; border-radius: 10px; max-width: 92%; animation: line-in .3s var(--ease); }
.bubble-user { justify-self: end; background: var(--ink); color: var(--paper); }
.bubble-ai { justify-self: start; background: var(--card); border: 1px solid var(--line); }
.bubble-ai.is-searching { color: var(--muted); }
.bubble-ai.is-refusal { border-color: #e6c6b7; }
.chips-stack { margin-top: auto; padding-top: 10px; }
.ask-foot { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (min-width: 1450px) { .hero { padding-top: 86px; padding-bottom: 106px; } }

@media (max-width: 1000px) {
  .shell { width: calc(100% - 80px); }
  .hero h1 { font-size: 78px; }
  .about-grid { gap: 42px; }
  .about-grid h2 { font-size: 31px; }
  .project-title { font-size: 29px; }
  .project-notes { grid-template-columns: 1fr; gap: 30px; }
  .ask { grid-template-columns: 1fr; }
  .built-body section { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 48px); }
  .site-header { height: 82px; gap: 22px; }
  .site-header nav { gap: 22px; }
  .hero { padding-top: 52px; padding-bottom: 70px; }
  .hero h1 { font-size: 62px; }
  .hero-description { font-size: 17px; }
  .about-grid { grid-template-columns: 1fr; gap: 26px; }
  .about-grid h2 { font-size: 34px; }
  .project-head { gap: 18px; }
  .project-number { flex-basis: 18px; }
  .demo, .project-notes, .built { margin-left: 0; }
  .earlier-list { padding-left: 0; }
  .earlier-body { padding-right: 0; }
  .experience-description { padding-right: 60px; }
  .contact-section h2 { font-size: 50px; }
  .fill-grid { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .vision { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  html { scroll-padding-top: 20px; }
  .shell { width: calc(100% - 40px); }
  .site-header { height: 76px; gap: 16px; }
  .wordmark { font-size: 21px; }
  .site-header nav { gap: 18px; }
  .header-resume { display: none; }
  .hero { padding-top: 40px; padding-bottom: 60px; }
  .hello { gap: 13px; margin-bottom: 26px; }
  .avatar-frame { width: 58px; height: 58px; flex-basis: 58px; }
  .hero h1 { font-size: clamp(42px, 11vw, 54px); line-height: 1.08; }
  .hero-description { font-size: 16px; max-width: 340px; margin-top: 22px; }
  .hero-actions { gap: 22px; }
  .primary-link { padding: 12px 20px; gap: 18px; min-height: 46px; }
  .hero-location > span { margin: 0 5px; }
  .work-section { padding-top: 34px; padding-bottom: 50px; }
  .section-header h2 { font-size: 30px; }
  .project { padding-top: 30px; }
  .project-head { display: block; }
  .project-number { margin-bottom: 6px; }
  .project-title { font-size: 25px; }
  .project-lead { font-size: 15px; }
  .demo-bar { padding: 10px 12px; }
  .call, .tab-panel, .after-call { padding-left: 14px; padding-right: 14px; }
  .call-head { flex-direction: column; gap: 8px; }
  .line { grid-template-columns: 1fr; gap: 0; }
  .pipeline { grid-template-columns: 1fr; }
  .flow li { grid-template-columns: 1fr; gap: 2px; }
  .about-section { padding-top: 46px; padding-bottom: 46px; }
  .about-grid h2 { font-size: 30px; }
  .experience-block { margin-top: 42px; }
  .experience-item > summary { display: grid; grid-template-columns: minmax(0, 1fr) 14px; gap: 0 14px; padding: 18px 0; }
  .years { grid-row: 2; grid-column: 1; text-align: left; margin-top: 4px; }
  .experience-item > summary .expand-icon { grid-column: 2; grid-row: 1 / 3; margin: 0; align-self: center; }
  .experience-description { padding-right: 0; }
  .toolkit-grid { grid-template-columns: 1fr; gap: 18px; }
  .contact-section { padding-top: 50px; padding-bottom: 56px; }
  .contact-section h2 { font-size: 42px; letter-spacing: -1.4px; }
  .email-link { font-size: 17px; }
  .site-footer { min-height: 76px; }
}

@media (max-width: 360px) {
  .shell { width: calc(100% - 32px); }
  .site-header nav { gap: 14px; }
  .hero h1 { font-size: 39px; }
  .project-title { font-size: 23px; }
  .email-link { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html, .transcript { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-pending { opacity: 1; transform: none; }
  .wave.is-agent span, .wave.is-caller span { height: 14px; }
}
