@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --ink: #111110;
  --ink-soft: #1a1a19;
  --muted: #676762;
  --paper: #f6f5f0;
  --white: #ffffff;
  --line: #d9d8d1;
  --blue: #4f5fff;
  --blue-dark: #3443ed;
  --blue-soft: #e9ebff;
  --green: #21a36c;
  --red: #e96750;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { min-height: 100vh; margin: 0; background: var(--ink); color: var(--white); font-family: "Manrope", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; transform: translateY(-160%); padding: 10px 16px; border-radius: 8px; background: white; color: var(--ink); }
.skip-link:focus { transform: translateY(0); }

.demo-header { width: min(calc(100% - 48px), 1280px); min-height: 78px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid #30302e; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.03em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.header-tools { display: flex; align-items: center; gap: 18px; }
.back-link { color: #b7b7b1; font-size: 12px; font-weight: 600; }
.back-link:hover { color: white; }
.demo-badge { display: inline-flex; align-items: center; gap: 9px; color: #d4d4cf; font: 12px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .07em; }
.demo-badge i, .live-indicator i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(79, 95, 255, .12); }
.language-switch { display: flex; gap: 3px; padding: 3px; border: 1px solid #3a3a37; border-radius: 9px; background: #1b1b19; }
.language-button { min-width: 36px; padding: 6px 8px; border: 0; border-radius: 6px; background: transparent; color: #969691; cursor: pointer; font: 11px "DM Mono", Consolas, monospace; }
.language-button.active { background: var(--blue); color: white; }

.demo-shell { width: min(calc(100% - 48px), 1280px); margin: 0 auto; padding: clamp(40px, 5vw, 72px) 0 38px; }
.demo-intro { max-width: 870px; margin-bottom: 36px; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: #9b9b95; font: 12px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.eyebrow > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(79,95,255,.12); }
h1, h2, p { margin-top: 0; }
h1 { max-width: 850px; margin-bottom: 16px; font-size: clamp(38px, 5.3vw, 68px); line-height: 1.02; letter-spacing: -.06em; font-weight: 600; }
.demo-intro > p:last-child { max-width: 700px; margin-bottom: 0; color: #aaa9a3; font-size: 17px; line-height: 1.6; }

.demo-workspace { overflow: hidden; border: 1px solid #373735; border-radius: 28px; background: var(--paper); color: var(--ink); box-shadow: 0 36px 100px rgba(0, 0, 0, .35); }
.workspace-topbar { min-height: 56px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); background: #ebeae4; }
.window-dots { display: flex; gap: 7px; }
.window-dots span { width: 9px; height: 9px; border-radius: 50%; background: #c6c5bf; }
.workspace-label { color: #5c5c57; font: 11px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.live-indicator { justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: #64645f; font: 10px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; }
.live-indicator i { width: 6px; height: 6px; animation: pulse 2s ease-in-out infinite; }

.workspace-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 600px; }
.step-rail { display: flex; flex-direction: column; padding: 32px 22px 24px; border-right: 1px solid var(--line); background: #eeede7; }
.step-rail ol { margin: 0; padding: 0; list-style: none; }
.step-rail li { position: relative; padding-bottom: 12px; }
.step-rail li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 38px; bottom: -4px; border-left: 1px dashed #c7c6bf; }
.step-rail button { position: relative; z-index: 1; width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 11px; padding: 6px; border: 0; border-radius: 11px; background: transparent; color: #6b6b66; text-align: left; cursor: pointer; }
.step-rail button > span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #c8c7c0; border-radius: 9px; background: var(--paper); font: 10px "DM Mono", Consolas, monospace; }
.step-rail button strong { font-size: 12px; line-height: 1.3; font-weight: 600; }
.step-rail li.active button { background: white; color: var(--ink); box-shadow: 0 8px 24px rgba(17,17,16,.06); }
.step-rail li.active button > span { border-color: var(--blue); background: var(--blue); color: white; }
.step-rail li.complete button > span { border-color: #b4ddc9; background: #e4f5ec; color: var(--green); }
.fiction-note { margin: auto 3px 0; color: #797973; font-size: 11px; line-height: 1.5; }

.stage-wrap { min-width: 0; display: flex; flex-direction: column; background: var(--white); }
.stage { min-height: 520px; display: grid; padding: clamp(30px, 4vw, 58px); }
.scene { grid-area: 1 / 1; align-self: center; width: 100%; animation: scene-in .55s cubic-bezier(.22,.75,.25,1) both; }
.scene[hidden] { display: none; }
.scene-heading { max-width: 720px; margin-bottom: 28px; }
.scene-kicker { display: block; margin-bottom: 12px; color: var(--blue-dark); font: 11px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; }
.scene h2 { margin-bottom: 11px; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.045em; }
.scene-heading p { margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.message-card, .check-card, .reply-card, .photo-card, .record-card { border: 1px solid var(--line); border-radius: 20px; background: #faf9f6; }
.message-card { max-width: 720px; padding: 26px; }
.person-row { display: flex; align-items: center; gap: 13px; }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: white; font: 11px "DM Mono", Consolas, monospace; }
.person-row div { flex: 1; }
.person-row strong, .person-row small { display: block; }
.person-row strong { font-size: 14px; }
.person-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.person-row time { align-self: flex-start; color: #8a8a84; font: 10px "DM Mono", Consolas, monospace; }
.message-card blockquote { margin: 24px 0; padding: 23px 24px; border-left: 3px solid var(--blue); border-radius: 0 13px 13px 0; background: var(--blue-soft); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; letter-spacing: -.02em; }
.message-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.message-meta div { padding: 13px 15px; border: 1px solid #e3e2dc; border-radius: 11px; background: white; }
.message-meta dt, .message-meta dd { margin: 0; }
.message-meta dt { color: #777771; font-size: 11px; }
.message-meta dd { margin-top: 3px; font-size: 14px; font-weight: 650; }
.message-meta dd.missing { color: var(--red); }

.check-card { max-width: 760px; padding: 20px; }
.check-card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #575752; font-size: 12px; font-weight: 600; }
.check-card-title > span:first-child { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #feeae6; color: var(--red); font: 12px "DM Mono", Consolas, monospace; }
.check-card ul { margin: 0; padding: 0; list-style: none; }
.check-card li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 15px 4px; border-top: 1px solid #e0dfd8; }
.check-card li > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #d5d4cd; border-radius: 8px; color: #777771; font: 9px "DM Mono", Consolas, monospace; }
.check-card li strong { font-size: 14px; }
.check-card li i { padding: 5px 8px; border-radius: 999px; background: #f2e8e5; color: #a45143; font: normal 9px "DM Mono", Consolas, monospace; text-transform: uppercase; }

.reply-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(190px, .55fr); gap: 14px; max-width: 820px; }
.reply-card, .photo-card { padding: 22px; }
.person-row.compact { padding-bottom: 18px; border-bottom: 1px solid #e0dfd8; }
.answer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 18px; }
.answer-grid > span { min-height: 78px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px; border-radius: 12px; background: white; }
.answer-grid small { color: var(--muted); font-size: 10px; }
.answer-grid strong { font-size: 14px; }
.photo-card { display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: white; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.photo-grid span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 7px; background: linear-gradient(135deg, #383b5e, #21233a); color: #aeb3ff; font: 8px "DM Mono", Consolas, monospace; }
.photo-card p { margin: 25px 0 0; }
.photo-card p strong { display: block; color: #9fa7ff; font-size: 36px; line-height: 1; }
.photo-card p span { display: block; margin-top: 6px; color: #c0c0ba; font-size: 11px; }

.record-card { max-width: 850px; overflow: hidden; }
.record-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-bottom: 1px solid var(--line); background: var(--ink); color: white; }
.record-head small, .record-head strong { display: block; }
.record-head small { color: #aaa9a3; font-size: 10px; }
.record-head strong { margin-top: 3px; font-size: 17px; }
.record-head > span { padding: 7px 10px; border-radius: 999px; background: #174d37; color: #a8efca; font: 9px "DM Mono", Consolas, monospace; text-transform: uppercase; letter-spacing: .04em; }
.record-card dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.record-card dl > div { padding: 14px 20px; border-bottom: 1px solid #e1e0da; }
.record-card dl > div:nth-child(odd) { border-right: 1px solid #e1e0da; }
.record-card dl > div:nth-last-child(-n+2) { border-bottom: 0; }
.record-card dt { color: #777771; font-size: 10px; }
.record-card dd { margin: 3px 0 0; font-size: 13px; font-weight: 650; }
.record-card dd.ready-text { color: var(--green); }

.final-scene { max-width: 820px; margin: auto; text-align: center; }
.handoff-visual { display: flex; align-items: center; justify-content: center; margin: 0 auto 28px; }
.prepared-file { width: 88px; height: 106px; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px 15px; border: 1px solid #cfd2ff; border-radius: 15px; background: var(--blue-soft); transform: rotate(-3deg); box-shadow: 0 15px 40px rgba(79,95,255,.13); }
.prepared-file > span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: var(--blue); color: white; font-size: 14px; }
.prepared-file > i { height: 4px; border-radius: 999px; background: #bdc2ff; }
.prepared-file > i:last-child { width: 65%; }
.handoff-line { width: 90px; border-top: 1px dashed #9da1d9; }
.handoff-line i { display: block; width: 9px; height: 9px; margin: -5px auto 0; border-radius: 50%; background: var(--blue); animation: travel 2.2s ease-in-out infinite; }
.professional { width: 88px; height: 106px; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 17px; border-radius: 15px; background: var(--ink); transform: rotate(3deg); }
.professional span { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 50%; background: #2e2e2c; color: #aab0ff; font: 10px "DM Mono", Consolas, monospace; }
.professional i { width: 45px; height: 5px; border-radius: 999px; background: #444440; }
.professional i:last-child { width: 32px; }
.final-scene h2 { max-width: 700px; margin: 0 auto 9px; }
.human-message { margin-bottom: 16px; color: var(--blue-dark); font-size: clamp(20px, 2.2vw, 27px); font-weight: 650; letter-spacing: -.03em; }
.final-copy { max-width: 650px; margin: 0 auto; color: var(--muted); font-size: 14px; line-height: 1.6; }
.final-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 26px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 12px; font-size: 13px; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border: 1px solid #c8c7c0; background: white; color: var(--ink); }

.demo-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 24px; border-top: 1px solid var(--line); background: #f7f6f2; }
.progress-area { min-width: 190px; display: flex; align-items: center; gap: 13px; }
.progress-track { width: 145px; height: 4px; overflow: hidden; border-radius: 999px; background: #d7d6d0; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .2s linear; }
#step-counter { color: #686862; font: 10px "DM Mono", Consolas, monospace; }
.control-buttons { display: flex; align-items: center; gap: 8px; }
.icon-button, .text-button, .next-button { min-height: 42px; border-radius: 10px; cursor: pointer; }
.icon-button { width: 42px; display: grid; place-items: center; border: 1px solid #cecdc6; background: white; }
.pause-icon { width: 11px; height: 13px; border-left: 3px solid var(--ink); border-right: 3px solid var(--ink); }
.play-icon { width: 0; height: 0; margin-left: 2px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid var(--ink); }
.text-button, .next-button { display: inline-flex; align-items: center; gap: 10px; padding: 9px 15px; border: 1px solid #cecdc6; background: white; color: var(--ink); font-size: 12px; font-weight: 650; }
.text-button:disabled { opacity: .4; cursor: default; }
.next-button { min-width: 118px; justify-content: center; border-color: var(--ink); background: var(--ink); color: white; }
.demo-disclaimer { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 22px 0 0; color: #8f8f89; font: 10px "DM Mono", Consolas, monospace; text-align: center; }
.demo-disclaimer > span:first-child { color: var(--blue); }

@keyframes scene-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes travel { 0%, 100% { transform: translateX(-35px); } 50% { transform: translateX(35px); } }

:focus-visible { outline: 3px solid #8a94ff; outline-offset: 3px; }

@media (max-width: 850px) {
  .demo-header, .demo-shell { width: min(calc(100% - 32px), 1280px); }
  .workspace-body { grid-template-columns: 1fr; }
  .step-rail { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .step-rail ol { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .step-rail li { padding: 0; }
  .step-rail li::after, .step-rail button strong, .fiction-note { display: none; }
  .step-rail button { display: grid; place-items: center; padding: 4px; }
  .step-rail button > span { width: 100%; }
  .stage { min-height: 550px; }
}

@media (max-width: 620px) {
  .demo-header { min-height: 68px; }
  .demo-badge { font-size: 9px; }
  .brand > span:last-child { display: none; }
  .header-tools { gap: 10px; }
  .back-link { font-size: 10px; }
  .demo-badge { display: none; }
  .demo-shell { padding-top: 36px; }
  h1 { font-size: 40px; }
  .demo-intro > p:last-child { font-size: 15px; }
  .workspace-topbar { grid-template-columns: auto 1fr; padding: 0 16px; }
  .workspace-label { justify-self: end; font-size: 9px; }
  .live-indicator { display: none; }
  .stage { min-height: 590px; padding: 30px 20px; }
  .message-card { padding: 19px; }
  .message-meta, .answer-grid, .record-card dl { grid-template-columns: 1fr; }
  .reply-layout { grid-template-columns: 1fr; }
  .photo-card { flex-direction: row; align-items: center; gap: 16px; }
  .photo-grid { flex: 1; }
  .photo-card p { flex: 0 0 auto; margin: 0; }
  .check-card li { grid-template-columns: 30px 1fr; }
  .check-card li i { grid-column: 2; width: fit-content; margin-top: -8px; }
  .record-card dl > div, .record-card dl > div:nth-child(odd) { border-right: 0; border-bottom: 1px solid #e1e0da; }
  .record-card dl > div:last-child { border-bottom: 0; }
  .record-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .handoff-line { width: 55px; }
  .final-actions { align-items: stretch; flex-direction: column; }
  .demo-controls { align-items: stretch; flex-direction: column; padding: 16px; }
  .progress-area { width: 100%; }
  .progress-track { flex: 1; width: auto; }
  .control-buttons { display: grid; grid-template-columns: 42px 1fr 1.15fr; }
  .text-button, .next-button { min-width: 0; justify-content: center; padding: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
