/* OpsPromptAI site: the app replica (tour on the home page, mockups on Features).
   The --a-* tokens copy the product's canvas/index.html :root values verbatim. */
:root {
  --bezel: #1a2330;
  --a-accent: #2458c6;
  --a-link: #2458c6;
  --a-ink: #1b2027;
  --a-soft: #56606e;
  --a-paper: #eaedf1;
  --a-surface: #f4f5f7;
  --a-field: #ffffff;
  --a-line: #dce1e7;
  --a-bubble: #e3e7ed;
  --a-chip: #eaedf1;
  --a-stop: #b3261e;
  --a-good: #1f7a45;
  --appfont: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bezel: #05080c;
    --a-accent: #3569d4; --a-link: #7da7ea; --a-ink: #d4d9e0; --a-soft: #8e98a5; --a-paper: #0f1216;
    --a-surface: #171b21; --a-field: #1c2128; --a-line: #2a313a; --a-bubble: #252b34; --a-chip: #1f252d;
    --a-stop: #9d231c; --a-good: #4cb07a;
  }
}
:root[data-theme="dark"] {
  --bezel: #05080c;
  --a-accent: #3569d4; --a-link: #7da7ea; --a-ink: #d4d9e0; --a-soft: #8e98a5; --a-paper: #0f1216;
  --a-surface: #171b21; --a-field: #1c2128; --a-line: #2a313a; --a-bubble: #252b34; --a-chip: #1f252d;
  --a-stop: #9d231c; --a-good: #4cb07a;
}

/* ---------- iPad (portrait, 3:4) ---------- */
.phone { width: 540px; max-width: 100%; height: 720px; background: var(--bezel); border-radius: 34px; padding: 18px;
  box-shadow: 0 30px 60px -30px rgba(10, 25, 40, .45); position: relative; }
.phone::before { content: ""; position: absolute; top: 7px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #2c3645; }
.phone .inner { position: relative; width: 100%; height: 100%; border-radius: 18px; overflow: hidden; background: var(--a-surface); display: flex; flex-direction: column; }
.statusbar { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 6px 18px 2px; font-family: var(--appfont); font-size: 12px; font-weight: 600; color: var(--a-ink); }
.statusbar .ic { display: flex; gap: 6px; align-items: center; }
.statusbar svg { height: 11px; width: auto; fill: currentColor; }
.statusbar .dt { font-weight: 500; margin-left: 6px; }
.phone .transcript, .phone .gbody { padding-inline: 22px; }
.phone .apphdr { padding-inline: 18px; }
.phone .composer { padding-inline: 18px; }
.phone .vwrap { padding-inline: 22px; }
@media (max-width: 560px) {
  .phone { width: 100%; height: 620px; border-radius: 24px; padding: 11px; }
  .phone::before { top: 3px; width: 5px; height: 5px; }
  .phone .inner { border-radius: 14px; }
  .phone .transcript, .phone .gbody, .phone .vwrap { padding-inline: 14px; }
}

/* ---------- App replica (shared) ---------- */
.app { font-family: var(--appfont); color: var(--a-ink); font-size: 15px; line-height: 1.45; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--a-surface); }
.apphdr { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; border-bottom: 1px solid var(--a-line); background: var(--a-surface); }
.cmark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #2d4a2b; color: #f1e9d2; font-weight: 700; font-size: 15px; letter-spacing: -.02em; flex: 0 0 auto; }
.apphdr .ttl { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.apphdr .ttl b { font-size: 15px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apphdr .ttl span { font-size: 12.5px; color: var(--a-soft); }
.apphdr .acct { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--a-chip); display: grid; place-items: center; font-size: 12px; font-weight: 650; color: var(--a-soft); flex: 0 0 auto; }
.apphdr .back { border: none; background: none; color: var(--a-link); font-size: 26px; line-height: 1; padding: 0 4px 2px 0; cursor: default; }

.transcript { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; scrollbar-width: none; }
.transcript::-webkit-scrollbar { display: none; }
.msg { max-width: 100%; animation: rise .28s ease-out both; }
.msg.me { align-self: flex-end; max-width: 86%; }
.msg.me .pill { display: inline-block; background: var(--a-bubble); color: var(--a-ink); border-radius: 18px; padding: 8px 14px; }
.msg.bot .ans { margin: 0; }
.msg.bot .ans p { margin: 0 0 6px; }
.msg.bot a, .msg.bot .lnk { color: var(--a-link); text-decoration: underline; text-underline-offset: 2px; }
.typing { display: flex; gap: 5px; padding: 6px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-soft); opacity: .35; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* answer footer (canvas/index.html .opa-*) */
.foot { margin-top: 8px; font-size: 13px; }
.opa-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 10px; }
.opa-guide { display: inline-flex; flex-direction: column; gap: 2px; min-height: 48px; justify-content: center; max-width: 100%;
  padding: 8px 14px; border-radius: 12px; background: var(--a-accent); color: #fff; text-decoration: none; font-size: 12.5px; line-height: 1.3; }
.opa-guide b { font-size: 14px; font-weight: 650; }
.opa-rel { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; max-width: 100%; padding: 7px 13px 7px 10px;
  border-radius: 12px; border: 1px solid var(--a-line); background: var(--a-field); color: var(--a-ink); font-size: 12.5px; line-height: 1.3; }
.opa-rel svg { flex: 0 0 auto; color: var(--a-link); }
.opa-rel .t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.opa-rel b { font-size: 14px; font-weight: 650; color: var(--a-link); }
.opa-rel .t span { color: var(--a-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opa-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; color: var(--a-soft); }
.opa-sources .lbl { font-weight: 600; margin-right: 2px; }
.opa-src { display: inline-flex; align-items: center; max-width: 100%; border-radius: 999px; background: var(--a-chip); }
.opa-src .nm { display: inline-flex; align-items: center; gap: 5px; min-width: 0; padding: 4px 10px; color: var(--a-ink); }
.opa-src .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opa-src .nm svg { flex: 0 0 auto; opacity: .6; }
.opa-src .pg { padding: 4px 8px; border-left: 1px solid var(--a-line); color: var(--a-link); white-space: nowrap; }
.opa-tools { display: flex; align-items: center; gap: 0; margin: 2px 0 0 -12px; }
.opa-tool { display: inline-grid; place-items: center; width: 44px; height: 40px; color: var(--a-soft); }
.opa-tool svg { width: 18px; height: 18px; }
.folded { margin-top: 6px; font-size: 12.5px; color: var(--a-link); }

.composer { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 14px; background: var(--a-surface); border-top: 1px solid var(--a-line); }
.box { flex: 1 1 auto; min-height: 44px; border: 1px solid var(--a-line); background: var(--a-field); border-radius: 22px; padding: 10px 14px; font-size: 15px; color: var(--a-ink); overflow: hidden; }
.box .ph { color: var(--a-soft); }
.box .caret { display: inline-block; width: 1.5px; height: 1.05em; background: var(--a-accent); vertical-align: -2px; margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--a-accent); color: #fff; display: grid; place-items: center; }
.send svg { width: 18px; height: 18px; }

/* guided procedure (canvas/guide.html) */
.gbody { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.gprog { font-size: 12.5px; color: var(--a-soft); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.gstep { display: flex; flex-direction: column; gap: 14px; animation: rise .3s ease-out both; }
.stype { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--a-soft); }
.stext { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 0; }
.gbtns { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.gbtn { min-height: 52px; border-radius: 14px; border: 1px solid var(--a-line); background: var(--a-field); color: var(--a-ink); font-family: var(--appfont); font-size: 16px; font-weight: 600; }
.gbtn.primary { background: var(--a-accent); border-color: var(--a-accent); color: #fff; }
.gbtn.row { display: flex; gap: 10px; }
.gyn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gaux { display: flex; gap: 16px; font-size: 13.5px; color: var(--a-link); padding-top: 12px; border-top: 1px solid var(--a-line); }
.guide.stop, .guide.stop .apphdr { background: var(--a-stop); color: #fff; }
.guide.stop .apphdr { border-bottom-color: rgba(255,255,255,.25); }
.guide.stop .apphdr .ttl span, .guide.stop .gprog, .guide.stop .stype { color: #ffe3e3; }
.guide.stop .apphdr .back { color: #fff; }
.guide.stop .stext { font-size: 23px; }
.guide.stop .gbtn.primary { background: #fff; color: var(--a-stop); border: none; }
.guide.stop .gaux { color: #ffe3e3; border-top-color: rgba(255,255,255,.3); }
.outcome { border: 1px solid var(--a-line); background: var(--a-field); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.outcome h3 { margin: 0; font-size: 16px; }
.okline { color: var(--a-good); font-weight: 600; font-size: 14px; }

/* video (Stream) */
.vwrap { flex: 1 1 auto; min-height: 0; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px; background: var(--a-surface); }
.player { position: relative; border-radius: 12px; overflow: hidden; background: #0b0f14; aspect-ratio: 16 / 9; max-width: 100%; }
.player svg.poster { display: block; width: 100%; height: 100%; }
.player .big { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; transition: opacity .3s; }
.player .big svg { width: 22px; height: 22px; fill: #0b0f14; margin-left: 3px; }
.player.playing .big { opacity: 0; }
.player .bar { position: absolute; left: 10px; right: 10px; bottom: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.player .bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: #fff; width: 53.7%; }
.player .times { position: absolute; left: 10px; right: 10px; bottom: 6px; display: flex; justify-content: space-between; font-size: 11.5px; color: #fff; font-variant-numeric: tabular-nums; }
.vmeta b { display: block; font-size: 16px; }
.vmeta span { font-size: 13px; color: var(--a-soft); }
.vnote { font-size: 13px; color: var(--a-soft); margin: 0; }

/* ---------- Browser (curator pages) ---------- */
.browser { width: 100%; max-width: 780px; height: 600px; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -34px rgba(10, 25, 40, .45); display: flex; flex-direction: column; position: relative; }
.chrome { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ground); border-bottom: 1px solid var(--rule); }
.chrome .dots { display: flex; gap: 6px; }
.chrome .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--rule); }
.chrome .url { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 12.5px; color: var(--soft); background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bview { flex: 1 1 auto; min-height: 0; overflow-y: auto; font-size: 14.5px; }
.bview .apphdr { padding: 12px 18px; }
.bview .hnav { margin-left: auto; color: var(--a-link); font-size: 13.5px; white-space: nowrap; }
.bbody { padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.bcard { background: var(--a-field); border: 1px solid var(--a-line); border-radius: 12px; padding: 14px 16px; }
.bcard h3 { margin: 0 0 10px; font-size: 15px; font-weight: 650; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--a-field); border: 1px solid var(--a-line); border-radius: 12px; padding: 10px 12px; }
.tile .v { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile .k { font-size: 12.5px; color: var(--a-soft); }
.tscroll { overflow-x: auto; }
table.gaps { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
table.gaps th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--a-soft); padding: 4px 8px; border-bottom: 1px solid var(--a-line); }
table.gaps td { padding: 8px; border-bottom: 1px solid var(--a-line); vertical-align: top; }
table.gaps td.d { white-space: nowrap; color: var(--a-soft); font-variant-numeric: tabular-nums; }
table.gaps tr.fresh td { background: color-mix(in srgb, var(--amber) 16%, transparent); }
.stat { display: inline-block; border: 1px solid var(--a-line); border-radius: 7px; padding: 1px 8px; white-space: nowrap; font-size: 12.5px; }
.stat.auto { border-color: var(--a-good); color: var(--a-good); }
.ptabs { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--a-line); }
.ptab { font-weight: 600; font-size: 14px; color: var(--a-soft); padding: 8px 10px; border-bottom: 2px solid transparent; }
.ptab.on { color: var(--a-ink); border-bottom-color: var(--a-accent); }
.ptab .c { font-size: 11.5px; border: 1px solid var(--a-line); border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.ptabs .sp { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--a-line); background: var(--a-field); color: var(--a-ink); font-family: var(--appfont); font-size: 14px; font-weight: 600; }
.btn.primary { background: var(--a-accent); border-color: var(--a-accent); color: #fff; }
.idxnote { font-size: 12.5px; color: var(--a-soft); margin-right: 8px; }
.drop { border: 2px dashed var(--a-line); border-radius: 12px; padding: 18px; text-align: center; color: var(--a-soft); transition: border-color .2s, background .2s; }
.drop b { display: block; color: var(--a-ink); font-size: 15px; }
.drop.over { border-color: var(--a-accent); background: color-mix(in srgb, var(--a-accent) 8%, transparent); }
.fileflag { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 9px; background: var(--a-chip); color: var(--a-ink); font-size: 13.5px; animation: rise .35s ease-out both; }
.rev table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.rev th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--a-soft); padding: 4px 8px; border-bottom: 1px solid var(--a-line); }
.rev td { padding: 8px; border-bottom: 1px solid var(--a-line); }
.badge { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: color-mix(in srgb, var(--a-good) 16%, transparent); color: var(--a-good); }
.rev .act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.result { border-radius: 10px; padding: 10px 12px; font-size: 13.5px; background: color-mix(in srgb, var(--a-good) 12%, transparent); color: var(--a-ink); border: 1px solid color-mix(in srgb, var(--a-good) 40%, transparent); animation: rise .3s ease-out both; }

/* ---------- Touch + cursor ---------- */
.touch { position: absolute; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(36, 88, 198, .28); border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 2px 10px rgba(0,0,0,.25); pointer-events: none; z-index: 20; opacity: 0; transform: scale(.6); transition: opacity .18s, transform .18s; }
.touch.on { opacity: 1; transform: scale(1); }
.cursor { position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 20; left: 70%; top: 80%; transition: left .6s cubic-bezier(.3,.7,.3,1), top .6s cubic-bezier(.3,.7,.3,1); filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pressed { transform: scale(.96); filter: brightness(.95); transition: transform .12s; }
.device { transition: opacity .35s ease; }
.device.fade { opacity: 0; }

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