:root{
  --bg:#ffffff; --card:#ffffff; --ink:#020817; --muted:#64748b;
  --blue:#4338ca; --indigo:#4f46e5; --blue-soft:#eef2ff; --green:#16a34a; --green-soft:#dcfce7;
  --red:#dc2626; --red-soft:#fee2e2; --amber:#d97706; --amber-soft:#fef3c7;
  --line:#e2e8f0; --slate:#475569; --lime:#a3e635; --lime-ink:#0a0a0a; --lime-soft:#ecfccb;
  --shadow:0 1px 2px rgba(2,8,23,.05),0 1px 3px rgba(2,8,23,.06);
  --shadow-lg:0 10px 30px rgba(2,8,23,.12);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent;}
body{margin:0; font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--ink); -webkit-font-smoothing:antialiased; display:flex; flex-direction:column; min-height:100vh;}
.hidden{display:none !important;}
a{color:var(--blue); text-decoration:none;}

/* ---------- header ---------- */
header.app{position:sticky; top:0; z-index:40; background:rgba(255,255,255,.92); backdrop-filter:blur(10px); color:var(--ink); border-bottom:1px solid var(--line);}
.hrow{max-width:1200px; height:64px; margin:0 auto; display:flex; align-items:center; justify-content:flex-start; gap:12px; padding:0 20px;}
.hrow .topnav, .hrow .nav-toggle{margin-left:auto;}
.logo{color:var(--green); font-size:18px; font-weight:800; letter-spacing:-.2px; display:flex; align-items:center; gap:9px;}
.logo span{font-weight:500;}
.logo span b{font-weight:800;}
/* Child Mode switch (left of logo) */
.kid-toggle{display:flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--card); border-radius:99px; padding:5px 10px 5px 8px; cursor:pointer; font-family:inherit; box-shadow:var(--shadow); transition:border-color .15s;}
@media (hover:hover){ .kid-toggle:hover{border-color:var(--blue);}}
.kid-toggle .kt-ico{font-size:15px; line-height:1; filter:grayscale(1) opacity(.55);}
.kid-toggle.on .kt-ico{filter:none;}
.kid-toggle .kt-label{font-size:12px; font-weight:700; color:var(--muted);}
.kid-toggle.on .kt-label{color:var(--ink);}
.kid-toggle .kt-track{width:28px; height:16px; border-radius:99px; background:#e2e8f0; position:relative; transition:background .15s;}
.kid-toggle .kt-knob{position:absolute; top:2px; left:2px; width:12px; height:12px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(2,8,23,.25); transition:left .15s;}
.kid-toggle.on .kt-track{background:var(--lime);}
.kid-toggle.on .kt-knob{left:14px;}
@media (max-width:640px){ .kid-toggle .kt-label{display:none;} .kid-toggle{padding:5px 7px;} }
.brand-logo{height:32px; width:auto; object-fit:contain;}
.topnav{display:flex; align-items:center; gap:4px; font-size:14px;}
.topnav a{color:var(--muted); font-weight:600; padding:8px 12px; border-radius:8px;}
@media (hover:hover){ .topnav a:hover{color:var(--ink); background:#f1f5f9;}}
.topnav a.active{color:var(--ink); background:var(--lime-soft); box-shadow:inset 0 -2px 0 var(--lime); font-weight:800;}
.user-chip{background:#f1f5f9; border:1px solid var(--line); color:var(--ink); border-radius:99px; padding:7px 12px; font-size:13px; cursor:pointer;}
.nav-toggle{display:none; border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:10px; width:40px; height:40px; font-size:20px; cursor:pointer;}

main{max-width:1200px; width:100%; margin:0 auto; padding:18px 20px 100px; min-height:70vh; flex:1;}
.loading{position:relative;}

/* ---------- footer ---------- */
.foot{border-top:1px solid var(--line); background:#fff;}
.foot-inner{max-width:1200px; margin:0 auto; padding:42px 20px; display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:28px;}
.foot .brand{font-weight:800; font-size:18px; letter-spacing:-.2px;}
.foot .tagline{color:var(--muted); font-size:13px; margin-top:6px;}
.foot .fine{margin-top:16px; max-width:460px; color:var(--muted); font-size:12px; line-height:1.55;}
.foot-col h4{margin:0 0 10px; font-size:12px; text-transform:uppercase; letter-spacing:1px; color:var(--muted);}
.foot-col a{display:block; color:var(--slate); font-size:14px; margin:8px 0;}
@media (hover:hover){ .foot-col a:hover{color:var(--ink);}}

/* ---------- legal pages ---------- */
.legal h2{margin:0 0 6px; font-size:clamp(22px,3.5vw,28px);}
.legal h3{margin:20px 0 6px; font-size:16px;}
.legal p, .legal li{color:var(--slate); font-size:14px; line-height:1.65;}
.legal ul{margin:6px 0 0; padding-left:20px;}

/* ---------- hero ---------- */
.hero{position:relative; overflow:hidden; background:radial-gradient(900px 420px at 85% -10%,rgba(163,230,53,.28) 0%,transparent 55%),radial-gradient(800px 380px at 0% 110%,rgba(79,70,229,.12) 0%,transparent 50%),#fff; color:var(--ink); border:1px solid var(--line); border-radius:24px; padding:64px 34px 56px; margin-bottom:34px; box-shadow:var(--shadow);}
.hero .pill{display:inline-block; background:var(--lime-soft); border:1px solid #d9f99d; color:#3f6212; font-size:12px; font-weight:800; letter-spacing:.6px; border-radius:99px; padding:6px 12px; margin-bottom:18px;}
.hero h1{margin:0 0 14px; font-size:clamp(34px,6vw,64px); line-height:1.04; letter-spacing:-1.5px;}
.hero h1 .accent{color:#65a30d;}
.hero p{margin:0; color:var(--slate); font-size:clamp(15px,2.4vw,18px); line-height:1.6; max-width:680px;}
.hero .cta-row{display:flex; gap:12px; flex-wrap:wrap; margin-top:26px;}
.hero .cta{display:inline-block; border:none; font-family:inherit; cursor:pointer; background:var(--lime); color:var(--lime-ink); font-weight:800; padding:14px 28px; border-radius:8px; font-size:16px; box-shadow:0 8px 24px rgba(163,230,53,.28);}
.hero .cta.ghost2{background:#f1f5f9; color:var(--ink); border:1px solid var(--line); box-shadow:none;}
.hero .micro{margin-top:16px; font-size:12.5px; color:var(--muted);}

/* ---------- section headers ---------- */
.sec{margin:28px 0 16px;}
.sec .eyebrow{font-size:12px; font-weight:800; letter-spacing:1.2px; color:var(--indigo); text-transform:uppercase;}
.sec h2{margin:4px 0 0; font-size:clamp(24px,3.5vw,32px); letter-spacing:-.6px;}
.sec p{color:var(--muted); font-size:15px; margin:8px 0 0; max-width:680px; line-height:1.6;}

/* ---------- demo widget ---------- */
.demo{background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-lg); overflow:hidden;}
.demo-bar{display:flex; align-items:center; gap:6px; background:#0f172a; padding:10px 14px;}
.demo-bar .dot{width:11px; height:11px; border-radius:50%;}
.demo-bar .dot:nth-child(1){background:#f87171;}
.demo-bar .dot:nth-child(2){background:#fbbf24;}
.demo-bar .dot:nth-child(3){background:#34d399;}
.demo-bar .ttl{margin-left:auto; color:#94a3b8; font-size:12px;}
.demo-body{padding:20px;}
.demo-body .dq{font-size:15.5px; font-weight:600; line-height:1.55; margin-bottom:14px; white-space:pre-wrap;}
.demo-foot{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-top:6px;}
.demo-foot .note{flex:1;}

/* ---------- catalog sidebar ---------- */
.cat-layout{display:flex; gap:22px; align-items:flex-start;}
.sidebar{width:190px; flex-shrink:0; position:sticky; top:76px; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:12px; box-shadow:var(--shadow);}
.sidebar .sb-title{font-size:11px; font-weight:800; letter-spacing:1.2px; color:var(--muted); text-transform:uppercase; padding:6px 10px 8px;}
.sb-item{display:flex; align-items:center; gap:10px; width:100%; border:none; background:none; border-radius:10px; padding:10px 10px; font-size:14.5px; font-weight:600; color:var(--slate); cursor:pointer; text-align:left; transition:background .12s;}
@media (hover:hover){ .sb-item:hover{background:#f1f5f9;}}
.sb-item.active{background:var(--blue-soft); color:var(--blue);}
.sb-item .dot{width:10px; height:10px; border-radius:3px; flex-shrink:0;}
.sb-item .dot.all{background:linear-gradient(135deg,#64748b,#0f172a);}
.sb-item .dot.azure{background:linear-gradient(135deg,#0ea5e9,#1d4ed8);}
.sb-item .dot.aws{background:linear-gradient(135deg,#f59e0b,#ea580c);}
.sb-item .dot.gcp{background:linear-gradient(135deg,#34d399,#0ea5e9);}
.sb-item .cnt{margin-left:auto; font-size:12px; color:var(--muted); background:#f1f5f9; border-radius:99px; padding:1px 8px;}
.sb-item.active .cnt{background:#fff; color:var(--blue);}
.sb-item.soon{opacity:.45; cursor:default;}
.sb-note{font-size:11.5px; color:var(--muted); padding:10px 10px 4px; line-height:1.4;}
.sb-col{display:flex; flex-direction:column; gap:10px; width:190px; flex-shrink:0; position:sticky; top:76px;}
.sb-col .sidebar{width:auto; position:static;}
.sb-sort-btn{display:flex; justify-content:space-between; align-items:center; width:100%; padding:10px 14px; border:1px solid var(--line); background:var(--card); border-radius:12px; font-size:13.5px; font-weight:600; color:var(--ink); cursor:pointer; box-shadow:var(--shadow); transition:border-color .15s;}
@media (hover:hover){ .sb-sort-btn:hover{border-color:var(--blue);}}
.sb-sort-btn .sort-arrow{font-size:15px; font-weight:800; color:var(--blue);}
.cat-main{flex:1; min-width:0;}
.provider-main .detail-head{margin-top:0;}
.provider-sidebar .sb-item:disabled{opacity:.45; cursor:default;}

/* ---------- provider cards (home + /provider) ---------- */
.prov-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:18px;}
.prov-card{position:relative; display:flex; flex-direction:column; min-height:238px; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:26px; box-shadow:var(--shadow); color:var(--ink); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;}
@media (hover:hover){ .prov-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:#cbd5e1;}}
.prov-card .pc-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:16px;}
.prov-card .plogo{width:64px; height:64px; object-fit:contain; display:block; margin:0;}
.prov-card .pc-arrow{width:34px; height:34px; border-radius:99px; display:flex; align-items:center; justify-content:center; background:#f1f5f9; color:var(--slate); font-weight:800; transition:background .16s,color .16s;}
@media (hover:hover){ .prov-card:hover .pc-arrow{background:var(--lime); color:var(--lime-ink);}}
.prov-card h3{margin:0 0 8px; font-size:21px; letter-spacing:-.3px;}
.prov-card p{margin:0; color:var(--muted); font-size:14px; line-height:1.6; flex:1;}
.prov-card .pc-foot{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:22px; font-size:14px; color:var(--slate); font-weight:700;}
.prov-card .pc-cta{display:inline-flex; align-items:center; justify-content:center; border-radius:8px; padding:8px 12px; background:var(--lime); color:var(--lime-ink); font-weight:800;}
.prov-card.soon{opacity:.55; cursor:default;}
@media (hover:hover){ .prov-card.soon:hover{transform:none; box-shadow:var(--shadow); border-color:var(--line);}}
.prov-card.soon .pc-cta{background:#f1f5f9; color:var(--muted);}

/* ---------- logos ---------- */
.plogo{width:64px; height:64px; object-fit:contain; display:block; margin-bottom:10px;}
.plogo.inline{display:inline-block; width:42px; height:42px; vertical-align:-10px; margin:0 6px 0 0;}
.clogo{width:48px; height:48px; object-fit:contain; float:right; margin:-8px -6px 8px 10px; border-radius:10px;}
.clogo.cardtop{width:100%; height:auto; float:none; display:block; margin:0 0 12px; border-radius:10px;}
.clogo.big{width:76px; height:76px; margin:0 0 10px; float:none; display:block;}
.clogo.sm{width:30px; height:30px; margin:-4px 6px 0 0; float:none; vertical-align:middle; display:inline-block;}
@media (max-width:640px){
  .cat-layout{flex-direction:column; gap:12px;}
  .sb-col{position:static; width:100%;}
  /* badge: full card width is absurd on phones — cap to a readable coin, centered */
  .clogo.cardtop{width:auto; max-width:104px; max-height:104px; margin:0 auto 12px;}
  .sidebar{position:static; width:100%; display:flex; overflow-x:auto; gap:6px; padding:8px;}
  .sidebar .sb-title, .sidebar .sb-note{display:none;}
  .sb-item{width:auto; white-space:nowrap; padding:8px 12px; border:1px solid var(--line);}
  .sb-item .cnt{margin-left:6px;}
}

/* ---------- feature cards ---------- */
.feats{display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:14px;}
.feat{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:var(--shadow);}
.feat .ico{font-size:26px;}
.feat h3{margin:10px 0 6px; font-size:16px;}
.feat p{margin:0; color:var(--slate); font-size:13.5px; line-height:1.55;}

/* ---------- catalog ---------- */
.tabs{display:flex; gap:8px; flex-wrap:wrap; margin:14px 0;}
.tab{border:1px solid var(--line); background:var(--card); border-radius:99px; padding:8px 16px; font-size:14px; font-weight:600; color:var(--slate); cursor:pointer; transition:all .15s;}
@media (hover:hover){ .tab:hover{border-color:var(--blue); color:var(--blue);}}
.tab.active{background:var(--ink); color:#fff; border-color:var(--ink);}
.cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:18px;}
.exam-card{position:relative; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px; display:flex; flex-direction:column; gap:9px; box-shadow:var(--shadow); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;}
@media (hover:hover){ .exam-card:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:#cbd5e1;}}
.exam-card .prov{position:absolute; top:0; left:0; right:0; height:4px; border-radius:18px 18px 0 0;}
.exam-card .prov.azure{background:linear-gradient(90deg,#0ea5e9,#1d4ed8);}
.exam-card .prov.aws{background:linear-gradient(90deg,#f59e0b,#ea580c);}
.exam-card .prov.gcp{background:linear-gradient(90deg,#34d399,#0ea5e9);}
.exam-card .code{display:inline-block; background:var(--blue-soft); color:var(--blue); font-weight:800; border-radius:8px; padding:3px 10px; font-size:13px; width:fit-content;}
.exam-card h3{margin:2px 0 0; font-size:17px;}
.exam-card .meta{color:var(--muted); font-size:13px;}
.exam-card .price{margin-top:auto; font-size:15px; font-weight:800;}
.exam-card .price .from{color:var(--muted); font-weight:400; font-size:12px;}
.exam-card .price .pwas{font-size:12.5px; font-weight:600; color:var(--slate); margin-top:3px;}
.exam-card .price .pwas s{color:var(--muted); font-weight:400;}
.btn{display:inline-block; border:none; border-radius:8px; padding:12px 18px; font-size:15px; font-weight:800; cursor:pointer; background:var(--lime); color:var(--lime-ink); text-align:center; transition:filter .15s, transform .1s, box-shadow .15s; box-shadow:0 4px 12px rgba(163,230,53,.22);}
@media (hover:hover){ .btn:hover{filter:brightness(1.03); box-shadow:0 8px 22px rgba(163,230,53,.28);}}
.btn:active{opacity:.85; transform:scale(.98);}
.opt:active, .tab:active, .box:active, .prov-card:active, .exam-card:active, .tier:active, .kid-toggle:active, .sb-item:active, .actions button:active, .topnav a:active{opacity:.72;}
.opt:active{border-color:var(--blue);}
.btn.ghost{background:#f1f5f9; color:var(--ink); border:1px solid var(--line); box-shadow:none;}
.btn.green{background:var(--green); color:#fff; box-shadow:none;}
.btn.small{padding:8px 14px; font-size:13px; border-radius:8px;}
.btn.busy{opacity:.75; cursor:wait;}
.btn .spin{display:inline-block; width:12px; height:12px; border:2px solid currentColor; border-top-color:transparent; border-radius:50%; animation:cecspin .7s linear infinite; vertical-align:-2px;}
.btnrow{display:flex; gap:10px; flex-wrap:wrap; margin-top:10px;}
.badge{display:inline-block; border-radius:99px; padding:2px 10px; font-size:11px; font-weight:800; letter-spacing:.5px;}
.badge.rec{background:var(--green-soft); color:var(--green);}
.badge.notrec{background:var(--red-soft); color:var(--red);}
.badge.sale{background:var(--amber-soft); color:var(--amber);}

/* ---------- detail + tiers ---------- */
.detail-head{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:26px; margin-bottom:18px; box-shadow:var(--shadow);}
.detail-head h2{margin:8px 0 4px; letter-spacing:-.5px;}
.provider-head .plogo{width:64px; height:64px; margin:0 0 14px;}
.provider-head .eyebrow{color:var(--indigo); font-size:12px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase;}
.stats-row{display:flex; gap:16px; flex-wrap:wrap; margin-top:10px; color:var(--slate); font-size:14px;}
.stats-row b{color:var(--ink);}
.domains{display:flex; gap:6px; flex-wrap:wrap; margin-top:12px;}
.topbanner{background:var(--green-soft); border:2px solid var(--green); color:var(--green); border-radius:14px; padding:12px 18px; font-weight:700; font-size:15px; margin-bottom:18px; text-align:center;}
.domains span{background:#f1f5f9; border:1px solid var(--line); border-radius:99px; padding:4px 12px; font-size:12.5px; color:var(--slate);}
.tiers{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; margin:16px 0;}
.includes{background:var(--card); border:2px solid var(--line); border-radius:18px; padding:16px 20px; margin:16px 0 4px;}
.includes .inc-head{font-weight:800; font-size:15px; margin-bottom:8px;}
.includes .inc-row{font-size:14px; color:var(--slate); padding:3px 0; line-height:1.5;}
.tier{background:var(--card); border:2px solid var(--line); border-radius:18px; padding:20px; display:flex; flex-direction:column; gap:6px; position:relative; transition:transform .15s, box-shadow .15s;}
@media (hover:hover){ .tier:hover{transform:translateY(-3px); box-shadow:var(--shadow-lg);}}
.tier.rec{border-color:var(--green); box-shadow:0 6px 24px rgba(22,163,74,.18);}
.tier.dumb{border-style:dashed; border-color:#cbd5e1; background:#fafafa;}
.tier .tname{font-size:19px; font-weight:800;}
.tier .tprice{font-size:30px; font-weight:800; letter-spacing:-1px;}
.tier .twas{font-size:14px; color:var(--muted); margin-top:2px; font-weight:600;}
.tier .twas s{font-weight:400;}
.tier .tcopy{font-size:13.5px; color:var(--slate); line-height:1.5; flex:1;}
.tier .corner{position:absolute; top:-11px; right:12px;}
.note{font-size:13px; color:var(--muted);}

/* ---------- faq ---------- */
.faq details{background:var(--card); border:1px solid var(--line); border-radius:12px; margin-bottom:10px; overflow:hidden;}
.faq summary{cursor:pointer; padding:16px 18px; font-weight:700; font-size:15px; list-style:none; display:flex; justify-content:space-between; align-items:center;}
.faq summary::after{content:"+"; color:var(--muted); font-size:20px; font-weight:400;}
.faq details[open] summary::after{content:"–";}
.faq .a{padding:0 18px 16px; color:var(--slate); font-size:14px; line-height:1.6;}

/* ---------- auth ---------- */
.auth-box{max-width:400px; margin:56px auto; background:var(--card); border:1px solid var(--line); border-radius:14px; padding:28px; box-shadow:var(--shadow-lg);}
.auth-box h2{margin-top:0; letter-spacing:-.3px;}
.auth-box input{width:100%; padding:12px 14px; border:1px solid var(--line); border-radius:8px; font-size:15px; margin-bottom:10px; background:#fff;}
.auth-box input:focus{border-color:var(--ink); outline:none; box-shadow:0 0 0 3px rgba(2,8,23,.06);}
.auth-mini{text-align:right; margin:-2px 0 12px; font-size:13px;}
.auth-mini a{color:var(--muted); font-weight:600;}
@media (hover:hover){ .auth-mini a:hover{color:var(--ink);}}
.auth-box .switch{font-size:13.5px; margin-top:12px; color:var(--slate);}
.auth-err{background:var(--red-soft); color:var(--red); border-radius:8px; padding:8px 12px; font-size:13px; margin-bottom:10px;}
.divider{text-align:center; color:var(--muted); font-size:12px; margin:14px 0;}

/* ---------- feedback + settings forms ---------- */
.feedback-card label{display:block; font-size:12.5px; font-weight:700; color:var(--slate); margin:8px 0 6px;}
.feedback-card input, .feedback-card select, .feedback-card textarea, .settings-pass input{width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:14.5px; margin-bottom:10px; background:#fff;}
.feedback-card input:focus, .feedback-card select:focus, .feedback-card textarea:focus, .settings-pass input:focus{border-color:var(--ink); outline:none; box-shadow:0 0 0 3px rgba(2,8,23,.06);}
.feedback-card textarea{resize:vertical; min-height:110px;}
.settings-pass .frow{grid-template-columns:1fr 1fr;}

/* ---------- library/orders ---------- */
.lib-item{background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px; margin-bottom:12px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; box-shadow:var(--shadow);}
.lib-item .exp{font-size:12.5px; color:var(--muted);}
.lib-item .exp.expired{color:var(--red); font-weight:700;}
.pbar{height:6px; background:var(--line); border-radius:99px; overflow:hidden; margin-top:8px; width:100%;}
.pbar>div{height:100%; background:var(--green);}
table.tbl{width:100%; border-collapse:collapse; background:var(--card); border-radius:12px; overflow:hidden; font-size:13.5px; box-shadow:var(--shadow);}
.tbl th,.tbl td{border-bottom:1px solid var(--line); padding:10px 12px; text-align:left;}
.tbl th{background:#f8fafc; color:var(--slate); font-size:12px; text-transform:uppercase; letter-spacing:.5px;}

/* ---------- quiz engine ---------- */
.qtop{display:flex; align-items:center; gap:10px; margin-bottom:10px;}
.qtop .home-btn{border:1px solid var(--line); background:var(--card); border-radius:10px; padding:8px 12px; font-size:14px; cursor:pointer;}
.qtop .ref{font-size:12px; color:var(--muted); flex:1;}
.qtop .star-btn{border:none; background:none; font-size:26px; cursor:pointer; line-height:1;}
.card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; margin-bottom:12px; box-shadow:var(--shadow);}
.qmeta{font-size:12px; color:var(--muted); margin-bottom:8px; display:flex; gap:8px; flex-wrap:wrap;}
.tag{background:var(--blue-soft); color:var(--blue); border-radius:99px; padding:2px 10px; font-weight:600;}
.qtext{white-space:pre-wrap; font-size:15.5px; line-height:1.55; overflow-wrap:anywhere;}
.qtext .qtbl-wrap{overflow-x:auto; -webkit-overflow-scrolling:touch; margin:10px 0;}
.qtext .qtbl{white-space:normal; border-collapse:collapse; margin:0; font-size:14px; width:100%; table-layout:fixed;}
.qtext .qtbl th,.qtext .qtbl td{border:1px solid var(--line); padding:6px 10px; text-align:left; vertical-align:top; word-break:break-word;}
.qtext .qtbl thead th{background:#f1f5f9; font-weight:600;}
.qtext .qtbl tbody tr:nth-child(even){background:#f8fafc;}
.opt{display:flex; gap:10px; align-items:flex-start; border:2px solid var(--line); border-radius:12px; padding:12px; margin-bottom:8px; cursor:pointer; background:var(--card); font-size:14.5px; line-height:1.45; transition:border-color .12s, background .12s;}
@media (hover:hover){ .opt:hover{border-color:#c7d2fe;}}
.opt .key{font-weight:700; color:var(--muted); min-width:18px;}
.opt span:last-child{min-width:0; overflow-wrap:anywhere; white-space:pre-wrap;}
.opt.sel{border-color:var(--blue); background:var(--blue-soft);}
.opt.right{border-color:var(--green); background:var(--green-soft);}
.opt.wrong{border-color:var(--red); background:var(--red-soft);}
.opt.disabled{cursor:default;}
.boxrow{margin-bottom:12px;}
.boxrow .bprompt{font-size:14px; font-weight:600; margin-bottom:6px; white-space:pre-wrap; overflow-wrap:anywhere;}
.boxrow select{width:100%; padding:12px; font-size:14.5px; border-radius:10px; border:2px solid var(--line); background:var(--card);}
.boxrow select.right{border-color:var(--green); background:var(--green-soft);}
.boxrow select.wrong{border-color:var(--red); background:var(--red-soft);}
.banner{border-radius:12px; padding:12px 14px; font-weight:700; font-size:15px; margin:4px 0 12px; display:none;}
.banner.ok{display:block; background:var(--green-soft); color:var(--green);}
.banner.bad{display:block; background:var(--red-soft); color:var(--red);}
.banner.rev{display:block; background:#e0e7ff; color:#4338ca;}
.expl{display:none; background:#f8fafc; border-left:4px solid var(--blue); border-radius:8px; padding:12px 14px; font-size:13.5px; color:var(--slate); white-space:pre-wrap; line-height:1.5; overflow-wrap:anywhere;}
.expl.show{display:block;}
.correct-ans{display:none; background:var(--amber-soft); border-radius:8px; padding:10px 12px; font-size:13.5px; margin-bottom:10px; white-space:pre-wrap; overflow-wrap:anywhere;}
.correct-ans.show{display:block;}
.actions{position:fixed; left:0; right:0; bottom:0; z-index:30; background:var(--card); border-top:1px solid var(--line);
         display:grid; grid-template-columns:1fr 1.4fr 1fr 1fr; gap:8px; padding:10px 12px calc(10px + env(safe-area-inset-bottom));}
.actions button{border-radius:12px; border:1px solid var(--line); background:#f8fafc; font-size:15px; font-weight:600; padding:13px 4px; cursor:pointer; color:var(--ink);}
.actions button.primary{background:var(--blue); border-color:var(--blue); color:#fff;}
.actions button.primary:disabled{background:#94a3b8; border-color:#94a3b8;}
.actions button.star-on{background:var(--amber-soft); border-color:var(--amber); color:var(--amber);}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(52px,1fr)); gap:8px;}
.box{position:relative; aspect-ratio:1; border-radius:10px; background:var(--card); border:2px solid var(--line);
     display:flex; align-items:center; justify-content:center; font-weight:600; font-size:14px; cursor:pointer; user-select:none;}
.box.ok{background:var(--green-soft); border-color:var(--green); color:var(--green);}
.box.bad{background:var(--red-soft); border-color:var(--red); color:var(--red);}
.box.rev{background:#e0e7ff; border-color:#818cf8; color:#4338ca;}
.box .st{position:absolute; top:-6px; right:-6px; font-size:13px;}
.box.starred{border-color:var(--amber);}
.stats{display:flex; flex-wrap:wrap; gap:8px; margin:12px 0;}
.chip{background:var(--card); border:1px solid var(--line); border-radius:99px; padding:6px 12px; font-size:13px; color:var(--slate);}
.chip b{color:var(--ink);}
.filters{display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 16px;}
.fbtn{border:1px solid var(--line); background:var(--card); color:var(--slate); border-radius:99px; padding:7px 14px; font-size:13px; cursor:pointer;}
.fbtn.active{background:var(--blue); border-color:var(--blue); color:#fff;}
details.case{margin-bottom:12px;}
details.case summary{cursor:pointer; font-size:13px; color:var(--blue); font-weight:600; padding:8px 0;}
details.case .case-body{white-space:pre-wrap; font-size:12.5px; color:var(--slate); max-height:300px; overflow:auto; background:#f8fafc; border:1px solid var(--line); border-radius:10px; padding:10px;}

/* ---------- exam mode ---------- */
.timer{background:var(--ink); color:#fff; border-radius:10px; padding:8px 14px; font-weight:800; font-variant-numeric:tabular-nums;}
.timer.low{background:var(--red);}
.sheet{display:none; position:fixed; inset:0; z-index:50; background:rgba(15,23,42,.6); padding:20px;}
.sheet.open{display:block;}
.sheet .panel{background:var(--card); border-radius:16px; max-width:600px; margin:40px auto; padding:18px; max-height:75vh; overflow:auto;}
.sheet .box.answered{background:var(--blue-soft); border-color:var(--blue); color:var(--blue);}
.sheet .box.flagged{border-color:var(--amber);}
.report .drow{margin:8px 0;}
.report .dlabel{font-size:13px; color:var(--slate); display:flex; justify-content:space-between;}
.report .dbar{height:8px; background:var(--line); border-radius:99px; overflow:hidden;}
.report .dbar>div{height:100%; background:var(--blue);}
.score-big{font-size:52px; font-weight:800; text-align:center; margin:10px 0;}
.score-big.pass{color:var(--green);}
.score-big.fail{color:var(--red);}

/* ---------- admin ---------- */
.cur-usd{font-size:12px; color:var(--slate); font-weight:600;}
.admin-nav{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px;}
.admin-nav a{border:1px solid var(--line); background:var(--card); border-radius:99px; padding:7px 14px; font-size:13px; font-weight:600; color:var(--slate);}
.admin-nav a.active{background:var(--ink); color:#fff; border-color:var(--ink);}
.admin-range{margin:0 0 14px;}
.admin-controls{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px;}
.admin-controls input, .admin-controls select{padding:10px 12px; border:1px solid var(--line); border-radius:8px; font:inherit; font-size:14px; background:#fff;}
.admin-controls input:focus, .admin-controls select:focus{border-color:var(--ink); outline:none; box-shadow:0 0 0 3px rgba(2,8,23,.06);}
.tbl-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.tbl-scroll table.tbl{min-width:760px;}
.stat-cards{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:16px;}
.stat-card{background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow:var(--shadow);}
.stat-card .num{font-size:26px; font-weight:800;}
.stat-card .lbl{font-size:12.5px; color:var(--muted);}
form.admin-form input, form.admin-form select, form.admin-form textarea{width:100%; padding:10px; border:2px solid var(--line); border-radius:10px; font-size:14px; margin-bottom:8px; font-family:inherit;}
form.admin-form label{font-size:12.5px; font-weight:700; color:var(--slate);}
.frow{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px;}
.msg{border-radius:10px; padding:10px 14px; font-size:13.5px; margin:10px 0;}
.msg.ok{background:var(--green-soft); color:var(--green);}
.msg.err{background:var(--red-soft); color:var(--red);}
.tier-edit{display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; align-items:end;}
@media (max-width:760px){
  .nav-toggle{display:block;}
  .topnav{display:none; position:absolute; top:calc(100% + 8px); left:12px; right:12px; background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow-lg); padding:8px; flex-direction:column; align-items:stretch; gap:2px; font-size:14px;}
  .topnav.open{display:flex;}
  .topnav a{padding:11px 12px; border-radius:10px;}
  .topnav .user-chip{max-width:none; width:100%; justify-content:center;}
  .user-chip{text-align:center;}
  .foot-inner{grid-template-columns:1fr 1fr; gap:22px;}
  .foot-brand{grid-column:1 / -1;}
}
@media (max-width:640px){
  .tier-edit{grid-template-columns:1fr;}
  .detail-head{padding:18px;}
  .hero{padding:30px 18px 28px; border-radius:16px;}
  .hero .cta{width:100%; text-align:center;}
  .user-chip{display:inline-flex; align-items:center; gap:6px; max-width:120px; overflow:hidden;}
  .user-chip .em{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0;}
  .hrow{gap:8px; padding:0 14px;}
  .logo{font-size:17px;}
  main{padding:14px 14px 90px;}
  .exam-card .btnrow .btn{flex:1;}
  .feats{grid-template-columns:1fr;}
  .prov-card{min-height:0; padding:22px;}
  .foot-inner{grid-template-columns:1fr; gap:18px; padding:34px 14px;}
  .auth-box{margin:28px auto;}
}
img,svg,video{max-width:100%;}

/* ---------- loading animation ---------- */
.loading{color:var(--muted); padding:50px 20px; text-align:center; font-weight:600; position:relative;}
.loading::before{content:""; display:block; width:38px; height:38px; margin:0 auto 14px; border-radius:50%;
  border:4px solid var(--line); border-top-color:var(--blue); animation:cecspin .8s linear infinite;}
.loading::after{content:""; display:block; width:120px; height:5px; margin:12px auto 0; border-radius:99px;
  background:linear-gradient(90deg,transparent,var(--blue-soft),transparent); animation:cecshimmer 1.4s ease-in-out infinite;}
@keyframes cecspin{to{transform:rotate(360deg)}}
@keyframes cecshimmer{0%,100%{opacity:.3;transform:scaleX(.6)}50%{opacity:1;transform:scaleX(1)}}

/* ---------- study guide page ---------- */
.cat-wrap{position:sticky; top:64px; z-index:15; background:var(--bg); padding:8px 0;}
.cat-toggle{display:block; width:100%; padding:11px 14px; border-radius:10px; border:1px solid var(--line);
            background:var(--card); font-size:14px; font-weight:700; cursor:pointer; text-align:left; color:var(--ink);}
.guide-nav{display:none; flex-wrap:wrap; gap:8px; margin:8px 0 6px;}
.guide-nav.open{display:flex;}
.guide-sec{margin-bottom:8px;}
.g-h1{background:linear-gradient(135deg,#1e3a8a,#1d4ed8); color:#fff; border-radius:12px; padding:12px 14px;
      font-size:17px; margin:18px 0 10px; scroll-margin-top:130px;}
.guide-sec h2{font-size:16px; color:var(--blue); border-bottom:2px solid var(--blue-soft); padding-bottom:4px; margin:16px 0 8px;}
.guide-sec h3{font-size:14.5px; color:var(--ink); margin:12px 0 6px;}
.guide-sec h4{font-size:13.5px; color:var(--slate); margin:10px 0 4px;}
.guide-sec p{font-size:14px; line-height:1.6; margin:6px 0; color:#1e293b;}
.guide-sec ul, .guide-sec ol{font-size:14px; line-height:1.6; margin:6px 0; padding-left:22px; color:#1e293b;}
.guide-sec li{margin:3px 0;}
.guide-sec code{background:#eef2ff; color:#3730a3; border-radius:5px; padding:1px 6px; font-size:12.5px;}
.guide-sec table{border-collapse:collapse; width:100%; font-size:12.5px; margin:10px 0; display:block; overflow-x:auto;}
.guide-sec th, .guide-sec td{border:1px solid var(--line); padding:6px 9px; text-align:left; vertical-align:top;}
.guide-sec th{background:var(--blue-soft); color:#1e3a8a; white-space:nowrap;}
.guide-sec tr:nth-child(even) td{background:#f8fafc;}

/* ================= mobile polish (consolidated) ================= */
/* smooth mobile nav open */
.topnav.open{animation:navdrop .16s ease-out;}
@keyframes navdrop{from{opacity:0; transform:translateY(-6px);} to{opacity:1; transform:none;}}

@media (max-width:900px){
  /* horizontal-scroll tables: edge-fade cue so users know there's more */
  .tbl-scroll{
    background-image:linear-gradient(to right, #fff, #fff), linear-gradient(to left, #fff, #fff),
      linear-gradient(to right, rgba(2,8,23,.10), rgba(2,8,23,0)), linear-gradient(to left, rgba(2,8,23,.10), rgba(2,8,23,0));
    background-position:0 0, 100% 0, 0 0, 100% 0;
    background-repeat:no-repeat;
    background-size:20px 100%, 20px 100%, 10px 100%, 10px 100%;
    background-attachment:local, local, scroll, scroll;
    border-radius:12px;
  }
}

@media (max-width:760px){
  /* touch targets: 44px minimum on everything tappable */
  .topnav a{padding:13px 12px; min-height:44px; display:flex; align-items:center;}
  .nav-toggle{width:44px; height:44px;}
  .sb-item{padding:12px; min-height:44px;}
  .sb-sort-btn{min-height:44px;}
  .fbtn, .tab, .admin-nav a, .chip{padding:10px 14px; min-height:44px; display:inline-flex; align-items:center;}
  .btn{min-height:44px;}
  .btn.small{padding:10px 14px; min-height:44px; display:inline-flex; align-items:center; justify-content:center;}
  .qtop .home-btn{padding:11px 14px; min-height:44px; min-width:44px;}
  .qtop .star-btn{min-width:44px; min-height:44px;}
  .cat-toggle{min-height:44px;}

  /* stop iOS auto-zoom on input focus (needs >=16px) — overrides inline styles too */
  input:not([type=checkbox]):not([type=radio]), select, textarea{font-size:16px !important;}

  /* settings password fields: stack instead of two cramped columns */
  .settings-pass .frow{grid-template-columns:1fr;}

  /* admin nav: swipeable single row instead of wrapping chaos */
  .admin-nav{flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; -webkit-overflow-scrolling:touch;}
  .admin-nav a{white-space:nowrap;}

  /* modals / sheets: breathe inside small viewports */
  .sheet{padding:10px;}
  .sheet .panel{margin:12px auto; max-height:85vh;}

  /* hero headline on small phones */
  .hero h1{font-size:clamp(30px,9vw,44px);}
}
