/* College transfer tracker — mobile-first, light/dark, no framework */
:root {
  color-scheme: light;
  --bg: #f3f0ea;
  --bg-accent: #e8efe8;
  --surface: #fffcf7;
  --surface-2: #f7f3ec;
  --ink: #1c1a17;
  --muted: #5f5a53;
  --faint: #8a847a;
  --line: rgba(28, 26, 23, 0.12);
  --line-strong: rgba(28, 26, 23, 0.2);
  --accent: #0d5c56;
  --accent-soft: rgba(13, 92, 86, 0.1);
  --accent-2: #9a3f16;
  --replied-bg: #dceee3;
  --replied-ink: #14532d;
  --waiting-bg: #f3e6c8;
  --waiting-ink: #7a4d08;
  --scheduled-bg: #dde6f5;
  --scheduled-ink: #1e3a6e;
  --emailed-bg: #e5e0f4;
  --emailed-ink: #3c2a72;
  --shadow: 0 1px 2px rgba(28, 26, 23, 0.06), 0 8px 24px rgba(28, 26, 23, 0.06);
  --radius: 18px;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121416;
    --bg-accent: #171d1c;
    --surface: #1c2024;
    --surface-2: #161a1d;
    --ink: #f3efe7;
    --muted: #b5aea3;
    --faint: #8b8580;
    --line: rgba(243, 239, 231, 0.12);
    --line-strong: rgba(243, 239, 231, 0.2);
    --accent: #7ed4cc;
    --accent-soft: rgba(126, 212, 204, 0.12);
    --accent-2: #f0a37a;
    --replied-bg: #1c3a2a;
    --replied-ink: #b7ebc8;
    --waiting-bg: #3a2e16;
    --waiting-ink: #f3d399;
    --scheduled-bg: #1d2c48;
    --scheduled-ink: #c5d6f5;
    --emailed-bg: #2c2450;
    --emailed-ink: #d8d0f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121416;
  --bg-accent: #171d1c;
  --surface: #1c2024;
  --surface-2: #161a1d;
  --ink: #f3efe7;
  --muted: #b5aea3;
  --faint: #8b8580;
  --line: rgba(243, 239, 231, 0.12);
  --line-strong: rgba(243, 239, 231, 0.2);
  --accent: #7ed4cc;
  --accent-soft: rgba(126, 212, 204, 0.12);
  --accent-2: #f0a37a;
  --replied-bg: #1c3a2a;
  --replied-ink: #b7ebc8;
  --waiting-bg: #3a2e16;
  --waiting-ink: #f3d399;
  --scheduled-bg: #1d2c48;
  --scheduled-ink: #c5d6f5;
  --emailed-bg: #2c2450;
  --emailed-ink: #d8d0f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, var(--bg-accent), transparent 55%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100dvh;
}

img { max-width: 100%; }
button, select { font: inherit; color: inherit; }

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--surface);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 0.6rem; }

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand strong {
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand span {
  color: var(--faint);
  font-size: 0.78rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.nav {
  display: none;
  gap: 0.2rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.nav a:hover { color: var(--ink); background: var(--accent-soft); }

@media (min-width: 800px) {
  .nav { display: flex; }
}

.hero {
  padding: 1.6rem 0 0.4rem;
}

.hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
  font-weight: 700;
  max-width: 16ch;
}

.lede {
  margin: 0 0 1.3rem;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.02rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
}

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 0.95rem;
  box-shadow: var(--shadow);
}

.stat b {
  display: block;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  letter-spacing: -0.05em;
  line-height: 1;
  font-weight: 700;
}

.stat span {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.next-deadlines {
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.next-deadlines .label {
  font-size: 0.8rem;
  color: var(--faint);
  width: 100%;
}

@media (min-width: 600px) {
  .next-deadlines .label { width: auto; margin-right: 0.25rem; }
}

.pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  text-decoration: none;
  color: inherit;
}

.pill time { color: var(--accent-2); font-weight: 600; font-variant-numeric: tabular-nums; }

section {
  padding: 2.1rem 0 0.3rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.section-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 70ch;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 0.25rem;
  border-radius: 999px;
}

.seg button,
.select-wrap select {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
}

.seg button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.select-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.2rem;
}

.select-wrap select { padding-right: 1.4rem; }

.count-out {
  color: var(--faint);
  font-size: 0.85rem;
  align-self: center;
}

.cards {
  display: grid;
  gap: 0.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.rank {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: var(--accent-soft);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  font-weight: 600;
  line-height: 1.25;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.25rem;
}

.state, .city {
  font-size: 0.8rem;
  color: var(--faint);
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
}

.badge.replied { background: var(--replied-bg); color: var(--replied-ink); }
.badge.waiting { background: var(--waiting-bg); color: var(--waiting-ink); }
.badge.scheduled { background: var(--scheduled-bg); color: var(--scheduled-ink); }
.badge.emailed { background: var(--emailed-bg); color: var(--emailed-ink); }

.cost {
  margin: 0.7rem 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.reason {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.more {
  margin-top: 0.7rem;
}

.more summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  list-style: none;
}

.more summary::-webkit-details-marker { display: none; }
.more p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty {
  color: var(--muted);
  padding: 1.5rem 0;
}

.reply-grid, .timeline, .notes {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 860px) {
  .reply-grid { grid-template-columns: repeat(3, 1fr); }
}

.reply-card h3 { margin-bottom: 0.15rem; }

.fact {
  margin: 0.65rem 0 0;
}

.fact dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--faint);
  font-weight: 600;
}

.fact dd {
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
}

.verdict {
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-item {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.8rem;
  position: relative;
}

@media (max-width: 600px) {
  .timeline-item { grid-template-columns: 1fr; gap: 0.35rem; }
}

.when {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--accent-2);
  padding-top: 1.05rem;
}

.timeline-item.past .when { color: var(--faint); }

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.plan p { margin: 0.4rem 0 0; color: var(--muted); }

.notes li, .deadline-notes li {
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.deadline-notes {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  margin-top: 2.5rem;
  padding: 1.4rem 0 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

footer p { margin: 0 0 0.35rem; }

.error {
  margin: 2rem auto;
  width: min(640px, calc(100% - 2rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}
