/* ASVAB Prep Free — navy and gold, clean and calm for long study sessions */
:root {
  --navy: #14213d;
  --blue: #1d3a8a;
  --blue-soft: #e8edfb;
  --gold: #fca311;
  --gold-soft: #fff4dd;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #14213d;
  --muted: #5b6477;
  --line: #dfe4ee;
  --ok: #15803d;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 4px 16px rgba(20, 33, 61, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
h3 { margin: 0 0 .5rem; }
p { margin: 0 0 .8rem; }
a { color: var(--blue); }
.muted { color: var(--muted); }
.sm { font-size: .875rem; }
.center { text-align: center; }
.ok-text { color: var(--ok); }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }

/* ---------- Brand and top bars ---------- */
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.1rem; color: var(--navy); }
.brand-star { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--navy); color: var(--gold); }
.brand-star .ic { fill: var(--gold); stroke: var(--gold); }
a.plain { text-decoration: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.top-actions { display: flex; gap: .5rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid transparent; border-radius: 10px; padding: .7rem 1.15rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--navy); }
.btn.ghost { background: var(--card); color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--blue); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.sm { padding: .45rem .85rem; font-size: .9rem; }
.btn.lg { padding: .9rem 1.4rem; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.ghost.loading::after { border-color: var(--blue); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.plain-btn { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.link { display: block; margin-top: .3rem; }

/* ---------- Cards and pages ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1rem; }
.landing, .auth, .page { max-width: 960px; margin: 0 auto; padding: 0 16px 1rem; }
.auth { max-width: 460px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 1rem; }
.auth-alt { text-align: center; color: var(--muted); }
.page { max-width: 760px; }
.legal h2 { margin-top: 1.2rem; font-size: 1.05rem; }

/* ---------- Home page ---------- */
.hero { text-align: center; padding: 2.5rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); max-width: 720px; margin: 1rem auto .8rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.6rem; }
.hero-cta { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: .35rem; background: var(--gold-soft); color: #8a5a00; font-weight: 700; font-size: .85rem; padding: .3rem .8rem; border-radius: 999px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.feature > .ic { width: 28px; height: 28px; color: var(--blue); display: block; margin-bottom: .6rem; }
.feature b { display: block; margin-bottom: .3rem; }
.feature p { color: var(--muted); font-size: .92rem; margin: 0; }
.subject-table { display: grid; gap: .1rem; }
.subject-row { display: grid; grid-template-columns: 3rem 1fr auto; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.subject-row:last-child { border-bottom: 0; }
.code { display: inline-grid; place-items: center; min-width: 2.6rem; height: 1.8rem; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: .85rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1rem .45rem; border-radius: 6px; vertical-align: .1em; }
.tag.afqt { background: var(--gold-soft); color: #8a5a00; }

/* ---------- Forms ---------- */
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .93rem; }
.form input:not([type=radio]):not([type=checkbox]) { width: 100%; font: inherit; font-weight: 400; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
.form input:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.form input:disabled { background: var(--bg); color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .93rem; margin-bottom: .4rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.choices { display: grid; gap: .4rem; margin-bottom: .3rem; }
.form label.choice { display: flex; align-items: center; gap: .6rem; font-weight: 500; border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; cursor: pointer; }
.form label.choice:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.form label.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; }
.form label.check input { margin-top: .3rem; }
.form-error { background: #fdecec; color: var(--bad); border-radius: 10px; padding: .65rem .8rem; font-size: .92rem; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 2.8rem !important; }
.pw-eye { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: .4rem; color: var(--muted); cursor: pointer; }
.notice { display: flex; gap: .8rem; align-items: flex-start; background: var(--blue-soft); border-radius: 10px; padding: .9rem; margin-bottom: 1rem; }
.notice .ic { width: 22px; height: 22px; color: var(--blue); margin-top: .1rem; }
.notice p { margin: 0; }
.stack { display: grid; gap: .7rem; }
details summary { cursor: pointer; color: var(--blue); font-weight: 600; padding: .3rem 0; }
details .form { margin-top: .6rem; }

/* ---------- Logged-in shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.appbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.nav { display: flex; gap: .2rem; }
.nav a, .nav .plain-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .7rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.nav a:hover, .nav .plain-btn:hover { background: var(--bg); color: var(--navy); }
.nav a.on { background: var(--blue-soft); color: var(--blue); }
#main { width: 100%; max-width: 960px; margin: 0 auto; padding: 1.5rem 16px; flex: 1; }
.welcome { margin-bottom: 1rem; }
.afqt-box { display: flex; gap: 1rem; align-items: flex-start; background: var(--navy); color: #fff; }
.afqt-box > .ic { width: 30px; height: 30px; color: var(--gold); }
.afqt-box .muted { color: #c9d1e3; margin: .2rem 0 0; }
.section-title { margin: 1.6rem 0 .8rem; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.subject-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.subject-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .2rem; }
.subject-card p { margin: 0; flex: 1; }
.subject-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.soon { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--bg); padding: .2rem .55rem; border-radius: 999px; }

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; }
.stat b { display: block; font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .9rem; }
.table { display: grid; }
.trow { display: grid; grid-template-columns: 1fr 1.5fr auto auto; gap: .8rem; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: center; overflow-wrap: anywhere; }
.trow:last-child { border-bottom: 0; }

/* ---------- Footer ---------- */
.foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 2rem 16px 1.5rem; max-width: 760px; margin: 0 auto; }
.foot-links { display: flex; gap: 1.2rem; justify-content: center; }
.disclaimer { line-height: 1.5; }
.made-by a { font-weight: 700; color: var(--navy); }

/* ---------- Toast and modal ---------- */
#toast-root { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 50; display: grid; gap: .5rem; width: max-content; max-width: calc(100% - 32px); }
.toast { background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); transition: opacity .3s; }
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }
.toast.out { opacity: 0; }
.modal-back { position: fixed; inset: 0; background: rgba(20, 33, 61, .45); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal { background: var(--card); border-radius: var(--radius); padding: 1.4rem; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.row-end { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .nav span { display: none; }
  .nav a, .nav .plain-btn { padding: .55rem; }
  .brand { font-size: 1rem; }
  .trow { grid-template-columns: 1fr; gap: .1rem; }
  .subject-row { grid-template-columns: 3rem 1fr; }
  .subject-row > .muted { grid-column: 2; }
  .hero { padding-top: 1.5rem; }
}

/* ---------- Study pages ---------- */
.back { display: inline-block; margin-bottom: .8rem; font-weight: 600; text-decoration: none; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.title-row h1 { margin: 0; }
.row-gap { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-center { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: 1.2rem 0; }
.bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.bar.thin { height: 6px; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.progress-head, .progress-foot { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.streak { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: #8a5a00; }
.streak .ic { fill: var(--gold); stroke: var(--gold); }
a.subject-card.ready { text-decoration: none; color: inherit; border: 2px solid transparent; transition: border-color .15s; }
a.subject-card.ready:hover { border-color: var(--blue); }
.go { font-weight: 700; color: var(--blue); font-size: .9rem; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.set-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; text-decoration: none; color: inherit; display: grid; gap: .1rem; border: 2px solid transparent; }
.set-card:hover { border-color: var(--blue); }
.set-head { display: flex; justify-content: space-between; align-items: center; }
.score { font-size: .75rem; font-weight: 700; background: var(--bg); padding: .1rem .45rem; border-radius: 6px; }
.score.good { background: #e3f4e8; color: var(--ok); }
.word-list { display: grid; gap: .8rem; }
.word-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.word-card.wrong { border-left: 4px solid var(--bad); }
.word-card.right { border-left: 4px solid var(--ok); }
.word-card p { margin: .3rem 0; }
.word-head { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.word-head h2 { margin: 0; font-size: 1.3rem; }
.pos { font-size: .8rem; font-style: italic; color: var(--muted); }
.status { font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 6px; display: inline-flex; align-items: center; gap: .2rem; }
.status.known { background: #e3f4e8; color: var(--ok); }
.status.review { background: #fdecec; color: var(--bad); }
.example { color: var(--muted); font-style: italic; }
.translation { background: var(--gold-soft); border-radius: 8px; padding: .35rem .6rem; display: inline-block; font-size: .93rem; }
.flashcard { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 260px; max-width: 560px; margin: 0 auto;
  display: grid; place-items: center; padding: 2rem 1.5rem; text-align: center; cursor: pointer; }
.flashcard h1 { font-size: 2.2rem; margin: 0 0 .3rem; }
.flashcard:focus { outline: 3px solid var(--blue-soft); }
.answer-row .btn { min-width: 150px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; }
.clock { font-variant-numeric: tabular-nums; font-weight: 700; background: var(--card); padding: .25rem .6rem; border-radius: 8px; box-shadow: var(--shadow); }
.clock.late { color: var(--bad); }
.question { margin-top: 1rem; }
.stem { font-size: 1.15rem; margin-bottom: .4rem; }
.stem u { text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700; }
.big-word { font-size: 1.8rem; font-weight: 800; }
.choices-q { display: grid; gap: .6rem; margin-top: 1rem; }
.choice-btn { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; font: inherit; font-size: 1.05rem; padding: .8rem 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; color: var(--text); }
@media (hover: hover) { .choice-btn:hover { border-color: var(--blue); background: var(--blue-soft); } }
.letter { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--bg); font-weight: 700; font-size: .85rem; flex: none; }
.result h1 { font-size: 2.6rem; margin: 0; }
.big { font-size: 1.4rem; font-weight: 800; }
.done h1 { margin-bottom: .5rem; }

/* ---------- Protected study content: no selecting, a watermark, nothing to print ---------- */
.protected { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protected .watermark { position: absolute; inset: 0; pointer-events: none; z-index: 2; background-repeat: repeat; border-radius: inherit; }
@media print {
  body:not(.print-ok) * { display: none !important; }
  body:not(.print-ok)::after { content: "The study material is only available inside the site."; display: block; padding: 2rem; font: 16px Arial, sans-serif; }
}

/* ---------- Lessons ---------- */
.nowrap { white-space: nowrap; }
.lesson-list { display: grid; gap: .6rem; }
.lesson-item { display: flex; align-items: center; gap: .9rem; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; text-decoration: none; color: inherit; border: 2px solid transparent; }
.lesson-item:hover { border-color: var(--blue); }
.lesson-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-weight: 800; flex: none; }
.lesson-n.done { background: #e3f4e8; color: var(--ok); }
.lesson-text { display: grid; flex: 1; min-width: 0; }
.lesson { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.4rem; line-height: 1.65; }
.lesson h2 { margin-top: 1.6rem; }
.lesson h3 { margin-top: 1.2rem; }
.lesson ul { padding-left: 1.3rem; }
.lesson li { margin-bottom: .3rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: var(--blue); margin: 0 0 .2rem; }
.example-box { background: var(--blue-soft); border-left: 4px solid var(--blue); border-radius: 8px; padding: .8rem 1rem; margin: 1rem 0; }
.example-box p { margin: .25rem 0; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.lesson table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.lesson th, .lesson td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; }
.lesson th { background: var(--bg); }
.drawing { margin: 1rem 0; text-align: center; }
.drawing svg { max-width: 100%; height: auto; }
.summary-box { background: var(--gold-soft); border-radius: 10px; padding: 1rem 1.2rem; margin-top: 1.6rem; }
.summary-box h3 { margin: 0 0 .4rem; }
.terms { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .9rem; margin-top: .6rem; }
.practice { display: grid; gap: 1rem; }
.practice .question { margin: 0; }
.choice-btn:disabled { cursor: default; opacity: 1; }
.choice-btn.right { border-color: var(--ok); background: #e3f4e8; }
.choice-btn.wrong { border-color: var(--bad); background: #fdecec; }
.feedback { margin-top: .8rem; padding: .7rem .9rem; border-radius: 10px; }
.feedback.ok { background: #e3f4e8; }
.feedback.bad { background: #fdecec; }
.afqt-main { flex: 1; min-width: 0; }
.afqt-box .bar { background: rgba(255, 255, 255, .15); margin-top: .8rem; }
.afqt-box p.sm { color: #fff; margin: .3rem 0 .8rem; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.gold:hover { background: #ffb733; }

/* ---------- Practice tests ---------- */
.test-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0; }
.test-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.test-card.big-test { border-top: 4px solid var(--gold); }
.test-card .btn { align-self: flex-start; margin-top: .4rem; }
button.set-card { font: inherit; text-align: left; cursor: pointer; }
.afqt-best, .afqt-result { text-align: center; display: grid; gap: .3rem; justify-items: center; }
.afqt-best b { font-size: 2.4rem; color: var(--blue); }
.afqt-score { font-size: 4rem; line-height: 1; color: var(--blue); }
.section-intro { max-width: 620px; margin: 0 auto; }
.rules { text-align: left; max-width: 480px; margin: 1rem auto 1.4rem; color: var(--muted); }
.rules li { margin-bottom: .3rem; }
.sec-score { margin-bottom: .9rem; }
#review h3 { margin: 1.4rem 0 .6rem; }
.btn.ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn.ghost-light:hover { border-color: #fff; }

/* ---------- House ads ---------- */
.ad-slot:empty { display: none; }
.ad-slot { margin: 1.4rem 0; }
.house-ad { position: relative; background: linear-gradient(135deg, var(--navy), #22325e); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.3rem; display: grid; gap: .25rem; justify-items: start; }
.ad-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.ad-name { font-size: 1.15rem; }
.ad-tagline { margin: 0; font-weight: 600; }
.ad-body { margin: 0 0 .5rem; color: #c9d1e3; font-size: .92rem; }
.modal.wide { max-width: 520px; }
.form textarea, .form select, label select { width: 100%; font: inherit; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
label select { width: auto; margin-left: .4rem; padding: .35rem .5rem; }
.ad-row { grid-template-columns: 1.6fr auto auto auto; }
@media (max-width: 640px) { .ad-row { grid-template-columns: 1fr auto; } .ad-row > .sm { grid-column: 1; } .ad-row > button { grid-column: 2; grid-row: 1 / span 3; align-self: center; } }

/* ---------- Today's review ---------- */
.review-card { display: flex; align-items: center; gap: 1rem; border-left: 5px solid var(--gold); flex-wrap: wrap; }
.review-card > .ic { width: 30px; height: 30px; color: var(--gold); }
.review-card.done-review, .review-card.empty-review { border-left-color: var(--ok); }
.review-card.done-review > .ic, .review-card.empty-review > .ic { color: var(--ok); }
.review-card p { margin: .2rem 0 0; }
.review-main { flex: 1; min-width: 200px; }
.tag:not(.afqt) { background: var(--bg); color: var(--muted); }

/* ---------- My goal ---------- */
.goal-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.goal-card > .ic { width: 30px; height: 30px; color: var(--blue); }
.goal-count { display: grid; justify-items: center; min-width: 5.5rem; text-align: center; }
.goal-days { font-size: 2rem; line-height: 1; color: var(--blue); }
.goal-main { flex: 1; min-width: 200px; }
.goal-main p { margin: .25rem 0 0; }
.form input.small-number { width: 5rem !important; display: inline-block; padding: .3rem .5rem !important; margin-left: .3rem; }
.form input[type=date] { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; }
.rem-check { display: flex; align-items: flex-start; gap: .6rem; margin-top: 1rem; }
.rem-check input { margin-top: .3rem; }
.practice-more { margin-top: 1.4rem; border-top: 4px solid var(--blue); }
.practice-more .practice { margin: .8rem 0; }
.practice-more .question { box-shadow: none; border: 1px solid var(--line); }

/* ---------- Ad banners ---------- */
.ad-banner { display: grid; gap: .3rem; }
.ad-banner a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.ad-banner a:hover { transform: translateY(-1px); box-shadow: 0 4px 22px rgba(20, 33, 61, .16); }
.ad-banner img { display: block; width: 100%; height: auto; }
.ad-label-small { font-size: .72rem; color: var(--muted); text-align: right; }
.banner-box { border: 1px dashed var(--line); border-radius: 10px; padding: .7rem; display: grid; gap: .35rem; margin-bottom: .7rem; }
.banner-box.busy { opacity: .5; pointer-events: none; }
.banner-preview { background: var(--bg); border-radius: 8px; min-height: 60px; display: grid; place-items: center; overflow: hidden; }
.banner-preview img { max-width: 100%; max-height: 180px; display: block; }
.file-btn { cursor: pointer; }
.ad-cell { display: flex; gap: .7rem; align-items: center; }
.ad-thumb { width: 96px; height: 40px; object-fit: cover; border-radius: 6px; flex: none; }
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
/* Banners can't be saved with right-click, dragging or a long press: the click goes to the link, not to the picture */
.ad-banner, .ad-banner img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ad-banner img { pointer-events: none; -webkit-user-drag: none; }

/* ---------- Free sample questions page ---------- */
.sample-page { max-width: 820px; }
.sample-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: .5rem; }
.lead-left { font-size: 1.05rem; color: var(--muted); }
.sample-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.4rem; }
.sample-nav a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .8rem; text-decoration: none; font-weight: 600; font-size: .9rem; }
.sample-q { border-top: 1px solid var(--line); padding: 1rem 0; }
.sample-q:first-of-type { border-top: 0; }
.q-n { font-weight: 800; color: var(--blue); }
.sample-choices { margin: .4rem 0 .6rem; padding-left: 1.6rem; }
.sample-choices li { margin: .25rem 0; }
.sample-q details summary { display: inline-block; }
.sample-q details p { background: #e3f4e8; border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0 0; }
.sample-cta { text-align: center; border-top: 4px solid var(--gold); }
.sample-link { margin-top: 1rem; }
.sample-link a { font-weight: 700; }

/* ---------- Progress chart ---------- */
.progress-panel h3 { margin-top: 1.4rem; }
.chart-box { position: relative; }
.afqt-chart { width: 100%; height: auto; display: block; overflow: visible; }
.afqt-chart .pt { cursor: pointer; outline: none; }
.afqt-chart .pt:focus circle:last-child { stroke: #14213d; }
.chart-tip { position: absolute; top: 0; width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .5rem .7rem; font-size: .85rem; pointer-events: none; z-index: 3; }
.weak-list { display: grid; gap: .4rem; margin: .5rem 0 .8rem; }
.weak-row { display: grid; grid-template-columns: 11rem 1fr 2rem; align-items: center; gap: .6rem; }
.weak-name { font-size: .9rem; }
.weak-bar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.weak-bar i { display: block; height: 100%; background: #3a63d8; border-radius: 0 4px 4px 0; }
@media (max-width: 640px) { .weak-row { grid-template-columns: 7.5rem 1fr 2rem; } }

/* ---------- Hear the word ---------- */
.speak { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--blue); cursor: pointer; vertical-align: middle; padding: 0; }
.speak:hover { background: var(--blue-soft); border-color: var(--blue); }
.speak .ic { width: 1rem; height: 1rem; }
.flashcard h1 .speak { width: 2.4rem; height: 2.4rem; margin-left: .3rem; vertical-align: .2em; }
.protected .speak { position: relative; z-index: 3; }
.start-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-left: 5px solid var(--blue); }
.start-card > .ic { width: 30px; height: 30px; color: var(--blue); }
.start-card p { margin: .25rem 0 0; }

/* ---------- Report a problem ---------- */
.report-link { display: inline-flex; align-items: center; gap: .3rem; background: none; border: 0; padding: .3rem 0; margin-top: .4rem; font: inherit; font-size: .8rem; color: var(--muted); cursor: pointer; position: relative; z-index: 3; }
.report-link:hover { color: var(--bad); }
.report-link .ic { width: .9rem; height: .9rem; }
.report-link:disabled { cursor: default; color: var(--ok); }
.report-quote { background: var(--bg); border-radius: 8px; padding: .5rem .7rem; }
/* the admin has more menu items: icons only a bit earlier, so nothing wraps */
@media (max-width: 760px) { .nav span { display: none; } .nav a, .nav .plain-btn { padding: .55rem; } }

/* ---------- Share your score ---------- */
.share-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; border-left: 5px solid var(--gold); }
.share-card > .ic { width: 30px; height: 30px; color: var(--gold); fill: var(--gold); }
.share-card p { margin: .25rem 0 0; }
.lang-btn { font-weight: 800; font-size: .8rem; border: 1px solid var(--line) !important; border-radius: 8px; padding: .35rem .55rem !important; }

/* ---------- Admin: students ---------- */
.search { font: inherit; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 10px; min-width: 200px; }
.stu-list { display: grid; }
.stu-row { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: .8rem; align-items: center; padding: .7rem .4rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.stu-row:hover { background: var(--bg); }
.stu-row:last-child { border-bottom: 0; }
.stu-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .stu-row { grid-template-columns: 1fr 1fr; } .stu-name { grid-column: 1 / -1; } }

/* ---------- Public guides ---------- */
.guide-list { display: grid; gap: .8rem; margin: 1rem 0 1.4rem; }
.guide-item { display: grid; gap: .3rem; text-decoration: none; color: inherit; border: 2px solid transparent; margin: 0; }
.guide-item:hover { border-color: var(--blue); }
.guide-article h1 { margin-bottom: .4rem; }
.foot-links { flex-wrap: wrap; }

/* ---------- Money: affiliate note in the guides, printable ad report ---------- */
.affiliate-note { font-size: .85rem; color: var(--muted); background: var(--blue-soft); border-radius: 8px; padding: .6rem .8rem; }
.report-sheet h2 { margin-top: 1.4rem; }
@media print {
  body.print-ok .appbar, body.print-ok .foot, body.print-ok .no-print, body.print-ok .ad-slot, body.print-ok .toast { display: none !important; }
  body.print-ok { background: #fff; }
  body.print-ok .report-sheet { box-shadow: none; padding: 0; }
}
.label-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.label-row .status { justify-self: start; }

/* ---------- Mental math drills ---------- */
.bad-text { color: var(--bad); }
.drill-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; margin-top: 1rem; }
.drill-card { display: grid; gap: .4rem; align-content: start; margin: 0; }
.drill-card .btn { justify-self: start; margin-top: .3rem; }
.drill-run { text-align: center; max-width: 520px; margin: 1rem auto 0; }
.drill-score { font-size: 1.1rem; }
.drill-q { font-size: 2.4rem; font-weight: 800; margin: .8rem 0; font-variant-numeric: tabular-nums; }
.drill-form { display: flex; gap: .5rem; justify-content: center; }
.drill-form input { width: 9rem; font-size: 1.6rem; text-align: center; padding: .5rem; border: 2px solid var(--line, #d8dde8); border-radius: 10px; font-weight: 700; }
.drill-form input:focus { outline: none; border-color: var(--blue); }
.drill-feedback { min-height: 1.6rem; margin: .7rem 0 .4rem; font-size: 1.05rem; }
.drill-done { text-align: center; max-width: 620px; margin: 0 auto; }
.drill-done h1 { font-size: 2.6rem; }
.drill-missed { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: .6rem 0 1.2rem; }
.drill-missed span { background: var(--blue-soft); border-radius: 8px; padding: .3rem .6rem; }

/* ---------- Badges and weekly ranking ---------- */
.rank-table .trow { grid-template-columns: 3rem 1fr auto; }
.rank-table .trow.me { background: var(--blue-soft); border-radius: 8px; }
.rank-place { font-weight: 800; font-size: 1.1rem; }
.rank-how { margin-top: 1rem; }
.rank-how summary { cursor: pointer; font-weight: 600; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; }
.badge { display: grid; gap: .25rem; align-content: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.badge-icon { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; margin-bottom: .2rem; }
.badge.earned .badge-icon { background: var(--gold-soft); color: #b77900; }
.badge.locked { opacity: .65; }
.badge.locked .badge-icon { background: #eef0f4; color: var(--muted); }

/* ---------- Job areas (GT estimate) ---------- */
.gt-card { display: grid; gap: .6rem; }
.gt-score { display: block; font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.gt-bar { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, #fdecec, #fff4d6 45%, #e3f4e8 60%); margin: .4rem 0 1.4rem; }
.gt-bar i { position: absolute; top: -4px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: var(--shadow); }
.gt-bar span { position: absolute; top: 14px; transform: translateX(-50%); font-size: .75rem; color: var(--muted); }
.gt-bar span::before { content: ""; position: absolute; left: 50%; top: -14px; height: 10px; border-left: 2px solid var(--muted); }
.area-list { display: grid; gap: .8rem; }
.area-card { display: grid; gap: .45rem; margin: 0; }
.status.ok { background: #e3f4e8; color: var(--ok); }
.status.mid { background: var(--gold-soft); color: #8a5a00; }
.status.low { background: #fdecec; color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.sub-chip { font: inherit; font-size: .8rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; border: 0; background: #eef0f4; color: var(--muted); }
.sub-chip.ok { background: #e3f4e8; color: var(--ok); }
.sub-chip.mid { background: var(--gold-soft); color: #8a5a00; }
.sub-chip.low { background: #fdecec; color: var(--bad); }
.sub-chip.none { cursor: pointer; border: 1px dashed var(--muted); background: transparent; }

/* ---------- Vocabulary level and word of the day ---------- */
.level-dots { display: inline-flex; gap: 3px; vertical-align: middle; }
.level-dots i { width: 10px; height: 10px; border-radius: 50%; background: #dfe4ee; }
.level-dots i.on { background: var(--blue); }
.level-intro { display: grid; gap: .6rem; }
.level-done h1 { font-size: 2.4rem; margin: .2rem 0; }
.wotd-card { display: grid; gap: .3rem; }
.wotd-card .wotd-word b { font-size: 1.5rem; }
.wotd-card .btn { justify-self: start; margin-top: .3rem; }

/* ---------- Certificates ---------- */
.cert-list { display: grid; gap: .8rem; }
.cert-card { display: grid; gap: .5rem; margin: 0; }
.cert-card.earned { border-left: 5px solid var(--gold, #fca311); }
.next-card { display: flex; align-items: center; gap: 1rem; border-left: 5px solid var(--blue); }
.next-card > .ic { width: 1.8rem; height: 1.8rem; color: var(--blue); flex: none; }
.next-card .review-main { flex: 1; display: grid; gap: .1rem; }
@media (max-width: 560px) { .next-card { flex-wrap: wrap; } .next-card .btn { width: 100%; } }

/* ---------- Reading practice ---------- */
.reading-level .big { display: block; margin-top: .2rem; }
.reading-chart { width: 100%; height: auto; margin-top: .8rem; }
.reading-chart .grid { stroke: #e7eaf1; stroke-width: 1; }
.reading-chart .axis { font-size: 12px; fill: var(--muted); }
.reading-chart .line { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; }
.reading-chart .dot { fill: var(--blue); }
.passage { line-height: 1.7; font-size: 1.05rem; background: #f7f8fb; border-radius: 10px; padding: .9rem 1rem; }
.usage-table .trow { grid-template-columns: 1.4fr 1fr 1fr; }
.usage-table .trow.head { font-weight: 700; color: var(--muted); }

/* ---------- Study plan: small tiles ("More for today") ---------- */
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin-bottom: 1.2rem; }
.mini-tile { display: grid; gap: .25rem; align-content: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem;
  text-decoration: none; color: inherit; border: 2px solid transparent; font: inherit; text-align: left; cursor: pointer; }
a.mini-tile:hover, button.mini-tile:hover { border-color: var(--blue); }
.mini-tile > .ic { width: 1.4rem; height: 1.4rem; color: var(--blue); }
.wotd-tile .wotd-word { font-size: 1.2rem; }
.wotd-tile .eyebrow { margin: 0; }
