/* Scoped Codex-inspired homepage component. */
.ad-demo { --ad-bg:#171717; --ad-surface:#202020; --ad-line:#ffffff12; --ad-text:#e7e7e7; --ad-muted:#969696; --ad-blue:#84aff9; padding:12px 0 64px; }
.ad-heading { display:flex; justify-content:space-between; align-items:end; gap:24px; margin-bottom:28px; }
.ad-heading .eyebrow { margin-bottom:12px; }
.ad-heading .text-link { flex-shrink:0; white-space:nowrap; }
.ad-heading h2 { margin:0 0 12px; font-size:clamp(24px,2.8vw,32px); line-height:1.4; letter-spacing:-1px; }
.ad-heading h2 span { color:var(--accent,#a63e23); }
.ad-heading p:not(.eyebrow) { margin:0; color:#63665e; font-size:14px; }
.ad-studio { position:relative; isolation:isolate; overflow:hidden; border:1px solid #333; border-radius:14px; background:var(--ad-bg); color:var(--ad-text); box-shadow:0 24px 60px -32px #0005; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-size:13px; line-height:1.75; color-scheme:dark; }
.ad-studio *, .ad-studio *::before, .ad-studio *::after { box-sizing:border-box; }
.ad-studio [hidden] { display:none !important; }
.ad-studio button, .ad-studio select { font:inherit; }
.ad-studio button { cursor:pointer; }
.ad-studio button:focus-visible, .ad-studio select:focus-visible, .ad-studio [tabindex]:focus-visible { outline:2px solid var(--ad-blue); outline-offset:-3px; }
.ad-studio button:disabled { opacity:.45; cursor:default; }
.ad-topbar { display:flex; align-items:center; justify-content:space-between; gap:12px; height:54px; padding:0 20px; background:#1d1d1d; border-bottom:1px solid var(--ad-line); }
.ad-app-name { display:flex; align-items:center; gap:12px; font-size:12px; }
.ad-app-name strong { font-size:14px; font-weight:600; letter-spacing:-.3px; }
.ad-app-name > span:last-child { color:#c1c1c1; }
.ad-app-icon { display:grid; place-items:center; flex-shrink:0; width:25px; height:25px; border:1px solid #555; border-radius:8px; color:#fafafa; line-height:1; }
.ad-app-icon svg { display:block; width:19px; height:19px; }
.ad-slash { color:#5a5a5a; }
.ad-live { display:flex; align-items:center; gap:6px; color:#b1b1b1; font-size:10px; white-space:nowrap; }
.ad-live i { width:5px; height:5px; border-radius:50%; background:#9bd5b1; box-shadow:0 0 9px #9bd5b144; }
.ad-navigation { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; padding:0 18px; border-bottom:1px solid var(--ad-line); background:#1a1a1a; }
.ad-categories { display:flex; align-self:stretch; gap:5px; }
.ad-categories button { position:relative; display:flex; align-items:center; justify-content:center; gap:7px; padding:0 17px; border:0; border-bottom:2px solid transparent; background:transparent; color:#929292; font-size:12px; white-space:nowrap; }
.ad-categories button:hover { color:#ddd; background:#ffffff03; }
.ad-categories button[aria-pressed="true"] { color:#fafafa; border-bottom-color:#b8ccf4; background:#ffffff05; }
.ad-categories button > span:first-child { font-size:17px; }
.ad-category-progress { position:absolute; left:0; bottom:-2px; width:100%; height:2px; background:#7fa8ee; transform:scaleX(0); transform-origin:left; box-shadow:0 0 8px #7fa8ee66; }
.ad-example-picker { min-width:0; max-width:220px; }
.ad-example-picker select { width:100%; max-width:220px; padding:5px 24px 5px 10px; border:1px solid #3a3a3a; border-radius:6px; color:#bcbcbc; background:#242424; font-size:11px; }
.ad-mobile-switch { display:none; }
.ad-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,0fr); height:610px; transition:grid-template-columns .2s ease; }
.ad-demo[data-layout-mode="split"] .ad-layout { grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr); }
.ad-chat-panel, .ad-report-panel { position:relative; display:flex; flex-direction:column; min-width:0; min-height:0; }
.ad-chat-panel { grid-column:1; }
.ad-report-panel { grid-column:2; overflow:hidden; }
.ad-demo[data-layout-mode="split"] .ad-chat-panel { border-right:1px solid #333; }
.ad-panel-header { display:flex; flex:0 0 48px; align-items:center; justify-content:space-between; gap:10px; padding:0 18px; border-bottom:1px solid var(--ad-line); color:#bdbdbd; font-size:11px; }
.ad-thread-label { display:flex; gap:8px; min-width:0; align-items:center; }
.ad-thread-label > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-round { color:#777; white-space:nowrap; font:9px ui-monospace,monospace; }
.ad-chat-scroll { position:relative; flex:1; min-height:0; overflow:hidden; padding:26px 22px 24px; overscroll-behavior:auto; scrollbar-width:thin; scrollbar-color:#444 transparent; }
.ad-chat-content { max-width:780px; margin-inline:auto; }
.ad-demo[data-layout-mode="single"] .ad-composer-wrap { width:100%; max-width:816px; margin-inline:auto; }
.ad-chat-intro { position:absolute; inset:60px 10px auto; text-align:center; color:#7e7e7e; transition:opacity .25s; }
.ad-thread-glyph { width:44px; height:44px; margin:0 auto 12px; border-radius:12px; color:#d8d8d8; }
.ad-thread-glyph svg { width:30px; height:30px; }
.ad-chat-intro p { margin:8px 0 1px; font-size:15px; color:#c5c5c5; }
.ad-chat-intro small { font-size:11px; }
.ad-demo[data-phase="processing"] .ad-chat-intro, .ad-demo[data-phase="generating"] .ad-chat-intro, .ad-demo[data-phase="complete"] .ad-chat-intro { display:none; }
.ad-user-message { width:fit-content; max-width:95%; margin-left:auto; padding:13px 16px; border:1px solid #497aba20; border-radius:16px 16px 5px 16px; background:#1b3f72; color:#e4edfb; font-size:12px; line-height:1.85; overflow-wrap:anywhere; animation:ad-message-in .35s ease both; }
.ad-execution { margin:24px 0; color:#aaa; }
.ad-execution-label { display:flex; align-items:center; gap:8px; font-size:11px; }
.ad-status-dot { width:7px; height:7px; border:1px solid #83b1ff; border-radius:50%; box-shadow:0 0 10px #83b1ff30; animation:ad-pulse 1.4s ease-in-out infinite; }
.ad-execution ol { display:grid; gap:6px; list-style:none; padding:0 0 0 14px; margin:13px 0 0 3px; border-left:1px solid #363636; }
.ad-execution li { display:flex; gap:8px; align-items:baseline; color:#6e6e6e; font-size:10px; transition:color .25s; }
.ad-execution li::before { content:"○"; color:#5d5d5d; }
.ad-execution li.is-active { color:#d8d8d8; }
.ad-execution li.is-active::before { content:"◌"; color:#8cb4ff; }
.ad-execution li.is-done { color:#939393; }
.ad-execution li.is-done::before { content:"✓"; color:#9cc8ae; }
.ad-reply { padding-top:17px; border-top:1px solid var(--ad-line); }
.ad-reply-label { position:sticky; top:0; z-index:2; display:flex; align-items:center; gap:7px; margin-bottom:10px; padding-block:6px; background:var(--ad-bg); color:#ddd; font-size:11px; }
.ad-reply-label span { color:#eee; }
.ad-reply-icon { width:18px; height:18px; border:0; border-radius:0; }
.ad-reply-icon svg { width:16px; height:16px; }
.ad-inline-expand { margin-left:auto; }
.ad-inline-title { margin:18px 0; color:#eee; font-size:20px; line-height:1.5; overflow-wrap:anywhere; }
.ad-inline-document { font-size:13px !important; }
.ad-inline-document .ad-table { font-size:12px; }
.ad-inline-document .ad-table th { font-size:11px; }
.ad-reply > p { margin:0; font-size:12px; line-height:1.9; color:#cdcdcd; overflow-wrap:anywhere; }
.ad-artifact { display:flex; align-items:center; gap:11px; width:100%; margin-top:18px; padding:12px; border:1px solid #3c3c3c; border-radius:9px; background:#242424; color:#ccc; text-align:left; }
.ad-artifact:hover { border-color:#6480a6; background:#292929; }
.ad-file-icon { display:grid; place-items:center; flex:0 0 32px; height:36px; border:1px solid #52627b; border-radius:6px; color:#a4c5ff; font-size:21px; }
.ad-artifact > span:nth-child(2) { flex:1; min-width:0; }
.ad-artifact strong { display:block; font-size:11px; font-weight:500; line-height:1.65; }
.ad-artifact small { color:#898989; font-size:9px; }
.ad-composer-wrap { flex-shrink:0; padding:0 18px 14px; }
.ad-composer { position:relative; height:119px; overflow:hidden; padding:12px 14px; border:1px solid #414141; border-radius:13px; background:#252525; transition:border-color .3s,box-shadow .3s; }
.ad-demo[data-phase="typing"] .ad-composer { border-color:#6e8fbd; box-shadow:0 0 24px #639dff0a; }
.ad-composer p { max-height:66px; overflow:hidden; margin:0; font-size:11px; line-height:1.8; color:#ddd; scrollbar-width:none; overflow-wrap:anywhere; }
.ad-demo[data-phase="typing"] .ad-composer p::after { content:""; display:inline-block; width:2px; height:12px; margin-left:3px; vertical-align:-2px; background:#b7d0fa; animation:ad-blink 1s steps(1) infinite; }
.ad-placeholder { position:absolute; top:15px; left:14px; color:#777; font-size:11px; pointer-events:none; }
.ad-composer-bottom { position:absolute; inset:auto 11px 10px 13px; display:flex; align-items:center; gap:8px; }
.ad-skill { padding:2px 7px; border:1px solid #444; border-radius:5px; background:#2e2e2e; color:#b3c5e4; font-size:9px; }
.ad-skill span { margin-right:3px; }
.ad-composer-context { color:#747474; font-size:9px; }
.ad-send { display:grid; place-items:center; flex-shrink:0; width:28px; height:28px; margin-left:auto; padding:0; border:0; border-radius:50%; background:#e7e7e7; color:#242424; line-height:1; }
.ad-send svg { display:block; width:16px; height:16px; }
.ad-send:hover { background:white; }
.ad-composer-caption { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:7px; color:#777; font-size:9px; }
.ad-composer-caption button { border:0; padding:2px; color:#b5b5b5; background:transparent; font-size:9px; }
.ad-report-panel { background:#191919; }
.ad-report-file { display:flex; align-items:center; gap:7px; min-width:0; font-size:10px; }
.ad-report-file > span:last-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ad-report-file > span:first-child { color:#b3c7ec; }
.ad-expand { flex-shrink:0; padding:5px 8px; border:1px solid #454545; border-radius:6px; background:#2a2a2a; color:#c6c6c6; font-size:10px !important; }
.ad-expand:hover { background:#353535; }
.ad-report-scroll { flex:1; min-height:0; padding:26px 26px 36px; overflow:hidden; overscroll-behavior:auto; scrollbar-width:thin; scrollbar-color:#444 transparent; }
/* Wheel and touch scroll the homepage until the user explicitly opens the full text.
   Hidden overflow still permits the playback to follow generated content. */
.ad-demo[data-expanded="true"][data-category="batch"] .ad-report-scroll,
.ad-demo[data-expanded="true"]:not([data-category="batch"]) .ad-chat-scroll { overflow-y:auto; }
.ad-report-kicker { display:flex; align-items:center; gap:6px; margin-bottom:17px; color:#909090; font-size:9px; }
.ad-report-edition { margin-left:auto; color:#595959; font:8px ui-monospace,monospace; letter-spacing:.5px; }
.ad-report-indicator { width:4px; height:4px; border-radius:50%; background:#7b9bc3; }
.ad-demo[data-phase="generating"] .ad-report-indicator { box-shadow:0 0 10px #8fb5f8; animation:ad-pulse 1.2s infinite; }
.ad-report-title { margin:0 0 22px; font-size:22px; font-weight:550; line-height:1.5; letter-spacing:-.5px; color:#efefef; overflow-wrap:anywhere; }
.ad-document { color:#c4c4c4; font-size:11px; line-height:1.9; overflow-wrap:anywhere; }
.ad-document-placeholder { color:#696969; margin-top:72px !important; line-height:2.2; }
.ad-document p { margin:0 0 16px; }
.ad-document h4 { margin:24px 0 13px; padding-bottom:8px; border-bottom:1px solid var(--ad-line); font-size:13px; font-weight:550; letter-spacing:0; line-height:1.6; color:#e1e1e1; }
.ad-document ul { padding-left:18px; margin:0 0 17px; }
.ad-document li { margin:0 0 9px; }
.ad-document li::marker { color:#83a9dd; }
.ad-table-wrap { max-width:100%; margin:12px 0 20px; }
.ad-table { width:100%; table-layout:fixed; border-collapse:collapse; text-align:left; font-size:10px; line-height:1.85; }
.ad-table th { padding:8px 5px; border-bottom:1px solid #444; color:#bdbdbd; font-size:9px; font-weight:500; vertical-align:top; }
.ad-table td { padding:10px 5px; border-bottom:1px solid #ffffff09; vertical-align:top; color:#b8b8b8; overflow-wrap:anywhere; }
.ad-table th:first-child, .ad-table td:first-child { padding-left:0; }
.ad-table td:first-child { color:#d2d2d2; }
.ad-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:17px 0 20px; border-top:1px solid #343434; border-bottom:1px solid #343434; margin-bottom:20px; }
.ad-metric strong { display:block; font-size:26px; line-height:1.4; letter-spacing:-.6px; font-weight:500; color:#dde9fd; }
.ad-metric small { display:block; margin-top:3px; color:#8f99aa; font-size:9px; }
.ad-note { margin:16px 0 !important; padding:9px 0 9px 10px; border-left:2px solid #425a7c; color:#909aaa; font-size:10px; line-height:1.85; }
.ad-sources { display:grid; gap:12px; margin:12px 0 20px; padding:0; list-style:none; }
.ad-sources li { padding-left:11px; border-left:1px solid #48566b; margin:0; scroll-margin-top:20px; }
.ad-sources strong { display:block; color:#91b9f4; font-weight:400; font-size:10px; }
.ad-sources small { display:block; margin-top:2px; color:#888; font-size:9px; }
.ad-source-nav { display:inline-block; margin-top:10px; padding:0; border:0; background:transparent; color:#91b9f4; font-size:10px !important; }
.ad-report-end { display:flex; justify-content:space-between; gap:8px; padding-top:17px; margin-top:22px; border-top:1px solid #353535; color:#858585; font-size:9px; }
.ad-report-end > span:first-child { color:#a6c7b2; }
.ad-report-footer { display:flex; justify-content:space-between; flex:0 0 33px; align-items:center; gap:8px; padding:0 18px; border-top:1px solid var(--ad-line); color:#777; font-size:9px; }
.ad-report-footer > span:last-child { color:#626262; }
.ad-bottom-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; height:43px; padding:0 18px; border-top:1px solid #343434; background:#1d1d1d; color:#7d7d7d; font-size:9px; }
.ad-bottom-bar > div { display:flex; align-items:center; gap:15px; }
.ad-bottom-bar button { padding:3px 0; border:0; background:transparent; color:#bcbcbc; font-size:10px; }
.ad-bottom-bar button:hover { color:#fff; }
.ad-playback-mode { color:#8f9baa; font-size:9px; }
.ad-reveal { animation:ad-reveal .4s ease both; }
.ad-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.ad-demo[data-paused="true"] *, .ad-demo[data-suspended="true"] * { animation-play-state:paused !important; }
@keyframes ad-message-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes ad-reveal { from { opacity:0; transform:translateY(5px); filter:blur(2px); } to { opacity:1; transform:translateY(0); filter:blur(0); } }
@keyframes ad-blink { 50% { opacity:0; } }
@keyframes ad-pulse { 50% { opacity:.35; box-shadow:0 0 16px #83b1ff10; } }
@media (max-width:900px) {
  .ad-heading { flex-direction:column; align-items:start; gap:16px; }
  .ad-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .ad-navigation { padding-inline:12px; }
  .ad-categories button { padding-inline:12px; }
  .ad-chat-scroll { padding-inline:17px; }
  .ad-report-scroll { padding-inline:19px; }
  .ad-panel-header { padding-inline:13px; }
  .ad-report-title { font-size:19px; }
  .ad-report-edition { display:none; }
  .ad-round { display:none; }
}
@media (max-width:700px) {
  .ad-demo { padding-bottom:40px; }
  .ad-heading h2 { font-size:25px; }
  .ad-heading h2 span { display:block; }
  .ad-heading p:not(.eyebrow) { font-size:13px; }
  .ad-topbar { padding-inline:14px; height:48px; }
  .ad-app-name { gap:8px; }
  .ad-navigation { flex-direction:column; align-items:stretch; gap:9px; padding:0 12px 11px; }
  .ad-categories { height:49px; }
  .ad-categories button { flex:1; padding-inline:6px; font-size:11px; gap:5px; }
  .ad-example-picker, .ad-example-picker select { max-width:none; width:100%; }
  .ad-example-picker select { height:30px; }
  .ad-mobile-switch { display:flex; height:39px; padding-inline:14px; gap:18px; background:#191919; border-bottom:1px solid var(--ad-line); }
  .ad-mobile-switch button { display:flex; align-items:center; gap:6px; border:0; border-bottom:2px solid transparent; color:#777; background:transparent; font-size:11px; padding:0 5px; }
  .ad-mobile-switch button[aria-pressed="true"] { border-color:#9bb3d9; color:#ddd; }
  .ad-mobile-switch [data-report-dot].is-ready { width:4px; height:4px; border-radius:50%; background:#9bbff8; box-shadow:0 0 7px #9bbff855; }
  .ad-layout { display:block; height:565px; transition:none; }
  .ad-chat-panel, .ad-report-panel { height:100%; border-right:0; }
  .ad-demo[data-layout-mode="split"] .ad-chat-panel { border-right:0; }
  .ad-layout[data-view="chat"] .ad-report-panel { display:none; }
  .ad-layout[data-view="report"] .ad-chat-panel { display:none; }
  .ad-report-scroll { padding:21px 19px 30px; }
  .ad-chat-scroll { padding:23px 18px; }
  .ad-composer-wrap { padding-inline:14px; }
  .ad-user-message { font-size:11px; }
  .ad-reply > p { font-size:11px; }
  .ad-inline-document { font-size:12px !important; }
  .ad-inline-document .ad-table { font-size:11px; }
  .ad-inline-document .ad-table th { font-size:10px; }
  .ad-panel-header { padding-inline:14px; }
  .ad-report-title { font-size:21px; }
  .ad-metric strong { font-size:24px; }
  .ad-bottom-bar { padding-inline:14px; }
  .ad-bottom-detail, .ad-playback-mode { display:none; }
  .ad-bottom-bar > div { gap:12px; }
}
@media (prefers-reduced-motion:reduce) {
  .ad-demo *, .ad-demo *::before, .ad-demo *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
}
