/* KSG PT Shala — bright, rounded, colourful study-app look */
:root {
  --bg: #f6f7fb; --card: #fff; --ink: #282e3e; --muted: #646f90; --line: #e0e4f0;
  --brand: #4255ff; --brand-dark: #2e3fd6; --brand-soft: #e8ebff; --brand-ink: #fff;
  --orange: #f26a21; --orange-soft: #ffe8da;
  --yellow: #ffcd1f; --yellow-soft: #fff3c4;
  --teal: #1fb5b0; --teal-soft: #d3f4f1;
  --green: #17a368; --green-soft: #d8f5e5;
  --purple: #9b5cf6; --purple-soft: #ebdeff;
  --pink: #ff5c8a; --pink-soft: #ffe0ea;
  --red: #e5384c; --red-soft: #fde4e7;
  --good: var(--green); --good-bg: var(--green-soft); --bad: var(--red); --bad-bg: var(--red-soft);
  --warn: #9a5b00; --warn-bg: var(--yellow-soft);
  --radius: 18px; --shadow: 0 2px 0 rgba(40, 46, 62, .06), 0 8px 24px rgba(66, 85, 255, .06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Avenir Next", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif; }
a { color: var(--brand); }
h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin: .4rem 0 1rem; line-height: 1.2; }
h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 .7rem; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .r { text-align: right; }
.bad { color: var(--bad); } .good { color: var(--good); }
.pad { padding: 1rem 1.1rem 0; }

/* ---- top bar ---- */
.topbar { background: var(--card); position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 12px rgba(40, 46, 62, .06); }
.topbar::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--brand), var(--purple), var(--pink), var(--orange), var(--yellow)); }
.topbar-in { max-width: 1100px; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--brand); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.logo { height: 42px; width: auto; display: block; }
.nav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.nav a { white-space: nowrap; padding: .4rem .95rem; border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; }
.nav a:hover { background: var(--brand-soft); color: var(--brand); }
.nav a.active { background: var(--brand); color: var(--brand-ink); }
.who { display: flex; align-items: center; gap: .7rem; font-size: .9rem; }
.who-name { font-weight: 700; }
.chip { background: var(--orange-soft); color: var(--orange); border-radius: 99px; padding: .05rem .65rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.container { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1rem 4rem; }
.container.narrow { max-width: 660px; }

/* ---- cards & layout ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card.callout { background: var(--yellow-soft); border-color: var(--yellow); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: .8rem; }
ul.plain { padding-left: 1.1rem; } ul.plain li { margin: .3rem 0; }
ol.steps { padding-left: 1.2rem; } ol.steps li { margin: .35rem 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { border-radius: var(--radius); padding: .9rem 1.1rem; background: var(--brand-soft); border: 2px solid transparent; }
.stat:nth-child(5n+1) { background: var(--brand-soft); } .stat:nth-child(5n+2) { background: var(--yellow-soft); }
.stat:nth-child(5n+3) { background: var(--teal-soft); } .stat:nth-child(5n+4) { background: var(--pink-soft); }
.stat:nth-child(5n+5) { background: var(--purple-soft); }
.stat-n { font-size: 1.6rem; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; } .stat-l { font-size: .82rem; color: var(--muted); font-weight: 600; }

/* welcome banner + login hero */
.banner { background: linear-gradient(120deg, var(--brand), var(--purple)); color: #fff; border-radius: 24px; padding: 1.3rem 1.5rem; margin-bottom: 1.2rem; position: relative; overflow: hidden; }
.banner::after { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: var(--yellow); opacity: .85; }
.banner::before { content: ""; position: absolute; right: 90px; bottom: -40px; width: 90px; height: 90px; border-radius: 50%; background: var(--pink); opacity: .85; }
.banner h1, .banner p { position: relative; z-index: 1; margin: 0; } .banner p { opacity: .92; margin-top: .2rem; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; min-height: 60vh; }
.hero-text h1 { font-size: 3.6rem; line-height: 1.05; margin: .8rem 0 .4rem; color: var(--brand); }
.hero-text .tagline { font-size: 1.7rem; font-weight: 800; letter-spacing: -.01em; color: var(--orange); margin: 0; max-width: none; }
.hero-logo { height: 140px; width: auto; background: #fff; border-radius: 24px; padding: .7rem 1rem; box-shadow: var(--shadow); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.pill { padding: .35rem .9rem; border-radius: 99px; font-weight: 700; font-size: .9rem; }
.p1 { background: var(--brand-soft); color: var(--brand); } .p2 { background: var(--yellow-soft); color: #8a6500; }
.p3 { background: var(--teal-soft); color: #0c7d79; } .p4 { background: var(--pink-soft); color: #c02556; }
.card.login { padding: 1.6rem; border-top: 6px solid var(--brand); margin: 0; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; min-height: 0; gap: 1rem; } .hero-text h1 { font-size: 2.6rem; } .hero-text .tagline { font-size: 1.3rem; } .hero-logo { height: 110px; } }

/* ---- forms & buttons ---- */
label { display: block; font-weight: 700; font-size: .9rem; }
label .muted { font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .65rem .85rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; }
input:hover, select:hover, textarea:hover { border-color: #c9cfe6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
input[type=file] { padding: .5rem; }
form.inline { display: inline; } form.inline input { display: inline-block; width: auto; margin: 0; }
form.filters { margin-bottom: 1rem; } form.filters input[type=search] { max-width: 280px; margin: 0; }

.btn { display: inline-block; font: inherit; font-weight: 700; padding: .55rem 1.15rem; border: 2px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .15s, border-color .15s; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 3px 0 var(--brand-dark); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-danger { color: var(--red); border-color: #f4b8bf; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.btn-lg { padding: .85rem 2rem; font-size: 1.1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0 .3rem; text-decoration: underline; }
.linkbtn.danger { color: var(--red); }

/* ---- tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #4a53a8; background: var(--brand-soft); white-space: nowrap; font-weight: 800; }
th.r, td.r { text-align: right; }
tbody tr:hover { background: #fafbff; }
tr:last-child td { border-bottom: 0; }
tr.dim { opacity: .55; }
td.right-cell { background: var(--good-bg); font-weight: 800; }
.tablewrap { overflow-x: auto; }

.badge { display: inline-block; padding: .1rem .65rem; border-radius: 99px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.b-green { background: var(--green-soft); color: #0b7a4a; } .b-red { background: var(--red-soft); color: #b3202f; }
.b-amber { background: var(--yellow-soft); color: #8a6500; } .b-grey { background: #eceef6; color: var(--muted); }

.flash { padding: .8rem 1.1rem; border-radius: 14px; margin-bottom: 1rem; background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; word-break: break-word; }
.flash.ok { background: var(--green-soft); color: #0b7a4a; }
.flash.error { background: var(--red-soft); color: #b3202f; }
.tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; background: #fff; border: 2px solid var(--line); border-radius: 99px; padding: .25rem .9rem; cursor: pointer; color: var(--ink); }
.tab:hover { border-color: var(--brand); }
.tab.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.meter { height: 10px; background: #e9ecf6; border-radius: 99px; overflow: hidden; margin-bottom: 3px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: 99px; } .meter.low i { background: linear-gradient(90deg, var(--orange), var(--red)); }

/* question review */
details.qr { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1rem; margin: 0 0 .55rem; }
details.qr summary { cursor: pointer; display: flex; gap: .7rem; align-items: baseline; }
details.qr .qn { font-weight: 800; color: var(--brand); min-width: 2.2rem; } details.qr .qs { flex: 1; }
details.qr.correct { border-left: 6px solid var(--green); } details.qr.wrong { border-left: 6px solid var(--red); }
.opts { padding-left: 1.6rem; } .opts li { margin: .25rem 0; padding: .2rem .5rem; border-radius: 8px; }
.opts li.right { background: var(--good-bg); } .opts li.mine-wrong { background: var(--bad-bg); }
.expl { background: var(--yellow-soft); padding: .7rem .9rem; border-radius: 12px; }

/* ---- answer options: each letter has its own colour ---- */
.opt { --c: var(--brand); --cs: var(--brand-soft); display: flex; gap: .85rem; align-items: center; width: 100%; text-align: left; font: inherit; font-weight: 600; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: .8rem .95rem; margin: .6rem 0; cursor: pointer; position: relative; overflow: hidden; transition: transform .08s, border-color .15s; }
.opt.c-A { --c: #4255ff; --cs: #e8ebff; } .opt.c-B { --c: #f26a21; --cs: #ffe8da; }
.opt.c-C { --c: #1fb5b0; --cs: #d3f4f1; } .opt.c-D { --c: #9b5cf6; --cs: #ebdeff; }
.opt .k { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 12px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; z-index: 1; }
.opt .t { flex: 1; z-index: 1; }
.opt .p { z-index: 1; font-weight: 800; white-space: nowrap; }
.opt .fill { position: absolute; inset: 0 auto 0 0; background: var(--cs); z-index: 0; transition: width .5s; }
.opt:not([disabled]):hover { border-color: var(--c); }
.opt.sel { border-color: var(--c); background: var(--cs); box-shadow: 0 3px 0 var(--c); }
.opt.right { border-color: var(--green); box-shadow: 0 3px 0 var(--green); } .opt.right .fill { background: var(--green-soft); }
.opt.wrong { border-color: var(--red); }
.opt[disabled] { cursor: default; }
.tag { font-size: .72rem; font-weight: 800; border-radius: 99px; padding: .05rem .55rem; background: #fff; border: 1px solid var(--line); margin-left: .4rem; }
.opt.right .tag { background: var(--green); color: #fff; border-color: var(--green); }

/* ===== live (student, phone first) ===== */
.live .qcard { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--brand); border-radius: 22px; padding: 1.2rem; box-shadow: var(--shadow); }
.live .qmeta { color: var(--brand); font-size: .85rem; font-weight: 800; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.live .qtext { font-size: 1.2rem; font-weight: 700; margin: 0 0 1rem; white-space: pre-wrap; }
.verdict { padding: .8rem 1rem; border-radius: 14px; font-weight: 700; margin-top: .9rem; }
.verdict.ok { background: var(--green-soft); color: #0b7a4a; } .verdict.no { background: var(--red-soft); color: #b3202f; } .verdict.info { background: var(--brand-soft); color: var(--brand-dark); }
.wait { text-align: center; padding: 3rem 1rem; background: var(--card); border-radius: 22px; border: 2px dashed var(--line); }
.pulse { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--orange); animation: pulse 1.2s infinite; margin-right: .5rem; }
@keyframes pulse { 50% { opacity: .2; transform: scale(.7); } }
.offline { background: var(--yellow-soft); color: var(--warn); text-align: center; padding: .4rem; border-radius: 10px; margin-bottom: .6rem; font-size: .9rem; font-weight: 600; }

/* ===== live (teacher control / projector) ===== */
.ctl .bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.ctl .stage { background: var(--card); border: 1px solid var(--line); border-top: 8px solid var(--brand); border-radius: 24px; padding: 1.6rem 1.9rem; box-shadow: var(--shadow); }
.ctl .stage .qtext { font-size: clamp(1.4rem, 2.6vw, 2.3rem); font-weight: 800; margin: 0 0 1.2rem; white-space: pre-wrap; letter-spacing: -.01em; }
.ctl .opt { cursor: default; font-size: clamp(1.1rem, 2vw, 1.6rem); padding: 1rem 1.2rem; }
.ctl .opt .k { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
.ctl .controls { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }
.ctl .controls .btn-primary { font-size: 1.1rem; padding: .75rem 1.6rem; }
.ctl .count { font-size: 1.1rem; margin-top: .8rem; color: var(--muted); font-weight: 600; }
.ctl .peekbox { border: 2px dashed var(--orange); border-radius: 14px; padding: .7rem 1rem; margin-top: 1rem; background: var(--orange-soft); color: #9a3d06; font-weight: 600; }

/* ===== exam ===== */
.exam { display: grid; grid-template-columns: 1fr 280px; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .exam { grid-template-columns: 1fr; } .exam .side { order: -1; } }
.exam .head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; position: sticky; top: 62px; z-index: 5; background: var(--bg); padding: .4rem 0; }
.timer { font: 800 1.4rem ui-monospace, Menlo, monospace; background: var(--brand); color: #fff; border-radius: 99px; padding: .25rem 1.1rem; }
.timer.low { background: var(--red); animation: pulse 1s infinite; }
.exam .qcard { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--purple); border-radius: 22px; padding: 1.2rem; box-shadow: var(--shadow); }
.exam .qtext { font-size: 1.15rem; font-weight: 700; white-space: pre-wrap; margin: .3rem 0 1rem; }
.exam .nav2 { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .4rem; }
.pn { font: inherit; font-weight: 800; height: 2.6rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.pn.ans { background: var(--green); border-color: var(--green); color: #fff; }
.pn.mk { background: var(--purple); border-color: var(--purple); color: #fff; }
.pn.cur { outline: 3px solid var(--brand); outline-offset: 2px; }
.legend { font-size: .8rem; color: var(--muted); margin-top: .6rem; }
.modal { position: fixed; inset: 0; background: rgba(20, 24, 50, .55); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal > div { background: var(--card); border-radius: 22px; padding: 1.5rem; max-width: 420px; width: 100%; }
@media print { .topbar, .btn, form { display: none !important; } }

@media (max-width: 600px) {
  .topbar-in { gap: .3rem .6rem; padding: .45rem .8rem; }
  .logo { height: 36px; }
  .nav { order: 3; flex-basis: 100%; }
  .who { margin-left: auto; font-size: .82rem; gap: .5rem; }
  .who .chip, .who-name { display: none; }
  h1 { font-size: 1.45rem; }
  .exam .head { top: 90px; }
}

/* class link card + live progress */
.zoomcard { display: flex; gap: 1rem; align-items: center; background: linear-gradient(120deg, var(--teal-soft), var(--brand-soft)); border: 2px solid var(--teal); border-radius: 22px; padding: 1.1rem 1.3rem; margin-bottom: 1.1rem; }
.zoom-ic { font-size: 2.4rem; }
.zoom-body h2 { margin: 0 0 .3rem; }
.zoom-note { white-space: pre-wrap; margin: 0 0 .7rem; font-weight: 600; }
.progress { margin-top: .8rem; color: var(--muted); font-weight: 600; }
.meter.big { height: 14px; }
.meter.big i { background: linear-gradient(90deg, var(--brand), var(--purple)); transition: width .5s; }

/* class link card + live progress */
.zoomcard { display: flex; gap: 1rem; align-items: center; background: linear-gradient(120deg, var(--teal-soft), var(--brand-soft)); border: 2px solid var(--teal); border-radius: 22px; padding: 1.1rem 1.3rem; margin-bottom: 1.1rem; }
.zoom-ic { font-size: 2.4rem; }
.zoom-body h2 { margin: 0 0 .3rem; }
.zoom-note { white-space: pre-wrap; margin: 0 0 .7rem; font-weight: 600; }
.progress { margin-top: .8rem; color: var(--muted); font-weight: 600; }
.meter.big { height: 14px; }
.meter.big i { background: linear-gradient(90deg, var(--brand), var(--purple)); transition: width .5s; }
@media (max-width: 600px) { .zoomcard { flex-direction: column; align-items: flex-start; gap: .3rem; } .zoom-ic { font-size: 1.8rem; } .zoomcard .btn-lg { padding: .7rem 1.4rem; font-size: 1rem; } }

/* ===== printable performance report ===== */
.report { color: #1b2233; }
.rp-page { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem 1.6rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.rp-head { display: flex; align-items: center; gap: 1rem; justify-content: space-between; flex-wrap: wrap; border-bottom: 3px solid var(--brand); padding-bottom: .7rem; }
.rp-brand { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; letter-spacing: .02em; }
.rp-brand img { height: 46px; width: auto; }
.rp-title { font-weight: 800; font-size: 1.1rem; text-align: center; } .rp-test { font-weight: 600; font-size: .85rem; color: var(--muted); }
.rp-date { font-size: .85rem; color: var(--muted); }
.rp-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .3rem 1.5rem; margin: .9rem 0; font-size: .95rem; }
.rp-info span:first-child { font-weight: 700; color: var(--muted); }
.rp-pies { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .6rem; }
.chart { width: 100%; height: auto; display: block; color: #1b2233; }
.rp-center { max-width: 560px; margin: .6rem auto; }
.rp-h { margin: 1rem 0 .2rem; font-size: 1rem; }
.rp-table { margin-top: .5rem; font-size: .9rem; border: 1px solid var(--line); }
.rp-table th, .rp-table td { padding: .35rem .7rem; }
.rp-ok { color: #0b7a4a; font-weight: 700; } .rp-no { color: #b3202f; font-weight: 700; } .rp-skip { color: var(--muted); }
.rp-foot { margin-top: 1rem; } .rp-note { padding: 1rem; background: var(--yellow-soft); border-radius: 12px; }
h2.more { margin: 2rem 0 1rem; font-size: 1.4rem; }

@media print {
  @page { size: A4; margin: 10mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; }
  .topbar, .no-print, .btn, .flash { display: none !important; }
  .container { max-width: none; padding: 0; }
  .rp-page { border: 0; box-shadow: none; border-radius: 0; padding: 0; margin: 0; break-after: page; page-break-after: always; }
  .rp-sheet:last-child .rp-page:last-child { break-after: auto; page-break-after: auto; }
  .rp-chart, .rp-table, .rp-pies { break-inside: avoid; }
  .rp-center { max-width: 520px; }
}

/* themes, links, forum, contact */
.theme { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--teal); border-radius: 16px; padding: .9rem 1.1rem; margin-bottom: .8rem; box-shadow: var(--shadow); }
.theme.next { border-left-color: var(--orange); background: linear-gradient(120deg, #fff, var(--orange-soft)); }
.theme h3 { margin: .3rem 0; font-size: 1.15rem; }
.theme-date { color: var(--muted); font-weight: 700; font-size: .85rem; }
.theme-body { white-space: pre-wrap; margin: .3rem 0 .6rem; }
.linkrow { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.linkrow:last-child { border-bottom: 0; }
.fq { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.fq:last-child { border-bottom: 0; } .fq:hover { background: #fafbff; }
.fq-title { font-weight: 700; } .fq-main { min-width: 0; }
.fq-side { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.fq-n { font-weight: 800; font-size: 1.2rem; color: var(--brand); min-width: 3.5rem; text-align: right; } .fq-n small { font-size: .7rem; color: var(--muted); font-weight: 600; display: block; }
.post { padding: 1rem 1.2rem; } .post.team { border-left: 6px solid var(--green); background: linear-gradient(120deg, #fff, var(--green-soft)); }
.post-body { white-space: pre-wrap; margin: .6rem 0 .8rem; overflow-wrap: anywhere; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.contact-card { text-align: center; margin: 0; } .contact-card:nth-child(4n+1) { border-top: 6px solid var(--brand); } .contact-card:nth-child(4n+2) { border-top: 6px solid var(--orange); }
.contact-card:nth-child(4n+3) { border-top: 6px solid var(--teal); } .contact-card:nth-child(4n+4) { border-top: 6px solid var(--purple); }
.contact-ic { font-size: 1.8rem; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem 2.5rem; }
@media print { .foot { display: none; } }

/* demo + feedback form */
.surveybar { display: block; background: var(--orange); color: #fff; text-align: center; font-weight: 800; padding: .8rem 1rem; border-radius: 14px; margin-bottom: .8rem; text-decoration: none; box-shadow: 0 3px 0 #c55410; }
fieldset.radios { border: 2px solid var(--line); border-radius: 14px; padding: .8rem 1rem; margin: 0; }
fieldset.radios legend { font-weight: 800; padding: 0 .4rem; }
label.radio { display: flex; align-items: center; gap: .6rem; font-size: 1.05rem; padding: .35rem 0; }
label.radio input { width: auto; margin: 0; transform: scale(1.3); }
.qr { max-width: 460px; margin: 1rem auto; background: #fff; padding: .6rem; border-radius: 16px; border: 1px solid var(--line); }
.qr svg { width: 100%; height: auto; display: block; }

/* ===== Exam-paper look (UPSC style): calmer, smaller, navy ===== */
:root {
  --brand: #1a1f71; --brand-dark: #10145a; --brand-soft: #e8e9f6;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 24, 60, .06);
}
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Noto Sans Devanagari", Arial, sans-serif; font-size: 15px; line-height: 1.55; }
h1 { font-size: 1.45rem; font-weight: 700; letter-spacing: 0; }
h2 { font-size: 1.05rem; font-weight: 700; }
.brand { font-weight: 700; letter-spacing: 0; }
.stat-n { font-weight: 700; }
.card, .stat, .theme, .post, .qr { border-radius: 10px; box-shadow: none; }
.btn { border-radius: 8px; font-weight: 600; }
.btn-primary { box-shadow: none; }
.nav a { border-radius: 8px; font-weight: 600; }
.topbar::after { height: 3px; background: linear-gradient(90deg, #1a1f71, #1a1f71 70%, #ff3333); }
.hero-text h1 { font-size: 2.4rem; }

/* question cards */
.live .qcard, .exam .qcard, .ctl .stage { border-top: 1px solid var(--line); border-radius: 10px; box-shadow: none; padding: 1rem 1.1rem; }
.live .qmeta { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--muted); font-size: .85rem; }
.live .qtext, .exam .qtext, .ctl .stage .qtext {
  font-family: Georgia, "Times New Roman", "Noto Serif Devanagari", serif;
  font-size: 1.02rem; font-weight: 500; line-height: 1.65; letter-spacing: 0; color: #15182e;
}
.ctl .stage .qtext { font-size: clamp(1.05rem, 1.5vw, 1.35rem); }

/* options: plain (a) (b) (c) (d) */
.opt { border: 1px solid #cdd1e2; border-radius: 8px; padding: .6rem .8rem; margin: .4rem 0; font-weight: 500; font-size: .97rem; box-shadow: none; gap: .6rem; }
.opt.c-A, .opt.c-B, .opt.c-C, .opt.c-D { --c: var(--brand); --cs: var(--brand-soft); }
.opt .k { width: auto; height: auto; min-width: 1.7rem; background: none; color: var(--ink); font-weight: 600; border-radius: 0; text-transform: lowercase; display: block; }
.opt .k::before { content: "("; } .opt .k::after { content: ")"; }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); box-shadow: none; }
.opt.sel .k { background: none; color: var(--brand); }
.opt.right { border-color: var(--green); box-shadow: none; }
.opt .p { font-weight: 700; }
.ctl .opt { font-size: clamp(.95rem, 1.3vw, 1.15rem); padding: .65rem .9rem; }
.ctl .opt .k { width: auto; height: auto; font-size: inherit; }
.tag { font-weight: 700; }
.verdict { border-radius: 8px; font-weight: 600; }
.wait { border-radius: 10px; }
.timer { font-weight: 700; border-radius: 8px; }
.pn { border-radius: 8px; font-weight: 600; }
.qtext strong, .qs strong { font-weight: 700; color: #000; }
.yr { display: inline-block; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .78rem; padding: .05rem .55rem; border-radius: 6px; margin-left: .5rem; vertical-align: middle; white-space: nowrap; }
.ctl .stage .yr { margin: 0 0 .5rem; font-size: .9rem; }
.filechip { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; color: var(--ink); }
.filechip:hover { border-color: var(--brand); }
.filechip .dl { margin-left: auto; color: #fff; background: var(--brand); border-radius: 6px; padding: .1rem .6rem; font-weight: 600; font-size: .85rem; }

/* question timer */
.tmr { display: inline-block; margin-left: .6rem; padding: .05rem .6rem; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-variant-numeric: tabular-nums; font-size: .85rem; }
.tmr.low { background: #fff3cd; color: #8a5a00; }
.tmr.done { background: #fde4e7; color: #b3202f; }
.tmr.big { font-size: 1.25rem; padding: .15rem .8rem; margin: 0; }
.ctl .stagehead { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.ctl .stagehead .yr { margin: 0; }
