/* ═══════════════════════════════════════════════════════════
   edBuddy Pro LMS — app.css
   Same brand as edbuddypro.com and Admin: Figtree, brand blue
   #0559B3, navy #06213D, 8px corners. Learner-facing, so roomier
   and lighter than Admin; phones get a bottom tab bar.
   ═══════════════════════════════════════════════════════════ */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/figtree-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }

:root {
  color-scheme: light;
  --heading: #06213D; --inverse: #0B1220; --inverse-ink: #FFFFFF;
  --btn: #0559B3; --btn-hover: #044A96; --av: #06213D;
  --top-bg: rgba(255, 255, 255, .94); --hover: #F3F6FA; --line-3: #D3DAE4;
  --green-line: #BFE3CB; --red: #B42318; --red-bg: #FDECEA;
  --pv-bg: #06213D; --pv-line: transparent;
  --cert-bg: linear-gradient(135deg, #EEF4FC, #F9FBFE 60%, #FFF8EC);
  --blue: #0559B3; --blue-600: #044A96; --blue-50: #EEF4FC; --blue-100: #DCE9F8;
  --navy: #06213D; --ink: #0B1220; --ink-2: #26334A; --muted: #5A6B82; --faint: #8593A6;
  --line: #E3E8EF; --line-2: #EEF1F5; --bg: #F7F8FA; --card: #FFFFFF;
  --green: #127A3A; --green-bg: #E7F5EC; --amber: #8A5300; --amber-bg: #FFF3DD;
  --font: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1); --r: 8px; --top: 68px; --max: 1180px;
  --shadow: 0 1px 2px rgba(6, 33, 61, .04), 0 10px 30px -14px rgba(6, 33, 61, .16);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.55 var(--font); transition: background-color .2s, color .2s; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ol, ul { margin: 0; } ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; } button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.i { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; letter-spacing: -.01em; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.lede { color: var(--muted); font-size: 17px; max-width: 640px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; } }


/* ── dark theme: html[data-theme="dark"] (set by the boot script from Settings → Appearance) ── */
html[data-theme="dark"] {
  color-scheme: dark;
  --blue: #5AA2F5; --blue-600: #4A90E2; --blue-50: rgba(90, 162, 245, .14); --blue-100: rgba(90, 162, 245, .3);
  --navy: #06213D; --heading: #F1F5FB; --ink: #E6ECF4; --ink-2: #C3CEDC; --muted: #93A3B8; --faint: #6E8098;
  --line: #233247; --line-2: #1A2638; --line-3: #34465F; --bg: #0A1220; --card: #111B2C; --hover: #172336;
  --green: #5CD08B; --green-bg: rgba(92, 208, 139, .14); --green-line: rgba(92, 208, 139, .35);
  --amber: #F2B655; --amber-bg: rgba(242, 182, 85, .14); --red: #FF8A80; --red-bg: rgba(255, 138, 128, .14);
  --btn: #2A6FD4; --btn-hover: #3A7FE4; --av: #2A6FD4;
  --inverse: #E6ECF4; --inverse-ink: #0B1220;
  --top-bg: rgba(13, 21, 35, .92); --pv-bg: #0F2A4C; --pv-line: rgba(255, 255, 255, .12);
  --cert-bg: linear-gradient(135deg, #0F1D33, #111B2C 60%, #1A1A22);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] .cont-img img, html[data-theme="dark"] .soon-c img, html[data-theme="dark"] .mc-img img { filter: brightness(.9); }
html[data-theme="dark"] .cert-img img { filter: brightness(.92); }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="large"] body { font-size: 17.5px; }
html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }

/* buttons, tags, bars */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 650; font-size: 15px; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn .i { width: 18px; height: 18px; }
.btn:hover { background: var(--hover); border-color: var(--line-3); }
.btn--primary { background: var(--btn); border-color: var(--btn); color: #fff; }
.btn--primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn--primary .i { fill: currentColor; stroke-width: 1.4; }
.btn--done { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.btn--done:hover { background: var(--green-bg); border-color: var(--green); }
.btn--lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn--sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn--block { width: 100%; }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--blue); font-weight: 650; font-size: 14.5px; }
.link .i { width: 15px; height: 15px; } .link:hover { text-decoration: underline; text-underline-offset: 3px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; background: var(--green-bg); color: var(--green); font-size: 13.5px; font-weight: 650; }
.tag .i { width: 15px; height: 15px; stroke-width: 2.4; }
.tag--soon { background: var(--line-2); color: var(--muted); height: 26px; font-size: 12.5px; }
.tag--ok { background: var(--green-bg); color: var(--green); }
.pbar { display: block; height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.pbar > span { display: block; height: 100%; border-radius: 4px; background: var(--blue); transition: width .4s var(--ease); }
.ring text { font: 800 15px var(--font); fill: var(--heading); }
.ring circle:last-of-type { transition: stroke-dashoffset .5s var(--ease); }

/* top bar */
.top { position: sticky; top: 0; z-index: 40; height: var(--top); display: flex; align-items: center; gap: 32px; padding: 0 max(24px, calc((100% - var(--max)) / 2));
  background: var(--top-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo { display: block; height: 32px; width: auto; color: var(--blue); --ebp-ink: var(--ink); }
.brand-tag { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 6px; background: var(--blue-50); color: var(--blue); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.env-tag { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; margin-left: -20px; border-radius: 6px; background: #B45309; color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; flex: none; }
.env-tag--test { background: #7C3AED; } .env-tag--preview, .env-tag--local { background: #475569; }
.top-nav { display: flex; gap: 4px; height: 100%; }
.top-nav a { position: relative; display: flex; align-items: center; padding: 0 14px; color: var(--muted); font-weight: 600; font-size: 15.5px; }
.top-nav a:hover { color: var(--ink); }
.top-nav a.on { color: var(--ink); }
.top-nav a.on::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.me { margin-left: auto; position: relative; }
.me-btn { border: 0; background: none; padding: 0; border-radius: 50%; display: block; }
.av { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--av); color: #fff; font-weight: 700; font-size: 14px; }
.me-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 250px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(6, 33, 61, .25); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s var(--ease), visibility .15s; }
.me-menu.open { opacity: 1; visibility: visible; transform: none; }
.me-who { display: grid; padding: 10px 10px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.me-who span { color: var(--muted); font-size: 13.5px; }
.me-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; font-size: 14.5px; font-weight: 500; }
.me-menu a:hover { background: var(--bg); } .me-menu .i { color: var(--muted); width: 18px; height: 18px; }
.tabbar { display: none; }

/* page */
.page { max-width: var(--max); margin: 0 auto; padding: 44px 24px 140px; display: flex; flex-direction: column; gap: 28px; }
.hello h1, .ph h1 { margin-top: 6px; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.025em; color: var(--heading); }
.hello .lede, .ph .lede { margin-top: 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h2, .sec-h { font-size: 18px; font-weight: 750; letter-spacing: -.01em; }
.card-h--bare { padding: 0 0 14px; border: 0; }
.sec-h { margin-top: 8px; }

/* continue card */
.cont { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.cont-img { position: relative; background: var(--navy); min-height: 280px; }
.cont-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cont-b { padding: 34px 36px; display: flex; flex-direction: column; }
.cont-b h2 { margin-top: 8px; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--heading); }
.cont-now { display: grid; gap: 2px; margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: var(--bg); }
.cont-now span { font-size: 13.5px; color: var(--muted); font-weight: 600; } .cont-now b { font-size: 16.5px; font-weight: 650; }
.cont-p { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 20px; }
.cont-p > span:last-child { font-size: 14px; color: var(--muted); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cont-a { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.cont-b .cont-a { margin-top: auto; padding-top: 24px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.stat .i { grid-row: span 2; width: 42px; height: 42px; padding: 10px; border-radius: 10px; background: var(--blue-50); color: var(--blue); box-sizing: border-box; }
.stat-v { font-size: 22px; font-weight: 800; color: var(--heading); letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-l { font-size: 13.5px; color: var(--muted); }

.cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; }
.next { padding: 8px; display: grid; gap: 2px; }
.next a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; }
.next a:hover { background: var(--bg); }
.next-n { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--line-2); color: var(--muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.next a.is-first .next-n { background: var(--blue); color: #fff; }
.next a.is-first .next-n .i { width: 16px; height: 16px; fill: currentColor; }
.next-t { display: grid; min-width: 0; } .next-t b { font-weight: 600; font-size: 15.5px; }
.next-t span { font-size: 13.5px; color: var(--muted); }
.next-go { margin-left: auto; color: var(--faint); width: 18px; height: 18px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; padding: 22px 22px 6px; height: 190px; }
.wk { display: grid; grid-template-rows: 1fr auto; gap: 8px; justify-items: center; }
.wk-t { width: 100%; max-width: 30px; background: var(--line-2); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.wk-f { width: 100%; background: var(--blue); border-radius: 6px; min-height: 0; }
.wk-d { font-size: 13px; color: var(--muted); font-weight: 600; }
.wk.is-today .wk-d { color: var(--blue); }
.week-note { padding: 8px 22px 20px; font-size: 14px; color: var(--muted); }
.builds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; padding: 10px 22px 16px; }
.builds li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 15px; }
.builds li:nth-last-child(-n+2) { border-bottom: 0; }
.bd-i { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); color: var(--faint); font-size: 12px; font-weight: 700; }
.builds .is-done .bd-i { background: var(--green); border-color: var(--green); color: #fff; }
.builds .is-done .bd-i .i { width: 15px; height: 15px; stroke-width: 2.6; }
.builds .is-done span:last-child { color: var(--ink-2); }
.soon { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.soon-c { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.soon-c img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.soon-c > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 16px 18px; flex: 1; }
.soon-c h3 { font-size: 16.5px; font-weight: 700; line-height: 1.3; }
.soon-c p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.soon-c .btn, .soon-c .tag { margin-top: auto; }

/* my courses */
.mine { display: grid; gap: 16px; }
.mc { display: grid; grid-template-columns: 320px minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mc-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.mc-b { padding: 26px 28px; }
.mc-b h2 { margin-top: 6px; font-size: 24px; font-weight: 800; color: var(--heading); letter-spacing: -.02em; }
.mc-b h2 a:hover { color: var(--blue); }

/* course outline */
.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--muted); font-weight: 600; font-size: 15px; margin-bottom: -8px; }
.back .i { width: 18px; height: 18px; } .back:hover { color: var(--ink); }
.ch { display: flex; gap: 32px; align-items: center; justify-content: space-between; padding: 32px 36px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.ch h1 { margin-top: 6px; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; font-weight: 800; letter-spacing: -.025em; color: var(--heading); }
.ch .lede { margin-top: 10px; }
.ch-ring { display: grid; justify-items: center; gap: 2px; flex: none; text-align: center; font-weight: 650; font-size: 15px; }
.ch-ring .ring { margin-bottom: 8px; } .ch-ring .ring text { font-size: 13px; }
.mods { display: grid; gap: 10px; }
.mod { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mod-h { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) 160px auto; align-items: center; gap: 16px; padding: 16px 20px; border: 0; background: none; text-align: left; }
.mod-h:hover { background: var(--hover); }
.mod-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
.mod.is-done .mod-n { background: var(--green); color: #fff; } .mod.is-done .mod-n .i { stroke-width: 2.6; width: 18px; height: 18px; }
.mod-t { display: grid; min-width: 0; } .mod-t b { font-size: 16.5px; font-weight: 700; }
.mod-t span { font-size: 14px; color: var(--muted); }
.mod-chev { color: var(--muted); transition: transform .2s var(--ease); }
.mod.open .mod-chev { transform: rotate(180deg); }
.lessons { padding: 4px 12px 12px; border-top: 1px solid var(--line-2); }
.lessons a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 8px; }
.lessons a:hover { background: var(--bg); }
.ls-i { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1.5px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 700; }
.ls-i .i { width: 14px; height: 14px; stroke-width: 2.6; }
.lessons a.is-done .ls-i { background: var(--green); border-color: var(--green); color: #fff; }
.lessons a.is-cur .ls-i { background: var(--blue); border-color: var(--blue); color: #fff; }
.lessons a.is-cur .ls-i .i { fill: currentColor; stroke-width: 1.4; }
.ls-t { flex: 1; min-width: 0; font-size: 15px; }
.lessons a.is-done .ls-t { color: var(--muted); }
.lessons a.is-cur .ls-t { font-weight: 650; }
.ls-m { font-size: 13.5px; color: var(--faint); white-space: nowrap; }
.lessons a.is-cur .ls-m { color: var(--blue); font-weight: 650; }
.ls-build { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 12px 14px; border-radius: 8px; background: var(--amber-bg); color: var(--amber); font-size: 14.5px; }
.ls-build b { color: var(--ink); }

/* lesson */
.lesson { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.lesson-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; margin-bottom: 8px;
  background: radial-gradient(120% 80% at 20% 0%, #0B3A6E 0%, var(--navy) 60%); color: #fff; }
.player-in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; }
.player-btn { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); }
.player-btn .i { width: 30px; height: 30px; fill: #fff; stroke: none; margin-left: 4px; }
.player-in p { color: rgba(255, 255, 255, .72); font-size: 15px; max-width: 360px; }
.player-t { position: absolute; right: 14px; bottom: 12px; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .35); font-size: 13px; font-weight: 600; }
.lesson-h { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; color: var(--heading); }
.lesson-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.lesson-a .btn--primary .i, .btn--done .i { fill: none; stroke-width: 2.4; }
.lesson-nav { display: flex; gap: 8px; }
.res-l li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.res-l li:first-child { border-top: 0; }
.res-l li > .i { color: var(--blue); }
.res-l li > span:nth-child(2) { display: grid; flex: 1; } .res-l b { font-weight: 650; }
.res-l li > span:nth-child(2) span { font-size: 14px; color: var(--muted); }
.lesson-side { position: sticky; top: calc(var(--top) + 20px); }
.lessons--side { border: 0; padding: 8px; }
.lessons--side a.is-here { background: var(--blue-50); }
.lessons--side a.is-here .ls-t { font-weight: 650; color: var(--blue); }
.lessons--side .ls-t { font-size: 14.5px; }

/* certificates */
.certs { display: grid; gap: 16px; }
.cert { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cert-art { display: grid; place-content: center; justify-items: center; gap: 8px; padding: 32px; text-align: center; background: linear-gradient(135deg, var(--blue-50), #fff 70%); border-right: 1px solid var(--line); min-height: 220px; }
.cert-art .logo { height: 28px; }
.cert-art p { margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cert-art h3 { font-size: 22px; font-weight: 800; color: var(--heading); }
.cert-art span { font-size: 14px; color: var(--muted); }
.cert--locked .cert-art { background: var(--bg); color: var(--faint); }
.cert--locked .cert-art .i { width: 34px; height: 34px; } .cert--locked .cert-art h3 { font-size: 18px; color: var(--ink-2); }
.cert-b { padding: 28px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.cert-b > p { font-size: 15.5px; color: var(--ink-2); }
.cert-b .tag { align-self: flex-start; }
.cert-b .cont-p { margin-top: 4px; } .cert-b .cont-a { margin-top: 8px; }

.cert-img { position: relative; margin: 0; padding: 24px; display: grid; place-items: center; border-right: 1px solid var(--line);
  background: var(--cert-bg); }
.cert-img img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 2px 4px rgba(6, 33, 61, .06), 0 18px 40px -18px rgba(6, 33, 61, .35); }
.cert-img figcaption { position: absolute; left: 36px; bottom: 36px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border-radius: 6px; background: rgba(6, 33, 61, .88); color: #fff; font-size: 13px; font-weight: 650; backdrop-filter: blur(4px); }
.cert-img figcaption .i { width: 15px; height: 15px; }
.cert--locked .cert-img img { filter: saturate(.75); opacity: .92; }
.cert-b .eyebrow { margin-bottom: 2px; }

/* empty, sign-in */
.empty { display: grid; justify-items: center; gap: 6px; padding: 44px 24px; text-align: center; }
.empty > .i { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--blue-50); color: var(--blue); margin-bottom: 6px; box-sizing: border-box; }
.empty h3 { font-size: 18px; font-weight: 750; } .empty p { color: var(--muted); max-width: 380px; }
.empty .btn { margin-top: 14px; } .empty--page { padding: 90px 24px; }
.is-signin { min-height: 100vh; display: grid; place-items: center; }
.signin { width: 100%; display: grid; place-items: center; padding: 24px; min-height: 100vh;
  background: var(--bg) linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px; }
.signin-card { width: min(420px, 100%); padding: 40px 34px 30px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); text-align: center; }
.signin-card .logo { height: 36px; margin: 0 auto 26px; }
.signin-card h1 { font-size: 28px; font-weight: 800; color: var(--heading); letter-spacing: -.02em; }
.signin-card > p { margin-top: 6px; color: var(--muted); }
.signin-f { display: grid; gap: 8px; margin-top: 26px; text-align: left; }
.signin-f label { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.signin-f input { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); font-size: 16px; }
.signin-f input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.signin-f input.is-bad { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.signin-f .btn { margin-top: 6px; }
.signin-note { display: flex; gap: 8px; text-align: left; margin: 16px 0 12px !important; padding: 12px; border-radius: var(--r); background: var(--bg); font-size: 13.5px; color: var(--muted); }
.signin-note .i { width: 16px; height: 16px; margin-top: 2px; }
.signin-help { margin-top: 18px !important; font-size: 14px; color: var(--muted); }
.signin-help a { color: var(--blue); font-weight: 600; }

/* preview bar, toast */
.pv { position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 10px;
  padding: 7px 7px 7px 18px; background: var(--pv-bg); border: 1px solid var(--pv-line); color: #fff; border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(6, 33, 61, .5); font-size: 14px; white-space: nowrap; }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #F5A524; box-shadow: 0 0 0 3px rgba(245, 165, 36, .25); }
.pv-t { color: rgba(255, 255, 255, .72); }
.pv-b { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-weight: 600; font-size: 13px; }
.pv-b:hover { background: rgba(255, 255, 255, .1); }
.toast { position: fixed; left: 50%; bottom: 84px; z-index: 200; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; max-width: min(92vw, 460px);
  padding: 12px 18px; border-radius: 10px; background: var(--inverse); color: var(--inverse-ink); font-size: 14.5px; font-weight: 500; transition: opacity .2s, transform .25s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }


/* ═══ shell additions: search, theme, notifications, account menu ═══ */
.top-r { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.me { margin-left: 4px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r); border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn--sm { width: 30px; height: 30px; } .icon-btn--sm .i { width: 16px; height: 16px; }
.dot-n { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card); }
.top-search { display: inline-flex; align-items: center; gap: 10px; height: 40px; width: 240px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--faint); font-size: 14.5px; margin-right: 6px; }
.top-search:hover { border-color: var(--line-3); color: var(--muted); }
.top-search .i { width: 18px; height: 18px; } .top-search span { flex: 1; text-align: left; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--muted); font: 600 12px/1 var(--font); }
.me-who { display: flex !important; align-items: center; gap: 12px; }
.me-who > span:last-child { display: grid; min-width: 0; } .me-who b { color: var(--ink); }
.me-menu button[role="menuitem"] { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 6px; background: none; font-size: 14.5px; font-weight: 500; text-align: left; }
.me-menu button[role="menuitem"]:hover { background: var(--hover); }
.me-menu button[role="menuitem"] .i { color: var(--muted); width: 18px; height: 18px; }
.me-menu a:hover { background: var(--hover); }
.me-theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 4px 6px; padding: 4px; border-radius: 8px; background: var(--bg); }
.me-theme button { height: 32px; border: 0; border-radius: 6px; background: none; color: var(--muted); display: grid; place-items: center; }
.me-theme button .i { width: 17px; height: 17px; }
.me-theme button.on { background: var(--card); color: var(--blue); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.notif { position: relative; }
.np { position: absolute; right: -50px; top: calc(100% + 10px); z-index: 60; width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 50px -14px rgba(0, 0, 0, .35); overflow: hidden; }
.np header, .np footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.np header { border-bottom: 1px solid var(--line-2); } .np footer { border-top: 1px solid var(--line-2); }
.np footer a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; } .np footer a:hover { color: var(--ink); }
.np footer .i { width: 17px; height: 17px; }
.np ul { max-height: 380px; overflow-y: auto; }
.np li a { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.np li:last-child a { border-bottom: 0; }
.np li a:hover { background: var(--hover); }
.np li.unread a { background: var(--blue-50); }
.np-i { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--line-2); color: var(--blue); }
.np-i .i { width: 18px; height: 18px; }
.np-t { display: grid; gap: 2px; font-size: 14px; } .np-t > span { color: var(--muted); } .np-t time { color: var(--faint); font-size: 12.5px; }
.np-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.link { border: 0; background: none; padding: 0; cursor: pointer; }

/* overlays */
body.no-scroll { overflow: hidden; }
.ovl { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding: 12vh 16px 16px; }
.ovl-bg { position: absolute; inset: 0; background: rgba(6, 18, 34, .5); backdrop-filter: blur(2px); }
.sp, .kb { position: relative; width: min(640px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); overflow: hidden; }
.sp-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.sp-in .i { color: var(--faint); }
.sp-in input { flex: 1; height: 58px; border: 0; background: none; outline: none; font-size: 17px; }
.sp-r { max-height: 50vh; overflow-y: auto; padding: 8px; }
.sp-r a { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 8px; }
.sp-r a:hover, .sp-r li:first-child a { background: var(--hover); }
.sp-r a .i { color: var(--blue); }
.sp-r a > span { display: grid; min-width: 0; } .sp-r b { font-weight: 600; }
.sp-r a > span > span { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-hint { padding: 16px 12px; color: var(--muted); font-size: 14.5px; }
.sp-hint button { margin: 0 2px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink-2); font-size: 13.5px; }
.kb header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.kb h2 { font-size: 18px; font-weight: 750; }
.kb dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; padding: 18px 20px 22px; align-items: center; font-size: 14.5px; }
.kb dt { white-space: nowrap; color: var(--muted); font-size: 13px; } .kb dd { margin: 0; }
.kb .kb-sec { grid-column: 1 / -1; margin-top: 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); font-size: 12px; }

/* home: daily goal */
.goal { display: flex; align-items: center; gap: 14px; margin: 16px 22px 0; padding: 12px 14px; border-radius: 10px; background: var(--bg); }
.goal:hover { background: var(--hover); }
.goal > span { display: grid; flex: 1; min-width: 0; } .goal b { font-weight: 650; } .goal span span { font-size: 13.5px; color: var(--muted); }
.goal .ring text { font-size: 16px; }

/* lesson: bookmark, player bar, notes */
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bm { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--muted); font-size: 14px; font-weight: 600; }
.bm:hover { border-color: var(--line-3); color: var(--ink); }
.bm .i { width: 17px; height: 17px; }
.bm.on { color: var(--blue); border-color: var(--blue-100); background: var(--blue-50); }
.bm.on .i { fill: currentColor; }
.player-bar { position: absolute; right: 14px; bottom: 12px; display: flex; gap: 6px; }
.player-bar span { padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff; font-size: 12.5px; font-weight: 600; }
.notes-c .card-h h2 { display: inline-flex; align-items: center; gap: 8px; } .notes-c .card-h .i { color: var(--blue); }
.note-new { display: grid; gap: 10px; padding: 16px 22px; }
.note-new textarea, .fld input, .fld textarea, .time { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.5; resize: vertical; }
.note-new textarea:focus, .fld input:focus, .time:focus, .sp-in input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.sp-in input:focus { box-shadow: none; }
.note-a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.note-a .muted { margin-right: auto; font-size: 13px; }
.note-l { border-top: 1px solid var(--line-2); }
.note-l > li { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.note-l > li:last-child { border-bottom: 0; }
.note-l > li > p { white-space: pre-wrap; font-size: 15px; }
.note-l .note-edit { padding: 0; width: 100%; }
.note-m { display: flex; align-items: center; gap: 2px; flex: none; } .note-m time { font-size: 13px; color: var(--faint); margin-right: 6px; white-space: nowrap; }

/* tabs, saved */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; color: var(--muted); font-weight: 650; font-size: 15px; }
.tab .i { width: 18px; height: 18px; } .tab:hover { color: var(--ink); } .tab.on { color: var(--blue); }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.tab-n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 6px; background: var(--line-2); color: var(--muted); font-size: 12px; display: grid; place-items: center; }
.tab.on .tab-n { background: var(--blue-50); color: var(--blue); }
.bar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-in { position: relative; flex: 1 1 280px; max-width: 420px; }
.search-in .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 18px; height: 18px; }
.search-in input { width: 100%; height: 42px; padding: 0 12px 0 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font-size: 15px; }
.search-in input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-100); }
.saved { display: grid; gap: 10px; }
.sv { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.sv-main { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.sv-main:hover b { color: var(--blue); }
.sv-i { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
.sv-i .i { fill: currentColor; }
.sv-t { display: grid; min-width: 0; } .sv-t b { font-weight: 650; } .sv-t span { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-meta { font-size: 13px; color: var(--faint); white-space: nowrap; }
.sv--note { align-items: flex-start; padding: 18px 18px 16px 20px; }
.sv-note { flex: 1; min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; } .sv-note p { white-space: pre-wrap; font-size: 15.5px; }
.sv-src { overflow: hidden; display: inline-flex; align-items: center; gap: 6px; justify-self: start; max-width: 100%; padding: 4px 10px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.sv-src span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sv-src:hover { color: var(--blue); } .sv-src .i { width: 13px; height: 13px; fill: currentColor; flex: none; }
.sv-side { display: flex; align-items: center; gap: 4px; flex: none; }

/* achievements */
.ach { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ach-c { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.ach-i { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 50%; background: var(--line-2); color: var(--faint); }
.ach-c.got .ach-i { background: linear-gradient(135deg, #F7C948, #E59E1F); color: #fff; box-shadow: 0 6px 16px -6px rgba(229, 158, 31, .6); }
.ach-c.got .ach-i .i { fill: currentColor; }
.ach-c h3 { font-size: 17px; font-weight: 750; } .ach-c p { color: var(--muted); font-size: 14.5px; }
.ach-c .tag { margin-top: auto; }
.ach-p { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ach-c:not(.got) h3 { color: var(--ink-2); }

/* help */
.help-c { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hc { display: grid; gap: 4px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.hc:hover { border-color: var(--line-3); box-shadow: var(--shadow); }
.hc .i { width: 40px; height: 40px; padding: 9px; margin-bottom: 8px; border-radius: 10px; background: var(--blue-50); color: var(--blue); box-sizing: border-box; }
.hc span { color: var(--muted); font-size: 14px; }
.faq-i { border-bottom: 1px solid var(--line-2); } .faq-i:last-child { border-bottom: 0; }
.faq-i button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border: 0; background: none; font-size: 15.5px; font-weight: 650; text-align: left; }
.faq-i button:hover { background: var(--hover); }
.faq-i button .i { color: var(--muted); transition: transform .2s var(--ease); flex: none; }
.faq-i.open button .i { transform: rotate(180deg); }
.faq-i p { padding: 0 22px 18px; color: var(--ink-2); }
.pad { padding: 16px 22px 20px; }

/* settings */
.set { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.set-nav { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r); color: var(--ink-2); font-weight: 600; font-size: 15px; }
.set-nav a .i { color: var(--muted); width: 19px; height: 19px; }
.set-nav a:hover { background: var(--hover); }
.set-nav a.on { background: var(--blue-50); color: var(--blue); } .set-nav a.on .i { color: var(--blue); }
.set-body { display: grid; gap: 20px; min-width: 0; }
.set-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.set-card > header { padding: 20px 24px 16px; border-bottom: 1px solid var(--line-2); }
.set-card h2 { font-size: 17.5px; font-weight: 750; }
.set-card > header p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.set-card--danger { border-color: var(--red-bg); } .set-card--danger h2 { color: var(--red); }
.set-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 24px 22px; }
.set-note { padding: 0 24px 22px; color: var(--muted); font-size: 14.5px; }
.btn--danger { background: var(--red); border-color: var(--red); color: #fff; } .btn--danger:hover { filter: brightness(1.08); background: var(--red); border-color: var(--red); }
.rows > * { border-bottom: 1px solid var(--line-2); } .rows > *:last-child { border-bottom: 0; }
.row-t { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 24px; cursor: default; }
label.row-t { cursor: pointer; }
.row-l { display: grid; gap: 2px; min-width: 0; } .row-l b { font-weight: 650; font-size: 15.5px; } .row-l span { color: var(--muted); font-size: 14px; }
.sw { position: relative; flex: none; width: 46px; height: 26px; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw-k { position: absolute; inset: 0; border-radius: 13px; background: var(--line-3); transition: background .2s; }
.sw-k::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.sw input:checked + .sw-k { background: var(--btn); }
.sw input:checked + .sw-k::after { transform: translateX(20px); }
.sw input:focus-visible + .sw-k { outline: 2px solid var(--blue); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 14px; font-weight: 650; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px 24px 24px; }
.theme-o { display: grid; gap: 10px; padding: 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; }
.theme-o:hover { border-color: var(--line-3); }
.theme-o.on { border-color: var(--blue); }
.theme-l { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px 2px; font-weight: 650; font-size: 15px; }
.theme-l .i { width: 18px; height: 18px; color: var(--muted); } .theme-o.on .theme-l .i { color: var(--blue); }
.theme-pv { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); }
.theme-pv span { position: absolute; border-radius: 4px; }
.theme-pv span:nth-child(1) { left: 0; right: 0; top: 0; height: 18%; }
.theme-pv span:nth-child(2) { left: 10%; top: 30%; width: 50%; height: 12%; }
.theme-pv span:nth-child(3) { left: 10%; top: 52%; width: 80%; height: 36%; }
.theme-pv--light { background: #F7F8FA; } .theme-pv--light span:nth-child(1) { background: #fff; border-radius: 0; } .theme-pv--light span:nth-child(2) { background: #06213D; } .theme-pv--light span:nth-child(3) { background: #fff; border: 1px solid #E3E8EF; }
.theme-pv--dark { background: #0A1220; } .theme-pv--dark span:nth-child(1) { background: #111B2C; border-radius: 0; } .theme-pv--dark span:nth-child(2) { background: #F1F5FB; } .theme-pv--dark span:nth-child(3) { background: #111B2C; border: 1px solid #233247; }
.theme-pv--system { background: linear-gradient(105deg, #F7F8FA 50%, #0A1220 50%); }
.theme-pv--system span:nth-child(1) { background: linear-gradient(105deg, #fff 50%, #111B2C 50%); border-radius: 0; }
.theme-pv--system span:nth-child(2) { background: linear-gradient(105deg, #06213D 50%, #F1F5FB 50%); }
.theme-pv--system span:nth-child(3) { background: linear-gradient(105deg, #fff 50%, #111B2C 50%); }
.goals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 20px 24px 16px; }
.goal-o { display: grid; gap: 2px; padding: 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; }
.goal-o:hover { border-color: var(--line-3); } .goal-o.on { border-color: var(--blue); background: var(--blue-50); }
.goal-o b { font-size: 20px; font-weight: 800; color: var(--heading); } .goal-o span { font-weight: 650; } .goal-o small { color: var(--muted); font-size: 13px; }
.days { display: flex; gap: 6px; flex: none; }
.day { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-weight: 700; font-size: 14px; }
.day.on { background: var(--btn); border-color: var(--btn); color: #fff; }
.time { width: auto; flex: none; height: 42px; padding: 0 12px; }
.set-form { padding: 20px 24px 24px; }
.pf-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.pf-head > div { display: grid; } .pf-head b { font-size: 18px; font-weight: 750; } .pf-head span { color: var(--muted); }
.av--xl { width: 64px; height: 64px; font-size: 22px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fld { display: grid; gap: 6px; grid-column: 1 / -1; } .fld--half { grid-column: span 1; }
.fld > span { font-size: 14px; font-weight: 650; color: var(--ink-2); }
.fld > span i { font-style: normal; font-weight: 500; color: var(--faint); margin-left: 4px; }
.fld input { height: 44px; padding: 0 12px; }
.fld.is-bad input { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.set-form footer { display: flex; justify-content: flex-end; margin-top: 22px; }

/* responsive */
@media (max-width: 1180px) { .top-search { width: 40px; padding: 0; justify-content: center; } .top-search span, .top-search kbd { display: none; } }
@media (max-width: 1080px) {
  .ach { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lesson { grid-template-columns: minmax(0, 1fr); } .lesson-side { position: static; }
}
@media (max-width: 860px) {
  .set { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .set-nav a { flex: none; height: 38px; border: 1px solid var(--line); background: var(--card); font-size: 14px; }
  .set-nav a.on { border-color: var(--blue-100); }
  .goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-c { grid-template-columns: minmax(0, 1fr); }
  .cont, .mc, .cert { grid-template-columns: minmax(0, 1fr); }
  .cont-img { min-height: 0; aspect-ratio: 16 / 8; }
  .cols, .builds { grid-template-columns: minmax(0, 1fr); }
  .builds li:nth-last-child(2) { border-bottom: 1px solid var(--line-2); }
  .cert-art, .cert-img { border-right: 0; border-bottom: 1px solid var(--line); }
  .ch { flex-direction: column-reverse; align-items: flex-start; }
  .ch-ring { flex-direction: row; display: flex; align-items: center; gap: 14px; text-align: left; }
  .ch-ring .ring { width: 72px; height: 72px; margin: 0; }
  .ch-ring .muted::before { content: '·'; margin-right: 8px; }
  .mod-h { grid-template-columns: auto minmax(0, 1fr) auto; }
  .mod-p { grid-column: 2 / 3; grid-row: 2; }
}
@media (max-width: 680px) {
  :root { --top: 60px; }
  .top { padding: 0 16px; gap: 12px; }
  .top-nav { display: none; }
  .top-r { gap: 0; } .top-search { margin-right: 0; border: 0; background: none; }
  .top-r > [data-act="theme"] { display: none; }
  .brand { gap: 8px; } .brand-tag { height: 22px; padding: 0 6px; font-size: 11px; }
  .env-tag { height: 20px; padding: 0 5px; font-size: 10px; letter-spacing: .06em; }
  .icon-btn { width: 38px; height: 38px; }
  .np { position: fixed; left: 8px; right: 8px; top: calc(var(--top) + 6px); width: auto; }
  .ach { grid-template-columns: minmax(0, 1fr); }
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 16px; } .theme-o { padding: 6px; } .theme-l { font-size: 13.5px; gap: 5px; } .theme-l .i { width: 15px; height: 15px; }
  .row-t { padding: 14px 16px; flex-wrap: wrap; } .set-card > header { padding: 16px; } .set-actions { padding: 16px; } .set-form { padding: 16px; } .set-note { padding: 0 16px 16px; }
  .goals { padding: 16px 16px 12px; gap: 8px; } .goal-o { padding: 12px; }
  .fields { grid-template-columns: minmax(0, 1fr); } .fld--half { grid-column: 1 / -1; }
  .days { width: 100%; justify-content: space-between; } .day { width: 40px; height: 40px; }
  .seg { width: 100%; } .seg button { flex: 1; justify-content: center; padding: 0 6px; }
  .note-new { padding: 14px 16px; } .note-l > li { padding: 12px 16px; flex-direction: column; gap: 6px; } .note-m { align-self: flex-end; }
  .note-a .muted { display: none; }
  .sv--note { flex-direction: column; } .sv-side { align-self: stretch; justify-content: space-between; }
  .ovl { padding: 10px; } .sp-r { max-height: 60vh; }
  .goal { margin: 14px 16px 0; }
  .lesson-top .bm span { display: none; } .bm { width: 36px; padding: 0; justify-content: center; }
  .kb dl { grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; }
  .env-tag { margin-left: 0; }
  .logo { height: 28px; }
  .av { width: 36px; height: 36px; font-size: 13px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--top-bg); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: var(--faint); font-size: 11.5px; font-weight: 650; }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--blue); }
  .page { padding: 26px 16px 150px; gap: 20px; }
  .lede { font-size: 16px; }
  .cont-b { padding: 22px 20px; } .cont-b h2 { font-size: 23px; }
  .cont-a .btn { flex: 1; }
  .stats { gap: 10px; }
  .stat { grid-template-columns: 1fr; padding: 14px; gap: 2px; }
  .stat .i { grid-row: auto; width: 36px; height: 36px; padding: 8px; margin-bottom: 8px; }
  .stat-v { font-size: 19px; }
  .soon { grid-template-columns: minmax(0, 1fr); }
  .soon-c { flex-direction: row; } .soon-c img { width: 112px; aspect-ratio: auto; height: auto; object-fit: cover; flex: none; }
  .soon-c > div { padding: 14px; }
  .mc-b { padding: 20px; } .mc-b h2 { font-size: 21px; }
  .ch { padding: 22px 20px; gap: 18px; }
  .ch .cont-a .btn { width: 100%; }
  .mod-h { padding: 14px; gap: 12px; } .mod-n { width: 34px; height: 34px; font-size: 13px; }
  .mod-t b { font-size: 15.5px; }
  .lessons { padding: 4px 6px 10px; } .lessons a { padding: 10px 8px; gap: 12px; }
  .ls-m { display: none; }
  .player { border-radius: 10px; margin: 0 -16px 8px; border-radius: 0; }
  .lesson-a .btn--lg { width: 100%; } .lesson-nav { width: 100%; } .lesson-nav .btn { flex: 1; }
  .week { height: 160px; padding: 18px 16px 4px; gap: 6px; }
  .cert-b { padding: 20px; }
  .cert-img { padding: 16px; }
  .cert-img figcaption { left: 26px; bottom: 26px; font-size: 12px; height: 28px; }
  .pv { left: 12px; right: 12px; transform: none; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 6px 6px 6px 14px; font-size: 13px; }
  .pv-t { display: none; } .pv-b { margin-left: auto; }
  .toast { bottom: calc(136px + env(safe-area-inset-bottom)); }
}
