/* Articulup portal — warm editorial look: ink, cream paper, one confident coral accent. */
:root {
  /* Articulup brand (from articulup.com) */
  --navy: #08143a;
  --ink: #08143a;
  --ink-2: #0f172a;
  --paper: #f8faff;
  --card: #ffffff;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --muted: #64748b;
  --blue: #0ea5e9;
  --purple: #7c3aed;
  --pink: #db2777;
  --grd: linear-gradient(135deg, #0ea5e9, #7c3aed, #db2777);
  --accent: #7c3aed;
  --accent-2: #6d28d9;
  --accent-soft: #f3efff;
  --gold: #f59e0b;
  --ok: #059669;
  --ok-soft: #e6f6ef;
  --warn: #b45309;
  --warn-soft: #fef3e2;
  --danger: #dc2626;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(8, 20, 58, .04), 0 10px 30px -14px rgba(8, 20, 58, .14);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --side: 248px;
}
.grd-text { background: var(--grd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.5px; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -1px; }
h1 em, h2 em { font-style: normal; background: var(--grd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
a { color: var(--accent-2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok { color: var(--ok); }
.warn { color: var(--warn); font-weight: 600; }
.eyebrow { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 .5em; }
.lead { font-size: 17px; color: var(--ink-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ic.xl { width: 40px; height: 40px; stroke-width: 1.3; }
.ic.tiny { width: 13px; height: 13px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px/1 var(--sans); padding: 11px 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; transition: .15s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--grd); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { opacity: .88; transform: translateY(-1px); border-color: transparent; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.ghost-light { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.btn.ghost-light:hover { border-color: #fff; }
.btn.sm { padding: 8px 13px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.dashed { border-style: dashed; background: transparent; padding: 16px; border-radius: var(--radius); }
.btn:disabled, .btn.disabled { opacity: .45; pointer-events: none; }
.btn.loading { position: relative; color: transparent !important; }
.btn.primary.loading { background: var(--line-2); }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: #999 transparent #999 transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: rgba(0,0,0,.06); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }
.icon-btn.accent { color: var(--accent); background: var(--accent-soft); }
.linkish { background: none; border: 0; color: var(--accent-2); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field em { font-style: normal; color: var(--muted); font-weight: 400; }
input, textarea, select { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
textarea { resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: span 2; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.search { max-width: 360px; margin-bottom: 20px; border-radius: 999px; padding-left: 18px; }

/* ---------- layout */
.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--navy); background-image: radial-gradient(400px 300px at 0% 100%, rgba(124,58,237,.22), transparent), radial-gradient(300px 260px at 100% 0%, rgba(14,165,233,.12), transparent); color: #fff; display: flex; flex-direction: column; padding: 26px 16px 18px; }
.preview-bar ~ .layout .side, .demo-bar ~ .layout .side { height: calc(100vh - 40px); top: 40px; }
.brand { text-decoration: none; color: #fff; padding: 0 12px 26px; }
.wordmark { font-family: var(--serif); font-size: 27px; font-weight: 900; color: inherit; line-height: 1; }
.wordmark em { font-style: normal; background: var(--grd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: rgba(255,255,255,.66); text-decoration: none; font-weight: 500; transition: .15s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav a.on { color: #fff; background: rgba(255,255,255,.1); }
.nav a.on .ic { color: #a78bfa; }
.nav a.on { box-shadow: inset 3px 0 0 #a78bfa; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 6px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
.side-foot .icon-btn { color: rgba(255,255,255,.6); }
.side-foot .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: #fff; padding: 6px; border-radius: 12px; }
.me:hover { background: rgba(255,255,255,.06); }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text strong { font-size: 13.5px; font-weight: 500; }
.me-text small { font-size: 11.5px; color: rgba(255,255,255,.5); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grd); color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.avatar.lg { width: 46px; height: 46px; font-size: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 22px; font-family: var(--serif); }
main { padding: 44px clamp(20px, 4vw, 56px) 80px; max-width: 1180px; width: 100%; min-width: 0; outline: none; }
.tabbar { display: none; }
.preview-bar, .demo-bar { position: sticky; top: 0; z-index: 30; height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; padding: 0 16px; }
.preview-bar { background: var(--grd); color: #fff; }
.preview-bar .btn { background: #fff; border: 0; padding: 6px 12px; }
.demo-bar { background: #fef3c7; color: #78350f; border-bottom: 1px solid #fde68a; }
.demo-bar .linkish { color: #78350f; }

.page-head { margin-bottom: 28px; }
.page-head.split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.page-head.split > div:first-child { max-width: 680px; }
.section-title { font-size: 20px; margin: 8px 0 14px; display: flex; align-items: center; gap: 10px; }
.section-title .muted { font-family: var(--sans); font-size: 14px; font-weight: 400; }
.mini-title { font-family: var(--sans); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; display: flex; gap: 8px; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
.grid-2.wide-left { grid-template-columns: 1.4fr 1fr; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.stack > .card { margin-bottom: 0; }
.card.narrow { max-width: 640px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; font-size: 14px; }
.back { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ---------- loading, empty, toasts */
.loading-page { display: grid; place-items: center; gap: 10px; padding: 80px 0; }
.loading-page.full { min-height: 100vh; }
.spinner { width: 28px; height: 28px; border: 2.5px solid var(--line-2); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 48px 24px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); background: rgba(255,255,255,.5); margin-bottom: 20px; }
.empty .ic.xl { color: var(--accent); margin-bottom: 10px; }
.empty.big { padding: 72px 24px; }
.empty.big h2 { color: var(--ink); }
.empty p { max-width: 460px; margin: 0 auto 16px; }
.boot-error { max-width: 420px; margin: 20vh auto; text-align: center; }
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: up .25s ease; transition: opacity .3s, transform .3s; max-width: 90vw; }
.toast-err { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

/* ---------- modal */
.modal-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(8, 20, 58, .5); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.modal-wrap.out { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--card); border-radius: 24px; width: 100%; max-width: 480px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.3); animation: pop .2s ease; }
.modal.wide { max-width: 640px; }
@keyframes pop { from { transform: scale(.97) translateY(8px); opacity: 0; } }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 4px; }
.modal header h2 { margin: 0; font-size: 22px; }
.modal-body { padding: 12px 24px; overflow: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); }

/* ---------- sign in */
.auth { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth-art { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.auth-art::before, .auth-art::after { content: ''; position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.auth-art::before { width: 520px; height: 520px; right: -160px; top: -160px; background: rgba(124, 58, 237, .45); }
.auth-art::after { width: 420px; height: 420px; left: -140px; bottom: -120px; background: rgba(14, 165, 233, .3); }
.auth-art-inner { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 48px clamp(28px, 5vw, 72px); }
.auth-quote { max-width: 480px; }
.auth-quote .eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #7dd3fc; background: rgba(14,165,233,.1); border: 1px solid rgba(14,165,233,.25); border-radius: 50px; padding: 8px 18px; letter-spacing: .04em; text-transform: none; font-weight: 500; font-size: 13px; }
.auth-quote .eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.auth-quote h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.02; }
.auth-quote p { color: rgba(255,255,255,.7); font-size: 17px; }
.wave-deco { display: flex; align-items: center; gap: 5px; height: 90px; }
.wave-deco i { flex: 1; height: var(--h); background: linear-gradient(#0ea5e9, #7c3aed, #db2777); border-radius: 4px; opacity: .85; animation: wave 1.6s ease-in-out var(--d) infinite alternate; transform-origin: center; }
@keyframes wave { to { transform: scaleY(.35); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .wave-deco i { animation: none; } }
.auth-panel { display: grid; place-items: center; padding: 40px 24px; }
.auth-panel.full { grid-column: 1 / -1; min-height: 100vh; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h2 { font-size: 32px; }
.auth-form { margin-top: 24px; display: flex; flex-direction: column; }
.auth-links { display: flex; justify-content: center; gap: 20px; margin-top: 16px; font-size: 14px; }
.code-form { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 14px; }
.code-input { text-align: center; font-size: 24px; letter-spacing: .3em; font-variant-numeric: tabular-nums; padding: 12px; }
.auth-help { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-mobile-brand { display: none; margin-bottom: 28px; }
.demo-pick { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.sent { text-align: center; margin-top: 24px; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sent-icon { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: var(--grd); color: #fff; }

/* ---------- client home */
.hero { background: var(--navy); color: #fff; border-radius: 24px; padding: clamp(28px, 4vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 32px; margin-bottom: 24px; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero::before { width: 420px; height: 420px; right: -100px; top: -160px; background: rgba(124, 58, 237, .45); }
.hero::after { width: 380px; height: 380px; left: -140px; bottom: -220px; background: rgba(14, 165, 233, .32); }
.hero-text { position: relative; z-index: 1; max-width: 600px; }
.hero .eyebrow { color: #7dd3fc; }
.hero h1 { font-size: clamp(34px, 4.5vw, 52px); letter-spacing: -1.5px; line-height: 1.04; }
.hero .lead { color: rgba(255,255,255,.72); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.hero-ring { text-align: center; position: relative; z-index: 1; }
.hero-ring p, .prog-ring p { font-size: 13px; margin: 8px 0 0; color: rgba(255,255,255,.65); }
.prog-ring p { color: var(--muted); }
.prog-ring { text-align: center; }
.ring { position: relative; display: inline-block; }
.ring svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: rgba(128,128,128,.2); }
.ring-fg { stroke: url(#ringGrd); stroke-linecap: round; transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-family: var(--serif); font-size: 30px; font-weight: 900; line-height: 1; }
.ring-label span { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; padding: 20px 12px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat .ic { color: var(--accent); margin-bottom: 4px; }
.stat strong { font-family: var(--serif); font-size: 26px; font-weight: 900; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.note-card { position: relative; overflow: hidden; }
.note-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grd); }
.clamp { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.goals .goal-list { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.goal-list li { counter-increment: g; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.goal-list li::before { content: counter(g, decimal-leading-zero); font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.1; background: var(--grd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- to-do rows / items */
.todo, .items { list-style: none; margin: 0; padding: 0; }
.todo-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.todo-row:first-child { border-top: 0; }
.tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.6px solid var(--line-2); background: #fff; color: transparent; display: grid; place-items: center; cursor: pointer; margin-top: 1px; transition: .15s; padding: 0; }
.tick .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.tick:hover:not(:disabled) { border-color: var(--ok); color: var(--ok); }
.tick.ghost { border-color: transparent; background: var(--paper); color: var(--muted); cursor: default; }
.done > .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.done .todo-title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.todo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; }
.todo-title { font-weight: 500; }
.kind { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kind .ic { width: 13px; height: 13px; }
.kind-exercise { color: var(--purple); }
.kind-drill { color: var(--pink); }
.kind-homework { color: #0284c7; }
.kind-resource { color: #d97706; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); white-space: nowrap; font-family: var(--sans); font-weight: 500; }
.badge .ic { width: 13px; height: 13px; }
.badge.accent { background: var(--accent-soft); color: var(--accent-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 28px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
.chip .ic { color: var(--accent); width: 15px; height: 15px; }

/* ---------- programme timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 20px; bottom: 20px; width: 2px; background: var(--line-2); }
.tl-item { position: relative; padding-left: 54px; margin-bottom: 16px; }
.tl-dot { position: absolute; left: 0; top: 20px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line-2); font-family: var(--serif); font-weight: 900; color: var(--muted); z-index: 1; }
.tl-item.in_progress .tl-dot { background: var(--grd); border-color: transparent; color: #fff; box-shadow: 0 0 0 6px var(--accent-soft); }
.tl-item.done .tl-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.module { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); }
.module > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.module > summary::-webkit-details-marker, .item-body > summary::-webkit-details-marker { display: none; }
.module > summary h2 { margin: 0; font-size: 22px; }
.module[open] > summary { margin-bottom: 12px; }
.mod-count { font-family: var(--serif); font-size: 18px; color: var(--muted); }
.status { text-transform: none; letter-spacing: 0; font-weight: 600; }
.s-in_progress { color: var(--accent-2); }
.s-done { color: var(--ok); }
.item-body { flex: 1; min-width: 0; }
.item-body > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.item-body > summary .kind { width: 100%; }
.item-body[open] > summary { margin-bottom: 10px; }
.item-body .prose { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 16px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.flash .prose { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } }
.prose p:last-child, .prose ul:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 .8em; padding-left: 1.2em; }
.prose li { margin: .2em 0; }
.prose li::marker { color: var(--accent); }
.prose.small { font-size: 14px; }

/* ---------- recordings */
.rec-list { display: grid; gap: 16px; }
.rec-card { margin: 0; }
.rec-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rec-head h3 { margin: 0 0 2px; }
.rec-tags { display: flex; align-items: center; gap: 6px; }
.client-note { background: var(--paper); border-radius: var(--radius-sm); padding: 10px 14px; font-style: italic; color: var(--ink-2); display: flex; gap: 8px; }
.player { margin: 14px 0 6px; }
.player-bar { display: flex; align-items: center; gap: 14px; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grd); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.play-btn .ic { fill: currentColor; width: 16px; height: 16px; }
.play-btn:hover { opacity: .88; }
.track { position: relative; flex: 1; height: 36px; cursor: pointer; border-radius: 8px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 7px); -webkit-mask: linear-gradient(#000, #000); }
.track::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 3px, var(--card) 3px 7px), linear-gradient(transparent 30%, var(--card) 30% 32%, transparent 32% 68%, var(--card) 68% 70%, transparent 70%); opacity: .0; }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden; pointer-events: none; background: var(--grd); -webkit-mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 7px); mask: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 7px); }
.pin { position: absolute; top: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--pink); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); pointer-events: none; }
.pin.client { background: var(--blue); }
.player-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted); min-width: 84px; text-align: right; }
.comments { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.comment { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); }
.comment.client { background: #e6f6fd; }
.comment-body { flex: 1; }
.stamp { font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; padding: 6px 9px; border-radius: 999px; border: 0; background: var(--card); color: var(--accent-2); cursor: pointer; flex: none; }
.stamp.general { color: var(--muted); cursor: default; }
.comment-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.comment-add input[type=text] { border-radius: 999px; padding-left: 16px; }
.at-now { font-variant-numeric: tabular-nums; }

.rec-prompt { background: var(--paper); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 14px; max-height: 180px; overflow: auto; }
.recorder { text-align: center; padding: 10px 0 6px; }
.rec-viz { width: 100%; height: 70px; }
.rec-time { font-family: var(--serif); font-size: 38px; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.rec-btn { width: 76px; height: 76px; border-radius: 50%; border: 0; background: var(--grd); color: #fff; display: inline-grid; place-items: center; cursor: pointer; box-shadow: 0 12px 32px -8px rgba(124,58,237,.6); transition: .15s; }
.rec-btn .ic { width: 30px; height: 30px; }
.rec-btn:hover { transform: scale(1.05); }
.recorder[data-state=recording] .rec-btn { background: var(--navy); animation: pulse 1.4s ease infinite; }
.recorder[data-state=recording] .rec-btn .ic { fill: #fff; width: 22px; height: 22px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(219,39,119,.55); } 100% { box-shadow: 0 0 0 22px rgba(219,39,119,0); } }
.rec-hint { margin: 12px 0; }
.rec-audio { width: 100%; margin: 8px 0; }

/* ---------- notes, docs */
.note h3 { margin-bottom: 8px; }
.note.journal, .note.client { border-left: 4px solid var(--blue); }
.journal-form .btn { margin-top: -2px; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list.card { padding: 6px 20px; }
.doc { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.doc:first-child { border-top: 0; }
.doc-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.doc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.doc-main strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- coach: client list */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.client-card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: inherit; margin: 0; transition: transform .15s, box-shadow .15s; }
.client-card { border-width: 1.5px; }
.client-card:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(8, 20, 58, .1); border-color: transparent; }
.client-card.archived { opacity: .55; }
.client-top { display: flex; gap: 14px; align-items: center; }
.client-top h3 { margin: 0; }
.client-top p { margin: 0; }
.client-prog { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 6px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grd); border-radius: 99px; }
.client-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.status-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--paper); color: var(--muted); }
.status-pill.active { background: var(--ok-soft); color: var(--ok); }
.status-pill.invited { background: var(--warn-soft); color: var(--warn); }

/* ---------- coach: client page */
.client-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.client-head-text { flex: 1; min-width: 220px; }
.client-head-text h1 { margin-bottom: 4px; }
.client-head-text p { margin: 0; }
.client-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-2); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: inline-flex; gap: 7px; align-items: center; padding: 12px 14px; color: var(--muted); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-image: var(--grd) 1; }
.tabs a .ic { width: 16px; height: 16px; }

.save-bar { position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.preview-bar ~ .layout .save-bar, .demo-bar ~ .layout .save-bar { top: 52px; }
.save-bar .unsaved { margin-left: auto; font-size: 13px; color: var(--warn); opacity: 0; transition: .2s; }
.save-bar.dirty .unsaved { opacity: 1; }
.save-bar:not(.dirty) .btn.primary { background: var(--card); color: var(--muted); border-color: var(--line-2); }
.switch-lbl { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-lbl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-lbl input:checked + .switch { background: var(--ok); }
.switch-lbl input:checked + .switch::after { left: 21px; }
.switch-lbl input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.ed-mod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mod-num { width: 34px; height: 34px; border-radius: 50%; background: var(--grd); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 900; flex: none; }
.h-input { font-family: var(--serif); font-size: 20px; font-weight: 600; border-color: transparent; padding: 6px 10px; }
.h-input:hover { border-color: var(--line-2); }
.ed-tools { display: flex; gap: 2px; flex: none; }
.ed-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ed-item { background: var(--paper); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ed-item-row { display: flex; gap: 8px; align-items: center; }
.ed-item-row select { width: 130px; flex: none; }
.ed-item-row input[data-f=title] { font-weight: 500; }
.ed-item .chk { color: var(--accent); }
.small-input { font-size: 13px; padding: 7px 10px; }

.import h2 { display: flex; align-items: center; gap: 10px; }
.import h2 .ic { color: var(--accent); }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; transition: .15s; text-align: center; margin: 18px 0; background: var(--paper); }
.drop .ic { color: var(--accent); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.paste summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.paste textarea { margin-bottom: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.import-preview { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
.import-mods { padding-left: 1.2em; }
.import-mods > li { margin-bottom: 12px; }
.import-mods ul { list-style: none; padding: 6px 0 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.warn-box { background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.import-preview .chk { margin: 6px 0 16px; display: flex; }
.import-preview .row-gap { justify-content: flex-start; }
.danger-zone { border-color: #f0cfcb; }
.template { background: var(--paper); border-radius: var(--radius-sm); padding: 16px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; max-height: 560px; overflow: auto; margin: 0; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 14px; margin: 0 0 14px; }
.keys dt { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--accent-2); }
.keys dd { margin: 0; color: var(--muted); }

/* ---------- responsive */
@media (max-width: 1000px) {
  .grid-2, .grid-2.wide-left { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  main { padding: 24px 18px 110px; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: rgba(8,20,58,.96); backdrop-filter: blur(10px); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: rgba(255,255,255,.55); text-decoration: none; font-size: 10.5px; font-weight: 500; padding: 6px 8px; border-radius: 10px; flex: 1; }
  .tabbar a.on { color: #fff; }
  .tabbar a.on .ic { color: #a78bfa; }
  .tabbar .ic { width: 22px; height: 22px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-mobile-brand { display: block; }
  .hero { flex-direction: column; align-items: flex-start; border-radius: 20px; }
  .hero-ring { align-self: center; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card { padding: 18px; }
  .tl-item { padding-left: 0; }
  .timeline::before, .tl-dot { display: none; }
  .module { padding: 16px; }
  .ed-item-row { flex-wrap: wrap; }
  .ed-item-row input[data-f=title] { flex: 1 1 100%; order: -1; }
  .save-bar { border-radius: 16px; flex-wrap: wrap; }
  .comment-add { flex-wrap: wrap; }
  .comment-add input[type=text] { flex: 1 1 100%; }
  .preview-bar { font-size: 12px; height: auto; padding: 8px 12px; flex-wrap: wrap; }
}

/* ---------- live session room */
.live { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--navy); color: #fff; z-index: 50; }
.live-top { display: flex; align-items: center; gap: 18px; padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(8,20,58,.96); }
.live-brand { text-decoration: none; color: #fff; }
.live-brand .wordmark { font-size: 22px; }
.live-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.live-title strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-title span { font-size: 12.5px; color: rgba(255,255,255,.6); }
.presence { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.06); }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.presence.on i { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); }
.live-actions { margin-left: auto; display: flex; gap: 8px; }
.live-body { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; position: relative; display: grid; place-items: center; overflow: auto; padding: 24px;
  background: radial-gradient(600px 400px at 85% 0%, rgba(124,58,237,.28), transparent), radial-gradient(500px 400px at 0% 100%, rgba(14,165,233,.18), transparent), var(--navy); }
.stage-msg { text-align: center; max-width: 560px; }
.stage-msg h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -1.5px; color: #fff; }
.stage-msg p { color: rgba(255,255,255,.72); font-size: 17px; }
.stage-msg .eyebrow { color: #7dd3fc; }
.stage-msg .ic.xl { color: #a78bfa; width: 56px; height: 56px; }
.stage-msg .btn { margin-top: 8px; }
.stage-card { background: #fff; color: var(--ink); border-radius: 28px; padding: clamp(28px, 4vw, 56px); width: min(900px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); max-height: 100%; overflow: auto; }
.stage-card h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 20px; }
.stage-card .eyebrow .kind { font-size: 12px; }
.stage-words { font-size: clamp(20px, 2.4vw, 30px); line-height: 1.6; }
.stage-words p { margin: 0 0 .4em; }
.stage-words p.b { padding-left: 1.1em; position: relative; }
.stage-words p.b::before { content: ''; position: absolute; left: 0; top: .7em; width: .4em; height: .4em; border-radius: 50%; background: var(--grd); }
.stage-words .w { border-radius: 6px; padding: 0 2px; transition: background .15s, color .15s; }
.stage-words.clickable .w { cursor: pointer; }
.stage-words.clickable .w:hover { background: var(--accent-soft); }
.stage-words .w.hl { background: var(--grd); color: #fff; }
.stage-text { font-family: var(--serif); font-weight: 900; font-size: clamp(36px, 6vw, 84px); line-height: 1.15; text-align: center; letter-spacing: -1px; color: #fff; max-width: 1100px; overflow-wrap: anywhere; }
.slide-wrap { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.slide-wrap canvas { border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.4); background: #fff; }
.slide-count { position: absolute; bottom: -6px; right: 8px; font-size: 12px; color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.slide-nav:hover { background: rgba(255,255,255,.25); }
.slide-nav.prev { left: 0; } .slide-nav.next { right: 0; }
.live-panel { width: 330px; flex: none; background: #fff; color: var(--ink); display: flex; flex-direction: column; gap: 4px; padding: 16px; overflow-y: auto; }
.lp-sec { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.lp-sec.grow { flex: 1; min-height: 160px; border-bottom: 0; }
.lp-sec.grow textarea { flex: 1; resize: none; }
.lp-label { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.lp-label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg button { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 9px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: 500 13px var(--sans); cursor: pointer; color: var(--ink-2); }
.seg button .ic { width: 15px; height: 15px; }
.seg button.on { border-color: transparent; background: var(--grd); color: #fff; }
.act-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.act-mod { font-size: 12px; color: var(--muted); margin: 8px 0 2px; font-weight: 600; }
.act { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; font: 500 13px/1.3 var(--sans); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.act:hover { border-color: var(--purple); }
.act.on { border-color: var(--purple); background: var(--accent-soft); }
.act .kind { font-size: 10px; }
.chk.big { font-size: 14px; color: var(--ink); margin-bottom: 14px; white-space: normal; }
.session-card { position: relative; overflow: hidden; }
.session-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--grd); }
.session-card .eyebrow { display: flex; align-items: center; gap: 6px; }
.session-card .eyebrow .ic { width: 15px; height: 15px; color: var(--purple); }
.session-card h3 { margin-bottom: 2px; }
.live-dot { animation: blink 1.4s ease infinite; }
@keyframes blink { 50% { opacity: .5; } }
@media (max-width: 900px) {
  .live-body { flex-direction: column; }
  .live-panel { width: auto; max-height: 45vh; }
  .hide-sm { display: none; }
  .live-top { gap: 10px; padding: 10px 12px; flex-wrap: wrap; }
  .presence { order: 5; }
}
