/* Additions for the live site: the DemoSage-connected assistants and demo video, form feedback and the
   cookie choice. Uses the design tokens from site.css (imported from the approved preview, unchanged). */
[hidden]{display:none!important}

/* demos added in DemoSage (demos-live.js): their card picture is a frame of the video */
.dc-thumb{position:relative;width:100%;max-width:520px;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:#0B1620;box-shadow:0 18px 40px rgba(15,30,43,.18)}
.dc-thumb video{width:100%;height:100%;object-fit:cover;display:block}
.dc-play{position:absolute;left:50%;top:50%;width:58px;height:58px;margin:-29px 0 0 -29px;border-radius:50%;background:var(--blue);display:grid;place-items:center;box-shadow:0 8px 24px rgba(17,146,238,.4)}
.dc-play svg{width:22px;height:22px;fill:#fff;margin-left:3px}
.dc-novid video{visibility:hidden}
.dc-desc{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;opacity:0}
.site-nav a[aria-current="page"]{color:var(--blue-d)}

/* demo video */
.dv{position:relative}
.dv video.demo{object-fit:contain}
.dv-miss{position:absolute;left:0;right:0;top:0;aspect-ratio:16/9;display:grid;place-content:center;gap:.4rem;padding:1.5rem;text-align:center;color:#fff;background:rgba(8,18,28,.88)}
.dv-miss[hidden]{display:none}
.dv-miss a{color:var(--green)}
.ch[aria-current="true"]{background:#1C2E3E;color:#fff}
.ch[aria-current="true"] span{color:var(--green)}

/* assistant */
.cb-busy .cb-in button[type=submit]{opacity:.55;cursor:default}
.cm.pending{opacity:.75;font-style:italic}
.cm.cb-warn{background:#FFF6E0;border-color:#F3E2B5;color:#5C4300}
.cb-typing{padding:.75rem .9rem}
.cb-dots{display:inline-flex;gap:4px}
.cb-dots i{width:7px;height:7px;border-radius:50%;background:var(--mute);opacity:.35;animation:cbdot 1.1s infinite}
.cb-dots i:nth-child(2){animation-delay:.18s}
.cb-dots i:nth-child(3){animation-delay:.36s}
@keyframes cbdot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:.9;transform:translateY(-3px)}}
.cb-srcs{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.6rem;white-space:normal}
.cb-lab{flex-basis:100%;font-size:.74rem;color:var(--mute);font-weight:600}
.cb-src{display:inline-flex;align-items:center;gap:.3rem;padding:.3rem .6rem;border:1px solid #CFE3F4;border-radius:999px;background:#F1F8FE;color:var(--blue-d);font:600 .78rem var(--display);cursor:pointer}
.cb-src:hover,.cb-src:focus-visible{background:var(--blue);border-color:var(--blue);color:#fff}
.cb-src svg{width:12px;height:12px;fill:currentColor}
.cb-stat{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin:.6rem 1rem 0;padding:.45rem .7rem;border-radius:10px;background:#F1F8FE;color:var(--blue-d);font-size:.82rem;font-weight:600}
.cb-stat[hidden]{display:none}
.cb-stat button{border:0;border-radius:999px;padding:.25rem .7rem;background:var(--ink);color:#fff;font:600 .78rem var(--display);cursor:pointer}
.cb-mic{width:44px;flex:none;border:1px solid #C9D5DF;border-radius:10px;background:#fff;color:var(--ink);display:grid;place-items:center;cursor:pointer}
.cb-mic[hidden]{display:none}
.cb-mic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.cb-mic:hover{border-color:var(--blue);color:var(--blue)}
.cb-mic.rec{background:#E5484D;border-color:#E5484D;color:#fff;animation:cbrec 1.4s infinite}
@keyframes cbrec{0%{box-shadow:0 0 0 0 rgba(229,72,77,.45)}100%{box-shadow:0 0 0 12px rgba(229,72,77,0)}}
.cb-mic:disabled{opacity:.5;cursor:default}
.cb-h span.cb-live{display:inline-flex;align-items:center;gap:.3rem}
/* Ask Constient AI panel: it has a fixed height, so when the "leave your details" form opens the conversation
   gives up room, and if it still does not fit the panel scrolls (the Send button was cut off) */
.aiw-panel .chatbox{overflow-y:auto}
.aiw-panel .cb-log{min-height:90px;flex:1 1 auto}
.aiw-panel .cb-lead{flex:none}
.cb-lead button[type=submit]{min-height:44px}
.chatbox.cb-ai .cb-av{position:relative}
.chatbox.cb-ai .cb-av::after{content:"";position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:var(--green);border:2px solid #fff}

/* "Have a problem you want measured?" card: email, phone and button sit at the right end of the card
   (two-column layout only; on phones the card stacks and they stay left-aligned under the heading) */
@media (min-width:901px){
  .cband .ways{justify-self:end;justify-items:end;text-align:right}
  .cband .ways a.btn{justify-self:end!important}
}

/* forms */
.form-err{margin:0;color:#B42318;font-weight:600;font-size:.9rem}

/* cookie choice (only when analytics is configured) */
.cookie-bar{position:fixed;left:16px;bottom:16px;z-index:70;max-width:520px;display:grid;gap:.8rem;padding:1rem 1.1rem;border-radius:var(--r2);background:#fff;border:1px solid var(--line);box-shadow:0 20px 50px rgba(15,30,43,.2)}
.cookie-bar p{margin:0;font-size:.9rem}
.cookie-bar div{display:flex;gap:.5rem;justify-content:flex-end}
.cookie-bar .btn{padding:.55rem 1rem;font-size:.9rem}
@media (max-width:600px){.cookie-bar{left:12px;right:12px;bottom:76px}}
@media (prefers-reduced-motion:reduce){.cb-dots i,.cb-mic.rec{animation:none}}

/* Phones: the sample-screen mockups (e.g. the four-column inventory on /quantum-safe/) may not push the page
   wider than the screen. Grid cells may shrink below their content and long labels wrap. */
@media (max-width:600px){
  .split{grid-template-columns:minmax(0,1fr)}
  .split>*,.mkwrap,.mkwrap>.mk{min-width:0;max-width:100%}
  .mk-row>*{min-width:0;overflow-wrap:anywhere}
  .mk-rows.wide4 .mk-row{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto minmax(0,1.2fr);gap:.35rem;padding:.5rem;font-size:.74rem}
  .mk-rows .pl{white-space:normal}
  /* The floating assistant button covered page buttons: a compact "Ask AI" pill (screen readers still hear
     the full "Ask Constient AI") */
  .aiw-btn{font-size:0;gap:.45rem;padding:.65rem .95rem}
  .aiw-btn::after{content:"Ask AI";font-size:.9rem}
  /* Long chapter lists would push the assistant a screen away from the video: they scroll in a short box */
  .dv-ch .chs{max-height:232px;overflow-y:auto;overscroll-behavior:contain;-webkit-mask-image:linear-gradient(#000 85%,transparent);mask-image:linear-gradient(#000 85%,transparent);padding-bottom:1.2rem}
}
