/* Always respect hidden attribute */
[hidden]{ display:none !important; }

:root{
  --bg: #0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;

  --blue:#60a5fa;
  --shadow: 0 16px 40px rgba(0,0,0,.35);

  --r: 16px;
  --r2: 22px;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  --arabic: "Noto Naskh Arabic", "Amiri", "Tahoma", "Arial", sans-serif;

  --topnav-h: 56px;
  --bottomnav-h: 72px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 700px at 25% 15%, #15254a 0%, var(--bg) 55%);
  color:var(--text);
}

html[dir="rtl"] body{font-family: var(--arabic)}

.sr-only{
  position:absolute!important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

.mono{font-family:var(--mono)}
.app{min-height:100%;}

/* AUTH */
.auth{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
  flex-direction: column;
  gap: 12px;
}

.authbar{
  width: min(520px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.authlogo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0;
  line-height: 0;
  color: var(--text);
  text-decoration: none;
  width: 156px;
  height: 36px;
}

.logo__img{
  width: 204px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo__img-inner{
  width: 204px;
  height: 48px;
  display: block;
  object-fit: cover;
  object-position: center;
}

.authcard{
  width: min(520px, 100%);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  padding: 16px;
}

.authcard__head{margin-bottom: 10px}
.authcard__title{font-weight: 900; font-size: 20px}
.authcard__sub{color: var(--muted); margin-top: 6px; font-size: 13px; line-height:1.4}

.authrow{margin-top: 12px; display:grid; gap: 6px}
.authrow--inline{grid-auto-flow: column; align-items:center; justify-content:space-between}
.authlabel{color: var(--muted); font-size: 12px}
.authinput,.authselect{
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.20);
  color: var(--text);
  padding: 0 12px;
  outline:none;
}
.authhelp{font-size: 12px; color: var(--muted)}
.authlink{color: var(--blue); font-size: 12px}
.authlink:hover{text-decoration: underline}
.authcheck{display:flex; gap:8px; align-items:center; font-size: 12px; color: var(--muted)}
.authcheck input{accent-color: var(--blue)}

.authdivider{
  margin: 14px 0 6px;
  display:flex;
  align-items:center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.authdivider::before,.authdivider::after{
  content:"";
  height:1px;
  flex:1;
  background: rgba(255,255,255,.14);
}
.btn.google{
  width: 100%;
  margin-top: 10px;
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
}
.authlegal{margin-top: 10px; color: var(--muted); font-size: 11px}
.authback{display:inline-block; margin-top: 8px}
.authactions{margin-top: 14px; display:flex; gap: 10px}
.authmsg{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: var(--text);
}
.authhint{margin-top: 12px; color: var(--muted); font-size: 12px; line-height:1.4}

/* Buttons */
.btn{
  font: inherit;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  padding: 11px 12px;
  cursor:pointer;
  background: rgba(255,255,255,.04);
  color: var(--text);
  flex: 1;
}
.btn:hover{background: rgba(255,255,255,.07)}
.btn:disabled{opacity:.45; cursor:not-allowed}
.btn.primary{border-color: rgba(96,165,250,.6); background: rgba(96,165,250,.14)}
.btn.secondary{border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06)}
.btn.ghost{background: transparent; flex: 0}

/* TOP NAV */
.topnav{
  height: var(--topnav-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(10,16,32,.55);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}
html[dir="rtl"] .topnav{flex-direction: row-reverse}

.topnav__left{
  display:flex;
  align-items:center;
  gap: 8px;
}

.brand-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  margin-right: 8px;
  font-size: 0;
  line-height: 0;
  width: 156px;
  height: 36px;
}

.topnav__center{
  text-align:center;
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width: 160px;
}
.topnav__timewrap{
  display:flex;
  flex-direction:column;
  gap:2px;
  align-items:center;
}
.topnav__meta{
  display:none;
  align-items:center;
  justify-content:center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
}
.topnav__timeLabel{
  font-size: 11px;
  letter-spacing:.2px;
  color: var(--muted);
  text-transform: uppercase;
}
.topnav__time{font-weight: 900; font-size: 14px}

.topnav__right{
  display:flex;
  align-items:center;
  gap: 10px;
}
html[dir="rtl"] .topnav__right{flex-direction: row-reverse}

.iconbtn{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
}
.iconbtn:hover{background: rgba(255,255,255,.07)}
.iconbtn svg{width:20px;height:20px;fill: currentColor;opacity:.95}
.iconbtn img{width:20px;height:20px;display:block}
.iconbtn[aria-pressed="true"]{
  border-color: rgba(245,158,11,.75);
  background: rgba(245,158,11,.14);
}

.langmini__select{
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 0 10px;
  outline:none;
}
.langmini__select option{
  color: #0f172a;
  background: #ffffff;
}

/* MAIN */
.main{
  padding: 12px 12px calc(var(--bottomnav-h) + 18px);
  display:flex;
  justify-content:center;
}

.card{
  width: min(980px, 100%);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card__meta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 10px 12px;
  background: rgba(0,0,0,.18);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
html[dir="rtl"] .card__meta{flex-direction: row-reverse}

.pill{
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  color: var(--text);
}
.pill.subtle{color: var(--muted)}

.media{
  width: 100%;
  aspect-ratio: 16/9;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display:flex;
  align-items:center;
  justify-content:center;
}
.media img, .media video{
  width:100%;
  height:100%;
  object-fit: contain;
  display:block;
  background: #ffffff;
  padding: 8px;
}
.media__placeholder{
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
  text-align:center;
}

.stem{padding: 12px 12px 6px;}
.stem__text{font-size: 16px; font-weight: 800; line-height: 1.35;}
.stem__hint{margin-top: 6px; color: var(--muted); font-size: 13px;}

.answers{padding: 10px 12px 8px; display:grid; gap: 10px;}

.answer{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(15,23,42,.30);
}
html[dir="rtl"] .answer{flex-direction: row-reverse}
.answer:hover{background: rgba(15,23,42,.45); border-color: rgba(255,255,255,.18)}
.answer input{margin-top:3px}
.answer__text{flex:1}
.answer__meta{color: var(--muted); font-size: 12px; margin-top:4px}
.answer__img{
  display:block;
  width: auto;
  max-width: min(100%, 260px);
  max-height: 160px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 6px;
}

.answer.correct{border-color: rgba(22,163,74,.65); background: rgba(22,163,74,.12)}
.answer.wrong{border-color: rgba(239,68,68,.60); background: rgba(239,68,68,.12)}

.inlineActions{
  padding: 10px 12px 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.12);
}
html[dir="rtl"] .inlineActions{flex-direction: row-reverse}

.feedback{
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.10);
}
.review-toggle{
  display:flex;
  align-items:center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.review-toggle--top{
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15,42,72,.9), rgba(11,34,60,.75)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.12), rgba(255,255,255,.12) 6px, rgba(255,255,255,0) 6px, rgba(255,255,255,0) 12px);
}
.review-toggle input{
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}
.feedback .kicker{color: var(--muted); font-size: 12px}
.feedback .msg{margin-top:6px; font-weight: 750}
.feedback.ok .msg{color: #166534}
.feedback.bad .msg{color: #dc2626}
.feedback.warn .msg{color: #fde68a}
.feedback.unanswered .msg{color: #c2410c; font-weight: 700}

/* Access modal */
.access-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
}
.access-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(420px, calc(100vw - 24px));
  background: rgba(9,13,26,.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 310;
}
.access-modal__head{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 800;
}
.access-modal__body{
  padding: 12px 14px;
  color: var(--muted);
  white-space: pre-line;
}
.access-modal__actions{
  padding: 12px 14px 14px;
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  border-top: 1px solid rgba(255,255,255,.08);
}

/* BOTTOM NAV */
.bottomnav{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--bottomnav-h);
  background: rgba(10,16,32,.72);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.08);
  display:grid;
  grid-template-columns: 120px 1fr 120px;
  align-items:center;
  padding: 10px 10px;
  z-index: 90;
}
html[dir="rtl"] .bottomnav{direction: rtl}

.navbtn{
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font: inherit;
}
.navbtn:hover{background: rgba(255,255,255,.07)}
.navbtn:disabled{opacity:.45; cursor:not-allowed}
.chev{font-size: 18px; line-height: 1}

.bottomnav__center{padding: 0 10px; text-align:center;}
.bottomnav__q{font-weight: 800; font-size: 12px; margin-bottom: 8px;}
.bottomnav__progress{
  height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.06);
}
.bottomnav__bar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #a78bfa);
  border-radius: 999px;
  transition: width .2s ease;
}
.progressbar{
  margin-top: 6px;
}
.progressbar__track{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
.progressbar__fill{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
  border-radius: 999px;
  transition: width .2s ease;
}
.progressbar__meta{
  margin-top: 6px;
  font-weight: 800;
  font-size: 12px;
  color: var(--text);
}
.result-pass{color: #22c55e;}
.result-fail{color: #ef4444;}

/* SHEET */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
}

.sheet{
  position: fixed;
  left: 10px;
  right: 10px;
  top: calc(var(--topnav-h) + 10px);
  max-height: 62vh;
  background: rgba(9,13,26,.95);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  z-index: 210;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.sheet__head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sheet__title{font-weight: 900}
.sheet__sub{color: var(--muted); font-size: 12px; margin-top: 3px}

.legend{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  align-items:center;
  padding: 10px 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.dot{width:10px;height:10px;border-radius:999px;display:inline-block}
.dot.unanswered{background: rgba(255,255,255,.85); border: 1px solid rgba(0,0,0,.25)}
.dot.answered{background: rgba(96,165,250,.95)}

.legend__flag{
  width: 16px;
  height: 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.legend__flag svg{
  width: 16px;
  height: 16px;
  fill: #ffcc33;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
}

.qgrid{
  padding: 12px;
  display:grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  overflow:auto;
}

.qnum{
  position: relative;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #0b1224;
  font-weight: 900;
  cursor:pointer;
  display:grid;
  place-items:center;
  user-select:none;
}
.qnum:hover{filter: brightness(1.05)}
.qnum.answered{
  background: rgba(96,165,250,.95);
  color: #061028;
  border-color: rgba(96,165,250,.65);
}
.qnum.correct{
  background: rgba(22,163,74,.95);
  color: #052e16;
  border-color: rgba(22,163,74,.65);
}
.qnum.wrong{
  background: rgba(239,68,68,.95);
  color: #fff7f7;
  border-color: rgba(239,68,68,.65);
}
.qnum.current{
  outline: 2px solid rgba(167,139,250,.9);
  outline-offset: 2px;
}

/* Bigger + bolder flag */
.qnum .flagmini{
  position:absolute;
  top: 5px;
  right: 6px;
  width: 18px;
  height: 18px;
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55));
}
.qnum .flagmini svg{
  width: 18px;
  height: 18px;
  fill: #ffcc33;
}
.qnum.answered .flagmini svg{
  fill: #ffe58a;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.7));
}
html[dir="rtl"] .qnum .flagmini{ right:auto; left:6px; }

/* MODAL */
.modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(520px, calc(100vw - 24px));
  background: rgba(9,13,26,.96);
  border:1px solid rgba(255,255,255,.10);
  border-radius: var(--r2);
  box-shadow: var(--shadow);
  z-index: 260;
  overflow:hidden;
}
.modal__title{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-weight: 900;
}
.modal__body{padding: 12px 14px}
.modal__body .muted{color:var(--muted); font-size: 13px}
.modal__actions{
  padding: 12px 14px 14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.finishwarn{color: #c2410c; font-weight: 700; margin-top: 8px}

/* Responsive */
@media (max-width: 900px){
  .card{width: min(760px, 100%)}
  .topnav__center{min-width: 140px}
}

@media (max-width: 720px){
  :root{
    --topnav-h: 64px;
    --bottomnav-h: 64px;
  }
  .topnav{
    flex-wrap: wrap;
    height: auto;
    row-gap: 8px;
  }
  .topnav__left{order: 1}
  .topnav__right{order: 2; margin-left: auto}
  .topnav__center{
    order: 3;
    width: 100%;
    min-width: 0;
    align-items:center;
  }
  .brand-link{margin-right: 0}
  .iconbtn{width: 36px; height: 36px; border-radius: 10px}
  .iconbtn svg, .iconbtn img{width:18px;height:18px}
  .langmini__select{height: 36px}
  .main{padding: 10px 10px calc(var(--bottomnav-h) + 16px)}
  .card__meta{flex-wrap: wrap; gap: 6px}
  .answers{gap: 8px}
  .answer{padding: 10px}
  .inlineActions{flex-direction: column}
  .btn{width: 100%}
  .bottomnav{
    grid-template-columns: 96px 1fr 96px;
    height: var(--bottomnav-h);
  }
  .navbtn{height: 44px; gap: 6px; font-size: 13px}
  .bottomnav__q{margin-bottom: 6px}
  .qgrid{grid-template-columns: repeat(5, 1fr)}
  .sheet{
    left: 8px;
    right: 8px;
    max-height: 70vh;
  }
  .authbar{
    flex-direction: column;
    align-items:flex-start;
    gap: 10px;
  }
}

@media (max-width: 520px){
  .auth{padding: 14px 12px}
  .authcard{padding: 14px}
  .authactions{flex-direction: column}
  .authrow--inline{grid-auto-flow: row; gap: 8px}
  .authlogo,
  .brand-link{
    width: min(160px, 55vw);
    height: 32px;
  }
  .logo__img{
    width: 100%;
    height: 40px;
  }
  .logo__img-inner{
    width: 100%;
    height: 40px;
  }
  .topnav__right{gap: 6px}
  .bottomnav{grid-template-columns: 88px 1fr 88px}
  .qgrid{grid-template-columns: repeat(4, 1fr)}
}

@media (max-width: 420px){
  .bottomnav{grid-template-columns: 84px 1fr 84px}
  .qgrid{grid-template-columns: repeat(4, 1fr)}
}

@media (orientation: landscape) and (max-height: 520px){
  :root{
    --topnav-h: 52px;
    --bottomnav-h: 58px;
  }
  .topnav{
    display:grid;
    grid-template-columns: auto 1fr auto;
  }
  .topnav__left{grid-column: 1}
  .topnav__center{
    grid-column: 2;
    display:grid;
    grid-template-columns: 1fr auto 1fr;
    align-items:center;
    gap: 0;
  }
  .topnav__right{
    grid-column: 3;
    justify-content:flex-end;
  }
  #topTypePill{
    justify-self: center;
  }
  #topCategoryPill{
    justify-self: center;
  }
  .topnav{
    height: auto;
    padding: 8px 10px;
  }
  .topnav__meta{
    display:inline-flex;
    margin: 0 10px;
  }
  .topnav__left{gap: 14px}
  .topnav__right{gap: 12px}
  .topnav__meta{display:inline-flex}
  .card__meta{display:none}
  .topnav__timeLabel{font-size: 10px}
  .topnav__time{font-size: 13px}
  .main{padding: 6px 8px calc(var(--bottomnav-h) + 8px)}
  .card__meta{padding: 6px 8px}
  .stem{padding: 8px 8px 4px}
  .answers{gap: 6px; padding: 8px 8px 6px}
  .answer{padding: 6px}
  .answer__text{font-size: 14px}
  .answer__meta{font-size: 11px}
  .stem__text{font-size: 15px}
  .stem__hint{font-size: 12px}
  .inlineActions{padding: 6px 8px 8px}
  .feedback{padding: 6px 8px 8px}
  .inlineActions{padding: 8px 10px 10px}
  .bottomnav{
    height: var(--bottomnav-h);
    padding: 8px 8px;
    grid-template-columns: 96px 1fr 96px;
  }
  .navbtn{height: 40px; font-size: 12px}
  .bottomnav__q{margin-bottom: 4px}
  .qgrid{grid-template-columns: repeat(6, 1fr)}
  .sheet{
    top: calc(var(--topnav-h) + 6px);
    max-height: 74vh;
  }
  .auth{
    padding: 10px;
    gap: 8px;
  }
  .authcard{padding: 12px}
  .authactions{gap: 8px}
  .card{
    display:grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(260px, 1.05fr);
    grid-template-areas:
      "meta meta"
      "media stem"
      "media answers"
      "actions actions"
      "feedback feedback";
  }
  .card__meta{grid-area: meta}
  .media{
    grid-area: media;
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
  }
  .stem{grid-area: stem}
  .answers{grid-area: answers}
  .inlineActions{grid-area: actions}
  .feedback{grid-area: feedback}
}

/* Light theme (add class "theme-light" on body) */
body.theme-light{
  --bg: #ffffff;
  --text: #0b1224;
  --muted: #6b7a90;
  --blue: #2D7CC3;
  --shadow: 0 16px 40px rgba(15,23,42,.12);
  background: radial-gradient(1200px 700px at 25% 15%, #f3f7fb 0%, #ffffff 55%);
  color: var(--text);
}

body.theme-light .authcard{
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.08);
}
body.theme-light .authinput,
body.theme-light .authselect{
  border: 1px solid rgba(15,23,42,.12);
  background: #f7fafc;
  color: var(--text);
}
body.theme-light .authdivider::before,
body.theme-light .authdivider::after{background: rgba(15,23,42,.12)}
body.theme-light .btn.google{background: #f3f6fb; border-color: rgba(15,23,42,.14)}
body.theme-light .authmsg{
  border: 1px solid rgba(15,23,42,.12);
  background: #f6f8fb;
  color: var(--text);
}

body.theme-light .btn{
  border: 1px solid rgba(45,124,195,.65);
  background: var(--blue);
  color: #ffffff;
}
body.theme-light .btn:hover{filter: brightness(0.95)}
body.theme-light .btn.primary{
  border-color: rgba(45,124,195,.75);
  background: var(--blue);
}
body.theme-light .btn.secondary{
  border-color: rgba(45,124,195,.65);
  background: var(--blue);
}

body.theme-light .topnav{
  background: var(--blue);
  border-bottom: 1px solid rgba(45,124,195,.75);
  color: #ffffff;
}
body.theme-light .topnav__timeLabel{color: #ffffff}
body.theme-light .topnav__meta{color: #ffffff}
body.theme-light .iconbtn{
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #ffffff;
}
body.theme-light .iconbtn:hover{background: rgba(255,255,255,.18)}
body.theme-light .langmini__select{
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #0f172a;
}
body.theme-light .langmini__select option{
  color: #0f172a;
  background: #ffffff;
}

body.theme-light .card{
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.10);
}
body.theme-light .card__meta{
  background: var(--blue);
  border-bottom: 1px solid rgba(15,23,42,.08);
}
body.theme-light .pill{
  border: 1px solid rgba(15,23,42,.12);
  background: #f7f9fc;
  color: var(--text);
}
body.theme-light .media{
  background: #f6f8fb;
  border-bottom: 1px solid rgba(15,23,42,.08);
}
body.theme-light .answer{
  border: 1px solid rgba(15,23,42,.10);
  background: #ffffff;
  color: var(--text);
}
body.theme-light .answer:hover{
  background: #f3f6fb;
  border-color: rgba(15,23,42,.16);
}
body.theme-light .answer__meta{color: var(--muted)}
body.theme-light .answer.correct{
  border-color: rgba(22,163,74,.65);
  background: rgba(22,163,74,.36);
}
body.theme-light .answer.wrong{
  border-color: rgba(239,68,68,.65);
  background: rgba(239,68,68,.36);
}
body.theme-light .inlineActions{
  border-top: 1px solid rgba(15,23,42,.08);
  background: #f6f8fb;
}
body.theme-light .feedback{
  border-top: 1px solid rgba(15,23,42,.08);
  background: #f7f9fc;
  color: var(--text);
}
body.theme-light .access-modal{
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(15,23,42,.10);
}
body.theme-light .access-modal__head{border-bottom: 1px solid rgba(15,23,42,.08)}
body.theme-light .access-modal__actions{border-top: 1px solid rgba(15,23,42,.08)}

body.theme-light .bottomnav{
  background: var(--blue);
  border-top: 1px solid rgba(45,124,195,.75);
  color: #ffffff;
}
body.theme-light .navbtn{
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  color: #ffffff;
}
body.theme-light .navbtn:hover{background: rgba(255,255,255,.18)}
body.theme-light .bottomnav__progress{
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
}
body.theme-light .bottomnav__bar{
  background: linear-gradient(90deg, #ffffff, rgba(255,255,255,.65));
}
body.theme-light .progressbar__track{
  background: rgba(15,23,42,.10);
  border: 1px solid rgba(15,23,42,.12);
}
body.theme-light .progressbar__fill{
  background: linear-gradient(90deg, var(--blue), #60a5fa);
}
body.theme-light .progressbar__meta{color: var(--text)}
body.theme-light .result-pass{color: #15803d;}
body.theme-light .result-fail{color: #b91c1c;}

body.theme-light .overlay{background: rgba(15,23,42,.35)}
body.theme-light .sheet{
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(15,23,42,.10);
}
body.theme-light .sheet__head{border-bottom: 1px solid rgba(15,23,42,.08)}
body.theme-light .legend{color: var(--muted)}
body.theme-light .legend__flag svg{fill: #c2410c; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35))}
body.theme-light .dot.unanswered{background: #e5e9f0; border: 1px solid rgba(15,23,42,.18)}
body.theme-light .dot.answered{background: rgba(45,124,195,.95)}

body.theme-light .qnum{
  border: 1px solid rgba(15,23,42,.12);
  background: #f3f6fb;
  color: #0b1224;
}
body.theme-light .qnum .flagmini svg{fill: #c2410c}
body.theme-light .qnum.answered .flagmini svg{fill: #ea580c; filter: drop-shadow(0 1px 3px rgba(0,0,0,.5))}
body.theme-light .qnum.answered{
  background: rgba(45,124,195,.95);
  color: #ffffff;
  border-color: rgba(45,124,195,.65);
}
body.theme-light .qnum.correct{
  background: rgba(22,163,74,.95);
  color: #ffffff;
  border-color: rgba(22,163,74,.65);
}
body.theme-light .qnum.wrong{
  background: rgba(239,68,68,.95);
  color: #ffffff;
  border-color: rgba(239,68,68,.65);
}
body.theme-light .qnum.current{
  outline: 2px solid rgba(45,124,195,.45);
}

body.theme-light .modal{
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(15,23,42,.10);
}
body.theme-light .modal__title{border-bottom: 1px solid rgba(15,23,42,.08)}
body.theme-light .modal__actions{border-top: 1px solid rgba(15,23,42,.08)}
