/* fonts are loaded in header.php (faster than @import) */

:root {
  --bg: #f3f5fb; --card: #fff; --ink: #1d2340; --muted: #6b7290; --line: #e3e7f2;
  --pri: #4f46e5; --pri2: #6366f1; --ok: #16a34a; --okbg: #e9f9ef; --bad: #dc2626; --badbg: #fdecec;
  --easy: #16a34a; --medium: #d97706; --hard: #dc2626;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Poppins', 'Noto Sans Devanagari', system-ui, sans-serif; line-height: 1.5; }
a { color: var(--pri); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { text-align: center; }
.left { text-align: left; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; background: linear-gradient(90deg, var(--pri), #7c3aed); color: #fff; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.lang-switch { display: flex; background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px; }
.lang-switch a { color: #fff; text-decoration: none; padding: 5px 14px; border-radius: 999px; font-size: .9rem; }
.lang-switch a.on { background: #fff; color: var(--pri); font-weight: 600; }

.wrap { max-width: 860px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border-radius: 16px; padding: 24px; margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(30,40,90,.06); border: 1px solid var(--line); }
.narrow { max-width: 380px; margin: 40px auto; }
.hero h1 { margin: 0 0 4px; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 20px; }

.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.grid-form .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
select, input, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); width: 100%; }
select:disabled { background: #f6f7fb; color: #aaa; }
textarea { min-height: 70px; resize: vertical; }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { flex-direction: row; cursor: pointer; }
.pill input { display: none; }
.pill span { padding: 8px 18px; border-radius: 999px; border: 2px solid var(--line); font-weight: 600; }
.pill input:checked + span { background: var(--pri); border-color: var(--pri); color: #fff; }
.pill-easy input:checked + span { background: var(--easy); border-color: var(--easy); }
.pill-medium input:checked + span { background: var(--medium); border-color: var(--medium); }
.pill-hard input:checked + span { background: var(--hard); border-color: var(--hard); }

.btn { display: inline-block; font: inherit; font-weight: 600; padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn.primary:hover { background: var(--pri2); }
.btn.small { padding: 4px 10px; font-size: .8rem; }
.btn.danger { color: var(--bad); border-color: #f3c4c4; }

.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--pri), #7c3aed); transition: width .3s; }
.qmeta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.qtext { font-size: 1.3rem; margin: 14px 0 18px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; color: #fff; margin-left: 6px; }
.badge.easy { background: var(--easy); } .badge.medium { background: var(--medium); } .badge.hard { background: var(--hard); }

.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; font: inherit; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); transition: .15s; }
.opt:hover:not(:disabled) { border-color: var(--pri); background: #f5f5ff; }
.opt .letter { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); font-weight: 700; }
.opt.right { border-color: var(--ok); background: var(--okbg); }
.opt.right .letter { background: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--badbg); }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt:disabled { cursor: default; }

.feedback { display: none; margin-top: 16px; padding: 12px 14px; border-radius: 12px; }
.feedback.show { display: block; }
.feedback.ok { background: var(--okbg); color: #14532d; }
.feedback.bad { background: var(--badbg); color: #7f1d1d; }
.exp { margin-top: 6px; font-size: .92rem; color: var(--ink); }
.nav { display: flex; justify-content: space-between; margin-top: 22px; }

.score { font-size: 3rem; font-weight: 700; margin: 10px 0 18px; }
.score small { display: block; font-size: 1.1rem; color: var(--muted); }
.score.good { color: var(--ok); } .score.mid { color: var(--medium); } .score.low { color: var(--bad); }
.actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.rev { border-left: 4px solid; padding: 10px 14px; margin: 10px 0; border-radius: 8px; background: var(--bg); font-size: .92rem; }
.rev.ok { border-color: var(--ok); } .rev.bad { border-color: var(--bad); }

.stack { display: flex; flex-direction: column; gap: 10px; }
.alert { background: #eef2ff; border: 1px solid #c7d2fe; padding: 10px 14px; border-radius: 10px; }
.admin-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-head h1 { margin: 0; flex: 1; }
.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cols3 .card { margin-bottom: 0; } .cols3 { margin-bottom: 20px; }
.cols3 h3 { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 12px 0; align-items: end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--bg); }

@media (max-width: 700px) {
  .grid-form, .row2, .cols3 { grid-template-columns: 1fr; }
  .qtext { font-size: 1.1rem; }
  .card { padding: 18px; }
}

/* ---------- Home page ---------- */
.menu { display: flex; gap: 16px; align-items: center; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.menu a.active { text-decoration: underline; text-underline-offset: 5px; opacity: 1; }
.who { color: #fff; font-size: .85rem; background: rgba(255,255,255,.15); padding: 4px 10px; border-radius: 99px; }
.who small { opacity: .8; text-transform: capitalize; }
.burger { display: none; color: #fff; font-size: 1.5rem; cursor: pointer; margin-left: auto; }
.menu a { color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; opacity: .9; }
.menu a:hover { opacity: 1; text-decoration: underline; }
.home-hero { text-align: center; color: #fff; border-radius: 22px; padding: 56px 24px 40px; margin-bottom: 28px;
  background: radial-gradient(circle at 20% 10%, #818cf8 0, transparent 45%), linear-gradient(135deg, #4f46e5, #7c3aed); }
.home-hero h1 { font-size: 2.3rem; margin: 0 0 10px; line-height: 1.25; }
.home-hero p { font-size: 1.08rem; opacity: .92; max-width: 560px; margin: 0 auto 26px; }
.btn.big { padding: 14px 32px; font-size: 1.05rem; border-radius: 12px; }
.home-hero .btn.big { background: #fff; color: var(--pri); border: none; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.stats { display: flex; justify-content: center; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.stats div { background: rgba(255,255,255,.15); border-radius: 14px; padding: 12px 22px; min-width: 110px; }
.stats b { display: block; font-size: 1.6rem; }
.stats span { font-size: .85rem; opacity: .9; }
.sec-title { margin: 30px 0 14px; font-size: 1.35rem; }
.grade-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.grade-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 16px; text-decoration: none;
  background: #fff; border: 1px solid var(--line); color: var(--ink); box-shadow: 0 4px 14px rgba(30,40,90,.05); transition: .15s; }
.grade-card:hover { transform: translateY(-3px); border-color: var(--pri); }
.g-name { font-weight: 700; font-size: 1.1rem; }
.g-count { color: var(--muted); font-size: .85rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { margin: 0; text-align: center; }
.step .ic { font-size: 2rem; margin-bottom: 6px; }
.step p { margin: 6px 0 0; font-size: .9rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }
.features > div { display: flex; gap: 12px; align-items: flex-start; }
.features .ic { font-size: 1.6rem; }
.features p { margin: 2px 0 0; font-size: .88rem; }
@media (max-width: 860px) {
  .top { flex-wrap: wrap; }
  .burger { display: block; }
  .menu { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 0 4px; }
  #navToggle:checked ~ .menu { display: flex; }
}
@media (max-width: 700px) {
  .home-hero h1 { font-size: 1.6rem; }
  .steps, .features { grid-template-columns: 1fr; }
}

/* ---------- v2: login / exam records ---------- */
.alert.bad { background: var(--badbg); border-color: #f5b5b5; color: #7f1d1d; }
.exam-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 600; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.dot { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .8rem; cursor: pointer; }
.dot.ok { background: var(--okbg); border-color: var(--ok); color: var(--ok); font-weight: 700; }
.dot.bad { background: var(--badbg); border-color: var(--bad); color: var(--bad); font-weight: 700; }
.dot.cur { outline: 2px solid var(--pri); outline-offset: 1px; }
.rev-opts { margin: 8px 0 4px; padding-left: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.rev-opts li { padding: 4px 8px; border-radius: 6px; }
.rev-opts li.right { background: var(--okbg); color: #14532d; font-weight: 600; }
.rev-opts li.wrong { background: var(--badbg); color: #7f1d1d; text-decoration: line-through; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-cards .card { margin: 0; padding: 18px; }
.stat-cards span { display: block; color: var(--muted); font-size: .85rem; }
.stat-cards b { font-size: 1.8rem; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px; }
.filter-bar select { width: auto; flex: 1; min-width: 180px; }
.pct.good { color: var(--ok); } .pct.mid { color: var(--medium); } .pct.low { color: var(--bad); }
.row4 { display: grid; grid-template-columns: 1.3fr 1fr 1fr .8fr auto; gap: 10px; }
form.inline { display: flex; gap: 6px; align-items: center; margin: 0; }
.small-input { width: 130px; padding: 6px 8px; font-size: .85rem; }
td select { padding: 6px 8px; font-size: .85rem; width: auto; }
tr.disabled td { opacity: .55; }
.chip { padding: 5px 14px; border-radius: 99px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); font-size: .85rem; font-weight: 600; }
.chip.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.small-text { font-size: .82rem; margin: 10px 0 0; }
@media (max-width: 700px) {
  .stat-cards, .row4, .rev-opts { grid-template-columns: 1fr; }
}

/* ---------- v3: boards ---------- */
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before { content: '▸ '; }
details.card[open] > summary::before { content: '▾ '; }
.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.cols4 h3 { margin: 0; }
.row4q { display: grid; grid-template-columns: .8fr .8fr 1fr 1.6fr .7fr; gap: 10px; margin: 12px 0; }
.board-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.board-tabs button { font: inherit; font-weight: 600; padding: 8px 18px; border-radius: 99px; border: 2px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); }
.board-tabs button.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.g-subj { color: var(--muted); font-size: .78rem; }
@media (max-width: 860px) { .cols4, .row4q { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cols4, .row4q { grid-template-columns: 1fr; } }
.grade-grid[hidden] { display: none; }
.en-only { font-size: .7rem; font-weight: 600; opacity: .75; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; }
#hindiBox[hidden] { display: none; }
.row2:has(#hindiBox[hidden]) { grid-template-columns: 1fr; }
.board-tabs a { font-weight: 600; padding: 8px 20px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.board-tabs a.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.badge.marks { background: #eef2ff; color: var(--pri); border: 1px solid #c7d2fe; }
.marks-note { margin: 0; font-size: .88rem; }

/* ---------- v6: practice (split) / exam modes ---------- */
.wrap.wide { max-width: 1320px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.split > .card { margin-bottom: 0; }
.study { position: sticky; top: 16px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 18px 20px; }
.study-head { font-weight: 700; margin-bottom: 10px; }
.study-head small { font-weight: 400; }
.study-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 12px; }
.study-tabs button { font: inherit; font-weight: 600; border: none; background: none; padding: 8px 14px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.study-tabs button.on { color: var(--pri); border-bottom-color: var(--pri); }
.study-body { overflow-y: auto; line-height: 1.65; font-size: .95rem; padding-right: 6px; }
.study-body h4 { margin: 14px 0 6px; color: var(--pri); font-size: 1rem; }
.study-body h4:first-child { margin-top: 0; }
.study-body p { margin: 0 0 10px; }
.study-body ul { margin: 0 0 10px; padding-left: 20px; }
.study-body li { margin-bottom: 4px; }
.study-body .refs li { margin-bottom: 8px; word-break: break-word; }
.exp-box { margin-top: 14px; padding: 10px 12px; background: #eef2ff; border-radius: 10px; font-size: .9rem; }
.opt.picked { border-color: var(--pri); background: #eef2ff; }
.opt.picked .letter { background: var(--pri); color: #fff; }
.dot.done { background: #eef2ff; border-color: var(--pri); color: var(--pri); font-weight: 700; }
.submit-row { margin-top: 16px; text-align: right; }
.timer { font-variant-numeric: tabular-nums; color: var(--ink); }
.timer.low { color: var(--bad); }
.mode-badge { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 10px; border-radius: 99px; vertical-align: middle; }
.mode-badge.practice { background: var(--okbg); color: #14532d; }
.mode-badge.exam { background: #fff4e5; color: #9a5b00; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card { cursor: pointer; }
.mode-card input { display: none; }
.mode-card span { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; height: 100%; font-weight: 400; }
.mode-card small { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.mode-card input:checked + span { border-color: var(--pri); background: #f5f5ff; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.notes-grid textarea { min-height: 180px; font-size: .88rem; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .study { position: static; max-height: none; }
}
@media (max-width: 600px) { .mode-cards, .notes-grid { grid-template-columns: 1fr; } }
.hi-note[hidden] { display: none; }

/* ---------- v8: open article in panel ---------- */
.wiki-bar { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 10px; background: var(--bg); border-radius: 10px; margin-bottom: 10px; font-size: .88rem; position: sticky; top: 0; z-index: 2; }
.wiki-bar b { flex: 1; min-width: 120px; color: var(--ink); }
.wiki-note { font-size: .85rem; color: #9a5b00; background: #fff4e5; padding: 6px 10px; border-radius: 8px; }
.wiki { font-size: .93rem; line-height: 1.65; }
.wiki h2, .wiki h3 { font-size: 1.02rem; color: var(--pri); margin: 16px 0 6px; border: none; }
.wiki p { margin: 0 0 10px; }
.wiki img { max-width: 100%; height: auto; border-radius: 6px; }
.wiki table { width: 100% !important; max-width: 100%; border-collapse: collapse; font-size: .82rem; margin: 8px 0; display: block; overflow-x: auto; }
.wiki table td, .wiki table th { border: 1px solid var(--line); padding: 4px 6px; vertical-align: top; }
.wiki .infobox { float: none; margin: 0 0 12px; }
.wiki figure, .wiki .thumb { margin: 8px 0; }
.wiki figcaption, .wiki .thumbcaption { font-size: .78rem; color: var(--muted); }
.wiki ul, .wiki ol { padding-left: 20px; }
.wiki .hatnote { font-size: .8rem; color: var(--muted); font-style: italic; }
.wiki-credit { font-size: .75rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 14px; }
.article-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 10px; }

/* v11 games button on home page */
.home-hero .btn.big.game-btn { background: #fde047; color: #713f12; margin-left: 8px; }
@media (max-width: 500px) { .home-hero .btn.big.game-btn { margin: 10px 0 0; } }

/* ---------- v12: open home page, guest start, competitive exams, news box ---------- */
.menu a.nav-btn { background: #fff; color: var(--pri); padding: 6px 14px; border-radius: 99px; opacity: 1; }
.menu a.nav-btn.ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.75); padding: 4px 12px; }
.menu a.nav-btn:hover { text-decoration: none; filter: brightness(.96); }
.alert.ok-alert { background: var(--okbg); border-color: #b6e8c8; color: #14532d; margin-bottom: 16px; }
.guest-tag { display: inline-block; font-size: .72rem; background: #fef3c7; color: #92400e; padding: 1px 8px; border-radius: 99px; font-weight: 600; }
.guest-box .full-w { display: block; text-align: center; }
.guest-box .or-line { margin: 14px 0 4px; font-size: .9rem; }
.small-text { font-size: .85rem; }

.hero-name { display: flex; gap: 10px; max-width: 520px; margin: 0 auto; }
.hero-name input { flex: 1; min-width: 0; font-size: 1.05rem; padding: 14px 18px; border-radius: 14px; border: none; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.hero-name .btn.big { white-space: nowrap; }
.home-hero .hero-small { font-size: .92rem; opacity: .9; margin: 12px auto 4px; }
.home-hero .hero-small a { color: #fff; font-weight: 700; }
.hero-links { display: flex; justify-content: center; gap: 12px; margin: 10px 0 0; }
.hero-links a { color: #fff; font-weight: 600; text-decoration: none; background: rgba(255,255,255,.15); padding: 7px 16px; border-radius: 99px; }
.hero-links a:hover { background: rgba(255,255,255,.28); }
.hero-hello { font-size: 1.15rem; font-weight: 600; margin: 0 0 16px; }
.home-hero .btn.big.ghost-btn { background: rgba(255,255,255,.18); color: #fff; margin-left: 8px; box-shadow: none; }

.home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.home-side { position: sticky; top: 16px; }
.comp-card h2 { margin-top: 0; }
.exam-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.exam-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .92rem; background: #fff; transition: .15s; }
.exam-chip small { background: var(--bg); color: var(--muted); border-radius: 99px; padding: 1px 8px; font-weight: 600; font-size: .75rem; }
.exam-chip:hover { border-color: var(--pri); color: var(--pri); transform: translateY(-2px); }
.grade-grid.exams { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

.news-box { padding: 16px; }
.news-head { font-weight: 700; font-size: 1.05rem; margin-bottom: 10px; }
.news-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.news-tabs button { flex: 1; font: inherit; font-size: .85rem; font-weight: 600; padding: 6px 8px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.news-tabs button.on { background: var(--pri); border-color: var(--pri); color: #fff; }
.news-list { list-style: none; margin: 0; padding: 0; max-height: 430px; overflow-y: auto; }
.news-list li { padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.35; }
.news-list li:last-child { border-bottom: none; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.news-list a:hover { color: var(--pri); text-decoration: underline; }
.news-list small { display: block; color: var(--muted); font-size: .76rem; margin-top: 3px; }
.news-foot { font-size: .72rem; margin-top: 8px; }

@media (max-width: 980px) {
  .home-cols { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .news-list { max-height: 300px; }
}
@media (max-width: 560px) {
  .hero-name { flex-direction: column; }
  .home-hero .btn.big.ghost-btn { margin: 10px 0 0; }
}

/* =========================================================
   v14: ADARSH PRACTICE - brand + home page redesign
   ========================================================= */
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; letter-spacing: .2px; }
.brand .logo { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 3px 6px rgba(0,0,0,.18)); }
.brand b { color: #fde047; font-weight: 800; }
.top { background: linear-gradient(90deg, #3730a3, #4f46e5 45%, #7c3aed); box-shadow: 0 4px 18px rgba(55,48,163,.25); position: relative; z-index: 5; }

/* hero */
.ap-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: center;
  color: #fff; border-radius: 28px; padding: 48px 44px 28px; margin-bottom: 30px;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 45%, #7c3aed 80%, #a21caf 100%); }
.ap-hero .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; pointer-events: none; }
.ap-hero .b1 { width: 340px; height: 340px; background: radial-gradient(circle, #818cf8, transparent 70%); top: -120px; left: -80px; }
.ap-hero .b2 { width: 260px; height: 260px; background: radial-gradient(circle, #f472b6, transparent 70%); bottom: -120px; right: 18%; }
.ap-hero .b3 { width: 180px; height: 180px; background: radial-gradient(circle, #fde047, transparent 70%); top: 20px; right: -40px; opacity: .35; }
.ap-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .14;
  background-image: radial-gradient(#fff 1px, transparent 1.4px); background-size: 22px 22px; }
.ap-hero-text, .ap-hero-art, .ap-stats { position: relative; z-index: 1; }
.kicker { display: inline-block; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); padding: 6px 14px;
  border-radius: 99px; font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.ap-hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 14px; font-weight: 800; }
.ap-hero h1 .brand-big { display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #fde047; margin-bottom: 8px; }
.ap-hero h1 em { font-style: normal; background: linear-gradient(90deg, #fde047, #f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ap-hero .lead { font-size: 1.05rem; opacity: .92; max-width: 520px; margin: 0 0 24px; }
.ap-hero .hero-name { margin: 0; max-width: 500px; }
.ap-hero .hero-name .btn.big { background: #fde047; color: #312e81; font-weight: 800; }
.ap-hero .hero-name .btn.big:hover { background: #facc15; }
.ap-hero .hero-small, .ap-hero .hero-links { text-align: left; justify-content: flex-start; margin-left: 0; }
.ap-hero .hero-hello { font-size: 1.2rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-btns .btn.big { margin: 0 !important; }
.ap-hero .btn.big { background: #fff; color: var(--pri); border: none; box-shadow: 0 8px 22px rgba(0,0,0,.2); }

.ap-hero-art { min-height: 340px; }
.ap-hero-art .art { width: 100%; max-width: 440px; display: block; margin: 0 auto; animation: floaty 6s ease-in-out infinite; }
.ap-hero-art .ring { animation: ring 2.2s ease-out both; }
.ap-hero-art .tw { transform-origin: center; transform-box: fill-box; animation: twinkle 2.4s ease-in-out infinite; }
.ap-hero-art .t2 { animation-delay: 1.1s; }
.float { position: absolute; background: #fff; color: var(--ink); font-size: .85rem; font-weight: 600; padding: 8px 14px; border-radius: 14px;
  box-shadow: 0 10px 26px rgba(30,27,75,.3); white-space: nowrap; animation: floaty 5s ease-in-out infinite; }
.float b { color: var(--ok); }
.float.f1 { top: 8%; left: 2%; }
.float.f2 { bottom: 12%; left: 0; animation-delay: 1.4s; }
.float.f2 b { color: var(--pri); }
.float.f3 { top: 46%; right: -2%; animation-delay: .7s; background: #312e81; color: #fff; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes ring { from { stroke-dasharray: 0 252; } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .5; } }

.ap-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.ap-stats div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 14px 16px; text-align: center; backdrop-filter: blur(4px); }
.ap-stats b { display: block; font-size: 1.7rem; font-weight: 800; }
.ap-stats span { font-size: .82rem; opacity: .9; }

/* 3 tiles */
.ap-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.ap-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 22px; border-radius: 20px;
  color: #fff; text-decoration: none; min-height: 190px; box-shadow: 0 10px 26px rgba(30,40,90,.14); transition: transform .18s, box-shadow .18s; }
.ap-tile:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(30,40,90,.22); }
.ap-tile::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); right: -50px; bottom: -60px; }
.ap-tile .ti { width: 56px; height: 56px; margin-bottom: 8px; }
.ap-tile b { font-size: 1.2rem; }
.ap-tile span { font-size: .88rem; opacity: .92; }
.ap-tile i { font-style: normal; font-weight: 700; margin-top: auto; padding-top: 10px; }
.t-school { background: linear-gradient(135deg, #2563eb, #4f46e5); }
.t-comp { background: linear-gradient(135deg, #7c3aed, #c026d3); }
.t-games { background: linear-gradient(135deg, #f97316, #db2777); }

/* exam groups */
.comp-card { border-top: 5px solid #7c3aed; }
.comp-card .sec-title { margin-top: 0; }
.exam-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.exam-group { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--gc) 7%, #fff), #fff); }
.eg-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 10px; color: var(--gc); }
.eg-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1.1rem; background: color-mix(in srgb, var(--gc) 15%, #fff); }
.eg-list { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-group .exam-chip { border-color: color-mix(in srgb, var(--gc) 25%, #fff); }
.exam-group .exam-chip:hover { border-color: var(--gc); color: var(--gc); }

/* class cards with colour badges */
.grade-card { position: relative; padding-top: 18px; }
.g-badge { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff; margin-bottom: 6px;
  background: var(--pri); box-shadow: 0 6px 14px rgba(79,70,229,.25); }
.gc1 .g-badge { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.gc2 .g-badge { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.gc3 .g-badge { background: linear-gradient(135deg, #22c55e, #15803d); }
.gc4 .g-badge { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.gc5 .g-badge { background: linear-gradient(135deg, #ec4899, #be185d); }
.gc0 .g-badge { background: linear-gradient(135deg, #a855f7, #7c3aed); }

/* steps */
.ap-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; position: relative; }
.ap-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 18px 18px; text-align: center; box-shadow: 0 4px 16px rgba(30,40,90,.05); }
.ap-step .num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; font-weight: 800; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(79,70,229,.35); }
.ap-step .ic { font-size: 2.1rem; margin: 4px 0 6px; }
.ap-step p { margin: 6px 0 0; font-size: .9rem; }

/* why */
.ap-why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.why-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.why-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.why-card p { margin: 3px 0 0; font-size: .88rem; }

/* news live dot */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-left: 6px; vertical-align: middle; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,.6); } 100% { box-shadow: 0 0 0 10px rgba(239,68,68,0); } }
.news-box { border-top: 5px solid #ef4444; }

/* CTA */
.ap-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 34px 0 10px; padding: 28px 32px;
  border-radius: 24px; color: #fff; background: linear-gradient(120deg, #0f766e, #0891b2 50%, #4f46e5); box-shadow: 0 12px 30px rgba(8,145,178,.25); }
.ap-cta h2 { margin: 0 0 4px; font-size: 1.5rem; }
.ap-cta p { margin: 0; opacity: .92; }
.ap-cta .cta-form { margin: 0; max-width: 460px; flex: 1; }
.ap-cta .btn.big { background: #fde047; color: #134e4a; border: none; font-weight: 800; }

.foot { padding: 26px; }

@media (max-width: 980px) {
  .ap-hero { grid-template-columns: 1fr; padding: 34px 22px 22px; }
  .ap-hero-art { min-height: 0; max-width: 420px; margin: 0 auto; width: 100%; }
  .ap-tiles { grid-template-columns: 1fr; }
  .ap-tile { min-height: 0; }
}
@media (max-width: 600px) {
  .ap-hero h1 { font-size: 1.8rem; }
  .ap-stats { grid-template-columns: repeat(2, 1fr); }
  .ap-steps, .ap-why { grid-template-columns: 1fr; }
  .ap-steps { gap: 24px; }
  .float { font-size: .75rem; padding: 6px 10px; }
  .float.f3 { display: none; }
  .ap-cta { padding: 22px; }
  .brand { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-hero-art .art, .float, .ap-hero-art .tw, .live-dot { animation: none; }
}
.exam-chip small { white-space: nowrap; }
.exam-group .exam-chip { line-height: 1.25; }

/* ===== v15: public question pages (learn.php) + blog ===== */
.crumbs { font-size: .85rem; color: var(--muted); margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.crumbs a { text-decoration: none; }
.crumbs i { font-style: normal; opacity: .6; }
.seo-head h1 { margin: 0 0 8px; font-size: 1.6rem; line-height: 1.3; }
.seo-head h1 small { display: block; font-size: .95rem; font-weight: 400; color: var(--muted); margin-top: 4px; }
.card h2 { font-size: 1.2rem; margin: 0 0 12px; }
.card h2 a { text-decoration: none; }
.seo-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.seo-cta .btn { text-decoration: none; }
.seo-article h2, .seo-article h3 { margin: 18px 0 8px; }
.seo-article p, .seo-article li { line-height: 1.7; }
.seo-qs { padding-left: 22px; margin: 0; }
.seo-q { padding: 14px 0; border-bottom: 1px solid var(--line); }
.seo-q:last-child { border-bottom: none; }
.seo-qtext { font-weight: 600; margin: 0 0 6px; }
.seo-ch { margin: 0 0 6px; font-size: .8rem; }
.seo-ch a { text-decoration: none; color: var(--muted); }
.seo-opts { margin: 0 0 8px; padding-left: 24px; }
.seo-opts li { margin: 2px 0; }
.seo-ans summary { cursor: pointer; color: var(--pri); font-weight: 600; font-size: .9rem; display: inline-block; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; }
.seo-ans[open] summary { background: var(--okbg); color: var(--ok); border-color: transparent; }
.seo-ans p { margin: 8px 0 0; }
.seo-method { margin-top: 8px; font-size: .92rem; }
.seo-method ul { margin: 4px 0; padding-left: 20px; }
.seo-method p { margin: 4px 0 0; }
.seo-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 18px; }
.seo-links.one-col { grid-template-columns: 1fr; }
.seo-links li { padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 8px; }
.seo-links li a { text-decoration: none; }
.seo-links li small { color: var(--muted); white-space: nowrap; }
.seo-links li.on a { font-weight: 700; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.blog-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); margin: 0; transition: transform .15s; }
.blog-card:hover { transform: translateY(-2px); }
.blog-card small { color: var(--pri); margin-top: auto; }
.blog-post h1 { font-size: 1.7rem; line-height: 1.3; margin: 0 0 6px; }
.inline-check { flex-direction: row; align-items: center; gap: 8px; }
.inline-check input { width: auto; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 10px; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--pri); }
@media (max-width: 700px) {
  .seo-head h1, .blog-post h1 { font-size: 1.3rem; }
  .seo-cta .btn { width: 100%; text-align: center; }
  .seo-links { grid-template-columns: 1fr; }
}

/* ===== v16: professional courses ===== */
.ap-tiles.four { grid-template-columns: repeat(4, 1fr); }
.t-prof { background: linear-gradient(135deg, #0f766e, #0891b2); }
.prof-card { border-top: 5px solid #0f766e; }
.prof-card .sec-title { margin-top: 0; }
.admin-note { background: #fff7ed; border: 1px dashed #f59e0b; color: #9a3412; border-radius: 10px; padding: 8px 12px; font-size: .85rem; margin: 8px 0 0; }
.exam-chip.empty, .grade-card.empty { border-style: dashed; opacity: .6; }
.exam-chip.empty small { background: #fff7ed; color: #9a3412; }
.hid-badge { position: absolute; top: 8px; right: 8px; font-size: .68rem; font-weight: 700; background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; border-radius: 99px; padding: 2px 8px; }
.g-job { color: var(--muted); font-size: .76rem; line-height: 1.3; }
@media (max-width: 980px) { .ap-tiles.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .ap-tiles.four { grid-template-columns: 1fr; } }

/* ---------- v18: coaching-institute hero ---------- */
.ap-hero { background: radial-gradient(1200px 500px at 85% 110%, rgba(250,204,21,.28), transparent 60%),
  linear-gradient(135deg, #1e1b4b 0%, #3730a3 35%, #6d28d9 70%, #be185d 100%); }
.ap-hero h1 { font-size: 2.9rem; }
.ap-hero h1 em { background: linear-gradient(90deg, #fde047, #fb923c); -webkit-background-clip: text; background-clip: text; }
.ap-hero-art { min-height: 380px; }
.ap-hero-art .art { max-width: 470px; animation: none; }
.ap-hero-art .kid-kid { animation: hop 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.ap-hero-art .kid-girl { animation: hop 2.6s ease-in-out .5s infinite; transform-box: fill-box; transform-origin: bottom; }
.ap-hero-art .kid-adult { animation: hop 2.6s ease-in-out 1s infinite; transform-box: fill-box; transform-origin: bottom; }
.ap-hero-art .cf { animation: fall 3.6s ease-in-out infinite; transform-box: fill-box; }
.ap-hero-art .cf.c1 { animation-delay: .9s; } .ap-hero-art .cf.c2 { animation-delay: 1.8s; } .ap-hero-art .cf.c3 { animation-delay: 2.7s; }
.ap-hero-art .badge { animation: none; }
.ap-hero-art .ring { animation: ring100 2.2s ease-out both; }
.float.f1 { top: 34%; left: auto; right: -2%; }
.float.f2 { top: 1%; bottom: auto; left: 30%; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes fall { 0%, 100% { transform: translateY(0) rotate(0); opacity: 1; } 50% { transform: translateY(14px) rotate(40deg); opacity: .7; } }
@keyframes ring100 { from { stroke-dasharray: 0 233; } }

.ap-ribbon { overflow: hidden; margin: -14px 0 28px; border-radius: 16px; background: linear-gradient(90deg, #fde047, #fb923c);
  box-shadow: 0 8px 22px rgba(251,146,60,.28); }
.ap-ribbon .rb-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ap-ribbon span { white-space: nowrap; padding: 12px 22px; font-weight: 700; color: #3b0764; font-size: .95rem; border-right: 2px dotted rgba(59,7,100,.25); }
.ap-ribbon:hover .rb-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (max-width: 820px) {
  .ap-hero h1 { font-size: 1.9rem; }
  .ap-hero-art { min-height: 0; }
  .float.f1 { right: 0; } .float.f2 { left: 22%; }
}
@media (prefers-reduced-motion: reduce) {
  .ap-hero-art .kid-kid, .ap-hero-art .kid-girl, .ap-hero-art .kid-adult, .ap-hero-art .cf, .ap-ribbon .rb-track { animation: none; }
}
.ap-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
