/* ============================================================
   Kubrik Copilot pages (copilot.html, copilot-details.html)
   Layered on ../styles.css + product-page.css. Accent comes from
   <body style="--pos: var(--color-cop) …">.
   ============================================================ */

/* ---------- hero: assistant conversation ---------- */
.cp-hero { background:
  radial-gradient(ellipse 1100px 460px at 8% -18%, rgba(124,58,237,0.14), transparent 60%),
  radial-gradient(ellipse 800px 340px at 100% 115%, rgba(124,58,237,0.08), transparent 60%); }

.cp-scenes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cp-scenes button {
  font-family: var(--font); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text-body); display: inline-flex; gap: 6px; align-items: center;
}
.cp-scenes button .material-icons-outlined { font-size: 16px; }
.cp-scenes button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.cp-scenes button:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }

.cp-chat { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 54px rgba(31, 16, 64, 0.14); }
.cp-chat__bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; background: #1b1430; color: #ece6fb; font-size: 13px; font-weight: 600; }
.cp-chat__bar .material-icons-outlined { font-size: 17px; color: #c4b5fd; vertical-align: -3px; }
.cp-chat__where { font-family: var(--mono); font-size: 11px; color: #b9aedb; border: 1px solid #3b2f63; border-radius: 6px; padding: 2px 7px; }
.cp-chat__body { padding: 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; height: 420px; overflow: hidden; }
.cp-chat__body > * { flex: none; }
.cp-msg { max-width: 90%; border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.5; animation: pd-pop 0.4s var(--ease-out); }
.cp-msg--user { align-self: flex-end; background: var(--pos); color: #fff; border-bottom-right-radius: 4px; }
.cp-msg--bot { align-self: flex-start; background: #f5f3fb; color: var(--text-heading); border-bottom-left-radius: 4px; }
.cp-tools { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; animation: pd-pop 0.4s var(--ease-out); }
.cp-tool { font-family: var(--mono); font-size: 11.5px; padding: 4px 9px; border-radius: 6px; background: #efeafd; color: #4c1d95; border: 1px solid rgba(124,58,237,0.2); display: inline-flex; gap: 5px; align-items: center; }
.cp-tool::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; }
.cp-tool.is-done::before { background: #16a34a; }
.cp-prop { align-self: flex-start; width: min(100%, 420px); border: 1px solid var(--pos-line); border-radius: 12px; overflow: hidden; background: #fff; animation: pd-pop 0.4s var(--ease-out); }
.cp-prop__head { padding: 8px 12px; background: var(--pos-soft); font-size: 12px; font-weight: 700; color: var(--pos-deep); letter-spacing: 0.04em; text-transform: uppercase; display: flex; gap: 6px; align-items: center; }
.cp-prop__head .material-icons-outlined { font-size: 16px; }
.cp-prop__line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-heading); }
.cp-prop__line b { font-family: var(--mono); font-weight: 500; white-space: nowrap; }
.cp-prop__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); background: #fbfaff; flex-wrap: wrap; }
.cp-prop__note { font-size: 11.5px; color: var(--text-muted); }
.cp-prop__btn { font-family: var(--font); font-size: 12.5px; font-weight: 700; border-radius: 8px; padding: 6px 12px; background: var(--pos); color: #fff; border: 0; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.cp-prop__btn.is-press { transform: scale(0.94); box-shadow: 0 0 0 4px rgba(124,58,237,0.25); }
.cp-done { align-self: flex-start; display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 8px 12px; border-radius: 100px; animation: pd-pop 0.4s var(--ease-out); }
.cp-done .material-icons-outlined { font-size: 18px; }
.cp-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 14px; background: #f5f3fb; border-radius: 14px; }
.cp-typing i { width: 6px; height: 6px; border-radius: 50%; background: #a78bfa; animation: cp-bounce 1s infinite ease-in-out; }
.cp-typing i:nth-child(2) { animation-delay: 0.15s; }
.cp-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes cp-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-4px); opacity: 1; } }

/* ---------- where it lives ---------- */
.cp-where { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cp-where__card { border-radius: 16px; padding: 24px; display: grid; gap: 10px; align-content: start; min-width: 0; border: 1px solid var(--border); background: #fff; }
.cp-where__card--dark { background: #1b1430; border-color: #1b1430; color: #d9d1f2; }
.cp-where__card.cp-where__card--dark h3 { color: #fff; }
.cp-where__card.cp-where__card--dark p { color: #c8bfe6; }
.cp-where__tag { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pos); }
.cp-where__card.cp-where__card--dark .cp-where__tag { color: #c4b5fd; }
.cp-where__card h3 { font-size: 20px; line-height: 1.2; color: var(--text-heading); }
.cp-where__card p { font-size: 14.5px; line-height: 1.65; color: var(--text-body); }
.cp-kbd { font-family: var(--mono); font-size: 12px; border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px; opacity: 0.85; }

/* ---------- model router ---------- */
.cp-router { display: grid; gap: 12px; }
.cp-tier { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.cp-tier > * { min-width: 0; }
.cp-tier__name { font-weight: 700; color: var(--text-heading); font-size: 14px; }
.cp-tier__model { font-family: var(--mono); font-size: 12.5px; color: var(--pos-deep); }
.cp-tier__desc { font-size: 13px; color: var(--text-body); line-height: 1.5; }
.cp-tier.is-on { border-color: var(--pos); box-shadow: 0 8px 20px rgba(124,58,237,0.12); }
.cp-budget { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.cp-budget__row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-body); gap: 10px; }
.cp-budget__bar { height: 10px; border-radius: 6px; background: var(--pos-soft); overflow: hidden; position: relative; }
.cp-budget__bar span { position: absolute; inset: 0 auto 0 0; width: 62%; background: var(--pos); border-radius: 6px; transition: width 0.6s ease; }
.cp-budget__bar i { position: absolute; top: -3px; bottom: -3px; left: 80%; width: 2px; background: var(--warn); }

/* ---------- memory chips ---------- */
.cp-mem { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-mem span { font-size: 13px; padding: 6px 12px; border-radius: 100px; background: var(--pos-soft); color: var(--pos-deep); border: 1px solid var(--pos-line); }

/* ---------- MCP block ---------- */
.cp-mcp { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.cp-mcp > * { min-width: 0; }
.cp-mcp__spec { display: grid; gap: 0; border: 1px solid #3b2f63; border-radius: 14px; overflow: hidden; }
.cp-mcp__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 12px; padding: 12px 16px; border-top: 1px solid #2c2350; font-size: 13.5px; }
.cp-mcp__row:first-child { border-top: 0; }
.cp-mcp__row span:first-child { color: #a99fd0; }
.cp-mcp__row span:last-child { color: #fff; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .cp-where, .cp-mcp { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cp-chat__body { height: 460px; }
  .cp-tier { grid-template-columns: 1fr; }
  .cp-mcp__row { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .cp-msg, .cp-tools, .cp-prop, .cp-done { animation: none; }
  .cp-typing i { animation: none; }
}
