/* CoachApp — phones first, light + dark, the institute's own colour (--accent, from Admin → Settings).
   Every control is at least 44 × 44 px. No colour carries meaning alone: badges always have a word. */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Noto Sans", sans-serif;
  --accent: #2f6b3a;
  --bg: #f6f7f4; --surface: #ffffff; --raised: #ffffff; --line: rgba(20, 30, 20, .13); --text: #17201a; --muted: #56615a;
  --acc: var(--accent); --acc-ink: #ffffff; --acc-soft: color-mix(in srgb, var(--accent) 11%, transparent); --acc-text: color-mix(in srgb, var(--accent) 88%, black);
  --ok: #15803d; --ok-soft: rgba(21, 128, 61, .09); --warn: #92400e; --warn-soft: rgba(217, 119, 6, .12); --err: #b91c1c; --err-soft: rgba(200, 30, 30, .08); --info: #1d4ed8; --info-soft: rgba(37, 99, 235, .09);
  --gold: #b7791f;
  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 1px rgba(15, 23, 42, .04);
  --sh-2: 0 10px 28px -8px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .06);
  --bar-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d120f; --surface: #151c18; --raised: #1b241f; --line: rgba(255, 255, 255, .13); --text: #e9efe9; --muted: #a6b2aa;
    --acc: color-mix(in srgb, var(--accent) 55%, #ffffff); --acc-ink: #0b130d; --acc-soft: color-mix(in srgb, var(--accent) 30%, transparent); --acc-text: color-mix(in srgb, var(--accent) 45%, #ffffff);
    --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .13); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13); --err: #f87171; --err-soft: rgba(248, 113, 113, .13); --info: #93c5fd; --info-soft: rgba(96, 165, 250, .14);
    --gold: #f6c453; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d120f; --surface: #151c18; --raised: #1b241f; --line: rgba(255, 255, 255, .13); --text: #e9efe9; --muted: #a6b2aa;
  --acc: color-mix(in srgb, var(--accent) 55%, #ffffff); --acc-ink: #0b130d; --acc-soft: color-mix(in srgb, var(--accent) 30%, transparent); --acc-text: color-mix(in srgb, var(--accent) 45%, #ffffff);
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .13); --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .13); --err: #f87171; --err-soft: rgba(248, 113, 113, .13); --info: #93c5fd; --info-soft: rgba(96, 165, 250, .14);
  --gold: #f6c453; color-scheme: dark;
}
* { 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.5 var(--font); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
a { color: var(--acc-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: .2rem 0 .4rem; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .5rem; overflow-wrap: anywhere; }
h3 { font-size: 1rem; margin: 0 0 .25rem; overflow-wrap: anywhere; }
p { margin: 0 0 .6rem; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small, small { font-size: .86rem; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grow { flex: 1 1 auto; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
.boot { display: grid; place-items: center; min-height: 70vh; }
.noscript { padding: 16px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--acc-soft); border-top-color: var(--acc); display: inline-block; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* ---- chrome ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 6px 12px; display: flex; align-items: center; gap: 6px; min-height: 60px; }
.topbar-in > a:first-child { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; min-height: 44px; min-width: 0; flex: 0 1 auto; }
.topbar-in > a:first-child:hover { text-decoration: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; font-size: 1.02rem; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 9px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--acc); color: var(--acc-ink); display: inline-grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.topnav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.topnav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text); min-height: 44px; white-space: nowrap; }
.topnav a:hover { background: var(--acc-soft); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--acc-text); font-weight: 700; background: var(--acc-soft); }
.top-tools { display: flex; align-items: center; gap: 4px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); font-weight: 800; }
.avatar:hover { text-decoration: none; }
.lang-chip { min-width: 48px; }
.page { max-width: 1240px; margin: 0 auto; padding: 14px 16px 110px; min-height: 70vh; outline: none; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 18px 16px 110px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.foot p { margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
.botbar { display: none; }
.demo-bar { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 6px 12px; background: var(--acc-soft); color: var(--text); font-size: .86rem; text-align: center; }
.offline-bar { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 6px 12px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
@media (max-width: 899px) {
  .topnav .wide, .wide-label { display: none; }
  .botbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 95%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .botbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); font-size: .72rem; border-radius: 10px; text-align: center; line-height: 1.15; padding: 2px; min-width: 0; }
  .botbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .botbar a[aria-current="page"] { color: var(--acc-text); font-weight: 700; background: var(--acc-soft); }
  .botbar a:hover { text-decoration: none; }
  h1 { font-size: 1.32rem; }
}
body.bare .page { padding-bottom: 24px; max-width: 1400px; }

/* ---- controls ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { border-color: var(--acc); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--acc) 88%, black); }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.btn.danger.primary, .dlg-foot .btn.danger { background: var(--err); color: #fff; border-color: var(--err); }
.btn.sm { padding: 6px 12px; font-size: .92rem; }
.btn.block { width: 100%; }
.btn[disabled], .iconbtn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .8s linear infinite; }
.btn .ic { flex: none; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--acc-soft); }
.iconbtn.rot .ic { transform: rotate(90deg); }
.admin-list .iconbtn:not(.rot) .ic[data-up] { transform: rotate(90deg); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip-btn { min-height: 44px; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .93rem; cursor: pointer; white-space: nowrap; }
.chip-btn.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 650; }
.inp { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; }
textarea.inp { resize: vertical; min-height: 88px; }
.inp:focus { border-color: var(--acc); outline: 2px solid var(--acc-soft); outline-offset: 0; }
input[type="color"].inp { padding: 4px; width: 88px; }
input[type="file"] { min-height: 44px; max-width: 100%; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; min-width: 0; }
.field > label, .lbl { font-weight: 650; font-size: .93rem; }
.hint { color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--acc); flex: none; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-1); }
.form { margin-bottom: 14px; }
.card.form > h2 { margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; align-items: start; }
.cols > div > .card + .card { margin-top: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--acc-soft); color: var(--acc-text); white-space: nowrap; line-height: 1.6; margin: 0; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); margin: 0 0 12px; background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert.err { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 30%, transparent); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert p { margin: 2px 0 0; }
.alert > svg { flex: none; margin-top: 2px; }
ul.alert { display: block; padding-left: 28px; }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 36px 16px; color: var(--muted); }
.empty p { max-width: 460px; }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.toast { background: #1d2620; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--sh-2); animation: pop .2s ease-out; font-size: .95rem; }
.toast.ok { background: #14532d; } .toast.err { background: #7f1d1d; } .toast.warn { background: #78350f; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.dlg { border: 0; border-radius: var(--r-lg); padding: 0; width: min(94vw, 520px); max-height: 90vh; background: var(--surface); color: var(--text); box-shadow: var(--sh-2); }
.dlg.wide { width: min(96vw, 860px); }
.dlg::backdrop { background: rgba(0, 0, 0, .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dlg-head h2 { margin: 0; font-size: 1.08rem; }
.dlg-body { padding: 16px 18px; overflow-y: auto; }
.dlg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--surface); }

/* ---- lists ---- */
.list { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list > li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); min-height: 56px; flex-wrap: wrap; }
.list > li:first-child { border-top: 0; }
.list > li > a { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; color: var(--text); min-height: 44px; min-width: 0; }
.list > li > a:hover { text-decoration: none; }
.list > li > a:hover strong { color: var(--acc-text); }
.li-ic { width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); flex: none; }
.li-ic.live { background: var(--err-soft); color: var(--err); }
.li-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.li-main strong, .li-main a { overflow-wrap: anywhere; }
.li-main small { display: block; }
.sec { margin: 22px 0 8px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sec-head h2 { margin: 0; }
.sec-head > a { display: inline-flex; align-items: center; min-height: 44px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 14px; }
.page-head p { margin: 0; }
.page-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.kicker { display: inline-block; font-size: .76rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: var(--acc-text); }
.page > a:first-child, .admin-main > a:first-child, .study-head > a, .no-print > a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 14px 0; }
.tiles > a { display: flex; align-items: center; gap: 10px; padding: 12px; min-height: 64px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 650; box-shadow: var(--sh-1); }
.tiles > a:hover { border-color: var(--acc); text-decoration: none; }
.tiles.small > a { min-height: 52px; padding: 8px 12px; font-size: .94rem; }
.tile-ic { width: 40px; height: 40px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); flex: none; }

/* ---- home ---- */
.hero { display: grid; gap: 10px; margin: 6px 0 12px; }
.hero h1 { font-size: 1.6rem; margin: 0; }
.searchbar { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); min-height: 48px; color: var(--muted); }
.searchbar .inp { border: 0; background: transparent; padding-left: 0; outline: none; }
.searchbar:focus-within { border-color: var(--acc); }
@media (min-width: 900px) { .hero { grid-template-columns: 1fr minmax(300px, 420px); align-items: center; } }
.carousel { position: relative; margin: 6px 0 14px; }
.car-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-lg); scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; min-height: 170px; max-height: 300px; aspect-ratio: 16 / 6; display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #234d2b; }
.car-slide:hover { text-decoration: none; }
.car-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.car-slide.gen0 { background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 92%, black), color-mix(in srgb, var(--accent) 55%, #c69214)); }
.car-slide.gen1 { background: linear-gradient(120deg, #1e3a5f, #2f6f8f); }
.car-slide.gen2 { background: linear-gradient(120deg, #5b2a12, #a4561c); }
.car-text { position: relative; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; background: linear-gradient(transparent, rgba(0, 0, 0, .45)); width: 100%; }
.car-text strong { font-size: 1.3rem; line-height: 1.25; }
.car-cta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: #ffe9a8; }
.car-dots { display: flex; justify-content: center; gap: 2px; margin-top: -4px; }
.car-dot { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.car-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.car-dot.on::before { background: var(--acc); width: 22px; border-radius: 6px; }
.catrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0; }
.catcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; text-align: center; min-height: 92px; justify-content: center; }
.catcard:hover { border-color: var(--acc); text-decoration: none; }
.cat-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: var(--text); box-shadow: var(--sh-1); transition: transform .12s, box-shadow .12s; }
.ccard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--sh-2); }
.thumb { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }
.thumb.gen { display: grid; place-items: center; color: rgba(255, 255, 255, .92); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 95%, black), color-mix(in srgb, var(--accent) 60%, #8fbf6a)); }
.thumb.gen[data-cat="navy"] { background: linear-gradient(135deg, #12355b, #2b6c9e); }
.thumb.gen[data-cat="airforce"] { background: linear-gradient(135deg, #1f4e79, #6aa6d6); }
.thumb.gen[data-cat="army"] { background: linear-gradient(135deg, #2f4a24, #7a8b3b); }
.ccard-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ccard-body h3 { font-size: 1.02rem; line-height: 1.3; }
.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price strong { font-size: 1.1rem; }
.price.big strong { font-size: 1.7rem; }
.price .free { color: var(--ok); }
.price .off { color: var(--ok); font-weight: 750; font-size: .86rem; }
.helpstrip { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; padding: 16px; border-radius: var(--r-lg); background: var(--acc-soft); }
.helpstrip p { margin: 0; }
.help-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }

/* ---- course ---- */
.course-top { display: grid; gap: 16px; margin: 8px 0 14px; }
.course-hero { display: grid; gap: 12px; }
.course-hero .thumb { border-radius: var(--r-lg); max-height: 260px; }
.buybox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--sh-1); align-self: start; }
.buybox p { margin: 0; }
.buybox .badge { align-self: flex-start; }
.buybox > a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 900px) {
  .course-top { grid-template-columns: 1fr 340px; }
  .buybox { position: sticky; top: 76px; }
  .course-hero { grid-template-columns: 260px 1fr; align-items: center; }
}
.feats { list-style: none; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 6px 16px; }
.feats li { display: flex; gap: 8px; align-items: flex-start; }
.feats .ic { color: var(--ok); flex: none; margin-top: 3px; }
.desc { max-width: 760px; }
details.folder { margin: 0 0 10px; }
details.folder > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 4px; cursor: pointer; font-weight: 700; list-style: none; }
details.folder > summary::-webkit-details-marker { display: none; }
details.folder > summary small { margin-left: auto; font-weight: 500; }
.item.locked .li-main strong { color: var(--muted); }
.lock { color: var(--muted); display: inline-flex; }
.saved-dot { color: var(--ok); display: inline-flex; }

/* ---- study ---- */
.study-head h1 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; }
.viewer { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-height: 240px; }
.loading-box { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 240px; color: var(--muted); }
.study-status { margin: 8px 2px; }
.study-nav { display: flex; justify-content: space-between; gap: 8px; margin: 10px 0; }
.study-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 48%; }
.study-nav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-view { position: relative; display: flex; flex-direction: column; height: min(78vh, 1100px); }
.pdf-bar { display: flex; align-items: center; gap: 4px; padding: 2px 8px; border-bottom: 1px solid var(--line); background: var(--raised); }
.pdf-zoom { min-width: 50px; text-align: center; font-variant-numeric: tabular-nums; font-size: .9rem; }
.pdf-count { font-size: .9rem; color: var(--muted); }
.pdf-scroll { position: relative; flex: 1; overflow: auto; background: color-mix(in srgb, var(--muted) 18%, var(--bg)); padding: 8px; overscroll-behavior: contain; -webkit-user-select: none; user-select: none; }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; min-width: 100%; }
.pdf-page { background: #fff; box-shadow: var(--sh-1); }
.pdf-page canvas { width: 100%; height: 100%; display: block; }
.wm-float { position: absolute; z-index: 5; pointer-events: none; padding: 3px 8px; border-radius: 6px; font-size: .82rem; font-weight: 700; color: rgba(110, 110, 110, .62); background: rgba(255, 255, 255, .18);
  transition: left 1.2s ease, top 1.2s ease; white-space: nowrap; -webkit-user-select: none; user-select: none; }
.stage { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; }
.stage .player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .wm-float { color: rgba(255, 255, 255, .55); background: rgba(0, 0, 0, .18); }
.stage:fullscreen { aspect-ratio: auto; }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 2px 12px; }
.linkbox, .note { padding: 18px; }
.note { position: relative; max-width: 820px; white-space: pre-wrap; -webkit-user-select: none; user-select: none; }
.lockbox { color: var(--text); }

/* ---- sign in ---- */
.auth-card { max-width: 460px; margin: 20px auto; }
.google { gap: 10px; }
.g-logo { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 800; color: #fff; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.signin-form { margin-top: 4px; }
.auth-card p.muted.small a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- my courses, receipt ---- */
.mygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.mycard { display: grid; grid-template-columns: 110px 1fr; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; align-items: center; }
.mycard .thumb { border-radius: 10px; aspect-ratio: 1; }
.mycard h3 a { color: var(--text); }
.mycard .badge { margin-bottom: 4px; }
.mycard .row { margin: 4px 0 0; }
.order .amt { font-weight: 750; font-variant-numeric: tabular-nums; }
.order > a { flex: none !important; min-height: 44px; display: inline-flex; align-items: center; }
.receipt { max-width: 640px; margin: 8px auto; }
.receipt header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid var(--acc); padding-bottom: 10px; margin-bottom: 12px; }
.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 6px 14px; margin: 0 0 12px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 10px; font-size: 1.15rem; }
.receipt-total strong { font-size: 1.5rem; }
@media print {
  .topbar, .botbar, .foot, .no-print, .toasts, .skip, .offline-bar, .demo-bar { display: none !important; }
  body { background: #fff; color: #000; } .receipt { border: 0; box-shadow: none; }
}

/* ---- updates ---- */
.ulist { display: grid; gap: 12px; max-width: 860px; }
.update h2 { margin: 6px 0; }
.update-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 750; background: var(--acc-soft); color: var(--acc-text); }
.tag.k-vacancy { background: var(--info-soft); color: var(--info); }
.tag.k-result { background: var(--ok-soft); color: var(--ok); }
.tag.k-admit { background: var(--warn-soft); color: var(--warn); }

/* ---- pages ---- */
.legal { max-width: 780px; margin: 8px auto; }
.legal section h2 { margin-top: 16px; }
.legal-links { margin-top: 14px; }
.legal-links a { display: inline-flex; align-items: center; min-height: 44px; }
.help { max-width: 860px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin: 14px 0; }
.contact-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--sh-1); min-width: 0; }
.contact-card .ic { color: var(--acc-text); }
.contact-card:hover { border-color: var(--acc); text-decoration: none; }
.addr p { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 8px; padding: 0 14px; }
.faq summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.faq p { margin: 0 0 12px; }

/* ---- tests ---- */
.test .score { font-weight: 750; font-variant-numeric: tabular-nums; }
.test > a { flex: none !important; }
.take-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: -14px -16px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.take-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.take-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 10px; background: var(--acc-soft); color: var(--acc-text); }
.timer.low { background: var(--err-soft); color: var(--err); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .55; } }
.sectabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; }
.take-body { display: grid; gap: 14px; }
@media (min-width: 900px) { .take-body { grid-template-columns: 1fr 300px; align-items: start; } .take-side { position: sticky; top: 76px; } }
.qbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.q-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.q-text { font-size: 1.08rem; font-weight: 600; line-height: 1.5; }
.q-n { color: var(--muted); }
.opts { display: grid; gap: 8px; margin: 12px 0; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; text-align: left; border-radius: 12px; border: 1.5px solid var(--line); background: var(--raised); color: var(--text); font: inherit; cursor: pointer; }
.opt:hover { border-color: var(--acc); }
.opt.on { border-color: var(--acc); background: var(--acc-soft); font-weight: 650; }
.opt-l { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: color-mix(in srgb, var(--muted) 15%, transparent); font-weight: 750; flex: none; }
.opt.on .opt-l { background: var(--acc); color: var(--acc-ink); }
.q-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.take-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; }
.take-side h2.small { font-size: .95rem; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, 44px); gap: 6px; }
.pal { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.pal.ans { background: var(--ok); color: #fff; border-color: var(--ok); }
.pal.no { background: var(--err-soft); border-color: var(--err); }
.pal.rev { box-shadow: inset 0 0 0 3px var(--gold); }
.pal.cur { outline: 3px solid var(--acc); outline-offset: 1px; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.p-ans { background: var(--ok); } .p-rev { box-shadow: inset 0 0 0 3px var(--gold); } .p-no { background: var(--err-soft); border: 1px solid var(--err); }
:root[data-theme="dark"] .pal.ans { color: #0b130d; }
.result-top { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: 10px; }
.scorecard, .rankbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; position: relative; }
.scorecard .big { font-size: 2.4rem; font-weight: 850; color: var(--acc-text); }
.ring { position: absolute; right: 16px; top: 16px; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-weight: 800;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 78%), conic-gradient(var(--acc) calc(var(--p) * 1%), var(--acc-soft) 0); }
.stats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.stats li { display: flex; flex-direction: column; padding: 8px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.stats strong { font-size: 1.15rem; color: var(--text); }
.stats li.ok strong { color: var(--ok); } .stats li.err strong { color: var(--err); }
.rank-big strong { font-size: 2rem; color: var(--gold); }
.toplist, .board { list-style: none; padding: 0; margin: 8px 0; }
.toplist li, .board li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; min-height: 44px; }
.toplist li:nth-child(odd), .board li:nth-child(odd) { background: var(--raised); }
.toplist li.me, .board li.me { background: var(--acc-soft); font-weight: 700; }
.rk { width: 44px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc, .pts { font-weight: 750; font-variant-numeric: tabular-nums; }
.board { max-width: 720px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; }
.table-wrap, .anal-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.anal, table.tbl { border-collapse: collapse; width: 100%; font-size: .92rem; }
.anal th, .anal td, .tbl th, .tbl td { padding: 8px 10px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.anal thead th, .tbl thead th { border-top: 0; color: var(--muted); font-weight: 650; font-size: .84rem; white-space: nowrap; }
@media (max-width: 599px) {
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: block; padding: 10px 12px; border-top: 1px solid var(--line); }
  .tbl.stack tr:first-child { border-top: 0; }
  .tbl.stack td { display: flex; gap: 10px; padding: 2px 0; border: 0; }
  .tbl.stack td::before { content: attr(data-label); flex: 0 0 72px; color: var(--muted); font-size: .84rem; }
}
.tbl td a { display: inline-flex; align-items: center; min-height: 44px; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec > table.anal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); display: block; overflow-x: auto; }
.bar { display: inline-block; width: 60px; height: 8px; border-radius: 4px; background: var(--acc-soft); vertical-align: middle; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc); }
.solutions { padding-left: 1.6em; display: grid; gap: 12px; }
.sol { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--r); padding: 12px 14px; }
.sol.right { border-left-color: var(--ok); } .sol.wrong { border-left-color: var(--err); }
.sol .q-text { font-size: 1rem; }
.sol-opts { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
.sol-opts li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; flex-wrap: wrap; }
.sol-opts li.right { background: var(--ok-soft); } .sol-opts li.wrong { background: var(--err-soft); }
.solution { background: var(--raised); border-radius: 10px; padding: 8px 12px; margin-top: 6px; }
.solution p { margin: 2px 0 0; }

/* ---- live, doubts ---- */
.live-row > .btn { flex: none; }
.composer { display: flex; flex-direction: column; gap: 6px; }
.photo-prev { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-prev img { max-height: 120px; border-radius: 10px; }
.thread { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; max-width: 820px; }
.msg { padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 92%; }
.msg.student { align-self: flex-end; background: var(--acc-soft); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.msg p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dphoto { max-width: min(100%, 360px); max-height: 320px; border-radius: 10px; display: block; margin-top: 6px; }
.dphoto-link { display: inline-block; min-height: 44px; }

/* ---- admin ---- */
.admin { display: grid; gap: 12px; }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: thin; }
.admin-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 44px; border-radius: 10px; color: var(--text); white-space: nowrap; border: 1px solid var(--line); background: var(--surface); flex: none; }
.admin-nav a[aria-current="page"] { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); font-weight: 700; }
.admin-nav a:hover { text-decoration: none; border-color: var(--acc); }
.admin-main { min-width: 0; }
@media (min-width: 1100px) {
  .admin { grid-template-columns: 230px 1fr; align-items: start; gap: 24px; }
  .admin-nav { flex-direction: column; overflow: visible; margin: 0; padding: 10px; position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); gap: 2px; }
  .admin-nav a { border: 0; background: transparent; }
  .admin-nav a:hover { background: var(--acc-soft); }
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-grid a { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 12px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); box-shadow: var(--sh-1); }
.stat-grid a:hover { text-decoration: none; border-color: var(--acc); }
.stat-ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc-text); }
.stat-v { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-l { font-size: .86rem; color: var(--muted); }
.admin-list > li { gap: 4px 6px; }
.admin-list .li-main a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.folder-admin { margin-bottom: 14px; }
.folder-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.folder-head h2 { margin: 0; }
.imgpick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-prev { width: 120px; min-height: 68px; border-radius: 10px; border: 1px dashed var(--line); display: grid; place-items: center; overflow: hidden; background: var(--raised); }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
img.mini { width: 72px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.sec-row { flex-wrap: nowrap; } .sec-row .inp { flex: 1; min-width: 0; }
.qlist { padding-left: 1.6em; margin: 0 0 12px; }
.qlist li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sticky-save { position: sticky; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 8px 0; justify-content: flex-end; }
@media (min-width: 900px) { .sticky-save { bottom: 0; } }
.dlg .sec-row { margin: 4px 0; }
@media (min-width: 900px) and (max-width: 1239px) {
  .topnav a { padding: 8px 7px; font-size: .93rem; gap: 4px; }
  .topnav a .ic { display: none; }
  .brand-name { max-width: 150px; }
}
