/* Cerebral Quotient — global styles, ported from the design prototype (ui.jsx) */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,600&display=swap');

:root{
  --green:#7BD88F; --purple:#B49DF0; --pink:#F4A6C6; --blue:#7FB6F2;
  --yellow:#F4D35E; --orange:#F4A261; --coral:#F08A7E;
  --ink:#1C1B1F; --bg:#ECEAF3; --card:#FFFFFF; --violet:#6257E3;
  --line:#1C1B1F;
  --disp:'Fredoka',sans-serif; --body:'Nunito',sans-serif;
}
html, body { margin:0; background:var(--bg); }
::selection { background:#B49DF0; }
@media print { nav, footer, .no-print { display:none !important; } }

.cq{ font-family:var(--body); color:var(--ink); -webkit-font-smoothing:antialiased; }
.cq *{ box-sizing:border-box; }
.cq h1,.cq h2,.cq h3,.cq h4{ font-family:var(--disp); font-weight:600; margin:0; letter-spacing:-0.02em; line-height:1.02; }
.cq p{ margin:0; }
.cq-disp{ font-family:var(--disp); }
.cq-serif-logo{ height:30px; display:block; }
.cq-btn{ font-family:var(--disp); font-weight:600; border:2.5px solid var(--ink);
  border-radius:999px; padding:15px 28px; font-size:18px; cursor:pointer;
  display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:var(--ink);
  background:var(--card); transition:transform .12s ease, box-shadow .12s ease;
  box-shadow:3px 4px 0 var(--ink); white-space:nowrap; }
.cq-btn:hover{ transform:translate(-1px,-1px); box-shadow:4px 6px 0 var(--ink); }
.cq-btn.dark{ background:var(--ink); color:#fff; }
.cq-btn.violet{ background:var(--violet); color:#fff; }
.cq-btn.sm{ padding:10px 18px; font-size:15px; box-shadow:2px 3px 0 var(--ink); }
.cq-btn.lg{ padding:19px 38px; font-size:21px; }
.cq-pill{ display:inline-flex; align-items:center; gap:8px; font-weight:800;
  font-size:13px; letter-spacing:.04em; text-transform:uppercase; padding:7px 14px;
  border-radius:999px; border:2px solid var(--ink); background:#fff; white-space:nowrap; }
.cq-card{ background:var(--card); border:2.5px solid var(--ink); border-radius:26px;
  box-shadow:4px 5px 0 var(--ink); }
.cq-tag{ display:inline-flex; align-items:center; gap:6px; font-weight:700; font-size:13px;
  padding:5px 11px; border-radius:999px; white-space:nowrap; border:1.5px solid rgba(28,27,31,.25); }
a.cq-nav-link{ font-family:var(--body); font-weight:700; font-size:16px; color:var(--ink); text-decoration:none; opacity:.78; }
a.cq-nav-link:hover{ opacity:1; }

/* form fields (auth, contact, checkout) */
.cq-field{ width:100%; padding:14px 16px; border:2.5px solid var(--ink); border-radius:14px;
  font-family:var(--body); font-weight:700; font-size:16px; background:#fff; margin-top:6px; }
.cq-lbl{ font-weight:800; font-size:13px; text-transform:uppercase; letter-spacing:.04em; opacity:.7; }

/* nav */
.cq-nav{ position:sticky; top:0; z-index:50; background:rgba(236,234,243,.86); backdrop-filter:blur(12px); border-bottom:2.5px solid var(--ink); }
.cq-nav-row{ display:flex; align-items:center; justify-content:space-between; padding:18px 40px; }
.cq-nav-links{ display:flex; gap:26px; }
.cq-nav-burger{ display:none; flex-direction:column; gap:5px; justify-content:center; width:46px; height:46px; background:#fff; border:2.5px solid var(--ink); border-radius:13px; cursor:pointer; padding:0 11px; box-shadow:2px 3px 0 var(--ink); }
.cq-nav-burger span{ height:3px; background:var(--ink); border-radius:9px; transition:transform .2s; }
.cq-mobile-menu{ display:none; border-top:2.5px solid var(--ink); background:var(--bg); padding:12px 20px 20px; flex-direction:column; gap:4px; }
.cq-mobile-menu a.menu-item{ text-decoration:none; color:var(--ink); font-family:var(--disp); font-weight:600; font-size:24px; padding:10px 4px; border-bottom:2px solid rgba(28,27,31,.08); }
.cq-nav.open .cq-mobile-menu{ display:flex; }
.cq-nav.open .cq-nav-burger span:nth-child(1){ transform:translateY(8px) rotate(45deg); }
.cq-nav.open .cq-nav-burger span:nth-child(2){ opacity:0; }
.cq-nav.open .cq-nav-burger span:nth-child(3){ transform:translateY(-8px) rotate(-45deg); }

/* avatar dropdown */
.cq-avatar-btn{ display:flex; align-items:center; gap:10px; background:#fff; border:2.5px solid var(--ink); border-radius:999px; padding:5px 14px 5px 6px; cursor:pointer; box-shadow:2px 3px 0 var(--ink); font-family:var(--body); }
.cq-avatar-menu{ position:absolute; top:110%; right:0; background:#fff; border:2.5px solid var(--ink); border-radius:16px; box-shadow:4px 5px 0 var(--ink); padding:8px; min-width:200px; z-index:60; display:none; }
.cq-avatar-wrap.open .cq-avatar-menu{ display:block; }
.cq-avatar-menu a, .cq-avatar-menu button{ display:block; width:100%; text-align:left; border:none; background:transparent; padding:9px 12px; border-radius:9px; font-family:var(--body); font-weight:700; font-size:15px; cursor:pointer; color:var(--ink); text-decoration:none; }
.cq-avatar-menu a:hover, .cq-avatar-menu button:hover{ background:var(--bg); }

/* ---------- responsive ---------- */
.cq{ overflow-x:clip; }
img, svg{ max-width:100%; }

/* tablet */
@media (max-width:960px){
  .cq h1{ font-size:clamp(40px,7.6vw,76px) !important; line-height:1.03 !important; }
  .cq h2{ font-size:clamp(30px,5.2vw,46px) !important; }
  .cq [style*="repeat(4, 1fr)"], .cq [style*="repeat(4,1fr)"]{ grid-template-columns:repeat(2,1fr) !important; }
  .cq [style*="repeat(3, 1fr)"], .cq [style*="repeat(3,1fr)"]{ grid-template-columns:repeat(2,1fr) !important; }
  .cq [style*="1.1fr 0.9fr"],
  .cq [style*="1.2fr 1fr"],
  .cq [style*="1.3fr 1fr"],
  .cq [style*="1fr 1.1fr"],
  .cq [style*="240px 1fr"],
  .cq [style*="grid-template-columns: 1fr 1fr"],
  .cq [style*="grid-template-columns:1fr 1fr"]{ grid-template-columns:1fr !important; }
  .legal-toc{ display:none !important; }
  .auth-visual{ display:none !important; }
  .hero-scatter{ display:none !important; }
  .hero-row{ display:flex !important; }
  .quiz-deco{ display:none !important; }
  .report-toc{ display:none !important; }
  .report-layout{ grid-template-columns:1fr !important; }
  .report-mobile-toc{ display:block !important; }
}

/* phone */
@media (max-width:640px){
  .cq h1{ font-size:clamp(32px,8.8vw,48px) !important; line-height:1.04 !important; }
  .cq h2{ font-size:clamp(24px,6.6vw,34px) !important; }
  .cq h3{ font-size:clamp(19px,5vw,25px) !important; }
  .cq [style*="grid-template-columns"]{ grid-template-columns:1fr !important; }
  .cq [style*="display: flex"], .cq [style*="display:flex"]{ flex-wrap:wrap; }
  /* likert: keep it one clean line on phones */
  .likert-row{ flex-wrap:nowrap !important; gap:8px !important; justify-content:space-between !important; }
  .likert-btn{ width:auto !important; flex:1 1 0 !important; }
  .likert-label{ display:none !important; }
  .likert-ends{ display:flex !important; }
  .cq-btn.lg{ padding:15px 26px; font-size:18px; }
  .cq-btn{ padding:13px 22px; font-size:16px; }
  .cq-nav-row{ padding-left:18px !important; padding-right:18px !important; }
}

/* desktop/mobile nav switch (matches prototype's 880px breakpoint) */
@media (max-width:880px){
  .cq-nav-links{ display:none; }
  .cq-nav-auth-desktop{ display:none !important; }
  .cq-nav-burger{ display:flex; }
}
