/* Kernuli: a calm, Notion-like page. Warm grays, hairline borders, small radii, lots of white.
   Colour comes from soft abstract covers (see "covers" below), the course colours and emoji, not from chrome.
   Warm near-black is the main colour; Notion blue for focus, links and progress; red for today and overdue. */
:root {
  --canvas: #ffffff;
  --card: #ffffff;
  --inset: #f7f7f5;
  --line: #e9e9e7;
  --fill: #efefed;
  --fill-2: #f5f5f3;
  --ink: #37352f;
  --ink-2: #787774;
  --ink-3: #9b9a97;
  --sep: #ededec;
  --sep-2: #e3e2e0;
  --main: #37352f;
  --on-main: #ffffff;
  --accent: #2383e2;
  --accent-soft: rgba(35, 131, 226, .14);
  --red: #e0483e;
  --today: #eb5757;
  --amber: #c27a0e;
  --heat-0: #f1f1ef; --heat-1: #d3e5f6; --heat-2: #a3c9ef; --heat-3: #5fa3e6; --heat-4: #2383e2;

  --c-moss: #3f9d6b; --c-clay: #e0773f; --c-ink: #4b6fdc;
  --c-plum: #a05cc4; --c-ochre: #cf9a12; --c-sea: #1f9fa5;

  /* aliases the older class names expect */
  --bg: var(--canvas); --side: var(--canvas); --raise: var(--card); --hover: var(--fill-2); --press: var(--fill);
  --rule: var(--sep); --rule-2: var(--sep-2); --focus: var(--accent); --focus-soft: var(--accent-soft);

  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Hebrew", "Segoe UI", "Arial Hebrew", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --r-w: 12px;   /* widget */
  --r-c: 10px;   /* card / list */
  --r-i: 6px;    /* inputs, buttons, small things */
  --shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(15, 15, 15, .02);
  --float: 0 0 0 1px rgba(15, 15, 15, .05), 0 3px 6px rgba(15, 15, 15, .08), 0 9px 24px rgba(15, 15, 15, .14);
  --glass: rgba(255, 255, 255, .9);
  color-scheme: light;
}

[data-color="moss"]  { --c: var(--c-moss); }
[data-color="clay"]  { --c: var(--c-clay); }
[data-color="ink"]   { --c: var(--c-ink); }
[data-color="plum"]  { --c: var(--c-plum); }
[data-color="ochre"] { --c: var(--c-ochre); }
[data-color="sea"]   { --c: var(--c-sea); }

*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--ink); font: 14px/1.45 var(--sans); letter-spacing: -.005em; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 1px; border-radius: 8px; }
h1, h2, h3 { letter-spacing: -.02em; }
.mono { font-variant-numeric: tabular-nums; font-size: inherit; }   /* numbers: tabular figures, not a code font */
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.em { font-family: var(--emoji); font-size: 14px; line-height: 1; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
input[type="email"], input[type="time"], input[type="date"], input[type="number"] { direction: ltr; text-align: end; }

/* colour tab */
.tab { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ink-3)); flex: none; display: inline-block; }

/* emoji tiles: a soft neutral rounded square; the emoji brings the colour */
.tile, .ctile { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; font-family: var(--emoji); font-size: 15px; line-height: 1;
  background: var(--inset); border: 0; padding: 0; }
.ctile.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 24px; }
.ctile.xl { width: 78px; height: 78px; border-radius: 12px; font-size: 56px; cursor: pointer; transition: background .15s; background: none; }
.ctile.xl:hover { background: var(--fill-2); }

/* ── controls ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r-i); border: 0; background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--sep-2);
  font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .15s, transform .1s, opacity .15s;
}
.btn:hover { background: var(--fill-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: none; }
.btn.primary:hover { background: #0077d4; }
.btn.danger { background: var(--red); color: #fff; box-shadow: none; }
.btn.ghost { background: none; color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { color: var(--ink); }
.btn.ghost:hover { background: var(--fill-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn.wide { width: 100%; height: 40px; font-size: 15px; }
.kbd { font: 500 11px var(--sans); color: var(--ink-3); background: var(--fill-2); border-radius: 5px; padding: 1px 5px; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13.5px; cursor: pointer; justify-self: start; }
.link-btn:hover { text-decoration: underline; }
.link { color: var(--accent); }
.link:hover { text-decoration: underline; }

.field { display: grid; gap: 6px; }
.field > label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.input, .textarea {
  width: 100%; height: 36px; padding: 0 10px; background: var(--fill-2);
  border: 1px solid var(--line); border-radius: var(--r-i); outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; }
.hint { font-size: 12px; color: var(--ink-3); }
.select { appearance: none; padding-inline-end: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 11px center; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid .full { grid-column: 1 / -1; }
.row-2 { display: grid; grid-template-columns: 1fr 130px; gap: 10px; }

/* segmented control */
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill); border-radius: 8px; width: max-content; }
.seg button { border: 0; background: none; height: 28px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--ink); border-radius: 6px; transition: background .15s; }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .04); font-weight: 600; }
.filters { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill); border-radius: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { border: 0; background: none; height: 28px; padding: 0 12px; border-radius: 6px; color: var(--ink); font-size: 13px; font-weight: 500; display: flex; gap: 6px; align-items: center; white-space: nowrap; flex: none; }
.filters button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.filters .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 500; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; background: var(--fill-2); border-radius: 8px; padding: 6px 12px; font-size: 13.5px; color: var(--ink); white-space: nowrap; flex: none; }
.chip:hover { background: var(--fill); }
.chip.sm { padding: 4px 11px; font-size: 12.5px; cursor: pointer; }
.chip.on { background: var(--main); color: var(--on-main); }
.pill { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 4px; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--c-moss) 16%, transparent); color: var(--c-moss); }

/* switch, iOS proportions */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 44px; height: 26px; border-radius: 999px; background: var(--fill); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--main); }
.switch input:checked + span::after { background: var(--on-main); }
.switch input:checked + span::after { transform: translateX(-18px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent-soft); outline-offset: 2px; }

/* checkbox: a round Reminders-style check */
.check {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--ink-3); background: none;
  display: grid; place-items: center; padding: 0; flex: none; transition: background .15s, border-color .15s;
}
.check:hover { border-color: var(--c, var(--ink)); }
.check svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 2.6; fill: none; stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .22s .04s var(--ease); }
.check.on { background: var(--c, var(--main)); border-color: var(--c, var(--main)); }
.check.on svg { stroke: var(--card); }
.check.on svg { stroke-dashoffset: 0; }
.check.pop { animation: pop .3s var(--ease); }
@keyframes pop { 50% { transform: scale(.8); } }

/* ── brand ── */
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; letter-spacing: -.02em; }
.brand-mark { width: 26px; height: 26px; flex: none; display: block; }

/* ── shell ── */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--inset); display: flex; flex-direction: column; padding: 12px 8px 10px; border-inline-end: 1px solid var(--line); }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px 8px; padding-inline: 8px 2px; }
.side-top .btn { color: var(--ink-2); }
.nav-main { display: grid; gap: 1px; }
.nav-item { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px; border-radius: 6px; color: var(--ink-2); font-size: 14px; font-weight: 500; width: 100%; border: 0; background: none; text-align: start; transition: background .12s; }
.nav-item:hover { background: rgba(55, 53, 47, .06); }
.nav-item.on { background: rgba(55, 53, 47, .08); color: var(--ink); font-weight: 600; }
.nav-item .tile, .nav-item .ctile { background: transparent; width: 20px; height: 20px; font-size: 15px; }
.nav-item .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item .count { margin-inline-start: auto; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-section { display: flex; align-items: center; justify-content: space-between; padding: 18px 8px 4px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.nav-section .btn { color: var(--ink-2); }
.nav-courses { flex: 1; overflow-y: auto; display: grid; gap: 1px; align-content: start; }
.nav-empty { padding: 4px 8px; color: var(--ink-3); font-size: 13px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin-top: 8px; border: 0; background: none; border-radius: 6px; text-align: start; width: 100%; transition: background .12s; }
.user-chip:hover { background: var(--fill-2); }
.user-chip > svg.i { color: var(--ink-3); }
.avatar { width: 26px; height: 26px; border-radius: 6px; background: var(--main); color: var(--on-main); display: grid; place-items: center; font: 600 11.5px var(--sans); flex: none; }
.user-chip .who { min-width: 0; flex: 1; line-height: 1.3; display: grid; }
.user-chip .name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .email { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }

.main { min-width: 0; }
.topbar-mobile, .tabbar, .nav-scrim { display: none; }
.view { max-width: 1080px; margin: 0 auto; padding: 40px 56px 96px; }

/* ── headers ── */
.hero, .page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.hero h1, .page-head h1 { font-size: 38px; line-height: 1.2; font-weight: 700; margin: 0; display: flex; align-items: baseline; gap: 10px; }
.page-head h1 .mono { font-size: 17px; color: var(--ink-3); font-weight: 500; }
.eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 500; color: var(--ink-3); }
.greet { color: var(--ink-2); font-size: 14px; margin: 4px 0 0; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 18px; color: var(--ink-2); font-size: 14px; }
.facts b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.facts .bad b { color: var(--red); }

/* ── cards ── */
.card, .setup, .brief-wrap, .conn { background: var(--card); border-radius: var(--r-w); box-shadow: var(--shadow); padding: 18px 20px; margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.card-head h2 .faint { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.count-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--today); color: #fff; font-size: 12.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.seg-nav { display: flex; align-items: center; gap: 2px; }

.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 10px; }
.section-head h2 { font-size: 20px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head .mono, .section-head .faint { font-size: 13.5px; color: var(--ink-2); }

/* ── widgets ── */
.widgets { display: grid; grid-template-columns: 1.35fr 1fr 1fr 1.45fr; gap: 16px; }
.w { background: var(--card); border-radius: var(--r-w); box-shadow: var(--shadow); padding: 16px 18px; min-height: 164px; display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; overflow: hidden; }
a.w { transition: transform .2s var(--ease); }
a.w:hover { transform: translateY(-2px); }
.w-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.w-label .tile { width: 24px; height: 24px; border-radius: 7px; font-size: 13px; }
.w-label b { color: var(--ink); }
.w-big { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: auto; }
.w-big.sm { font-size: 30px; margin: 0; display: block; }
.w-sub { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.w-sub.bad { color: var(--red); }

.w-today { flex-direction: row; gap: 16px; }
.w-date { display: flex; flex-direction: column; flex: none; }
.w-date span { font-size: 12px; font-weight: 700; color: var(--today); }
.w-date b { font-size: 42px; line-height: 1.05; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.w-events { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; padding-top: 2px; }
.ev { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; cursor: pointer; border-radius: 6px; }
.ev .em { font-size: 14px; line-height: 1.3; }
.ev b { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev span { display: block; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev.past { opacity: .45; }
.ev.due-ev b { color: var(--red); }
.w-quiet { margin: 0; color: var(--ink-3); font-size: 13px; }
.w-more { margin: 0; color: var(--ink-2); font-size: 12px; font-weight: 600; }

.ring-row { display: flex; align-items: center; gap: 14px; margin-top: auto; }
.ring { width: 72px; height: 72px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke: var(--fill); stroke-width: 9; }
.ring .ring-v { stroke: var(--heat-4); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-row .w-sub { display: block; margin-top: 4px; }

.w-activity .faint { font-weight: 500; }
.w-activity .heat { margin-top: auto; }

/* heatmap */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; width: 100%; aspect-ratio: 18 / 7.4; max-height: 104px; }
.heat i { border-radius: 3px; background: var(--heat-0); display: block; }
.heat i[data-l="1"] { background: var(--heat-1); } .heat i[data-l="2"] { background: var(--heat-2); }
.heat i[data-l="3"] { background: var(--heat-3); } .heat i[data-l="4"] { background: var(--heat-4); }
.heat i.today { box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px var(--today); }
.heat i.future { visibility: hidden; }
.activity { display: grid; grid-template-columns: minmax(0, 360px) auto; gap: 28px; align-items: center; }
.activity dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 6px 18px; font-size: 14px; }
.activity dt { color: var(--ink-2); }
.activity dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: end; }

/* ── setup checklist ── */
.setup { padding: 6px 0; }
.setup-head { display: flex; justify-content: space-between; padding: 10px 20px 8px; font-size: 15px; }
.setup-head b { font-weight: 700; }
.setup-step { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 20px; border: 0; background: none; text-align: start; font-size: 14.5px; position: relative; }
.setup-step + .setup-step::before { content: ""; position: absolute; top: 0; inset-inline: 52px 0; border-top: 1px solid var(--sep); }
.setup-step:hover:not(:disabled) { background: var(--fill-2); }
.setup-step svg.i { margin-inline-start: auto; color: var(--ink-3); }
.setup-step.done { color: var(--ink-3); cursor: default; }
.setup-step .check { pointer-events: none; }
.setup-step .mono { display: none; }

/* ── agenda items ── */
.item { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; padding: 7px 6px; border-radius: 10px; cursor: pointer; }
.item:hover { background: var(--fill-2); }
.item .check { margin-top: 0; width: 18px; height: 18px; }
.item .t { font-size: 13px; line-height: 1.35; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.item .s { font-size: 11.5px; line-height: 1.4; color: var(--c); font-weight: 600; margin-top: 2px; display: flex; gap: 6px; align-items: center; overflow: hidden; white-space: nowrap; }
.item .s .faint { color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.item.done .t { color: var(--ink-3); text-decoration: line-through; }
.item.high .t::before { content: "!"; color: var(--red); font-weight: 800; margin-inline-end: 4px; }
.overdue-box { padding-bottom: 10px; }
.overdue-box .item { grid-template-columns: 20px 1fr auto; align-items: center; padding: 9px 6px; }
.overdue-box .item + .item { border-top: 1px solid var(--sep); border-radius: 0; }
.overdue-box .item .t { -webkit-line-clamp: 1; font-size: 14px; }

/* ── week ── */
.week-card { padding: 16px 12px 12px; }
.week-card .card-head { padding: 0 8px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { min-height: 210px; display: flex; flex-direction: column; min-width: 0; border-radius: 14px; }
.day.weekend .day-body { opacity: .85; }
.day.today { background: var(--inset); }
.day-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 6px; }
.day-head .dn { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.day-head .dd { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.day.today .day-head .dn { color: var(--today); }
.day.today .day-head .dd { background: var(--today); color: #fff; }
.day.past .item:not(.done) .t { color: var(--red); }
.day-body { padding: 2px 4px 6px; display: grid; gap: 3px; align-content: start; flex: 1; }
.day-empty { color: var(--ink-3); font-size: 12px; padding: 6px; }

/* timetable slots: tinted blocks like a calendar event */
.slot { display: grid; gap: 1px; padding: 7px 9px; border-radius: 10px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border-inline-start: 3px solid var(--c); cursor: pointer; font-size: 12px; line-height: 1.35; transition: background .12s; }
.slot:hover { background: color-mix(in srgb, var(--c) 15%, var(--card)); }
.slot .mono { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.slot-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.slot-t .em { font-size: 12px; }
.slot-l { color: var(--ink-2); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week.tall { background: var(--card); border-radius: var(--r-w); box-shadow: var(--shadow); padding: 10px; }
.week.tall .day { min-height: 300px; }

/* ── progress ── */
.prog { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; font-weight: 500; }
.bar { flex: 1; height: 6px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 999px; transition: width .5s var(--ease); }

/* ── course gallery ── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gcard { display: flex; flex-direction: column; gap: 12px; padding: 0 16px 16px; border-radius: var(--r-w); background: var(--card); box-shadow: var(--shadow); border: 0; text-align: start; transition: box-shadow .2s var(--ease), background .2s; min-height: 196px; overflow: hidden; }
.gcover { height: 92px; margin: 0 -16px; position: relative; }
.gcover .art { position: absolute; inset: 0; }
.gcover .art i { width: calc(var(--s) * 1.25); filter: blur(16px) saturate(1.2); }
.gcard .gtop { margin-top: -26px; position: relative; align-items: flex-end; }
.gcard .gtop .ctile.lg { background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.gcard:hover { box-shadow: var(--float); }
.gtop { display: flex; align-items: flex-start; justify-content: space-between; }
.gpct { font-size: 20px; font-weight: 600; letter-spacing: -.03em; color: var(--c); font-variant-numeric: tabular-nums; }
.gbody { display: grid; gap: 10px; margin-top: auto; }
.gcode { font-size: 12px; color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.gtitle { font-weight: 700; font-size: 16.5px; line-height: 1.25; letter-spacing: -.015em; }
.gmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.gmeta .due { font-size: 12.5px; }
.gcard.new { align-items: center; justify-content: center; flex-direction: row; gap: 8px; background: none; box-shadow: none; border: 1px dashed var(--sep-2); color: var(--ink-2); font-size: 15px; font-weight: 600; cursor: pointer; }
.gcard.new:hover { background: var(--fill-2); color: var(--ink); transform: none; box-shadow: none; }

/* ── grouped lists (tables) ── */
.otable, .table { background: var(--card); border-radius: var(--r-c); box-shadow: var(--shadow); overflow: hidden; }
.orow { display: grid; gap: 14px; align-items: center; min-height: 48px; padding: 0 16px; font-size: 14px; cursor: pointer; position: relative; }
.orow + .orow::before, .otable > .add-row::before, .otable > .empty + .add-row::before { content: ""; position: absolute; top: 0; inset-inline: 16px 0; border-top: 1px solid var(--sep); }
.orow:hover { background: var(--fill-2); }
.orow.th { min-height: 36px; font-size: 12px; color: var(--ink-2); font-weight: 600; cursor: default; background: var(--inset); }
.orow.th:hover { background: var(--inset); }
.orow.th + .orow::before { display: none; }
.orow .r, .orow.th .r { text-align: end; }
.mrow { grid-template-columns: 20px minmax(0, 2fr) 84px 110px minmax(0, 1fr) 48px 84px; }
.mrow .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mrow.done .title { color: var(--ink-3); text-decoration: line-through; }
.mrow .mt { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cref { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); font-weight: 500; max-width: 100%; }
.cref:hover { color: var(--ink); }
.add-row { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; color: var(--accent); width: 100%; border: 0; background: none; font-size: 14px; font-weight: 500; text-align: start; position: relative; }
.add-row:hover { background: var(--fill-2); }
.empty { color: var(--ink-2); font-size: 14px; padding: 28px 16px; text-align: center; }
.empty b { color: var(--ink); font-weight: 600; display: block; margin-bottom: 4px; font-size: 15px; }
#modules > .empty, .view > .empty { background: var(--card); border-radius: var(--r-c); box-shadow: var(--shadow); }

.kind { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.kind.k-exam { color: var(--red); }
.kind.k-assignment { color: var(--c-ink); }
.kind.k-reading { color: var(--c-sea); }
.kind.k-project { color: var(--c-plum); }
.prio { font-size: 12px; font-weight: 600; }
.prio.high { color: var(--red); }
.prio.low { color: var(--ink-3); }
.due { font-size: 13px; color: var(--ink-2); text-align: end; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 500; }
.due.overdue { color: var(--red); font-weight: 600; }
.due.today { color: var(--amber); font-weight: 600; }

/* ── avatars ── */
.av { display: inline-grid; place-items: center; border-radius: 50%; flex: none; background: var(--fill); color: var(--ink-2); font-weight: 600; line-height: 1; letter-spacing: 0; vertical-align: middle; }
.pname { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.mission .mt .av, .mrow .mt .av { margin-inline-start: 2px; }
.item .s .av { margin-inline-end: 2px; }

/* ── course page ── */
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--accent); margin-bottom: 18px; }
.crumbs svg.i { width: 14px; height: 14px; color: var(--ink-3); }
.crumbs span { color: var(--ink-2); }
.crumbs a:hover { text-decoration: underline; }
.course-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding: 14px 0 18px; }
.course-head .line { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.course-head h1 { font-size: 38px; line-height: 1.2; font-weight: 700; margin: 4px 0 6px; }
.course-head p { margin: 0; color: var(--ink-2); max-width: 640px; white-space: pre-line; }   /* an imported description: about · grading · good to know, a line each */
.course-head p a { color: var(--accent); }
.course-days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.course-day { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 0; border-radius: var(--r-i); background: var(--fill-2); color: var(--ink-2); font-size: 12.5px; font-variant-numeric: tabular-nums; transition: background .15s; }
.course-day:hover { background: var(--fill); }
.course-day b { color: var(--ink); font-weight: 600; }
.course-day span { color: var(--ink-3); }
.head-side { display: flex; align-items: center; gap: 16px; }
.head-side .prog { width: 200px; }
.avg { display: grid; text-align: end; font-size: 12px; line-height: 1.2; color: var(--ink-2); }
.avg b { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; gap: 6px; align-items: center; height: 36px; padding: 0 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tabs .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 12px; flex-wrap: wrap; }
.toolbar > div:last-child { display: flex; gap: 6px; }

/* modules: one card each */
.module { background: var(--card); border-radius: var(--r-c); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.module-head { display: grid; grid-template-columns: 24px 26px minmax(0, 1fr) auto 30px; gap: 6px; align-items: center; height: 54px; padding: 0 10px 0 12px; }
.chev { border: 0; background: none; color: var(--ink-3); display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 6px; transition: transform .2s var(--ease); }
.chev:hover { color: var(--ink); background: var(--fill-2); }
.module.collapsed .chev { transform: rotate(90deg); }
.module-head .no { font-size: 13px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.module-title { border: 0; background: none; outline: none; font-weight: 700; font-size: 16px; letter-spacing: -.015em; padding: 4px 6px; margin-inline-start: -6px; border-radius: 7px; width: 100%; min-width: 0; }
.module-title:hover { background: var(--fill-2); }
.module-title:focus { background: var(--card); box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-soft); }
.module-head .prog { width: 140px; }
.module.complete .module-head .prog { color: var(--c); font-weight: 600; }
.module-body { padding: 0 0 4px; }
.module.collapsed .module-body { display: none; }

.mission { display: grid; grid-template-columns: 20px minmax(0, 1fr) 84px 44px 84px 30px; gap: 10px; align-items: center; min-height: 46px; padding: 0 10px 0 16px; cursor: pointer; position: relative; }
.mission::before { content: ""; position: absolute; top: 0; inset-inline: 46px 0; border-top: 1px solid var(--sep); }
.mission:hover { background: var(--fill-2); }
.mission .mt { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mission .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.mission.done .title { color: var(--ink-3); text-decoration: line-through; }
.mission.done .due, .mission.done .prio, .mission.done .kind { color: var(--ink-3); }
.mission .note-ind { color: var(--ink-3); display: inline-flex; }
.mission .note-ind svg.i { width: 14px; height: 14px; }
.mission .del { opacity: 0; color: var(--red); }
.mission:hover .del, .mission:focus-within .del { opacity: 1; }
.mission.leaving { opacity: 0; transition: opacity .2s; }
.mission.entering { animation: enter .7s var(--ease); }
@keyframes enter { from { background: var(--accent-soft); } }

.done-divider { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; cursor: pointer; text-align: start; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2); position: relative; }
.done-divider::before { content: ""; position: absolute; top: 0; inset-inline: 46px 0; border-top: 1px solid var(--sep); }
.done-divider:hover { color: var(--ink); }
.done-divider svg.i { width: 13px; height: 13px; }

.add-mission { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: center; height: 46px; padding: 0 16px; color: var(--accent); position: relative; }
.add-mission::before { content: ""; position: absolute; top: 0; inset-inline: 46px 0; border-top: 1px solid var(--sep); }
.module-body > .add-mission:first-child::before { display: none; }
.add-mission .faint { color: var(--accent); }
.add-mission input { border: 0; outline: none; background: none; height: 100%; width: 100%; color: var(--ink); font-size: 14.5px; }
.add-mission input::placeholder { color: var(--ink-3); }
.add-preview { display: flex; gap: 12px; padding: 0 16px 10px 46px; padding-inline: 46px 16px; }
.add-preview:empty { display: none; }
.add-hint { display: none; color: var(--ink-3); font-size: 12px; padding-inline: 46px 16px; padding-bottom: 10px; }
.add-mission:focus-within + .add-preview:empty + .add-hint { display: block; }
.add-hint code { font: 11.5px var(--mono); color: var(--ink-2); background: var(--fill-2); padding: 1px 4px; border-radius: 4px; }

.add-module { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; border: 1.5px dashed var(--sep-2); border-radius: var(--r-c); background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600; }
.add-module:hover { color: var(--ink); background: var(--fill-2); }
.add-module-form { display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 10px 0 16px; background: var(--card); border-radius: var(--r-c); box-shadow: var(--shadow); }
.add-module-form input { flex: 1; border: 0; outline: none; background: none; font-weight: 700; font-size: 16px; }

/* ── menus, modals, drawer, palette ── */
.menu { position: fixed; z-index: 60; min-width: 200px; background: var(--card); border-radius: 10px; box-shadow: var(--float); padding: 5px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; padding: 0 10px; border: 0; background: none; border-radius: 6px; text-align: start; font-size: 13.5px; }
.menu button:hover { background: var(--fill-2); }
.menu button.danger { color: var(--red); }
.menu button.danger:hover { background: var(--red); color: #fff; }
.menu hr { border: 0; border-top: 1px solid var(--sep); margin: 5px 10px; }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(15, 15, 15, .4); display: grid; place-items: start center; padding: 11vh 16px 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(520px, 100%); background: var(--card); border-radius: var(--r-w); box-shadow: var(--float); display: flex; flex-direction: column; max-height: 82vh; animation: rise .25s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-head { padding: 22px 24px 0; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.modal-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.modal-body { padding: 18px 24px; display: grid; gap: 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px 20px; }
.modal-foot .btn { height: 36px; padding: 0 18px; }
.modal:has(.sa-list) { width: min(1000px, 100%); }
.modal:has(.mission-form) { width: min(620px, 100%); }

.swatches { display: flex; gap: 10px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--c); padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--c); }
.templates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.template { text-align: start; padding: 10px 12px; border: 1.5px solid transparent; background: var(--fill-2); border-radius: 12px; display: grid; gap: 2px; }
.template b { font-weight: 600; font-size: 13.5px; }
.template span { color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.template.on { border-color: var(--main); background: var(--fill-2); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 4px; }
.emoji-opt { font-family: var(--emoji); font-size: 20px; height: 36px; border: 0; background: none; border-radius: 9px; cursor: pointer; }
.emoji-opt:hover { background: var(--fill-2); }
.emoji-opt.on { background: var(--fill); box-shadow: inset 0 0 0 1.5px var(--sep-2); }

.drawer-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .14); }
.drawer { position: fixed; z-index: 51; top: 10px; inset-inline-end: 10px; bottom: 10px; width: min(440px, calc(100% - 20px)); background: var(--card); border-radius: var(--r-w); box-shadow: var(--float); display: flex; flex-direction: column; animation: slide .28s var(--ease); overflow: hidden; }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 10px; padding-inline: 20px 10px; border-bottom: 1px solid var(--sep); font-size: 13px; color: var(--ink-2); }
.drawer-head .path { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.drawer-body { padding: 20px; display: grid; gap: 20px; align-content: start; overflow-y: auto; flex: 1; }
.drawer-title { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.drawer-title .check { margin-top: 4px; width: 22px; height: 22px; }
.drawer-title textarea { border: 0; outline: none; resize: none; background: none; font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.3; padding: 0; overflow: hidden; }
.props { display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; align-items: center; font-size: 14px; background: var(--inset); border-radius: var(--r-c); padding: 14px 16px; }
.props > span { color: var(--ink-2); font-size: 13px; }
.props .input { height: 32px; width: auto; font-size: 13.5px; background: var(--card); }
.props .select { height: 32px; font-size: 13.5px; }
.drawer-foot { display: flex; justify-content: space-between; align-items: center; height: 50px; padding-inline: 20px 10px; border-top: 1px solid var(--sep); font-size: 12px; color: var(--ink-3); }
.course-chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.person-field { display: flex; align-items: center; gap: 8px; }
.person-field .select { width: auto; flex: 1; }
.day-hint { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; min-height: 18px; }
.notes-big { min-height: 200px; font-size: 14.5px; line-height: 1.6; }
.title-input { height: 48px; font-size: 18px; font-weight: 700; }
.people-pick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.people-pick .link-btn, .mission-form .chips > .faint { white-space: nowrap; flex: none; }
.pchip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding-block: 0; padding-inline: 4px 12px; border: 0; background: var(--fill-2); border-radius: 999px; font-size: 13px; cursor: pointer; transition: background .12s; }
.pchip small { color: var(--ink-2); font-size: 11.5px; }
.pchip:hover { background: var(--fill); }
.pchip.on { background: var(--main); color: var(--on-main); }
.pchip.on small { color: color-mix(in srgb, var(--on-main) 75%, transparent); }
.mission-form .chips { align-items: center; }

.related { border-top: 1px solid var(--sep); padding-top: 16px; display: grid; gap: 4px; }
.related h3 { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.rel-course { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 4px; }
.rel-course a { color: var(--accent); }
.rel-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 72px; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; }
.rel-row:hover { background: var(--fill-2); }
.rel-row span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-row.done { color: var(--ink-3); }
.related .btn { justify-self: start; margin-top: 6px; }

.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; justify-items: center; }
.toast { display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, #2f2e2b 96%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: #fff; padding-inline: 18px 8px; height: 42px; border-radius: 10px; font-size: 14px; font-weight: 500; box-shadow: var(--float); animation: rise .25s var(--ease); }
.toast button { border: 0; background: none; color: #fff; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; font-size: 14px; height: 32px; padding: 0 12px; border-radius: 999px; }
.toast button:hover { background: rgba(255, 255, 255, .12); }
.toast.out { opacity: 0; transition: opacity .2s; }

.palette { width: min(620px, 100%); background: var(--card); border-radius: 12px; box-shadow: var(--float); overflow: hidden; animation: rise .2s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--sep); color: var(--ink-2); }
.palette-input svg.i { width: 20px; height: 20px; }
.palette-input input { flex: 1; height: 56px; border: 0; outline: none; background: none; font-size: 19px; font-weight: 400; }
.palette-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.palette-item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; cursor: pointer; font-size: 14.5px; }
.palette-item .sub { margin-inline-start: auto; font-size: 12.5px; color: var(--ink-3); }
.palette-item.on { background: var(--fill-2); }

/* ── auth ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) 1.1fr; }
.auth-inner { width: 100%; max-width: 380px; margin: auto; padding: 40px 24px; display: grid; gap: 22px; }
.auth h1 { font-size: 30px; line-height: 1.2; font-weight: 700; margin: 12px 0 0; letter-spacing: -.025em; }
.auth .lede { color: var(--ink-2); margin: -10px 0 0; font-size: 15px; }
.auth-tabs { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill); border-radius: 10px; }
.auth-tabs button { flex: 1; border: 0; background: none; height: 30px; border-radius: 8px; font-weight: 500; font-size: 13.5px; }
.auth-tabs button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); font-weight: 600; }
.auth form { display: grid; gap: 14px; }
.auth .btn.primary { height: 44px; font-size: 15px; }
.auth-foot { color: var(--ink-3); font-size: 12px; }
.auth-foot .mono { font-family: var(--mono); font-size: 11.5px; }
.auth-note { margin: 0; color: var(--ink-3); font-size: 12px; }
.auth-art { margin: 12px; border-radius: 16px; display: grid; place-items: center; position: relative; overflow: hidden; }
.auth-art .art { position: absolute; inset: 0; }
.auth-art .floating { position: relative; z-index: 1; display: grid; gap: 14px; width: min(340px, 80%); }
.fcard { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--float); font-size: 14px; font-weight: 600; }
.fcard small { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.fcard:nth-child(2) { margin-inline-start: 40px; }
.fcard:nth-child(3) { margin-inline-end: 30px; }
.fcard-date { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 0 18px; align-items: end; padding: 16px 18px; width: 240px; }
.fd-day { grid-column: 1; font-size: 12px; color: var(--today); font-weight: 700; }
.fd-num { grid-column: 1; font-size: 44px; line-height: 1; font-weight: 300; letter-spacing: -.03em; }
.fd-ev { grid-column: 2; grid-row: 1 / 3; display: grid; grid-template-columns: 3px 1fr; gap: 0 8px; font-size: 13px; align-self: center; }
.fd-ev i { grid-row: 1 / 3; background: var(--c-ink); border-radius: 2px; }
.hit-login { background: var(--card); border-radius: var(--r-w); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; }
.hit-login-head { display: grid; gap: 2px; }
.hit-login-head b { font-weight: 700; font-size: 16px; }
.hit-login-head span { font-size: 13px; }
.hit-box, .hit-form { display: grid; gap: 12px; }
.auth-alt { display: grid; gap: 10px; justify-items: start; }
/* onboarding: the university picker — a grid of white cards, each with the institution's own logo (the only brand
   colour on the page) and its name under it */
.auth-inner:has(.uni-picker) { max-width: 440px; }
.uni-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.uni-picker > .loading, .uni-picker > .form-error { grid-column: 1 / -1; }
.uni { display: grid; justify-items: center; align-content: start; gap: 10px; width: 100%; padding: 16px 10px 12px; border: 1px solid var(--sep); border-radius: var(--r-w); background: var(--card); box-shadow: var(--shadow); text-align: center; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, background .15s, transform .15s; }
.uni:hover { border-color: var(--sep-2); background: var(--fill-2); }
.uni:active { transform: scale(.98); }
.uni:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.uni-logo { width: 100%; height: 48px; display: grid; place-items: center; }
.uni-logo img { display: block; height: 48px; width: auto; max-width: min(140px, 100%); object-fit: contain; }
.uni-name { display: grid; gap: 1px; min-width: 0; }
.uni-name b { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.uni-name small { color: var(--ink-3); font-size: 11.5px; }
.hit-code-head { display: flex; align-items: center; gap: 10px; }
.hit-code-head b { font-weight: 600; font-size: 15px; }
.uni-head-logo { height: 44px; width: auto; max-width: 180px; justify-self: start; }
.auth-back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.auth-back .i { width: 14px; height: 14px; }
.hit-hint { margin: 0; padding: 10px 12px; background: var(--fill-2); border-radius: var(--r-i); color: var(--ink-2); font-size: 13.5px; }
.hit-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.code-input { font-size: 22px; letter-spacing: .35em; height: 50px; text-align: center; font-variant-numeric: tabular-nums; }
.live { border-radius: var(--r-c); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.live img { display: block; width: 100%; height: auto; cursor: pointer; aspect-ratio: 1280 / 900; }
.live-keys { display: flex; gap: 6px; }
.auth-inner:has(.live) { max-width: 640px; }

/* ── loading ── */
.loading { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; padding: 10px 0; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--ink-2); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── sync: the card while an institution's pages are read (minutes). The ghost reads along; a checklist of the
   steps, the course it's on under the current one, a thin bar and a clock. ── */
.sync { display: grid; gap: 14px; }
.sync-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.sync-ghost { width: 40px; height: 40px; animation: ghost-bob 1.1s ease-in-out infinite, ghost-breathe 2.2s ease-in-out infinite; }
.sync-head b { display: block; font-weight: 600; font-size: 15px; }
.sync-head .faint { display: block; font-size: 12.5px; line-height: 1.4; }
.sync-clock { align-self: start; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sync .bar { flex: none; height: 4px; }
.sync-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.sync-steps li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; padding: 5px 0; font-size: 13.5px; color: var(--ink-3); transition: color .3s var(--ease); }
.sync-steps i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sep-2); display: grid; place-items: center; }
.sync-steps i .i { width: 10px; height: 10px; stroke: #fff; stroke-width: 3.5; }
.sync-steps li.done { color: var(--ink-2); }
.sync-steps li.done i { background: var(--c-moss); box-shadow: none; animation: pop .35s var(--ease); }
.sync-steps li.now { color: var(--ink); font-weight: 500; }
.sync-steps li.now i { box-shadow: inset 0 0 0 2px var(--accent-soft); border: 2px solid transparent; border-top-color: var(--accent); animation: spin .8s linear infinite; }
.sync-steps small { font-size: 12px; font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sync-steps em { grid-column: 2 / -1; font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: fade .3s var(--ease); }

/* ── connections ── */
.conn { padding: 22px; display: grid; gap: 16px; }
.conn-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.conn-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; }
.conn-head p { margin: 0; font-size: 14px; max-width: 620px; }
.conn-facts { display: grid; grid-template-columns: 130px 1fr; gap: 0; margin: 0; font-size: 14px; background: var(--inset); border-radius: var(--r-c); overflow: hidden; }
.conn-facts dt, .conn-facts dd { padding: 11px 14px; border-top: 1px solid var(--sep); margin: 0; }
.conn-facts dt:first-of-type, .conn-facts dt:first-of-type + dd { border-top: 0; }
.conn-facts dt { color: var(--ink-2); }
.conn-facts dd { text-align: start; }
/* the university card: the linked one as a logo row; with none, a compact version of the onboarding picker */
.uni-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--inset); border-radius: var(--r-c); min-width: 0; }
.uni-row-logo { flex: none; height: 36px; display: grid; place-items: center; }
.uni-row-logo img { display: block; height: 36px; width: auto; max-width: 120px; object-fit: contain; }
.uni-row > div { display: grid; gap: 1px; min-width: 0; }
.uni-row b { font-weight: 600; font-size: 14.5px; }
.uni-row small { color: var(--ink-3); font-size: 12.5px; }
.uni-picker.sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.uni-picker.sm .uni { gap: 6px; padding: 12px 8px 10px; box-shadow: none; border-radius: var(--r-c); }
.uni-picker.sm .uni-logo, .uni-picker.sm .uni-logo img { height: 28px; }
.uni-picker.sm .uni-name b { font-weight: 500; font-size: 12.5px; }
.uni-picker.sm .uni-name small { display: none; }
#uni-conn .hit-box:has(.sync) ~ .auth-back { display: none; }   /* no "back" while the sync runs */

/* ── smart add ── */
.sa-list { display: grid; gap: 8px; }
.sa-row { display: grid; grid-template-columns: 20px minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, 1fr) 100px 140px; gap: 8px; align-items: center; }
.sa-row .input { height: 34px; font-size: 13.5px; }

/* ── weekly plan ── */
.brief p { margin: 0; font-size: 14px; }
.brief-list { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; }
.brief-list li::marker { color: var(--ink-3); }

/* ── chat ── */
/* The chat is home. Empty: a calm centred welcome with the composer in the middle.
   Once there are messages: a thread, the composer docked at the bottom. */
.chat-view { max-width: 760px; display: flex; flex-direction: column; min-height: 100vh; padding-top: 16px; padding-bottom: 20px; }
.chat-top { display: flex; justify-content: flex-end; min-height: 30px; }
.chat-top .btn { color: var(--ink-2); }
.chat-welcome, .chat-suggest { display: none; }
.chat-log { flex: 1; display: grid; gap: 16px; align-content: start; padding: 8px 0 24px; }

.chat-view.is-empty { justify-content: flex-start; padding-top: 24px; padding-bottom: 8vh; }
.chat-view.is-empty .chat-log { display: none; }
.chat-view.is-empty .chat-welcome { display: grid; justify-items: start; text-align: start; gap: 6px; margin-bottom: 24px; animation: rise .5s var(--ease) both; }
.chat-cover { position: relative; width: 100%; height: 200px; border-radius: 14px; margin-bottom: 46px; }
.chat-cover .art { position: absolute; inset: 0; border-radius: inherit; }
.chat-welcome .brand-mark.xl { position: absolute; bottom: -34px; inset-inline-start: 22px; width: 76px; height: 76px; }
.chat-welcome h1 { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 700; }
.chat-welcome p { margin: 0; font-size: 16px; color: var(--ink-2); }
.chat-welcome a { color: var(--accent); }
.chat-view.is-empty .composer { position: static; padding: 10px 10px 10px 10px; padding-inline-start: 18px; border-radius: 16px; box-shadow: var(--float); animation: rise .5s .05s var(--ease) both; }
.chat-view.is-empty .composer { align-items: center; }
.chat-view.is-empty .composer textarea { font-size: 16px; padding: 12px 0; }
.chat-view.is-empty .composer .btn.icon { width: 38px; height: 38px; }
.chat-view.is-empty .chat-suggest { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-top: 16px; animation: rise .5s .1s var(--ease) both; }
.chat-suggest .chip { display: inline-flex; align-items: center; gap: 7px; background: var(--card); box-shadow: var(--shadow); white-space: normal; text-align: start; }
.chat-suggest .chip:hover { background: var(--fill-2); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .chat-welcome, .chat-view .composer, .chat-suggest { animation: none !important; } }

/* typing indicator */
.dots { display: inline-flex; gap: 5px; padding: 10px 0; justify-self: end; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-2px); } }
.msg.user { display: flex; justify-content: flex-start; }
.msg.user .bubble { max-width: 76%; background: var(--fill-2); color: var(--ink); border-radius: 12px; padding: 9px 15px; line-height: 1.5; font-size: 15px; }
.msg.user.failed .bubble { opacity: .5; }
.msg.ai { display: grid; gap: 10px; max-width: 92%; }
.ai-text { background: none; border-radius: 0; padding: 2px 0; line-height: 1.65; font-size: 15px; justify-self: end; width: fit-content; max-width: 100%; }
.ai-text p { margin: 0 0 6px; }
.ai-text p:last-child { margin: 0; }
.ai-text ul { margin: 4px 0 8px; padding-inline-start: 20px; display: grid; gap: 3px; }
.ai-text li::marker { color: var(--ink-3); }
.ai-text b { font-weight: 600; }
.acts { display: grid; gap: 8px; justify-items: stretch; }
.act { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; width: 100%; border-radius: var(--r-c); padding: 10px 12px; background: var(--card); box-shadow: var(--shadow); }
.act-ic { width: 32px; height: 32px; border-radius: 6px; background: var(--fill); display: grid; place-items: center; color: var(--ink-2); }
.act-body { display: grid; gap: 1px; font-size: 14px; min-width: 0; }
.act-kind { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.act-err { font-size: 12.5px; color: var(--red); }
.act-btns { display: flex; gap: 4px; }
.act-state { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.act.done .act-ic { background: color-mix(in srgb, var(--c-moss) 16%, transparent); color: var(--c-moss); }
.act.done .act-state { color: var(--c-moss); }
.act.skipped { opacity: .5; }
.act.danger:not(.done):not(.skipped) .act-ic { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.act > a.btn { text-decoration: none; }
.act.failed .act-state { color: var(--red); }
.composer { position: sticky; bottom: 14px; display: flex; gap: 8px; align-items: flex-end; border-radius: 14px; padding: 6px 6px 6px 6px; padding-inline-start: 16px; background: var(--glass); backdrop-filter: blur(24px) saturate(1.8); -webkit-backdrop-filter: blur(24px) saturate(1.8); box-shadow: var(--float); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; background: none; font: inherit; font-size: 15px; line-height: 1.5; padding: 7px 0; max-height: 200px; }
.composer .btn.icon { width: 34px; height: 34px; border-radius: 8px; }
.composer-note { font-size: 12px; text-align: center; padding-top: 12px; }
.chat-view.is-empty .composer-note { display: none; }

/* ═════════════ Tablet ═════════════ */
@media (max-width: 1100px) {
  .widgets { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1000px) {
  .week { grid-template-columns: 1fr; gap: 2px; }
  .day { min-height: 0; }
  .day-head { justify-content: flex-start; gap: 10px; }
  .day-empty { display: none; }
  .mrow { grid-template-columns: 20px minmax(0, 1fr) 84px 110px 84px; }
  .mrow > :nth-child(5), .mrow > :nth-child(6) { display: none; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}

/* ═════════════ Phone ═════════════
   One column, a translucent tab bar, sheets from the bottom, 44px touch targets, 16px inputs (no iOS zoom), safe areas. */
@media (max-width: 760px) {
  :root { --tabbar: 58px; --safe-b: env(safe-area-inset-bottom, 0px); }
  body { font-size: 15px; }
  .hide-m, .hide-sm, .toolbar [data-action="add-module"], .toolbar [data-action="collapse-all"], .composer-note { display: none !important; }
  .app { grid-template-columns: 1fr; }

  .topbar-mobile { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 30;
    height: calc(50px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 16px 0; background: var(--glass); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); }
  .topbar-mobile .btn { color: var(--ink); background: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
    height: calc(var(--tabbar) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--glass); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); border-top: .5px solid var(--sep-2); }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; border: 0; background: none; padding: 6px 0; color: var(--ink-3); font-size: 10.5px; font-weight: 600; }
  .tabbar svg.i { width: 24px; height: 24px; stroke-width: 1.8; }
  .tabbar .on { color: var(--ink); }

  /* pinned to the visible top and bottom, not 100vh: in iPhone Safari 100vh is measured with the toolbar hidden,
     which pushed the profile at the bottom of the menu under the toolbar */
  .sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; height: auto; inset-inline-start: 0; width: min(300px, 84vw); transform: translateX(100%); transition: transform .3s var(--ease);
    padding-top: calc(18px + env(safe-area-inset-top, 0px)); padding-bottom: calc(10px + var(--safe-b)); border: 0; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .25); }
  .nav-courses { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .user-chip { min-height: 52px; padding: 8px 10px; gap: 12px; }
  .user-chip .avatar { width: 34px; height: 34px; }
  .user-chip .name { font-size: 15px; }
  .user-chip .email { font-size: 12.5px; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 49; background: rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .app.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .nav-item { height: 44px; font-size: 16px; }

  .view { padding: 10px 16px calc(var(--tabbar) + var(--safe-b) + 28px); }
  .hero, .page-head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 16px; }
  .hero h1, .page-head h1 { font-size: 28px; flex-wrap: wrap; }
  .head-actions .btn { height: 36px; }
  .crumbs { margin-bottom: 8px; }

  .widgets { grid-template-columns: 1fr 1fr; gap: 12px; }
  .w { min-height: 150px; padding: 14px; border-radius: 20px; }
  .w-today, .w-activity { grid-column: 1 / -1; }
  .w-today { min-height: 0; }
  .w-big { font-size: 40px; }
  .ring { width: 56px; height: 56px; }
  .ring-row { gap: 10px; }
  .w-big.sm { font-size: 24px; }
  .w-activity { min-height: 0; }

  .card, .setup, .conn { padding: 14px 16px; border-radius: 20px; }
  .week-card { padding: 14px 8px 8px; }
  .week-card .card-head { flex-wrap: wrap; }
  .day { border-radius: 12px; }
  .day-head { padding: 8px 8px 4px; justify-content: space-between; }
  .day-head .dn { font-size: 14px; color: var(--ink); }
  .day:has(.day-empty) { flex-direction: row; align-items: center; }
  .day:has(.day-empty) .day-head { flex: 1; }
  .day:has(.day-empty) .day-body { padding: 0 10px; flex: none; }
  .day-empty { display: block !important; font-size: 13px; }
  .slot { padding: 8px 10px; font-size: 13.5px; }
  .item { padding: 10px 6px; grid-template-columns: 24px 1fr; }
  .item .t { font-size: 15px; -webkit-line-clamp: 3; }
  .item .check, .mission .check, .mrow .check { width: 24px; height: 24px; }
  .check svg { width: 13px; height: 13px; }
  .setup-step { height: 50px; font-size: 15px; padding: 0 16px; }
  .setup-head { padding: 8px 16px; }

  .course-head { grid-template-columns: 1fr; gap: 12px; }
  .course-head h1 { font-size: 26px; }
  .head-side { flex-wrap: wrap; gap: 12px; }
  .head-side .prog { flex: 1; width: auto; }
  .ctile.xl { width: 56px; height: 56px; font-size: 30px; }
  .toolbar { padding: 14px 0 10px; }
  .filters button { height: 32px; padding: 0 12px; font-size: 14px; }
  .tabs a { height: 34px; font-size: 14.5px; }
  .module-head { grid-template-columns: 24px 22px minmax(0, 1fr) auto 32px; height: 56px; }
  .module-head .prog .bar { display: none; }
  .module-head .prog { width: auto; }
  .mission { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; min-height: 54px; padding: 8px 12px 8px 16px; }
  .mission::before, .done-divider::before, .add-mission::before { inset-inline-start: 52px; }
  .mission > span:nth-of-type(1), .mission > span:nth-of-type(2), .mission .del { display: none; }
  .mission .mt { flex-wrap: wrap; row-gap: 2px; }
  .mission .title { white-space: normal; line-height: 1.4; font-size: 15.5px; }
  .add-mission { height: 50px; grid-template-columns: 24px 1fr; }
  .add-mission input { font-size: 16px; }
  .add-hint, .add-preview { padding-inline-start: 52px; }
  .add-module-form input { font-size: 16px; }

  .orow { min-height: 54px; gap: 10px; padding: 8px 14px; font-size: 15px; grid-template-columns: minmax(0, 1fr) auto auto !important; }
  .orow.th { display: none; }
  .orow:not(.mrow) { grid-template-columns: minmax(0, 1fr) !important; grid-auto-flow: column; grid-auto-columns: auto; }
  .mrow { grid-template-columns: 24px minmax(0, 1fr) auto !important; }
  .mrow > :nth-child(3), .mrow > :nth-child(4), .mrow > :nth-child(5), .mrow > :nth-child(6) { display: none; }
  .mrow .title { white-space: normal; }
  .add-row { height: 50px; font-size: 15.5px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gcard { padding: 14px; min-height: 170px; border-radius: 20px; }
  .gtitle { font-size: 15px; }
  .gmeta span:last-child { display: none; }
  .gcard.new { min-height: 120px; }
  .fgrid, .row-2 { grid-template-columns: 1fr; }
  .templates { grid-template-columns: 1fr; }
  .activity { grid-template-columns: 1fr; }

  /* sheets */
  .overlay { place-items: end stretch; padding: 0; }
  .modal { width: 100% !important; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; animation: sheet .35s var(--ease); }
  .modal::before { content: ""; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--sep-2); margin: 8px auto 0; flex: none; }
  @keyframes sheet { from { transform: translateY(60px); opacity: .4; } }
  .modal-head { padding: 12px 18px 0; }
  .modal-body { padding: 14px 18px; }
  .modal-foot { padding: 12px 18px calc(12px + var(--safe-b)); }
  .modal-foot .btn { height: 48px; flex: 1; font-size: 16px; }
  .modal-foot .btn.ghost[data-del] { flex: none; }
  .overlay:has(.palette) { place-items: start stretch; padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 0; }
  .palette-item { height: 46px; font-size: 16px; }
  .people-pick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .people-pick::-webkit-scrollbar { display: none; }
  .pchip { flex: none; height: 38px; }
  .seg button { height: 34px; padding: 0 14px; }
  .chip.sm { padding: 7px 12px; font-size: 13.5px; }
  .input, .textarea, .select, .composer textarea, .title-input, .props .input, .props .select { font-size: 16px; }
  .input, .select { height: 44px; }

  .drawer { inset: 0; width: 100%; border-radius: 0; animation: sheet .3s var(--ease); }
  .drawer-head { height: calc(52px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .drawer-foot { height: auto; padding: 10px 14px calc(10px + var(--safe-b)); }
  .props { grid-template-columns: 1fr; gap: 6px; }
  .props > span:empty { display: none; }
  .props > span { margin-top: 8px; }
  .props .select, .props .input { width: 100% !important; }

  .chat-view { min-height: calc(100vh - 50px - var(--tabbar) - var(--safe-b)); min-height: calc(100dvh - 50px - var(--tabbar) - var(--safe-b)); padding-bottom: calc(var(--tabbar) + var(--safe-b) + 92px); }
  .chat-view.is-empty { padding-bottom: calc(var(--tabbar) + var(--safe-b) + 20px); }
  .chat-welcome h1 { font-size: 27px; }
  .chat-view:not(.is-empty) .composer { position: fixed; inset-inline: 10px; bottom: calc(var(--tabbar) + var(--safe-b) + 8px); z-index: 40; }
  .msg.user .bubble { max-width: 86%; }
  .act { grid-template-columns: 32px 1fr; }
  .act-btns, .act-state { grid-column: 1 / -1; }
  .act-btns .btn { flex: 1; height: 40px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .chat-view.is-empty .chat-suggest { flex-wrap: wrap; }

  .conn-head { flex-direction: column; }
  .conn-facts { grid-template-columns: 100px 1fr; }
  .uni-picker.sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-row { grid-template-columns: 20px 1fr; }
  .sa-row > :nth-child(n+3) { grid-column: 2; }
  .toasts { bottom: calc(var(--tabbar) + var(--safe-b) + 12px); width: calc(100% - 24px); }
  .toast { width: 100%; justify-content: space-between; }
  .auth-inner { padding: calc(28px + env(safe-area-inset-top, 0px)) 20px 28px; }
  .auth h1 { font-size: 26px; }
  .week.tall { padding: 6px; }
  .week.tall .day { min-height: 0; }
}
@media (max-width: 380px) {
  .gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═════════════ Daily loop: triage inbox, workload radar, review plans, grade simulator ═════════════ */
.inbox .card-head h2 { flex: none; }
.inbox-hint { font-size: 12.5px; margin-inline-start: auto; }
.inbox .item.tri { grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; padding: 9px 6px; }
.inbox .item.tri + .item.tri { border-top: 1px solid var(--sep); border-radius: 0; }
.inbox .item .t { -webkit-line-clamp: 1; font-size: 14px; }
.inbox .item .s .due { font-size: 11.5px; }
.tri-acts { display: flex; gap: 4px; }
.tri-acts .chip.sm { padding: 4px 10px; }
.inbox-more { display: block; padding: 8px 6px 0; }
.inbox-zero { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.inbox-zero div { display: grid; gap: 1px; }
.inbox-zero b { font-size: 14.5px; }
.inbox-zero span:not(.tile) { font-size: 13px; color: var(--ink-2); }
.inbox-zero .tile { background: var(--fill-2); }

.radar-days, .radar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.radar-days b { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-align: center; padding-bottom: 4px; }
.radar-grid i { font-style: normal; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--fill-2); font-variant-numeric: tabular-nums; }
.radar-grid i span { font-family: var(--emoji); font-size: 15px; }
.radar-grid i[data-l="1"] { background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.radar-grid i[data-l="2"] { background: color-mix(in srgb, var(--accent) 30%, var(--card)); }
.radar-grid i[data-l="3"] { background: color-mix(in srgb, var(--accent) 52%, var(--card)); color: #fff; }
.radar-grid i[data-l="4"] { background: var(--accent); color: #fff; }
.radar-grid i.past { opacity: .35; }
.radar-grid i.today { box-shadow: inset 0 0 0 2px var(--today); }
.radar-warn { display: grid; gap: 2px; margin-top: 14px; border-top: 1px solid var(--sep); padding-top: 8px; }
.rw { display: flex; align-items: center; gap: 12px; padding: 8px 2px; }
.rw .tile { background: var(--fill-2); }
.rw div { display: grid; gap: 1px; min-width: 0; flex: 1; }
.rw b { font-size: 14px; }
.rw div span { font-size: 13px; color: var(--ink-2); }
.rw .btn { flex: none; }

.modal-head h2 .tile { background: var(--fill-2); margin-inline-end: 6px; vertical-align: middle; }
.rv-row { display: flex; align-items: center; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--sep); cursor: pointer; }
.rv-row:last-of-type { border-bottom: 0; }
.rv-row input { width: 18px; height: 18px; accent-color: var(--main); flex: none; }
.rv-t { flex: 1; font-weight: 600; font-size: 14px; }
.rv-d { font-size: 13px; color: var(--ink-2); }

.sim { background: var(--inset); border-radius: 16px; padding: 14px 16px; margin: 0 0 12px; display: grid; gap: 10px; }
.sim-head { display: flex; gap: 12px; align-items: center; }
.sim-head .tile { background: var(--card); }
.sim-head div { display: grid; gap: 2px; }
.sim-head b { font-size: 14.5px; }
.sim-head span { font-size: 13px; color: var(--ink-2); }
.sim-head span b { font-size: 13px; color: var(--ink); }
.sim-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.sim-row label { color: var(--ink-2); font-weight: 600; }
.sim-row input[type=range] { flex: 1; min-width: 140px; accent-color: var(--accent); }
.sim-x { min-width: 28px; font-size: 15px; }
.sim-out { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sim-out b { font-size: 15px; }
.pill.bad { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); }
.sim-note { margin: 0; font-size: 12px; color: var(--ink-3); }
.section-head .mono.bad b { color: var(--red); }
.facts .chip.sm { margin-inline-start: auto; }
.hint-line { margin: -8px 0 18px; font-size: 13px; color: var(--ink-2); }

@media (max-width: 760px) {
  .inbox-hint { display: none; }
  .tri-acts .chip.sm { padding: 6px 10px; font-size: 12.5px; }
  .radar-grid i { height: 30px; }
  .rw { flex-wrap: wrap; }
}

/* ═════════════ Covers ═════════════
   Notion-style page covers filled with soft abstract art: three blurred pastel blobs drifting slowly over a pale base,
   with a fine grain on top. app.js art() picks the palette and positions from a key, so each page keeps its picture. */
.art { position: relative; overflow: hidden; background: var(--base, #f3f1fb); isolation: isolate; }
.art i { position: absolute; left: var(--x); top: var(--y); width: var(--s); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, var(--bc) 0 18%, color-mix(in srgb, var(--bc) 0%, transparent) 70%);
  filter: blur(26px) saturate(1.15); opacity: .95; animation: drift 18s var(--d, 0s) ease-in-out infinite alternate; }
.art i:nth-child(2) { animation-duration: 23s; mix-blend-mode: multiply; opacity: .75; }
.art i:nth-child(3) { animation-duration: 29s; }
.art::after { content: ""; position: absolute; inset: 0; z-index: 1; opacity: .22; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { to { transform: translate(8%, 10%) scale(1.12); } }

.cover { height: 210px; position: relative; }
.cover .art { position: absolute; inset: 0; }
.view.has-cover { padding-top: 0; }
.page-icon { font-family: var(--emoji); font-size: 64px; line-height: 1; margin: -40px 0 14px; position: relative; z-index: 2; width: max-content; }
.view.has-cover > .crumbs { margin: 10px 0 0; }
.view.has-cover > .ctile.xl { display: grid; }
.view.has-cover > .ctile.xl { margin-top: -44px; position: relative; z-index: 2; }
.view.has-cover .hero, .view.has-cover .page-head { margin-top: 0; }

/* Phone: flatter and quieter, like Notion's mobile app. Short covers, no boxes around sections
   (hairlines and spacing instead), soft gray widgets, suggestions as a plain list. */
@media (max-width: 760px) {
  .view { padding-inline: 16px; }
  .cover { height: 104px; }
  .page-icon { font-size: 40px; margin: -22px 0 8px; }
  .view.has-cover > .ctile.xl { margin-top: -26px; width: 52px; height: 52px; font-size: 38px; border-radius: 10px; }
  .hero h1, .page-head h1, .course-head h1 { font-size: 26px; }
  .hero, .page-head { margin-bottom: 14px; }
  .eyebrow { font-size: 13px; }

  /* chat home */
  .chat-view.is-empty { padding-top: 12px; }
  .chat-view.is-empty .chat-top { display: none; }
  .chat-cover { height: 104px; margin-bottom: 30px; border-radius: 12px; }
  .chat-welcome .brand-mark.xl { width: 56px; height: 56px; bottom: -24px; inset-inline-start: 12px; }
  .chat-welcome h1 { font-size: 26px; }
  .chat-welcome p { font-size: 15px; }
  .chat-view.is-empty .composer { box-shadow: 0 0 0 1px var(--sep-2), 0 4px 14px -6px rgba(15, 15, 15, .12); }
  .chat-view.is-empty .chat-suggest { display: grid; justify-content: stretch; gap: 0; margin-top: 18px; }
  .chat-suggest .chip { width: 100%; background: none; box-shadow: none; border-radius: 0; padding: 12px 2px; font-size: 15px; color: var(--ink-2); border-top: 1px solid var(--line); }
  .chat-suggest .chip:hover { background: none; color: var(--ink); }

  /* sections lose their boxes */
  .card, .setup, .conn, .week-card, .otable, .table, .module { background: none; box-shadow: none; border-radius: 0; padding-inline: 0; }
  .card, .week-card, .setup, .conn { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
  .week-card .card-head, .setup-head { padding-inline: 0; }
  .setup-step { padding-inline: 0; }
  .module { border-top: 1px solid var(--line); margin-bottom: 4px; }
  .module-head { padding-inline: 0; }
  .mission, .add-mission, .done-divider { padding-inline: 0; }
  .orow { padding-inline: 2px; }
  .orow + .orow::before { inset-inline-start: 0; }
  #modules > .empty, .view > .empty { box-shadow: none; background: var(--inset); }

  /* widgets: soft gray tiles instead of bordered boxes */
  .widgets { gap: 10px; }
  .w { background: var(--inset); box-shadow: none; border-radius: 12px; min-height: 132px; }
  .w-big { font-size: 36px; }
  .w-today, .w-activity { min-height: 0; }
  :root { --heat-0: #e9e9e6; }   /* empty heatmap cells stay visible on the gray widget */

  /* course gallery */
  .gcover { height: 64px; }
  .gcard { box-shadow: 0 0 0 1px var(--line); min-height: 0; gap: 8px; padding-bottom: 12px; }
  .gcard .gtop { margin-top: -20px; }
  .gcard .ctile.lg { width: 36px; height: 36px; font-size: 20px; border-radius: 9px; }
  .gpct { font-size: 16px; }
  .gmeta { display: none; }

  /* sign-in: the art becomes a short band on top */
  .auth-art { display: block; order: -1; height: 120px; margin: 0; border-radius: 0; }
  .auth-art .floating { display: none; }
  .auth { align-content: start; }
  .auth-inner { margin: 0 auto; padding-top: 24px; }
}

/* ═════════════ Explainer animations: "מבנה ויחידות" preview + quick-add syntax demo ═════════════
   Motion rules (from the animate skill): only transform/opacity, ease-out-quint on enter, ~300ms, staggered, reduced-motion respected.
   Every element's resting style is its final, visible state, so turning animation off never hides anything. */
:root { --ease-out-quint: cubic-bezier(.23, 1, .32, 1); }

.sd-legend { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.sd-legend b { color: var(--ink); font-weight: 600; }
.sd { background: var(--inset); border-radius: var(--r-c); padding: 12px; display: grid; gap: 8px; }
.sd-course { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.sd-course b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-emoji { width: 24px; height: 24px; border-radius: 6px; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; font: 14px var(--emoji); flex: none; }
.sd-count { margin-inline-start: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.sd-mods { display: grid; gap: 6px; padding-inline-start: 12px; border-inline-start: 2px solid color-mix(in srgb, var(--c, var(--ink-3)) 35%, transparent); margin-inline-start: 11px; }
.sd-mod { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 6px; align-items: center; height: 32px; padding: 0 10px; background: var(--card); border-radius: 8px; box-shadow: var(--shadow); font-size: 13px; }
.sd-mod.in { animation: sd-in .32s var(--ease-out-quint) both; animation-delay: calc(var(--i) * 60ms); }
.sd-no { font-size: 11.5px; font-weight: 600; color: var(--c, var(--ink-3)); font-variant-numeric: tabular-nums; }
.sd-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-dots { display: flex; gap: 4px; }
.sd-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sep-2); }
.sd-more, .sd-empty { font-size: 12px; color: var(--ink-3); padding: 2px 4px; }
.sd-empty { border: 1.5px dashed var(--sep-2); border-radius: 8px; padding: 8px 10px; text-align: center; animation: sd-breathe 2.4s ease-in-out infinite; }

/* the first unit shows one mission arriving and being checked off, on a loop */
.sd-ms { display: flex; align-items: center; gap: 6px; animation: sd-ms 4.2s var(--ease-out-quint) infinite; }
.sd-check { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); animation: sd-check 4.2s var(--ease-out-quint) infinite; }
.sd-bar { width: 44px; height: 6px; border-radius: 3px; background: var(--sep-2); transform-origin: right center; animation: sd-bar 4.2s var(--ease-out-quint) infinite; }

/* empty course page: the same picture, as a soft looping hint */
.sd-empty-state .sd { max-width: 320px; margin: 0 auto 16px; text-align: start; background: var(--fill-2); }
.sd.ghost .sd-mod.in { animation: sd-loop 6s var(--ease-out-quint) infinite; animation-delay: calc(var(--i) * 180ms); }

@keyframes sd-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes sd-breathe { 50% { opacity: .55; } }
@keyframes sd-ms { 0% { opacity: 0; transform: translateX(-10px); } 10%, 86% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: none; } }
@keyframes sd-bar { 0%, 8% { transform: scaleX(0); } 30%, 100% { transform: scaleX(1); } 52% { opacity: 1; } 60%, 100% { opacity: .45; } }
@keyframes sd-check {
  0%, 46% { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); transform: scale(1); }
  52% { background: var(--c, var(--accent)); box-shadow: inset 0 0 0 1.5px var(--c, var(--accent)); transform: scale(.75); }
  60%, 100% { background: var(--c, var(--accent)); box-shadow: inset 0 0 0 1.5px var(--c, var(--accent)); transform: scale(1); }
}
@keyframes sd-loop { 0% { opacity: 0; transform: translateY(6px) scale(.98); } 6%, 84% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-4px); } }

/* quick-add: "סיכום פרק 3 @שישי #קריאה !דחוף" → chips, typed out on a loop while the add field is focused */
.qa-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; color: var(--ink); font-size: 12.5px; }
.qa-line { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.add-hint .qa-tok { animation: qa-tok 6s var(--ease-out-quint) infinite both; animation-delay: calc(var(--k) * .55s); }
.qa-arrow { color: var(--ink-3); animation: qa-chip 6s var(--ease-out-quint) infinite both; animation-delay: 2s; }
.qa-out { display: inline-flex; gap: 6px; }
.qa-chip { font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--card); box-shadow: var(--shadow); display: inline-block; animation: qa-chip 6s var(--ease-out-quint) infinite both; animation-delay: calc(2s + var(--k) * .2s); }
@keyframes qa-tok { 0% { opacity: 0; transform: translateY(3px); } 5% { opacity: 1; transform: none; background: var(--accent-soft); } 30%, 80% { opacity: 1; background: var(--fill-2); } 90%, 100% { opacity: 0; } }
@keyframes qa-chip { 0% { opacity: 0; transform: translateY(4px) scale(.92); } 5%, 66% { opacity: 1; transform: none; } 76%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .sd-mod.in, .sd.ghost .sd-mod.in, .sd-empty, .sd-ms, .sd-check, .sd-bar, .add-hint .qa-tok, .qa-arrow, .qa-chip { animation: none !important; }
}

/* ═════════════ The study ghost: Kernuli's face ═════════════
   A soft cream 3D buddy (public/mascot/ghost.webp). It materializes and floats on the chat home (poke it), peeks from
   behind the sign-in cards, bobs while it thinks or loads, naps over empty lists, cheers done missions and throws a
   party when a unit is finished. Every resting state is still and fully visible. */
.ghost { width: 100%; height: 100%; display: block; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.brand:hover .ghost { animation: ghost-wiggle .5s var(--ease-out-quint); }

/* chat home: fades in like a ghost would, then floats; a poke makes it squish, hop and send hearts */
.chat-welcome .brand-mark.xl { cursor: pointer; animation: ghost-appear .9s var(--ease-out-quint) .15s both; }
.brand-mark.xl .ghost { filter: drop-shadow(0 8px 12px rgba(80, 60, 140, .18)); animation: ghost-float 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
.brand-mark.xl.boop .ghost { animation: ghost-boop .65s var(--ease-out-quint), ghost-float 3.6s ease-in-out .65s infinite; }

/* chat thinking + loading: bob and gently fade in and out */
/* Kernuli's side of the chat (the far edge, mirroring the student's ghost on theirs): its face beside every reply,
   and the same spot while it thinks, so the answer lands where the thinking was */
.msg.ai.thinking { display: flex; flex-direction: row-reverse; justify-content: flex-start; align-items: center; gap: 10px; max-width: none; }
.msg.ai:not(.thinking) { grid-template-columns: minmax(0, 1fr) 28px; column-gap: 10px; margin-inline-start: auto; }
.msg.ai > :not(.ai-ghost) { grid-column: 1; }
.ai-ghost { grid-column: 2; grid-row: 1 / span 3; align-self: start; width: 28px; height: 28px; margin-top: 1px; }
.ghost-think { width: 30px; height: 30px; flex: none; animation: ghost-bob 1.1s ease-in-out infinite, ghost-breathe 2.2s ease-in-out infinite; }
.spin-ghost { width: 24px; height: 24px; flex: none; animation: ghost-bob 1.1s ease-in-out infinite, ghost-breathe 2.2s ease-in-out infinite; }

/* sign-in: peeks out from behind the date card, seen softly through its frosted glass */
.auth-art .fcard { position: relative; z-index: 1; }
.auth-ghost { position: absolute; z-index: 0; top: -70px; inset-inline-start: 136px; width: 96px; height: 96px; animation: ghost-peek 1.1s var(--ease-out-quint) .5s both; }
.auth-ghost .ghost { filter: drop-shadow(0 8px 14px rgba(80, 60, 140, .2)); animation: ghost-float 3.6s ease-in-out 1.6s infinite; }

/* empty lists: the ghost naps above the message, with a slow z */
.empty:not(.sd-empty-state) { position: relative; }
.empty:not(.sd-empty-state)::before { content: ""; display: block; width: 58px; height: 58px; margin: 0 auto 10px; background: url(/mascot/moods/sleepy.webp) center / contain no-repeat; animation: ghost-float 3.6s ease-in-out infinite; }
.empty:not(.sd-empty-state)::after { content: "z"; position: absolute; top: 22px; left: calc(50% + 26px); font-size: 13px; font-weight: 700; color: var(--ink-3); animation: ghost-z 2.8s ease-in-out infinite; }
.palette .empty::before { width: 40px; height: 40px; background-image: url(/mascot/moods/surprised.webp); }
.palette .empty::after { display: none; }

/* a done mission: a small ghost pops out of the checkbox, hops, then drifts up and fades */
.ghost-cheer { position: fixed; z-index: 80; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none; animation: ghost-cheer 1.25s var(--ease-out-quint) forwards; }
/* a finished unit: the ghost flies up from the bottom, does a happy flip and floats off */
.ghost-party { position: fixed; inset: 0; z-index: 80; pointer-events: none; display: grid; place-items: end center; }
.gp-ghost { width: 120px; height: 120px; margin-bottom: 22vh; filter: drop-shadow(0 14px 22px rgba(80, 60, 140, .28)); animation: ghost-party 2.5s var(--ease-out-quint) forwards; }
/* emoji confetti, flung out along --a by --d */
.burst { position: fixed; z-index: 81; width: 0; height: 0; pointer-events: none; }
.burst i { position: absolute; left: 0; top: 0; font-style: normal; font-size: 15px; line-height: 1; translate: -50% -50%; animation: burst-fly .9s var(--ease-out-quint) forwards; }

/* the student's own ghost: their avatar in the sidebar and beside their chat messages */
.avatar.me { background: #ece9f6; border-radius: 30%; overflow: hidden; }
/* a still frame by default; the animated loop is layered on top only when it should feel alive (hover, chosen, meeting
   it), so the still shows while the loop loads and nothing moves in the corner of your eye */
.me-ghost { display: block; width: 100%; height: 100%; background: var(--g) 50% 42% / 150% no-repeat; }
.user-chip:hover .me-ghost, .gg-opt:hover .me-ghost, .gg-opt.on .me-ghost, .meet-ghost .me-ghost { background-image: var(--ga), var(--g); }
.msg.user { align-items: flex-end; gap: 8px; }
.msg.user .avatar.me { width: 28px; height: 28px; margin-bottom: 2px; }
/* the ghost picker: app-icon tiles, the chosen one dances inside a ring */
.ghost-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px 8px; }
.gg-opt { display: grid; justify-items: center; gap: 7px; padding: 8px 4px 6px; border: 0; background: none; border-radius: 14px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background .12s, color .12s; }
.gg-opt:hover { background: var(--fill-2); color: var(--ink); }
.gg-opt .me-ghost { width: 72px; height: 72px; border-radius: 22px; background-size: 118%; background-position: 50% 45%; box-shadow: 0 1px 2px rgba(15, 15, 15, .08); transition: box-shadow .15s var(--ease), transform .3s var(--ease-out-quint); }
.gg-opt:hover .me-ghost { transform: translateY(-3px); }
.gg-opt.on { color: var(--ink); font-weight: 650; }
.gg-opt.on .me-ghost { box-shadow: 0 0 0 2.5px var(--card), 0 0 0 5px var(--main), 0 8px 18px rgba(15, 15, 15, .14); animation: ghost-pick .45s var(--ease-out-quint); }
/* meet your ghost: one warm moment the first time, centred like a card being handed over */
.meet-modal { width: min(400px, 100%); }
.meet { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 30px 28px 24px; }
.meet-ghost { width: 168px; height: 168px; border-radius: 44px; overflow: hidden; box-shadow: 0 18px 36px rgba(60, 40, 120, .22); margin-bottom: 8px; animation: meet-in .7s var(--ease-out-quint) .1s both; }
.meet-ghost .me-ghost { background-size: 100%; background-position: center; }
.meet h2 { margin: 6px 0 0; font-size: 22px; font-weight: 700; }
.meet p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; text-wrap: balance; }
.meet p b { color: var(--ink); }
.meet-btns { display: flex; gap: 8px; margin-top: 12px; width: 100%; }
.meet-btns .btn { flex: 1; height: 40px; }
@keyframes meet-in { from { opacity: 0; transform: translateY(18px) scale(.8) rotate(-6deg); } }
@keyframes ghost-pick { 40% { transform: scale(1.12) rotate(-6deg); } }
@media (max-width: 560px) { .ghost-grid { grid-template-columns: repeat(3, 1fr); } }

@keyframes ghost-float { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes ghost-bob { 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes ghost-breathe { 50% { opacity: .6; } }
@keyframes ghost-wiggle { 30% { transform: rotate(-8deg); } 65% { transform: rotate(6deg); } }
@keyframes ghost-appear { from { opacity: 0; transform: translateY(16px) scale(.7); filter: blur(6px); } }
@keyframes ghost-peek { from { opacity: 0; transform: translateY(56px) scale(.9); } 60% { opacity: 1; transform: translateY(-6px); } }
@keyframes ghost-boop {
  0% { transform: none; } 18% { transform: translateY(4px) scale(1.18, .82); }
  45% { transform: translateY(-22px) scale(.9, 1.12) rotate(-6deg); } 72% { transform: translateY(2px) scale(1.08, .93); } 100% { transform: none; }
}
@keyframes ghost-z { 0% { opacity: 0; transform: translate(0, 6px) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(10px, -14px) scale(1.15); } }
@keyframes ghost-cheer {
  0% { opacity: 0; transform: translateY(0) scale(.3); } 22% { opacity: 1; transform: translateY(-30px) scale(1.12); }
  34% { transform: translateY(-24px) scale(1.12, .9); } 50% { transform: translateY(-38px) rotate(-10deg); }
  64% { transform: translateY(-34px) rotate(8deg); } 100% { opacity: 0; transform: translateY(-70px) scale(.85); }
}
@keyframes ghost-party {
  0% { opacity: 0; transform: translateY(40vh) scale(.6); } 22% { opacity: 1; transform: translateY(-10px) scale(1.05); }
  30% { transform: translateY(0) scale(1.14, .88); } 42% { transform: translateY(-40px) rotate(-180deg) scale(.95); }
  54% { transform: translateY(0) rotate(-360deg) scale(1.1, .9); } 62% { transform: rotate(-360deg); }
  80% { opacity: 1; transform: translateY(-20px) rotate(-360deg); } 100% { opacity: 0; transform: translateY(-34vh) rotate(-360deg) scale(.8); }
}
@keyframes burst-fly {
  from { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(calc(var(--a) * -1)) scale(.3); }
  70% { opacity: 1; } to { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(calc(var(--a) * -1)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ghost, .ghost-think, .spin-ghost, .brand-mark.xl, .auth-ghost, .empty::before, .ghost-cheer, .gp-ghost, .gg-opt .me-ghost, .meet-ghost { animation: none !important; }
  .me-ghost { background-image: var(--g) !important; }
  .empty:not(.sd-empty-state)::after { display: none; }
}
