/* ============================================================
   PRAXIS AI — Interactive overlays (demo call + sample brief)
   ============================================================ */

.overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 28px;
  background: rgba(11, 29, 58, 0.80);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease;
}
.overlay.open { display: flex; opacity: 1; }
.overlay .modal {
  transform: translateY(14px) scale(.985);
  transition: transform .32s cubic-bezier(.16,.8,.3,1);
}
.overlay.open .modal { transform: none; }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255,255,255,.10); color: #fff;
  display: grid; place-items: center;
  transition: background .2s;
}
.modal-close:hover { background: rgba(255,255,255,.2); }
.modal-close.on-light { background: var(--snow); color: var(--slate-blue); }
.modal-close.on-light:hover { background: var(--icy-soft); }

/* ---------- Demo call modal ---------- */
.call-modal {
  position: relative;
  width: 420px; max-width: 100%;
  background: linear-gradient(180deg, #0c2243 0%, #0B1D3A 100%);
  border-radius: 32px;
  padding: 34px 30px 30px;
  color: #fff;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.call-modal::before {
  content: ""; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214,230,245,.16) 0%, transparent 70%);
  pointer-events: none;
}
.call-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.call-head .logo .name { color: #fff; font-size: 18px; }
.call-head .logo .mark { width: 22px; height: 22px; }
.call-status { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--icy); display: inline-flex; align-items: center; gap: 7px; }
.call-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(79,138,115,.6); animation: pulse 1.8s infinite; }

.call-stage { text-align: center; padding: 8px 0 6px; min-height: 280px; display: flex; flex-direction: column; }

/* Idle / ready screen */
.call-orb {
  width: 132px; height: 132px; border-radius: 50%; margin: 12px auto 22px;
  background: radial-gradient(circle at 50% 38%, #20467a 0%, #112c52 60%, #0c2348 100%);
  display: grid; place-items: center; position: relative;
  box-shadow: inset 0 2px 18px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.3);
}
.call-orb::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 1px solid rgba(214,230,245,.18);
  animation: ring 3s ease-out infinite;
}
@keyframes ring { 0%{transform:scale(.9);opacity:.7;} 100%{transform:scale(1.25);opacity:0;} }
.call-orb svg { width: 46px; height: 46px; color: var(--icy); }
.call-orb.listening { animation: orbpulse 1.6s ease-in-out infinite; }
@keyframes orbpulse { 0%,100%{ box-shadow: inset 0 2px 18px rgba(0,0,0,.4), 0 0 0 0 rgba(214,230,245,.0);} 50%{ box-shadow: inset 0 2px 18px rgba(0,0,0,.4), 0 0 0 14px rgba(214,230,245,.06);} }

.call-title { font-family: var(--serif); font-size: 26px; font-weight: 600; color: #fff; margin: 0 0 8px; }
.call-sub { font-size: 14px; color: rgba(255,255,255,.6); line-height: 1.55; margin: 0 auto; max-width: 300px; }

/* Active call */
.call-topic { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--icy); opacity: .8; margin-bottom: 14px; }
.call-q { font-family: var(--serif); font-size: 23px; line-height: 1.28; color: #fff; min-height: 88px; display: flex; align-items: center; justify-content: center; padding: 0 6px; }
.call-progress { display: flex; gap: 6px; justify-content: center; margin: 18px 0 18px; }
.call-progress .pdot { width: 26px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.16); transition: background .4s ease; }
.call-progress .pdot.done { background: var(--icy); }
.call-progress .pdot.active { background: var(--green); }

.call-wave { display: flex; align-items: center; justify-content: center; gap: 3px; height: 40px; margin: 8px 0 6px; }
.call-wave .bar { width: 3px; border-radius: 3px; background: linear-gradient(180deg, var(--icy), #6f97c6); }
.call-wave.idle .bar { height: 4px !important; animation: none; background: rgba(255,255,255,.2); }

.call-transcript {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 11px 14px; margin: 4px 0 0;
  font-size: 12.5px; color: rgba(255,255,255,.62); line-height: 1.45; text-align: left;
  min-height: 40px;
}
.call-transcript .who { color: var(--icy); font-weight: 600; }

.call-controls { display: flex; gap: 12px; margin-top: auto; padding-top: 22px; }
.call-controls .cbtn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: background .2s, transform .15s;
}
.call-controls .cbtn:active { transform: translateY(1px); }
.cbtn.primary { background: var(--green); color: #fff; }
.cbtn.primary:hover { background: #5b9b82; }
.cbtn.ghost { background: rgba(255,255,255,.1); color: #fff; }
.cbtn.ghost:hover { background: rgba(255,255,255,.18); }
.cbtn.end { background: var(--red); color: #fff; }
.cbtn.end:hover { background: #c85553; }
.cbtn.full { flex: 1; }

/* generating */
.gen-spinner { width: 54px; height: 54px; margin: 18px auto 20px; position: relative; }
.gen-spinner::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--icy); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.gen-steps { list-style: none; padding: 0; margin: 18px auto 0; max-width: 280px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.gen-steps li { font-size: 13px; color: rgba(255,255,255,.5); display: flex; align-items: center; gap: 10px; transition: color .3s; }
.gen-steps li .gk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.25); display: grid; place-items: center; flex: none; }
.gen-steps li.done { color: var(--icy); }
.gen-steps li.done .gk { background: var(--green); border-color: var(--green); }
.gen-steps li.done .gk svg { width: 10px; height: 10px; color: #fff; }

/* result mini brief inside call */
.call-result { text-align: left; }
.call-result .cr-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.call-result .cr-av { width: 42px; height: 42px; border-radius: 50%; background: rgba(214,230,245,.16); display: grid; place-items: center; color: var(--icy); font-family: var(--serif); font-size: 18px; flex: none; }
.call-result .cr-nm { font-family: var(--serif); font-size: 20px; color: #fff; }
.call-result .cr-vt { font-size: 12px; color: rgba(255,255,255,.55); }
.call-result .cr-sec { background: rgba(255,255,255,.05); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.call-result .cr-lbl { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--icy); opacity: .8; margin-bottom: 9px; }
.call-result .cr-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.call-result .cr-sec li { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.4; display: flex; gap: 8px; }
.call-result .cr-sec li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--icy); margin-top: 7px; flex: none; }

/* ---------- Sample brief modal ---------- */
.brief-modal { position: relative; width: 920px; max-width: 100%; max-height: 88vh; overflow: auto; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-xl); }
.brief-modal .modal-close { background: var(--snow); color: var(--slate-blue); }
.brief-modal .modal-close:hover { background: var(--icy-soft); }

/* toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 13px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  z-index: 300; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  display: inline-flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .tk { color: var(--green); display: inline-flex; }

/* ============================================================
   DETAILED PROVIDER BRIEF CARD (in-page)
   ============================================================ */
.brief2 {
  background: #fff;
  border: 1px solid #E2EAF2;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 660px;
  max-width: 100%;
}
.brief2-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px; background: #F7FAFC; border-bottom: 1px solid #E2EAF2;
  flex: none;
}
.brief2-bar .logo .name { font-size: 14px; color: var(--navy); }
.brief2-bar .logo .mark { width: 24px; height: 24px; }
.b2-status {
  background: var(--green); color: #fff; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}

.brief2-scroll { flex: 1; overflow-y: auto; padding: 0 22px; }
.brief2-scroll::-webkit-scrollbar { width: 10px; }
.brief2-scroll::-webkit-scrollbar-track { background: #F7FAFC; }
.brief2-scroll::-webkit-scrollbar-thumb { background: #cbd8e6; border-radius: 6px; border: 2px solid #F7FAFC; }
.brief2-scroll::-webkit-scrollbar-thumb:hover { background: #b4c4d6; }
.brief2-scroll { scrollbar-width: thin; scrollbar-color: #cbd8e6 #F7FAFC; }

.brief2-client {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 0 20px; border-bottom: 1px solid #E2EAF2;
}
.b2-av {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: var(--icy); color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; font-weight: 600;
}
.b2-id { min-width: 0; }
.b2-nm { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.b2-vt { font-size: 12.5px; color: var(--slate); margin-top: 3px; }
.b2-stats { margin-left: auto; display: flex; gap: 26px; text-align: right; flex: none; }
.b2-slbl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-200); }
.b2-sval { font-size: 14px; font-weight: 600; color: var(--navy); margin-top: 2px; }

.b2-sec { padding: 20px 0; border-bottom: 1px solid #E2EAF2; }
.b2-sec:last-child { border-bottom: none; }
.b2-lbl {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 13px;
}
.b2-num { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: none; }
.b2-num li { display: flex; gap: 12px; font-size: 14px; color: var(--slate-blue); line-height: 1.45; }
.b2-ix { font-weight: 700; color: var(--navy); flex: none; min-width: 14px; font-variant-numeric: tabular-nums; }
.b2-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.b2-bullets li { position: relative; padding-left: 18px; font-size: 14px; color: var(--slate-blue); line-height: 1.5; }
.b2-bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--slate-200); }
.b2-quotes li { color: var(--slate-blue); font-style: italic; }

/* Status snapshot — primary value proof */
.b2-snap { border: 1px solid #E2EAF2; border-radius: 10px; overflow: hidden; }
.b2-row { display: flex; gap: 16px; padding: 11px 14px; align-items: baseline; }
.b2-row:nth-child(odd) { background: #fff; }
.b2-row:nth-child(even) { background: #F7FAFC; }
.b2-row + .b2-row { border-top: 1px solid #E2EAF2; }
.b2-k { font-size: 13px; font-weight: 600; color: var(--navy); flex: none; width: 138px; }
.b2-v { font-size: 13px; color: var(--slate-blue); line-height: 1.5; flex: 1; }

.b2-redflag { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; color: var(--green); }
.b2-check { width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.b2-check svg { width: 12px; height: 12px; }
.b2-sub { font-size: 12px; color: var(--slate); margin: 8px 0 0; line-height: 1.5; }

.b2-focus { border-left: 3px solid var(--icy); padding-left: 16px; margin-left: -16px; }

.brief2-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 22px; background: #F7FAFC; border-top: 1px solid #E2EAF2; flex: none;
}
.b2-links { display: flex; gap: 18px; flex-wrap: wrap; }
.b2-links span { font-size: 13px; color: var(--slate); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.b2-links span:hover { color: var(--navy); }
.brief2-disclaimer { font-size: 12px; color: var(--slate); font-style: italic; margin: 16px 0 0; line-height: 1.5; }

/* ============================================================
   DEMO OPT-IN MODAL
   ============================================================ */
.optin {
  position: relative;
  width: 480px; max-width: 100%;
  background: #fff; border-radius: 32px;
  padding: 38px 34px 30px;
  box-shadow: 0 24px 64px rgba(11, 29, 58, 0.20);
}
.optin-close {
  position: absolute; top: 20px; right: 20px;
  width: 34px; height: 34px; border: none; cursor: pointer;
  background: transparent; color: var(--navy);
  display: grid; place-items: center; border-radius: 50%;
  transition: background .2s;
}
.optin-close:hover { background: var(--snow); }

.optin-state { display: block; }
.optin-state[hidden] { display: none; }
.optin-state.fade-out { opacity: 0; transition: opacity .2s ease; }
#optin-confirm-state { opacity: 0; }
#optin-confirm-state.fade-in { opacity: 1; transition: opacity .2s ease; }
#optin-confirm-state { text-align: center; }

.optin-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--icy); color: var(--navy);
  display: grid; place-items: center; margin-bottom: 18px;
}
#optin-confirm-state .optin-icon { margin: 0 auto 18px; }
.optin-icon--green { background: var(--green); color: #fff; }

.optin-title { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--navy); line-height: 1.15; margin: 0; }
.optin-body { font-size: 15px; color: var(--slate-blue); line-height: 1.5; margin: 12px 0 22px; }

.optin-fields { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; }
.field input, .field select {
  width: 100%; height: 48px; border: 1px solid #CBD5E0; border-radius: 8px;
  padding: 0 14px; font-family: var(--sans); font-size: 14px; color: var(--navy);
  background: #fff; transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder { color: var(--slate); }
.field input:focus, .field select:focus {
  outline: none; border-color: var(--slate-blue);
  box-shadow: 0 0 0 3px rgba(52, 64, 85, .12);
}
.field input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,74,72,.12); }
.select-wrap select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,74,72,.12); }
.select-wrap { position: relative; }
.select-wrap select { color: var(--navy); padding-right: 40px; }
.select-wrap select:invalid { color: var(--slate); }
.select-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--slate); pointer-events: none; }
.field-help { font-size: 12px; color: var(--slate); margin: 7px 0 0; }
.field-error { font-size: 12px; color: var(--red); margin: 7px 0 0; display: none; }
.field-error.show { display: block; }

.optin-submit {
  width: 100%; height: 52px; margin-top: 4px;
  background: var(--navy); color: #fff; border: none; border-radius: 10px;
  font-family: var(--sans); font-size: 16px; font-weight: 500; cursor: pointer;
  transition: opacity .2s, background .2s;
}
.optin-submit:hover:not(:disabled) { background: var(--navy-700); }
.optin-submit:disabled { opacity: .5; cursor: not-allowed; }
.optin-disclaimer { font-size: 11px; color: var(--slate); text-align: center; margin: 16px 0 0; line-height: 1.5; }

/* Confirmation state */
.optin-number { font-size: 40px; font-weight: 700; color: var(--navy); margin: 6px 0 0; letter-spacing: -0.01em; }
.optin-number-sub { font-size: 14px; color: var(--slate); margin: 10px 0 0; }
.optin-divider { height: 1px; background: #E2EAF2; margin: 24px 0; }
.optin-email-confirm { font-size: 14px; color: var(--slate); margin: 0; }
.optin-email-confirm strong { color: var(--navy); font-weight: 600; }
.optin-info {
  background: var(--icy); color: var(--slate-blue); font-size: 13px; line-height: 1.55;
  padding: 16px; border-radius: 12px; margin: 20px 0 0; text-align: left;
}
.optin-close-btn {
  width: 100%; height: 48px; margin-top: 20px;
  background: #fff; color: var(--navy); border: 1px solid var(--navy); border-radius: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .2s;
}
.optin-close-btn:hover { background: var(--snow); }

@media (max-width: 520px) {
  .overlay { padding: 0; align-items: flex-start; }
  .optin { border-radius: 22px; margin: 32px 16px; width: calc(100% - 32px); padding: 32px 22px 26px; }
  .optin-number { font-size: 34px; }
  .brief2 { max-height: none; }
}
