:root {
  --pine: #14332e;
  --pine-2: #1c4a42;
  --sage: #2f6f62;
  --mist: #e7f1ec;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --ink: #17221f;
  --muted: #5c6b66;
  --line: #d9cfc0;
  --clay: #c45c26;
  --clay-deep: #9a4318;
  --gold: #c9a15b;
  --ok: #2a7a52;
  --warn: #b45309;
  --far: #7f1d3f;
  --reach: #c45c26;
  --match: #2f6f62;
  --likely: #3d6b9a;
  --shadow: 0 14px 40px rgba(20, 51, 46, 0.1);
  --radius: 18px;
  --display: "Fraunces", Georgia, serif;
  --sans: "Nunito", "DM Sans", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(900px 420px at 0% -10%, #dceee6 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #f8e3c8 0%, transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
}

body.locked {
  min-height: 100vh;
}

a { color: var(--sage); }
button, input, select, textarea { font: inherit; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  z-index: 20;
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 8;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, white);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--pine-2), var(--pine));
  color: #f6f1e7;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.brand strong { display: block; font-size: 15px; }
.brand em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nav a, .nav button.linkish {
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.nav a.active, .nav button.linkish.active {
  background: var(--pine);
  color: #fff;
}
.nav-tools { display: flex; gap: 8px; align-items: center; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { border-color: #cbbca8; }
.btn-primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); }
.btn-clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn-ghost { background: transparent; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 6px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 550; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 8px; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
.lead { color: var(--muted); max-width: 58ch; margin: 0 0 18px; }

.hero {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: stretch;
  margin-bottom: 22px;
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
}
.hero-card, .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.hero-art {
  border-radius: var(--radius);
  min-height: 180px;
  background:
    linear-gradient(160deg, rgba(20,51,46,0.92), rgba(196,92,38,0.55)),
    repeating-linear-gradient(-18deg, transparent 0 14px, rgba(255,255,255,0.05) 14px 15px);
  color: #f6f1e7;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}
.hero-art::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -30px;
  top: -40px;
  border-radius: 50%;
  border: 18px solid rgba(255,255,255,0.12);
}
.hero-art strong { font-family: var(--display); font-size: 1.6rem; display: block; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.grid-3, .grid-2, .grid-4 {
  display: grid;
  gap: 14px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

.stat b { display: block; font-family: var(--display); font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: 13px; }

.deadline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.deadline:last-child { border-bottom: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag.now { background: #fde7d8; color: var(--clay-deep); }
.tag.soon { background: #f3ead4; color: #7a5a16; }
.tag.later { background: var(--mist); color: var(--pine); }
.tag.past { background: #eee; color: #666; }
.tag.far-reach { background: #fde8ee; color: var(--far); }
.tag.reach { background: #fde7d8; color: var(--clay-deep); }
.tag.match { background: var(--mist); color: var(--match); }
.tag.likely { background: #e4eef8; color: var(--likely); }

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 14px;
}
@media (max-width: 980px) {
  .filters { grid-template-columns: 1fr 1fr; }
}
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
input[type="search"], input[type="text"], input[type="number"], input[type="password"], select, textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.chip.on { background: var(--pine); color: #fff; border-color: var(--pine); }

.college-card {
  display: grid;
  grid-template-columns: 8px 1fr;
  overflow: hidden;
  padding: 0;
}
.college-card .band { background: var(--match); }
.college-card.reach .band { background: var(--reach); }
.college-card.far-reach .band { background: var(--far); }
.college-card.likely .band { background: var(--likely); }
.college-card .body { padding: 14px 16px 16px; }
.meta { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.drawer {
  position: fixed;
  inset: 0;
  background: rgba(20, 51, 46, 0.35);
  z-index: 20;
  display: flex;
  justify-content: flex-end;
}
.drawer-panel {
  width: min(520px, 100%);
  background: var(--paper);
  height: 100%;
  overflow: auto;
  padding: 22px;
  box-shadow: -12px 0 40px rgba(0,0,0,0.15);
}
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) { .kanban { grid-template-columns: 1fr 1fr; } }
.kanban h3 { font-size: 0.95rem; }
.kanban .lane {
  background: color-mix(in srgb, var(--card) 80%, var(--mist));
  border-radius: 16px;
  padding: 12px;
  min-height: 140px;
  border: 1px dashed var(--line);
}
.app-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
}

.drop {
  border: 2px dashed var(--line);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  background: color-mix(in srgb, var(--card) 70%, var(--mist));
}
.drop.hot { border-color: var(--sage); background: var(--mist); }
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.doc-card { padding: 14px; }

.voice-orb {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 30% 30%, #f3d2b5, var(--clay));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(196, 92, 38, 0.35);
}
.voice-orb.live {
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(196,92,38,0.15); }
}

.output {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: #171e1c;
  color: #e7f1ec;
  border-radius: 14px;
  padding: 16px;
  min-height: 180px;
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.gate-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
}
.err { color: #9f1239; font-weight: 700; font-size: 13px; min-height: 1.2em; }

.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--pine);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 40;
}

.compare-bar {
  position: sticky;
  bottom: 0;
  background: var(--pine);
  color: #fff;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 7;
}
.compare-bar a { color: #fff; }

table.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.cmp th, table.cmp td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 8px;
  vertical-align: top;
}

.progress {
  height: 8px;
  background: #eadfce;
  border-radius: 99px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--gold));
}

footer.fine {
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
}
.hidden { display: none !important; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; min-width: 160px; }
