/* Erecto tools — design tokens. Override at site level to match brand. */
:root {
  --et-bg: #0f1e2e;          /* deep night navy — private, calm */
  --et-surface: #17293c;
  --et-fg: #f2f6fa;
  --et-muted: #93a8bd;
  --et-pulse: #ff6a5a;       /* the heartbeat */
  --et-ok: #3ecf9a;
  --et-wa: #25d366;
  --et-radius: 16px;
  --et-max: 640px;
}
html.et-lock, html.et-lock body { overflow: hidden; }

/* ---------- Landing ---------- */
.et-landing { max-width: var(--et-max); margin: 0 auto; padding: 24px 20px 64px; }
.et-eyebrow { letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--et-pulse); font-weight: 700; }
.et-hero h1 { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.15; margin: .35em 0 .3em; }
.et-tagline { color: var(--et-muted); font-size: 1.06rem; margin-bottom: 1.4em; }
.et-credibility { color: var(--et-muted); font-size: .85rem; margin-top: 1em; }
.et-lastscore { margin-top: 1em; font-size: .92rem; color: var(--et-ok); }
.et-disclaimer { font-size: .85rem; color: var(--et-muted); border-left: 3px solid var(--et-pulse); padding-left: 12px; }

/* National "Popular" linking blocks below the landing copy (shared include
   with homepage/blog). Grid gap spaces the <details> cards without relying
   on Tailwind utilities being present in the blog bundle. */
.et-popular { display: grid; gap: 14px; margin-top: 32px; }

.et-start {
  position: relative; display: inline-flex; align-items: center; gap: 12px;
  background: var(--et-pulse); color: #fff; border: 0; cursor: pointer;
  font-size: 1.08rem; font-weight: 700; padding: 16px 28px; border-radius: 999px;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--et-pulse) 45%, transparent);
  transition: transform .15s ease;
}
.et-start:active { transform: scale(.97); }
.et-start-pulse { width: 12px; height: 12px; border-radius: 50%; background: #fff; animation: et-beat 1.1s ease-in-out infinite; }

@keyframes et-beat {
  0%, 100% { transform: scale(1); } 12% { transform: scale(1.45); }
  24% { transform: scale(1); } 36% { transform: scale(1.3); } 48% { transform: scale(1); }
}

/* ---------- Full-page quiz ---------- */
.et-quiz {
  position: fixed; inset: 0; z-index: 9990; background: var(--et-bg); color: var(--et-fg);
  display: flex; flex-direction: column; height: 100dvh;
}
/* The display:flex above would defeat the HTML hidden attribute (author rules
   beat the UA [hidden] one) — quiz.js toggles .hidden, so honor it explicitly. */
.et-quiz[hidden] { display: none; }
.et-topbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.et-back { background: none; border: 0; color: var(--et-muted); font-size: 1.5rem; cursor: pointer; padding: 6px 10px; }
.et-back:focus-visible, .et-opt:focus-visible, .et-cta:focus-visible, .et-start:focus-visible { outline: 2px solid var(--et-pulse); outline-offset: 2px; }

/* ECG progress — the life of the flow.
   flex-basis 0 + min-width 0 are load-bearing: the SVG's 1000×40 viewBox gives
   it an intrinsic width of 1000px, and a flex item's default min-width:auto
   would refuse to shrink below that — on phones the line ran off-screen and
   forced a desktop-width layout (2026-08-03 mobile bug). */
.et-ecg { flex: 1 1 0; min-width: 0; height: 40px; overflow: visible; }
.et-ecg-track { fill: none; stroke: var(--et-surface); stroke-width: 2.5; }
.et-ecg-fill { fill: none; stroke: var(--et-pulse); stroke-width: 2.5; stroke-linecap: round;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--et-pulse) 70%, transparent));
  transition: stroke-dashoffset .45s cubic-bezier(.25,.9,.3,1); }
.et-ecg-dot { fill: var(--et-pulse); animation: et-beat 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.et-ecg-dot.is-final { fill: var(--et-ok); }

.et-stage { flex: 1; position: relative; overflow: hidden; }
.et-q {
  position: absolute; inset: 0; margin: 0 auto; max-width: var(--et-max);
  padding: 12px 22px 20px; display: flex; flex-direction: column;
  transition: transform .32s cubic-bezier(.25,.9,.3,1), opacity .32s ease;
  overflow-y: auto;
}
/* Center vertically WITHOUT justify-content:center — that clips the TOP of
   overflowing flex content and it can never be scrolled into view (the mobile
   "question/score hidden under the ECG" bug, 2026-08-03). The auto margins on
   these zero-height pseudos collapse to 0 when content overflows, so the top
   always stays reachable. */
.et-q::before, .et-q::after { content: ""; flex: 0 0 auto; margin: auto; }
.et-in-r { transform: translateX(60px); opacity: 0; }
.et-in-l { transform: translateX(-60px); opacity: 0; }
.et-out-l { transform: translateX(-60px); opacity: 0; }
.et-out-r { transform: translateX(60px); opacity: 0; }

.et-q-text { font-size: clamp(1.25rem, 4.4vw, 1.7rem); line-height: 1.3; margin-bottom: .4em; }
.et-q-help { color: var(--et-muted); font-size: .95rem; margin-bottom: 1em; }
.et-opts { display: grid; gap: 12px; margin-top: 1.2em; }
.et-opt {
  text-align: left; font-size: 1.02rem; color: var(--et-fg); background: var(--et-surface);
  border: 1.5px solid transparent; border-radius: var(--et-radius); padding: 16px 18px;
  cursor: pointer; transition: border-color .15s, transform .15s, background .15s;
}
.et-opt:hover { border-color: color-mix(in srgb, var(--et-pulse) 55%, transparent); }
.et-opt.is-picked { border-color: var(--et-pulse); background: color-mix(in srgb, var(--et-pulse) 16%, var(--et-surface)); transform: scale(.985); }

/* ---------- Result ---------- */
.et-result { text-align: center; }
.et-gauge { position: relative; width: min(58vw, 240px); margin: 0 auto 8px; }
.et-gauge-svg { width: 100%; }
.g-track { fill: none; stroke: var(--et-surface); stroke-width: 9; stroke-linecap: round; }
.g-fill { fill: none; stroke: var(--et-pulse); stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; }
.u0 .g-fill, .u0 .et-band { stroke: var(--et-ok); color: var(--et-ok); }
.et-gauge-num { position: absolute; inset: auto 0 4px; font-size: 2.4rem; font-weight: 800; }
.et-band { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; color: var(--et-pulse); }
.et-headline { font-size: clamp(1.3rem, 4.6vw, 1.8rem); margin: .3em 0; }
.et-body { color: var(--et-muted); max-width: 46ch; margin: 0 auto .6em; }
.et-note { font-size: .78rem; color: var(--et-muted); }

.et-ctas { display: grid; gap: 14px; margin-top: 18px; }
.et-cta { display: flex; align-items: center; justify-content: center; gap: 10px;
  text-align: center; text-decoration: none; font-weight: 700;
  padding: 15px 18px; border-radius: var(--et-radius); color: #fff; }
.et-cta-wa { background: var(--et-wa); font-size: 1.05rem;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--et-wa) 40%, transparent); }
.et-wa-ico { width: 1.25em; height: 1.25em; flex: 0 0 auto; fill: currentColor; }
.et-cta-call { background: var(--et-surface); border: 1.5px solid var(--et-muted); }
.et-reassure { color: var(--et-muted); font-size: .85rem; margin: 4px 0 0; }

.et-wait { align-items: center; text-align: center; color: var(--et-muted); }
.et-heart { width: 26px; height: 26px; border-radius: 50%; background: var(--et-pulse);
  margin: 0 auto 14px; animation: et-beat 1.1s ease-in-out infinite; }

/* ---------- Floating heartbeat CTA bubble ---------- */
.et-bubble {
  /* Bottom-LEFT: the site-wide floating "Call Now"/"WhatsApp" buttons own the
     bottom-right corner on every blog/spoke page — the bubble must not stack
     on them (deviation from CLAUDE.md §6's original bottom-right, 2026-08-03). */
  position: fixed; left: 18px; bottom: 18px; z-index: 9980;
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--et-pulse); color: #fff; font-weight: 700; font-size: .95rem;
  padding: 13px 20px; border-radius: 999px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--et-pulse) 50%, transparent);
  animation: et-bubble-pulse 2.4s ease-in-out infinite;
}
.et-bubble .et-start-pulse { width: 10px; height: 10px; }
@keyframes et-bubble-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px color-mix(in srgb, var(--et-pulse) 50%, transparent); }
  50% { transform: scale(1.05); box-shadow: 0 12px 38px color-mix(in srgb, var(--et-pulse) 65%, transparent); }
}

/* ---------- Inline article CTA card ---------- */
.et-inline { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--et-surface); color: var(--et-fg); border-radius: var(--et-radius);
  padding: 18px 20px; margin: 28px 0; }
.et-inline strong { display: block; font-size: 1.05rem; }
.et-inline span { color: var(--et-muted); font-size: .88rem; }
.et-inline a { flex-shrink: 0; background: var(--et-pulse); color: #fff; font-weight: 700;
  text-decoration: none; padding: 12px 18px; border-radius: 999px; }

/* ---------- Compact phones: the whole quiz AND the result must fit one
   screen — no scrolling, ever (owner rule 2026-08-03). ---------- */
@media (max-width: 480px), (max-height: 700px) {
  .et-topbar { padding: 10px 12px 2px; }
  .et-ecg { height: 30px; }
  .et-q { padding: 6px 16px 12px; }
  .et-q-text { font-size: 1.1rem; line-height: 1.25; margin-bottom: .25em; }
  .et-q-help { font-size: .8rem; margin-bottom: .4em; }
  .et-opts { gap: 8px; margin-top: .6em; }
  .et-opt { padding: 11px 14px; font-size: .92rem; border-radius: 12px; }
  .et-gauge { width: min(36vw, 140px); margin-bottom: 2px; }
  .et-gauge-num { font-size: 1.7rem; }
  .et-band { font-size: .7rem; }
  .et-headline { font-size: 1.1rem; margin: .2em 0; }
  .et-body { font-size: .85rem; margin-bottom: .4em; }
  .et-note { font-size: .7rem; }
  .et-ctas { gap: 12px; margin-top: 10px; }
  .et-cta { padding: 12px 14px; }
  .et-cta-wa { font-size: .98rem; }
  .et-cta-call { font-size: .92rem; }
  .et-reassure { font-size: .75rem; }
}

/* Ultra-short viewports (small phones with browser chrome, e.g. iPhone SE):
   one more notch down so a 6-option question still fits without scrolling. */
@media (max-height: 560px) {
  .et-topbar { padding: 8px 10px 0; }
  .et-ecg { height: 24px; }
  .et-q { padding: 4px 14px 10px; }
  .et-q-text { font-size: 1rem; }
  .et-q-help { font-size: .75rem; margin-bottom: .3em; }
  .et-opts { gap: 6px; margin-top: .5em; }
  .et-opt { padding: 9px 12px; font-size: .88rem; border-radius: 10px; }
  .et-gauge { width: min(30vw, 110px); }
  .et-gauge-num { font-size: 1.5rem; }
  .et-body { font-size: .8rem; }
  .et-ctas { gap: 10px; margin-top: 8px; }
  .et-cta { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .et-start-pulse, .et-ecg-dot, .et-heart, .et-bubble { animation: none; }
  .et-q, .et-ecg-fill { transition: none; }
}
