/* Allinone Study Point — single stylesheet, no build step. */
:root {
  --ink: #18272b; --ink-2: #44565b; --muted: #6c7c80; --line: #dfe5e2; --line-2: #eef2ef;
  --paper: #faf8f3; --card: #ffffff; --tint: #eef6f2;
  --brand: #1f6f5c; --brand-2: #155244; --brand-ink: #ffffff;
  --sun: #f2a33a; --sun-tint: #fff4e2;
  --ok: #2b8a3e; --ok-tint: #e7f6ea; --warn: #b26b00; --warn-tint: #fff3dc; --bad: #c92a2a; --bad-tint: #fdecec;
  --info: #1c64b4; --info-tint: #e8f1fb;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 2px rgba(24,39,43,.05), 0 6px 20px rgba(24,39,43,.06);
  --font: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
  --wrap: 1180px;
}
:root:not([data-theme="light"]) { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .tiny { font-size: .78rem; }
.center { text-align: center; } .right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.skip { position: absolute; left: -999px; } .skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 99; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }

/* ---------- header */
.announce { background: var(--brand-2); color: #e6f3ee; font-size: .85rem; text-align: center; padding: 7px 16px; }
.top { background: rgba(250,248,243,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; letter-spacing: -.01em; white-space: nowrap; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; font-family: var(--display); font-size: 1.15rem; box-shadow: inset 0 -3px 0 var(--sun); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.nav a:hover, .nav a.on { background: var(--tint); color: var(--brand-2); }
.top-search { flex: 1; max-width: 300px; margin-left: auto; position: relative; }
.top-search input[type=search] { width: 100%; padding: 9px 12px 9px 34px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .9rem; }
.top-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
@media (max-width: 980px) {
  .nav, .top-search { display: none; }
  .menu-btn { display: inline-flex; margin-left: auto; }
  .top.open .nav { display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0; background: var(--paper); padding: 10px 16px 16px; border-bottom: 1px solid var(--line); margin: 0; }
  .top.open .top-search { display: block; position: absolute; top: 260px; left: 16px; right: 16px; max-width: none; }
}
@media (max-width: 560px) { .top-actions .btn-ghost { display: none; } .logo span.name { font-size: .95rem; } }

/* ---------- buttons, forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-sun { background: var(--sun); color: #3a2400; } .btn-sun:hover { background: #e3921f; color: #2a1a00; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); } .btn-ghost:hover { background: #fff; color: var(--brand-2); }
.btn-danger { background: var(--bad); } .btn-danger:hover { background: #a61e1e; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 1.05rem; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cdd6d3; border-radius: var(--r-sm); background: #fff; font: inherit; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; min-height: 260px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid rgba(31,111,92,.2); }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .f2, .f3 { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--line-2); border-radius: 12px; padding: 4px; gap: 4px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 18px; border-radius: 9px; cursor: pointer; font-weight: 700; color: var(--ink-2); }
.seg input:checked + span { background: #fff; color: var(--brand-2); box-shadow: var(--shadow); }

/* ---------- surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.panel { background: var(--tint); border-radius: var(--r); padding: 18px 20px; }
.section { padding: 46px 0; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1.65rem; }
.page-head { padding: 30px 0 10px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; opacity: .6; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.b-ok { background: var(--ok-tint); color: var(--ok); } .b-warn { background: var(--warn-tint); color: var(--warn); }
.b-bad { background: var(--bad-tint); color: var(--bad); } .b-info { background: var(--info-tint); color: var(--info); }
.b-sun { background: var(--sun-tint); color: #8a5300; } .b-brand { background: var(--tint); color: var(--brand-2); }
.flash { padding: 12px 16px; border-radius: var(--r-sm); margin: 14px 0; font-weight: 500; border: 1px solid; }
.flash.success { background: var(--ok-tint); border-color: #b9e2c1; color: #1d5e2a; }
.flash.error { background: var(--bad-tint); border-color: #f3c0c0; color: #8e1d1d; }
.flash.info { background: var(--info-tint); border-color: #bcd6f1; color: #144b87; }
.empty { text-align: center; padding: 34px 20px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--r); }
.lock { display: flex; gap: 14px; align-items: flex-start; background: var(--sun-tint); border: 1px solid #f6d6a3; border-radius: var(--r); padding: 18px 20px; }

/* ---------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: #f6f8f7; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ---------- hero */
.hero { padding: 54px 0 40px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(600px 300px at 85% 10%, rgba(242,163,58,.18), transparent 70%),
  radial-gradient(700px 400px at 10% 90%, rgba(31,111,92,.12), transparent 70%); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; }
.picker { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 20px 50px rgba(24,39,43,.10); }
.picker h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.class-pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 16px; }
.class-pills a { display: block; text-align: center; padding: 10px 0; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; background: var(--paper); }
.class-pills a:hover { border-color: var(--brand); background: var(--tint); color: var(--brand-2); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; }
.stats b { display: block; font-size: 1.6rem; font-family: var(--display); color: var(--brand-2); }
.stats span { font-size: .85rem; color: var(--muted); }
.feature { padding: 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--brand); margin-bottom: 12px; }
.feature h3 { margin-bottom: 6px; }
.feature p { color: var(--ink-2); font-size: .93rem; margin: 0; }

/* ---------- tiles */
.tile { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--ink); }
.tile h3 { margin: 6px 0 4px; }
.tile .meta { font-size: .82rem; color: var(--muted); }
.board-tile { padding: 24px; }
.board-tile .abbr { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--brand-2); }
.chapter-list { list-style: none; padding: 0; margin: 0; counter-reset: ch; }
.chapter-list li a { display: flex; gap: 14px; align-items: center; padding: 13px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.chapter-list li:last-child a { border-bottom: 0; }
.chapter-list li a:hover { background: var(--tint); }
.chapter-list .n { width: 32px; height: 32px; border-radius: 9px; background: var(--line-2); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; color: var(--ink-2); }
.chapter-list .t { flex: 1; font-weight: 600; }
.chapter-list .has .n { background: var(--brand); color: #fff; }

/* course cards */
.course-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(24,39,43,.10); color: var(--ink); }
.course-cover { height: 118px; padding: 16px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.course-cover::after { content: ""; position: absolute; right: -30px; bottom: -50px; width: 160px; height: 160px; border-radius: 50%; border: 22px solid rgba(255,255,255,.12); }
.course-cover .k { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.course-cover .s { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
.course-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.course-body h3 { margin: 0; font-size: 1.02rem; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price b { font-size: 1.2rem; } .price s { color: var(--muted); font-size: .9rem; }
.price .off { color: var(--ok); font-weight: 700; font-size: .82rem; }

/* notes */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: 1.22rem; color: var(--brand-2); margin-top: 1.5em; padding-bottom: 6px; border-bottom: 2px solid var(--line-2); }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .3em 0; }
.prose table { margin: 1em 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.prose th { text-transform: none; letter-spacing: 0; font-size: .85rem; color: var(--ink); background: var(--tint); }
.prose strong { color: var(--ink); }
.prose blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--sun); background: var(--sun-tint); border-radius: 0 8px 8px 0; }
.prose code { background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.mat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.mat-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .88rem; background: #fff; }
.mat-tabs a.on, .mat-tabs a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }

/* MCQ practice */
.mcq { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: #fff; }
.mcq + .mcq { margin-top: 12px; }
.mcq .qn { font-weight: 700; margin-bottom: 10px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--paper); text-align: left; font: inherit; color: inherit; width: 100%; }
.opt:hover { border-color: var(--brand); }
.opt .k { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-weight: 800; font-size: .8rem; text-transform: uppercase; }
.opt.right { border-color: var(--ok); background: var(--ok-tint); } .opt.right .k { background: var(--ok); color: #fff; border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); background: var(--bad-tint); } .opt.wrong .k { background: var(--bad); color: #fff; border-color: var(--bad); }
.opt input { accent-color: var(--brand); }
.explain { display: none; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--tint); font-size: .92rem; }
.mcq.done .explain { display: block; }

/* progress */
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #3fa58a); border-radius: 99px; }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-2) 0); display: grid; place-items: center; }
.ring::before { content: attr(data-label); width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }

/* course & lesson layout */
.course-hero { color: #fff; padding: 38px 0 34px; }
.course-hero h1 { color: #fff; }
.course-hero .crumbs a, .course-hero .crumbs { color: rgba(255,255,255,.8); }
.buy-box { position: sticky; top: 86px; }
.module { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.module + .module { margin-top: 12px; }
.module h3 { margin: 0; padding: 12px 16px; background: #f6f8f7; font-size: .95rem; border-bottom: 1px solid var(--line-2); }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.lesson-row:last-child { border-bottom: 0; }
a.lesson-row:hover { background: var(--tint); }
.lesson-row .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line-2); color: var(--muted); }
.lesson-row.done .ic { background: var(--ok); color: #fff; }
.lesson-row.cur { background: var(--tint); font-weight: 700; }
.lesson-row .t { flex: 1; }
.player { aspect-ratio: 16/9; background: #0f1d20; border-radius: var(--r); overflow: hidden; display: grid; place-items: center; color: #b9cbc6; }
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; padding: 24px 0 50px; }
@media (max-width: 980px) { .lesson-layout { grid-template-columns: 1fr; } }

/* dashboards */
.dash-head { background: linear-gradient(120deg, var(--brand-2), var(--brand)); color: #fff; padding: 28px 0 70px; }
.dash-head h1 { color: #fff; font-size: 1.9rem; margin-bottom: 4px; }
.dash-head .muted { color: rgba(255,255,255,.75); }
.dash-body { margin-top: -50px; padding-bottom: 50px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.55rem; font-family: var(--display); color: var(--ink); line-height: 1.15; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.code-chip { font-family: ui-monospace, monospace; background: rgba(255,255,255,.16); padding: 4px 10px; border-radius: 8px; letter-spacing: .06em; font-weight: 700; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.list-plain li:last-child { border-bottom: 0; }

/* tests */
.test-bar { position: sticky; top: 66px; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px 0; }
.timer { font-family: ui-monospace, monospace; font-weight: 800; font-size: 1.15rem; background: var(--ink); color: #fff; padding: 5px 12px; border-radius: 8px; }
.timer.low { background: var(--bad); }
.score-big { font-family: var(--display); font-size: 3.2rem; font-weight: 600; color: var(--brand-2); line-height: 1; }

/* checkout */
.pay-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-methods span { font-size: .78rem; font-weight: 700; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: #fff; color: var(--ink-2); }
.sum-row { display: flex; justify-content: space-between; padding: 8px 0; }
.sum-row.total { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; font-weight: 800; font-size: 1.15rem; }
.demo-banner { background: repeating-linear-gradient(45deg, var(--warn-tint), var(--warn-tint) 12px, #ffecc4 12px, #ffecc4 24px); border: 1px solid #f1cf8a; border-radius: var(--r-sm); padding: 10px 14px; font-size: .88rem; color: #6b4300; }

/* footer */
.foot { background: #12201f; color: #b8c7c3; padding: 46px 0 26px; margin-top: 40px; font-size: .92rem; }
.foot a { color: #dfe9e6; text-decoration: none; } .foot a:hover { color: var(--sun); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; } .foot li { margin: 6px 0; }
.foot .legal { border-top: 1px solid #263634; margin-top: 30px; padding-top: 18px; font-size: .8rem; color: #8aa09a; }

/* chat widget */
.chat-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 13px 18px 13px 14px; border-radius: 999px; background: var(--ink); color: #fff; border: 0; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.chat-fab .dot { width: 10px; height: 10px; border-radius: 50%; background: #51cf66; box-shadow: 0 0 0 3px rgba(81,207,102,.3); }
.chat-panel { position: fixed; right: 20px; bottom: 84px; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 110px)); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.25); z-index: 61; display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.chat-panel.open { display: flex; }
.chat-head { padding: 14px 16px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 10px; }
.chat-head b { display: block; } .chat-head small { color: #a9bcb7; }
.chat-head button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; font-size: .93rem; line-height: 1.5; word-wrap: break-word; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot ul, .msg.bot ol { padding-left: 1.2em; margin: .4em 0; }
.msg.bot p { margin: 0 0 .5em; } .msg.bot p:last-child { margin: 0; }
.msg .src { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: .8rem; }
.msg .src a { display: block; margin-top: 3px; }
.msg .tag { display: inline-block; margin-bottom: 6px; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat-form textarea { min-height: 44px; max-height: 120px; padding: 10px; border-radius: 12px; font-size: .93rem; }
.chat-form button { flex: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 10px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink-2); }
.chips button:hover { border-color: var(--brand); color: var(--brand); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); margin: 0 2px; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 560px) { .chat-fab .lbl { display: none; } .chat-fab { padding: 14px; } }

/* admin */
.admin-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 66px); }
.admin-side { background: #12201f; color: #b8c7c3; padding: 18px 12px; }
.admin-side a { display: flex; gap: 10px; align-items: center; color: #cfdcd8; text-decoration: none; padding: 9px 12px; border-radius: 8px; font-weight: 600; font-size: .9rem; }
.admin-side a:hover { background: #1d302e; color: #fff; }
.admin-side a.on { background: var(--brand); color: #fff; }
.admin-side .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: #6f8682; margin: 16px 12px 6px; font-weight: 800; }
.admin-main { padding: 26px 28px 60px; min-width: 0; }
.admin-main h1 { font-family: var(--font); font-weight: 800; font-size: 1.5rem; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; } .admin-side { display: flex; overflow-x: auto; gap: 4px; padding: 8px; } .admin-side .grp { display: none; } .admin-side a { white-space: nowrap; } .admin-main { padding: 18px 16px 50px; } }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart .col i { display: block; width: 100%; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col i.alt { background: var(--sun); }
.chart .col small { font-size: .62rem; color: var(--muted); }
details.box { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 0 16px; }
details.box > summary { cursor: pointer; padding: 13px 0; font-weight: 700; }
details.box[open] > summary { border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
details.box + details.box { margin-top: 10px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }

@media print { .top, .foot, .chat-fab, .chat-panel, .announce, .no-print { display: none !important; } body { background: #fff; } }

/* print pages (notes PDF, invoices) */
.print-bar { position: sticky; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: space-between; z-index: 5; }
.print-bar .btn-ghost { color: #fff; border-color: #44565b; }
.print-page { max-width: 820px; margin: 0 auto; background: #fff; padding: 34px 40px 50px; position: relative; }
.watermark { position: fixed; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 0; }
.watermark span { transform: rotate(-35deg); font-size: 2.2rem; font-weight: 800; color: rgba(31,111,92,.08); white-space: nowrap; }
.invoice-table td, .invoice-table th { border-bottom: 1px solid var(--line); }
@media print {
  .print-bar { display: none !important; }
  .print-page { padding: 0; max-width: none; }
  body { font-size: 12pt; }
  .prose h2 { break-after: avoid; }
  .mcq, table, tr { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  @page { margin: 16mm 14mm; }
}
