:root {
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef2ff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ok: #059669; --ok-soft: #ecfdf5;
  --warn: #d97706; --warn-soft: #fffbeb;
  --bad: #dc2626; --bad-soft: #fef2f2;
  --info: #0284c7; --info-soft: #f0f9ff;
  --r: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  font-family: 'Inter', 'Noto Sans Sinhala', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.hide { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.split-r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
@media (max-width: 980px) { .split, .split-r { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px var(--brand); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #f1f5f9; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { padding: 13px 20px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
label.f { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
textarea.input { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- auth / landing ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at -10% -20%, color-mix(in srgb, var(--brand) 70%, #fff) 0%, transparent 60%),
              linear-gradient(140deg, var(--brand) 0%, var(--brand-2) 100%); }
.auth-art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { font-size: 40px; line-height: 1.15; font-weight: 800; max-width: 520px; }
.auth-art p { opacity: .9; max-width: 460px; font-size: 16px; }
.art-cards { display: grid; gap: 12px; max-width: 420px; }
.art-card { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.art-card .ico { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.art-card .ico svg { width: 20px; height: 20px; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand .logo { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-weight: 800; overflow: hidden; flex: none; }
.brand .logo img { width: 100%; height: 100%; object-fit: cover; }
.tabs { display: flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 12px; margin: 22px 0; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { padding: 32px 24px; } .auth-art h1 { font-size: 28px; } .art-cards { display: none; } }

/* landing (main domain) */
.land-nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.land-nav .in { max-width: 1160px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 18px; }
.hero { max-width: 1160px; margin: 0 auto; padding: 72px 24px 40px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: 52px; line-height: 1.07; font-weight: 800; letter-spacing: -0.03em; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: var(--ink-2); max-width: 540px; }
.pill svg, .tag svg { width: 14px; height: 14px; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 12.5px; }
.mock { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 80px -30px rgba(79,70,229,.45); overflow: hidden; }
.mock .bar { height: 36px; background: #f8fafc; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; padding: 0 14px; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; display: block; }
.section { max-width: 1160px; margin: 0 auto; padding: 48px 24px; }
.section h2 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.feat { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.feat .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feat .ico svg { width: 22px; height: 22px; }
.feat h4 { font-size: 16px; margin-bottom: 6px; }
.price-card { background: linear-gradient(160deg, #0f172a, #1e1b4b); color: #fff; border-radius: 22px; padding: 30px; }
.price-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,.18); }
.footer { border-top: 1px solid var(--line); padding: 26px 24px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 40px; } .hero h1 { font-size: 36px; } }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 258px 1fr; min-height: 100%; }
.side { background: #0f172a; color: #cbd5e1; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { color: #fff; padding: 6px 8px 18px; }
.side .brand .sub { display: block; font-size: 11.5px; font-weight: 500; color: #94a3b8; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 10px 6px; font-weight: 700; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: #cbd5e1; font-weight: 500; font-size: 14px; }
.nav a svg { width: 18px; height: 18px; opacity: .85; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 85%, #000), color-mix(in srgb, var(--brand-2) 75%, #000)); color: #fff; box-shadow: 0 8px 20px -10px var(--brand); }
.nav a .badge { margin-left: auto; background: #f43f5e; color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.side .me { margin-top: auto; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.05); display: flex; gap: 10px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex: none; background: linear-gradient(135deg, #6366f1, #ec4899); font-size: 13px; }
.main { min-width: 0; }
.top { height: 64px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
.top h1 { font-size: 19px; font-weight: 750; }
.content { padding: 26px 28px 60px; max-width: 1320px; }
.menu-btn { display: none; }
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; width: 270px; left: -280px; transition: .2s; }
  .side.open { left: 0; box-shadow: 0 0 0 100vmax rgba(15,23,42,.45); }
  .menu-btn { display: inline-flex; }
  .content { padding: 18px 16px 60px; }
  .top { padding: 0 16px; }
}

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card .hd { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card .hd h3 { font-size: 15.5px; font-weight: 700; }
.card .bd { padding: 18px; }
.stat { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat .ico svg { width: 22px; height: 22px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; font-weight: 500; }
.c-indigo { background: #eef2ff; color: #4f46e5; } .c-green { background: #ecfdf5; color: #059669; }
.c-amber { background: #fffbeb; color: #d97706; } .c-rose { background: #fff1f2; color: #e11d48; }
.c-sky { background: #f0f9ff; color: #0284c7; } .c-violet { background: #f5f3ff; color: #7c3aed; }
.welcome { border-radius: 18px; padding: 24px 26px; color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-2)); position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.12); }
.welcome h2 { font-size: 24px; font-weight: 800; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 11px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #fafbff; }
.tbl .nw { white-space: nowrap; }
.tbl .num { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); } .tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); } .tag.info { background: var(--info-soft); color: var(--info); }
.tag.gray { background: #f1f5f9; color: var(--muted); } .tag.brand { background: var(--brand-soft); color: var(--brand); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; opacity: .35; margin-bottom: 8px; }

/* class cards */
.cls { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: .15s; }
.cls:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -18px rgba(15,23,42,.25); }
.cls .cover { min-height: 92px; padding: 16px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.cls .cover::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 16px 16px; }
.cls .cover b { font-size: 17px; position: relative; z-index: 1; }
.cls .cover span { font-size: 12.5px; opacity: .9; position: relative; z-index: 1; }
.cls .meta { padding: 14px 16px; display: grid; gap: 8px; }
.cls .foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }

/* lessons */
.lesson { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.lesson:last-child { border-bottom: 0; }
.lesson .ic { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.lesson .ic svg { width: 20px; height: 20px; }
.lesson .t { font-weight: 600; }
.month-h { padding: 10px 16px; background: #f8fafc; font-weight: 700; font-size: 12.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .05em; }

/* timetable */
.tt { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; }
.tt .day { background: #fff; border: 1px solid var(--line); border-radius: 14px; min-height: 220px; display: flex; flex-direction: column; }
.tt .day h4 { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.tt .day.today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.slot { margin: 8px 8px 0; padding: 9px 10px; border-radius: 10px; font-size: 12.5px; border-left: 4px solid var(--brand); background: var(--brand-soft); cursor: pointer; }
.slot b { display: block; font-size: 13px; color: var(--ink); }

/* chat */
.chat { display: grid; grid-template-columns: 290px 1fr; height: calc(100vh - 150px); min-height: 460px; overflow: hidden; }
.chat .list { border-right: 1px solid var(--line); overflow-y: auto; }
.chat .ch { display: flex; gap: 10px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #f1f5f9; align-items: center; }
.chat .ch.on, .chat .ch:hover { background: var(--brand-soft); }
.chat .ch .nm { font-weight: 600; } .chat .ch .lm { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.chat .pane { display: flex; flex-direction: column; min-width: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 8px; background: #fafbfe; }
.bubble { max-width: 70%; padding: 9px 13px; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-color: var(--brand); }
.bubble .who { font-size: 11.5px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.bubble .when { font-size: 10.5px; opacity: .6; margin-top: 3px; text-align: right; }
.chat .send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; } .chat .list { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); } }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .18s; }
.modal.wide { max-width: 980px; }
.modal .hd { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal .hd h3 { font-size: 17px; font-weight: 750; }
.modal .bd { padding: 20px 22px; }
.modal .ft { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: #fafbfc; border-radius: 0 0 18px 18px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { transform: translateY(10px) scale(.98); opacity: 0; } }

/* player */
.player { position: relative; background: #000; border-radius: 14px; overflow: hidden; user-select: none; }
.player video, .player iframe { width: 100%; aspect-ratio: 16/9; display: block; border: 0; background: #000; }
.player.pdf iframe { aspect-ratio: auto; height: 75vh; background: #fff; }
.wm { position: absolute; pointer-events: none; color: rgba(255,255,255,.55); font-weight: 700; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.6); transition: top 1.2s ease, left 1.2s ease; white-space: nowrap; z-index: 5; }
.player.pdf .wm { color: rgba(220,38,38,.28); text-shadow: none; font-size: 22px; }
.player:fullscreen { border-radius: 0; display: flex; align-items: center; }
.player:fullscreen video { height: 100vh; aspect-ratio: auto; }
.fs-btn { position: absolute; right: 12px; top: 12px; z-index: 6; background: rgba(15,23,42,.6); border: 0; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; }
.yt-strip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #0f172a; color: #cbd5e1; font-size: 12.5px; border-radius: 0 0 14px 14px; }

/* misc */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 8px; }
.toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-weight: 500; max-width: 360px; animation: pop .2s; }
.toast.err { background: var(--bad); } .toast.ok { background: var(--ok); }
.progress { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0; transition: width .3s; }
.meter { height: 6px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.seg { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.todo { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; }
.todo input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.todo.done .tt2 { text-decoration: line-through; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; }
.kv .k { color: var(--muted); } .kv .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.total-line { display: flex; justify-content: space-between; padding: 14px 0 0; margin-top: 10px; border-top: 2px solid var(--ink); font-weight: 800; font-size: 17px; }
.chart { width: 100%; height: 180px; }
.dropzone { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: .15s; }
.dropzone:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.notice { padding: 12px 14px; border-radius: 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.notice.warn { background: var(--warn-soft); color: #92400e; border: 1px solid #fde68a; }
.notice.info { background: var(--info-soft); color: #075985; border: 1px solid #bae6fd; }
.notice.ok { background: var(--ok-soft); color: #065f46; border: 1px solid #a7f3d0; }
.slip-thumb { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #f1f5f9; cursor: pointer; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 2px var(--ink); }

@media print {
  .side, .top, .no-print, .toast-wrap { display: none !important; }
  .shell { display: block; } .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ddd; break-inside: avoid; }
  body { background: #fff; }
}

/* ===== Sinhala hover help ===== */
#si-tip { position: fixed; z-index: 120; max-width: 300px; background: #0f172a; color: #fff; font-family: 'Noto Sans Sinhala', 'Inter', sans-serif; font-size: 13px; line-height: 1.55; padding: 9px 12px; border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.3); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
#si-tip.show { opacity: 1; transform: none; }
#si-tip::before { content: 'සිංහලෙන්'; display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #a5b4fc; font-weight: 700; margin-bottom: 2px; }
[data-si] { cursor: help; }
a[data-si], button[data-si], .nav a[data-si], label[data-si] { cursor: pointer; }
.si-dot { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 9.5px; font-weight: 800; margin-left: 5px; vertical-align: 1px; }
.si-toggle.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand); }
.imp-bar { background: linear-gradient(90deg, #f59e0b, #ef4444); color: #fff; padding: 8px 20px; display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 13.5px; }
.imp-bar .btn { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.35); }

/* ===== Permission matrix ===== */
.perm { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: .15s; }
.perm:hover { border-color: var(--brand); background: #fafaff; }
.perm input { width: 18px; height: 18px; accent-color: var(--brand); margin-top: 2px; flex: none; }
.perm b { display: block; font-size: 13.5px; }
.perm span { font-size: 12px; color: var(--muted); font-family: 'Noto Sans Sinhala', 'Inter', sans-serif; }
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
@media (max-width: 640px) { .perm-grid { grid-template-columns: 1fr; } }
.role-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.role-card .chips { display: flex; flex-wrap: wrap; gap: 5px; }

/* ===== Motion ===== */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(60px,-40px) scale(1.15); } 66% { transform: translate(-40px,30px) scale(.9); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-70px,50px) scale(1.2); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } }
@keyframes shine { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes notif { 0%, 8% { opacity: 0; transform: translateY(14px) scale(.96); } 14%, 30% { opacity: 1; transform: none; } 36%, 100% { opacity: 0; transform: translateY(-10px) scale(.98); } }

.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.aurora i:nth-child(1) { width: 520px; height: 520px; background: color-mix(in srgb, var(--brand) 55%, #fff); top: -160px; left: -120px; animation: drift1 18s ease-in-out infinite; }
.aurora i:nth-child(2) { width: 460px; height: 460px; background: #f0abfc; top: 10%; right: -140px; animation: drift2 22s ease-in-out infinite; opacity: .4; }
.aurora i:nth-child(3) { width: 380px; height: 380px; background: #67e8f9; bottom: -160px; left: 35%; animation: drift1 26s ease-in-out infinite reverse; opacity: .35; }
.reveal { opacity: 0; }
.reveal.in { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) forwards; }
.d1 { animation-delay: .08s !important; } .d2 { animation-delay: .16s !important; } .d3 { animation-delay: .24s !important; } .d4 { animation-delay: .32s !important; } .d5 { animation-delay: .4s !important; }
.hero-wrap { position: relative; overflow: hidden; }
.hero-wrap > .hero { position: relative; z-index: 1; }
.hero .fade { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both; }
.rotator { display: inline-block; position: relative; min-width: 6ch; }
.rotator b { background: linear-gradient(90deg, var(--brand), var(--brand-2), #ec4899, var(--brand)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.caret { display: inline-block; width: 3px; height: .9em; background: var(--brand); margin-left: 4px; vertical-align: -0.08em; animation: blink 1s steps(1) infinite; }
.mock-stage { position: relative; animation: floaty 7s ease-in-out infinite; }
.float-card { position: absolute; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: 0 18px 40px -16px rgba(15,23,42,.35); display: flex; gap: 10px; align-items: center; font-size: 12.5px; z-index: 3; opacity: 0; animation: notif 9s ease-in-out infinite; }
.float-card .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.float-card .ic svg { width: 17px; height: 17px; }
.float-card.f1 { left: -38px; top: 30%; animation-delay: 0s; }
.float-card.f2 { right: -26px; top: 12%; animation-delay: 3s; }
.float-card.f3 { right: 18px; bottom: -22px; animation-delay: 6s; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; display: inline-block; animation: pulse 1.8s infinite; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center; color: var(--muted); font-weight: 600; font-size: 13.5px; }
.trust span { display: inline-flex; gap: 8px; align-items: center; }
.trust svg { width: 18px; height: 18px; color: var(--brand); }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 58px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* animated login */
.auth-art .orb { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }
.auth-art .orb.o1 { width: 420px; height: 420px; right: -140px; top: -120px; animation: spinSlow 40s linear infinite; border-style: dashed; }
.auth-art .orb.o2 { width: 260px; height: 260px; left: -90px; bottom: 60px; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); border: 0; animation: floaty 8s ease-in-out infinite; }
.auth-art .orb.o3 { width: 120px; height: 120px; right: 18%; bottom: 18%; background: rgba(255,255,255,.12); border: 0; animation: floaty 6s ease-in-out infinite reverse; }
.auth-art .art-card { animation: slideIn .7s cubic-bezier(.2,.7,.2,1) both; }
.auth-art .art-card:nth-child(2) { animation-delay: .15s; } .auth-art .art-card:nth-child(3) { animation-delay: .3s; } .auth-art .art-card:nth-child(4) { animation-delay: .45s; }
.auth-art h1 { animation: fadeUp .8s cubic-bezier(.2,.7,.2,1) both; }
.auth-box { animation: fadeUp .7s .1s cubic-bezier(.2,.7,.2,1) both; }
.auth-art .ticker { display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; } .float-card { opacity: 1; position: static; margin-top: 10px; } }
.notice > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.dropzone > svg { width: 26px; height: 26px; }
.empty > svg { width: 46px; height: 46px; }
/* subscription packages */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: transform .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(79,70,229,.12); }
.plan.hot { border: 2px solid var(--brand); box-shadow: 0 16px 40px rgba(79,70,229,.18); }
.plan-badge { position: absolute; top: -12px; left: 22px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.plan-name { font-weight: 800; font-size: 18px; }
.plan-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-top: 12px; }
.plan-price span { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0; display: grid; align-content: start; gap: 8px; font-size: 14px; flex: 1; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 2px; }
.plans.pick { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.plan-pick { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; background: #fff; }
.plan-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.plan-pick input { accent-color: var(--brand); }

/* =================== v3 premium design =================== */
:root { --ink-dark: #0b1020; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin3d { from { transform: rotateX(62deg) rotateZ(0); } to { transform: rotateX(62deg) rotateZ(360deg); } }
@keyframes cubeSpin { from { transform: rotateX(-20deg) rotateY(0); } to { transform: rotateX(-20deg) rotateY(360deg); } }
@keyframes bob { 0%,100% { transform: translate3d(0,0,var(--z,0)); } 50% { transform: translate3d(0,-12px,var(--z,0)); } }
@keyframes glowPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ---- landing nav ---- */
.land-nav.dark { position: fixed; left: 0; right: 0; background: transparent; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.land-nav.dark .brand, .land-nav.dark .nl { color: #fff; }
.land-nav .nl { padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; opacity: .85; }
.land-nav .nl:hover { opacity: 1; background: rgba(255,255,255,.08); }
.land-nav.dark.solid { background: rgba(11,16,32,.82); backdrop-filter: blur(14px); border-color: rgba(255,255,255,.08); }
.btn.glow { box-shadow: 0 10px 30px -8px var(--brand), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.ghost-dark { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.18); }
.btn.ghost-dark:hover { background: rgba(255,255,255,.12); }
.btn.white { background: #fff; color: var(--brand); border: 0; font-weight: 700; }
.pill.dark { background: rgba(255,255,255,.08); color: #e0e7ff; border: 1px solid rgba(255,255,255,.14); }

/* ---- hero with 3D scene ---- */
.hero2 { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 75% 10%, #1e1b4b 0%, transparent 60%), linear-gradient(180deg, #0b1020 0%, #111735 70%, #f5f7fb 100%); color: #fff; padding: 110px 0 120px; }
.hero2 .aurora i { opacity: .55; }
.h-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(ellipse at 60% 30%, #000 20%, transparent 70%); transform: perspective(800px) rotateX(55deg) translateY(-120px) scale(1.6); transform-origin: top; }
.h-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--bg)); }
.hero2-in { position: relative; z-index: 2; max-width: 1220px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1.08fr; gap: 40px; align-items: center; }
.h-copy h1 { font-size: 58px; line-height: 1.04; font-weight: 800; letter-spacing: -.035em; margin: 20px 0 16px; }
.h-copy h1 .rotator { background: linear-gradient(90deg, #a5b4fc, #f0abfc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.h-copy h1 .caret { background: #a5b4fc; }
.h-copy .lead { font-size: 18.5px; color: #c7d2fe; max-width: 540px; }
.h-trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 26px; color: #a5b4fc; font-size: 14px; }
.h-trust span { display: inline-flex; gap: 6px; align-items: center; }
.h-trust svg { width: 16px; height: 16px; color: #34d399; }

.scene { perspective: 1600px; height: 520px; --rx: 0deg; --ry: 0deg; }
.scene-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(calc(8deg + var(--rx))) rotateY(calc(-18deg + var(--ry))); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.laptop { position: absolute; left: 4%; top: 40px; width: 88%; transform: translateZ(0); transform-style: preserve-3d; animation: bob 7s ease-in-out infinite; }
.laptop .lid { position: relative; background: #0f172a; border-radius: 18px 18px 6px 6px; padding: 14px 14px 18px; box-shadow: 0 50px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08) inset, 0 0 80px -20px rgba(129,140,248,.6); }
.laptop .cam { width: 6px; height: 6px; border-radius: 50%; background: #334155; margin: -7px auto 7px; }
.laptop img { display: block; width: 100%; border-radius: 8px; aspect-ratio: 16/10; object-fit: cover; object-position: top left; }
.laptop .base { height: 14px; margin: 0 -5%; background: linear-gradient(180deg, #cbd5e1, #64748b); border-radius: 0 0 14px 14px; transform: rotateX(70deg) translateY(-2px); transform-origin: top; }
.phone3d { position: absolute; left: -6%; bottom: 10px; width: 150px; padding: 8px; background: #0b1020; border-radius: 28px; --z: 120px; transform: translateZ(120px); animation: bob 6s ease-in-out infinite -2s; box-shadow: 0 40px 70px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.12) inset; }
.phone3d img { display: block; width: 100%; border-radius: 21px; aspect-ratio: 9/19; object-fit: cover; object-position: top; }
.phone3d .notch { position: absolute; top: 12px; left: 50%; width: 46px; height: 12px; margin-left: -23px; background: #0b1020; border-radius: 99px; z-index: 2; }
.chip { position: absolute; display: flex; gap: 10px; align-items: center; background: rgba(255,255,255,.95); color: var(--ink); border-radius: 16px; padding: 10px 14px; font-size: 12.5px; box-shadow: 0 24px 50px -16px rgba(15,23,42,.55); animation: bob 5s ease-in-out infinite; white-space: nowrap; }
.chip b { display: block; font-size: 13px; } .chip span { color: var(--muted); }
.chip .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; } .chip .ic svg { width: 18px; height: 18px; }
.chip.c1 { right: -2%; top: 8px; --z: 160px; transform: translateZ(160px); animation-delay: -1s; }
.chip.c2 { right: -6%; top: 46%; --z: 200px; transform: translateZ(200px); animation-delay: -3s; }
.chip.c3 { left: 18%; bottom: -14px; --z: 180px; transform: translateZ(180px); animation-delay: -2s; }
.ring { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 2px solid rgba(165,180,252,.35); transform-style: preserve-3d; animation: spin3d 18s linear infinite; pointer-events: none; }
.ring.r1 { width: 560px; height: 560px; margin: -280px 0 0 -280px; border-color: rgba(165,180,252,.28); box-shadow: 0 0 40px rgba(129,140,248,.25); }
.ring.r2 { width: 420px; height: 420px; margin: -210px 0 0 -210px; border-style: dashed; border-color: rgba(240,171,252,.3); animation-duration: 26s; animation-direction: reverse; }
.cube { position: absolute; right: 4%; bottom: 60px; width: 54px; height: 54px; transform-style: preserve-3d; animation: cubeSpin 12s linear infinite; }
.cube i { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.5); background: linear-gradient(135deg, rgba(129,140,248,.55), rgba(236,72,153,.35)); backdrop-filter: blur(2px); }
.cube i:nth-child(1) { transform: translateZ(27px); } .cube i:nth-child(2) { transform: rotateY(180deg) translateZ(27px); } .cube i:nth-child(3) { transform: rotateY(90deg) translateZ(27px); } .cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(27px); } .cube i:nth-child(5) { transform: rotateX(90deg) translateZ(27px); } .cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(27px); }

/* ---- landing sections ---- */
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px -30px rgba(15,23,42,.35); margin-top: -40px; position: relative; z-index: 3; }
.stats4 > div { background: #fff; padding: 22px; text-align: center; }
.stats4 b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats4 span { color: var(--muted); font-size: 13.5px; }
.sec-head { text-align: center; margin-bottom: 34px; }
.sec-head h2 { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 8px; }
.sec-head.light h2, .sec-head.light p { color: #fff; } .sec-head.light p { color: #c7d2fe; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.b-tile { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 24px; transition: transform .25s, box-shadow .25s; position: relative; overflow: hidden; }
.b-tile:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -24px rgba(79,70,229,.35); }
.b-tile .ico { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 10px 24px -10px var(--brand); }
.b-tile .ico svg { width: 22px; height: 22px; }
.b-tile h4 { font-size: 17px; margin-bottom: 6px; } .b-tile p { margin: 0; }
.b-tile.big { grid-column: span 2; grid-row: span 2; display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: center; background: linear-gradient(160deg, #eef2ff, #fdf4ff); }
.b-tile.big h3 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.b-img img { width: 100%; border-radius: 14px; box-shadow: 0 30px 60px -25px rgba(15,23,42,.45); transform: perspective(900px) rotateY(-10deg) rotateX(4deg); transition: transform .4s; }
.b-tile.big:hover .b-img img { transform: perspective(900px) rotateY(-3deg) rotateX(1deg); }
.tour-wrap { background: radial-gradient(900px 400px at 20% 0%, #312e81 0%, transparent 60%), #0b1020; padding: 40px 0; margin: 40px 0; }
.tour { display: grid; grid-template-columns: 360px 1fr; gap: 26px; align-items: start; }
.tour-tabs { display: grid; gap: 8px; }
.tt { text-align: left; display: flex; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: #c7d2fe; cursor: pointer; transition: all .2s; }
.tt .ico { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.08); display: grid; place-items: center; flex: none; } .tt .ico svg { width: 19px; height: 19px; }
.tt b { display: block; color: #fff; font-size: 15px; } .tt span { font-size: 13px; display: none; margin-top: 4px; }
.tt.on { background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(168,85,247,.2)); border-color: rgba(165,180,252,.4); } .tt.on span { display: block; } .tt.on .ico { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.browser { border-radius: 16px; overflow: hidden; background: #1e293b; box-shadow: 0 50px 100px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
.b-bar { display: flex; gap: 7px; align-items: center; padding: 11px 14px; background: #111827; }
.b-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; } .b-bar i:nth-child(2) { background: #f59e0b; } .b-bar i:nth-child(3) { background: #22c55e; }
.b-bar span { margin-left: 14px; flex: 1; background: #1f2937; color: #94a3b8; border-radius: 8px; padding: 4px 12px; font-size: 12px; }
.b-view { position: relative; aspect-ratio: 16/10; background: #f5f7fb; }
.b-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.02); transition: opacity .5s, transform .6s; }
.b-view img.on { opacity: 1; transform: none; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.s3 { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; position: relative; }
.s3 span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); margin-bottom: 14px; }
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; }
.faq summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 700; display: flex; justify-content: space-between; } .faq summary::-webkit-details-marker { display: none; }
.faq summary span { color: var(--brand); font-size: 20px; transition: transform .2s; } .faq details[open] summary span { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; }
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 44px; background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; box-shadow: 0 30px 70px -30px var(--brand); }
.cta-band h2 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; } .cta-band p { opacity: .9; margin: 6px 0 0; }
.footer2 { max-width: 1160px; margin: 0 auto; padding: 30px 24px 50px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; border-top: 1px solid var(--line); }

/* ---- login with logo + cover photo ---- */
.auth-art { background: radial-gradient(800px 500px at 0% 0%, color-mix(in srgb, var(--brand-2) 60%, transparent), transparent 60%), linear-gradient(150deg, color-mix(in srgb, var(--brand) 92%, #000), color-mix(in srgb, var(--brand-2) 70%, #0b1020)); }
.auth-art.has-cover { background: #0b1020; }
.cover-img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); animation: coverZoom 24s ease-in-out infinite alternate; }
@keyframes coverZoom { to { transform: scale(1.16) translate(-1%, -1%); } }
.cover-tint { position: absolute; inset: 0; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 55%, transparent) 0%, rgba(11,16,32,.55) 55%, rgba(11,16,32,.9) 100%); }
.auth-art.has-cover::after { display: none; }
.big-logo { width: 92px; height: 92px; border-radius: 26px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(14px); display: grid; place-items: center; font-size: 32px; font-weight: 800; overflow: hidden; box-shadow: 0 24px 50px -20px rgba(0,0,0,.6); margin-bottom: 22px; animation: rise .8s both; }
.big-logo img { width: 100%; height: 100%; object-fit: cover; }
.cubes i { position: absolute; width: 70px; height: 70px; border-radius: 18px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); backdrop-filter: blur(6px); animation: bob 8s ease-in-out infinite; transform: rotate(18deg); }
.cubes i:nth-child(1) { right: 12%; top: 16%; } .cubes i:nth-child(2) { right: 26%; top: 44%; width: 44px; height: 44px; animation-delay: -3s; } .cubes i:nth-child(3) { right: 8%; bottom: 20%; width: 96px; height: 96px; animation-delay: -5s; border-radius: 26px; }
.auth-panel { position: relative; overflow: hidden; background: #f8fafc; }
.auth-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%); right: -180px; top: -180px; animation: glowPulse 6s ease-in-out infinite; }
.auth-box { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 26px; padding: 34px; box-shadow: 0 30px 70px -35px rgba(15,23,42,.35); max-width: 440px; animation: rise .6s both; }
.auth-mini { margin-bottom: 22px; } .auth-mini .brand { font-size: 15px; } .auth-mini .brand .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); }
.cover-pick { position: relative; height: 150px; border-radius: 16px; border: 2px dashed var(--line); background: #f8fafc center/cover no-repeat; cursor: pointer; overflow: hidden; }
.cover-pick-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; background: rgba(255,255,255,.78); color: var(--ink-2); padding: 12px; transition: background .2s; }
.cover-pick-in svg { width: 24px; height: 24px; color: var(--brand); } .cover-pick-in span { font-size: 12px; color: var(--muted); }
.cover-pick:hover .cover-pick-in { background: rgba(255,255,255,.62); } .cover-pick.busy { opacity: .6; }

/* ---- dashboard polish ---- */
.side { background: radial-gradient(400px 300px at 0% 0%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%), linear-gradient(180deg, #0b1020, #111735); border-right: 1px solid rgba(255,255,255,.04); }
.nav a { transition: background .2s, transform .2s; } .nav a:hover { transform: translateX(2px); }
.nav-sec { letter-spacing: .1em; }
.main { background: radial-gradient(900px 300px at 70% -120px, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%); }
.top { background: rgba(255,255,255,.72); backdrop-filter: blur(14px) saturate(1.4); }
#page > * { animation: rise .45s both; } #page > *:nth-child(2) { animation-delay: .05s; } #page > *:nth-child(3) { animation-delay: .1s; } #page > *:nth-child(4) { animation-delay: .15s; }
.card { border-radius: 18px; transition: box-shadow .25s, transform .25s; }
.card.stat { position: relative; overflow: hidden; }
.card.stat::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); opacity: .9; }
.card.stat:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(79,70,229,.45); }
.welcome { background: radial-gradient(500px 200px at 90% 0%, rgba(255,255,255,.25), transparent 70%), linear-gradient(120deg, var(--brand), var(--brand-2)); box-shadow: 0 24px 50px -28px var(--brand); }
.welcome::before { content: ''; position: absolute; right: 120px; bottom: -40px; width: 120px; height: 120px; border-radius: 30px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); transform: rotate(24deg); animation: bob 7s ease-in-out infinite; }
.hero-card { position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 28px 30px; background: radial-gradient(600px 300px at 100% 0%, rgba(236,72,153,.45), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(14,165,233,.35), transparent 60%), linear-gradient(120deg, #312e81, #4f46e5 50%, #7c3aed); box-shadow: 0 30px 60px -30px #4f46e5; }
.hc-art i { position: absolute; border-radius: 26px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.07); backdrop-filter: blur(4px); animation: bob 8s ease-in-out infinite; }
.hc-art i:nth-child(1) { width: 140px; height: 140px; right: 30%; top: -50px; transform: rotate(20deg); }
.hc-art i:nth-child(2) { width: 80px; height: 80px; right: 24%; bottom: -24px; transform: rotate(-12deg); animation-delay: -3s; }
.hc-art i:nth-child(3) { width: 50px; height: 50px; right: 40%; bottom: 30px; border-radius: 50%; animation-delay: -5s; }
.hc-in { position: relative; display: flex; gap: 24px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.hc-in h2 { font-size: 26px; font-weight: 800; margin: 4px 0 10px; }
.hc-big { font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.hc-side { display: grid; grid-template-columns: repeat(3, auto); gap: 10px; }
.hc-side > div { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px); border-radius: 16px; padding: 12px 16px; min-width: 130px; }
.hc-side span { display: block; font-size: 12px; opacity: .8; } .hc-side b { font-size: 19px; }
.donut { width: 150px; height: 150px; transform: rotate(-90deg); flex: none; } .donut text { transform: rotate(90deg); transform-origin: 21px 21px; }
.lg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rank { width: 28px; height: 28px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 13px; }
a.lesson { color: inherit; } a.lesson:hover { background: #f8fafc; }
.meter.mini { height: 5px; margin-top: 5px; }
.tbl.pl td.neg { color: #be123c; }
.tbl.pl tfoot td { border-top: 2px solid var(--ink); background: #f8fafc; font-weight: 600; padding: 12px; }
.pl-row { cursor: pointer; } .pl-row .chev { display: inline-block; width: 14px; color: var(--muted); transition: transform .2s; } .pl-row.open .chev { transform: rotate(90deg); }
.pl-detail td { background: #fafbff; }
.pl-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.plc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; font-size: 12.5px; } .plc span { color: var(--muted); }
.podium .v { font-size: 24px; font-weight: 800; margin-top: 8px; }
.podium.p1 { background: linear-gradient(160deg, #fffbeb, #fff); border-color: #fde68a; }

@media (max-width: 980px) {
  .hero2-in, .tour, .b-tile.big { grid-template-columns: 1fr; }
  .h-copy h1 { font-size: 40px; } .scene { height: 400px; } .phone3d { width: 110px; left: 0; } .chip.c2 { display: none; }
  .bento, .steps3 { grid-template-columns: 1fr; } .b-tile.big { grid-column: auto; grid-row: auto; }
  .stats4 { grid-template-columns: repeat(2, 1fr); } .land-nav .nl { display: none; }
  .hc-side { grid-template-columns: 1fr 1fr; } .hc-big { font-size: 34px; }
  .auth-box { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) { .scene-in, .laptop, .phone3d, .chip, .ring, .cube, .cover-img, .cubes i, .hc-art i { animation: none !important; transition: none !important; } }
.h-copy h1 { font-size: 52px; }
.h-copy .lead { position: relative; z-index: 3; }
.phone3d { left: 2%; bottom: 0; width: 140px; }
.chip.c1 { top: 44px; }
.scene { margin-top: 20px; }
.ell { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps-ol { padding-left: 18px; display: grid; gap: 12px; margin: 0 0 14px; }
.setup-key { font-family: ui-monospace, Menlo, monospace; font-size: 17px; letter-spacing: .08em; background: #f1f5f9; border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; word-break: break-all; user-select: all; }
.topic { border-top: 1px solid var(--line); }
.topic-h { display: flex; gap: 10px; align-items: center; padding: 12px 18px; background: linear-gradient(90deg, var(--brand-soft), #fff); }
.topic-n { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; font-size: 12.5px; display: grid; place-items: center; flex: none; }
.topic .lesson { padding-left: 30px; }
.mini-sel { width: auto; max-width: 150px; padding: 5px 8px; font-size: 12px; height: auto; }
.limit-chip { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 6px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); border: 1px solid transparent; }
.limit-chip.full { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.pay-now { font-size: 22px; font-weight: 800; padding: 6px 0; }
.meter-box { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 6px; }
/* phones: lesson title gets the full width, buttons/tags drop below it; page title stays on one line */
@media (max-width: 600px) {
  .lesson { flex-wrap: wrap; gap: 8px 12px; }
  .lesson > div:nth-child(2) { flex: 1 1 calc(100% - 56px); }
  .lesson > .spacer { display: none; }
  .lesson > .tag, .lesson > .btn, .lesson > .mini-sel { margin-left: 54px; }
  .lesson > .btn + .btn, .lesson > .mini-sel + .btn, .lesson > .btn + .mini-sel { margin-left: 0; }
  .topic .lesson { padding-left: 16px; }
  .top h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
.grid > *, .card { min-width: 0; }
.tbl-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) { .tbl th, .tbl td { padding-left: 10px; padding-right: 10px; } }
/* chat v2 (WhatsApp-style) */
.chat .list { display: flex; flex-direction: column; }
.chat-search { padding: 10px; border-bottom: 1px solid var(--line); }
#chl { overflow-y: auto; flex: 1; }
.chat .ch .badge { margin-left: auto; }
.chat-hd { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 56px; }
.chat-hd .back { display: none; }
.chat .send { align-items: flex-end; }
.chat .send textarea { resize: none; min-height: 42px; max-height: 120px; }
.bubble .txt { white-space: pre-wrap; word-break: break-word; }
.bubble .when a { color: inherit; text-decoration: underline; }
.chat-img { max-width: 240px; max-height: 260px; border-radius: 10px; display: block; margin: 2px 0 4px; }
.chat-file { display: inline-flex; gap: 6px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.06); color: inherit; font-weight: 600; margin-bottom: 4px; }
.bubble.me .chat-file { background: rgba(255,255,255,.18); }
.ro-note { padding: 14px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.pick-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.pick:hover { background: var(--brand-soft); }
.pick .avatar { width: 34px; height: 34px; font-size: 12px; }
@media (max-width: 760px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .chat .list { max-height: none; border-bottom: 0; }
  .chat .pane { display: none; }
  .chat.has-cur .list { display: none; }
  .chat.has-cur .pane { display: flex; }
  .chat-hd .back { display: inline-flex; }
  .bubble { max-width: 85%; }
}
/* MCQ papers */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.qprev { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 13px; }
.qprev.bad { border-color: var(--bad); background: #fef2f2; }
.qprev .right, .qa .opt.right { color: var(--ok); font-weight: 700; }
.qa .opt { padding: 4px 8px; border-radius: 8px; margin-top: 3px; }
.qa .opt.right { background: #ecfdf5; } .qa .opt.wrong { background: #fef2f2; color: var(--bad); }
.qa .expl { margin-top: 6px; padding: 8px 10px; background: #f8fafc; border-radius: 8px; }
.quiz-bar { position: sticky; top: 72px; z-index: 5; }
.qcard .qn { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.qcard .qt { font-size: 16px; font-weight: 600; margin: 6px 0 12px; white-space: pre-wrap; }
.opt-pick { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-top: 8px; cursor: pointer; transition: .15s; }
.opt-pick:hover { border-color: var(--brand); }
.opt-pick input { display: none; }
.opt-pick .l { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; font-weight: 700; flex: none; }
.opt-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt-pick:has(input:checked) .l { background: var(--brand); color: #fff; }
.score-ring { --p: 0; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e2e8f0 0); display: grid; place-items: center; }
.score-ring span { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
@media (max-width: 600px) { .quiz-bar { top: 64px; } .seg { overflow-x: auto; white-space: nowrap; max-width: 100%; } }
