/* Home page: "Do you know who is talking to your child right now?" (owner, 15 Nov 2026). Built by assets/worry.js.
   The questions (left) and the chat (right): a night-time chat in the app's colours in every theme; the rest of the
   section uses the active palette's tokens. Every rule is scoped to #worry. */
#worry{overflow:hidden}
#worry::before{content:"";position:absolute;right:-200px;top:18%;width:620px;height:620px;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,color-mix(in srgb,#E11D48 14%,transparent),transparent);animation:wqOrb 16s ease-in-out infinite alternate}
@keyframes wqOrb{to{transform:translate(-140px,90px) scale(1.12)}}
#worry .wq-head{max-width:760px;margin:0 auto clamp(28px,4vw,48px);text-align:center}
#worry .wq-head h2{margin:10px 0 12px}
#worry .wq-head .lead{margin:0 auto}

#worry .wq-stage{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr);gap:clamp(20px,3.5vw,48px);align-items:center}

/* the three questions (the tabs) */
#worry .wq-qs{list-style:none;margin:0;padding:0;display:grid;gap:12px}
#worry .wq-qs button{position:relative;overflow:hidden;width:100%;display:flex;align-items:center;gap:14px;padding:18px 20px;text-align:left;cursor:pointer;
  border-radius:var(--r);border:1px solid var(--line);background:var(--surface);color:var(--text);font:inherit;
  transition:border-color .35s,background .35s,box-shadow .35s,translate .3s var(--ease)}
#worry .wq-qs button:hover{translate:4px 0}
#worry .wq-qs button[aria-current="true"]{border-color:var(--accent-2);background:var(--surface-2);box-shadow:0 18px 40px -22px var(--glow)}
/* the question that is playing: a bar on the left and a ring round its face */
#worry .wq-qs button::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--fill);transform:scaleY(0);transition:transform .45s var(--ease)}
#worry .wq-qs button[aria-current="true"]::before{transform:none}
#worry .wq-qs button[aria-current="true"] .wq-av{box-shadow:0 0 0 4px color-mix(in srgb,var(--accent-2) 30%,transparent)}
#worry .wq-qs button>span{flex:1;min-width:0;display:grid;gap:3px}
#worry .wq-qs small{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
#worry .wq-qs b{font-size:clamp(16px,1.35vw,19px);line-height:1.3;font-weight:600}
#worry .wq-qs button[aria-current="true"] b{color:var(--text)}
#worry .wq-qs button:not([aria-current="true"]) b{color:var(--muted)}
/* how long this moment has left to play */
#worry .wq-bar{position:absolute;left:0;bottom:0;height:3px;width:100%;background:var(--fill);transform:scaleX(0);transform-origin:left}
#worry .wq-qs button.run .wq-bar{animation:wqBar var(--dur,10s) linear forwards}
@keyframes wqBar{to{transform:scaleX(1)}}
#worry .wq-av{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font:700 16px/1 var(--font);font-style:normal;color:#fff}
#worry .wq-av.kid{background:linear-gradient(135deg,#FB7185,#E11D48)}
#worry .wq-av.elder{background:linear-gradient(135deg,#FBBF24,#D97706)}
#worry .wq-av.you{background:linear-gradient(135deg,#38BDF8,#1E5BFF)}

/* the chat: night colours, like the app */
#worry .wq-chat{position:relative;overflow:hidden;height:550px;border-radius:26px;color:#EAF0FF;display:flex;flex-direction:column;
  background:radial-gradient(420px 260px at 90% 0,rgba(63,203,255,.22),transparent 70%),linear-gradient(170deg,#0D1B3E,#091127 60%,#120B2E);
  border:1px solid rgba(255,255,255,.1);box-shadow:0 40px 80px -40px rgba(3,6,20,.8)}
#worry .wq-top{flex:none;display:flex;align-items:center;gap:12px;padding:14px 18px;background:rgba(255,255,255,.05);border-bottom:1px solid rgba(255,255,255,.08)}
#worry .wq-back{font-size:26px;line-height:1;opacity:.7}
#worry .wq-top .wq-av{width:38px;height:38px;font-size:15px}
#worry .wq-who{flex:1;min-width:0;display:grid}
#worry .wq-who b{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#worry .wq-who small{font-size:12px;opacity:.65}
#worry .wq-app{flex:none;font-size:11px;font-weight:600;letter-spacing:.06em;padding:4px 10px;border-radius:99px;background:rgba(255,255,255,.1)}
#worry .wq-body{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;gap:9px;padding:16px 18px 110px}
/* messages arrive one by one */
#worry .wq-msg{align-self:flex-start;max-width:84%;display:none}
#worry .wq-msg.in{display:block;animation:wqPop .45s cubic-bezier(.2,.8,.2,1)}
@keyframes wqPop{from{opacity:0;transform:translateY(10px) scale(.96)}to{opacity:1;transform:none}}
#worry .wq-msg p{margin:0;padding:10px 14px;border-radius:18px 18px 18px 6px;background:rgba(255,255,255,.1);font-size:14.5px;line-height:1.45;transition:box-shadow .4s,background .4s}
#worry .wq-flag{display:inline-block;margin:6px 0 0 6px;padding:3px 10px;border-radius:99px;font-size:11.5px;font-weight:600;color:#FFE4E1;background:rgba(220,38,38,.85);
  opacity:0;transform:translateY(-4px) scale(.9);transition:opacity .35s,transform .35s}
#worry .wq-chat.flagged .wq-msg.flag p{background:rgba(220,38,38,.18);box-shadow:inset 0 0 0 1.5px rgba(255,107,107,.9)}
#worry .wq-chat.flagged .wq-flag{opacity:1;transform:none}
#worry .wq-chat.flagged .wq-msg.flag:nth-of-type(2) .wq-flag{transition-delay:.12s}
#worry .wq-chat.flagged .wq-msg.flag:nth-of-type(3) .wq-flag{transition-delay:.24s}
#worry .wq-chat.flagged .wq-msg.flag:nth-of-type(4) .wq-flag{transition-delay:.36s}
/* typing dots */
#worry .wq-typing{display:none;align-self:flex-start;gap:4px;padding:12px 14px;border-radius:18px 18px 18px 6px;background:rgba(255,255,255,.1)}
#worry .wq-typing.on{display:flex}
#worry .wq-typing i{width:6px;height:6px;border-radius:50%;background:#C9D6F5;animation:wqDot 1s ease-in-out infinite}
#worry .wq-typing i:nth-child(2){animation-delay:.15s}#worry .wq-typing i:nth-child(3){animation-delay:.3s}
@keyframes wqDot{0%,100%{opacity:.3;transform:none}50%{opacity:1;transform:translateY(-3px)}}
/* CyberHasp scans the chat */
#worry .wq-scan{position:absolute;left:0;right:0;top:0;height:70px;pointer-events:none;opacity:0;
  background:linear-gradient(180deg,transparent,rgba(46,197,255,.28) 70%,rgba(46,197,255,.9) 98%,transparent)}
#worry .wq-chat.scanned .wq-scan{animation:wqScan 1s ease-in-out}
@keyframes wqScan{0%{opacity:1;transform:translateY(-70px)}100%{opacity:0;transform:translateY(420px)}}
/* and its alert slides up */
#worry .wq-alert{position:absolute;left:14px;right:14px;bottom:14px;display:flex;gap:12px;padding:14px 16px;border-radius:20px;background:#fff;color:#0F2033;
  border-left:6px solid var(--al);box-shadow:0 20px 40px -14px rgba(0,0,0,.6);transform:translateY(130%);opacity:0;transition:transform .6s cubic-bezier(.2,.9,.25,1.12),opacity .3s}
#worry .wq-alert.bad{--al:#D63A2E}#worry .wq-alert.mid{--al:#E08A1E}
#worry .wq-chat.alerted .wq-alert{transform:none;opacity:1}
#worry .wq-sh{flex:none;width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:#EAF1FF}
#worry .wq-sh svg{width:26px;height:26px}
#worry .wq-alert>div{flex:1;min-width:0}
#worry .wq-alert p{display:flex;justify-content:space-between;margin:0 0 2px;font-size:12.5px;color:#4A5B70}
#worry .wq-alert strong{display:block;font-size:15.5px;color:var(--al);filter:brightness(.85)}
#worry .wq-alert em{display:block;font-style:normal;font-size:13.5px;line-height:1.4;color:#3A4A5E}

/* the figures */
#worry .wq-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(12px,2vw,24px);margin-top:clamp(32px,4vw,52px)}
#worry .wq-stat{padding:22px 24px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line)}
#worry .wq-stat b{display:block;font-size:clamp(30px,3.2vw,44px);line-height:1.05;font-weight:800;letter-spacing:-.03em;font-variant-numeric:tabular-nums;
  background:linear-gradient(100deg,var(--accent),var(--accent-2));-webkit-background-clip:text;background-clip:text;color:transparent}
#worry .wq-stat span{display:block;margin-top:8px;color:var(--muted);font-size:14.5px;line-height:1.5}
#worry .wq-src{margin:12px 0 0;text-align:center;font-size:12.5px;color:var(--muted)}

/* the way out */
#worry .wq-cta{margin-top:clamp(28px,3.5vw,44px);padding:clamp(22px,3vw,34px);border-radius:var(--r-lg);text-align:center;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 14%,var(--surface)),var(--surface));border:1px solid var(--line)}
#worry .wq-cta p{max-width:720px;margin:0 auto 18px;font-size:clamp(16px,1.4vw,19px);line-height:1.55;color:var(--muted)}
#worry .wq-cta p b{color:var(--text);font-weight:600}
#worry .wq-btns{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}

@media (max-width:900px){
  #worry .wq-stage{grid-template-columns:1fr}
  #worry .wq-chat{height:540px}
  #worry .wq-stats{grid-template-columns:1fr}
}
@media (max-width:560px){
  #worry .wq-qs button{padding:14px 16px}
  #worry .wq-qs b{font-size:15.5px}
  #worry .wq-chat{height:580px}
  #worry .wq-msg p{font-size:14px}
}
@media (prefers-reduced-motion:reduce){
  #worry::before,#worry .wq-msg.in,#worry .wq-typing i,#worry .wq-chat.scanned .wq-scan{animation:none!important}
  #worry .wq-alert,#worry .wq-flag{transition:none}}
html.reduce-motion #worry::before,html.reduce-motion #worry .wq-msg.in,html.reduce-motion #worry .wq-typing i,html.reduce-motion #worry .wq-chat.scanned .wq-scan{animation:none!important}
html.reduce-motion #worry .wq-alert,html.reduce-motion #worry .wq-flag{transition:none}
