/* Cerebral Quotient — global styles, ported from the design prototype (ui.jsx) */

: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; }

/* ---------- print / PDF ---------- */
@media print {
  @page { margin: 14mm; }
  html, body, .cq { background:#fff !important; overflow:visible !important; }

  /* keep brand colors in the PDF */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  /* strip everything that isn't report content */
  nav, footer, .no-print, .cq-btn,
  .report-toc, .report-mobile-toc, .report-mobile-sheet,
  .report-progress { display:none !important; }

  /* nothing sticky or fixed in a printed page */
  [style*="position:sticky"], [style*="position: sticky"] { position:static !important; }
  [style*="position:fixed"], [style*="position: fixed"] { display:none !important; }

  /* report body goes full width (drop the sidebar grid) */
  .report-layout { display:block !important; }
  .report-layout > main, main { max-width:100% !important; padding-left:0 !important; padding-right:0 !important; }

  /* a section that would overflow moves to the next page instead of splitting */
  .cq-card, .report-block, .report-hero, blockquote, table,
  .report-chapter > div > div { break-inside:avoid; page-break-inside:avoid; }
  section, .report-chapter { break-inside:auto; }
  h1, h2, h3, h4 { break-after:avoid; page-break-after:avoid; }
  /* let big chapters start cleanly on their own page */
  .report-chapter { page-break-before:auto; }

  /* clean, ink-friendly look */
  .cq-card { box-shadow:none !important; }
  a { text-decoration:none !important; color:inherit !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; }
  .checkout-summary{ position:static !important; } /* stacked above the form, sticking would cover it */
}

/* 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; }
  /* a wrapping column sizes its line to its widest child, so the page grew past the screen (quiz at 400px on a 375px phone) */
  .cq [style*="flex-direction:column"], .cq [style*="flex-direction: column"]{ flex-wrap:nowrap !important; }
  /* 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; min-width:0 !important; padding:0 !important; }
  /* circles shrink to their slot on narrow phones (the row was 352px wide and clipped below 400px) */
  .likert-circle{ max-width:100% !important; height:auto !important; aspect-ratio:1; }
  .quiz-top{ padding:14px 16px !important; }
  .quiz-top .cq-pill{ display:none !important; } /* the line above question 1 already says how many */
  .quiz-main{ padding:28px 16px !important; }
  /* decorations that sit on top of text at phone width */
  .result-deco, .paywall-deco{ display:none !important; }
  /* paywall card: the buy button was wider than the card on 360px phones */
  .paywall-card{ max-width:calc(100% - 24px) !important; }
  .paywall-pad{ padding-left:20px !important; padding-right:20px !important; }
  .uc-pad{ padding-left:20px !important; padding-right:20px !important; }
  .paywall-buy .cq-btn{ width:100%; justify-content:center; padding-left:14px; padding-right:14px; }
  .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; }
}

/* Use-case pages: no one-word last lines on headings; article links a shade darker so they pass 4.5:1 on --bg. */
.uc-pad h1, .uc-pad h2, .uc-pad h3{ text-wrap:balance; }
.uc-pad h1 + p{ text-wrap:pretty; }
.uc-pad p{ max-width:70ch; }
.uc-pad a[style*="#6257E3"]{ color:#5A4FDB !important; }
/* An odd last reading card fills its row at two columns. The sub breaks after its first sentence wherever the longer sentence
   (about 480px at 18px) fits on one line: two-column heroes from 990px, one-column ones from 541px. */
@media (max-width:960px){ .uc-reads > :last-child:nth-child(odd){ grid-column:1 / -1; } }
@media (max-width:540px), (min-width:961px) and (max-width:989px){ .uc-br{ display:none; } }
/* Long button labels wrap on narrow screens instead of pushing past the edge. */
.uc-pad .cq-btn{ white-space:normal; }
/* The hero text centres beside the sample card on tall screens; short ones keep it at the top so the button stays in view. */
@media (min-width:641px) and (min-height:760px){ .uc-hero-text{ align-self:center !important; } }
/* Card grids: --n columns, two under 1000px, one on phones. On the result page (--n:1) the career lists run in two columns where they fit. */
.uc-grid{ display:grid; gap:20px; grid-template-columns:repeat(var(--n, 3), minmax(0, 1fr)); }
@media (max-width:1000px){ .uc-grid{ --n:2 !important; } }
@media (max-width:640px){ .uc-grid{ --n:1 !important; } }
.uc-grid[style*="--n:1"] .uc-jobs{ columns:2 220px; column-gap:28px; }
/* The preparation picker (use_cases/_careers): five radio pills, and CSS shows the picked level's text and lists. Level 3 shows by default. */
.uc-zr{ position:absolute; opacity:0; width:1px; height:1px; }
.uc-zl{ display:inline-flex; align-items:center; min-height:44px; padding:0 16px; border:2.5px solid var(--ink); border-radius:999px; background:#fff; font-weight:800; font-size:15px; cursor:pointer; }
.uc-zr:checked + .uc-zl{ background:var(--ink); color:#fff; }
.uc-zr:focus-visible + .uc-zl{ outline:3px solid var(--ink); outline-offset:3px; }
.uc-z{ display:none; }
.uc-z[data-z="3"]{ display:block; }
.uc-zones:has(.uc-zr:checked) .uc-z{ display:none; }
.uc-zones:has(.uc-zr[value="1"]:checked) .uc-z[data-z="1"], .uc-zones:has(.uc-zr[value="2"]:checked) .uc-z[data-z="2"],
.uc-zones:has(.uc-zr[value="3"]:checked) .uc-z[data-z="3"], .uc-zones:has(.uc-zr[value="4"]:checked) .uc-z[data-z="4"],
.uc-zones:has(.uc-zr[value="5"]:checked) .uc-z[data-z="5"]{ display:block; }
/* The guess sliders on the partner pages. */
.uc-range{ width:100%; height:44px; accent-color:var(--ink); }
@media (max-width:640px){
  /* Phones keep five sizes on these pages (34 / 26 / 22 / 18 / 15): h3s step clear of the 18px body, buttons match it. */
  .uc-pad h3, .uc-cardh{ font-size:22px !important; }
  /* Read more titles are the posts' own, so on phones they drop to the 18px step instead of being cut. */
  .uc-pad h3.uc-readh{ font-size:18px !important; }
  .uc-pad .cq-btn:not(.sm){ font-size:18px; }
  /* The sample card is the hero's picture: the blob above it steps aside and the panel loses its desktop height. */
  .uc-phone-hide{ display:none !important; }
  .uc-art-panel{ min-height:0 !important; padding:28px 20px !important; }
  .ft-cols{ display:grid !important; grid-template-columns:1fr 1fr; }
}
