/* Flowspace — theme.css · the design system, loaded last
   quiet → intelligent → precise → personal → academic
   Three levels only: background, surface, active surface. The accent is a small light that says where to look,
   never the colour of a whole card. Dark is for night study, light for daytime. */

/* ---------- tokens ---------- */
:root {
  --bg-app: #F5F6FA; --bg-sidebar: #EFF1F6; --bg-card: #FFFFFF; --paper: #FFFFFF;
  --border-color: #E4E7EF; --line: var(--border-color); --line-strong: #D3D8E3;
  --text-main: #171922; --text-muted: #6F7482; --grid-line: transparent;
  --accent: #6F61E8; --accent-strong: #5D4FD9; --accent-soft: rgba(111,97,232,.10); --accent-line: rgba(111,97,232,.38); --accent-ink: #5547CF;
  --ink: var(--accent-ink); --ink-soft: var(--accent-soft);
  --surface: var(--bg-card); --surface-strong: #FFFFFF; --surface-soft: rgba(23,25,34,.02); --surface-active: rgba(23,25,34,.045);
  --field: #F6F7FA; --tint: rgba(23,25,34,.045); --hover: rgba(23,25,34,.055);
  --canvas: #E9EBF1; --ok: #0E9F6E; --warn: #B7791F; --risk: #D64545;
  --r-sm: 10px; --r: 14px; --r-lg: 22px;
  --shadow: 0 1px 2px rgba(23,25,34,.04), 0 8px 24px -16px rgba(23,25,34,.12);
  --mo-accent: 111, 97, 232;
}
.dark {
  --bg-app: #0B0D12; --bg-sidebar: #0D1016; --bg-card: rgba(255,255,255,.035); --paper: #11141B;
  --border-color: rgba(255,255,255,.07); --line: var(--border-color); --line-strong: rgba(255,255,255,.13);
  --text-main: #ECEEF4; --text-muted: #8D93A3; --grid-line: transparent;
  --accent: #8B7CFF; --accent-strong: #9D90FF; --accent-soft: rgba(139,124,255,.13); --accent-line: rgba(139,124,255,.42); --accent-ink: #B3A9FF;
  --ink: var(--accent-ink); --ink-soft: var(--accent-soft);
  --surface: var(--bg-card); --surface-strong: #151821; --surface-soft: rgba(255,255,255,.02); --surface-active: rgba(255,255,255,.06);
  --field: rgba(255,255,255,.045); --tint: rgba(255,255,255,.05); --hover: rgba(255,255,255,.06);
  --canvas: #08090D; --ok: #34D399; --warn: #FBBF24; --risk: #FB7185;
  --shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 20px 40px -28px rgba(0,0,0,.8);
  --mo-accent: 139, 124, 255;
}
body, .dark body { background-image: none; font-feature-settings: 'cv11', 'ss01'; -webkit-font-smoothing: antialiased; }
/* ambient light: one indigo, one purple, barely there */
.glow-bg::before, .dark .glow-bg::before { content: ''; position: absolute; width: 70vmax; height: 70vmax; left: -28vmax; top: -38vmax; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.05), transparent 62%); }
.glow-bg::after { content: ''; position: absolute; width: 60vmax; height: 60vmax; right: -26vmax; bottom: -36vmax; border-radius: 50%; background: radial-gradient(circle, rgba(168,85,247,.035), transparent 62%); }
.dark .glow-bg::before { background: radial-gradient(circle, rgba(99,102,241,.11), transparent 62%); }
.dark .glow-bg::after { background: radial-gradient(circle, rgba(168,85,247,.07), transparent 62%); }
.glow-bg .orb { display: none !important; }
body[data-area="focus-tools"] .glow-bg::after, body[data-area="docs"] .glow-bg::after { opacity: .4; }

/* ---------- accent: the old indigo and violet utilities follow the token ---------- */
.bg-indigo-600, .bg-violet-600 { background-color: var(--accent) !important; box-shadow: none !important; }
.hover\:bg-indigo-700:hover, .hover\:bg-indigo-500:hover, .hover\:bg-violet-700:hover { background-color: var(--accent-strong) !important; }
.text-indigo-600, .text-indigo-500, .text-indigo-700, .text-violet-600, .text-violet-500, .text-violet-700, .dark .dark\:text-indigo-400, .dark .dark\:text-indigo-300, .dark .dark\:text-violet-300, .hover\:text-indigo-600:hover, .hover\:text-violet-600:hover { color: var(--accent-ink) !important; }
.bg-indigo-50, .bg-violet-100, .bg-violet-50\/40, .dark .dark\:bg-indigo-950\/50, .dark .dark\:bg-indigo-950\/40, .dark .dark\:bg-indigo-950\/30, .dark .dark\:bg-violet-950\/60, .dark .dark\:bg-violet-950\/50, .dark .dark\:bg-violet-950\/10 { background-color: var(--accent-soft) !important; }
.border-indigo-500, .border-indigo-400, .hover\:border-indigo-400:hover, .hover\:border-indigo-500:hover, .hover\:border-indigo-300:hover, .hover\:border-violet-400:hover { border-color: var(--accent-line) !important; }
.border-violet-300, .border-violet-200, .border-indigo-200, .dark .dark\:border-violet-800, .dark .dark\:border-indigo-800 { border-color: var(--accent-line) !important; }
.accent-indigo-600 { accent-color: var(--accent); }
[class*="focus:ring-indigo-500"]:focus, [class*="focus:ring-violet-500"]:focus { --tw-ring-color: var(--accent-line) !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }
::selection { background: var(--accent-soft); }

/* ---------- type: hierarchy from size and space, not from weight ---------- */
.font-hand { font-family: inherit !important; font-weight: 500 !important; letter-spacing: 0; }
.fs-label, [class~="uppercase"][class~="tracking-wider"], [class~="uppercase"][class~="tracking-widest"] { font-family: 'Inter', system-ui, sans-serif !important; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; color: var(--text-muted); }
h1, h2, h3, h4 { letter-spacing: -.015em; }
[class~="rounded-3xl"] { border-radius: var(--r-lg) !important; }
[class~="rounded-2xl"] { border-radius: var(--r) !important; }

/* ---------- shell ---------- */
#sidebar { background-color: var(--bg-sidebar) !important; }
#sidebar > div:first-child > div:first-child { border-bottom-color: transparent !important; }
.fs-logo { width: 34px; height: 34px; filter: none; }
.fs-word, .dark .fs-word { font-weight: 600; letter-spacing: -.02em; background: none !important; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text-main); font-size: 17px !important; }
.fs-tagline { display: block; font-size: 10.5px; color: var(--text-muted); line-height: 1.2; margin-top: 1px; }
.nav-btn { font-size: 13px !important; font-weight: 500 !important; border: 1px solid transparent; border-radius: var(--r-sm) !important; color: var(--text-muted) !important; }
.nav-btn:hover { background: var(--hover) !important; color: var(--text-main) !important; }
.nav-btn[class~="bg-indigo-50"] { background: var(--surface-active) !important; border-color: var(--border-color); color: var(--text-main) !important; box-shadow: none; }
.nav-btn[class~="bg-indigo-50"] svg { color: var(--accent); }
.app-header { background-color: transparent !important; border-bottom-color: var(--border-color) !important; }
.view-sub { font-size: 12.5px; color: var(--text-muted); }
.utility-pill { background: var(--tint) !important; border-color: transparent !important; }
.mo-focus-btn { border-radius: var(--r-sm); background: transparent; }
.fs-course { border-radius: 8px; font-family: inherit; }
#active-courses .fs-label { font-size: 10px; }
.planner-card { border-radius: var(--r); box-shadow: none !important; }
.dark .planner-card { -webkit-backdrop-filter: none; backdrop-filter: none; }
#cos-toast, #ne-selbar, #ne-replaybar { background: #1B1E29 !important; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; }
.tt-aibadge { display: none !important; }

/* buttons */
.dash-act { height: 36px; padding: 0 14px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600; background: var(--bg-card); border-color: var(--border-color); color: var(--text-main); white-space: nowrap; }
.dash-act:hover { border-color: var(--accent-line); background: var(--surface-active); }
.dash-act.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.dark .dash-act.is-primary { color: #0B0D12; }
.dash-act.is-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.dash-act.is-danger { color: var(--risk); }
.dash-act.is-danger:hover { border-color: var(--risk); }
.dash-act:disabled { opacity: .45; pointer-events: none; }
.dash-link { color: var(--accent-ink); font-size: 11.5px; }
.chip { display: inline-flex; align-items: center; flex-shrink: 0; height: 20px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; color: var(--text-muted); background: var(--tint); white-space: nowrap; }
.chip.is-risk { color: var(--risk); background: rgba(214,69,69,.1); }
.chip.is-plan { color: var(--accent-ink); background: var(--accent-soft); }
.seg { border-radius: var(--r-sm); background: var(--tint); border-color: transparent; }
.seg button.is-active { background: var(--surface-strong); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.dark .seg button.is-active { background: rgba(255,255,255,.1); }

/* ---------- dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.dash.hidden, .dash-card.hidden, .planner-card.hidden { display: none; }
.dash-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 6px 2px 4px; }
.dash-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); }
.dash-title { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin-top: 6px; }
.dash-stateline { font-size: 17px; font-weight: 500; letter-spacing: -.01em; margin-top: 10px; }
.dash-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; max-width: 62ch; }
.dash-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-card { padding: 18px 20px; }
.dash-card.is-quiet { opacity: .85; }
.dash-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-empty { border-style: dashed; border-radius: var(--r-sm); font-size: 12.5px; line-height: 1.6; padding: 16px; }
.dash-empty b, .dash-empty .font-hand { display: block; font-size: 14px !important; font-weight: 600 !important; color: var(--text-main) !important; margin-bottom: 2px; }
.dash-row { border-radius: var(--r-sm); }
.dash-row b { font-weight: 600; }
.dash-tile { border-radius: var(--r-sm); }
.dash-ico { color: var(--accent); }
/* the hero: one clear recommendation */
.dash-move { display: block; padding: 22px 24px; border-radius: var(--r-lg); border-color: var(--accent-line); background-image: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%); }
.dash-move.is-live { border-color: var(--accent); }
.dash-move .dash-k { color: var(--accent-ink); font-family: inherit; font-size: 10.5px; }
.move-cleared { font-size: 12.5px; color: var(--ok); margin-bottom: 10px; font-weight: 600; }
.move-t { display: block; margin-top: 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.move-t b { font-weight: 650; }
.move-s { font-size: 13.5px; color: var(--text-muted); margin-top: 5px; }
.move-note { font-size: 13px; margin-top: 10px; max-width: 60ch; }
.move-acts { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 18px; }
.move-acts .dash-act { height: 42px; padding: 0 18px; font-size: 13.5px; }
.dash-start { padding: 28px 24px; border-radius: var(--r-lg); border-style: solid; text-align: left; background-image: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%); }
.dash-start h3 { font-size: 21px; font-weight: 650; letter-spacing: -.025em; max-width: 30ch; margin: 0; }
.dash-start p { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.dash-start-acts { justify-content: flex-start; margin-top: 18px; }
/* today: a line through the day */
.journey { display: flex; flex-direction: column; }
.jr { display: grid; grid-template-columns: 50px 14px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 8px 8px 4px; border-radius: var(--r-sm); text-align: left; transition: background .15s; }
button.jr:hover { background: var(--hover); }
.jr time { font: 500 12px 'JetBrains Mono', ui-monospace, monospace; color: var(--text-muted); }
.jr > i { justify-self: center; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--c, var(--line-strong)); background: var(--bg-app); position: relative; }
.jr > i::before { content: ''; position: absolute; left: 50%; top: -22px; height: 20px; width: 1px; background: var(--border-color); transform: translateX(-50%); }
.journey > .jr:first-child > i::before { display: none; }
.jr b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr small { display: block; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr em { font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.jr:hover em, .jr.is-live em, .jr em.is-done { opacity: 1; }
.jr em.is-done { color: var(--ok); } .jr em.is-now { color: var(--accent-ink); }
.jr.is-past { opacity: .5; } .jr.is-past > i { background: var(--c, var(--line-strong)); }
.jr.is-live > i { background: var(--c, var(--accent)); box-shadow: 0 0 0 4px var(--accent-soft); }
.jr-free > i { border-style: dashed; border-color: var(--line-strong); }
.jr-free b { font-weight: 500; color: var(--text-muted); }
.jr-free.is-live b { color: var(--text-main); }
.jr-now { padding-top: 2px; padding-bottom: 2px; }
.jr-now time { color: var(--accent-ink); font-weight: 700; }
.jr-now > i { width: 10px; height: 10px; border: 0; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.jr-now span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }
/* workload, rhythm, since yesterday */
.work-line { font-size: 14px; } .work-line b { font-weight: 600; }
.work-bar { height: 6px; border-radius: 6px; background: var(--tint); overflow: hidden; margin: 10px 0 8px; }
.work-bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width .5s cubic-bezier(.16,1,.3,1); }
.work-note { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.work-list { margin: 10px -8px -6px; }
.big-num { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.1; }
.big-num small { font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.rhythm-bars { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; }
.rhythm-bars span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; color: var(--text-muted); }
.rhythm-bars i { display: block; width: 100%; max-width: 26px; border-radius: 4px; background: var(--line-strong); }
.rhythm-bars .is-today i { background: var(--accent); } .rhythm-bars .is-today { color: var(--accent-ink); font-weight: 700; }
.rhythm-bars.is-wide { gap: 12px; margin-top: 16px; }
.since { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.since li { display: flex; align-items: center; gap: 10px; }
.since span { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--tint); color: var(--accent-ink); flex-shrink: 0; }
.video-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; }
.video-card h4 { font-size: 15px; font-weight: 600; } .video-card p { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; max-width: 52ch; }
.video-card form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 380px; }
.video-card input { flex: 1 1 220px; min-width: 0; height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--field); color: inherit; font-size: 12.5px; outline: none; }
.sem-card { padding: 18px 20px; }
.sem-card.is-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sem-card.is-empty p { flex: 1; font-size: 13px; color: var(--text-muted); min-width: 200px; }
.sem-top { display: flex; align-items: baseline; justify-content: space-between; } .sem-top b { font-size: 16px; font-weight: 600; } .sem-top span { font-size: 12px; color: var(--text-muted); }

/* ---------- focus: the calmest screen ---------- */
.fs-focus { position: fixed; inset: 0; z-index: 88; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: #07080C; color: #ECEEF4; opacity: 0; transition: opacity .35s ease; overflow-y: auto; }
.fs-focus.is-open { opacity: 1; }
.fs-focus[hidden] { display: none; }
.ff-min { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); left: 20px; font-size: 12.5px; font-weight: 500; color: #8D93A3; padding: 8px 12px; border-radius: 10px; }
.ff-min:hover { color: #ECEEF4; background: rgba(255,255,255,.06); }
.ff-body { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 560px; }
.ff-breath { position: absolute; left: 50%; top: 46%; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; background: radial-gradient(circle, rgba(139,124,255,.16), transparent 62%); animation: ffBreath 9s ease-in-out infinite; pointer-events: none; }
@keyframes ffBreath { 0%, 100% { transform: scale(.9); opacity: .55; } 50% { transform: scale(1.08); opacity: 1; } }
.ff-body > *:not(.ff-breath) { position: relative; }
.ff-course { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #9D90FF; }
.ff-title { font-size: clamp(20px, 3.4vw, 28px); font-weight: 600; letter-spacing: -.02em; margin-top: 10px; max-width: 22ch; }
.ff-goal { font-size: 14px; color: #A6ABB9; margin-top: 8px; max-width: 40ch; }
.ff-goal.is-add { color: #6F7482; padding: 4px 10px; border-radius: 8px; } .ff-goal.is-add:hover { color: #ECEEF4; background: rgba(255,255,255,.06); }
.ff-time { font-size: clamp(72px, 17vw, 148px); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 30px; }
.ff-time.is-small { font-size: clamp(48px, 9vw, 72px); margin-top: 16px; }
.ff-line { width: min(320px, 70%); height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 26px; }
.ff-line i { display: block; height: 100%; background: #8B7CFF; border-radius: 3px; transition: width 1s linear; }
.ff-state { font-size: 12.5px; color: #8D93A3; margin-top: 12px; }
.ff-ctl { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.ff-ctl button { height: 44px; padding: 0 22px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #ECEEF4; background: rgba(255,255,255,.07); transition: background .15s; }
.ff-ctl button:hover { background: rgba(255,255,255,.12); }
.ff-ctl button.is-primary { background: #8B7CFF; color: #0B0D12; } .ff-ctl button.is-primary:hover { background: #9D90FF; }
.ff-next { font-size: 12px; color: #6F7482; margin-top: 26px; }
.ff-end .ff-q { width: 100%; margin-top: 22px; text-align: left; }
.ff-end .ff-q > span { display: block; font-size: 12px; color: #8D93A3; margin-bottom: 8px; } .ff-q > span b { color: #ECEEF4; font-weight: 600; }
.ff-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-opts button { height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 500; color: #C9CDD8; background: rgba(255,255,255,.05); border: 1px solid transparent; }
.ff-opts button.is-on { color: #fff; border-color: #8B7CFF; background: rgba(139,124,255,.16); }
.ff-end input[type=range] { width: 100%; accent-color: #8B7CFF; }
.ff-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 10px; color: #C9CDD8; } .ff-check input { width: 16px; height: 16px; accent-color: #8B7CFF; }
body.fs-focusing #mdock, body.fs-focusing .job-card { display: none; }
.focus-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--accent-line); background: var(--accent-soft); font-size: 12px; max-width: 240px; }
.focus-pill[hidden] { display: none; }
.focus-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: ffPulse 2s ease-in-out infinite; flex-shrink: 0; }
.focus-pill.is-paused i { animation: none; opacity: .4; }
@keyframes ffPulse { 50% { opacity: .35; } }
.focus-pill b { font-variant-numeric: tabular-nums; font-weight: 600; }
.focus-pill span { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.focus-home { display: flex; flex-direction: column; gap: 14px; padding: 18px 0 8px; }
.focus-home h3 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
.fh-sub { font-size: 13.5px; color: var(--text-muted); margin-top: -8px; }
.fh-card { padding: 22px 24px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 12px; }
.fh-card.is-live { border-color: var(--accent); }
.fh-title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.fh-meta { font-size: 13px; color: var(--text-muted); margin-top: -8px; }
.fh-input { width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--field); color: inherit; font-size: 13.5px; outline: none; }
.fh-input.is-title { font-size: 16px; font-weight: 600; height: 48px; }
.fh-len { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-len button, .fh-len label { height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--border-color); font-size: 12.5px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.fh-len button b { color: var(--text-main); font-weight: 600; }
.fh-len .is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--text-main); }
.fh-len input { width: 74px; background: transparent; border: 0; outline: none; color: inherit; font-size: 12.5px; text-align: center; -moz-appearance: textfield; }
.fh-go { display: flex; flex-wrap: wrap; gap: 8px; } .fh-go .dash-act { height: 44px; padding: 0 20px; font-size: 14px; }
.fh-other { margin-top: 8px; } .fh-list { margin: 0 -8px; }
.fh-week { padding: 18px 20px; margin-top: 8px; }
.fh-stats { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--text-muted); } .fh-stats b { color: var(--text-main); font-weight: 600; font-size: 15px; margin-right: 4px; }
.fh-subjects { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 12px; color: var(--text-muted); } .fh-subjects b { color: var(--text-main); font-weight: 600; margin-right: 6px; }
.focus-classic { margin: 18px 0 40px; border-top: 1px solid var(--border-color); padding-top: 14px; }
.focus-classic summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--text-muted); list-style: none; padding: 6px 0; }
.focus-classic summary::-webkit-details-marker { display: none; }
.focus-classic summary::before { content: '+ '; } .focus-classic[open] summary::before { content: '– '; }
.focus-classic > div { margin-top: 12px; }
/* the big clock always stays inside its card: the digits take their size from the card's width, not from the window */
.focus-classic section { container-type: inline-size; overflow: hidden; }
.focus-classic .utility-clock { max-width: 100%; white-space: nowrap; line-height: 1; letter-spacing: -.03em; font-size: clamp(2.25rem, 10.5vw, 5rem); }
@supports (font-size: 1cqw) { .focus-classic .utility-clock { font-size: clamp(2.25rem, 21cqw, 7.5rem); } }

/* ---------- assignments ---------- */
.k-telemetry { display: none !important; }
.flow-head { padding: 18px 20px; }
.flow-head.hidden { display: none; }
.flow-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 28px; }
.flow-line { font-size: 16px; margin-top: 6px; letter-spacing: -.01em; } .flow-line b { font-weight: 650; } .flow-line .is-late { color: var(--risk); font-weight: 600; }
.horizon { display: flex; align-items: flex-end; gap: 5px; height: 62px; }
.horizon button { width: 18px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 9px; color: var(--text-muted); height: 100%; border-radius: 6px; padding: 0 1px 2px; transition: background .15s; }
.horizon button:hover { background: var(--tint); } .horizon button.is-open { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.horizon .is-crunch i { background: var(--risk); }
.horizon i { display: block; width: 100%; border-radius: 3px; background: var(--line-strong); }
.horizon .is-heavy i { background: var(--accent); } .horizon .is-today { color: var(--accent-ink); font-weight: 700; }
.flow-risk { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(214,69,69,.07); border: 1px solid rgba(214,69,69,.22); font-size: 12.5px; color: var(--text-muted); }
.flow-risk span { flex: 1 1 320px; line-height: 1.5; } .flow-risk b { display: block; color: var(--risk); font-weight: 600; }
.k-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: -4px 0 12px; }
.k-ready { border-style: solid; border-radius: var(--r-lg); background-image: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%); padding: 22px 24px; }
.k-ready-k { display: block; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); }
.k-ready b { font-size: 18px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.k-empty { font-size: 12.5px !important; line-height: 1.5; }
.k-card { border-radius: var(--r) !important; }
/* a day of the horizon, opened */
.flow-day { margin-top: 14px; padding: 14px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); }
.flow-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.flow-day-head b { font-size: 14px; font-weight: 600; } .flow-day-head p { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.flow-task { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border-radius: var(--r-sm); text-align: left; }
.flow-task:hover { background: var(--tint); } .flow-task b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-task small { display: block; font-size: 11.5px; color: var(--text-muted); } .flow-task em { margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.flow-over { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; padding: 11px 13px; border-radius: var(--r-sm); background: rgba(214,69,69,.07); border: 1px solid rgba(214,69,69,.22); font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.flow-over span { flex: 1 1 280px; } .flow-over b { color: var(--risk); font-weight: 600; }
.flow-over.is-ok { background: var(--tint); border-color: var(--border-color); }
.flow-day > .work-note { margin-top: 8px; }
.pl-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 99px; background: var(--line-strong); }
.pl-dot.is-p-high, .is-p-high > .pl-dot { background: var(--risk); box-shadow: 0 0 0 4px rgba(214,69,69,.14); } .pl-dot.is-p-medium, .is-p-medium > .pl-dot { background: #f59e0b; }
/* suggested changes */
.flow-changes { display: flex; flex-direction: column; gap: 6px; } .flow-changes .fs-label { margin-top: 8px; }
.flow-change { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); }
.flow-change > i, .flow-change > svg { flex-shrink: 0; color: var(--accent-ink); } .flow-change.is-move > svg { color: #f59e0b; }
.flow-change b { display: block; font-size: 13px; font-weight: 600; } .flow-change small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.flow-sum { margin-top: 14px; font-size: 13px; line-height: 1.55; }
/* the pressure line */
.pl-head { margin-bottom: 14px; }
.pl { position: relative; padding-left: 96px; }
.pl::before { content: ''; position: absolute; left: 100px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(var(--accent), var(--line-strong) 60%); }
.pl-now { position: relative; height: 20px; } .pl-now span { position: absolute; left: -96px; width: 84px; text-align: right; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.pl-now::after { content: ''; position: absolute; left: 0; top: 3px; width: 10px; height: 10px; border-radius: 99px; background: var(--accent); }
.pl-row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px 9px 22px; border-radius: var(--r-sm); text-align: left; }
.pl-row:hover { background: var(--tint); }
.pl-when { position: absolute; left: -96px; width: 84px; text-align: right; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; } .pl-when.is-near { color: var(--risk); font-weight: 600; }
.pl-row .pl-dot { position: absolute; left: 5px; width: var(--s, 10px); height: var(--s, 10px); transform: translateX(-50%); outline: 3px solid var(--bg-card); }
.pl-body { min-width: 0; flex: 1; } .pl-body b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pl-body small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
@media (max-width: 767px) { .pl { padding-left: 70px; } .pl::before { left: 74px; } .pl-when, .pl-now span { left: -70px; width: 60px; font-size: 10px; } .pl-row .k-prio { display: none; } }
/* cards on the board */
.k-board.hidden { display: none !important; }
.k-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .8; }
/* in a narrow column the labels of a card wrap instead of running into each other */
.k-card > div:first-child > span:first-child { flex-wrap: wrap; row-gap: 4px; } .k-card > div:first-child { gap: 6px; }
.k-card h3 + div { flex-wrap: wrap; row-gap: 2px; } .k-card h3 { overflow-wrap: anywhere; }
.k-state.is-weight { color: var(--accent-ink); background: var(--accent-soft); }
.k-card.is-p-high:not(.is-done) { border-left: 2px solid var(--risk) !important; }
/* the completion zone: quiet until a card comes near */
.k-zone { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; height: 0; margin-bottom: -12px; border-radius: 12px; border: 1.5px dashed transparent; opacity: 0; overflow: hidden; pointer-events: none;
  transition: height .26s cubic-bezier(.3,.8,.3,1), margin .26s, opacity .22s, border-color .22s, background .22s, box-shadow .22s, transform .22s; }
.k-zone.is-on { height: 10px; margin-bottom: 0; opacity: .45; border-color: rgba(16,185,129,.3); }
.k-zone.is-near { height: 52px; opacity: 1; border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.06); }
.k-zone.is-close { height: var(--slot, 150px); border-color: rgba(16,185,129,.7); background: rgba(16,185,129,.1); transform: scale(1.015); }
.k-zone.is-locked { border-style: solid; border-color: #10b981; background: rgba(16,185,129,.16); box-shadow: 0 0 0 4px rgba(16,185,129,.14); transform: scale(1.02); }
.k-zone-in { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #047857; opacity: 0; transform: translateY(4px); transition: opacity .22s, transform .22s; white-space: nowrap; }
.dark .k-zone-in { color: #6ee7b7; }
.k-zone.is-near .k-zone-in { opacity: 1; transform: none; }
.k-zone.is-locked .k-zone-in { opacity: 0; }                        /* the card is in the slot now and says it itself */
.k-card.is-seated { border-color: #10b981 !important; box-shadow: 0 0 0 1px #10b981, 0 18px 40px -18px rgba(16,185,129,.6) !important; }
.k-card.is-seated::after { content: '✓ Complete'; position: absolute; left: 50%; top: -12px; transform: translateX(-50%); padding: 3px 11px; border-radius: 99px; background: #10b981; color: #fff; font: 600 11px/1.4 Inter, system-ui, sans-serif; white-space: nowrap; box-shadow: 0 6px 16px -8px rgba(16,185,129,.9); animation: kCheck .18s cubic-bezier(.3,1.5,.5,1) both; }
.k-card.k-ghost-done::after { display: none; }
.k-zone-in i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 99px; font-style: normal; font-size: 13px; background: rgba(16,185,129,.2);
  transform: scale(calc(.9 + var(--p, 0) * .4)); filter: brightness(calc(.9 + var(--p, 0) * .45)); transition: transform .15s, background .2s, color .2s; }
.k-zone.is-close .k-zone-in i { background: #10b981; color: #fff; }
.k-zone.is-dock { position: fixed; z-index: 190; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); margin: 0; background: color-mix(in srgb, var(--bg-card) 82%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.k-zone.is-dock.is-on { height: 52px; opacity: .5; }
.k-zone.is-dock.is-near { height: 60px; opacity: 1; background: color-mix(in srgb, #10b981 9%, var(--bg-card)); }
.k-zone.is-dock.is-close { height: calc(var(--slot, 150px) + 12px); background: color-mix(in srgb, #10b981 14%, var(--bg-card)); }
/* the card that was dropped there */
.k-ghost-done { filter: saturate(.5); }
.k-ghost-check { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 99px; display: flex; align-items: center; justify-content: center; background: #10b981; color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 6px 18px -6px rgba(16,185,129,.8); animation: kCheck .2s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes kCheck { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.k-card.is-landing { animation: kLand .34s ease .3s both; }
@keyframes kLand { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .k-zone, .k-zone-in, .k-zone-in i { transition: none; } .k-card.is-landing, .k-ghost-check { animation: none; } }
.k-card.is-fresh { animation: kDone .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes kDone { 0% { transform: scale(.96); opacity: .3; box-shadow: 0 0 0 0 rgba(16,185,129,.5); } 45% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { transform: none; opacity: 1; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .k-card.is-fresh { animation: none; } }
.k-col[data-kcol="planned"] { --k-accent: #8b5cf6; }
.k-col[data-kcol="planned"] .k-col-title, .k-col[data-kcol="planned"] .k-count { color: #7c3aed; } .dark .k-col[data-kcol="planned"] .k-col-title, .dark .k-col[data-kcol="planned"] .k-count { color: #a78bfa; }
/* five stages side by side on a laptop screen; narrower windows scroll sideways, and the board follows a dragged card */
@media (min-width: 768px) { #assignment-board-view .k-col { flex: 1 1 0; min-width: 186px; } #assignment-board-view { gap: 14px; } #assignment-board-view .notebook-column { padding: 10px; } .k-card.planner-card { padding: 14px; } }   /* the card keeps its padding while it is dragged, so it fits its slot */
/* the task panel as a command centre */
.tp-due { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; } .tp-due b { font-weight: 600; }
.tp-bar { height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; margin-top: 10px; } .tp-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s; }
.tp-plan { margin-top: 12px; padding: 14px; border-radius: var(--r); border: 1px dashed var(--accent-line); background: var(--accent-soft); }
.tp-plan p { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 10px; line-height: 1.5; }
.tp-plan-row { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border-color); font-size: 13px; } .tp-plan-row b { flex-shrink: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tp-plan-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tp-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tp-links button { display: block; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); text-align: left; transition: border-color .15s, background .15s; }
.tp-links button:not(:disabled):hover { border-color: var(--accent-line); background: var(--surface-active); } .tp-links button:disabled { opacity: .7; cursor: default; }
.tp-links b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 4px; } .tp-links small { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.tp-flow { border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 16px 0; }
.tp-next { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px; border-radius: var(--r); border: 1px solid var(--accent-line); background-image: radial-gradient(120% 160% at 0% 0%, var(--accent-soft), transparent 60%); }
.tp-next b { display: block; font-size: 15px; font-weight: 600; margin-top: 4px; } .tp-next small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.tp-next-acts { display: flex; gap: 8px; }
.tp-risk { font-size: 12px; color: var(--risk); margin-top: 10px; line-height: 1.5; }
.tp-steps { display: flex; flex-direction: column; gap: 2px; }
.tp-step { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; font-size: 13px; }
.tp-step:hover { background: var(--hover); }
.tp-step > button:first-child { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-strong); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; }
.tp-step.is-done > button:first-child { background: var(--accent); border-color: var(--accent); } .tp-step.is-done > button:first-child::after { content: '✓'; }
.tp-step span { flex: 1; min-width: 0; } .tp-step.is-done span { color: var(--text-muted); text-decoration: line-through; }
.tp-step-x { font-size: 11px; color: var(--text-muted); opacity: 0; padding: 2px 6px; } .tp-step:hover .tp-step-x { opacity: 1; }
.tp-addstep { display: flex; gap: 8px; margin-top: 8px; }
.tp-addstep input { flex: 1; min-width: 0; height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--field); color: inherit; font-size: 12.5px; outline: none; }

/* ---------- schedule ---------- */
.tt-free { border: 1px dashed var(--line-strong); background: transparent; color: var(--text-muted); border-radius: var(--r-sm); }
.tt-free:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.dark .tt-free { color: var(--text-muted); } .dark .tt-free:hover { color: var(--accent-ink); }
.tt-free em { font-weight: 500; }
.tt-free.is-week { left: 6px; right: 6px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0; padding: 6px 8px; font-size: 10.5px; opacity: .55; }
.tt-free.is-week:hover { opacity: 1; }
.tt-free.is-week span { font-weight: 600; } .tt-free.is-week em { opacity: 1; font-size: 9.5px; }
.tt-ready { border-style: solid; border-radius: var(--r-lg); background-image: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%); padding: 20px 22px; }
.tt-ready .font-hand { font-size: 11px !important; font-weight: 600 !important; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink) !important; }
.tt-ready b { font-size: 17px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.free-list { margin: 4px -8px 0; }
.tt-dayhead em { font-style: normal; }

/* ---------- flashcards page ---------- */
.cards-page { padding: 18px 0 40px; }
.cards-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; }
.cards-head h3 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; margin-top: 6px; }
.cards-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.cards-grid > .dash-empty { grid-column: 1 / -1; }
.deck { padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.deck b { font-size: 15px; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- settings and plan ---------- */
.settings { padding: 18px 0 60px; display: flex; flex-direction: column; gap: 26px; }
.settings > h3 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
.settings section { display: flex; flex-direction: column; }
.settings section > .fs-label { padding-bottom: 8px; border-bottom: 1px solid var(--border-color); margin-bottom: 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border-color); }
.settings section > .set-row:last-child { border-bottom: 0; }
.set-row b { display: block; font-size: 13.5px; font-weight: 600; } .set-row small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; max-width: 52ch; }
.set-ctl { flex-shrink: 0; max-width: 55%; } .set-ctl select { min-width: 190px; }
.set-note { font-size: 12px; color: var(--text-muted); padding: 10px 0 2px; line-height: 1.5; }
.set-links { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 14px 0; font-size: 13px; } .set-links a { color: var(--accent-ink); font-weight: 500; } .set-links a:hover { text-decoration: underline; } .set-links span { color: var(--text-muted); }
.tog { width: 40px; height: 22px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background .2s; }
.tog i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s; }
.tog.is-on { background: var(--accent); } .tog.is-on i { transform: translateX(18px); }
.plan-card { margin-top: 12px; padding: 22px 24px; border-radius: var(--r-lg); border: 1px solid var(--border-color); background: var(--bg-card); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.plan-card.is-pro { border-color: var(--accent-line); background-image: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%); }
.plan-card h3 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.plan-card ul, .pro-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; } .plan-card li::before, .pro-list li::before { content: '✓'; color: var(--accent-ink); margin-right: 8px; font-weight: 700; }
.plan-meter { width: 100%; max-width: 380px; font-size: 12.5px; color: var(--text-muted); } .plan-meter b { color: var(--text-main); font-weight: 600; }
.plan-meter > i { display: block; height: 5px; border-radius: 5px; background: var(--tint); overflow: hidden; margin-top: 5px; } .plan-meter em { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.plan-note { font-size: 12px; color: var(--text-muted); line-height: 1.55; }
.plan-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-ends { font-size: 13px; color: var(--text-main); } .plan-ends b { font-weight: 650; }
.plan-choice { margin-top: 6px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text-main); } .plan-choice b { font-weight: 600; }
.plan-limit { padding: 16px; border-radius: var(--r); background: var(--tint); } .plan-limit b { display: block; font-size: 18px; font-weight: 650; line-height: 1.3; margin: 6px 0; } .plan-limit p { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.pro-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pro-prices > div { padding: 14px; border-radius: var(--r); border: 1px solid var(--border-color); } .pro-prices .is-best { border-color: var(--accent-line); background: var(--accent-soft); }
.pro-prices b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.03em; margin-top: 6px; } .pro-prices small { font-size: 11px; color: var(--text-muted); }
.pro-code summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent-ink); }
.sem-opt { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); text-align: left; margin-top: 8px; transition: border-color .15s; }
.sem-opt:hover { border-color: var(--accent-line); } .sem-opt > span:first-child { font-size: 20px; line-height: 1.2; }
.sem-opt b { display: block; font-size: 13.5px; font-weight: 600; } .sem-opt small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.sem-found { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; padding: 10px 12px; border-radius: var(--r-sm); background: var(--tint); margin-bottom: 10px; } .sem-found b { color: var(--text-main); } .sem-found a { color: var(--accent-ink); text-decoration: underline; }
.ob-sem { margin-top: 26px; font-size: 13px; } .ob-sem .grid { margin-top: 4px; } .ob-sem label span { font-size: 12px; }

/* ---------- sheets and the "+ New" chooser ---------- */
.fs-sheet { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: var(--r-lg); background: var(--surface-strong); border: 1px solid var(--border-color); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); padding: 22px; }
.fs-sheet.is-wide { max-width: 620px; }
.fs-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } .fs-sheet-head h3 { font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.fs-sheet-body { font-size: 12.5px; } .fs-sheet-lead { font-size: 13.5px; color: var(--text-muted); margin-bottom: 14px; }
.src-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.src-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); text-align: left; transition: border-color .15s, background .15s; }
.src-card:hover { border-color: var(--accent-line); background: var(--surface-active); }
.src-ico { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 4px; }
.src-card b { font-size: 14px; font-weight: 600; } .src-card small { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
#modal-ui > div { border-radius: var(--r-lg) !important; border: 1px solid var(--border-color); }

/* ---------- creating your notes ---------- */
.job-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.job-screen { position: relative; width: 100%; max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.job-orb { position: relative; width: 84px; height: 84px; margin-bottom: 26px; }
.job-orb i { position: absolute; inset: 0; border-radius: 50%; }
.job-orb i:first-child { background: radial-gradient(circle at 36% 30%, #A99DFF, #6F61E8 55%, #2B2390); animation: jobFloat 6s ease-in-out infinite; }
.job-orb i:last-child { inset: -46px; background: radial-gradient(circle, rgba(139,124,255,.28), transparent 62%); animation: ffBreath 7s ease-in-out infinite; z-index: -1; }
@keyframes jobFloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-6px) scale(1.03); } }
.job-kicker { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); } .job-kicker.is-done { color: var(--ok); }
.job-screen h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; line-height: 1.2; margin-top: 10px; max-width: 24ch; }
.job-sub { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.job-steps { display: flex; flex-direction: column; gap: 12px; margin: 28px 0 22px; text-align: left; font-size: 14px; }
.job-steps li { display: flex; align-items: center; gap: 12px; color: var(--text-muted); }
.job-steps li span { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.job-steps li.is-done { color: var(--text-main); } .job-steps li.is-done span { border-color: var(--ok); color: var(--ok); } .job-steps li.is-done span::after { content: '✓'; }
.job-steps li.is-active { color: var(--text-main); font-weight: 600; } .job-steps li.is-active span { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); } .job-steps li.is-active span::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: ffPulse 1.8s ease-in-out infinite; }
.job-bar { width: 100%; height: 3px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.job-bar i { display: block; width: 34%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: jobSlide 2.2s ease-in-out infinite; }
@keyframes jobSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(310%); } }
.job-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 14px; min-height: 2.6em; line-height: 1.5; max-width: 40ch; }
.job-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; } .job-acts .dash-act { height: 42px; padding: 0 18px; font-size: 13.5px; }
.job-foot { font-size: 11.5px; color: var(--text-muted); margin-top: 14px; }
.job-stats { display: flex; flex-direction: column; gap: 6px; margin: 22px 0 6px; font-size: 13.5px; color: var(--text-muted); } .job-stats b { color: var(--text-main); font-weight: 600; }
.job-card { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(320px, calc(100vw - 32px)); border-radius: var(--r); border: 1px solid var(--accent-line); background: var(--surface-strong); box-shadow: 0 24px 60px -24px rgba(0,0,0,.55); animation: fadeIn .25s ease-out; }
.job-card[hidden] { display: none; }
.job-card-main { display: block; width: 100%; padding: 14px 16px; text-align: left; border-radius: var(--r); }
.job-card-main .fs-label { color: var(--accent-ink); } .job-card-main.is-done .fs-label { color: var(--ok); }
.job-card-main b { display: block; font-size: 13.5px; font-weight: 600; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .job-card-main small { display: block; font-size: 11.5px; color: var(--text-muted); }
.job-card-main ul { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }
.job-card-main li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); } .job-card-main li span { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; }
.job-card-main li.is-done span { border-color: var(--ok); background: var(--ok); } .job-card-main li.is-active { color: var(--text-main); } .job-card-main li.is-active span { border-color: var(--accent); background: var(--accent); animation: ffPulse 1.8s ease-in-out infinite; }
.job-card-acts { display: flex; gap: 8px; margin-top: 12px; }
@media (max-width: 767px) { .job-card { right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- video import and the video workspace ---------- */
.vid-url { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; height: 46px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--field); }
.vid-url input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: inherit; font-size: 13px; }
.vid-url .dash-act { height: 32px; } .vid-url svg { color: var(--text-muted); flex-shrink: 0; }
.vid-found { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r); border: 1px solid var(--border-color); margin-top: 12px; }
.vid-found img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--tint); }
.vid-found .fs-label { color: var(--ok); } .vid-found b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; margin-top: 4px; } .vid-found small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.vid-q { font-size: 12.5px; font-weight: 600; margin: 16px 0 8px; }
.vid-opts { display: flex; flex-direction: column; gap: 6px; }
.vid-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); font-size: 13px; text-align: left; }
.vid-opt i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex-shrink: 0; }
.vid-opt.is-on { border-color: var(--accent-line); background: var(--accent-soft); } .vid-opt.is-on i { border: 5px solid var(--accent); }
.vid-depth { width: fit-content; }
.vid-go { width: 100%; height: 46px; justify-content: center; font-size: 14px; margin-top: 18px; }
.vid-probe { position: absolute; width: 2px; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; }
.lab-yt-link { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--border-color); font-size: 13px; color: var(--text-muted); text-align: left; transition: border-color .15s; }
.lab-yt-link:hover { border-color: var(--accent-line); color: var(--text-main); } .lab-yt-link span { flex: 1; } .lab-yt-link b { color: var(--text-main); font-weight: 600; } .lab-yt-link svg:first-child { color: var(--accent); }
.lab-src-body.is-video { padding: 14px; overflow-y: auto; }
.lab-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
.lab-video iframe, .lab-video > div { position: absolute; inset: 0; width: 100%; height: 100%; }
.lab-ch-title { margin: 18px 0 8px; }
.lab-chapters { display: flex; flex-direction: column; gap: 2px; }
.lab-chapters button { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: 13px; }
.lab-chapters button:hover { background: var(--hover); }
.lab-chapters time { font: 500 12px 'JetBrains Mono', ui-monospace, monospace; color: var(--accent-ink); flex-shrink: 0; }
.lab-ts { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin: 0 2px; border-radius: 6px; font: 600 11px 'JetBrains Mono', ui-monospace, monospace; color: var(--accent-ink); background: var(--accent-soft); vertical-align: 1px; white-space: nowrap; }
.lab-ts:hover { background: var(--accent); color: #fff; }
.lab-doc h2 .lab-ts, .lab-doc h3 .lab-ts { margin-left: 10px; vertical-align: middle; }
.lab-act.is-on { background: var(--accent-soft); color: var(--accent-ink); } .dark .lab-act.is-on { color: var(--accent-ink); }
.lab-dropzone { border-radius: var(--r-lg); border: 1.5px dashed var(--accent-line); background: var(--accent-soft); }

/* ---------- notes library ---------- */
.lib-head { margin-bottom: 22px; }
.lib-top { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.lib-top h3 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; margin-top: 6px; }
.lib-top .fh-sub { margin-top: 4px; }
.lib-quota { font-weight: 600; color: var(--accent-ink); } .lib-quota:hover { text-decoration: underline; }
.lib-continue { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; width: 100%; padding: 18px 20px; margin-top: 18px; text-align: left; border-radius: var(--r-lg); border-color: var(--accent-line); background-image: radial-gradient(120% 160% at 0% 0%, var(--accent-soft), transparent 55%); }
.lib-continue .fs-label { color: var(--accent-ink); grid-column: 1; } .lib-continue b { grid-column: 1; font-size: 18px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-continue small { grid-column: 1; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; } .lib-continue em { grid-column: 2; grid-row: 1 / span 3; font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.lib-row-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; }
.lib-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.lib-guide { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; text-align: left; min-width: 0; }
.lib-guide:hover { border-color: var(--accent-line); }
.lib-guide-kind { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; } .lib-guide-kind svg { color: var(--c); }
.lib-guide b { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lib-guide small { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-state { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); margin-top: 8px; }
.lib-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); } .lib-state.is-fresh i { background: var(--ok); } .lib-state.is-soon i { background: var(--warn); } .lib-state.is-need i { background: var(--accent); }
#notes-view-title { font-size: 15px !important; font-weight: 600 !important; }
#notes-tree-body { border-radius: var(--r) !important; box-shadow: none !important; }
.note-card .thumb { border-radius: var(--r) !important; }

/* ---------- note toolbar and Smart Ink ---------- */
#notes-editor { background: var(--canvas) !important; }
#notes-editor > div:first-child { background: var(--bg-sidebar) !important; border-color: var(--border-color) !important; }
.ne-tools .ne-tool { width: auto; padding: 0 10px; gap: 6px; font-size: 12px; font-weight: 500; }
.ne-tools .ne-tool span { display: inline; }
.ne-tool.has-ink::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink, #111827); box-shadow: 0 0 0 1px var(--line-strong); }
.ne-tool.is-active, .dark .ne-tool.is-active { background: var(--accent-soft); color: var(--accent-ink); }
#ne-add.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.ne-study { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); flex-shrink: 0; }
.ne-study:hover { background: var(--accent); color: #fff; }
.ne-optpop { position: absolute; top: 8px; left: 8px; z-index: 25; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: min(560px, calc(100% - 16px)); padding: 8px 10px; border-radius: var(--r); background: var(--surface-strong); border: 1px solid var(--border-color); box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); }
.ne-optpop.hidden { display: none; }
.ne-optlabel { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-right: 4px; }
.ink-sep { width: 1px; height: 18px; background: rgba(255,255,255,.18); margin: 0 4px; flex-shrink: 0; }
/* selection bar: editing on the first line, Smart Ink on the second */
#ne-selbar { flex-direction: column; align-items: stretch; gap: 0; max-width: min(620px, calc(100% - 16px)); }
.sel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.sel-row.is-ink { margin-top: 3px; padding-top: 3px; border-top: 1px solid rgba(255,255,255,.1); }
.sel-count { padding: 0 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; color: #9aa1b5; white-space: nowrap; }
.sel-row.is-ink .sel-count { color: #b4a9ff; }
.sel-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 8px; white-space: nowrap; color: inherit; }
.sel-btn:hover { background: rgba(255,255,255,.1); }
.sel-btn.is-keep { background: rgba(139,124,255,.22); color: #d9d3ff; }
.sel-btn.is-mark b { color: var(--c); font-size: 12px; line-height: 1; }
/* Smart Ink sheets */
.ink-edit { width: 100%; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); font: 14px/1.6 Inter, system-ui, sans-serif; resize: vertical; outline: none; }
.ink-edit:focus { border-color: var(--accent-line); }
.ink-math { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 96px; padding: 18px 14px; margin-bottom: 12px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); overflow-x: auto; }
.ink-math svg { max-width: 100%; height: auto; flex-shrink: 0; } .ink-math code { font: 13px 'JetBrains Mono', monospace; }
.ink-words { text-align: center; font-size: 12px; color: var(--text-muted); margin: -4px 0 12px; }
.ink-texline { display: block; } .ink-texline .fs-label { display: block; margin-bottom: 6px; }
#ink-tex { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
.ink-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.ink-keys button { min-width: 34px; height: 30px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--border-color); background: var(--bg-card); font-size: 13px; color: var(--text-main); }
.ink-keys button:hover { border-color: var(--accent-line); background: var(--surface-active); } .ink-keys.is-words button { font-size: 12px; }
.ink-solve-q { text-align: center; font-size: 16px; margin-bottom: 12px; }
.ink-steps { margin: 0 0 12px; padding-left: 20px; list-style: decimal; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.ink-answer { padding: 12px 14px; border-radius: var(--r-sm); background: var(--accent-soft); } .ink-answer p { font-size: 16px; margin-top: 4px; }
/* Study this page */
.study-opts { display: flex; flex-direction: column; gap: 8px; }
.study-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); text-align: left; transition: border-color .15s, background .15s; }
.study-opt:hover { border-color: var(--accent-line); background: var(--surface-active); }
.study-opt b { display: block; font-size: 13.5px; font-weight: 600; } .study-opt small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.study-opt .src-ico { flex-shrink: 0; }
.mark-line { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.mark-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.mark-chip b { color: var(--c); }
.study-tip { margin: -4px 0 14px; }
/* crop */
.crop-wrap { display: flex; justify-content: center; margin-bottom: 10px; }
.crop-stage { position: relative; display: inline-block; line-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; border-radius: 8px; overflow: hidden; }
.crop-stage img { display: block; max-width: 100%; max-height: 52vh; pointer-events: none; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(8,10,16,.58); cursor: move; }
.crop-box i { position: absolute; width: 22px; height: 22px; border: 3px solid #fff; }
.crop-box i[data-h="nw"] { left: -3px; top: -3px; border-right: 0; border-bottom: 0; cursor: nwse-resize; } .crop-box i[data-h="ne"] { right: -3px; top: -3px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.crop-box i[data-h="sw"] { left: -3px; bottom: -3px; border-right: 0; border-top: 0; cursor: nesw-resize; } .crop-box i[data-h="se"] { right: -3px; bottom: -3px; border-left: 0; border-top: 0; cursor: nwse-resize; }
/* colours you named */
.ne-legend { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.ne-legend.is-hint { font-size: 10.5px; color: var(--text-muted); }
.ne-legend button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--text-muted); border: 1px solid transparent; }
.ne-legend button i { width: 8px; height: 8px; border-radius: 99px; box-shadow: 0 0 0 1px rgba(148,163,184,.5); }
.ne-legend button.is-on { color: var(--text-main); border-color: var(--border-color); background: var(--bg-card); }
.ink-colour { display: flex; align-items: center; gap: 10px; } .ink-colour i { flex-shrink: 0; width: 28px; height: 28px; border-radius: 99px; box-shadow: 0 0 0 1px rgba(148,163,184,.5); }
/* Focus from a note */
.ne-study.note-focus { background: transparent; color: var(--text-muted); border: 1px solid var(--border-color); }
.ne-study.note-focus:hover { background: var(--surface-active); color: var(--text-main); }
.note-focus.is-live, .lab-act.note-focus.is-live { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-variant-numeric: tabular-nums; }
.note-focus.is-live.is-paused { opacity: .7; }
.note-focus.is-live span { display: inline !important; }
.nf-mins { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nf-mins button { display: flex; flex-direction: column; align-items: center; padding: 9px 0 7px; border-radius: 12px; border: 1px solid var(--border-color); font-size: 16px; font-weight: 600; line-height: 1.1; }
.nf-mins button small { font-size: 10px; font-weight: 500; color: var(--text-muted); } .nf-mins button:hover, .nf-mins button.is-on { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-ink); }
.ink-out { font-size: 14px; line-height: 1.65; max-height: 52vh; overflow-y: auto; } .ink-text { white-space: pre-wrap; }
.ink-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ink-cards { display: flex; flex-direction: column; gap: 8px; }
.ink-card { padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--border-color); font-size: 13px; line-height: 1.55; } .ink-card p + p { color: var(--text-muted); margin-top: 4px; } .ink-card .fs-label { display: block; margin-bottom: 2px; } .ink-card .fs-label + p { margin-bottom: 8px; color: var(--text-main); }
/* The note toolbar has to fit beside the sidebar: words on the tools only on a wide screen, icons everywhere else. */
@media (max-width: 1479px) { .ne-tools .ne-tool span { display: none; } .ne-tools .ne-tool { padding: 0 9px; } #notes-editor #ne-title { width: 8rem; } }
@media (max-width: 900px) { .ne-study span { display: none; } }
/* Tablets and small laptop windows (up to 1279px): an open note gets the whole width, the sidebar steps aside until you go back to the library. */
@media (min-width: 768px) and (max-width: 1279px) { body.fs-noteedit #sidebar { width: 0 !important; min-width: 0; border-right-width: 0 !important; overflow: hidden; } }
@media (min-width: 768px) and (max-width: 1279px) { #notes-editor #ne-focus-btn { display: none; } }      /* the note already has the whole width there */
@media (max-width: 900px) { #notes-editor #ne-title { width: 6rem; } }
/* A tablet on its side, or a small laptop (1024 to 1279px): the five columns narrow a little so all of them are on screen. */
@media (min-width: 1024px) and (max-width: 1279px) {
  #assignment-board-view { gap: 10px; } #assignment-board-view .k-col { min-width: 158px; } #assignment-board-view .notebook-column { padding: 8px; gap: 10px; }
  #assignment-board-view .k-card.planner-card { padding: 12px; } #assignment-board-view .k-card h3 { font-size: 13px; } #assignment-board-view .k-col-title { font-size: 11px; letter-spacing: .05em; }
}
/* Tablets held upright (768 to 1023px): five columns do not fit beside the sidebar, so the board becomes a list of stages,
   most urgent first, two cards across. Same order as on a phone. */
@media (min-width: 768px) and (max-width: 1023px) {
  #tab-kanban .k-board:not(.hidden) { display: flex !important; flex-direction: column !important; overflow: visible !important; gap: 24px !important; }
  #tab-kanban .k-col { flex: none !important; width: 100% !important; min-width: 0 !important; }
  #tab-kanban .k-col[data-kcol="duesoon"] { order: 1; } #tab-kanban .k-col[data-kcol="inprogress"] { order: 2; } #tab-kanban .k-col[data-kcol="planned"] { order: 3; }
  #tab-kanban .k-col[data-kcol="todo"] { order: 4; } #tab-kanban .k-col[data-kcol="completed"] { order: 5; }
  #tab-kanban .k-col:not(:has(.k-card)) { display: none; }
  #tab-kanban .notebook-column { min-height: 0 !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px !important; align-items: start; }
  #tab-kanban .notebook-column > .k-ph { min-height: 80px; }
  #tab-kanban .k-col[data-kcol="completed"] .k-card { opacity: .6; }
}

/* ---------- first-run setup in the new look ---------- */
.ob { background-image: radial-gradient(62vmax 62vmax at 8% -12%, rgba(99,102,241,.14), transparent 62%), radial-gradient(52vmax 52vmax at 104% 104%, rgba(168,85,247,.09), transparent 62%); }
.ob-brand .fs-word { font-size: 18px !important; }
.ob-h1 { font-weight: 650; }
.ob-primary { background: var(--accent); color: #fff; box-shadow: none; border-radius: 12px; } .dark .ob-primary { color: #0B0D12; }
.ob-primary:hover { background: var(--accent-strong); filter: none; }
.ob-card.is-on, .ob-seg button.is-on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ob-check.is-on { border-color: var(--accent-line); } .ob-check.is-on i { background: var(--accent); border-color: var(--accent); }
.ob-dots i.is-on { background: var(--accent); } .ob-link { color: var(--accent-ink); } .ob-rep.is-on { background: var(--accent); }
.imp-drop { border: 1.5px dashed var(--accent-line); background: var(--accent-soft); border-radius: var(--r); } .imp-spin { border-color: var(--accent-soft); border-top-color: var(--accent); }
.imp-item input { accent-color: var(--accent); }

/* ---------- phone ---------- */
@media (max-width: 900px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .dash-title { font-size: 22px; } .dash-stateline { font-size: 15.5px; } .move-t { font-size: 20px; }
  .dash-acts { width: 100%; } .dash-acts .dash-act { flex: 1 1 0; justify-content: center; padding: 0 8px; }
  #tab-dashboard .dash-act, #tab-dashboard .dash-acts .dash-act { height: 40px; min-height: 0; flex-direction: row; gap: 6px; padding: 0 12px; border-radius: var(--r-sm); font-size: 12.5px; }
  #tab-dashboard .dash-act svg { width: 16px !important; height: 16px !important; }
  #tab-dashboard .dash-act.is-primary { background: var(--accent); box-shadow: none; }
  #tab-dashboard .dash-start-acts { display: flex; flex-direction: column; } #tab-dashboard .dash-start-acts .dash-act { justify-content: flex-start; min-height: 44px; }
  #tab-dashboard .move-acts .dash-act { flex: 1 1 auto; justify-content: center; height: 44px; }
  .jr { grid-template-columns: 44px 12px minmax(0, 1fr); } .jr em { display: none; }
  .video-card form .dash-act { flex: 1 1 auto; justify-content: center; }
  .set-row { flex-direction: column; align-items: flex-start; gap: 10px; } .set-ctl { max-width: 100%; width: 100%; } .set-ctl select { width: 100%; }
  .src-grid { grid-template-columns: minmax(0, 1fr); } .pro-prices { grid-template-columns: 1fr; }
  .flow-top { align-items: flex-start; } .horizon { width: 100%; justify-content: space-between; } .horizon button { flex: 1; min-height: 44px; }
  .lib-continue { grid-template-columns: minmax(0, 1fr); } .lib-continue em { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .lab.source-open .lab-source { width: 100%; }
  .ff-ctl button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .ff-breath, .job-orb i, .job-bar i, .focus-pill i { animation: none !important; } }

.theme-switch.hidden { display: none; }
body[data-mood="empty"] .dash-cols, body[data-mood="empty"] #dash-work { display: none; }

/* ---------- timetable: a calm time canvas. Events are neutral cards with a thin course accent ---------- */
.tt-block { background: var(--surface-strong) !important; color: var(--text-main); border: 1px solid var(--border-color); border-radius: var(--r-sm); box-shadow: none; }
html:not(.dark) .tt-block { background: #fff !important; box-shadow: 0 1px 2px rgba(23,25,34,.06); }
.tt-block::before { background: var(--glow); left: 0; top: 0; bottom: 0; border-radius: 0; width: 3px; }
.tt-block::after { display: none; }
.tt-block:hover, .tt-block:focus-visible { box-shadow: 0 0 0 1px var(--glow) inset, 0 14px 28px -18px rgba(0,0,0,.5); transform: none; }
.tt-kind { color: var(--text-muted); font-weight: 600; letter-spacing: .09em; } .tt-kind svg { color: var(--glow); }
.tt-block b { color: var(--text-main); font-weight: 600; }
.tt-time { color: var(--text-muted); } .tt-pill { background: var(--tint); font-weight: 600; backdrop-filter: none; color: var(--text-main); }
.tt-task { color: var(--text-muted); }
.tt-block.is-past { opacity: .5; filter: none; }
.tt-block.is-once { outline: 0; border-style: dashed; border-color: var(--line-strong); }
.tt-block.is-dragging { box-shadow: 0 24px 44px -18px rgba(0,0,0,.6), 0 0 0 1px var(--glow) inset; }
.tt-dayhead.is-today .tt-date { background: var(--accent); box-shadow: none; color: #fff; } .dark .tt-dayhead.is-today .tt-date { color: #0B0D12; }
.tt-dayhead.is-selected { background: transparent; } .tt-dayhead.is-selected::after { background: var(--accent); }
.tt-col.is-today { background-color: var(--accent-soft); box-shadow: none; }
.tt-now { height: 1px; background: var(--accent); box-shadow: none; } .tt-now::before { width: 8px; height: 8px; top: -4px; left: -4px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tt-times .tt-now-label { background: var(--accent); box-shadow: none; } .dark .tt-times .tt-now-label { color: #0B0D12; }
.tt-sum.is-amber .dash-k, .tt-sum.is-amber .dash-v { color: var(--warn); } .tt-sum.is-indigo .dash-k, .tt-sum.is-indigo .dash-v { color: var(--accent-ink); }
.dash-k { font-family: 'Inter', system-ui, sans-serif; } .dash-v { font-family: 'Inter', system-ui, sans-serif; font-weight: 650; letter-spacing: -.03em; }
.tt-bars i { background: var(--accent) !important; opacity: .7; }

/* video notes: the lecture sits beside the notes, the library list steps aside while it plays */
@media (min-width: 900px) {
  .lab.video-open .lab-side { margin-left: -260px; opacity: 0; pointer-events: none; }
  .lab.video-open .lab-source { width: min(44%, 600px); }
}

/* ink colours stay visible on the dark options popover, even black ink */
.ne-optpop .ne-swatch { box-shadow: 0 0 0 1px rgba(148,163,184,.5); }
.ne-optpop .ne-swatch.is-active { border-color: var(--accent); }

/* =====================================================================
   DASHBOARD HIERARCHY: one decision, then today, then the week, then the rest
   ===================================================================== */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.jr-earlier { align-self: flex-start; margin: -4px 0 4px 4px; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; color: var(--text-muted); transition: background .15s, color .15s; }
.jr-earlier:hover { background: var(--tint); color: var(--text-main); }
.next-list { display: flex; flex-direction: column; gap: 2px; margin: -4px -8px 0; }
.next-row { display: flex; align-items: center; gap: 8px; border-radius: var(--r-sm); transition: background .15s; }
.next-row:hover { background: var(--tint); }
.next-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 9px 8px; text-align: left; }
.next-n { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font: 600 11px 'JetBrains Mono', ui-monospace, monospace; color: var(--text-muted); background: var(--tint); }
.next-main b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-main small { display: block; font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-go { flex-shrink: 0; margin-right: 8px; padding: 4px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--accent-ink); opacity: 0; transition: opacity .15s, background .15s; }
.next-row:hover .next-go, .next-go:focus-visible { opacity: 1; } .next-go:hover { background: var(--accent-soft); }
@media (hover: none) { .next-go { opacity: 1; } }
#dash-next .work-note { margin-top: 10px; }

.week-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 32px; align-items: end; }
.week-strip { display: flex; align-items: flex-end; gap: 8px; height: 62px; }
.week-strip span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.week-strip i { display: block; width: 100%; max-width: 28px; border-radius: 4px; background: var(--line-strong); }
.week-strip b { font-size: 10px; font-weight: 500; color: var(--text-muted); }
.week-strip em { font-style: normal; height: 14px; min-width: 14px; padding: 0 4px; border-radius: 7px; font: 600 9.5px/14px 'JetBrains Mono', ui-monospace, monospace; text-align: center; color: transparent; }
.week-strip em.has-due { color: var(--warn, #B7791F); background: rgba(217,150,40,.14); }
.week-strip .is-today i { background: var(--accent); } .week-strip .is-today b { color: var(--accent-ink); font-weight: 700; }
.week-strip .is-past em.has-due { opacity: .55; }
.week-days .work-note { margin-top: 6px; }
.week-sem { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color); font-size: 12.5px; color: var(--text-muted); }
.week-sem > span:first-child { flex-shrink: 0; } .week-sem b { color: var(--text-main); font-weight: 600; }
.week-sem.is-empty > span:first-child { flex: 1; }
.week-sembar { flex: 1; height: 4px; border-radius: 4px; background: var(--tint); overflow: hidden; min-width: 40px; }
.week-sembar i { display: block; height: 100%; border-radius: 4px; background: var(--accent); opacity: .7; }

/* everything else: there when you look for it, quiet when you do not */
.dash-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 32px; margin-top: 8px; padding-top: 22px; border-top: 1px solid var(--border-color); }
.dash-quiet { min-width: 0; } .dash-quiet.hidden { display: none; }
.dash-quiet > .fs-label { display: block; margin-bottom: 10px; }
.dash-quiet .since { font-size: 12.5px; color: var(--text-muted); gap: 6px; }
.dash-quiet .since span { width: 20px; height: 20px; font-size: 11px; }
.dash-tiles { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.dash-tiles .dash-tile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: none; text-align: left; border-radius: var(--r-sm); transition: background .15s; }
.dash-tiles .dash-tile:hover { background: var(--tint); }
.dash-tiles .dash-tile b { display: block; font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tiles .dash-tile small { display: block; font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-tiles .dash-ico { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--tint); flex-shrink: 0; }
.video-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.video-line input { flex: 1 1 180px; min-width: 0; height: 34px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border-color); background: var(--field); color: inherit; font-size: 12.5px; outline: none; }
.video-line input:focus { border-color: var(--accent-line); }
.video-line .dash-act { height: 34px; }

/* the loop in the sidebar: Plan → Learn → Focus */
.nav-group { margin: 14px 0 4px; padding: 0 14px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); opacity: .7; }
#sidebar.is-collapsed .nav-group { height: 1px; margin: 10px 12px; padding: 0; overflow: hidden; background: var(--border-color); color: transparent; }
/* the header keeps to what you act on: no clock, no battery */
.app-header .utility-pill { display: none; }

@media (max-width: 900px) {
  .dash-cols, .week-body { grid-template-columns: minmax(0, 1fr); }
  .week-body { align-items: stretch; }
}
@media (max-width: 767px) {
  .dash-more { grid-template-columns: minmax(0, 1fr); }
  .week-sem { flex-wrap: wrap; } .week-sembar { order: 3; flex-basis: 100%; }
}

/* empty states that teach: what this place is for, and the first step */
.teach-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.teach { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; border-radius: var(--r); border: 1px solid var(--border-color); background: var(--bg-card); text-align: left; transition: border-color .15s, transform .15s; }
.teach:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.teach b { font-size: 14px; font-weight: 600; margin-top: 6px; } .teach small { font-size: 12.5px; line-height: 1.5; color: var(--text-muted); }

/* phone: the library's folder list sits above the notes instead of squeezing them */
@media (max-width: 767px) {
  #notes-library { flex-direction: column; gap: 12px; }
  #notes-tree { width: 100%; } #notes-tree > .sticky { position: static; }
  .lib-top h3 { font-size: 22px; }
  .teach-grid { grid-template-columns: minmax(0, 1fr); }
  .next-go { opacity: 1; }
}
.cards-head h3, .lib-top h3 { line-height: 1.2; }
.cards-head .fh-sub { margin-top: 6px; }
/* phone: the last line of a page must clear the tab bar */
@media (max-width: 767px) {
  .dash, .cards-page, #settings-root, #tab-focus-tools, #tab-kanban, #tab-timetable, #notes-library { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
}

/* the page itself has the app's colour, so nothing white shows around it (phone browser bars, overscroll) */
html { background-color: #F5F6FA; color-scheme: light; } html.dark { background-color: #0B0D12; color-scheme: dark; }

.sem-found.is-estimate { border-left: 3px solid var(--warn); }

/* focus → break → focus */
.ff-chain { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; font-size: 12px; color: #6F7482; }
.ff-chain span { padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); }
.ff-chain span.is-done { color: #B3A9FF; border-color: rgba(139,124,255,.4); }
.ff-chain span.is-now { color: #0B0D12; background: #34D399; border-color: transparent; font-weight: 600; }
.ff-chain i { width: 18px; height: 1px; background: rgba(255,255,255,.18); }
.ff-upnext { margin-top: 28px; font-size: 13px; color: #9aa0af; } .ff-upnext span { margin-right: 8px; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #6F7482; } .ff-upnext b { color: #ECEEF4; font-weight: 600; }
.ff-break .ff-next { margin-top: 10px; }
.ff-breath.is-rest { filter: hue-rotate(-70deg); }
.fh-rhythm { font-size: 12.5px; color: var(--text-muted); } .fh-rhythm b { color: var(--text-main); font-weight: 600; }

/* iPhone and iPad Safari give date and time fields a width of their own, so in a two-column form they
   spill over the field beside them. Without the native look they follow the form like every other field. */
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; box-sizing: border-box; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; }
/* On iPhone and iPad an empty date field is a blank box; say what it is for. (Other browsers show dd/mm/yyyy themselves.) */
@supports (-webkit-touch-callout: none) {
  input[type="date"]:required:invalid::before { content: 'Choose a date'; color: #8b90a0; white-space: nowrap; }
}

/* ---------- signing in ---------- */
/* a first visit, or a sign-in in progress: the page's own background until the setup or the workspace is ready, never a dashboard that is about to be replaced */
html.fs-cover body > *:not(#onboard):not(#fs-moment):not(#cos-toast) { visibility: hidden !important; }
html.fs-cover body { background: var(--bg-app) !important; }
/* Google's button, as Google asks for it: its own mark, a plain surface, a quiet outline */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #747775; background: #fff; color: #1F1F1F; font: 500 14px/20px 'Roboto', 'Inter', system-ui, sans-serif; white-space: nowrap; transition: background-color .15s, box-shadow .15s; }
.g-btn:hover { background: #F7F8FA; box-shadow: 0 1px 3px rgba(60,64,67,.25); } .g-btn:disabled { opacity: .6; pointer-events: none; }
.dark .g-btn { background: #131314; border-color: #8E918F; color: #E3E3E3; } .dark .g-btn:hover { background: #1E1F20; }
.g-btn svg { flex-shrink: 0; }
.ob-signin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 30px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border-color); background: var(--bg-card); }
.ob-signin > div { flex: 1 1 240px; min-width: 0; } .ob-signin b { display: block; font-size: 14px; font-weight: 650; } .ob-signin small { display: block; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); margin-top: 2px; }
.ob-signed { margin-bottom: 26px; font-size: 13px; color: var(--text-muted); }
.fs-signin-go { display: flex; justify-content: center; margin-top: 18px; } .fs-signin-go .g-btn { height: 44px; padding: 0 22px; }
.set-row .g-btn { height: 36px; }
@media (max-width: 720px) { .ob-signin .g-btn, .fs-signin-go .g-btn { width: 100%; } }

