/* AskItQuick — easy for everyone. Colors chosen to pass WCAG AA (most pass AAA). */
:root{--bg:#f4f6fb;--card:#ffffff;--ink:#0f172a;--muted:#334155;--brand:#1d4ed8;--navy:#1e3a8a;--accent:#fbbf24;--line:#94a3b8;--soft:#eef2ff;--radius:18px;--focus:#f59e0b}
html{font-size:112.5%} /* 18px base */
html[data-size="2"]{font-size:131.25%} /* 21px */
html[data-size="3"]{font-size:150%}    /* 24px */
*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.6;font-size:1rem}
a{color:var(--brand);text-underline-offset:3px}
h1,h2,h3{line-height:1.2}
.skip{position:absolute;left:-9999px;top:8px;background:#fff;color:#000;padding:12px 18px;border-radius:10px;z-index:100;font-weight:700}
.skip:focus{left:8px}
/* Visible focus everywhere: amber ring + dark halo works on light and dark backgrounds */
:focus-visible{outline:4px solid var(--focus);outline-offset:3px;box-shadow:0 0 0 8px #0f172a}
button,a,input{font:inherit}
button{cursor:pointer}

/* Top bar */
.topbar{background:var(--navy);color:#fff;display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between;align-items:center;padding:10px 18px}
.logo{display:inline-flex;align-items:center;gap:8px;color:#fff;text-decoration:none;font-weight:800;font-size:1.45rem;min-height:48px}
.logo-accent{color:var(--accent)}
.mascot{font-size:1.6rem;display:inline-block}
.tools{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.sizes{display:flex;align-items:center;gap:6px}
.tool-label{font-size:.9rem;color:#fff;margin-right:2px}
.size-btn,.tool-btn{min-width:48px;min-height:48px;padding:6px 12px;border-radius:12px;border:2px solid #fff;background:transparent;color:#fff;font-weight:800}
.size-btn.s2{font-size:1.15rem}.size-btn.s3{font-size:1.3rem}
.size-btn[aria-pressed="true"],.tool-btn[aria-pressed="true"]{background:#fff;color:var(--navy)}
.tool-btn{font-size:.95rem}

/* Hero */
.hero{background:var(--navy);color:#fff;text-align:center;padding:12px 18px 40px}
.hello{display:inline-flex;align-items:center;gap:10px;background:#fff;color:var(--ink);border-radius:999px;padding:6px 18px 6px 8px;margin:6px 0 14px;font-size:1rem}
.mascot-big{font-size:2rem;display:inline-block;animation:wave 2.4s ease-in-out 1}
@keyframes wave{0%,100%{transform:rotate(0)}20%{transform:rotate(-12deg)}40%{transform:rotate(10deg)}60%{transform:rotate(-6deg)}}
h1{font-size:clamp(2rem,6vw,3rem);margin:0 0 6px}
.tag{margin:0 0 20px;font-size:1.1rem;color:#fff}
.ask{max-width:760px;margin:0 auto;text-align:left}
.ask-label{display:block;font-weight:800;font-size:1.2rem;margin-bottom:8px;color:#fff}
.ask-row{display:flex;gap:10px;flex-wrap:wrap}
.ask input{flex:1 1 260px;min-height:64px;padding:12px 20px;font-size:1.25rem;border-radius:16px;border:3px solid #fff;color:var(--ink);background:#fff}
.ask input::placeholder{color:#475569}
.go-btn,.mic-btn{min-height:64px;padding:10px 20px;border-radius:16px;font-weight:800;font-size:1.15rem;border:3px solid #fff}
.go-btn{background:var(--accent);color:#0f172a;border-color:var(--accent)}
.mic-btn{background:#fff;color:var(--navy)}
.mic-btn.listening{background:#b91c1c;color:#fff;border-color:#fff}
.help{margin:10px 0 0;color:#fff;font-size:1rem}
.mic-status{min-height:0;margin:6px 0 0;font-weight:700;color:#fff}
.mic-fallback{margin:8px 0 0;background:#fff;color:var(--ink);border-radius:12px;padding:10px 14px;font-size:.95rem}
.results{list-style:none;margin:12px 0 0;padding:0}
.results li{margin:0 0 10px}
.result{display:block;width:100%;text-align:left;background:#fff;color:var(--ink);border:3px solid #fff;border-radius:14px;padding:12px 16px;min-height:56px}
.result:hover{border-color:var(--accent)}
.result strong{display:block;font-size:1.1rem}
.result small{display:block;color:var(--muted);font-size:.95rem}
.quick-title{font-size:1.3rem;margin:30px 0 14px;color:#fff}
.quick{max-width:1000px;margin:0 auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.qbtn{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:120px;padding:12px 8px;border-radius:20px;border:3px solid #fff;background:#fff;color:var(--ink);font-weight:800;font-size:1.05rem;line-height:1.25;transition:transform .15s}
.qbtn .em{font-size:2.6rem;line-height:1}
.qbtn:hover{transform:translateY(-3px);border-color:var(--accent)}
.qbtn.fun{background:var(--accent);border-color:var(--accent)}

/* Answer panel */
.answer-panel{max-width:860px;margin:-22px auto 26px;background:#fff;border:4px solid var(--navy);border-radius:24px;padding:22px 24px;text-align:center;box-shadow:0 10px 30px rgba(15,23,42,.18);position:relative}
.answer-panel:focus{outline:none}
.answer-panel.pop{animation:pop .45s cubic-bezier(.2,1.4,.4,1)}
@keyframes pop{0%{transform:scale(.92);opacity:.4}100%{transform:scale(1);opacity:1}}
.cheer{margin:0;font-weight:800;color:#065f46;font-size:1.1rem}
.answer-icon{font-size:3.5rem;line-height:1.1;margin:4px 0}
.answer-panel h2{margin:4px 0 8px;font-size:1.5rem}
.answer-text{font-size:1.45rem;font-weight:700;margin:0 0 16px;line-height:1.45}
.answer-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.read-btn,.more-btn,.surprise-btn{display:inline-flex;align-items:center;gap:8px;min-height:52px;padding:8px 18px;border-radius:14px;font-weight:800;font-size:1.05rem;text-decoration:none;border:3px solid var(--navy)}
.read-btn{background:var(--navy);color:#fff}
.read-btn.speaking{background:#b91c1c;border-color:#b91c1c}
.more-btn{background:#fff;color:var(--navy)}
.surprise-btn{background:var(--accent);color:#0f172a;border-color:#0f172a}

/* Sections */
main{display:block}
#live,#trending,#howto{max-width:1100px;margin:0 auto 40px;padding:0 16px}
h2{font-size:1.7rem;margin:30px 0 16px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.live{background:var(--card);border-radius:var(--radius);padding:18px;border:2px solid #cbd5e1;display:flex;flex-direction:column;gap:2px}
.live .label{color:var(--muted);font-size:1rem;font-weight:700}
.live .big{font-size:1.8rem;font-weight:800;color:var(--brand);overflow-wrap:anywhere}
.live .big.long{font-size:1.15rem}
.live .sub{font-size:.95rem;color:var(--muted);margin-bottom:8px}
.live .read-btn{margin-top:auto;align-self:flex-start;font-size:.95rem;min-height:48px;padding:6px 14px}
.trending ol{background:#fff;border-radius:var(--radius);padding:16px 16px 16px 48px;margin:0;border:2px solid #cbd5e1;columns:2;column-gap:40px}
.trending li{margin:4px 0;break-inside:avoid}
.trending li a{display:inline-block;padding:10px 4px;min-height:48px;color:var(--ink);font-size:1.05rem}
.trending li a:hover{color:var(--brand)}
.answers{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:18px}
article.card{background:#fff;border-radius:var(--radius);padding:22px;border:2px solid #cbd5e1;scroll-margin-top:20px}
article.card h3{margin:0 0 8px;font-size:1.3rem}
article.card .easy{font-size:1.15rem;font-weight:700;background:#ecfdf5;border-left:6px solid #047857;padding:10px 14px;border-radius:8px;margin:8px 0}
article.card .easy::before{content:"Easy answer: ";color:#065f46}
article.card .short{font-weight:600;background:var(--soft);border-left:6px solid var(--brand);padding:8px 12px;border-radius:8px;margin:8px 0}
article.card ol,article.card ul{padding-left:24px;margin:8px 0}
article.card li{margin:6px 0}
article.card .src{font-size:.9rem;color:var(--muted)}
article.card .src a{display:inline-block;padding:6px 0}
article.card .read-btn{margin-top:6px}
article.card.flash,.live.flash{outline:5px solid var(--focus);outline-offset:3px}
.note{font-size:.95rem;color:#7c2d12;background:#fffbeb;border-radius:8px;padding:8px 10px;margin-top:8px}
kbd{background:#f1f5f9;border:1px solid #64748b;border-bottom-width:3px;border-radius:5px;padding:1px 7px;font-size:.9em;color:#0f172a}
footer{text-align:center;color:var(--muted);font-size:1rem;padding:24px 16px 40px}

/* Confetti (tiny, CSS only, removed after 1.5s) */
.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:50}
.confetti i{position:absolute;top:-12px;width:10px;height:14px;border-radius:2px;opacity:.95;animation:fall 1.4s ease-in forwards}
@keyframes fall{to{transform:translateY(105vh) rotate(540deg);opacity:.9}}

/* High contrast mode */
html.hc body{background:#000;color:#fff}
html.hc .topbar,html.hc .hero{background:#000;border-bottom:3px solid #fff}
html.hc .hello,html.hc .mic-fallback{background:#000;color:#fff;border:2px solid #fff}
html.hc a{color:#ffeb3b}
html.hc .ask input{background:#000;color:#fff;border-color:#ffeb3b}
html.hc .ask input::placeholder{color:#e5e5e5}
html.hc .go-btn,html.hc .qbtn.fun,html.hc .surprise-btn{background:#ffeb3b;color:#000;border-color:#ffeb3b}
html.hc .mic-btn,html.hc .qbtn,html.hc .result,html.hc .more-btn{background:#000;color:#fff;border-color:#fff}
html.hc .result small{color:#fff}
html.hc .answer-panel,html.hc .live,html.hc article.card,html.hc .trending ol{background:#000;color:#fff;border-color:#fff}
html.hc .cheer{color:#7CFC00}
html.hc .live .label,html.hc .live .sub,html.hc article.card .src,html.hc footer{color:#fff}
html.hc .live .big{color:#ffeb3b}
html.hc .trending li a{color:#fff}
html.hc article.card .easy{background:#000;color:#fff;border-left-color:#7CFC00}
html.hc article.card .easy::before{color:#7CFC00}
html.hc article.card .short{background:#000;color:#fff;border-left-color:#ffeb3b}
html.hc .note{background:#000;color:#ffeb3b;border:1px solid #ffeb3b}
html.hc kbd{background:#000;color:#fff;border-color:#fff}
html.hc .read-btn{background:#ffeb3b;color:#000;border-color:#ffeb3b}
html.hc .size-btn[aria-pressed="true"],html.hc .tool-btn[aria-pressed="true"]{background:#ffeb3b;color:#000;border-color:#ffeb3b}
html.hc :focus-visible{outline-color:#ffeb3b;box-shadow:0 0 0 8px #fff}

@media(max-width:640px){
  .trending ol{columns:1}.answers{grid-template-columns:1fr}
  .quick{grid-template-columns:repeat(2,1fr)}
  .ask-row .go-btn,.ask-row .mic-btn{flex:1 1 45%}
  .tool-label{display:none}
  .topbar{justify-content:center;padding:8px 10px}
  .tools{flex-wrap:nowrap;gap:6px}
  .size-btn{padding:4px 8px}
  .tool-btn{padding:4px 8px;font-size:.8rem}
}
@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .confetti{display:none}
}

/* Footer links + simple pages */
.foot-links{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px;margin-bottom:8px}
.foot-links a{display:inline-block;padding:12px 6px;min-height:48px;font-weight:700}
main.page{max-width:780px;margin:0 auto;padding:20px 18px 40px}
main.page h1{color:var(--ink);font-size:2.2rem}
main.page h2{font-size:1.4rem;margin:24px 0 8px}
.lead{font-size:1.2rem}
.back-btn{display:inline-flex;align-items:center;gap:8px;min-height:48px;padding:8px 16px;border:3px solid var(--navy);border-radius:14px;font-weight:800;text-decoration:none;color:var(--navy);background:#fff}
.contact label{display:block;font-weight:800;margin-bottom:6px}
.contact .opt{font-weight:400;color:var(--muted)}
.contact input,.contact select,.contact textarea{width:100%;min-height:56px;padding:12px 14px;font-size:1.1rem;border:3px solid #475569;border-radius:12px;background:#fff;color:var(--ink)}
.big-submit{min-height:60px;padding:10px 26px;border:3px solid #0f172a}
html.hc main.page h1{color:#fff}
html.hc .back-btn{background:#000;color:#ffeb3b;border-color:#ffeb3b}
html.hc .contact input,html.hc .contact select,html.hc .contact textarea{background:#000;color:#fff;border-color:#fff}
.answer-text.long{font-size:1.25rem;font-weight:600}
html.hc .contact .opt{color:#fff}
