/* =========================================================
   HOOK LAB styles (uses brand vars from /style.css)
========================================================= */
#neural-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
.hl-main { position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.hl-crumbs { font-size: .85rem; color: var(--text-muted); margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.hl-crumbs > * { display: inline-flex; align-items: center; min-height: 40px; line-height: 1; }
.hl-crumbs a { color: var(--text-muted); font-weight: 600; text-decoration: none; }
.hl-crumbs a:hover { color: var(--c1); }
.hl-crumbs [aria-current] { color: var(--text-main); font-weight: 600; }
.hl-head { margin-bottom: 2rem; }
.hl-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 100px; margin-bottom: 1rem;
    font: 700 .78rem 'DM Sans', sans-serif; color: var(--text-main); background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.35);
}
.hl-live { width: 8px; height: 8px; border-radius: 50%; background: #10B981; animation: hlPulse 2s infinite; }
@keyframes hlPulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 70% { box-shadow: 0 0 0 9px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.page-sub b { color: var(--text-main); }

/* ---------- toolbar ---------- */
.hl-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.hl-plats { display: flex; gap: .45rem; flex-wrap: wrap; }
.hl-plat {
    display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 14px; cursor: pointer;
    font: 700 .9rem 'DM Sans', sans-serif; color: var(--text-muted); background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.2); transition: .25s;
}
.hl-plat:hover { color: var(--text-main); border-color: rgba(124,58,237,.45); }
.hl-plat.on { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; box-shadow: 0 8px 22px rgba(124,58,237,.35); }
.hl-mode { display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.2); }
.hl-mode button { min-height: 38px; padding: 0 14px; border-radius: 10px; border: none; cursor: pointer; font: 700 .85rem 'DM Sans', sans-serif; color: var(--text-muted); background: transparent; transition: .25s; }
.hl-mode button.on { color: var(--text-main); background: var(--bg-page); box-shadow: 0 4px 12px rgba(0,0,0,.15); }

/* ---------- layout ---------- */
.hl-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 1.2rem; margin-bottom: 1.2rem; align-items: start; }
.hl-grid-2 { grid-template-columns: 1.15fr .85fr; }
.hl-col { display: flex; flex-direction: column; gap: 1.2rem; min-width: 0; }
.hl-card { padding: 1.4rem !important; border-radius: 22px !important; }
.hl-card-h { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.hl-card-h h2 { font-family: 'Syne', sans-serif; font-size: 1.15rem; margin: 0; color: var(--text-main); }
.hl-muted { color: var(--text-muted); font-size: .88rem; margin: 0 0 .9rem; }
.hl-only-ab { display: none !important; }
.hl-lab.ab .hl-only-ab { display: block !important; }
.hl-lab.ab .hl-gauges .hl-vs { display: grid !important; }
.hl-lab.ab .hl-only-single { display: none !important; }

/* ---------- input ---------- */
.hl-label { display: flex; align-items: center; gap: 8px; font: 700 .95rem 'DM Sans', sans-serif; color: var(--text-main); margin-bottom: .6rem; }
.hl-label small { font-weight: 500; color: var(--text-muted); }
.ab-tag { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font: 800 .75rem 'Syne', sans-serif; color: #fff; background: var(--c1); }
.ab-tag.b { background: var(--c3); }
.hl-input textarea {
    width: 100%; box-sizing: border-box; resize: vertical; min-height: 120px; padding: 1rem 1.1rem; border-radius: 16px; outline: none;
    font: 500 1.08rem/1.55 'DM Sans', sans-serif; color: var(--text-main); background: rgba(148,163,184,.08); border: 1.5px solid rgba(148,163,184,.25);
    transition: border-color .2s, box-shadow .2s;
}
.hl-input textarea:focus { border-color: var(--c2); box-shadow: 0 0 0 4px rgba(124,58,237,.15); }
.hl-cut { height: 5px; border-radius: 5px; margin: .7rem 0 .5rem; background: rgba(148,163,184,.18); overflow: hidden; position: relative; }
.hl-cut i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--c2)); transition: width .25s; }
.hl-cut.over i { background: linear-gradient(90deg, #F59E0B, #EF4444); }
.hl-row { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hl-row-btns { display: flex; gap: .4rem; }
.hl-count { font: 600 .8rem 'DM Sans', sans-serif; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hl-count.over { color: #F59E0B; }

/* ---------- buttons ---------- */
.hl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 14px; cursor: pointer;
    font: 700 .9rem 'DM Sans', sans-serif; text-decoration: none; color: #fff !important; border: none;
    background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 20px rgba(124,58,237,.3); transition: transform .2s, box-shadow .2s, opacity .2s;
}
.hl-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(124,58,237,.4); }
.hl-btn:disabled { opacity: .45; pointer-events: none; }
.hl-btn.ghost { color: var(--text-main) !important; background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.25); box-shadow: none; }
.hl-btn.ghost:hover { border-color: var(--c2); }
.hl-btn.sm { min-height: 38px; padding: 0 12px; font-size: .82rem; border-radius: 11px; }
#hlShuffle.spin { animation: hlSpin .5s; }
@keyframes hlSpin { 50% { transform: rotate(-8deg) scale(1.08); } }

/* ---------- x-ray ---------- */
.hl-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: .8rem; }
.hl-legend span { font: 700 .68rem 'DM Sans', sans-serif; padding: 3px 8px; border-radius: 6px; }
.hl-highlight { font: 500 1.05rem/1.7 'DM Sans', sans-serif; color: var(--text-main); margin: 0 0 1rem; padding: 1rem; border-radius: 14px; background: rgba(148,163,184,.07); min-height: 3.2em; word-break: break-word; }
.hl-ph { color: var(--text-muted); font-size: .92rem; }
mark, .hl-legend span { color: inherit; }
.mk-cur { background: rgba(139,92,246,.22); box-shadow: inset 0 -2px 0 #8B5CF6; }
.mk-num { background: rgba(59,130,246,.22); box-shadow: inset 0 -2px 0 #3B82F6; }
.mk-pow { background: rgba(236,72,153,.2); box-shadow: inset 0 -2px 0 #EC4899; }
.mk-you { background: rgba(16,185,129,.2); box-shadow: inset 0 -2px 0 #10B981; }
.mk-warn { background: rgba(245,158,11,.22); box-shadow: inset 0 -2px 0 #F59E0B; }
.mk-bad { background: rgba(239,68,68,.22); box-shadow: inset 0 -2px 0 #EF4444; text-decoration: line-through; text-decoration-color: rgba(239,68,68,.7); }
.hl-legend .mk-bad { text-decoration: none; }
mark { border-radius: 4px; padding: 0 2px; }
.hl-signals { display: grid; gap: .5rem; }
.hl-sig { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 12px; background: rgba(148,163,184,.07); animation: hlIn .35s ease both; }
.hl-sig b { display: block; font-size: .88rem; color: var(--text-main); }
.hl-sig small { display: block; font-size: .8rem; color: var(--text-muted); line-height: 1.4; }
.hl-sig-ic { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 .75rem 'DM Sans', sans-serif; color: #fff; margin-top: 1px; }
.hl-sig.good .hl-sig-ic { background: #10B981; } .hl-sig.warn .hl-sig-ic { background: #F59E0B; } .hl-sig.bad .hl-sig-ic { background: #EF4444; }
@keyframes hlIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- gauge ---------- */
.hl-score { position: sticky; top: 92px; }
.hl-gauges { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.hl-lab.ab .hl-gauges { display: grid; grid-template-columns: 1fr auto 1fr; }
.hl-gauge { position: relative; width: 100%; max-width: 320px; margin: 0 auto; text-align: center; --gc: #64748B; }
.hl-gauge svg { width: 100%; display: block; overflow: visible; }
.g-track, .g-val { fill: none; stroke-width: 18; stroke-linecap: round; }
.g-track { stroke: rgba(148,163,184,.16); }
.g-val { filter: drop-shadow(0 0 8px rgba(139,92,246,.45)); }
.g-ticks line { stroke: rgba(148,163,184,.4); stroke-width: 2; stroke-linecap: round; }
.g-needle line { stroke: var(--text-main); stroke-width: 4; stroke-linecap: round; }
.g-needle circle { fill: var(--text-main); }
.g-read { margin-top: -6px; position: relative; }
.g-num { font: 800 3.4rem/1 'Syne', sans-serif; color: var(--text-main); font-variant-numeric: tabular-nums; }
.g-read small { font: 700 1rem 'DM Sans', sans-serif; color: var(--text-muted); margin-left: 2px; }
.g-grade { margin-top: .35rem; font: 800 1.1rem 'Syne', sans-serif; min-height: 1.6em; color: var(--text-muted); }
.g-grade span { display: inline-block; animation: hlIn .4s ease both; }
.hl-lab.ab .g-num { font-size: 2.4rem; }
.hl-lab.ab .g-grade { font-size: .9rem; }
.hl-vs { place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 800 .8rem 'Syne', sans-serif; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c3)); }

/* ---------- Fifi coach ---------- */
.hl-coach { display: flex; align-items: flex-end; gap: .7rem; margin: 1.2rem 0 1.1rem; }
.hl-coach-av { flex-shrink: 0; width: 52px; height: 52px; padding: 0; border-radius: 50%; cursor: pointer; border: none; background: #fff; box-shadow: 0 0 0 3px rgba(124,58,237,.45), 0 8px 20px rgba(37,99,235,.35); animation: hlBob 2.6s ease-in-out infinite; }
.hl-coach-av img { width: 46px; height: 46px; border-radius: 50%; display: block; margin: auto; }
.hl-coach-av.boing { animation: hlBoing .5s cubic-bezier(.34,1.8,.64,1); }
@keyframes hlBob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes hlBoing { 30% { transform: scale(1.2, .85); } 60% { transform: scale(.92, 1.12) translateY(-6px); } }
.hl-coach-bubble { flex: 1; padding: .75rem 1rem; border-radius: 18px 18px 18px 5px; background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.25); min-height: 2.6em; }
.hl-coach-bubble small { display: block; font: 800 .65rem 'DM Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--c2); margin-bottom: 2px; }
.hl-coach-bubble span { font: 600 .92rem/1.45 'DM Sans', sans-serif; color: var(--text-main); }

/* ---------- metrics ---------- */
.hl-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.1rem; margin-bottom: 1.2rem; }
.hl-metric { cursor: help; }
.hl-m-top { display: flex; justify-content: space-between; font: 600 .84rem 'DM Sans', sans-serif; color: var(--text-muted); margin-bottom: 5px; }
.hl-m-top b { color: var(--text-main); font-variant-numeric: tabular-nums; }
.hl-m-bar { height: 8px; border-radius: 8px; background: rgba(148,163,184,.16); overflow: hidden; }
.hl-m-bar i { display: block; height: 100%; border-radius: inherit; transition: width .7s cubic-bezier(.25,.8,.25,1); }
.hl-share-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: .6rem; }

/* ---------- compare ---------- */
.hl-compare { margin-bottom: 1.2rem; }
.hl-winner { text-align: center; padding: .8rem; border-radius: 14px; margin-bottom: 1rem; font: 800 1rem 'Syne', sans-serif; color: var(--text-main); background: rgba(148,163,184,.1); animation: hlIn .4s ease both; }
.hl-winner.w1 { background: rgba(37,99,235,.15); border: 1px solid rgba(37,99,235,.4); }
.hl-winner.w2 { background: rgba(219,39,119,.13); border: 1px solid rgba(219,39,119,.4); }
.hl-cmp { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: .5rem; margin-bottom: .55rem; }
.hl-cmp > span { font: 700 .9rem 'DM Sans', sans-serif; color: var(--text-muted); text-align: center; font-variant-numeric: tabular-nums; }
.hl-cmp > span.lead { color: var(--text-main); }
.hl-cmp-bars { position: relative; display: flex; align-items: center; justify-content: center; height: 26px; border-radius: 8px; background: rgba(148,163,184,.1); overflow: hidden; }
.hl-cmp-bars i { position: absolute; top: 0; bottom: 0; transition: width .6s; }
.hl-cmp-bars .ba { right: 50%; background: linear-gradient(270deg, rgba(37,99,235,.55), rgba(37,99,235,.15)); }
.hl-cmp-bars .bb { left: 50%; background: linear-gradient(90deg, rgba(219,39,119,.55), rgba(219,39,119,.15)); }
.hl-cmp-bars em { position: relative; z-index: 1; font: 700 .72rem 'DM Sans', sans-serif; font-style: normal; color: var(--text-main); }

/* ---------- rewrites ---------- */
.hl-rewrites { display: grid; gap: .7rem; }
.hl-rw { display: grid; grid-template-columns: 58px 1fr; gap: .4rem .9rem; align-items: center; padding: .9rem; border-radius: 16px; background: rgba(148,163,184,.07); border: 1px solid rgba(148,163,184,.15); animation: hlIn .45s ease both; animation-delay: var(--d); transition: border-color .25s; }
.hl-rw:hover { border-color: rgba(124,58,237,.45); }
.hl-rw-score { grid-row: span 2; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; align-content: center; background: color-mix(in srgb, var(--gc) 16%, transparent); border: 1.5px solid var(--gc); }
.hl-rw-score b { font: 800 1.25rem/1 'Syne', sans-serif; color: var(--text-main); }
.hl-rw-score small { font-size: .8rem; }
.hl-rw p { margin: 0; font: 600 .98rem/1.45 'DM Sans', sans-serif; color: var(--text-main); }
.hl-rw-act { display: flex; gap: .4rem; }

/* ---------- phone preview ---------- */
.hl-phone { position: relative; width: 100%; max-width: 320px; margin: 0 auto; padding: 14px 10px 18px; border-radius: 38px; background: #0B0F1A; border: 2px solid rgba(148,163,184,.3); box-shadow: 0 25px 50px rgba(0,0,0,.35), inset 0 0 0 6px #111827; }
.hl-notch { width: 90px; height: 20px; margin: 0 auto 8px; border-radius: 0 0 14px 14px; background: #000; }
.hl-screen { min-height: 360px; border-radius: 22px; overflow: hidden; background: #fff; color: #111; font-family: -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 13px; line-height: 1.45; }
.hl-screen[data-p="x"] { background: #000; color: #E7E9EA; }
.pv-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.pv-head img { width: 36px; height: 36px; border-radius: 50%; background: #E0E7FF; }
.pv-head b { font-size: 13px; } .pv-head small { display: block; color: #666; font-size: 11px; line-height: 1.3; }
.pv-follow { margin-left: auto; color: #0A66C2; font-weight: 700; font-size: 12px; }
.pv-text { padding: 0 12px 10px; margin: 0; white-space: normal; word-break: break-word; }
.pv-more { color: #666; font-weight: 600; }
.pv-li .pv-media { height: 150px; background: linear-gradient(135deg, #2563EB, #7C3AED, #DB2777); opacity: .85; }
.pv-react { display: flex; gap: 6px; padding: 8px 12px; font-size: 11px; color: #666; border-bottom: 1px solid #eee; }
.pv-react .r { margin-left: auto; }
.pv-actions { display: flex; justify-content: space-around; padding: 9px 4px; font-size: 11px; font-weight: 600; color: #555; }
.pv-ig .pv-head .dots { margin-left: auto; color: #444; }
.pv-media.ig { aspect-ratio: 1; background: radial-gradient(circle at 30% 30%, #F472B6, #7C3AED 55%, #1E1B4B); }
.pv-icons { padding: 9px 12px 4px; font-size: 18px; letter-spacing: 6px; } .pv-icons span { float: right; }
.pv-likes { display: block; padding: 0 12px 4px; font-size: 12px; }
.pv-x .pv-head img { background: #1D2B53; } .pv-x .pv-head small { color: #71767B; display: inline; }
.pv-x .v { color: #1D9BF0; }
.pv-x .pv-text { font-size: 14px; padding-top: 2px; }
.pv-xa { display: flex; justify-content: space-between; padding: 10px 14px; color: #71767B; font-size: 12px; border-bottom: 1px solid #2F3336; }
.pv-count { padding: 8px 14px; text-align: right; font-size: 11px; color: #71767B; } .pv-count.over { color: #F4212E; font-weight: 700; }
.pv-mail-top { padding: 14px 14px 8px; font-size: 20px; font-weight: 800; }
.pv-row { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #eee; }
.pv-row > div { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr auto; }
.pv-row b { font-size: 13px; } .pv-row em { font-style: normal; color: #888; font-size: 11px; }
.pv-row strong, .pv-row small { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-row strong { font-size: 13px; font-weight: 600; } .pv-row small { color: #888; font-size: 12px; }
.pv-row.me { background: #EEF2FF; } .pv-row.me strong { font-weight: 800; }
.pv-dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #2563EB; flex-shrink: 0; }

/* ---------- history ---------- */
.hl-history { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; }
.hl-hist { flex: 0 0 240px; display: flex; gap: .7rem; align-items: center; text-align: left; padding: .7rem .8rem; border-radius: 14px; cursor: pointer; border: 1px solid rgba(148,163,184,.2); background: rgba(148,163,184,.07); color: var(--text-main); font: 500 .84rem/1.35 'DM Sans', sans-serif; min-height: 44px; }
.hl-hist:hover { border-color: var(--c2); }
.hl-hist b { font: 800 1.2rem 'Syne', sans-serif; }
.hl-hist span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- sections ---------- */
.hl-sec-head { text-align: center; margin: 4rem auto 1.6rem; max-width: 640px; }
.hl-sec-head h2 { font-family: 'Syne', sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem; color: var(--text-main); }
.hl-sec-head p { color: var(--text-muted); margin: 0; }
.hl-sec-head em { font-style: normal; color: var(--c2); font-weight: 700; }
.hl-lib-tools { display: flex; flex-direction: column; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.hl-lib-tools input { width: min(520px, 100%); min-height: 48px; padding: 0 18px; border-radius: 14px; outline: none; font: 500 .95rem 'DM Sans', sans-serif; color: var(--text-main); background: rgba(148,163,184,.1); border: 1.5px solid rgba(148,163,184,.25); box-sizing: border-box; }
.hl-lib-tools input:focus { border-color: var(--c2); }
.hl-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.hl-chip { min-height: 38px; padding: 0 14px; border-radius: 100px; cursor: pointer; font: 700 .82rem 'DM Sans', sans-serif; color: var(--text-muted); background: rgba(148,163,184,.1); border: 1px solid rgba(148,163,184,.2); transition: .2s; }
.hl-chip.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.hl-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.hl-formula { position: relative; display: flex; flex-direction: column; gap: .4rem; text-align: left; padding: 1rem 1rem 2.2rem; border-radius: 16px; cursor: pointer; border: 1px solid rgba(148,163,184,.2); background: rgba(148,163,184,.06); color: var(--text-main); font: 600 .95rem/1.45 'DM Sans', sans-serif; transition: transform .25s, border-color .25s, background .25s; }
.hl-formula:hover { transform: translateY(-3px); border-color: var(--c2); background: rgba(124,58,237,.08); }
.hl-formula small { font: 800 .65rem 'DM Sans', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--c2); }
.hl-formula em { font-style: normal; color: var(--c1); }
body.dark-mode .hl-formula em { color: #93C5FD; }
.hl-formula i { position: absolute; right: 1rem; bottom: .8rem; font: 700 .78rem 'DM Sans', sans-serif; font-style: normal; color: var(--text-muted); transition: color .2s, transform .2s; }
.hl-formula:hover i { color: var(--c2); transform: translateX(3px); }
.hl-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.hl-how-card { padding: 1.3rem !important; border-radius: 20px !important; }
.hl-how-card > span { font-size: 1.6rem; }
.hl-how-card h3 { font-family: 'Syne', sans-serif; font-size: 1.05rem; margin: .5rem 0 .35rem; color: var(--text-main); }
.hl-how-card p { margin: 0; color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.hl-cta { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 4rem; padding: 2rem !important; border-radius: 24px !important; background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.12), rgba(219,39,119,.1)) !important; }
.hl-cta h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; margin: 0 0 .3rem; color: var(--text-main); }
.hl-cta p { margin: 0; color: var(--text-muted); }
.hl-cta-btns { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- toast + confetti ---------- */
.hl-toast { position: fixed; left: 50%; bottom: 28px; z-index: 10001; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 18px; border-radius: 100px; font: 700 .9rem 'DM Sans', sans-serif; color: #fff; background: #111827; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: .3s; }
.hl-toast.in { opacity: 1; transform: translate(-50%, 0); }
.hl-confetti { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }

/* ---------- light mode ---------- */
body:not(.dark-mode) .g-needle line { stroke: #0F172A; } body:not(.dark-mode) .g-needle circle { fill: #0F172A; }
body:not(.dark-mode) .hl-mode button.on { background: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .hl-grid, .hl-grid-2 { grid-template-columns: 1fr; }
    .hl-score { position: static; }
    .hl-how-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .hl-main { padding-top: .5rem; }
    .hl-toolbar { flex-direction: column; align-items: stretch; }
    .hl-plats { display: grid; grid-template-columns: 1fr 1fr; }
    .hl-plat { justify-content: center; padding: 0 10px; font-size: .84rem; }
    .hl-mode { align-self: center; }
    .hl-card { padding: 1.1rem !important; }
    .hl-metrics { grid-template-columns: 1fr; gap: .65rem; }
    .g-num { font-size: 3rem; }
    .hl-share-row { grid-template-columns: 1fr; }
    .hl-lab.ab .hl-gauges { grid-template-columns: 1fr 1fr; }
    .hl-lab.ab .hl-vs { display: none !important; }
    .hl-how-grid { grid-template-columns: 1fr; }
    .hl-cta { padding: 1.4rem !important; }
    .hl-rw { grid-template-columns: 50px 1fr; }
    .hl-rw-score { width: 50px; height: 50px; }
    .hl-row-btns { width: 100%; } .hl-row-btns .hl-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .hl-coach-av, .hl-live { animation: none; }
    .hl-sig, .hl-rw, .hl-winner, .g-grade span { animation: none; }
}

/* ===== Mobile: score right under the input, floating mini score ===== */
@media (max-width: 960px) {
    .hl-grid:not(.hl-grid-2) { display: flex; flex-direction: column; }
    .hl-grid:not(.hl-grid-2) > .hl-col { display: contents; }
    .hl-grid:not(.hl-grid-2) .hl-input { order: 1; }
    .hl-grid:not(.hl-grid-2) .hl-only-ab.hl-input { order: 2; }
    .hl-grid:not(.hl-grid-2) .hl-score { order: 3; }
    .hl-grid:not(.hl-grid-2) .hl-only-single { order: 4; }
    .hl-grid:not(.hl-grid-2) > .hl-col > * { order: 5; }
    .hl-grid:not(.hl-grid-2) > .hl-col > .hl-input { order: 1; }
    .hl-grid:not(.hl-grid-2) > .hl-col > .hl-only-ab.hl-input { order: 2; }
    .hl-grid:not(.hl-grid-2) > .hl-col > .hl-score { order: 3; }
    .hl-grid:not(.hl-grid-2) > .hl-col > .hl-only-single { order: 4; }
    .hl-grid:not(.hl-grid-2) textarea { font-size: 16px; } /* stops iOS zoom on focus */
}
.hl-mini { position: fixed; left: 14px; bottom: 18px; z-index: 900; display: none; align-items: center; gap: 8px; padding: 9px 14px 9px 10px; border-radius: 100px;
    font: 700 .9rem 'DM Sans', sans-serif; color: #fff; background: rgba(15,23,42,.92); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 30px rgba(0,0,0,.35);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .25s; }
.hl-mini b { display: grid; place-items: center; min-width: 34px; height: 34px; border-radius: 50%; font: 800 .95rem 'Syne', sans-serif; background: var(--mc, #64748B); }
.hl-mini.in { opacity: 1; transform: none; }
@media (max-width: 960px) { .hl-mini { display: inline-flex; } body:has(.hl-mini.in) .scroll-to-top { opacity: 0 !important; pointer-events: none; } }

/* a11y contrast */
body.dark-mode .hl-formula small { color: #C4B5FD; }
.hl-sec-head p em { color: var(--text-main); }
