/* HQ 3.6 — Site-wide visual consistency layer.
   Readable content vs actionable controls: appearance follows semantics.
   This stylesheet never targets private renderers or the Instruction Builder page. */
body.hq-polish{
  --hq-accent:#6036cb;--hq-bright:#1b5ca5;--hq-soft:#e9e4ff;
  --hq-pale:#e4edff;--hq-ink:#19335d;
  background:
   radial-gradient(ellipse 55% 31% at 100% 17%,rgba(111,91,218,.13),transparent),
   radial-gradient(ellipse 55% 28% at 0% 42%,rgba(35,142,204,.11),transparent),
   linear-gradient(180deg,#f5f8ff 0%,#eaf1ff 42%,#f5f7ff 100%);
}
body.hq-polish-math-tools,body.hq-polish-math-practice,body.hq-polish-math-manipulatives,body.hq-polish-number-talk,body.hq-polish-graph-data-lab {--hq-accent:#2458b8;--hq-bright:#087b9b;--hq-soft:#dbeeff;--hq-pale:#e7f4ff;--hq-ink:#123b67}
body.hq-polish-science-tools,body.hq-polish-science-lab-builder,body.hq-polish-science-phenomena,body.hq-polish-cer-builder {--hq-accent:#067a68;--hq-bright:#225bad;--hq-soft:#d5f7eb;--hq-pale:#e8f7ff;--hq-ink:#0d4b4d}
body.hq-polish-student-tools,body.hq-polish-submit-writing,body.hq-polish-flashcards,body.hq-polish-combination-lock {--hq-accent:#6134bf;--hq-bright:#186eb3;--hq-soft:#ece0ff;--hq-pale:#dfeeff;--hq-ink:#25265f}
body.hq-polish-live-challenge,body.hq-polish-classroom-timer {--hq-accent:#3155c8;--hq-bright:#db740e;--hq-soft:#e3e9ff;--hq-pale:#f5e8ff;--hq-ink:#192d66}
body.hq-polish-form-builder,body.hq-polish-contact,body.hq-polish-teacher-tools {--hq-accent:#6232b7;--hq-bright:#df8a0b;--hq-soft:#eee2ff;--hq-pale:#e7efff;--hq-ink:#2c155d}

/* Stronger canvas and color-blocks, not an endless wall of white cards. */
body.hq-polish .stem-hero:not(.hq-v3-directory-head),
body.hq-polish .flash-hero,
body.hq-polish .page-hero:not(.hq-v3-directory-head):not(.hq-experience-teacher-hero){
  background:linear-gradient(121deg,var(--hq-soft),#f7fbff 56%,var(--hq-pale));
  border:1px solid #cbd8f1; border-radius:25px;
  padding:clamp(20px,3vw,37px);margin:16px 0 22px;
  box-shadow:0 18px 32px rgba(25,56,105,.08);
}
body.hq-polish .stem-hero h1,body.hq-polish .page-hero .page-title {color:var(--hq-ink);overflow-wrap:normal;line-height:1.1}
body.hq-polish .stem-hero p,body.hq-polish .page-hero .lead {color:#435b7a}
body.hq-polish .stem-hero-card,body.hq-polish .page-hero-note{
  background:linear-gradient(150deg,#ffffff,#e4ebff);
  border:1px solid #cad5f0;border-left:5px solid var(--hq-accent);
  border-radius:16px;box-shadow:0 11px 22px rgba(29,66,116,.07);
}
body.hq-polish .stem-hero-card strong {color:var(--hq-ink)}
body.hq-polish .stem-card,body.hq-polish .form-card,body.hq-polish .flash-card{
  border:1px solid #c9d7ed;border-top:5px solid var(--hq-accent);
  background:linear-gradient(180deg,#fff,#fcfdff);
  box-shadow:0 14px 34px rgba(21,54,102,.07)
}
body.hq-polish .stem-card h2,body.hq-polish .stem-card h3{color:var(--hq-ink)}
body.hq-polish .stem-side .stem-card {background:linear-gradient(170deg,#f2f7ff,#e4eeff)}
body.hq-polish .stem-side-list>div{
  background:rgba(255,255,255,.65);border:0;border-left:4px solid var(--hq-accent);
  border-radius:0 9px 9px 0;box-shadow:none;padding:11px 15px
}
body.hq-polish .stem-side-list>div:nth-child(3n+2){border-left-color:#00a68a}
body.hq-polish .stem-side-list>div:nth-child(3n){border-left-color:#ed9b25}

/* Read-only labels should not look like tappable pills. Do not affect inputs, true buttons or toggle labels. */
body.hq-polish .math2-badges span,
body.hq-polish .stem-badge-row span,
body.hq-polish .flash-hero-pills span,
body.hq-polish .badge,
body.hq-polish .version-pill,
body.hq-polish .trust .pill{
  display:inline-flex;align-items:center;gap:7px;position:relative;
  background:transparent!important;border:0!important;border-radius:0!important;
  box-shadow:none!important;color:var(--hq-ink)!important;
  padding:3px 0!important;font-size:12px;font-weight:780;
  text-decoration:none;cursor:default;
}
body.hq-polish .math2-badges span:before,
body.hq-polish .stem-badge-row span:before,
body.hq-polish .flash-hero-pills span:before,
body.hq-polish .badge:before,
body.hq-polish .version-pill:before {
  content:"";display:inline-block;width:6px;height:6px;flex:none;
  border-radius:50%;background:var(--hq-accent)
}
body.hq-polish .stem-badge-row,body.hq-polish .math2-badges,body.hq-polish .flash-hero-pills {gap:9px 17px}
body.hq-polish .availability {border:0;background:transparent;box-shadow:none;border-radius:0;padding:0;font-weight:850}
body.hq-polish .availability.available:before{content:"● ";color:#069b72}
body.hq-polish .trust .pill:before{content:"✓";height:auto;width:auto;border:0;color:#5df4c0;background:none}

/* Only interactive controls are button-shaped. Cards that aren't links don't rise on hover. */
body.hq-polish .tool-card:not(:has(>a.tool-card-link)):hover{transform:none}
body.hq-polish .tool-card {border:1px solid #d3dbf1;box-shadow:0 11px 27px rgba(35,66,119,.075);background:linear-gradient(160deg,#fff,#f5f9ff)}
body.hq-polish .grid-3>.tool-card:nth-child(3n+1){border-top:5px solid #5752d7}
body.hq-polish .grid-3>.tool-card:nth-child(3n+2){border-top:5px solid #069f96}
body.hq-polish .grid-3>.tool-card:nth-child(3n){border-top:5px solid #e6a127}
body.hq-polish .tool-card>.btn,body.hq-polish .tool-card a.btn {text-decoration:none;box-shadow:0 7px 15px rgba(36,36,87,.13);transition:filter .16s ease,transform .16s ease;cursor:pointer}
body.hq-polish .tool-card>.btn:hover,body.hq-polish .tool-card a.btn:hover{filter:brightness(1.06);transform:translateY(-1px)}
body.hq-polish .tool-hub-card {background:linear-gradient(150deg,#ffffff,#eef6ff);border:1px solid #c8d9ed;border-left:5px solid var(--hq-accent);transition:transform .15s ease}
body.hq-polish .tool-hub-grid>.tool-hub-card:nth-child(even){border-left-color:#e89b25;background:linear-gradient(150deg,#fff,#fff5de)}
body.hq-polish .tool-hub-card h3{color:var(--hq-ink)}
body.hq-polish .tool-hub-card:hover {transform:translateY(-2px)}
body.hq-polish :is(a.btn,button.btn,.stem-tab,.flash-tab):focus-visible{outline:3px solid #edab38;outline-offset:3px}

/* Five hub landing pages share a stable two-column composition on desktops. */
body.hq-polish.hq-visual-v3 .hq-v3-directory-head {
 display:grid!important;grid-template-columns:minmax(0,1.14fr) minmax(290px,.86fr)!important;
 grid-auto-flow:row;column-gap:clamp(20px,3vw,45px);row-gap:13px;
 padding:clamp(22px,3.2vw,46px)!important;align-items:center;
 min-height:340px;position:relative!important;isolation:isolate;
 background:linear-gradient(120deg,#e2efff,#e8edff 60%,#eee5ff);
 border:1px solid #bdcbf4;border-radius:28px;margin:20px 0 27px;
 box-shadow:0 18px 38px rgba(33,65,119,.09)
}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.hq-polish-directory-copy,
body.hq-polish.hq-visual-v3 .hq-v3-directory-head>div:first-child:not(.hq-v3-directory-device){grid-column:1;grid-row:1;min-width:0;max-width:none}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.stem-hero-card {grid-column:1;grid-row:2;max-width:100%;padding:15px 18px}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.hq-v3-directory-device{
 grid-column:2;grid-row:1 / span 2;position:static!important;
 margin:0!important;width:100%!important;transform:none!important;right:auto!important;top:auto!important;
 align-self:center;min-width:0;text-align:center
}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head .hq-v3-tablet-frame{
 width:100%;max-width:420px;height:220px;transform:rotate(1deg);
 box-shadow:0 15px 30px rgba(33,48,91,.25)
}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head :is(.page-title,h1){
 font-size:clamp(32px,3.65vw,52px)!important;line-height:1.1!important;
 margin:9px 0 13px!important;overflow-wrap:normal;max-width:780px
}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head :is(.lead,p){font-size:clamp(15px,1.2vw,18px);line-height:1.55;max-width:800px;margin:5px 0}
body.hq-polish.hq-visual-v3 .hq-v3-directory-head figcaption{font-size:12px;color:#42577a;margin-top:12px}
body.hq-polish-student-tools .hq-v3-directory-head{background:linear-gradient(121deg,#d9f6ff,#e2e7ff 60%,#f0e2ff)!important}
body.hq-polish-math-tools .hq-v3-directory-head{background:linear-gradient(120deg,#d6edff,#e9f5ff 65%,#e1ecff)!important}
body.hq-polish-science-tools .hq-v3-directory-head{background:linear-gradient(120deg,#d8f6ed,#def2ff 68%,#dff1fa)!important}
body.hq-polish-teacher-tools .hq-experience-teacher-hero{
 background:linear-gradient(120deg,#efe6ff,#e5ecff 65%,#dbf3ef);
 border-radius:26px;border:1px solid #d4c8fa;padding:clamp(21px,3vw,41px);box-shadow:0 15px 33px rgba(37,66,116,.08)
}

/* Homepage: the device label MUST actually navigate and the verified testimonial must be readable. */
body.hq-polish-home .hq-polish-showcase-link {
 display:inline-flex!important;align-items:center;gap:8px;
 text-decoration:none!important;cursor:pointer;font-size:12px;
 background:#ffce58!important;color:#192c55!important;border:2px solid #fff1bd;
 font-weight:900;letter-spacing:.025em;border-radius:12px 12px 0 0;
 padding:12px 16px;box-shadow:0 6px 16px rgba(2,19,49,.2);position:relative;z-index:5
}
body.hq-polish-home .hq-polish-showcase-link:hover {background:#ffe19a!important}
body.hq-polish-home .hq-polish-showcase-link:focus-visible {outline:4px solid #fff;outline-offset:2px}
body.hq-polish-home .hq-v3-classroom-context{background:#dbe8ff;align-items:stretch}
body.hq-polish-home .hq-v3-context-copy{background:linear-gradient(145deg,#e2f0ff,#e7e6ff 65%,#d9f8ed)}
body.hq-polish-home .hq-v3-quote{
 background:linear-gradient(135deg,#2d277d,#164d83 65%,#156a88);
 padding:22px 25px;border:0;border-left:6px solid #ffc74c;border-radius:17px;
 box-shadow:0 12px 27px rgba(29,49,109,.17);position:relative;margin-top:22px
}
body.hq-polish-home .hq-v3-quote:before {content:'“';position:absolute;right:17px;top:-4px;font:900 77px Georgia,serif;color:#89ddff;opacity:.4;line-height:1}
body.hq-polish-home .hq-v3-quote p{color:#fff;font-size:clamp(18px,1.8vw,22px);font-weight:750;line-height:1.35;max-width:92%}
body.hq-polish-home .hq-v3-quote footer{color:#b9f3ff;font-size:13px;font-weight:850;letter-spacing:.03em;margin-top:13px}

/* Interactive areas stay clear and comfortable on touch devices. */
@media(max-width:1100px){
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head{grid-template-columns:minmax(0,1fr) minmax(250px,.75fr)!important;min-height:unset}
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head .hq-v3-tablet-frame{height:170px}
}
@media(max-width:760px){
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  padding:24px 19px!important;gap:19px;margin:10px 0 21px
 }
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.hq-polish-directory-copy,
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head>div:first-child:not(.hq-v3-directory-device){grid-column:1!important;grid-row:1!important}
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.stem-hero-card{grid-column:1!important;grid-row:2!important}
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head>.hq-v3-directory-device{grid-column:1!important;grid-row:3!important;max-width:450px!important;margin:0 auto!important}
 body.hq-polish-student-tools .hq-v3-directory-head>.hq-v3-directory-device{grid-row:2!important}
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head .hq-v3-tablet-frame{height:170px;max-width:390px}
 body.hq-polish.hq-visual-v3 .hq-v3-directory-head :is(.page-title,h1){font-size:clamp(30px,8vw,43px)!important}
 body.hq-polish .stem-hero:not(.hq-v3-directory-head){padding:22px 19px}
 body.hq-polish .stem-card{padding:19px}
}
/* High-contrast credibility markers on the dark homepage hero. */
body.hq-polish-home .hero .trust .pill{color:#e5f4ff!important;text-shadow:0 1px 2px rgba(0,0,0,.25)}
body.hq-polish-home .hero .trust .pill:before{color:#5ef5c6!important}
/* Real classroom game title must also remain visible on narrow phones. */
@media(max-width:620px){
 body.hq-polish-live-challenge .live-hero-grid{grid-template-columns:minmax(0,1fr)!important}
 body.hq-polish-live-challenge .live-hero-grid>*{min-width:0!important;max-width:100%!important}
 body.hq-polish-live-challenge .live-hero h1{font-size:clamp(28px,7.9vw,43px)!important;line-height:1.09;overflow-wrap:anywhere;max-width:100%}
}
@media(prefers-reduced-motion:reduce){body.hq-polish *{scroll-behavior:auto;transition:none!important}}
