/* Collego landing page. Every value below follows design/roll.json
   (seed 203367186). Re-roll with `python design/roll.py`. */

:root {
  /* high-contrast black and white; rolled hues (238 indigo, complement 58 yellow,
     accent 328 pink) appear only as muted accents */
  --ink: #0a0a0a;
  --paper: #ffffff;
  --muted: #3a3a3a;
  --indigo: hsl(238 38% 46%);
  --indigo-soft: hsl(238 38% 95%);
  --yellow: hsl(58 42% 46%);
  --yellow-soft: hsl(58 50% 93%);
  --pink: hsl(328 38% 52%);
  --pink-soft: hsl(328 40% 95%);
  --grad: linear-gradient(135deg, var(--indigo), var(--pink));

  --display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* type scale 1.2 from 17px */
  --t-1: 17px;
  --t0: 20.4px;
  --t1: 24.5px;
  --t2: 29.4px;
  --t3: 35.3px;
  --t4: 42.3px;
  --t5: 50.8px;

  --radius: 10px;
  --border: 1.5px dashed var(--ink);
  --raise: 0 14px 34px -16px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.06);
  --raise-lg: 0 26px 54px -22px rgba(0, 0, 0, 0.42), 0 4px 10px rgba(0, 0, 0, 0.06);
  --maxw: 1040px;
  --track: 0.04em;            /* wide letter-spacing on headings */
  --track-wide: 0.16em;       /* labels */
  --measure: 65ch;            /* medium line length */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-1);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: var(--track);
  line-height: 1.02;
  margin: 0 0 16px;
  text-wrap: balance;
}
h1 { font-size: clamp(60px, 11vw, 124px); line-height: 0.96; margin-bottom: 24px; }
h2 { font-size: clamp(38px, 5.5vw, 64px); }
h3 { font-size: 26px; margin-bottom: 8px; }
p { margin: 0 0 14px; max-width: var(--measure); }
.lead { font-size: var(--t0); color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---- grain overlay (motif) ---- */
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: 0.16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

/* ---- top bar (nav) ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper); border-bottom: var(--border);
}
.topbar .wrap { display: flex; align-items: center; gap: 26px; height: 64px; }
.wordmark { font-family: var(--display); font-size: 28px; letter-spacing: var(--track); color: var(--ink); }
.wordmark:hover { text-decoration: none; }
.topbar nav { display: flex; gap: 22px; margin-left: auto; }
.topbar nav a { color: var(--ink); font-size: 14px; font-weight: 500; letter-spacing: 0.04em; }
.topbar nav a.on { color: var(--indigo); }
.topbar .btn { padding: 10px 18px; font-size: 14px; }

/* ---- buttons: gradient ---- */
.btn {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius);
  box-shadow: var(--raise);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  will-change: transform;
}
.btn:hover { text-decoration: none; box-shadow: var(--raise-lg); }
.btn.quiet { background: var(--paper); color: var(--ink); border: var(--border); box-shadow: none; }

/* ---- ticker hero ---- */
.ticker {
  border-bottom: var(--border);
  overflow: hidden; white-space: nowrap; padding: 13px 0;
}
.ticker-track { display: inline-flex; align-items: center; animation: ticker 52s linear infinite; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 22px; padding-right: 22px;
  font-size: 13px; font-weight: 600; letter-spacing: var(--track-wide);
}
.sq { display: inline-block; width: 9px; height: 9px; background: var(--ink); flex: none; }
.sq.i { background: var(--indigo); }
.sq.y { background: var(--yellow); }
.sq.p { background: var(--pink); }
@keyframes ticker { to { transform: translateX(-50%); } }

.hero { padding: 76px 0 56px; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center; }
.hero .lead { font-size: var(--t1); max-width: 30ch; }
.cta-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-top: 26px; }
.cta-row a:not(.btn) { font-weight: 500; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 380px; height: auto; }

/* ---- sections ---- */
.sec { padding: 84px 0 10px; }
.sec-head { max-width: var(--measure); margin-bottom: 30px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: var(--track-wide); color: var(--indigo);
  margin-bottom: 14px;
}
.kicker::before { content: ""; width: 9px; height: 9px; background: var(--indigo); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---- cards: raised, dashed ---- */
.card {
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--raise);
  padding: 28px 28px 24px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  will-change: transform;
}
.card:hover { box-shadow: var(--raise-lg); }
.card p { margin-bottom: 0; color: var(--muted); font-size: 15.5px; }
.card .icon { display: block; width: 30px; height: 30px; margin-bottom: 16px; }
.card .n {
  font-family: var(--display); font-size: 44px; line-height: 1; color: var(--indigo);
  display: block; margin-bottom: 10px;
}
.card .n.y { color: var(--yellow); }
.card .n.p { color: var(--pink); }
.card.tint-i { background: var(--indigo-soft); }
.card.tint-y { background: var(--yellow-soft); }
.card.tint-p { background: var(--pink-soft); }

/* ---- feed-link dialog mock ---- */
.dialog {
  border: var(--border); border-radius: var(--radius); box-shadow: var(--raise);
  background: var(--paper); padding: 30px 32px; max-width: 600px; margin: 34px auto 0;
}
.dialog .dtitle { font-family: var(--display); font-size: var(--t1); letter-spacing: var(--track); margin-bottom: 6px; }
.dialog .dtext { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.dialog .durl {
  font-family: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12.5px;
  border: var(--border); border-radius: var(--radius); padding: 10px 14px;
  background: var(--indigo-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dialog .dbtn { display: inline-block; margin-top: 12px; font-size: 13px; padding: 8px 16px; }
.note {
  margin: 22px auto 0; max-width: 600px; padding: 16px 20px;
  border: var(--border); border-radius: var(--radius); background: var(--yellow-soft); font-size: 15px;
}

/* ---- faq ---- */
details {
  border: var(--border); border-radius: var(--radius); background: var(--paper);
  box-shadow: var(--raise); padding: 18px 24px; margin-bottom: 12px;
}
details summary { cursor: pointer; font-family: var(--display); font-size: 23px; letter-spacing: var(--track); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--ink); margin-right: 14px; vertical-align: middle; }
details[open] summary::before { background: var(--indigo); }
details p { margin: 10px 0 2px 23px; color: var(--muted); }

/* ---- cta ---- */
.cta { padding: 96px 0 20px; text-align: center; }
.cta .card { padding: 56px 28px; }
.cta p { margin-left: auto; margin-right: auto; }
.cta .cta-row { justify-content: center; }

/* ---- footer: giant wordmark ---- */
footer { margin-top: 80px; border-top: var(--border); padding: 30px 0 28px; overflow: hidden; }
.giant {
  font-family: var(--display); font-size: clamp(88px, 23vw, 270px); line-height: 0.85;
  letter-spacing: 0.02em; color: var(--ink); white-space: nowrap; margin: 0 0 18px -0.04em;
}
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; font-size: 14px; color: var(--muted); }
.foot-row a { color: var(--ink); }

/* ---- motion: hover-tilt is set inline by landing.js; reduced motion turns everything off ---- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .card, .btn { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- responsive ---- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 56px; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 300px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .topbar nav { display: none; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 22px 20px 20px; }
  .sec { padding-top: 64px; }
  .dialog { padding: 22px 20px; }
  h1 { font-size: clamp(52px, 15vw, 72px); }
}

/* ---- app pages: sign-in, dashboard shell (same tokens) ---- */
main.app { padding: 56px 22px 40px; min-height: 60vh; }
.card.auth { max-width: 520px; margin: 0 auto; padding: 40px 36px 32px; }
.card.auth .h2 { font-size: clamp(38px, 6vw, 56px); margin-top: 6px; }
.card.auth .lead { margin-bottom: 22px; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.btn.google .sq { background: #fff; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; letter-spacing: var(--track-wide); margin: 22px 0 18px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: var(--border); }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.field input { font: inherit; font-weight: 400; letter-spacing: 0; padding: 12px 14px; border: var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.field input:focus { outline: 2px solid var(--indigo); outline-offset: 2px; }
.field input:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }
button.btn { cursor: pointer; font-family: var(--body); }
.card.auth .btn.quiet { width: 100%; text-align: center; }
.alert { border: var(--border); border-radius: var(--radius); background: var(--pink-soft); padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-weight: 500; font-size: 14px; letter-spacing: 0.04em; color: var(--ink); cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.topbar nav form.inline { display: inline-flex; }
footer.mini { margin-top: 40px; border-top: var(--border); padding: 18px 0; font-size: 13px; color: var(--muted); }
footer.mini .wrap { display: flex; gap: 18px; align-items: center; }
footer.mini a { color: var(--ink); }

/* ---- app: wizard, settings, dashboard ---- */
main.app.wide { max-width: 1120px; }
.card.form { max-width: 720px; margin: 0 auto; padding: 36px 34px 30px; }
.card.form h3 { margin-top: 26px; font-size: 22px; }
.card.form .h2 { font-size: clamp(36px, 5.5vw, 52px); margin-top: 6px; }
.progress { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0 auto 22px; max-width: 720px; font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }
.progress li { display: flex; align-items: center; gap: 8px; }
.progress li span { display: inline-grid; place-items: center; width: 22px; height: 22px; border: var(--border); border-radius: 6px; font-size: 12px; font-weight: 600; }
.progress li.now { color: var(--ink); font-weight: 600; }
.progress li.now span { background: var(--ink); color: #fff; border-style: solid; }
.progress li.done span { background: var(--indigo-soft); }
.grid-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; align-items: end; }
.field.narrow { max-width: 200px; }
.field select, .field textarea { font: inherit; font-weight: 400; letter-spacing: 0; padding: 12px 14px; border: var(--border); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.field textarea { resize: vertical; }
.field small { font-weight: 400; letter-spacing: 0; }
.choices { border: var(--border); border-radius: var(--radius); padding: 14px 16px 8px; margin: 18px 0 14px; }
.choices legend { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; padding: 0 6px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 15px; }
.choice input { margin-top: 4px; accent-color: var(--indigo); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 15px; padding: 10px 0; }
.switch input { width: 18px; height: 18px; accent-color: var(--indigo); }
.switch.off { color: var(--muted); }
.switch em { font-style: normal; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); margin-left: 6px; }
.days { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.day-box { display: inline-flex; align-items: center; gap: 6px; border: var(--border); border-radius: var(--radius); padding: 8px 12px; font-size: 14px; cursor: pointer; }
.day-box input { accent-color: var(--indigo); }
.steps-mini { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.steps-mini li { margin-bottom: 4px; }
.memories { list-style: none; margin: 0 0 18px; padding: 0; }
.memories li { display: flex; gap: 12px; align-items: baseline; border: var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 8px; font-size: 15px; }
.memories li span:first-child { flex: 1; }
.linkbtn.danger { color: var(--pink); }
.hidden { display: none; }
.course-list { display: grid; gap: 10px; margin-top: 14px; }
.course-row { display: grid; grid-template-columns: 130px 1fr 52px; gap: 12px; align-items: center; }
.course-row code { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.course-row input[type=text], .course-row input:not([type]) { font: inherit; padding: 10px 12px; border: var(--border); border-radius: var(--radius); }
.course-row input[type=color] { width: 52px; height: 42px; padding: 2px; border: var(--border); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.actions .grow { flex: 1; }
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.side { display: grid; gap: 10px; position: sticky; top: 84px; }
.side a { color: var(--ink); font-size: 15px; padding: 8px 12px; border-radius: var(--radius); border: 1.5px dashed transparent; }
.side a.on { border-color: var(--ink); background: var(--indigo-soft); }
.side a.fine { color: var(--muted); margin-top: 10px; }
.dash-head { margin-bottom: 18px; }
.dash-head .h2 { font-size: clamp(40px, 6vw, 60px); margin-bottom: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0 8px; }
.pills { display: inline-flex; border: var(--border); border-radius: var(--radius); overflow: hidden; }
.pills button { border: 0; background: transparent; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; }
.pills button.on { background: var(--ink); color: #fff; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.summary { font-size: 17px; color: var(--muted); margin: 8px 0 18px; }
.summary b { color: var(--ink); }
.summary .late, .meta .late { color: var(--pink); font-weight: 600; }
.meta .soon { color: var(--yellow); font-weight: 600; }
.day { margin: 26px 0 8px; font-size: 13px; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); font-weight: 600; }
.day.today { color: var(--indigo); }
.day.late-h { color: var(--pink); }
.item { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: var(--border); border-radius: var(--radius); box-shadow: var(--raise); padding: 14px 16px; margin-bottom: 10px; }
.item input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--indigo); cursor: pointer; flex: none; }
.item.done { opacity: 0.5; }
.item.done .name { text-decoration: line-through; }
.item .body { flex: 1; min-width: 0; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; padding: 2px 9px; border-radius: 6px; margin-bottom: 4px; color: var(--c, var(--indigo)); background: color-mix(in srgb, var(--c, var(--indigo)) 14%, #fff); border: 1px dashed var(--c, var(--indigo)); }
.item .name { display: block; color: var(--ink); font-weight: 500; }
.item .meta { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.empty { text-align: center; padding: 48px 0 32px; }
#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: 14px; opacity: 0; transition: opacity 0.25s; pointer-events: none; z-index: 60; }
#toast.show { opacity: 0.96; }
@media (max-width: 760px) {
  .grid-form { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .side { position: static; display: flex; flex-wrap: wrap; }
  .course-row { grid-template-columns: 1fr 52px; }
  .course-row code { grid-column: 1 / -1; }
}

/* ---- notification panels and switches ---- */
h3.group { font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: var(--track-wide); color: var(--indigo); margin: 26px 0 10px; }
h3.group::before { content: ""; display: inline-block; width: 9px; height: 9px; background: var(--indigo); margin-right: 10px; vertical-align: 1px; }
.panel { border: var(--border); border-radius: var(--radius); background: var(--paper); padding: 16px 18px; margin: 0 0 12px; }
.panel.off { color: var(--muted); background: #fafafa; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-head b { font-size: 17px; }
.panel-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.panel-body { margin-top: 14px; display: grid; gap: 12px; }
.panel-body .days { margin: 0; }
.panel-body .grid-form { align-items: start; }
.toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; margin-top: 2px; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle i { position: absolute; inset: 0; border: var(--border); border-radius: 999px; background: var(--paper); transition: background 0.15s, border-color 0.15s; cursor: pointer; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform 0.15s, background 0.15s; }
.toggle input:checked + i { background: var(--indigo); border-color: var(--indigo); border-style: solid; }
.toggle input:checked + i::after { background: #fff; transform: translateX(20px); }
.toggle input:disabled + i { opacity: 0.4; cursor: not-allowed; }
.toggle input:focus-visible + i { outline: 2px solid var(--indigo); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.panel-body .btn { justify-self: start; }

/* ---- new-course dialog, badges ---- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 10, 10, 0.45); z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal { max-width: 540px; width: 100%; padding: 30px 30px 24px; }
.modal h2 { font-size: clamp(32px, 5vw, 44px); margin: 4px 0 10px; }
.badge { display: inline-block; font-family: var(--body); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; background: var(--pink); padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.course-row { grid-template-columns: 150px 1fr 52px auto; }
#notices .note { margin: 0 0 14px; }
@media (max-width: 760px) { .course-row { grid-template-columns: 1fr 52px auto; } }

/* ---- check-off animation ---- */
.item { overflow: hidden; transition: opacity 0.28s ease, transform 0.28s ease, max-height 0.32s ease, margin-bottom 0.32s ease, padding-top 0.32s ease, padding-bottom 0.32s ease, border-width 0.32s ease; }
.item.leaving { opacity: 0; transform: translateX(18px); margin-bottom: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; border-bottom-width: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .item { transition: none; } }
#toast { pointer-events: auto; }
#toast button { margin-left: 12px; background: #fff; color: var(--ink); border: 0; border-radius: 6px; padding: 4px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.summary a { color: var(--indigo); font-weight: 500; }

/* ---- exam checker ---- */
.h3 { font-size: 30px; }
.ex-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; border: var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; align-items: start; }
.ex-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 8px; accent-color: var(--indigo); }
.ex-row.dup { background: #fafafa; }
.ex-row.added { opacity: 0.55; }
.ex-fields { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; }
.ex-fields input, .ex-fields select { font: inherit; font-size: 15px; padding: 8px 10px; border: var(--border); border-radius: var(--radius); background: var(--paper); min-width: 0; }
.ex-meta { margin-top: 6px; }
.ex-src { margin-top: 4px; font-style: italic; }
.badge.type { background: var(--indigo); }
.badge.conf-high { background: #2f7f6f; }
.badge.conf-medium { background: var(--yellow); }
.badge.conf-low { background: var(--pink); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--indigo); border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.grid-3 .wide-card { grid-column: 1 / -1; }
@media (max-width: 760px) { .ex-fields { grid-template-columns: 1fr 1fr; } }

/* ---- exams page: two columns, timeline ---- */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }
.panel-card { padding: 26px 28px 24px; }
.panel-card .h3 { margin: 4px 0 8px; }
.panel-card .kicker { margin-bottom: 6px; }
.panel-card .field select, .panel-card .field input[type=file] { font: inherit; padding: 10px 12px; border: var(--border); border-radius: var(--radius); background: var(--paper); }
.panel-card .divider { margin: 6px 0; }
.ex-month { font-size: 12px; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.ex-month:first-child { margin-top: 6px; }
.ex-ev { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 0; border-top: 1px dashed #c9c9c9; align-items: center; }
.ex-when { text-align: center; border: var(--border); border-radius: var(--radius); padding: 6px 0 4px; }
.ex-when b { display: block; font-family: var(--display); font-size: 26px; line-height: 1; }
.ex-when span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.ex-ev .fine { margin-top: 2px; }
#ex-results { margin-top: 20px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---- exams page: course filter chips ---- */
.ex-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 2px; }
.fchip { font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; padding: 5px 11px; border-radius: 999px; border: 1.5px dashed #b5b5b5; background: var(--paper); color: var(--muted); cursor: pointer; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.fchip span { font-weight: 500; opacity: 0.7; margin-left: 2px; }
.fchip:hover { border-color: var(--c, var(--ink)); color: var(--c, var(--ink)); }
.fchip.on { border: 1.5px solid var(--c, var(--ink)); color: var(--c, var(--ink)); background: color-mix(in srgb, var(--c, var(--ink)) 14%, #fff); }
.fchip:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }

/* ---- dashboard: calendar view ---- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.cal-cell { border: var(--border); border-radius: var(--radius); background: var(--paper); min-height: 150px; padding: 8px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.cal-cell.today { border-style: solid; border-color: var(--indigo); box-shadow: var(--raise); }
.cal-cell.wknd { background: #fafafa; }
.cal-cell.blank { border-style: dotted; opacity: 0.35; }
.cal-head { display: flex; align-items: baseline; gap: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.cal-head b { font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: 0; color: var(--ink); font-weight: 400; }
.cal-cell.today .cal-head { color: var(--indigo); }
.cal-cell.today .cal-head b { color: var(--indigo); }
.cal-head .n { margin-left: auto; border: 1px dashed var(--muted); border-radius: 999px; padding: 0 6px; font-size: 10.5px; }
.cal-it { display: flex; gap: 6px; align-items: flex-start; border-left: 3px solid var(--c, var(--indigo)); background: color-mix(in srgb, var(--c, var(--indigo)) 9%, #fff); border-radius: 6px; padding: 5px 6px 5px 7px; font-size: 12.5px; line-height: 1.3; overflow: hidden; transition: opacity 0.35s, max-height 0.4s, margin 0.4s, padding 0.4s; }
.cal-it input { width: 14px; height: 14px; margin-top: 2px; accent-color: var(--indigo); flex: none; cursor: pointer; }
.cal-it .cal-body { flex: 1; min-width: 0; }
.cal-it .cal-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.cal-it a.cal-name:hover { text-decoration: underline; }
.cal-it .cal-time { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.cal-it.done { opacity: 0.45; }
.cal-it.done .cal-name { text-decoration: line-through; }
.cal-it.leaving { opacity: 0; margin-top: -6px; padding-top: 0; padding-bottom: 0; pointer-events: none; }
.late-box { margin: 0 0 16px; padding: 10px 14px; border: 1.5px dashed var(--pink); border-radius: var(--radius); background: var(--paper); }
.late-box summary { cursor: pointer; font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--pink); list-style: none; }
.late-box summary::before, .late-box[open] summary::before { background: var(--pink); }
.late-box .item { margin-top: 10px; }
@media (max-width: 900px) { .cal { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cal-cell.blank { display: none; } }
@media (max-width: 520px) { .cal { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .cal-it { transition: none; } }

/* ---- calendar: capped boxes and the day popover ---- */
.cal-more { font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--indigo); background: none; border: 0; padding: 2px 4px; cursor: pointer; text-align: left; align-self: flex-start; }
.cal-more:hover { text-decoration: underline; }
.day-modal { max-height: 84vh; overflow: auto; }
.day-modal .dm-list { margin-top: 12px; }
.day-modal .item { box-shadow: none; }
.day-modal .actions { margin-top: 12px; }

/* ---- v0.7: tasks, reminders, catch-up, notes, export ---- */
.course-row .note-in { grid-column: 1 / -1; font-size: 14px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.copy-row input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 9px 12px; border: var(--border); border-radius: var(--radius); background: #fafafa; color: var(--muted); }
.catchup { margin: 2px 0 14px; }
.late-box .catchup { margin: 8px 0 4px; }
.item .cnote { font-size: 13px; color: var(--muted); font-style: italic; margin-top: 2px; }
.meta a { color: var(--indigo); }
.meta a.rem-on { font-weight: 600; }
.rem-list label { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #d9d9d9; font-size: 15px; cursor: pointer; }
.rem-list label:last-child { border-bottom: 0; }
.rem-list input { accent-color: var(--indigo); width: 18px; height: 18px; flex: none; }
.note.clash { border-color: var(--pink); background: var(--pink-soft); margin: 0 0 14px; }
.modal .field input, .modal .field select { width: 100%; }
.modal .stack { margin-top: 10px; }

/* ---- app skin (v0.8): one clean system for signed-in pages ---- */
body.in-app {
  --border: 1px solid #e3e3ea; --radius: 12px;
  --raise: 0 1px 2px rgba(16, 16, 40, 0.04), 0 10px 28px -16px rgba(16, 16, 40, 0.16);
  --raise-lg: 0 16px 40px -16px rgba(16, 16, 40, 0.22);
  background-color: #fbfbfd;
  background-image: linear-gradient(to right, rgba(20, 20, 40, 0.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(20, 20, 40, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
}
body.in-app .grain { display: none; }
body.in-app .wrap, body.in-app main.app.wide { max-width: 1160px; }
body.in-app .topbar { background: #fff; border-bottom: 1px solid #e3e3ea; }
body.in-app .topbar .wrap { height: 60px; }
body.in-app .topbar nav { align-items: center; gap: 26px; }
body.in-app .topbar nav a { font-size: 15px; font-weight: 500; letter-spacing: 0; padding: 20px 0; color: var(--muted); }
body.in-app .topbar nav a.on { color: var(--indigo); box-shadow: inset 0 -2px 0 var(--indigo); }
body.in-app .kicker { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; font-weight: 600; }
body.in-app .kicker::before { display: none; }
body.in-app .btn { background: var(--indigo); background-image: none; color: #fff; border: 0; box-shadow: none; border-radius: 10px; }
body.in-app .btn:hover { background: #3e4390; box-shadow: none; }
body.in-app .btn.quiet { background: #fff; color: var(--ink); border: var(--border); }
body.in-app .btn.quiet:hover { background: #f5f5f9; }
body.in-app .chip { border-style: solid; border-color: color-mix(in srgb, var(--c, var(--indigo)) 28%, #fff); }
body.in-app .fchip { border-style: solid; }
body.in-app .ex-ev { border-top: 1px solid #ececf1; }
body.in-app .rem-list label { border-bottom: 1px solid #ececf1; }
body.in-app .divider::before, body.in-app .divider::after { border-top: 1px solid #e3e3ea; }
body.in-app .note { display: flex; gap: 10px; align-items: flex-start; border: 1px solid color-mix(in srgb, var(--yellow) 40%, #fff); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; }
body.in-app .note.clash { border-color: color-mix(in srgb, var(--pink) 32%, #fff); background: var(--pink-soft); margin: 0 0 14px; }
.note.clash svg { width: 18px; height: 18px; color: var(--pink); flex: none; margin-top: 2px; }
body.in-app .summary { font-size: 14px; margin: 0 0 12px; }
body.in-app .late-box { border: 1px solid color-mix(in srgb, var(--pink) 32%, #fff); background: #fff; }
.late-box .catch-link { display: inline-block; margin: 6px 0 10px; color: var(--indigo); }

/* avatar menu in the top bar */
.avatar { position: relative; margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.avatar summary { list-style: none; width: 36px; height: 36px; border-radius: 50%; background: #ececf4; color: var(--indigo); font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: 0.02em; display: grid; place-items: center; cursor: pointer; }
.avatar summary::before, .avatar[open] summary::before { display: none; content: none; }
.avatar summary::-webkit-details-marker { display: none; }
.avatar .menu { position: absolute; right: 0; top: 44px; background: #fff; border: var(--border); border-radius: 10px; box-shadow: var(--raise-lg); padding: 6px; min-width: 200px; z-index: 50; }
.avatar .who { padding: 8px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid #ececf1; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar .menu a, .avatar .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; font: inherit; font-size: 14px; background: none; border: 0; border-radius: 8px; color: var(--ink); cursor: pointer; }
.avatar .menu a:hover, .avatar .menu button:hover { background: #f3f3f8; text-decoration: none; }

/* header and stat band */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 26px 0 22px; }
.dash-head .h2 { font-size: clamp(40px, 5vw, 56px); margin: 4px 0 4px; }
.dash-head .fine { font-size: 15px; }
.dash-head .today { text-align: right; }
.dash-head .today b { display: block; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.2; }
.dash-head .today span { font-size: 14px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.stat { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border: 1px solid; border-radius: 14px; }
.stat.tint-i { background: var(--indigo-soft); border-color: color-mix(in srgb, var(--indigo) 22%, #fff); }
.stat.tint-p { background: var(--pink-soft); border-color: color-mix(in srgb, var(--pink) 22%, #fff); }
.stat.tint-y { background: var(--yellow-soft); border-color: color-mix(in srgb, var(--yellow) 32%, #fff); }
.stat > svg { width: 26px; height: 26px; flex: none; }
.stat.tint-i > svg { color: var(--indigo); } .stat.tint-p > svg { color: var(--pink); } .stat.tint-y > svg { color: #8a8400; }
.stat .n { font-family: var(--display); font-size: 46px; line-height: 1; color: var(--indigo); }
.stat .n.p { color: var(--pink); } .stat .n.y { color: #8a8400; }
.stat .txt { min-width: 0; }
.stat .txt b { display: block; font-size: 17px; font-weight: 500; color: var(--ink); }
.stat .txt span { font-size: 14px; color: var(--muted); }

/* main panel and toolbar */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dash.cal { grid-template-columns: 1fr; }
.dash.cal .rail { display: none; }
.panel-main { background: #fff; border: var(--border); border-radius: 14px; box-shadow: var(--raise); padding: 22px 24px 18px; min-width: 0; }
.panel-main .head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-main .head h2 { font-size: 30px; margin: 0; }
.btn.solid { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 15px; }
.btn.solid svg { width: 16px; height: 16px; }
.tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tools .sp { flex: 1; }
.seg { display: inline-flex; border: var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: transparent; padding: 9px 16px; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg button + button { border-left: var(--border); }
.seg button.on { background: var(--indigo-soft); color: var(--indigo); font-weight: 500; }
.seg svg { width: 15px; height: 15px; }
.iconbtn { width: 38px; height: 38px; border: var(--border); border-radius: 10px; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { color: var(--indigo); }
.review-bar { display: flex; align-items: center; gap: 10px; background: var(--yellow-soft); border: 1px solid color-mix(in srgb, var(--yellow) 38%, #fff); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; font-size: 14.5px; color: #5d4f00; }
.review-bar > svg { width: 18px; height: 18px; color: #8a8400; flex: none; }
.review-bar b { font-weight: 500; }
.review-bar a { margin-left: auto; color: var(--indigo); font-weight: 500; display: inline-flex; gap: 2px; align-items: center; white-space: nowrap; }
.review-bar a svg { width: 16px; height: 16px; }

/* sections and rows */
.tsec { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; }
.tsec h3 { font-family: var(--display); font-weight: 400; font-size: 23px; margin: 0; letter-spacing: 0; }
.tsec .cnt { font-size: 12.5px; font-weight: 600; background: #eeeef3; color: var(--muted); border-radius: 999px; padding: 2px 9px; }
.tsec .r { margin-left: auto; font-size: 14px; color: var(--muted); }
.tsec .r a { color: var(--indigo); font-weight: 500; }
.tlist { border: var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.trow { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-top: 1px solid #ececf1; transition: opacity 0.35s, max-height 0.4s, padding 0.4s; overflow: hidden; }
.trow:first-child { border-top: 0; }
.trow input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--indigo); flex: none; cursor: pointer; }
.trow .body { flex: 1; min-width: 0; }
.trow .name { display: block; font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.35; }
.trow a.name:hover { color: var(--indigo); text-decoration: none; }
.trow .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; font-size: 14px; color: var(--muted); }
.trow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.trow .cb { font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 999px; padding: 2px 10px; }
.trow .tag { font-size: 12.5px; color: var(--muted); background: #f1f1f5; border-radius: 999px; padding: 2px 9px; }
.trow .past { color: var(--pink); font-weight: 600; }
.trow .soon { color: #8a6d00; font-weight: 600; }
.trow .meta a { color: var(--indigo); }
.trow .meta a.rem-on { font-weight: 600; }
.trow .cnote { flex-basis: 100%; font-style: italic; font-size: 13px; }
.trow.mute { color: var(--muted); font-size: 14.5px; }
.trow.done { opacity: 0.5; }
.trow.done .name { text-decoration: line-through; }
.trow.leaving { opacity: 0; padding-top: 0; padding-bottom: 0; pointer-events: none; }
.empty-add { border: 1.5px dashed #c9c9d4; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.empty-add a { color: var(--indigo); font-weight: 500; }
.dm-list.tlist { margin-top: 12px; }

/* right rail */
.rail { display: grid; gap: 16px; position: sticky; top: 80px; }
.rbox { background: #fff; border: var(--border); border-radius: 14px; box-shadow: var(--raise); padding: 18px 20px 16px; }
.rbox .rh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rbox .rh h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0; letter-spacing: 0; }
.rbox .rh > svg { width: 18px; height: 18px; color: var(--indigo); flex: none; }
.rbox .rh .r { margin-left: auto; font-size: 13px; color: var(--muted); display: inline-flex; gap: 2px; align-items: center; }
.rbox .rh .r button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px; display: grid; place-items: center; border-radius: 6px; }
.rbox .rh .r button:hover { background: #f3f3f8; color: var(--indigo); }
.rbox .rh .r button svg { width: 16px; height: 16px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.wd { text-align: center; border: var(--border); border-radius: 10px; padding: 7px 0 6px; font-size: 11px; color: var(--muted); background: #fff; }
.wd b { display: block; font-family: var(--body); font-weight: 600; font-size: 16px; color: var(--ink); margin: 2px 0 4px; }
.wd .dots { display: flex; justify-content: center; gap: 3px; min-height: 6px; }
.wd .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); }
.wd.today { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.wd.today b { color: #fff; }
.wd.today .dots i { background: #fff; }
.wd.past { opacity: 0.6; }
.week-cap { text-align: right; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.rail-exam .cb { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 999px; padding: 2px 10px; }
.rail-exam .nm { font-family: var(--display); font-size: 26px; margin: 8px 0 2px; line-height: 1.1; }
.rail-exam .fine { font-size: 14px; }
.rail-exam .req { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.rail-exam .req svg { width: 16px; height: 16px; flex: none; }
.rail-exam .more { display: inline-flex; align-items: center; gap: 2px; margin-top: 12px; color: var(--indigo); font-size: 14px; font-weight: 500; }
.rail-exam .more svg { width: 16px; height: 16px; }
.legend { list-style: none; margin: 0; padding: 0; }
.legend li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid #ececf1; font-size: 15px; }
.legend li:first-child { border-top: 0; padding-top: 2px; }
.legend i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); margin-top: 5px; }
.legend li > div { flex: 1; min-width: 0; }
.legend li .fine { font-size: 12.5px; font-style: italic; }
.legend span { font-weight: 500; color: var(--muted); }

/* ---- notes: a cork board of post-its (dashboard rail and Exams page) ---- */
.railcol { display: grid; gap: 16px; min-width: 0; align-content: start; }
.railcol .rail { position: static; }
.dash.cal .railcol { grid-column: 1 / -1; }
.notes { min-width: 0; max-width: 100%; }
.notes .rh .r button svg { width: 18px; height: 18px; }
.board { padding: 18px 14px 14px; border-radius: 10px; background-color: #e9dcc7;
  background-image: radial-gradient(rgba(110, 80, 40, 0.22) 1px, transparent 1.3px), radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.3px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 4px; box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.stickies { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; max-width: 100%; min-width: 0; }
.stickies:empty { display: none; }
.sticky { position: relative; min-width: 0; padding: 20px 14px 10px; background: #fff07a; color: #1b1b1b; font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-size: 19px; line-height: 1.25; font-weight: 500;
  box-shadow: 2px 6px 14px -4px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.1); transform: rotate(-2deg); transition: transform 0.15s ease; }
.sticky:hover { transform: rotate(0deg) scale(1.02); z-index: 2; }
.sticky.y { background: #fff07a; } .sticky.p { background: #ffb8cf; } .sticky.b { background: #bcd6ff; } .sticky.w { background: #fffdf5; }
.sticky.rot-b { transform: rotate(1.6deg); } .sticky.rot-c { transform: rotate(-1deg); }
.sticky::before { content: ""; position: absolute; left: 50%; top: -9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8aa8, #b8508a 60%, #7a2f5a); box-shadow: 0 3px 4px rgba(0, 0, 0, 0.35); z-index: 1; }
.sticky.y::before { background: radial-gradient(circle at 35% 35%, #8f95e8, #4a4fa0 60%, #2c3070); }
.sticky.b::before { background: radial-gradient(circle at 35% 35%, #e8e27a, #a8a23f 60%, #6f6a22); }
.sticky::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; pointer-events: none;
  background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.10) 50%, rgba(0, 0, 0, 0.04) 60%, rgba(255, 255, 255, 0.6) 100%); }
.sticky p { margin: 0 0 8px; overflow-wrap: anywhere; }
.sticky p.ntext { cursor: text; }
.sticky p b { font-weight: 600; }
.sticky a { color: #2d3190; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.sticky .doodle { display: block; width: 100%; aspect-ratio: 3.2 / 1; height: auto; margin: 0 0 4px; cursor: pointer; }
.sticky-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--body); font-size: 11px; color: #4a4a4a; }
.sticky-foot .chip { margin: 0; font-size: 10px; padding: 1px 6px; background: rgba(255, 255, 255, 0.55); letter-spacing: 0.03em; }
.sticky-foot .when { font-size: 10.5px; opacity: 0.8; white-space: nowrap; }
.sticky-foot .mem { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; cursor: pointer; white-space: nowrap; border: 1.5px dashed rgba(0, 0, 0, 0.45); border-radius: 999px; padding: 2px 7px 2px 5px; font-weight: 600; letter-spacing: 0.01em; }
.sticky-foot .memx { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.sticky-foot .memx .mem { margin-left: 0; }
.sticky-foot .mem input { accent-color: var(--indigo); width: 13px; height: 13px; margin: 0; }
.sticky-foot .mem.on { color: #fff; background: var(--indigo); border-color: var(--indigo); }
.sticky-foot .mem.on input { accent-color: #fff; }
.sticky-foot .del { border: 0; background: none; font-size: 17px; line-height: 1; color: #4a4a4a; cursor: pointer; padding: 0 2px; }
.sticky-foot .del:hover { color: var(--pink); }
.newnote { display: block; width: 100%; margin: 14px 0 0; border: 1.5px dashed rgba(0, 0, 0, 0.5); border-radius: 6px; background: rgba(255, 255, 255, 0.55); padding: 10px; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; color: #1b1b1b; }
.newnote:hover { background: rgba(255, 255, 255, 0.85); }
.notes-empty, .notes-full { margin: 4px 2px 0; font-size: 13px; color: #5a4a36; font-style: italic; }
.stickies:not(:empty) + .notes-empty { margin-top: 12px; }
.notes-privacy { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.sticky.composer { transform: none; background: #fffdf5; box-shadow: 2px 6px 14px -4px rgba(0, 0, 0, 0.4); padding-top: 18px; z-index: 3;
  background-image: repeating-linear-gradient(transparent 0 27px, rgba(74, 79, 160, 0.18) 27px 28px); background-origin: content-box; }
.sticky.composer:hover { transform: none; }
.sticky.composer.y { background-color: #fff07a; } .sticky.composer.p { background-color: #ffb8cf; } .sticky.composer.b { background-color: #bcd6ff; } .sticky.composer.w { background-color: #fffdf5; }
.sticky.composer::before { background: radial-gradient(circle at 35% 35%, #8f95e8, #4a4fa0 60%, #2c3070); }
.sticky.composer::after { display: none; }
.sticky.composer textarea { display: block; width: 100%; border: 0; background: transparent; font: inherit; font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-size: 19px; line-height: 28px; resize: none; min-height: 56px; outline: none; padding: 0; color: #1b1b1b; overflow: hidden; }
.sticky.composer textarea::placeholder { color: #8a8a8a; }
.pad { border: 1.5px dashed rgba(0, 0, 0, 0.35); border-radius: 6px; aspect-ratio: 3.2 / 1; margin: 4px 0 8px; background: rgba(255, 255, 255, 0.7); position: relative; }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 6px; }
.pad small { position: absolute; right: 8px; bottom: 5px; font-family: var(--body); font-size: 10px; color: #7a7a7a; pointer-events: none; }
.pad .pad-tools { position: absolute; right: 5px; bottom: 4px; display: flex; gap: 4px; }
.pad .pad-tools .linkbtn { font-family: var(--body); font-size: 10.5px; letter-spacing: 0.02em; color: #444; background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 4px; padding: 1px 6px; }
.pad .pad-tools .linkbtn:hover { text-decoration: none; background: #fff; color: var(--indigo); }
.sticky .tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; font-family: var(--body); }
.sticky .dots { display: inline-flex; gap: 3px; }
.sticky .dots i { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); cursor: pointer; vertical-align: middle; }
.sticky .dots i.y { background: #fff07a; } .sticky .dots i.p { background: #ffb8cf; } .sticky .dots i.b { background: #bcd6ff; } .sticky .dots i.w { background: #fffdf5; }
.sticky .dots i.on { outline: 2px solid var(--indigo); outline-offset: 1px; }
.sticky .tools select { font: inherit; font-size: 12px; border: 1px solid #ddd; border-radius: 6px; padding: 3px 6px; background: #fff; margin-left: auto; max-width: 60%; min-width: 0; }
.sticky.composer .btn.small { padding: 6px 12px; font-size: 12.5px; }
.sticky.composer .mem { margin-left: 0; margin-right: auto; }
.sticky .cactions { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 4px; font-family: var(--body); }
.sticky .cactions .linkbtn { font-size: 12px; }
.two-col > .notes { min-width: 0; }
/* desk mode: on wide screens the notes float in the side gutters and can be dragged anywhere */
.desk { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 30; }
.desk .sticky { position: absolute; width: 220px; pointer-events: auto; cursor: grab; touch-action: none; transform: rotate(var(--rot, -2deg)); }
.desk .sticky:hover { transform: rotate(var(--rot, -2deg)) scale(1.02); }
.desk .sticky.dragging { cursor: grabbing; z-index: 5; transform: rotate(0deg) scale(1.04); box-shadow: 8px 18px 30px -10px rgba(0, 0, 0, 0.55); transition: none; }
.desk .sticky.composer { width: 250px; cursor: default; transform: none; }
.desk .sticky.composer:hover { transform: none; }
.desk .sticky p.ntext { cursor: grab; }
.desk .sticky.dragging p.ntext { cursor: grabbing; }
.board.plain { background: none; box-shadow: none; padding: 0; border-radius: 0; }
.board.plain .newnote { margin-top: 0; background: #fff; }
.desk-hint { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.notes-tidy { display: block; margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
@media (max-width: 900px) {
  .stickies { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 8px; scrollbar-width: thin; }
  .stickies.composing { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; }
  .sticky { scroll-snap-align: start; }
}

@media (max-width: 1000px) { .dash { grid-template-columns: 1fr; } .rail { position: static; } }
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat .n { font-size: 36px; }
  .panel-main { padding: 16px 14px 12px; }
  .dash-head .today { text-align: left; }
}

/* ---- reminder offsets that have already passed ---- */
.rem-list label.off { color: var(--muted); opacity: 0.6; cursor: default; }
.rem-list label .fine { font-size: 12.5px; }

/* ---- syllabus facts and course memories ---- */
.fact-row { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #ececf1; align-items: start; }
.fact-row:first-child { border-top: 0; }
.fact-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 8px; accent-color: var(--indigo); }
.fact-row .fact-text { width: 100%; font: inherit; font-size: 15px; padding: 8px 10px; border: var(--border); border-radius: 10px; background: #fff; }
.fact-row .fact-meta { margin-top: 5px; }
.fact-row .note-pick { margin-left: 6px; font-size: 12.5px; color: var(--indigo); cursor: pointer; }
.fact-row .note-pick input { accent-color: var(--indigo); }
.fact-row.added { opacity: 0.55; }
.ex-mem { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.memories li .chip { margin-right: 4px; flex: none; }

/* avatar menu rows: beat the top bar's nav link rule */
body.in-app .topbar nav .avatar .menu a, body.in-app .topbar nav .avatar .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--ink); background: none; border: 0; border-radius: 8px; box-shadow: none; cursor: pointer; line-height: 1.3; }
body.in-app .topbar nav .avatar .menu a:hover, body.in-app .topbar nav .avatar .menu button:hover { background: #f3f3f8; color: var(--ink); text-decoration: none; }
body.in-app .topbar nav .avatar .menu form { margin: 0; }

/* page headers: one block stays left-aligned even inside the flex header */
.dash-head > div:only-child { flex: 1; }
.dash-head .lead { max-width: 720px; }

/* ---- phone panel ---- */
.day-box.consent { align-items: flex-start; white-space: normal; font-size: 13.5px; line-height: 1.45; margin-top: 10px; }
.day-box.consent input { margin-top: 3px; flex: none; }

/* Phone notifications: the device list in Settings */
.devlist { margin: 6px 0 10px; }
.dev { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: var(--border); font-size: 14px; }
.dev:first-child { border-top: 0; }
.dev .grow { flex: 1; }
.dev .fine { white-space: nowrap; }
.dev .chip { margin: 0; }
.push-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 6px 0 4px; }
details.ios { margin-top: 8px; }
details.ios summary { cursor: pointer; }

/* Notifications page: channel and schedule grids, panel icons, off state */
.channels, .when { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-bottom: 6px; }
.when { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.channels .panel, .when .panel { margin: 0; }
.channels .panel.wide { grid-column: 1 / -1; }
.when .grid-form { grid-template-columns: 1fr; gap: 10px; }
.panel-head b { display: inline-flex; align-items: center; gap: 8px; }
.panel-head b svg { width: 18px; height: 18px; color: var(--indigo); flex: none; }
.panel.off .panel-head b svg { color: var(--muted); }
.panel.off .panel-body { opacity: 0.72; }
body.in-app .settings .card.form.sec-notify { max-width: none; width: 100%; }
.panel details.ios summary { font-family: var(--body); font-size: 14px; letter-spacing: 0; color: var(--ink); }
.panel details.ios summary::before { width: 7px; height: 7px; margin-right: 8px; }
.panel details.ios p { margin: 8px 0 0 15px; font-size: 14px; }
.dev > span:first-child { flex: 1 1 auto; min-width: 0; }
.dev .chip { white-space: nowrap; }
.channels .dev .fine { display: none; }
.when .panel-head b { white-space: nowrap; }
.panel details.ios { border: 0; box-shadow: none; padding: 0; background: transparent; margin: 8px 0 0; }

/* Morning digest days: one row of seven letter toggles */
.days.seg { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0; }
.days.seg .day-box { position: relative; justify-content: center; gap: 0; padding: 8px 0; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); border-radius: 8px; user-select: none; }
.days.seg .day-box input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.days.seg .day-box:has(input:checked) { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.days.seg .day-box:has(input:focus-visible) { outline: 2px solid var(--indigo); outline-offset: 2px; }
.panel.off .days.seg .day-box:has(input:checked) { background: var(--muted); border-color: var(--muted); }

/* Plan and billing: trial strip, plan page, landing pricing */
.trialbar { border-bottom: var(--border); background: var(--yellow-soft); font-size: 14px; }
.trialbar .wrap { display: flex; align-items: center; gap: 14px; min-height: 40px; }
.trialbar a { margin-left: auto; font-weight: 600; color: var(--ink); white-space: nowrap; }
.trialbar.warn { background: var(--pink-soft); }
.plan .btn { display: inline-block; margin: 6px 0 4px; }
.plan form { margin: 0; }
.plan .lead { margin: 6px 0 14px; }
.plan-list { padding-left: 20px; color: var(--muted); margin: 6px 0 12px; }
.plan-list li { margin-bottom: 6px; }
.price-card { max-width: 520px; margin: 0 auto; }
.price-card .price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.price-card .amount { font-family: var(--display); font-size: var(--t5); letter-spacing: var(--track); line-height: 1; }
.price-card .per { color: var(--muted); font-size: 15px; }
.price-card .cta-row { margin-top: 14px; align-items: center; }

/* Plan and paywall pages */
.plan-hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; max-width: 980px; margin: 28px auto 40px; padding: 40px 44px 36px;
  border: var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--raise); }
.plan-main .kicker { margin-bottom: 14px; }
.plan-main .h2 { margin: 12px 0 10px; font-size: clamp(34px, 4.4vw, 48px); }
.plan-main .lead { margin: 0 0 22px; max-width: 46ch; }
.plan-pill { display: inline-flex; align-items: center; gap: 8px; margin-left: 14px; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: 1.5px solid var(--ink); }
.plan-pill .sq { width: 8px; height: 8px; }
.plan-pill.tone-y { background: var(--yellow-soft); border-color: var(--yellow); } .plan-pill.tone-y .sq { background: var(--yellow); }
.plan-pill.tone-i { background: var(--indigo-soft); border-color: var(--indigo); } .plan-pill.tone-i .sq { background: var(--indigo); }
.plan-pill.tone-p { background: var(--pink-soft); border-color: var(--pink); } .plan-pill.tone-p .sq { background: var(--pink); }
.price-big { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.price-big .amount { font-family: var(--display); font-size: 68px; line-height: 1; letter-spacing: var(--track); }
.price-big .per { font-size: 16px; color: var(--muted); }
.price-note { margin: 4px 0 18px; }
.plan-main form { margin: 0 0 8px; }
.plan-main .btn { display: inline-block; }
.plan-foot { margin-top: 18px; padding-top: 14px; border-top: 1px dashed rgba(10, 10, 10, 0.25); }
.plan-foot form.inline { display: inline; }
.plan-side { border-left: 1px dashed rgba(10, 10, 10, 0.25); padding-left: 36px; }
.plan-grid { width: 190px; height: auto; display: block; margin: 4px 0 18px; }
.plan-side .group { margin-top: 0; }
.plan-list { list-style: none; padding: 0; margin: 8px 0 16px; }
.plan-list li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 15px; color: var(--ink); }
.plan-list .sq { flex: none; width: 10px; height: 10px; margin-top: 7px; }
.plan-list .sq.i { background: var(--indigo); } .plan-list .sq.y { background: var(--yellow); } .plan-list .sq.p { background: var(--pink); }
@media (max-width: 760px) {
  .plan-hero { grid-template-columns: 1fr; gap: 26px; padding: 26px 22px; }
  .plan-side { border-left: 0; padding-left: 0; border-top: 1px dashed rgba(10, 10, 10, 0.25); padding-top: 22px; }
  .plan-pill { margin-left: 0; margin-top: 8px; }
  .price-big .amount { font-size: 54px; }
}

/* Settings sidebar: a real heading and an outlined box per section */
body.in-app .side { gap: 8px; }
body.in-app .side .side-title { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; margin: 6px 0 10px; }
body.in-app .side a { border: var(--border); background: var(--paper); border-radius: 10px; padding: 11px 14px; font-size: 15px; color: var(--ink); transition: border-color 0.12s, background 0.12s; }
body.in-app .side a:hover { border-color: var(--ink); text-decoration: none; }
body.in-app .side a.on { border-color: var(--indigo); background: var(--indigo-soft); color: var(--indigo); font-weight: 600; }
body.in-app .side a.fine { border: 0; background: transparent; padding: 6px 14px 0; color: var(--muted); font-size: 14px; }
body.in-app .side a.fine:hover { color: var(--ink); text-decoration: underline; }

/* Canvas feed section: status card and collapsible steps */
.feed-status { display: flex; gap: 12px; align-items: flex-start; border: var(--border); border-radius: 10px; padding: 12px 14px; margin: 4px 0 16px; background: var(--paper); }
.feed-status svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--indigo); }
.feed-status.ok svg { color: #2f7f6f; }
.feed-status.bad { border-color: var(--pink); background: var(--pink-soft); }
.feed-status.bad svg { color: var(--pink); }
.feed-status b { display: block; font-size: 15px; margin-bottom: 2px; }
.feed-status span { font-size: 14px; color: var(--muted); }
details.howto { border: 0; box-shadow: none; padding: 0; background: transparent; margin: 0 0 18px; }
details.howto summary { font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--indigo); }
details.howto summary::before { width: 7px; height: 7px; margin-right: 8px; }
details.howto .steps-mini { margin: 10px 0 0 15px; }

/* Plan and paywall on phones: the status pill drops under the label */
@media (max-width: 760px) {
  body.in-app .plan-main .kicker { display: flex; margin-bottom: 4px; }
  .plan-hero { min-width: 0; }
  .plan-main, .plan-side { min-width: 0; }
}

/* Phones: grids may shrink below their content, cards get slimmer padding, memory rows wrap */
.memories li { flex-wrap: wrap; align-items: center; row-gap: 4px; }
.memories li .mtext { flex: 1 1 auto; min-width: 55%; }
.memories li .fine { margin-left: auto; white-space: nowrap; }
.two-col > * { min-width: 0; }
.panel-card input[type=file], .panel-card select, .panel-card textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings .card.form { min-width: 0; }
  .channels, .when { grid-template-columns: minmax(0, 1fr); }
  .course-row { grid-template-columns: minmax(0, 1fr) 52px auto; }
  .course-row input { min-width: 0; width: 100%; box-sizing: border-box; }
  .course-row input[type=color] { width: 52px; }
}
@media (max-width: 640px) {
  .card.form { padding: 26px 20px 22px; }
  main.app .card.form .h2 { font-size: clamp(30px, 9vw, 40px); }
}
.memories li span.chip:first-child { flex: 0 0 auto; }
.memories li .mtext { flex: 1 1 0; min-width: 55%; }

/* The Canvas mockup on the landing page and in the feed help */
.canvas-shot { margin: 8px 0 22px; }
.canvas-shot img { display: block; width: 100%; height: auto; border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--raise); }
.canvas-shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
details.howto .howto-shot { display: block; width: 100%; height: auto; margin-top: 12px; border: var(--border); border-radius: 10px; background: #fff; }
