/* ori/css/ori.css — student area. Warm, editorial, minimal. RTL-first. Brand colors arrive as CSS variables from settings
   (js/ui.js applyBrand derives AA-safe tones). No green anywhere: success uses the brand accent. */

:root {
  --bg: #FAF6EF; --fg: #2B2522; --accent: #B9774E; --accent-strong: #98603B; --on-accent: #fff; --soft: #EFE4D6;
  --muted: #6E625B; --surface: #FDFBF7; --sunken: #F4ECE1; --line: #E8E0D6; --line-strong: #D6CBBE; --accent-tint: #F2E7DB;
  --fg-rgb: 43,37,34; --accent-rgb: 185,119,78; --bg-rgb: 250,246,239;
  --danger: #A63A2A; --danger-tint: #F7E4DF;
  --font: "Heebo", "Assistant", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --r-sm: 10px; --r: 16px; --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(var(--fg-rgb), .05);
  --shadow: 0 1px 2px rgba(var(--fg-rgb), .04), 0 10px 30px -14px rgba(var(--fg-rgb), .18);
  --shadow-lg: 0 2px 6px rgba(var(--fg-rgb), .05), 0 30px 60px -24px rgba(var(--fg-rgb), .28);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --tabbar-h: 0px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; scroll-padding-bottom: calc(var(--tabbar-h) + 16px); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
main { flex: 1 0 auto; outline: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0; }
bdi { unicode-bidi: isolate; }
kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; padding: .1em .45em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--surface); }
::selection { background: rgba(var(--accent-rgb), .25); }

/* focus: always visible for keyboard users (IS 5568) */
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; border-radius: 6px; }
.player :focus-visible, .auth-side :focus-visible, .toast :focus-visible { outline-color: #fff; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; transition: top .15s; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small, small { font-size: .875rem; }
.block { display: block; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-color { stroke: none; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.wrap.narrow { max-width: 760px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row.center { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.sec { margin-top: 44px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.sec-head.tight { margin: 8px 0 12px; }
.count { color: var(--muted); font-size: .9rem; }
.kicker { color: var(--accent-strong); font-weight: 600; font-size: .9rem; letter-spacing: .01em; margin-bottom: 6px; }
.display { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); letter-spacing: -.015em; line-height: 1.08; }
.display-sm { font-family: var(--font-display); font-size: 1.6rem; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; margin-top: 10px; }
.page-head { padding: 12px 0 8px; margin-bottom: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow-sm); }
.card h2 { font-family: var(--font-display); font-size: 1.35rem; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(var(--bg-rgb), .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1180px; margin: 0 auto; height: 66px; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { height: 34px; width: auto; }
.brand-dot { width: 26px; height: 26px; border-radius: 50%; flex: none; background: radial-gradient(circle at 50% 50%, var(--accent) 0 34%, transparent 35%), conic-gradient(var(--accent) 0 270deg, rgba(var(--accent-rgb), .22) 270deg 360deg);
  -webkit-mask: radial-gradient(circle, #000 0 34%, transparent 35% 52%, #000 53%); mask: radial-gradient(circle, #000 0 34%, transparent 35% 52%, #000 53%); }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--fg); background: var(--sunken); }
.topnav a[aria-current="page"] { color: var(--fg); background: var(--sunken); }
.topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.user-wrap { position: relative; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 4px 4px 14px; }
.user-btn:hover { border-color: var(--line-strong); }
.user-name { font-weight: 500; font-size: .95rem; }
.user-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 8px; z-index: 50; }
.user-menu a, .user-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: var(--r-sm); text-decoration: none; color: var(--fg); text-align: start; }
.user-menu a:hover, .user-menu button:hover { background: var(--sunken); }
.um-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; display: flex; flex-direction: column; }
.um-head span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.fake-flag { position: fixed; bottom: calc(var(--tabbar-h) + 10px); inset-inline-start: 10px; z-index: 60; font-size: .75rem; background: var(--fg); color: var(--bg); padding: 3px 10px; border-radius: 999px; opacity: .7; pointer-events: none; }

/* mobile tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  .topnav, .user-name, .chip-quiet span { display: none; }
  .topbar-in { height: 58px; padding: 0 16px; gap: 12px; }
  .brand-name { font-size: 1.2rem; }
  .user-btn { padding: 3px; }
  body.has-tabbar { --tabbar-h: calc(64px + env(safe-area-inset-bottom)); padding-bottom: var(--tabbar-h); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 45; height: var(--tabbar-h); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(var(--bg-rgb), .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 500; }
  .tabbar a .ic { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--accent-strong); }
  .tabbar a[aria-current="page"] .ic { stroke-width: 2.1; }
  .wrap { padding: 22px 16px 48px; }
}

/* ---------------------------------------------------------------- buttons, chips, tags */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-weight: 600; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { border-color: var(--fg); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); box-shadow: 0 6px 18px -8px rgba(var(--accent-rgb), .7); }
.btn-primary:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-accent { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--fg); }
.btn-quiet:hover { background: var(--sunken); border-color: transparent; }
.btn-outline { background: var(--surface); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.is-busy { position: relative; color: transparent !important; }
.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: spin .8s linear infinite; }
.btn-primary.is-busy::after { border-color: var(--on-accent) transparent var(--on-accent) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; background: transparent; color: var(--fg); }
.icon-btn:hover { background: var(--sunken); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .ic { width: 16px; height: 16px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--accent-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb), .4); }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn.small { font-size: .875rem; }
.link-btn .ic { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: .9rem; font-weight: 500; text-decoration: none; }
.chip:hover { border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip-quiet { border-color: var(--line); }
.chip .ic { width: 16px; height: 16px; }
.chip-tag { min-height: 30px; font-size: .82rem; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--sunken); color: var(--muted); font-size: .78rem; font-weight: 500; white-space: nowrap; }
.tag .ic { width: 13px; height: 13px; }
.tag-accent { background: var(--accent-tint); color: var(--accent-strong); }

/* ---------------------------------------------------------------- notices, empty, skeleton */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--sunken); border: 1px solid var(--line); font-size: .95rem; }
.notice > .ic { margin-top: 3px; color: var(--accent-strong); }
.notice-accent { background: var(--accent-tint); border-color: rgba(var(--accent-rgb), .3); }
.notice.verify { align-items: center; flex-wrap: wrap; margin-top: 20px; }
.notice.verify > div:first-of-type { flex: 1 1 260px; }
.empty { text-align: center; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: rgba(var(--bg-rgb), .5); }
.empty h3 { font-family: var(--font-display); font-size: 1.35rem; }
.empty p { color: var(--muted); max-width: 46ch; }
.empty .btn { margin-top: 8px; }
.empty-ic { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-strong); }
.empty-ic .ic { width: 26px; height: 26px; }
.skel-wrap { display: flex; flex-direction: column; gap: 14px; padding: 8px 0; }
.skel { height: 18px; width: var(--w, 80%); border-radius: 8px; background: linear-gradient(90deg, var(--sunken), var(--surface), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skel:first-child { height: 34px; width: 40%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-row label { font-weight: 600; font-size: .92rem; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="search"], textarea, select {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--fg);
  transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.55; min-height: 90px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18); }
input[readonly] { background: var(--sunken); color: var(--muted); }
input[dir="ltr"] { text-align: left; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-err { color: var(--danger); font-weight: 500; }
.hint { color: var(--muted); font-size: .84rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 64px; }
.pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: .85rem; padding: 8px 10px; border-radius: 8px; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: .92rem; line-height: 1.5; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input:checked { background: var(--accent-strong); border-color: var(--accent-strong); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input[aria-invalid="true"] { border-color: var(--danger); }
.check .field-err { display: block; }
.check-light { color: rgba(255,255,255,.85); font-size: .85rem; justify-content: center; }
.check-light input { background: transparent; border-color: rgba(255,255,255,.6); }
.search { position: relative; }
.search > .ic { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { padding-inline-start: 44px; border-radius: 999px; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* ---------------------------------------------------------------- auth */
body.auth-page { background: var(--bg); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - 1px); }
.auth-side { position: relative; overflow: hidden; background: var(--fg); color: var(--bg); padding: 48px clamp(28px, 5vw, 72px); display: flex; align-items: center; }
.auth-side::before { content: ""; position: absolute; inset: auto -20% -35% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .55), transparent 65%); filter: blur(10px); }
.auth-side::after { content: ""; position: absolute; top: 12%; inset-inline-start: -12%; width: 46%; aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(var(--bg-rgb), .14); box-shadow: 0 0 0 40px rgba(var(--bg-rgb), .025), 0 0 0 80px rgba(var(--bg-rgb), .02); }
.auth-side-in { position: relative; z-index: 1; max-width: 520px; display: flex; flex-direction: column; gap: 22px; }
.auth-side .brand { color: var(--bg); }
.auth-side .brand-name { font-size: 1.6rem; }
.auth-kicker { color: rgba(var(--bg-rgb), .65); font-size: .95rem; letter-spacing: .02em; margin-top: 18px; }
.auth-hero { font-family: var(--font-display); font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.6rem); line-height: 1.06; letter-spacing: -.02em; font-weight: 700; }
.auth-points { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auth-points li { display: flex; gap: 14px; align-items: center; color: rgba(var(--bg-rgb), .85); }
.auth-points .ic { width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: rgba(var(--bg-rgb), .08); color: var(--accent); flex: none; }
.auth-side .btn-ghost-light { align-self: flex-start; color: var(--bg); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; }
.auth-center { display: flex; justify-content: center; padding: 64px 16px; }
.auth-solo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); }
.auth-title { font-family: var(--font-display); font-size: 2.1rem; letter-spacing: -.015em; margin-top: 8px; }
.auth-sub { margin-top: -10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--sunken); border-radius: 999px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.alt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.alt-row .btn { font-weight: 500; padding: 0 12px; }
.legal-small { font-size: .8rem; color: var(--muted); text-align: center; }
.sent { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; }
.sent-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-strong); display: grid; place-items: center; }
.sent-ic .ic { width: 28px; height: 28px; }
.sent h2 { font-family: var(--font-display); font-size: 1.5rem; }
body.auth-page .footer { border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; min-height: 0; }
  .auth-side { padding: 28px 20px 30px; }
  .auth-side::after { display: none; }
  .auth-side-in { gap: 12px; }
  .auth-kicker, .auth-points, .auth-side .btn-ghost-light { display: none; }
  .auth-hero { font-size: 1.65rem; }
  .auth-main { padding: 28px 16px 40px; }
  .alt-row { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- home */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 8px 0 4px; }
.hello-txt .muted { margin-top: 8px; font-size: 1.05rem; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 16px 10px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 128px; }
.stat-ic { grid-row: 1 / 3; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-tint); color: var(--accent-strong); display: grid; place-items: center; }
.stat-ic .ic { width: 18px; height: 18px; }
.stat strong { font-size: 1.25rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span:last-child { font-size: .78rem; color: var(--muted); line-height: 1.2; }
.continue { margin-top: 28px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); }
.continue-media { position: relative; display: block; min-height: 260px; }
.continue-media .cover { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; border-radius: 0; }
.play-badge { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--bg-rgb), .92); color: var(--fg); box-shadow: var(--shadow-lg); transition: transform .25s var(--ease); }
.play-badge .ic { width: 28px; height: 28px; margin-left: 4px; }
.continue:hover .play-badge { transform: scale(1.07); }
.continue-body { padding: 32px 34px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.continue-title { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); letter-spacing: -.015em; }
.cont-progress { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px; }
@media (max-width: 760px) { .continue { grid-template-columns: 1fr; } .continue-media { min-height: 0; aspect-ratio: 16 / 9; } .continue-body { padding: 22px 20px 24px; } }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 22px; }
.course-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-card:focus-within { box-shadow: 0 0 0 3px var(--accent-strong); }
.cc-link { position: absolute; inset: 0; z-index: 2; border-radius: var(--r-lg); }
.cc-link:focus-visible { outline-offset: -3px; }
.cc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cc-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.cc-title { font-family: var(--font-display); font-size: 1.3rem; letter-spacing: -.01em; }
.cc-sub { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: .84rem; align-items: center; }
.cc-meta > span:not(.tag) + span:not(.tag)::before { content: "·"; margin-inline-end: 14px; }

/* generated covers */
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--sunken); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-gen .c1 { fill: var(--accent); opacity: .9; }
.cover-gen .c2 { fill: none; stroke: currentColor; stroke-width: 1.2; opacity: .45; }
.cover-gen .c3 { fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .55; }
.cover-gen .c3.thin { stroke-width: .8; opacity: .35; }
.cv0 { background: linear-gradient(var(--a), var(--soft), var(--sunken)); color: var(--fg); }
.cv1 { background: linear-gradient(var(--a), var(--fg), #3d332e); color: var(--bg); }
.cv1 .c1 { opacity: .75; }
.cv2 { background: linear-gradient(var(--a), var(--accent), rgba(var(--accent-rgb), .75)); color: var(--bg); }
.cv2 .c1 { fill: var(--soft); opacity: .3; }
.cv3 { background: linear-gradient(var(--a), var(--sunken), var(--soft)); color: var(--fg); }
.cv3 .c1 { fill: var(--fg); opacity: .85; }
.cover-word { position: absolute; inset-inline-start: 22px; bottom: 14px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 6cqi, 3.4rem); letter-spacing: -.02em; line-height: 1; opacity: .92; text-shadow: 0 1px 0 rgba(0,0,0,.04); }
.cover { container-type: inline-size; }
.cv1 .cover-word, .cv2 .cover-word { color: var(--bg); }
.cover-hero { border-radius: var(--r-lg); box-shadow: var(--shadow); }

/* progress */
.ring { position: relative; width: var(--size); height: var(--size); flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--sunken); }
.ring-val { fill: none; stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-txt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: calc(var(--size) * .27); font-variant-numeric: tabular-nums; grid-auto-flow: column; justify-content: center; align-items: center; direction: ltr; }
.ring-txt small { font-size: .62em; font-weight: 600; color: var(--muted); }
.ring-txt .ic { width: 45%; height: 45%; color: var(--accent-strong); stroke-width: 2.4; }
.bar { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); transition: width .6s var(--ease); }

/* events */
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.side .events { grid-template-columns: 1fr; }
.event { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.event-date { width: 56px; height: 60px; border-radius: 12px; background: var(--accent-tint); color: var(--accent-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.1; }
.event-date strong { font-size: 1.35rem; font-family: var(--font-display); }
.event-date span { font-size: .75rem; font-weight: 600; }
.event.is-rec .event-date { background: var(--sunken); color: var(--muted); }
.event-body { flex: 1; min-width: 0; }
.event-body h3 { font-size: 1rem; font-weight: 600; }
.event-body p { font-size: .84rem; }
.event-act { display: flex; align-items: center; gap: 4px; }
@media (max-width: 560px) {
  .event { flex-wrap: wrap; }
  .event-act { width: 100%; justify-content: flex-end; }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .stat { min-width: 0; grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; text-align: center; padding: 12px 6px; row-gap: 2px; }
  .stat-ic { grid-row: auto; width: 30px; height: 30px; margin-bottom: 4px; }
}

/* ---------------------------------------------------------------- course page */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.crumbs [aria-current] { color: var(--fg); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 8px 0 12px; }
.ch-text { display: flex; flex-direction: column; gap: 6px; }
.ch-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: .92rem; margin: 18px 0 22px; }
.ch-meta span { display: inline-flex; gap: 6px; align-items: center; }
.ch-meta .ic { width: 18px; height: 18px; color: var(--accent-strong); }
.ch-side { position: relative; }
.ch-progress { position: absolute; inset-inline-end: 18px; bottom: -26px; display: flex; align-items: center; gap: 14px; padding: 12px 20px 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.ch-progress div { display: flex; flex-direction: column; line-height: 1.3; }
.ch-progress .muted { font-size: .85rem; }
.course-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 30px; }
.about { position: sticky; top: 90px; margin-top: 44px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.about .sec-head h2 { font-size: 1.25rem; }
.about p { color: var(--muted); }
@media (max-width: 960px) {
  .course-hero { grid-template-columns: 1fr; gap: 24px; }
  .ch-side { order: -1; }
  .course-cols { grid-template-columns: 1fr; gap: 0; }
  .about { position: static; margin-top: 28px; }
}
.modules { display: flex; flex-direction: column; gap: 12px; }
.module { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.module[open] { box-shadow: var(--shadow-sm); }
.module summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; }
.module summary::-webkit-details-marker { display: none; }
.module summary:hover { background: rgba(var(--accent-rgb), .04); }
.module summary:focus-visible { outline-offset: -3px; }
.mod-num { font-family: var(--font-display); font-size: 1.3rem; color: var(--accent-strong); width: 34px; flex: none; font-variant-numeric: tabular-nums; }
.mod-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mod-title strong { font-size: 1.06rem; font-weight: 600; }
.mod-title small { color: var(--muted); }
.mod-mini { width: 90px; flex: none; }
.chev { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sunken); flex: none; transition: transform .25s var(--ease); }
.chev .ic { width: 18px; height: 18px; }
.module[open] .chev { transform: rotate(180deg); }
.lock-pill { display: inline-flex; gap: 6px; align-items: center; font-size: .82rem; color: var(--muted); background: var(--sunken); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.lock-pill .ic { width: 14px; height: 14px; }
.module.is-locked .mod-num { color: var(--muted); }
.lessons { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--line); }
.lr-in { display: flex; align-items: center; gap: 14px; padding: 12px 20px; text-decoration: none; color: var(--fg); border-radius: 0; }
a.lr-in:hover { background: rgba(var(--accent-rgb), .06); }
a.lr-in:focus-visible { outline-offset: -3px; }
.lr-status { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); color: var(--muted); flex: none; }
.lr-status .ic { width: 16px; height: 16px; }
.st-done { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.st-done .ic { stroke-width: 2.6; }
.st-lock { border-style: dashed; }
.lr-title { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lr-meta { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.lesson-row.is-locked .lr-in { color: var(--muted); cursor: not-allowed; }
.lesson-row.is-next .lr-status { border-color: var(--accent-strong); color: var(--accent-strong); }
@media (max-width: 560px) { .mod-mini { display: none; } .lr-meta { display: none; } .module summary { padding: 16px 14px; gap: 12px; } .lr-in { padding: 12px 14px; } }

/* ---------------------------------------------------------------- lesson page */
.lesson-layout { width: 100%; max-width: 1440px; margin: 0 auto; padding: 22px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.lesson-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.lesson-head .crumbs { margin-bottom: 8px; }
.lh-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.lh-row .kicker { margin-bottom: 4px; }
.lesson-title { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); letter-spacing: -.015em; }
.kind-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--sunken); color: var(--muted); font-size: .85rem; font-weight: 500; white-space: nowrap; }
.kind-pill .ic { width: 16px; height: 16px; }
.lesson-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; border-radius: var(--r); scrollbar-width: thin; }
.player-skel { aspect-ratio: 16 / 9; border-radius: var(--r); background: linear-gradient(90deg, var(--sunken), var(--surface), var(--sunken)); background-size: 200% 100%; animation: shimmer 1.4s infinite; margin-bottom: 20px; }
.stage { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1023px) {
  .lesson-layout { grid-template-columns: 1fr; padding: 14px 16px 48px; gap: 16px; }
  .lesson-side { position: static; max-height: none; overflow: visible; }
  .lesson-head .crumbs { display: none; }
  .lh-row { align-items: flex-start; }
}

/* player */
.player { position: relative; aspect-ratio: 16 / 9; background: #0d0b0a; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-lg); color: #fff; user-select: none; -webkit-user-select: none; isolation: isolate; }
.player .video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player.is-full { border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.wm { position: absolute; left: var(--x, 10%); top: var(--y, 12%); z-index: 3; pointer-events: none; font-size: clamp(11px, 1.4vw, 15px); font-weight: 500; color: rgba(255,255,255,.38); text-shadow: 0 0 3px rgba(0,0,0,.45); white-space: nowrap; direction: rtl; letter-spacing: .02em; transition: left 1.2s var(--ease), top 1.2s var(--ease); }
.player.is-full .wm { font-size: 18px; }
.cap { position: absolute; inset-inline: 0; bottom: 74px; z-index: 4; text-align: center; padding: 0 6%; pointer-events: none; transition: bottom .25s var(--ease); }
.player:not(.show-ui).is-playing .cap { bottom: 22px; }
.cap span { display: inline; background: rgba(10,8,7,.78); color: #fff; font-size: clamp(14px, 2vw, 20px); line-height: 1.55; padding: 3px 10px; border-radius: 6px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.player.is-full .cap span { font-size: 26px; }
.big-play { position: absolute; inset: 0; margin: auto; z-index: 5; width: 84px; height: 84px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(var(--bg-rgb), .94); color: var(--fg); box-shadow: 0 16px 40px -10px rgba(0,0,0,.55); transition: transform .2s var(--ease); }
.big-play:hover { transform: scale(1.06); }
.big-play .ic { width: 34px; height: 34px; margin-left: 5px; }
.player.has-overlay .big-play { display: none; }
.controls { position: absolute; inset-inline: 0; bottom: 0; z-index: 6; padding: 36px 14px 8px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.35) 60%, transparent); opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s var(--ease); }
.player.show-ui .controls, .player:not(.is-playing) .controls, .player:focus-within .controls { opacity: 1; transform: none; }
.player.is-playing:not(.show-ui) { cursor: none; }
.pc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.pc-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 10px; background: transparent; color: #fff; flex: none; }
.pc-btn:hover { background: rgba(255,255,255,.14); }
.pc-btn .ic { width: 24px; height: 24px; stroke-width: 1.8; }
.pc-btn[aria-pressed="true"] { background: rgba(255,255,255,.2); }
.pc-text { width: auto; min-width: 46px; padding: 0 8px; font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pc-time { font-size: .88rem; font-variant-numeric: tabular-nums; padding: 0 8px; white-space: nowrap; opacity: .92; direction: ltr; }
.pc-chapter { font-size: .85rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch; padding-inline-start: 6px; border-inline-start: 1px solid rgba(255,255,255,.3); }
.vol-wrap { display: flex; align-items: center; }
.vol { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: #fff; }
.vol-wrap:hover .vol, .vol-wrap:focus-within .vol { width: 80px; opacity: 1; margin-inline: 4px; }
.scrub-wrap { position: relative; height: 22px; display: flex; align-items: center; margin: 0 4px 2px; }
.scrub { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; position: relative; z-index: 2; }
.scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), rgba(255,255,255,.5) var(--p, 0%) var(--b, 0%), rgba(255,255,255,.22) var(--b, 0%)); transition: height .15s; }
.scrub::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) 0 var(--p, 0%), rgba(255,255,255,.5) var(--p, 0%) var(--b, 0%), rgba(255,255,255,.22) var(--b, 0%)); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #fff; margin-top: -5px; box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .45); transition: transform .15s; }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: #fff; }
.scrub:hover::-webkit-slider-thumb, .scrub:focus-visible::-webkit-slider-thumb { transform: scale(1.25); }
.scrub:focus-visible { outline: none; }
.scrub:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--accent-strong); }
.ticks { position: absolute; inset-inline: 0; top: 50%; height: 4px; transform: translateY(-50%); pointer-events: none; z-index: 3; }
.ticks span { position: absolute; left: var(--x); width: 3px; height: 100%; background: rgba(0,0,0,.65); }
.scrub-tip { position: absolute; bottom: 26px; left: var(--x); transform: translateX(-50%); background: rgba(15,12,11,.94); color: #fff; font-size: .8rem; padding: 4px 9px; border-radius: 7px; white-space: nowrap; pointer-events: none; direction: rtl; }
.pc-menu { position: absolute; bottom: 64px; inset-inline-end: 12px; min-width: 200px; max-height: 60%; overflow: auto; background: rgba(22,18,16,.97); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 6px; box-shadow: 0 20px 40px -10px rgba(0,0,0,.6); z-index: 8; }
.pc-menu-h { font-size: .78rem; opacity: .65; padding: 6px 10px 4px; }
.pc-menu button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; color: #fff; padding: 9px 10px; border-radius: 9px; text-align: start; font-size: .92rem; }
.pc-menu button:hover, .pc-menu button:focus-visible { background: rgba(255,255,255,.12); outline: none; }
.pc-menu button[aria-checked="true"] { background: rgba(var(--accent-rgb), .35); font-weight: 600; }
.pc-menu .ts { color: rgba(255,255,255,.7); background: rgba(255,255,255,.1); }
.p-overlay { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(18,14,12,.84); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 20px; text-align: center; }
.ov-box { max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ov-box h2 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.ov-box p { color: rgba(255,255,255,.82); }
.ov-ic { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: var(--accent); }
.ov-ic .ic { width: 26px; height: 26px; }
.ov-next .kicker { color: var(--accent); margin: 0; }
.count-n { display: inline-block; min-width: 1.2em; font-variant-numeric: tabular-nums; }
.resume-chip { position: absolute; top: 14px; inset-inline-start: 14px; z-index: 7; display: flex; align-items: center; gap: 12px; background: rgba(var(--bg-rgb), .95); color: var(--fg); padding: 7px 8px 7px 16px; border-radius: 999px; font-size: .88rem; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.resume-chip .link-btn { padding: 3px 10px; border-radius: 999px; background: var(--sunken); text-decoration: none; }
.p-spin { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: spin .9s linear infinite; z-index: 4; pointer-events: none; }
@media (max-width: 600px) {
  .player { border-radius: 12px; margin-inline: -4px; }
  .pc-btn { width: 38px; height: 38px; }
  .pc-btn .ic { width: 22px; height: 22px; }
  #pc-chapters, .pc-chapter, .vol-wrap .vol { display: none; }
  .pc-group:first-child > button:nth-child(2), .pc-group:first-child > button:nth-child(3) { display: none; }
  .pc-time { font-size: .8rem; padding: 0 4px; }
  .controls { padding: 24px 6px 4px; }
  .cap { bottom: 64px; padding: 0 3%; }
  .cap span { font-size: 13px; line-height: 1.45; padding: 2px 6px; }
  .player:not(.show-ui).is-playing .cap { bottom: 10px; }
  .big-play { width: 66px; height: 66px; }
  .resume-chip { top: 8px; inset-inline-start: 8px; font-size: .8rem; padding: 5px 6px 5px 12px; }
}

/* action bar */
.action-bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 6px 0; }
.nav-l { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); padding: 10px 12px; border-radius: 14px; min-width: 0; }
.nav-l:hover { background: var(--sunken); }
.nav-l span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.nav-l small { color: var(--muted); font-size: .78rem; }
.nav-l strong { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-l.next { justify-content: flex-end; text-align: end; }
.nav-l.is-locked { color: var(--muted); }
.nav-l .ic { flex: none; width: 20px; height: 20px; }
.done-btn { min-height: 48px; padding: 0 26px; font-size: 1rem; }
.done-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.done-btn.is-done { background: var(--accent-tint); border-color: rgba(var(--accent-rgb), .45); color: var(--accent-strong); }
.done-btn:disabled { opacity: 1; color: var(--muted); border-style: dashed; cursor: default; }
.done-btn.is-done:disabled { color: var(--accent-strong); border-style: solid; }
@media (max-width: 600px) {
  .action-bar { grid-template-columns: 1fr 1fr; }
  .done-btn { grid-column: 1 / -1; grid-row: 1; width: 100%; }
}

/* tabs */
.tabs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.tabs-list { display: flex; gap: 2px; padding: 0 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-list::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 16px 14px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab .ic { width: 18px; height: 18px; }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent-strong); font-weight: 600; }
.tab:focus-visible { outline-offset: -4px; }
.tab-panel { padding: 22px 24px 26px; }
.tab-panel:focus-visible { outline-offset: -4px; }
.panel-h { font-size: 1rem; font-weight: 600; margin: 8px 0 10px; }
@media (max-width: 600px) { .tab-panel { padding: 18px 16px 20px; } .tab { padding: 14px 10px 12px; } .tab .ic { display: none; } }
.ts { display: inline-block; font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--accent-tint); color: var(--accent-strong); direction: ltr; flex: none; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.seek { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid transparent; background: none; padding: 8px 10px; border-radius: 10px; text-align: start; color: var(--fg); }
.seek:hover { background: var(--sunken); }
.transcript { list-style: none; margin: 0; padding: 0 0 0 4px; max-height: 380px; overflow: auto; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; }
.tr-line { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: start; border: 0; background: none; padding: 8px 10px; border-radius: 10px; color: var(--fg); line-height: 1.6; }
.tr-line:hover { background: var(--sunken); }
.tr-line.is-active { background: var(--accent-tint); }
.tr-line.is-active .tr-text { font-weight: 500; }
.tr-text mark { background: rgba(var(--accent-rgb), .35); color: inherit; border-radius: 3px; padding: 0 2px; }
.note-form { display: flex; flex-direction: column; gap: 8px; }
.note-form label { font-weight: 600; font-size: .92rem; display: flex; align-items: center; gap: 6px; }
.composer-act { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.note p { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.note .seek { width: auto; padding: 0; }
.note-empty { padding: 4px 2px; }
.resources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.res { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); background: var(--bg); }
.res:hover { border-color: var(--accent-strong); }
.res-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); color: var(--accent-strong); display: grid; place-items: center; flex: none; }
.res-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.res-t strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }

/* outline sidebar */
.outline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.outline > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; }
.outline > summary::-webkit-details-marker { display: none; }
.outline > summary > span:first-child { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.outline > summary small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outline[open] .chev { transform: rotate(180deg); }
.ol-pct { font-weight: 700; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.ol-bar { padding: 0 18px 12px; }
.ol-mods { border-top: 1px solid var(--line); padding: 6px 0 10px; }
.ol-mod h3 { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 14px 18px 6px; letter-spacing: .01em; }
.ol-mod h3 small { display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
.ol-mod h3 .ic { width: 13px; height: 13px; }
.ol-mod ol { list-style: none; margin: 0; padding: 0 8px; }
.ol-in { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--fg); font-size: .92rem; }
a.ol-in:hover { background: var(--sunken); }
.ol-st { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); color: var(--muted); flex: none; }
.ol-st .ic { width: 13px; height: 13px; }
.ol-l.is-done .ol-st { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.ol-l.is-done .ol-st .ic { stroke-width: 2.8; }
.ol-t { flex: 1; min-width: 0; }
.ol-in small { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.ol-l.is-current .ol-in { background: var(--accent-tint); font-weight: 600; }
.ol-l.is-current .ol-st { border-color: var(--accent-strong); color: var(--accent-strong); }
.ol-l.is-locked .ol-in { color: var(--muted); }
.ol-l.is-current.is-done .ol-st { color: var(--on-accent); }

/* reading, quiz, assignment, live */
.reading { padding: clamp(22px, 4vw, 44px); }
.prose { font-size: 1.05rem; line-height: 1.8; max-width: 70ch; overflow-wrap: anywhere; }
.prose > * + * { margin-top: .9em; }
.prose h2 { font-family: var(--font-display); font-size: 1.55rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.2em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote { margin: 0; padding: 4px 18px; border-inline-start: 3px solid var(--accent); color: var(--muted); }
.prose mark.ph { background: #FFF1C9; color: #5A4300; padding: 0 3px; border-radius: 4px; }
.prose img { border-radius: 12px; }
.quiz, .assignment, .live { display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 3.4vw, 34px); }
.quiz-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.quiz h2, .assignment h2, .live h2 { font-family: var(--font-display); font-size: 1.6rem; }
.q { border: 1px solid var(--line); border-radius: var(--r); padding: 18px 18px 14px; margin: 0; background: var(--bg); }
.q legend { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 1.05rem; padding: 0 6px; float: right; width: 100%; margin-bottom: 12px; }
.q-n { width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-size: .85rem; flex: none; margin-top: -1px; }
.opts { display: grid; gap: 8px; clear: both; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--fg); }
.opt input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); margin: 0; flex: none; display: grid; place-items: center; }
.opt input:checked { border-color: var(--accent-strong); }
.opt input:checked::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-strong); }
.opt:has(input:checked) { border-color: var(--accent-strong); background: var(--accent-tint); }
.opt span { flex: 1; }
.opt .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.opt-right { border-color: var(--accent-strong); background: var(--accent-tint); }
.opt-right .ic { color: var(--accent-strong); }
.opt-wrong { border-color: var(--danger); background: var(--danger-tint); }
.opt-wrong .ic { color: var(--danger); }
.opt input:disabled { cursor: default; }
.q.is-wrong { border-color: rgba(166,58,42,.35); }
.why { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface); border-inline-start: 3px solid var(--accent); font-size: .95rem; }
.quiz-result { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--r); background: var(--fg); color: var(--bg); }
.quiz-result .score { flex: 1; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.quiz-result .score strong { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--accent); }
.quiz-result .btn:not(.btn-primary) { background: transparent; color: var(--bg); border-color: rgba(var(--bg-rgb), .4); }
.quiz-result:focus-visible { outline-color: var(--accent-strong); }
.prompt { display: flex; gap: 10px; padding: 14px 16px; background: var(--accent-tint); border-radius: 12px; font-weight: 500; }
.prompt .ic { color: var(--accent-strong); margin-top: 3px; }
.rubric ul { margin: 0; padding-inline-start: 1.2em; }
.sub-status { border: 1px solid var(--line); background: var(--bg); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.sub-status.reviewed { border-color: rgba(var(--accent-rgb), .5); background: var(--accent-tint); }
.sub-h { display: flex; align-items: center; gap: 10px; }
.sub-h .ic { color: var(--accent-strong); }
.sub-h small { margin-inline-start: auto; }
.sub-text { white-space: pre-wrap; max-height: 10em; overflow: auto; font-size: .95rem; }
.sub-status a { overflow-wrap: anywhere; }
.rubric-scores { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rubric-scores li { display: flex; gap: 10px; padding: 6px 12px; background: var(--surface); border-radius: 999px; font-size: .9rem; }
.feedback { margin: 0; padding: 12px 16px; background: var(--surface); border-radius: 12px; border-inline-start: 3px solid var(--accent-strong); white-space: pre-wrap; }
.live-h { display: flex; align-items: center; gap: 12px; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 rgba(166,58,42,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(166,58,42,0); } 100% { box-shadow: 0 0 0 0 rgba(166,58,42,0); } }
.live .btn { align-self: flex-start; }

/* ---------------------------------------------------------------- library */
.lib-tools { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.lib-tools .search { max-width: 560px; }
.lib-grid { columns: 3 320px; column-gap: 18px; }
.lib-grid > .empty { column-span: all; }
.lib-card { break-inside: avoid; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
.lib-card h3 { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.005em; }
.lib-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.type-badge { font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--fg); color: var(--bg); letter-spacing: .02em; }
.t-prompt .type-badge { background: var(--accent-strong); color: var(--on-accent); }
.lib-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: .93rem; line-height: 1.65; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; position: relative; }
.t-prompt .lib-body { font-family: ui-monospace, "SF Mono", Menlo, Consolas, var(--font); font-size: .86rem; direction: rtl; }
.lib-body.is-clamped { max-height: 9.5em; overflow: hidden; }
.lib-body.is-clamped::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3em; background: linear-gradient(to top, var(--bg), transparent); border-radius: 0 0 12px 12px; }
.lib-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.copy-btn.copied { background: var(--accent-strong); color: var(--on-accent); border-color: var(--accent-strong); }

/* ---------------------------------------------------------------- community */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 18px; }
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 12px; }
.side .sec-head h2 { font-size: 1.25rem; }
@media (max-width: 960px) { .two-col { grid-template-columns: 1fr; } .side { position: static; } }
.composer-card { padding: 18px 20px; }
.composer-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.composer { display: flex; flex-direction: column; gap: 8px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.comment.is-pinned { border-color: rgba(var(--accent-rgb), .45); background: linear-gradient(var(--accent-tint), var(--surface) 70%); }
.comment.is-hidden { opacity: .55; }
.comment.is-reply { padding: 12px 0 0; border: 0; background: none; border-top: 1px solid var(--line); border-radius: 0; margin-top: 12px; }
.cm-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cm-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cm-head time { font-size: .8rem; margin-inline-start: auto; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-body > .link-btn { align-self: flex-start; }
.replies:empty { display: none; }
.replies .composer { margin-top: 10px; }
.tab-panel .feed .comment { background: var(--bg); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; letter-spacing: -.02em; }
.av0 { background: var(--accent-tint); color: var(--accent-strong); }
.av1 { background: var(--fg); color: var(--bg); }
.av2 { background: var(--soft); color: var(--fg); }
.av3 { background: var(--accent-strong); color: var(--on-accent); }
.user-btn .avatar { width: 34px; height: 34px; font-size: .8rem; }
.comment.is-reply .avatar { width: 32px; height: 32px; font-size: .78rem; }
.av-lg { width: 84px; height: 84px; font-size: 1.8rem; font-family: var(--font-display); }

/* ---------------------------------------------------------------- profile */
.profile-head { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-bottom: 28px; }
.ph-txt { flex: 1; min-width: 220px; }
.profile-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .profile-cols { grid-template-columns: 1fr; } }
.cert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- certificate */
.cert-page { max-width: 1100px; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 26px; }
.cert-scroll { width: 100%; }
.certificate { container-type: inline-size; width: 100%; aspect-ratio: 297 / 210; background: #FFFDF8; color: #2B2522; border-radius: 6px; box-shadow: var(--shadow-lg); padding: 2.4cqw; position: relative; overflow: hidden; }
.certificate::before { content: ""; position: absolute; width: 60cqw; aspect-ratio: 1; inset-inline-start: -22cqw; top: -26cqw; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .16), transparent 66%); }
.certificate::after { content: ""; position: absolute; width: 40cqw; aspect-ratio: 1; inset-inline-end: -14cqw; bottom: -20cqw; border-radius: 50%; border: .15cqw solid rgba(var(--accent-rgb), .3); box-shadow: 0 0 0 2cqw rgba(var(--accent-rgb), .05); }
.cert-frame { position: relative; z-index: 1; height: 100%; border: .25cqw solid var(--accent); outline: .1cqw solid rgba(var(--accent-rgb), .45); outline-offset: -1.1cqw; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3.5cqw 6cqw; }
.cert-top { position: absolute; top: 3cqw; inset-inline: 4.4cqw; display: flex; justify-content: space-between; align-items: center; font-size: 1.3cqw; color: #6E625B; }
.cert-brand { display: inline-flex; align-items: center; gap: .8cqw; font-family: var(--font-display); font-weight: 700; font-size: 2cqw; color: #2B2522; }
.cert-brand .brand-dot { width: 2.2cqw; height: 2.2cqw; }
.cert-kicker { font-size: 1.7cqw; letter-spacing: .12cqw; color: var(--accent-strong); font-weight: 600; margin-bottom: 1.5cqw; }
.cert-pre { font-size: 1.7cqw; color: #6E625B; }
.cert-name { font-family: var(--font-display); font-size: 6cqw; line-height: 1.1; margin: .8cqw 0 1.6cqw; letter-spacing: -.02em; }
.cert-course { font-family: var(--font-display); font-size: 3cqw; font-weight: 500; margin-top: .8cqw; max-width: 70cqw; }
.cert-foot { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; margin-top: 4.5cqw; }
.cert-sig { display: flex; flex-direction: column; align-items: center; gap: .5cqw; width: 22cqw; }
.cert-sig .sig { font-family: var(--font-display); font-size: 2.6cqw; font-style: italic; }
.cert-sig .sig-date { font-size: 1.7cqw; font-weight: 500; }
.sig-line { display: block; width: 100%; height: .12cqw; background: #2B2522; opacity: .5; }
.cert-sig small { font-size: 1.2cqw; color: #6E625B; }
.cert-seal { width: 8cqw; height: 8cqw; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 .6cqw rgba(var(--accent-rgb), .25); }
.cert-seal .ic { width: 55%; height: 55%; stroke-width: 1.4; }
.cert-verify { position: absolute; bottom: 2.6cqw; font-size: 1cqw; color: #8a7d74; direction: ltr; }
.cert-no { font-variant-numeric: tabular-nums; }
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #fff !important; }
  .topbar, .footer, .tabbar, .no-print, .toasts, .skip, .fake-flag { display: none !important; }
  .wrap { padding: 0 !important; max-width: none !important; }
  .certificate { box-shadow: none; border-radius: 0; width: 297mm; height: 210mm; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- legal */
.legal .prose { max-width: none; }
.legal-sec { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-sec .prose { margin-top: 14px; }

/* ---------------------------------------------------------------- footer */
.footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg); }
.footer-in { max-width: 1180px; margin: 0 auto; padding: 28px 24px 34px; display: grid; grid-template-columns: 1fr auto auto; gap: 14px 36px; align-items: center; font-size: .9rem; }
.footer-brand { display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.1rem; }
.footer-brand span { color: var(--muted); font-size: .85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.footer-contact { display: flex; gap: 4px; }
.footer-contact a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--fg); border: 1px solid var(--line); }
.footer-contact a:hover { border-color: var(--fg); }
.footer-contact .ic { width: 18px; height: 18px; }
.footer-note { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
@media (max-width: 760px) { .footer-in { grid-template-columns: 1fr; padding: 24px 16px 28px; } }

/* ---------------------------------------------------------------- toasts, dialog */
.toasts { position: fixed; z-index: 90; bottom: calc(var(--tabbar-h) + 18px); inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; background: var(--fg); color: var(--bg); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: .95rem; opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast .ic { color: var(--accent); width: 20px; height: 20px; }
.toast.t-error .ic { color: #F2A99B; }
.toast-act { color: var(--bg); font-weight: 700; margin-inline-start: 6px; white-space: nowrap; }
.dlg { border: 0; padding: 0; border-radius: var(--r-lg); width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg); }
.dlg::backdrop { background: rgba(var(--fg-rgb), .45); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px 14px; padding-inline-start: 24px; }
.dlg-head h2 { font-family: var(--font-display); font-size: 1.4rem; }
.dlg-body { padding: 8px 24px 22px; }
.dlg-actions { display: flex; justify-content: flex-start; gap: 10px; padding: 0 24px 22px; }
.intro-video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 16 / 9; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; align-items: center; }
.kbd-list dd { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .kbd-hint { display: none; } }

/* ---------------------------------------------------------------- offline */
.offline-box { max-width: 520px; margin: 12vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 20px; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .course-card:hover { transform: none; }
}
@media (forced-colors: active) {
  .btn, .chip, .opt, .lr-status, .ol-st { border: 1px solid ButtonText; }
  .bar > span, .ring-val { forced-color-adjust: none; }
}

/* ================================================================ public landing page (ld-*) */
.landing-page #main .wrap { padding-top: 0; padding-bottom: 0; }
.ld-top { justify-content: space-between; }
.ld-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.ld-nav a { color: var(--muted); text-decoration: none; font-weight: 500; padding: 8px 14px; border-radius: 999px; }
.ld-nav a:hover { color: var(--fg); background: var(--sunken); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.02rem; }
.ld-hero { background: radial-gradient(1200px 500px at 85% -10%, var(--accent-tint), transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.ld-hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-block: 72px 80px !important; }
.ld-title { font-family: var(--font-display); font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.12; letter-spacing: -.02em; margin: 6px 0 4px; }
.ld-hl { color: var(--accent-strong); background: linear-gradient(transparent 62%, rgba(var(--accent-rgb), .22) 62% 92%, transparent 92%); }
.ld-hero .lead { font-size: 1.15rem; }
.ld-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ld-cta-center { justify-content: center; }
.ld-intro { margin-top: 16px; }
.ld-hero-art { display: flex; justify-content: center; }
.ld-card-mock { width: min(100%, 380px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-lg); transform: rotate(-2deg); }
.ld-mock-top { display: flex; gap: 6px; margin-bottom: 12px; }
.ld-mock-top span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.ld-mock-video { aspect-ratio: 16/9; border-radius: 14px; display: grid; place-items: center; color: var(--on-accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 55%, var(--fg) 140%); }
.ld-mock-video .ic { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: rgba(255,255,255,.22); }
.ld-mock-line { height: 10px; border-radius: 6px; background: var(--sunken); margin-top: 14px; }
.ld-mock-line.w80 { width: 80%; } .ld-mock-line.w60 { width: 60%; margin-top: 8px; }
.ld-mock-row { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ld-mock-pill { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.ld-sec { padding-block: 72px; }
.ld-sec-soft { background: var(--surface); border-block: 1px solid var(--line); }
.ld-h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; margin: 4px 0 18px; }
.ld-about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.ld-about p { max-width: 62ch; font-size: 1.05rem; }
.ld-areas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ld-areas li { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-weight: 600; }
.ld-areas .ic { color: var(--accent-strong); width: 26px; height: 26px; }
.ld-courses { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ld-course { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; }
.ld-course-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ld-course h3 { font-size: 1.2rem; margin: 2px 0 0; }
.ld-course-sub { font-weight: 500; }
.ld-price { font-weight: 700; color: var(--accent-strong); }
.ld-soon { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border-radius: var(--r-lg); background: var(--bg); border: 1px dashed var(--line-strong); max-width: 640px; }
.ld-soon h3 { margin: 0 0 4px; }
.ld-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ld-feat { padding: 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.ld-feat h3 { font-size: 1.08rem; margin: 12px 0 4px; }
.ld-feat p { color: var(--muted); margin: 0; }
.ld-feat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-strong); flex: none; }
.ld-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: none; }
.ld-step { display: flex; gap: 14px; align-items: flex-start; padding: 22px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.ld-step h3 { font-size: 1.08rem; margin: 0 0 4px; } .ld-step p { color: var(--muted); margin: 0; }
.ld-step-n { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--fg); color: var(--bg); font-weight: 700; }
.ld-narrow { max-width: 780px !important; }
.ld-faq-item { border-bottom: 1px solid var(--line); }
.ld-faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 2px; font-weight: 600; font-size: 1.05rem; }
.ld-faq-item summary::-webkit-details-marker { display: none; }
.ld-faq-item summary .ic { transition: transform .2s; color: var(--muted); flex: none; }
.ld-faq-item[open] summary .ic { transform: rotate(180deg); }
.ld-faq-item p { margin: 0 0 18px; color: var(--muted); }
.ld-final { background: var(--fg); color: var(--bg); text-align: center; }
.ld-final .ld-h2 { color: var(--bg); }
.ld-final p { color: rgba(var(--bg-rgb), .8); }
.ld-final .btn-outline { background: transparent; color: var(--bg); border-color: rgba(var(--bg-rgb), .45); }
.ld-final .btn-accent { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.ld-final :focus-visible { outline-color: var(--bg); }
@media (max-width: 900px) {
  .ld-hero-in, .ld-about { grid-template-columns: 1fr; gap: 32px; }
  .ld-hero-in { padding-block: 44px 52px !important; }
  .ld-hero-art { display: none; }
  .ld-feats, .ld-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .ld-nav { display: none; }
  .ld-login { min-height: 40px; padding: 0 14px; font-size: .9rem; }
  .ld-sec { padding-block: 48px; }
  .ld-feats, .ld-steps { grid-template-columns: 1fr; }
  .ld-cta .btn { flex: 1 1 100%; }
  .ld-areas li { padding: 16px; }
}
