@font-face {
  font-family: "CK Space";
  src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #07111d;
  --panel: #0d1927;
  --panel-2: #101f30;
  --line: #253447;
  --text: #e9f1f5;
  --muted: #9bacbc;
  --cyan: #7af1d2;
  --blue: #70c8ff;
  --violet: #bd9aff;
  --orange: #ffc57b;
  --kimura-pink: #ff2da6;
  --kimura-graphite: #0b0b10;
  --kimura-line: #2a2832;
  --kimura-line-bright: #403b48;
  font-family: "CK Space", "Space Grotesk", Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 80% 8%, rgba(39, 80, 108, .18), transparent 38rem),
    radial-gradient(ellipse at 3% 48%, rgba(42, 91, 95, .12), transparent 34rem),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-header, main, footer { width: min(1340px, calc(100% - 72px)); margin: 0 auto; }
.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(141, 171, 191, .16);
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: -.03em; }
.wordmark-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(122,241,210,.58); color: var(--cyan); font: 600 12px/1 ui-monospace, monospace; letter-spacing: -.08em; }
.header-tag, .back-link { color: var(--muted); font: 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .09em; }
.header-tag { display: flex; align-items: center; gap: 9px; }
.status-dot, .rec-dot, .caption-live { display: inline-block; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px rgba(122,241,210,.7); }
.status-dot { width: 6px; height: 6px; }
.header-divider { color: #536577; }
.back-link { letter-spacing: .02em; transition: color .2s; }
.back-link:hover, .closing-strip a:hover { color: var(--cyan); }
.back-link span, .closing-strip a span { color: var(--cyan); }

.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr); align-items: center; gap: clamp(34px, 4vw, 58px); padding: 76px 0 88px; border-bottom: 1px solid var(--kimura-line); background: radial-gradient(circle at 78% 8%, rgba(255,45,166,.085), transparent 31rem), radial-gradient(circle at 12% 65%, rgba(88,220,239,.045), transparent 28rem); }
.hero::after { content: ""; position: absolute; z-index: -2; inset-block: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; background: radial-gradient(circle at 79% 8%, rgba(255,45,166,.08), transparent 34rem), #060608; }
.hero::before { content: ""; position: absolute; z-index: -1; inset-block: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 55%, transparent); mask-image: linear-gradient(90deg, transparent 6%, #000 55%, transparent); }
.hero-copy, .film-card { position: relative; z-index: 1; }
.hero-copy { padding: 0 0 8px 20px; }
.eyebrow { margin: 0 0 23px; color: #90a3b3; font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.eyebrow span { color: var(--cyan); margin-right: 10px; }
h1 { margin: 0; max-width: 510px; font-size: clamp(45px, 5.2vw, 76px); line-height: .99; font-weight: 500; letter-spacing: -.065em; }
.hero h1 { max-width: 620px; color: #f6f2f7; font-family: Inter, Arial, Helvetica, sans-serif; font-size: clamp(48px, 3.8vw, 58px); font-weight: 400; line-height: .94; letter-spacing: -.06em; text-transform: uppercase; }
.hero h1 .headline-line { color: #f6f2f7; }
.hero h1 .headline-accent { color: var(--kimura-pink); }
.hero .eyebrow { color: #aaa3ae; font-weight: 800; }
.hero .eyebrow span { color: var(--cyan); }
.intro { max-width: 420px; margin: 27px 0 33px; color: #a8b7c3; font-size: 15px; line-height: 1.75; }
.hero .intro { color: #bbb4c0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid rgba(137,169,190,.2); color: #b3c1cb; font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .07em; }
.hero .hero-meta span { border-color: var(--kimura-line); background: rgba(11,11,16,.55); color: #c6c0ca; }
.hero .hero-meta b { font-weight: inherit; }
.hero-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }

.film-card { min-width: 0; padding: 15px; border: 1px solid rgba(136,169,191,.23); background: rgba(10, 23, 36, .78); box-shadow: 0 28px 90px rgba(0,0,0,.26); }
.hero .film-card { border-color: var(--kimura-line-bright); background: linear-gradient(145deg, rgba(255,45,166,.07), transparent 42%), rgba(11,11,16,.96); box-shadow: 0 36px 90px rgba(0,0,0,.58); }
.hero .film-card::before { content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, var(--kimura-pink), var(--cyan) 57%, transparent); }
.film-topline, .film-controls { display: flex; align-items: center; justify-content: space-between; }
.film-topline { min-height: 28px; padding: 0 2px 11px; color: #9badbc; font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .085em; }
.film-topline > span:first-child { color: #c4d0d9; }
.film-topline i { color: #5c7081; font-style: normal; }
.hero .film-topline { min-height: 30px; flex-wrap: wrap; gap: 8px 16px; align-items: center; border-bottom: 1px solid var(--kimura-line); color: #aaa3ae; font-size: 8px; letter-spacing: .07em; }
.hero .film-topline > span:first-child { color: #f6f2f7; }
.film-brand, .film-route { display: inline-flex; align-items: center; gap: 8px; }
.film-brand-mark { display: inline-grid; place-items: center; width: 21px; height: 21px; border: 1px solid rgba(122,241,210,.68); color: var(--cyan); font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.07em; }
.film-brand i { color: var(--kimura-pink); font-style: normal; }
.hero .film-route { color: #aaa3ae; }
.hero .film-route i { color: var(--cyan); }
.rec-dot { width: 6px; height: 6px; margin-right: 7px; vertical-align: 1px; }
.hero .rec-dot { background: var(--kimura-pink); box-shadow: 0 0 10px rgba(255,45,166,.55); }
.film-frame { position: relative; overflow: hidden; background: #07111d; border: 1px solid rgba(140,171,192,.18); }
.hero .film-frame { border-color: var(--kimura-line-bright); background: #060608; }
.film-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #07111d; }
.hero .film-frame video { background: #060608; }
.video-caption { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: rgba(5, 13, 22, .84); color: #b6c5d0; font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .05em; pointer-events: none; }
.hero .video-caption { border: 1px solid var(--kimura-line-bright); background: rgba(11,11,16,.92); color: #c6c0ca; }
.caption-live { width: 5px; height: 5px; }
.film-controls { min-height: 42px; padding: 10px 1px 0; gap: 8px 14px; flex-wrap: wrap; }
.hero .film-controls { border-bottom: 1px solid var(--kimura-line); padding-bottom: 10px; }
.text-button, .download-button { border: 0; cursor: pointer; font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.text-button { padding: 8px 0; color: #b2c1cc; background: transparent; }
.text-button:hover { color: #fff; }
.hero .text-button { color: #c0bac5; }
.hero .text-button:hover { color: var(--kimura-pink); }
.voice-language-select { min-width: 122px; padding: 7px 9px; border: 1px solid rgba(140,171,192,.38); border-radius: 0; background: #07111d; color: #c9d6de; font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.hero .voice-language-select { border-color: var(--kimura-line-bright); background: var(--kimura-graphite); color: #eee9f0; }
.voice-language-select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hero .voice-language-select:focus-visible { outline-color: var(--kimura-pink); }
.replay-icon { margin-right: 5px; color: var(--cyan); font-size: 15px; vertical-align: -1px; }
.download-button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--cyan); color: #071a20; font-weight: 700; transition: background .2s, transform .2s; }
.download-button:hover { background: #a3ffe9; transform: translateY(-1px); }
.hero .download-button { background: var(--kimura-pink); color: #1b0412; }
.hero .download-button:hover { background: #ff61ba; }
.download-button > span:first-child { font-size: 14px; }
.video-generation-prompt { margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(140,171,192,.2); }
.video-generation-prompt summary { color: var(--cyan); cursor: pointer; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.video-prompt-body { padding-top: 7px; }
.video-prompt-note { margin: 0 0 7px; color: #8fa3b3; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.video-prompt-text { margin: 0 0 6px; color: #c9d6de; font-size: 12px; line-height: 1.55; }
.hero .video-generation-prompt { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--kimura-line); border-left: 2px solid var(--cyan); background: linear-gradient(90deg, rgba(88,220,239,.045), transparent 48%), var(--kimura-graphite); }
.hero .video-generation-prompt summary { color: var(--kimura-pink); font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.hero .video-prompt-note { color: #8f8795; }
.hero .video-prompt-text { color: #c6c0ca; }

.handoff-section { padding: 53px 0 74px; border-top: 1px solid rgba(141,171,191,.16); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 34px; }
.section-heading .eyebrow { margin-bottom: 12px; }
h2 { margin: 0; font-size: clamp(27px, 3.5vw, 42px); line-height: 1.1; font-weight: 500; letter-spacing: -.04em; }
.section-heading > p { max-width: 350px; margin: 0 5px 3px 0; color: #99aaba; font-size: 13px; line-height: 1.7; }
.handoff-rail { display: grid; grid-template-columns: 1fr 16px 1fr 16px 1fr 16px 1fr 16px 1fr; align-items: center; gap: 14px; }
.handoff-step { position: relative; min-height: 202px; padding: 21px 20px 18px; border: 1px solid rgba(140,171,192,.2); background: linear-gradient(155deg, rgba(18,34,50,.82), rgba(10,21,34,.54)); }
.step-index { position: absolute; top: 19px; right: 18px; color: #687e91; font: 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.step-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 21px; border: 1px solid rgba(122,241,210,.4); color: var(--cyan); font-size: 18px; }
.orchestrator-icon { color: var(--blue); border-color: rgba(112,200,255,.45); }
.specialist-icon { color: var(--violet); border-color: rgba(189,154,255,.45); }
.approval-icon { color: var(--orange); border-color: rgba(255,197,123,.45); }
.handoff-step h3 { margin: 0 0 8px; font-size: 15px; font-weight: 500; letter-spacing: -.02em; }
.handoff-step p { max-width: 205px; min-height: 38px; margin: 0 0 16px; color: #9caebb; font-size: 11px; line-height: 1.55; }
.step-tag { color: #7f96a8; font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.rail-arrow { color: var(--cyan); font: 18px/1 ui-monospace, monospace; text-align: center; }

.closing-strip { display: flex; align-items: center; gap: 16px; margin: 0 0 38px; padding: 20px 22px; border: 1px solid rgba(140,171,192,.19); background: rgba(13,25,39,.7); }
.closing-mark { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid rgba(122,241,210,.42); color: var(--cyan); font: 12px/1 ui-monospace, monospace; }
.closing-strip p { margin: 0; color: #a5b4bf; font-size: 11px; line-height: 1.55; }
.closing-strip strong { color: #e8f0f4; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .1em; }
.closing-strip a { margin-left: auto; color: #d3dee5; font-size: 11px; transition: color .2s; }
.closing-strip a span { margin-left: 7px; }
footer { display: flex; justify-content: space-between; padding: 16px 0 22px; border-top: 1px solid rgba(141,171,191,.16); color: #728596; font: 8px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
footer i { color: var(--cyan); font-style: normal; }

.render-stage { display: none; }
.render-mode, .render-mode body { width: 1280px; height: 720px; min-width: 1280px; min-height: 720px; overflow: hidden; }
.render-mode body { background: #07111d; }
.render-mode body > :not(.render-stage) { display: none !important; }
.render-mode .render-stage { display: block; position: fixed; inset: 0; width: 1280px; height: 720px; }
.render-mode #outputCanvas { display: block; width: 1280px; height: 720px; }
.render-mode #worldCanvas { display: none; }

@media (max-width: 980px) {
  .site-header, main, footer { width: min(100% - 44px, 760px); }
  .hero { grid-template-columns: 1fr; gap: 35px; padding: 61px 0 68px; }
  .hero-copy { padding-left: 0; }
  .intro { max-width: 570px; }
  .film-card { width: 100%; }
  .handoff-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .rail-arrow { display: none; }
}
@media (min-width: 981px) and (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 35px; padding: 61px 0 68px; }
  .hero-copy { padding-left: 0; }
  .hero .intro { max-width: 650px; }
}
@media (max-width: 600px) {
  .site-header, main, footer { width: calc(100% - 36px); }
  .site-header { height: 66px; }
  .header-tag { display: none; }
  .back-link { font-size: 9px; }
  .hero { gap: 27px; padding: 44px 0 50px; }
  h1 { font-size: clamp(44px, 14vw, 62px); }
  .hero h1 { font-size: clamp(39px, 11vw, 48px); }
  .intro { margin: 21px 0 24px; font-size: 14px; }
  .hero-meta { gap: 6px; }
  .hero-meta span { padding: 7px 8px; font-size: 8px; }
  .film-card { padding: 9px; }
  .film-topline { font-size: 8px; }
  .video-caption { top: 7px; right: 7px; padding: 6px; font-size: 7px; }
  .download-button { padding: 9px 8px; font-size: 9px; }
  .text-button { font-size: 9px; }
  .section-heading { display: block; margin-bottom: 24px; }
  .section-heading > p { margin-top: 14px; }
  .handoff-section { padding: 37px 0 48px; }
  .handoff-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .handoff-step { min-height: 190px; padding: 17px 13px 14px; }
  .step-index { top: 15px; right: 12px; }
  .handoff-step h3 { font-size: 13px; }
  .handoff-step p { font-size: 10px; }
  .step-icon { margin-bottom: 17px; }
  .closing-strip { align-items: flex-start; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .closing-strip a { flex: 1 0 calc(100% - 54px); margin: 3px 0 0 54px; font-size: 10px; }
  footer { font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.live-section { padding: 53px 0 64px; border-top: 1px solid rgba(141,171,191,.16); }
.live-card { padding: 15px; border: 1px solid rgba(136,169,191,.23); background: rgba(10, 23, 36, .78); box-shadow: 0 28px 90px rgba(0,0,0,.26); }
.live-stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hero-art, none) center / cover no-repeat, #07111d; border: 1px solid rgba(140,171,192,.18); }
.live-stage canvas { display: block; width: 100%; height: 100%; }
.live-placeholder { display: grid; place-items: center; height: 100%; color: var(--muted); font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.live-card { display: grid; gap: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat { display: flex; flex-direction: column; min-width: 0; border: 1px solid rgba(122,241,210,.35); background: linear-gradient(160deg, rgba(122,241,210,.08), rgba(6,16,27,.9) 40%); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(140,171,192,.2); }
.chat-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); color: #071a20; font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; box-shadow: 0 0 16px rgba(122,241,210,.5); }
.chat-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-who strong { color: var(--text); font-size: 14px; }
.chat-who span { color: var(--muted); font: 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.chat-who b { color: var(--cyan); font-weight: 700; }
.chat-langs { display: flex; flex: none; margin-left: auto; border: 1px solid rgba(140,171,192,.38); }
.chat-langs button { padding: 6px 7px; border: 0; background: transparent; color: #9fb1bf; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.chat-langs button[aria-pressed="true"] { background: var(--cyan); color: #071a20; }
.chat-langs button:hover:not([aria-pressed="true"]) { color: #fff; }
.chat-reset { margin-left: 6px; flex: none; padding: 7px 10px; border: 1px solid rgba(140,171,192,.38); background: transparent; color: #c9d6de; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; transition: border-color .2s, color .2s; }
.chat-reset:hover { border-color: var(--cyan); color: #fff; }
.chat-log { flex: 1; min-height: 220px; max-height: 340px; margin: 0; padding: 14px; overflow-y: auto; list-style: none; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.chat-msg { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; animation: chat-in .25s ease-out; }
.chat-msg p { margin: 0; }
.chat-msg small { display: block; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(140,171,192,.18); color: #9fb1bf; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.chat-bot { align-self: flex-start; border-bottom-left-radius: 4px; background: #12233a; color: var(--text); }
.chat-user { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--cyan); color: #071a20; font-weight: 600; }
.chat-mode { color: var(--violet); font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; letter-spacing: .03em; }
.chat-label { display: block; margin-bottom: 5px; color: #8fa3b3; font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.chat-gate { align-self: flex-start; border: 1px solid rgba(122,241,210,.32); border-bottom-left-radius: 4px; background: #0b1d2b; color: var(--text); }
.chat-hint { align-self: center; max-width: 100%; padding: 4px 0; color: var(--blue); font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; }
.chat-msg.is-typing p { color: var(--muted); font-style: italic; animation: chat-blink 1s ease-in-out infinite; }
.chat-pill { display: inline-block; margin-bottom: 6px; padding: 3px 7px; border-radius: 999px; font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; }
.chat-pill.is-allowed { background: rgba(63,240,176,.16); color: #5ff5bf; }
.chat-pill.is-denied { background: rgba(255,99,126,.16); color: #ff8aa0; }
.chat-pill.is-human { background: rgba(255,197,123,.16); color: var(--orange); }
.chat-pill.is-info { background: rgba(155,172,188,.16); color: #c3d0da; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 12px; }
.chat-suggest:empty { display: none; }
.chat-suggest button { padding: 8px 12px; border: 1px solid rgba(122,241,210,.45); border-radius: 999px; background: rgba(122,241,210,.07); color: #dff9f2; font: 13px/1.2 "CK Space", system-ui, sans-serif; cursor: pointer; transition: background .2s, border-color .2s; }
.chat-suggest button:hover { background: rgba(122,241,210,.2); border-color: var(--cyan); }
.chat-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(140,171,192,.2); }
.chat-form input { flex: 1; min-width: 0; padding: 13px 14px; border: 2px solid var(--cyan); border-radius: 10px; background: #06101b; color: var(--text); font: 16px/1.3 "CK Space", system-ui, sans-serif; }
.chat-form input::placeholder { color: #7f95a5; }
.chat-form input:focus { outline: none; box-shadow: 0 0 0 3px rgba(122,241,210,.3); }
.live-send { flex: none; padding: 0 18px; border: 0; border-radius: 10px; background: var(--cyan); color: #071a20; font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; transition: background .2s; }
.live-send:hover { background: #a3ffe9; }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes chat-blink { 50% { opacity: .45; } }
@media (min-width: 901px) {
  .live-card { grid-template-columns: minmax(340px, 400px) 1fr; align-items: stretch; }
  .chat { contain: size; }
  .chat-log { max-height: none; min-height: 0; }
}
@media (max-width: 600px) {
  .live-section { padding: 37px 0 44px; }
  .live-card { padding: 9px; gap: 10px; }
  .live-stage { order: -1; }
  .chat-log { min-height: 180px; max-height: 300px; }
  .chat-head, .chat-log, .chat-form { padding-left: 10px; padding-right: 10px; }
  .chat-head { flex-wrap: wrap; row-gap: 8px; }
  .chat-who { flex: 1 1 calc(100% - 50px); }
  .chat-suggest { padding: 0 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-msg, .chat-msg.is-typing p { animation: none; }
}

/* Try it yourself is the point of the page: it breaks out of the text column on every screen. */
.live-card { --live-w: min(1640px, calc(100vw - 48px)); width: var(--live-w); margin-left: calc((100% - var(--live-w)) / 2); }
@media (min-width: 901px) {
  /* The chat gets its own height instead of the stage's, so short stages (iPad landscape, laptops) never squeeze it. */
  .live-card { grid-template-columns: minmax(360px, 440px) 1fr; align-items: center; }
  .live-card:not(.is-max) .chat { height: clamp(520px, 74vh, 760px); }
}
/* Phones held upright keep the scene in view while chatting; held sideways it would cover the whole screen. */
@media (max-width: 600px) and (orientation: portrait) {
  .live-stage { position: sticky; top: 0; z-index: 2; }
}
/* Touch-sized header controls. */
.chat-langs button { min-width: 34px; min-height: 36px; }
.chat-reset { min-height: 36px; }
@media (min-width: 601px) and (max-width: 900px) {
  .live-card { --live-w: calc(100vw - 32px); }
  .live-stage { order: -1; }
  .chat-log { min-height: 300px; max-height: 46vh; }
}
@media (max-width: 600px) {
  .live-card { --live-w: calc(100vw - 12px); padding: 6px; }
  .chat-log { min-height: 260px; max-height: 52svh; }
  .chat-msg { max-width: 92%; }
}

/* Small screens: suggestions sit on one swipeable row so the conversation keeps its room. */
@media (max-width: 900px) {
  .chat-suggest, .live-card.is-max .chat-suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .chat-suggest::-webkit-scrollbar { display: none; }
  .chat-suggest button { flex: none; white-space: nowrap; scroll-snap-align: start; }
}
.live-card.is-max .chat-suggest { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.live-card.is-max .chat-suggest button { flex: none; white-space: nowrap; }

/* Full-window mode: CSS on every device (iPhone has no element fullscreen), the Fullscreen API on top where it exists. */
.chat-max { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-left: 2px; padding: 0; border: 1px solid rgba(140,171,192,.38); background: transparent; color: #c9d6de; cursor: pointer; transition: border-color .2s, color .2s; }
.chat-max:hover, .chat-max[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); }
.chat-max svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: square; }
.chat-max .i-close, .chat-max[aria-pressed="true"] .i-open { display: none; }
.chat-max[aria-pressed="true"] .i-close { display: inline; }
html.ck-max, html.ck-max body { overflow: hidden; overscroll-behavior: none; }
.live-card.is-max {
  width: auto; position: fixed; z-index: 1000; left: 0; right: 0; top: var(--max-top, 0); height: var(--max-h, 100dvh); margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  gap: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); background: #06101b; border: 0; box-shadow: none;
}
.live-card.is-max .live-stage { order: -1; position: relative; top: auto; width: min(100%, calc(var(--max-h, 100dvh) * .4 * 16 / 9)); margin: 0 auto; }
.live-card.is-max .chat { contain: none; min-height: 0; }
.live-card.is-max .chat-log { min-height: 0; max-height: none; }
/* Landscape screens: chat beside a stage that keeps 16:9 inside the window. Portrait tablets stack like phones. */
@media (orientation: landscape) and (min-width: 600px), (orientation: landscape) and (max-height: 600px) {
  .live-card.is-max { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); align-items: center; }
  .live-card.is-max .live-stage { order: 0; max-height: none; width: min(100%, calc((var(--max-h, 100dvh) - 16px) * 16 / 9)); }
  .live-card.is-max .chat { align-self: stretch; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .live-card.is-max { grid-template-columns: minmax(300px, 42%) minmax(0, 1fr); }
}
/* Short windows (phone landscape, or an open keyboard): a one-line header, a smaller stage, and no chips once it gets tight. */
.live-card.is-short .chat-head { flex-wrap: nowrap; padding-top: 5px; padding-bottom: 5px; }
.live-card.is-short .chat-avatar, .live-card.is-short .chat-who { display: none; }
.live-card.is-short .chat-langs { margin-left: 0; }
.live-card.is-short .chat-reset { margin-left: auto; }
.live-card.is-short .chat-form { padding-top: 8px; padding-bottom: 8px; }
.live-card.is-short .chat-form input { padding: 9px 12px; }
.live-card.is-short .chat-log { padding-top: 8px; padding-bottom: 8px; }
@media (orientation: portrait) {
  .live-card.is-short .live-stage { width: min(100%, calc(var(--max-h, 100dvh) * .28 * 16 / 9)); }
}
.live-card.is-tight .chat-suggest { display: none; }
/* Sideways phone with the keyboard up: no room for the scene, the chat takes the window until the keyboard closes. */
.live-card.is-max.is-squeezed { grid-template-columns: minmax(0, 1fr); }
.live-card.is-squeezed .live-stage, .live-card.is-squeezed .chat-suggest { display: none; }

/* Tabs inside "Try it yourself": the gate chat, browser simulation, and live test evidence. */
.live-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.live-tabs button { position: relative; isolation: isolate; min-width: 0; min-height: 48px; padding: 10px 16px; border: 1px solid rgba(140,171,192,.38); border-radius: 4px; background: rgba(13,25,39,.7); color: #c9d6de; font: 600 14px/1.25 "CK Space", system-ui, sans-serif; letter-spacing: 0; text-transform: none; cursor: pointer; transition: border-color .2s, color .2s, background .2s, box-shadow .2s; }
.live-tabs button::after {
  content: ""; position: absolute; z-index: 1; inset: -3px; pointer-events: none;
  background:
    linear-gradient(var(--tab-corner),var(--tab-corner)) left top/10px 2px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) left top/2px 10px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) right top/10px 2px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) right top/2px 10px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) left bottom/10px 2px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) left bottom/2px 10px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) right bottom/10px 2px,
    linear-gradient(var(--tab-corner),var(--tab-corner)) right bottom/2px 10px;
  background-repeat: no-repeat; opacity: .28; animation: none;
}
#tabGate { --tab-corner: var(--cyan); }
#tabDetect { --tab-corner: var(--orange); }
#tabLive { --tab-corner: var(--violet); }
/* Keep the earlier pilot cue, but make it slow and stop it when selected. */
#tabDetect:not([aria-selected="true"])::after { animation: tab-corners-pulse 2.6s ease-in-out infinite; }
@keyframes tab-corners-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .68; } }
.live-tabs button:hover { border-color: var(--cyan); background: rgba(122,241,210,.06); color: #fff; }
.live-tabs button[aria-selected="true"] { border-color: var(--cyan); border-bottom: 3px solid var(--cyan); background: rgba(122,241,210,.12); color: var(--cyan); }
.live-tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; z-index: 2; }
.live-tabs-help { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.live-card[hidden], .detect-card[hidden], .live-evidence-card[hidden] { display: none; }

.live-evidence-card { --live-w: min(1640px, calc(100vw - 48px)); width: var(--live-w); margin-left: calc((100% - var(--live-w)) / 2); padding: 18px; border: 1px solid rgba(189,154,255,.34); background: rgba(10,23,36,.88); }
.live-evidence-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.live-evidence-kicker { margin: 0 0 8px; color: var(--violet); font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.live-evidence-header h3 { margin: 0 0 7px; color: var(--text); font-size: 20px; }
.live-evidence-header p:not(.live-evidence-kicker) { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.live-evidence-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 260px; }
.live-evidence-actions a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px solid rgba(189,154,255,.45); background: rgba(189,154,255,.08); color: #e9deff; font-size: 12px; transition: background .2s, border-color .2s; }
.live-evidence-actions a:hover { border-color: var(--violet); background: rgba(189,154,255,.16); }
.live-evidence-launch { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 8px; padding: 18px; border: 1px solid rgba(140,171,192,.25); background: #0b1521; }
.live-evidence-launch p:not(.live-evidence-kicker) { max-width: 700px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.live-evidence-primary { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--violet); background: rgba(189,154,255,.14); color: #f2eaff; font-size: 13px; font-weight: 700; transition: background .2s, box-shadow .2s; }
.live-evidence-primary:hover { background: rgba(189,154,255,.24); box-shadow: 0 0 20px rgba(189,154,255,.16); }

/* Detection pilot: requests on the left, what the security team would see on the right. */
.detect-card { --live-w: min(1640px, calc(100vw - 48px)); width: var(--live-w); margin-left: calc((100% - var(--live-w)) / 2); display: grid; gap: 14px; padding: 15px; border: 1px solid rgba(136,169,191,.23); background: rgba(10, 23, 36, .78); }
.detect-side, .detect-main { min-width: 0; padding: 14px; border: 1px solid rgba(140,171,192,.2); background: #06101b; }
.detect-side { display: flex; flex-direction: column; gap: 10px; border-color: rgba(122,241,210,.35); }
.detect-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.detect-sessions { display: flex; border: 1px solid rgba(140,171,192,.38); }
.detect-sessions button { min-height: 36px; padding: 0 12px; border: 0; background: transparent; color: #9fb1bf; font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.detect-sessions button[aria-pressed="true"] { background: var(--cyan); color: #071a20; }
.detect-card .chat-langs { margin-left: 0; }
.detect-who { margin: 0; color: var(--muted); font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.detect-label { margin: 6px 0 0; color: #8fa3b3; font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; }
.detect-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.detect-chips button { padding: 8px 12px; border: 1px solid rgba(122,241,210,.45); border-radius: 999px; background: rgba(122,241,210,.07); color: #dff9f2; font: 13px/1.2 "CK Space", system-ui, sans-serif; text-align: left; cursor: pointer; transition: background .2s, border-color .2s; }
.detect-chips button:hover { background: rgba(122,241,210,.2); border-color: var(--cyan); }
#detectAbuse button { border-color: rgba(255,197,123,.5); background: rgba(255,197,123,.07); color: #ffe7c4; }
#detectAbuse button:hover { border-color: var(--orange); background: rgba(255,197,123,.18); }
.detect-form { padding: 4px 0 0; border: 0; }
.detect-reset { align-self: flex-start; margin: 0; }
.detect-main { display: flex; flex-direction: column; gap: 10px; }
.detect-summary { color: var(--text); font: 700 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.detect-summary:empty { display: none; }
.detect-checks, .detect-alerts, .detect-log, .detect-gaps { margin: 0; padding: 0; list-style: none; }
.detect-checks { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.detect-checks li { padding: 10px 12px; border: 1px solid rgba(122,241,210,.3); background: #0b1d2b; cursor: pointer; }
.detect-checks li.is-abuse { border-color: rgba(255,197,123,.4); }
.detect-checks li.is-unscored { border-color: rgba(140,171,192,.3); }
.detect-checks li.detect-empty, .detect-alerts li.detect-empty, .detect-log li.detect-empty { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: default; }
.detect-request { margin: 0 0 7px; color: var(--text); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.detect-request code { color: #8fa3b3; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.detect-truth { display: inline-block; margin-left: 8px; color: #8fa3b3; font: 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.detect-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.detect-pill { padding: 3px 8px; border-radius: 999px; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.detect-pill b { font-weight: 700; }
.detect-pill.is-good { background: rgba(63,240,176,.14); color: #5ff5bf; }
.detect-pill.is-bad { background: rgba(255,99,126,.16); color: #ff8aa0; }
.detect-pill.is-info { background: rgba(155,172,188,.16); color: #c3d0da; }
.detect-alerts { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow-y: auto; }
.detect-alert-head { margin: 0 0 4px; color: var(--orange); font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.detect-alert-facts { margin: 0; color: var(--text); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.detect-alerts details { margin-top: 6px; }
.detect-alerts summary { color: #8fa3b3; font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer; }
.detect-alerts li { padding: 10px 12px; border: 1px solid rgba(255,197,123,.45); background: rgba(255,197,123,.06); }
.detect-alerts pre, .detect-log pre, .detect-rule { margin: 0; color: #d3dee5; font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.detect-ref { margin-top: 8px; padding: 6px 0; border: 0; background: none; color: var(--orange); font: 700 11px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; text-align: left; cursor: pointer; }
.detect-ref:hover { color: #fff; }
.detect-log { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; scroll-behavior: smooth; }
.detect-log li { padding: 6px 8px; background: #0b1622; transition: background .3s; }
.detect-log li.is-tool-call pre { color: #cfe9ff; }
.detect-log li.is-focus { background: rgba(255,197,123,.16); }
.detect-notes { display: grid; gap: 12px; }
.detect-rule { padding: 10px 12px; border: 1px solid rgba(140,171,192,.2); background: #0b1622; }
.detect-gaps { display: flex; flex-direction: column; gap: 6px; }
.detect-gaps li { padding-left: 14px; color: #c3d0da; font-size: 13px; line-height: 1.5; text-indent: -14px; }
.detect-gaps li::before { content: "× "; color: var(--orange); }
@media (min-width: 901px) {
  .detect-card { grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); align-items: start; }
  .detect-side { position: sticky; top: 12px; }
}
@media (min-width: 1300px) {
  .detect-notes { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .detect-card, .live-evidence-card { --live-w: calc(100vw - 32px); }
  .live-evidence-header { flex-direction: column; }
  .live-evidence-actions { justify-content: flex-start; }
  .live-evidence-launch { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .detect-card, .live-evidence-card { --live-w: calc(100vw - 12px); padding: 8px; gap: 8px; }
  .detect-side, .detect-main { padding: 10px; }
  .live-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #tabLive { grid-column: 1 / -1; }
  .live-evidence-header { flex-direction: column; gap: 14px; }
  .live-evidence-header h3 { font-size: 18px; }
  .live-evidence-actions { justify-content: flex-start; min-width: 0; }
  .live-evidence-actions a { flex: 1 1 100%; }
  .live-evidence-launch { align-items: stretch; flex-direction: column; padding: 13px; }
  .live-evidence-primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .live-tabs button::after { animation: none !important; opacity: .28; }
}

.live-attention { animation: live-pulse 1.6s ease-in-out infinite; }
.live-attention:focus, .live-attention.is-used { animation: none; }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122,241,210,.0), 0 0 0 rgba(122,241,210,0); border-color: var(--cyan); }
  50% { box-shadow: 0 0 0 5px rgba(122,241,210,.22), 0 0 28px rgba(122,241,210,.55); border-color: #c4fff0; }
}
@media (prefers-reduced-motion: reduce) {
  .live-attention { animation: none; box-shadow: 0 0 0 4px rgba(122,241,210,.22); }
}
