/* Student portal */
.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.top { background: linear-gradient(120deg, var(--indigo-900), var(--indigo-800) 55%, var(--indigo-700)); color: #fff; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; gap: 16px; }
.top .logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.top .logo span { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--violet), var(--violet-2)); display: grid; place-items: center; font-size: .85rem; }
.nav { display: flex; gap: 4px; margin-left: 8px; overflow-x: auto; }
.nav a { color: #d9d4f5; text-decoration: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.nav a.on, .nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.top .me { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.top .me button { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff; border-radius: 9px; padding: 7px 12px; cursor: pointer; }
.main { max-width: 1120px; width: 100%; margin: 0 auto; padding: 22px 16px 60px; }
.hello { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { margin: 0; font-size: 1.5rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.panel h2 { font-size: 1.1rem; margin: 0 0 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.tcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 10px; box-shadow: var(--shadow); }
.tcard h3 { margin: 0; font-size: 1.02rem; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--violet-soft); color: var(--violet); }
.tag.live { background: #e6f6ec; color: #0f5e2c; } .tag.gold { background: var(--amber-soft); color: #7a4b00; } .tag.red { background: var(--red-soft); color: #7c1630; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.tabs2 { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tabs2 button { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; min-height: 40px; color: var(--muted); }
.tabs2 button.on { background: var(--indigo-800); color: #fff; border-color: var(--indigo-800); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat b { display: block; font-size: 1.5rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.hero-score { background: linear-gradient(135deg, var(--indigo-800), var(--indigo-700)); color: #fff; border-radius: 18px; padding: 22px; display: grid; gap: 16px; grid-template-columns: auto 1fr; align-items: center; margin-bottom: 18px; }
.ring { width: 132px; height: 132px; }
.ring text { fill: #fff; font-weight: 800; }
.hero-score .kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.hero-score .kv div { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; }
.hero-score .kv b { display: block; font-size: 1.3rem; } .hero-score .kv span { color: #d9d4f5; font-size: .82rem; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 70px; gap: 10px; align-items: center; font-size: .9rem; }
.bar .track { height: 12px; border-radius: 999px; background: #efedf9; overflow: hidden; display: flex; }
.bar .ok { background: #22a05a; } .bar .no { background: #e0526f; } .bar .sk { background: #c9c5e2; }
.bar .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.legend2 { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend2 i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
table.t th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; }
.qfilter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.qfilter select { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; background: #fff; }
.qitem { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.qitem > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; background: #faf9ff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.qitem .qb { padding: 12px 14px; line-height: 1.6; }
.qitem .qb img { max-width: 100%; height: auto; }
.qitem ol.op { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.qitem ol.op li { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; gap: 10px; }
.qitem ol.op li.right { border-color: #9ad3b0; background: #eefaf2; }
.qitem ol.op li.mine.wrongpick { border-color: #f0a7b7; background: #fdf0f3; }
.qitem .sol { border-top: 1px dashed var(--line); padding: 10px 14px; background: #fcfbff; }
.st-correct { color: #0f5e2c; } .st-wrong { color: #a1223f; } .st-unattempted { color: var(--muted); } .st-partial { color: #7a4b00; }
.chart { width: 100%; height: auto; }
.row2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 800px) { .row2 { grid-template-columns: 1fr; } .hero-score { grid-template-columns: 1fr; justify-items: center; text-align: center; } .bar { grid-template-columns: 1fr 70px; } .bar .track { grid-column: 1 / -1; grid-row: 2; } .top .me span { display: none; } }

/* Phones: one-line scrolling tab rows, result cards instead of the table */
.scroll-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row button { flex: none; white-space: nowrap; }
.rlist { display: none; }
.rcard { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.rc-main { min-width: 0; } .rc-main b { display: block; line-height: 1.3; } .rc-main small, .rc-score small { color: var(--muted); font-size: .82rem; }
.rc-score { text-align: right; flex: none; } .rc-score b { display: block; font-size: 1.25rem; color: var(--violet); }
@media (max-width: 700px) {
  .main { padding: 16px 16px 24px; }
  .hello h1 { font-size: 1.3rem; }
  .rlist { display: grid; gap: 10px; } .rtable { display: none; }
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 14px; }
  .hero-score { padding: 18px 14px; }
  .hero-score .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hero-score .kv div { padding: 8px; } .hero-score .kv b { font-size: 1.1rem; }
  .qitem > header { font-size: .9rem; }
  table.t th, table.t td { padding: 8px 6px; }
}

/* result analysis (analysis.js) */
.chart-wrap { overflow-x: auto; }
.chart-wrap .chart { display: block; max-width: 100%; }
.an-insights { background: linear-gradient(135deg, #f3f1ff, #fff8e6); border-color: #e3def9; }
.an-insights ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; line-height: 1.5; }
.an-cmp td, .an-cmp th { text-align: center; } .an-cmp tbody th { text-align: left; text-transform: none; letter-spacing: 0; font-size: .88rem; color: var(--ink); font-weight: 600; }
.an-h3 { font-size: .98rem; margin: 18px 0 6px; }
.small { font-size: .85rem; }
@media (max-width: 700px) { .chart-wrap .chart { max-width: none; width: 100%; } }

/* exam picker and exam page */
.ex-pick h2, .ex-h { font-size: 1.1rem; margin: 6px 0 10px; }
.ex-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.ex-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; text-decoration: none; color: #fff; min-height: 118px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--indigo-800), var(--violet)); }
.ex-tile b { font-size: 1.15rem; } .ex-tile small { opacity: .85; line-height: 1.35; } .ex-tile span { margin-top: auto; font-weight: 700; font-size: .85rem; background: rgba(255,255,255,.16); border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
.ex-JEE_ADV { background: linear-gradient(135deg, #1f2b3d, #3c4f63); } .ex-MHTCET { background: linear-gradient(135deg, #0b4f7a, #0b8cb8); } .ex-NEET { background: linear-gradient(135deg, #0f5e3a, #1f9d63); }
.ex-sec h2 { font-size: 1.05rem; margin: 18px 0 10px; }
.tc-act { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 800px) { .ex-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .ex-tile { min-height: 104px; padding: 13px; } .ex-tile b { font-size: 1.02rem; } .ex-tile small { font-size: .78rem; } }
.nowrap { white-space: nowrap; }

/* retyped questions: text and typeset maths, figures cut at 300 dpi, the printed picture kept under "See it as printed" */
.typed-q p { margin: 0 0 .7em; }
.typed-q table { border-collapse: collapse; margin: .4em 0 .8em; max-width: 100%; }
.typed-q td, .typed-q th { border: 1px solid #b9c0cc; padding: 4px 8px; vertical-align: top; }
img.q-fig { display: block; max-width: 100%; height: auto; margin: .4em 0 .8em; }
.opt img.q-fig, .otext img.q-fig, li img.q-fig { margin: 0; }
details.asprinted { margin: .6em 0 0; font-size: .85rem; }
details.asprinted summary { cursor: pointer; color: #1d5fbf; font-weight: 600; width: max-content; }
details.asprinted img { display: block; max-width: 100%; height: auto; margin-top: .5em; border: 1px solid #e3e3ea; border-radius: 6px; }
.pkg h3 { margin: 0 0 6px; } .pkg .price { font-size: 1.2rem; color: var(--ink); } .small { font-size: .85rem; }

/* room for the page while it loads (inside the website), so the footer does not jump */
body.has-site > #app { min-height: 80vh; }

/* ---- 3D loader, streak, badges and avatar (images: shared/badges, shared/avatars) ---- */
.ld3d { display: flex; align-items: center; gap: 12px; padding: 18px 0; color: var(--muted, #6b6785); font-weight: 600; }
.ld3d img { width: 56px; height: 56px; animation: ld3d-spin 1.4s cubic-bezier(.45,.05,.55,.95) infinite; filter: drop-shadow(0 8px 10px rgba(43,31,122,.25)); }
@keyframes ld3d-spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.12); } 100% { transform: rotate(360deg) scale(1); } }
.ach { margin: 0 0 18px; padding: 18px; border-radius: 22px; background: linear-gradient(140deg, #1d1650, #2a1f7a); color: #d9d4f5; box-shadow: 0 16px 34px -18px rgba(20,15,58,.55); }
.ach-top { display: flex; align-items: center; gap: 16px; }
.ach-av { position: relative; flex: none; width: 80px; height: 80px; padding: 3px; border: 0; border-radius: 50%; cursor: pointer;
  background: conic-gradient(from 200deg, #ffe08a, #ffc53d, #ffa51a, #ffe08a); }
.ach-av img, .ach-av-empty { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; background: #140f3a; object-fit: cover; }
.ach-av-empty { font: 800 1.8rem/1 var(--font-head, sans-serif); color: #ffc53d; }
.ach-av-edit { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; color: #140f3a; background: #ffc53d; }
.ach-hi h1 { margin: 0; color: #fff; font-size: 1.5rem; }
.ach-streak { margin: 4px 0 2px; color: #fff; }
.ach-streak b { color: #ffc53d; margin-right: 6px; }
.ach-sub { margin: 0; color: #cfc8ff !important; font-size: .85rem; }
.ach-pick { margin-top: 14px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.08); }
.ach-pick p { margin: 0 0 8px; font-weight: 700; color: #fff; }
.ach-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.ach-pick-grid button { padding: 3px; border: 2px solid transparent; border-radius: 50%; background: rgba(255,255,255,.12); cursor: pointer; min-height: 44px; }
.ach-pick-grid button.on { border-color: #ffc53d; }
.ach-pick-grid img { display: block; width: 100%; height: auto; border-radius: 50%; }
.ach-badges { display: flex; gap: 10px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; }
.ach-b { flex: none; width: 104px; padding: 10px 6px; border-radius: 16px; text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.ach-b img { display: block; width: 52px; height: 52px; margin: 0 auto 4px; filter: grayscale(1) opacity(.35); }
.ach-b span { display: block; font-size: .78rem; font-weight: 700; color: #cfc8ff; }
.ach-b small { display: block; margin-top: 2px; font-size: .7rem; line-height: 1.25; color: #a9a2d6; }
.ach-b.on { background: rgba(255,197,61,.12); border-color: rgba(255,197,61,.45); }
.ach-b.on img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); animation: ach-pop .5s cubic-bezier(.2,.9,.3,1.3) both; }
.ach-b.on span { color: #ffc53d; }
@keyframes ach-pop { 0% { transform: scale(.5); } 100% { transform: none; } }
@media (max-width: 560px) { .ach-top { align-items: flex-start; } .ach-av { width: 64px; height: 64px; } .ach-hi h1 { font-size: 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .ld3d img, .ach-b.on img { animation: none; } }
