/* Coatcheck. Warm paper, deep ink, scrub-green accent. */

:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f2f0ea;
  --surface-3: #e9e6de;
  --ink: #14161b;
  --ink-2: #3c4048;
  --muted: #747882;
  --faint: #a5a8ae;
  --line: #e8e5dd;
  --line-2: #d6d2c7;
  --accent: #0d7763;
  --accent-hi: #13917a;
  --accent-soft: #e0f1eb;
  --accent-ink: #0a5a4b;
  --doc: #2f6fe4;
  --red: #d0433a;
  --amber: #c07a0c;
  --green: #1f8f4e;
  --glow-1: #dff0e9;
  --glow-2: #f4ebdc;
  --shadow-sm: 0 1px 2px rgba(25, 22, 12, .06);
  --shadow: 0 1px 2px rgba(25, 22, 12, .04), 0 6px 18px -6px rgba(25, 22, 12, .10);
  --shadow-lg: 0 30px 80px -20px rgba(20, 18, 10, .35), 0 2px 8px rgba(20, 18, 10, .08);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino", Georgia, serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);

  --st-planning: #8b909a;
  --st-primary: #3a6fd8;
  --st-secondary: #cf8a14;
  --st-complete: #0e9a85;
  --st-interview: #7357e0;
  --st-interviewed: #5246c8;
  --st-accepted: #1f9d55;
  --st-waitlist: #d9762b;
  --st-rejected: #c24a5c;
  --st-withdrawn: #a3a6ad;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1113;
    --surface: #17191c;
    --surface-2: #1f2226;
    --surface-3: #2a2e33;
    --ink: #eeede9;
    --ink-2: #c9c8c3;
    --muted: #8f9299;
    --faint: #62666d;
    --line: #262a2f;
    --line-2: #343940;
    --accent: #34c3a5;
    --accent-hi: #45d4b6;
    --accent-soft: #12332c;
    --accent-ink: #7fe0ca;
    --doc: #7aa6ff;
    --red: #ff7a6b;
    --amber: #f2b13e;
    --green: #5fd38a;
    --glow-1: #0f2a24;
    --glow-2: #231d12;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 30px 80px -10px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .4);
    --st-planning: #8c919b;
    --st-primary: #6f9bf2;
    --st-secondary: #f0ac3c;
    --st-complete: #34c3a5;
    --st-interview: #a08bff;
    --st-interviewed: #8a80f0;
    --st-accepted: #53d488;
    --st-waitlist: #f59a54;
    --st-rejected: #f07a8c;
    --st-withdrawn: #7d8189;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 88% -8%, var(--glow-1), transparent 62%),
    radial-gradient(900px 480px at -8% -4%, var(--glow-2), transparent 58%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 max(16px, calc(50% - 560px));
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
/* The blur lives on a pseudo-element: a backdrop-filter on .top itself would trap the
   fixed mobile tab bar inside the header. */
.top::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
}
body.scrolled .top { border-bottom-color: var(--line); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.02em;
  flex: 1 1 0;
}
.logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-hi), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 10px -3px color-mix(in srgb, var(--accent) 60%, transparent);
}
.logo svg { width: 20px; height: 20px; }
.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  border: 1px solid var(--line);
}
.tabs a {
  padding: 6px 18px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: color .15s, background .2s, box-shadow .2s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 0; }
body.viewer .tabs, body.viewer .top-actions { visibility: hidden; }

/* ---------- buttons, chips, pills ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s var(--ease), background .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line-2)); }
.btn:active { transform: scale(.97); }
.btn.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn.primary:hover { filter: brightness(1.06); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #04231d; } }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--red); }
.btn.lg { height: 50px; padding: 0 22px; font-size: 15.5px; border-radius: 14px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.xs { width: 28px; height: 28px; border-radius: 8px; color: var(--faint); }
.icon-btn.xs svg { width: 15px; height: 15px; }
.link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.link svg { width: 15px; height: 15px; }
.link.sm { font-size: 13px; }
.link.faint { color: var(--faint); font-weight: 500; }
.link.faint:hover { color: var(--accent); }

.st-planning { --c: var(--st-planning); }
.st-primary { --c: var(--st-primary); }
.st-secondary { --c: var(--st-secondary); }
.st-complete { --c: var(--st-complete); }
.st-interview { --c: var(--st-interview); }
.st-interviewed { --c: var(--st-interviewed); }
.st-accepted { --c: var(--st-accepted); }
.st-waitlist { --c: var(--st-waitlist); }
.st-rejected { --c: var(--st-rejected); }
.st-withdrawn { --c: var(--st-withdrawn); }

.t-diversity { --c: #8b5cf6; }
.t-adversity { --c: #e0603f; }
.t-why { --c: #0e9a85; }
.t-gap { --c: #3a6fd8; }
.t-team { --c: #cf8a14; }
.t-ethics { --c: #c24a8a; }
.t-service { --c: #1f9d55; }
.t-reapp { --c: #6b7280; }
.t-anything { --c: #5b6cc9; }
.t-other { --c: #8b909a; }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.center { justify-content: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip:active { transform: scale(.97); }
.chip b { font-weight: 650; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.on b { color: inherit; opacity: .6; }
.chip[class*="st-"].on {
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  border-color: color-mix(in srgb, var(--c) 50%, transparent);
  color: color-mix(in srgb, var(--c) 75%, var(--ink));
}
.chip[class*="st-"].on b { color: inherit; }
.tag-chip { border-style: dashed; }
.tag-chip:hover { border-style: solid; background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--c, var(--faint)) 13%, var(--surface));
  color: color-mix(in srgb, var(--c, var(--faint)) 78%, var(--ink));
}
.pill .dot { width: 6px; height: 6px; }
.es-todo { --c: var(--st-planning); }
.es-draft { --c: var(--st-secondary); }
.es-done { --c: var(--st-accepted); }

/* ---------- layout ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 8px 16px 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.eyebrow { font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 1.02;
  letter-spacing: -.012em;
  margin-top: 6px;
  text-wrap: balance;
}
.display.sm { font-size: clamp(34px, 4.4vw, 46px); }
.sub { color: var(--muted); margin-top: 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 0 22px; }
.hint { color: var(--muted); font-size: 13.5px; line-height: 1.5; }

#banner:empty { display: none; }
.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1088px;
  margin: 10px auto 0;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
@media (max-width: 1120px) { .banner { margin-inline: 16px; } }
.banner svg { width: 16px; height: 16px; }
.banner.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 30%, transparent); }

/* ---------- welcome ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 40px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(46px, 6.4vw, 80px);
  line-height: .98;
  letter-spacing: -.018em;
  margin-top: 14px;
  text-wrap: balance;
}
.hero h1 em { color: var(--accent); }
.lede { font-size: 18px; line-height: 1.55; color: var(--ink-2); margin-top: 22px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.fine { display: flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.fine svg { width: 15px; height: 15px; }
.hero-art { position: relative; padding: 30px 10px 40px 30px; }
.mock {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
}
.mock-h { font-family: var(--serif); font-size: 34px; line-height: 1.05; margin: 4px 0 16px; }
.mock .items { border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
.mock .item { padding: 11px 12px; gap: 11px; }
.mock .check { width: 20px; height: 20px; }
.float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: bob 6s ease-in-out infinite;
}
.float small { display: block; color: var(--muted); font-size: 12px; }
.float > svg { color: #8b5cf6; width: 22px; height: 22px; }
.float.f1 { top: -8px; right: -18px; width: 268px; display: block; padding: 4px; animation-delay: -2s; }
.float.f1 .clock-top { white-space: nowrap; }
.float.f1 .clock { margin: 0; border: 0; box-shadow: none; }
.float.f2 { bottom: 0; left: -14px; animation-delay: -4s; }
.float.f3 { bottom: -2px; right: 36px; padding: 8px; border-radius: 999px; animation-delay: -1s; }
@keyframes bob { 50% { transform: translateY(-6px); } }

.features { padding: 40px 0 10px; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3.6vw, 42px); line-height: 1.1; max-width: 18em; text-wrap: balance; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.feature {
  padding: 22px;
  border-radius: var(--r);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  border: 1px solid var(--line);
  transition: transform .25s var(--ease), box-shadow .25s, background .25s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); background: var(--surface); }
.feature h3 { font-size: 16px; margin: 14px 0 6px; letter-spacing: -.01em; }
.feature p { color: var(--muted); font-size: 14px; }
.f-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.f-icon svg { width: 20px; height: 20px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 56px 0 10px; padding-top: 34px; border-top: 1px solid var(--line); }
.steps h3 { font-size: 16px; margin: 12px 0 6px; }
.steps p { color: var(--muted); font-size: 14px; }
.num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); font-family: var(--serif); font-size: 18px; color: var(--accent); }

/* ---------- today ---------- */
.today-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 26px 0 22px; }
.head-actions { display: flex; gap: 8px; flex: none; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -10px rgba(20, 18, 10, .22); }
.stat b { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.stat em { font-style: normal; color: var(--green); font-weight: 600; }
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--line-2);
  color: var(--ink-2);
  font-size: 13.5px;
}
.notice span { flex: 1; }
.notice > svg { color: var(--accent); }

.dash { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 28px; align-items: start; }
.side { position: sticky; top: 84px; display: grid; gap: 16px; }
.group { margin-bottom: 26px; }
.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.group-title svg { width: 15px; height: 15px; }
.group-title span {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0;
}
.group.late .group-title { color: var(--red); }
.group.late .group-title span { background: color-mix(in srgb, var(--red) 15%, var(--surface)); color: var(--red); }
.group.now .group-title { color: var(--amber); }
.group.nudges .group-title { color: var(--accent); }

.items { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 16px;
  border-top: 1px solid var(--line);
  transition: background .15s;
}
.item:first-child { border-top: 0; }
.item:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--u, transparent);
}
.item.late { --u: var(--red); }
.item.now { --u: var(--amber); }
.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  padding: 0;
  border-radius: 50%;
  border: 1.75px solid var(--line-2);
  background: var(--surface);
  color: transparent;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .25s var(--spring);
}
.check svg { width: 13px; height: 13px; stroke-width: 3.2; }
.check:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.item.leaving .check { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.15); }
.item.leaving { animation: leave .4s var(--ease) .14s forwards; }
.item.leaving .item-title { text-decoration: line-through; text-decoration-color: var(--faint); }
@keyframes leave { to { opacity: 0; transform: translateX(18px); } }
.item.flash { animation: flash 1.4s var(--ease); }
@keyframes flash { 0%, 40% { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); } }
.item-main {
  display: grid;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.item-title { font-weight: 600; letter-spacing: -.005em; }
.item-school { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { display: grid; text-align: right; font-size: 13px; flex: none; }
.when b { font-weight: 650; }
.when small { color: var(--faint); font-size: 12px; }
.item.late .when b { color: var(--red); }
.item.now .when b { color: var(--amber); }

.nudge-list { display: grid; gap: 10px; }
.nudge { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; }
.n-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
}
.n-icon svg { width: 19px; height: 19px; }
.n-body { flex: 1; min-width: 0; }
.n-body p { color: var(--muted); font-size: 13px; }
.n-body p span { color: var(--ink-2); font-weight: 550; }
.n-acts { display: flex; align-items: center; gap: 4px; flex: none; }

.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.card-head h2 { font-size: 14px; font-weight: 650; letter-spacing: -.005em; }
.card-head span { color: var(--muted); font-size: 12.5px; }
.cal { padding: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow { text-align: center; font-size: 11px; font-weight: 650; color: var(--faint); padding-bottom: 4px; }
.day {
  display: grid;
  grid-template-rows: 1fr 6px;
  place-items: center;
  aspect-ratio: 1;
  padding: 3px 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.day.first span:first-child { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.day.past { color: var(--faint); }
.day.has { background: var(--surface-2); color: var(--ink); font-weight: 650; cursor: pointer; transition: background .15s, transform .15s var(--ease); }
.day.has:hover { background: var(--surface-3); transform: scale(1.06); }
.day.today { background: var(--ink); color: var(--bg); font-weight: 700; }
.day.today.has:hover { background: var(--ink); }
.dots { display: flex; gap: 2px; height: 5px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.dots i.late { background: var(--red); }
.dots i.now { background: var(--amber); }
.dots i.later { background: var(--faint); }
.day.today .dots i { box-shadow: 0 0 0 1.5px var(--ink); }

.pipeline { padding: 18px; }
.pipe { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; }
.pipe i { background: var(--c); min-width: 6px; }
.legend { display: grid; gap: 2px; margin-top: 14px; }
.leg {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  margin: 0 -8px;
  width: calc(100% + 16px);
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  color: var(--ink-2);
}
button.leg { cursor: pointer; }
button.leg:hover { background: var(--surface-2); }
.leg span:nth-child(2) { flex: 1; }
.leg b { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink); }

.empty-card { display: grid; justify-items: center; gap: 16px; padding: 44px 24px; text-align: center; }
.empty-card p { color: var(--muted); max-width: 30em; }
.empty-card p b { color: var(--ink); font-weight: 600; }
.empty-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: var(--accent);
  background: var(--accent-soft);
}
.empty-icon svg { width: 26px; height: 26px; }

/* ---------- schools ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--faint);
  width: 260px;
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); padding: 0; }
.school-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.school-list > li + li .school-row { border-top: 1px solid var(--line); }
.school-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 2.2fr) 172px minmax(0, 1.6fr) 72px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.school-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.school-row.static { cursor: default; grid-template-columns: 40px minmax(0, 1fr) auto; }
.school-row.static:hover { background: none; }
.school-row.closed { opacity: .55; }
.sr-name { display: grid; min-width: 0; }
.sr-name b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.005em; }
.sr-name small { color: var(--muted); font-size: 12.5px; }
.sr-next { display: grid; font-size: 13px; color: var(--ink-2); min-width: 0; }
.sr-next span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-next b { font-weight: 650; font-size: 12.5px; color: var(--muted); }
.sr-next.late b { color: var(--red); }
.sr-next.now b { color: var(--amber); }
.sr-next.soon b { color: var(--accent); }
.sr-prog { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ring {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0);
  -webkit-mask: radial-gradient(circle, transparent 5.5px, #000 6px);
  mask: radial-gradient(circle, transparent 5.5px, #000 6px);
}
.none { padding: 28px; text-align: center; color: var(--muted); }
.ava {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .02em;
  background: hsl(var(--h) 52% 92%);
  color: hsl(var(--h) 42% 30%);
  box-shadow: 0 0 0 1px hsl(var(--h) 40% 50% / .12) inset;
}
.ava.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
@media (prefers-color-scheme: dark) { .ava { background: hsl(var(--h) 28% 20%); color: hsl(var(--h) 70% 80%); } }

/* ---------- essays ---------- */
.essay-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 22px; }
.essay-stats div { display: grid; }
.essay-stats b { font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.essay-stats span { font-size: 12.5px; color: var(--muted); }
.essay-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.egroup { overflow: hidden; border-top: 3px solid var(--c); }
.egroup header { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.egroup .meta { flex: 1; color: var(--muted); font-size: 12.5px; }
.egroup ul, .essay-list { list-style: none; margin: 0; padding: 0; }
.egroup li + li .essay-row { border-top: 1px solid var(--line); }
.essay-row {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.essay-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.er-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.er-school { font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-prompt { font-size: 14px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.er-count { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.er-count.over { color: var(--red); }
.meter { display: inline-block; width: 64px; height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: none; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s var(--ease); }
.er-count.over .meter i, .meter.over i { background: var(--red); }
.prewrite { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 13px; }

/* ---------- forms ---------- */
input[type=text], input[type=url], input[type=number], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.search input { width: auto; padding: 0; border: 0; box-shadow: none; }
textarea { resize: vertical; line-height: 1.55; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
input::placeholder, textarea::placeholder { color: var(--faint); }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
label.inline input[type=number] { width: 78px; }
label.inline .money { width: 140px; }
.check-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check-label input { margin-top: 1px; }
input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  border-radius: 6px;
  border: 1.75px solid var(--line-2);
  background: var(--surface);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
input[type=checkbox]::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
  transition: transform .22s var(--spring);
}
input[type=checkbox]:hover { border-color: var(--accent); }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { transform: scale(1); }
@media (prefers-color-scheme: dark) { input[type=checkbox]::after { background: #04231d; } }
.money { position: relative; display: block; }
.money > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); font-weight: 500; pointer-events: none; }
.money input { padding-left: 24px; }
.with-btn, .with-unit { display: flex; gap: 8px; }
.with-unit select { width: auto; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr; gap: 12px; }
.span2 { grid-column: span 2; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- drawer ---------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(16, 15, 10, .32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fade .2s var(--ease);
}
.scrim.leave { animation: fade .18s var(--ease) reverse forwards; }
.top-scrim { z-index: 50; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed;
  top: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: min(600px, calc(100% - 20px));
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.drawer.enter { animation: slide-in .32s var(--ease); }
.drawer.leave { animation: slide-in .18s var(--ease) reverse forwards; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.dh-main { flex: 1; min-width: 0; }
.title-input {
  display: block;
  width: 100%;
  resize: none;
  overflow: hidden;
  line-height: 1.25;
  padding: 2px 6px;
  margin-left: -6px;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 8px;
  font-size: 20px !important;
  font-weight: 700;
  letter-spacing: -.02em;
}
.lbl { display: flex; align-items: center; gap: 6px; }
.title-input:hover { background: var(--surface-2) !important; }
.title-input:focus { background: var(--surface-2) !important; }
.dh-sub { font-size: 13px; color: var(--muted); }
.dh-sub .late { color: var(--red); font-weight: 600; }
.dh-sub .now { color: var(--amber); font-weight: 600; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 20px 30px; }
.drawer-body > section, .drawer-body > .clock { margin-top: 22px; }
.drawer-body h3, .modal-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.drawer-body h3 svg, .modal-body h3 svg { width: 15px; height: 15px; }
.count { font-variant-numeric: tabular-nums; color: var(--faint); letter-spacing: 0; }

.stepper { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); padding-top: 4px; }
.stepper::before, .stepper::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(100% / 12);
  height: 2px;
  border-radius: 2px;
  background: var(--line-2);
  width: calc(100% - 100% / 6);
}
.stepper::after { background: var(--accent); width: calc((100% - 100% / 6) * var(--p)); transition: width .4s var(--ease); }
.step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.knob {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  background: var(--bg);
  color: #fff;
  transition: transform .25s var(--spring), background .2s, border-color .2s;
}
.knob svg { width: 14px; height: 14px; stroke-width: 3; }
.step:hover .knob { border-color: var(--accent); transform: scale(1.1); }
.step.past .knob { background: var(--accent); border-color: var(--accent); }
.step.now .knob { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 18%, transparent); }
.step.now .knob::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.step-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-align: center; line-height: 1.2; }
.step.now .step-label { color: var(--ink); }
@media (prefers-color-scheme: dark) { .knob { color: #04231d; } }
.outcomes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.outcomes > span { font-size: 12px; font-weight: 650; color: var(--muted); margin-right: 4px; text-transform: uppercase; letter-spacing: .08em; }

.clock {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  --u: var(--accent);
}
.clock.now { --u: var(--amber); }
.clock.late { --u: var(--red); }
.clock-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.clock-top span { display: inline-flex; align-items: center; gap: 7px; }
.clock-top svg { color: var(--u); width: 17px; height: 17px; }
.clock-top b { font-variant-numeric: tabular-nums; color: var(--u); }
.clock-bar { height: 8px; margin: 10px 0 9px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.clock-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--u) 55%, var(--surface)), var(--u));
  transition: width .5s var(--ease);
}
.clock p { font-size: 13px; color: var(--muted); }
.clock p b { color: var(--ink); font-weight: 600; }
.clock.late p b { color: var(--red); }

.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-field {
  gap: 4px;
  padding: 11px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.date-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.date-field > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.date-field.set > span { color: var(--accent); }
.date-field input { padding: 2px 0; border: 0 !important; box-shadow: none !important; background: none; font-weight: 600; font-size: 15px; }
.date-field small { font-size: 11.5px; color: var(--faint); font-weight: 500; }

.checklist { list-style: none; margin: 0 0 10px; padding: 4px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; }
.checklist li + li { border-top: 1px solid var(--line); }
.req { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; padding: 4px 0; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.req span { transition: color .2s; }
.checklist li.done .req span { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-2); }
.mini-date { width: 150px !important; padding: 4px 8px !important; font-size: 13px !important; border-radius: 8px !important; }
.add-row { display: flex; gap: 8px; margin-bottom: 8px; }
.essay-list { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; margin-bottom: 12px; }
.essay-list li + li .essay-row { border-top: 1px solid var(--line); }
.drawer-body .hint { margin-bottom: 12px; }
.kit { display: grid; gap: 12px; }
.kit h3 { margin-bottom: 0; }
.kit .checklist { margin: 0; }
.drawer-foot { padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 51;
  display: flex;
  flex-direction: column;
  width: min(540px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, -50%);
  animation: pop .28s var(--ease);
  overflow: hidden;
}
.modal.wide { width: min(760px, calc(100% - 32px)); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 16px 4px 24px; }
.modal-head h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin-top: 2px; }
.modal-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px 24px 22px; overflow-y: auto; }
.modal-body section { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-body section:first-child { padding-top: 0; border-top: 0; }
.modal-body section h3 { margin-bottom: 0; }
.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 14px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.modal-foot .count { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.modal-foot .count .late { color: var(--red); }
.spacer { flex: 1; }
.draft { min-height: 240px; font-size: 15.5px; line-height: 1.65; padding: 14px 16px; }
.auto {
  display: inline-block;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  background: var(--accent-soft);
}
.reuse {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, #8b5cf6 8%, var(--surface));
  border: 1px solid color-mix(in srgb, #8b5cf6 22%, transparent);
  font-size: 13.5px;
}
.reuse .n-icon { width: 32px; height: 32px; border-radius: 10px; color: #8b5cf6; background: color-mix(in srgb, #8b5cf6 14%, var(--surface)); }
.reuse > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; flex: 1; min-width: 0; }
.reuse label.inline { flex-wrap: nowrap; white-space: nowrap; }
.reuse label.inline select { flex: 0 1 auto; min-width: 0; text-overflow: ellipsis; }
.reuse select { width: auto; max-width: 100%; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--doc) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--doc) 20%, transparent);
  font-size: 13.5px;
}
.doc-card.linking { align-items: flex-start; }
.doc-card .doc-ico { width: 32px; height: 32px; border-radius: 10px; color: var(--doc); background: color-mix(in srgb, var(--doc) 14%, var(--surface)); }
.doc-card .doc-ico svg { width: 17px; height: 17px; }
.doc-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
.doc-txt b { font-weight: 650; color: var(--ink); }
.doc-txt > span { color: var(--muted); line-height: 1.45; }
.doc-txt .with-btn { margin-top: 8px; }
.doc-txt .with-btn input { font-size: 13.5px; }
.doc-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.doc-card.linked { background: color-mix(in srgb, var(--doc) 10%, var(--surface)); }
.doc-reuse { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.doc-reuse a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  color: var(--doc);
  background: color-mix(in srgb, var(--doc) 10%, var(--surface));
  text-decoration: none;
  max-width: 100%;
}
.doc-reuse a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-reuse a:hover { background: color-mix(in srgb, var(--doc) 18%, var(--surface)); }
.doc-reuse svg, .er-doc svg { width: 13px; height: 13px; flex: none; }
.er-doc { display: inline-flex; align-items: center; gap: 5px; color: var(--doc); font-weight: 600; }
.modal-foot .count .er-doc { font-size: 13px; }
.draft.slim:placeholder-shown { height: 104px; min-height: 0; }
.share-out { display: flex; gap: 8px; }
.share-out input { font-size: 13px; color: var(--muted); }

/* ---------- toast ---------- */
#toast-root { position: fixed; left: 0; right: 0; bottom: 24px; z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 560px;
  padding: 11px 12px 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toast-in .35s var(--spring);
}
.toast button {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 16%, transparent);
  color: var(--bg);
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 70; pointer-events: none; }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.foot > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.foot svg { width: 14px; height: 14px; }
.foot a { color: var(--muted); }
.keys { display: inline-flex; align-items: center; gap: 4px; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  background: var(--surface);
  font: 600 11px/1 var(--sans);
  color: var(--ink-2);
}
kbd + kbd { margin-left: 0; }
.viewer-page { padding-top: 26px; }
.viewer-page .display { margin-bottom: 26px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .dash { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .hero-art { max-width: 520px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .school-row { grid-template-columns: 40px minmax(0, 1.8fr) 160px minmax(0, 1.3fr) 64px; }
}

@media (max-width: 720px) {
  .doc-card:not(.linking) { flex-wrap: wrap; }
  .doc-card:not(.linking) .doc-acts { width: 100%; padding-left: 44px; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  input, select, textarea { font-size: 16px !important; }
  .top { height: 58px; }
  .brand { font-size: 16px; }
  .tabs {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 30;
    justify-content: space-around;
    padding: 5px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
    box-shadow: var(--shadow-lg);
  }
  .tabs a { flex: 1; text-align: center; padding: 10px 0; font-size: 14.5px; }
  .tabs a.on { background: var(--ink); color: var(--bg); box-shadow: none; }
  body.viewer .tabs { display: none; }
  #toast-root { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .today-head, .page-head { flex-direction: column; align-items: stretch; margin-top: 18px; }
  .head-actions .btn { flex: 1; }
  .page-head > .btn { align-self: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat b { font-size: 24px; }
  .side { grid-template-columns: 1fr; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
  .steps { gap: 20px; }
  .hero-art { padding: 24px 6px 46px 6px; }
  .float.f1 { right: -4px; top: -10px; width: 236px; }
  .float.f2 { left: 0; }
  .float.f3 { display: none; }
  .lede { font-size: 16.5px; }
  .item { padding: 13px 14px 13px 12px; gap: 12px; }
  .when small { display: none; }
  .nudge { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
  .n-acts { grid-column: 2; }
  .toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .search { width: 100%; }
  .chips.scroll { flex-wrap: nowrap; min-width: 0; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .chips.scroll::-webkit-scrollbar { display: none; }
  .school-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "ava name stage" "ava next prog"; row-gap: 6px; padding: 13px 14px; }
  .school-row .ava { grid-area: ava; align-self: start; }
  .sr-name { grid-area: name; }
  .sr-stage { grid-area: stage; justify-self: end; }
  .sr-next { grid-area: next; display: flex; gap: 6px; align-items: baseline; }
  .sr-next b { flex: none; }
  .sr-prog { grid-area: prog; }
  .school-row.static { grid-template-areas: "ava name stage"; }
  .essay-groups { grid-template-columns: 1fr; }
  .essay-stats { gap: 20px; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% - 28px); border-radius: 22px 22px 0 0; border-bottom: 0; }
  .drawer.enter { animation: sheet-in .34s var(--ease); }
  .drawer.leave { animation: sheet-in .2s var(--ease) reverse forwards; }
  .drawer-head { padding: 14px 10px 14px 16px; align-items: flex-start; }
  .title-input { font-size: 18px !important; }
  .drawer-body { padding: 4px 16px calc(30px + env(safe-area-inset-bottom)); }
  .dates { grid-template-columns: 1fr 1fr; gap: 8px; }
  .step-label { font-size: 10.5px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .grid3 label:first-child { grid-column: span 2; }
  .modal, .modal.wide {
    top: auto;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: calc(100% - 28px);
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    transform: none;
    animation: sheet-in .34s var(--ease);
  }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .btn.ghost span { display: none; }
  .foot .keys { display: none; }
}
@keyframes sheet-in { from { transform: translateY(40%); opacity: 0; } }

@media (max-width: 420px) {
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 38px; padding: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .dates { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
