/* Trust Center Central — global glassmorphism + search overlay */

/* Glassmorphic surfaces (override page styles, work on all pages) */
:root{
  --glass-bg: rgba(255,255,255,.55);
  --glass-bg-strong: rgba(255,255,255,.7);
  --glass-border: rgba(255,255,255,.55);
  --glass-shadow: 0 24px 70px rgba(32,6,97,.14);
  --glass-blur: 22px;
}
body{
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(108,86,150,.28), transparent 60%),
    radial-gradient(800px 600px at 92% 8%, rgba(32,6,97,.22), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(108,86,150,.18), transparent 60%),
    #F0EEEB !important;
  background-attachment: fixed;
}
.topbar,
.bottom-menu,
.sidebar,
.hero,
.doc-header,
.section-card,
.doc-card,
.trust-card,
.stat,
.meta-item,
.notice,
table{
  background: var(--glass-bg) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border) !important;
  box-shadow: var(--glass-shadow);
}
.trust-card{
  background: linear-gradient(135deg, rgba(17,16,16,.86), rgba(32,6,97,.78)) !important;
  color:#fff;
  border-color: rgba(255,255,255,.12) !important;
}
.doc-card:hover{ background: var(--glass-bg-strong) !important; }
.btn.primary{ background: linear-gradient(135deg, #200661, #6C5696) !important; color:#fff !important; border-color: transparent !important; }
.btn.secondary{ background: var(--glass-bg-strong) !important; }

/* Search trigger button (always visible in any topbar) */
.tcc-search-btn{
  display:inline-flex;align-items:center;gap:8px;
  padding:9px 13px;border-radius:999px;border:1px solid rgba(17,16,16,.10);
  background:rgba(255,255,255,.7);backdrop-filter:blur(10px);
  font:600 .86rem/1 Inter,system-ui,sans-serif;color:#5B5E5C;cursor:pointer;
}
.tcc-search-btn kbd{
  font:700 .72rem/1 ui-monospace,monospace;background:#fff;border:1px solid rgba(17,16,16,.12);
  border-radius:6px;padding:3px 6px;color:#200661;
}
.tcc-search-btn:hover{color:#111010;background:#fff}

/* Floating mobile search FAB for policy pages (no topbar) */
.tcc-fab{
  position:fixed;right:18px;bottom:18px;z-index:1002;
  width:56px;height:56px;border-radius:50%;border:1px solid rgba(255,255,255,.5);
  background:linear-gradient(135deg,#200661,#6C5696);color:#fff;cursor:pointer;
  display:none;align-items:center;justify-content:center;
  box-shadow:0 18px 40px rgba(32,6,97,.35);
}

/* Hamburger button (mobile, trust-center only) */
.tcc-hamburger{
  display:none;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:50%;border:1px solid rgba(17,16,16,.10);
  background:rgba(255,255,255,.8);cursor:pointer;color:#111010;
}
.tcc-hamburger svg{width:20px;height:20px}

/* Search modal */
.tcc-modal{
  position:fixed;inset:0;z-index:9999;display:none;
  background:rgba(15,8,40,.45);backdrop-filter:blur(8px);
  align-items:flex-start;justify-content:center;padding:10vh 16px 16px;
}
.tcc-modal.open{display:flex}
.tcc-modal-panel{
  width:min(720px,100%);max-height:80vh;display:flex;flex-direction:column;
  background:rgba(255,255,255,.85);backdrop-filter:blur(28px) saturate(180%);
  border:1px solid rgba(255,255,255,.6);border-radius:24px;
  box-shadow:0 40px 100px rgba(15,8,40,.4);overflow:hidden;
  animation:tccPop .18s ease-out;
}
@keyframes tccPop{from{transform:translateY(-8px);opacity:0}to{transform:none;opacity:1}}
.tcc-modal-input-wrap{display:flex;align-items:center;gap:10px;padding:16px 20px;border-bottom:1px solid rgba(17,16,16,.08)}
.tcc-modal-input-wrap svg{color:#5B5E5C;flex:none}
.tcc-modal-input{flex:1;border:0;outline:0;background:transparent;font:500 1.05rem Inter,system-ui,sans-serif;color:#111010}
.tcc-esc{font:700 .7rem ui-monospace,monospace;color:#5B5E5C;background:rgba(17,16,16,.06);padding:4px 8px;border-radius:6px}
.tcc-results{overflow-y:auto;padding:8px}
.tcc-result{
  display:block;padding:12px 14px;border-radius:14px;text-decoration:none;color:inherit;
  border:1px solid transparent;
}
.tcc-result:hover,.tcc-result.active{background:rgba(32,6,97,.08);border-color:rgba(32,6,97,.18)}
.tcc-result .tcc-title{font-weight:800;color:#111010;display:flex;align-items:center;gap:10px}
.tcc-result .tcc-phase{font:700 .68rem/1 Inter;letter-spacing:.12em;text-transform:uppercase;color:#200661;background:#fff;border:1px solid rgba(32,6,97,.18);padding:4px 8px;border-radius:999px}
.tcc-result .tcc-excerpt{color:#5B5E5C;font-size:.88rem;margin-top:4px;line-height:1.45}
.tcc-result mark{background:rgba(108,86,150,.28);color:#111010;padding:0 2px;border-radius:3px}
.tcc-empty{padding:32px;text-align:center;color:#5B5E5C}
.tcc-modal-foot{display:flex;gap:14px;padding:10px 16px;border-top:1px solid rgba(17,16,16,.08);font-size:.78rem;color:#5B5E5C}
.tcc-modal-foot kbd{background:#fff;border:1px solid rgba(17,16,16,.12);border-radius:5px;padding:2px 6px;font:700 .72rem ui-monospace,monospace;color:#200661;margin-right:4px}

/* Mobile responsiveness */
@media (max-width: 860px){
  .tcc-hamburger{ display:inline-flex !important; }
  /* Collapse nav into menu */
  .topbar .nav{
    display:none !important; position:absolute; left:14px; right:14px; top:calc(100% + 8px);
    flex-direction:column; align-items:stretch; gap:4px;
    background:rgba(255,255,255,.92); backdrop-filter:blur(20px);
    border:1px solid rgba(17,16,16,.10); border-radius:20px; padding:10px;
    box-shadow:0 24px 60px rgba(17,16,16,.18);
  }
  .topbar.tcc-open .nav{ display:flex !important; }
  .topbar .nav a{ padding:12px 14px; border-radius:12px; font-size:1rem; }
  .topbar{
    flex-direction:row !important; align-items:center !important; position:relative;
    border-radius:999px !important;
  }
  /* Hide bottom menu on mobile, show FAB instead */
  .bottom-menu{ display:none !important; }
  .tcc-fab{ display:inline-flex; }
  body{ padding-bottom:16px !important; }
  /* Search button compact */
  .tcc-search-btn span{display:none}
  .tcc-search-btn kbd{display:none}
}
@media (min-width: 861px){
  .tcc-fab{ display:none !important; }
}

/* ---------- Brand mark as image ---------- */
img.brand-mark{
  width:38px;height:38px;border-radius:13px;object-fit:cover;
  background:linear-gradient(135deg,#200661,#6C5696);
  box-shadow:0 12px 28px rgba(32,6,97,.25);
  display:block;
}

/* ---------- Theme toggle button ---------- */
.tcc-theme-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;border-radius:50%;border:1px solid rgba(17,16,16,.10);
  background:rgba(255,255,255,.8);cursor:pointer;color:#111010;
}
.tcc-theme-btn svg{width:18px;height:18px}

/* ---------- Dark theme ---------- */
html[data-tcc-theme="dark"]{
  color-scheme: dark;
  --glass-bg: rgba(28,22,52,.55);
  --glass-bg-strong: rgba(28,22,52,.75);
  --glass-border: rgba(255,255,255,.10);
  --glass-shadow: 0 30px 80px rgba(0,0,0,.55);
}
html[data-tcc-theme="dark"] body{
  background:
    radial-gradient(900px 600px at 12% -10%, rgba(108,86,150,.35), transparent 60%),
    radial-gradient(800px 600px at 92% 8%, rgba(70,30,180,.30), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(108,86,150,.22), transparent 60%),
    #0b0820 !important;
  color: #ECEAF5 !important;
}
html[data-tcc-theme="dark"] *{ border-color: rgba(255,255,255,.08) }
html[data-tcc-theme="dark"] .topbar,
html[data-tcc-theme="dark"] .bottom-menu,
html[data-tcc-theme="dark"] .sidebar,
html[data-tcc-theme="dark"] .hero,
html[data-tcc-theme="dark"] .doc-header,
html[data-tcc-theme="dark"] .section-card,
html[data-tcc-theme="dark"] .doc-card,
html[data-tcc-theme="dark"] .stat,
html[data-tcc-theme="dark"] .meta-item,
html[data-tcc-theme="dark"] table{
  color:#ECEAF5 !important;
}
html[data-tcc-theme="dark"] .trust-card{
  background: linear-gradient(135deg, rgba(0,0,0,.7), rgba(40,16,90,.85)) !important;
}
html[data-tcc-theme="dark"] th{ background: rgba(255,255,255,.05) !important; color:#ECEAF5 }
html[data-tcc-theme="dark"] td{ color:#D8D4E8 }
html[data-tcc-theme="dark"] .nav a,
html[data-tcc-theme="dark"] .side-link,
html[data-tcc-theme="dark"] .bottom-menu a{ color:#B7B3CC }
html[data-tcc-theme="dark"] .nav a:hover,
html[data-tcc-theme="dark"] .side-link:hover{ background:rgba(255,255,255,.08); color:#fff }
html[data-tcc-theme="dark"] .side-link.active,
html[data-tcc-theme="dark"] .nav a.active,
html[data-tcc-theme="dark"] .bottom-menu a.active{
  background: linear-gradient(135deg,#6C5696,#200661) !important; color:#fff !important;
}
html[data-tcc-theme="dark"] .doc-card .num{ color:#B49BFF }
html[data-tcc-theme="dark"] .doc-card h3{ color:#fff }
html[data-tcc-theme="dark"] .doc-card p,
html[data-tcc-theme="dark"] .doc-subtitle,
html[data-tcc-theme="dark"] .hero p,
html[data-tcc-theme="dark"] .stat span,
html[data-tcc-theme="dark"] footer{ color:#B7B3CC }
html[data-tcc-theme="dark"] h1,
html[data-tcc-theme="dark"] h2,
html[data-tcc-theme="dark"] h3{ color:#fff }
html[data-tcc-theme="dark"] .tag{ background:rgba(255,255,255,.06); color:#B7B3CC }
html[data-tcc-theme="dark"] .badge{ background:rgba(255,255,255,.06); color:#B49BFF; border-color:rgba(255,255,255,.10) }
html[data-tcc-theme="dark"] .phase-label,
html[data-tcc-theme="dark"] .eyebrow{ background:rgba(255,255,255,.06); color:#B49BFF; border-color:rgba(255,255,255,.10) }
html[data-tcc-theme="dark"] .btn.secondary{ color:#fff !important }
html[data-tcc-theme="dark"] .tcc-search-btn,
html[data-tcc-theme="dark"] .tcc-hamburger,
html[data-tcc-theme="dark"] .tcc-theme-btn{
  background:rgba(255,255,255,.08); color:#ECEAF5; border-color:rgba(255,255,255,.10);
}
html[data-tcc-theme="dark"] .tcc-search-btn kbd{ background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.15) }
html[data-tcc-theme="dark"] .tcc-modal-panel{
  background: rgba(20,14,40,.85); border-color: rgba(255,255,255,.12); color:#ECEAF5;
}
html[data-tcc-theme="dark"] .tcc-modal-input{ color:#fff }
html[data-tcc-theme="dark"] .tcc-modal-input::placeholder{ color:#8B85A8 }
html[data-tcc-theme="dark"] .tcc-result .tcc-title{ color:#fff }
html[data-tcc-theme="dark"] .tcc-result .tcc-excerpt,
html[data-tcc-theme="dark"] .tcc-empty,
html[data-tcc-theme="dark"] .tcc-modal-foot{ color:#B7B3CC }
html[data-tcc-theme="dark"] .tcc-result:hover,
html[data-tcc-theme="dark"] .tcc-result.active{ background:rgba(180,155,255,.12); border-color:rgba(180,155,255,.25) }
html[data-tcc-theme="dark"] .tcc-result .tcc-phase{ background:rgba(255,255,255,.06); color:#B49BFF; border-color:rgba(255,255,255,.12) }
html[data-tcc-theme="dark"] .tcc-esc{ background:rgba(255,255,255,.10); color:#B7B3CC }
html[data-tcc-theme="dark"] .notice{ background:rgba(154,91,0,.18); color:#FFE3A8; border-color:rgba(255,210,120,.25) }
html[data-tcc-theme="dark"] a{ color:inherit }
