@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  --paper: #FAF7F2;
  --card: #FFFFFF;
  --ink: #1E2A30;
  --muted: #5C6A72;
  --line: #E3DDD3;
  --accent: #24566B;
  --accent-soft: #E4EEF2;
  --must: #2F6B4F;
  --nice: #3A6F8F;
  --dont: #7E858A;
  --noway: #A6463A;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30,42,48,.06), 0 6px 20px rgba(30,42,48,.07);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 400; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
small, .muted { color: var(--muted); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 680px; }

/* header / footer */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand .mark { height: 32px; width: auto; display: block; }
.site-head nav a { margin-left: 18px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .95rem; }
.site-head nav a:hover { color: var(--ink); }
.site-foot { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px; font-size: .9rem; color: var(--muted); }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-foot .more-resources { display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .95rem; }
.site-foot .copyright { float: right; color: var(--muted); }
@media (max-width: 700px) { .site-foot .copyright { float: none; display: block; margin-top: 8px; } }
.credit { display: inline-flex; align-items: center; gap: 12px; color: var(--muted); text-decoration: none; }
.credit img { height: 50px; width: auto; display: block; }
.made-by { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.made-by img { width: 240px; height: auto; }

main { padding: 40px 0; }
section + section { margin-top: 48px; }

/* buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 12px 20px; border-radius: 999px; border: 1.5px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  transition: transform .05s ease, background .15s ease;
}
.btn:hover { background: #1b4455; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
label .hint { font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=url], textarea, select {
  width: 100%; font: inherit; padding: 11px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 3px solid #9cc3d3; outline-offset: 1px; }
textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { margin: 0; font-weight: 400; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }
.note { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; font-size: .95rem; }
.output { word-break: break-all; font-size: .85rem; background: #F3F0EA; border-radius: 10px; padding: 12px; margin-top: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.chip { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; color: #fff; }

/* ---------- landing ---------- */
.hero { padding: 24px 0 8px; }
.hero p.lede { font-size: 1.25rem; color: var(--muted); max-width: 640px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steps li::before { counter-increment: s; content: counter(s); font-family: "Fraunces", serif; font-size: 1.8rem; color: var(--accent); display: block; }
.pile-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.pile-legend span { padding: 6px 14px; border-radius: 999px; color: #fff; font-weight: 600; font-size: .95rem; }

/* ---------- sort ---------- */
.sort-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.progress { flex: 1; min-width: 200px; }
.progress .bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s ease; }
.progress small { display: block; margin-top: 6px; }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.counts span { font-size: .85rem; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.counts b { font-weight: 700; }

.stage { display: grid; place-items: center; min-height: 340px; }
.sort-card {
  width: min(520px, 100%); background: #fff; border-radius: 20px; padding: 32px 30px 30px;
  box-shadow: 0 2px 4px rgba(30,42,48,.06), 0 16px 40px rgba(30,42,48,.12);
  border-top: 8px solid var(--accent); text-align: left;
  animation: dealIn .22s ease-out;
}
.sort-card h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 14px 0 10px; }
.sort-card p { font-size: 1.1rem; color: #33434B; margin: 0; }
@keyframes dealIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.sort-card.out-M { animation: outM .2s ease-in forwards; }
.sort-card.out-N { animation: outN .2s ease-in forwards; }
.sort-card.out-D { animation: outD .2s ease-in forwards; }
.sort-card.out-X { animation: outX .2s ease-in forwards; }
@keyframes outM { to { opacity: 0; transform: translate(-60px, 60px) rotate(-6deg); } }
@keyframes outN { to { opacity: 0; transform: translate(-20px, 70px) rotate(-2deg); } }
@keyframes outD { to { opacity: 0; transform: translate(20px, 70px) rotate(2deg); } }
@keyframes outX { to { opacity: 0; transform: translate(60px, 60px) rotate(6deg); } }

.pile-buttons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 24px auto 0; max-width: 900px; }
.pile-btn {
  font: inherit; font-weight: 700; color: #fff; border: 0; border-radius: 14px; padding: 16px 10px;
  cursor: pointer; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 2px 0 rgba(0,0,0,.15);
}
.pile-btn kbd { font: 600 .75rem ui-monospace, Menlo, monospace; opacity: .8; background: rgba(255,255,255,.18); padding: 1px 6px; border-radius: 5px; }
.pile-btn small { color: rgba(255,255,255,.85); font-weight: 600; font-size: .75rem; }
.pile-btn:hover { filter: brightness(1.08); }
.pile-btn:active { transform: translateY(1px); box-shadow: none; }
@media (max-width: 600px) {
  .pile-buttons { grid-template-columns: 1fr 1fr; }
  .pile-buttons .pile-btn:last-child { grid-column: span 2; }
  .pile-btn kbd { display: none; }
}
.under-stage { display: flex; justify-content: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.modal-back { position: fixed; inset: 0; background: rgba(20,30,35,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 18px; padding: 26px; max-width: 560px; width: 100%; max-height: 85vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.swap-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.swap-list button { width: 100%; text-align: left; font: inherit; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.swap-list button:hover { border-color: var(--must); background: #EEF5F1; }

/* review board */
.board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: start; }
@media (max-width: 1000px) { .board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .board { grid-template-columns: 1fr; } }
.col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.col h3 { margin: 0; padding: 12px 14px; color: #fff; font-family: "Source Sans 3", sans-serif; font-size: 1rem; display: flex; justify-content: space-between; }
.col ul { list-style: none; margin: 0; padding: 8px; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.col li { border: 1px solid var(--line); border-left-width: 5px; border-radius: 8px; padding: 7px 8px 8px 10px; font-size: .92rem; display: grid; gap: 5px; line-height: 1.3; }
.col li select { width: 100%; padding: 3px 6px; font-size: .8rem; border-radius: 6px; color: var(--muted); }
.col .empty { color: var(--muted); font-size: .9rem; padding: 10px; }

/* colleges */
.college-list { display: grid; gap: 14px; margin-top: 16px; }
.college { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.college-head { display: flex; gap: 10px; align-items: center; }
.college-head input { flex: 1; }
.rate-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid #F0ECE5; font-size: .95rem; }
.rate-row:first-of-type { border-top: 0; }
.stars { display: flex; gap: 2px; flex-shrink: 0; }
.stars button { font-size: 1.25rem; line-height: 1; background: none; border: 0; cursor: pointer; color: #D5CFC4; padding: 2px; }
.stars button.on { color: #C98A1B; }
.stars button.unsure { font-size: .78rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; margin-left: 6px; }
.stars button.unsure.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.rate-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 2px; }
.priv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 6px 0; font-size: .95rem; line-height: 1.3; cursor: pointer; }
label.check input { margin-top: 3px; }
.badge-private { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: #1E2A30; color: #fff; padding: 1px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip-x { background: rgba(255,255,255,.25); border: 0; color: #fff; border-radius: 99px; width: 20px; height: 20px; line-height: 1; cursor: pointer; font-weight: 700; }
.chip-x:disabled { opacity: .4; cursor: not-allowed; }
.inline-form { display: flex; gap: 10px; align-items: center; }
.inline-form input { flex: 1; }
.custom-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 10px; padding: 8px 12px; background: #fff; }

.tips { margin: 18px 0 8px; }
.tips summary { cursor: pointer; font-weight: 700; }
.tip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin-top: 8px; }
@media (max-width: 640px) { .tip-grid { grid-template-columns: 1fr; } }
.tip h3 { font-size: 1rem; margin: 0 0 4px; font-family: "Source Sans 3", sans-serif; }
.tip p { font-size: .93rem; margin: 0; color: #33434B; }

/* ---------- report ---------- */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 24px; }
.report-head .meta { color: var(--muted); font-size: .95rem; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 200px 1fr 70px; align-items: center; gap: 12px; font-size: .95rem; }
.bar-row .track { height: 14px; background: #EDE8E0; border-radius: 99px; overflow: hidden; display: flex; }
.bar-row .track i { display: block; height: 100%; }
.bar-row .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr 70px; } .bar-row .track { grid-column: 1 / -1; order: 3; } }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mini {
  background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--accent); border-radius: 10px; padding: 10px 12px; break-inside: avoid;
}
.mini b { display: block; }
.mini .cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.mini .ask { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.mini .ask::before { content: "Think about: "; font-weight: 700; color: var(--ink); }
.pile-head { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.pile-head .dot { width: 14px; height: 14px; border-radius: 50%; }
.pile-head h2 { margin: 0; }
.inline-list { font-size: .95rem; color: #33434B; }
.tension { border-left: 4px solid #C98A1B; background: #FFF8EA; padding: 10px 14px; border-radius: 0 10px 10px 0; margin-bottom: 8px; }
table.rank { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.rank th, table.rank td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.rank th { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.rank td.num { font-variant-numeric: tabular-nums; }
.diff-up { color: var(--must); font-weight: 700; }
.diff-down { color: var(--noway); font-weight: 700; }
.compare-table td, .compare-table th { vertical-align: top; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; color: #fff; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.no-print { }
.only-print { display: none; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .site-head, .site-foot, .no-print { display: none !important; }
  .only-print { display: block; }
  main { padding: 0; }
  .panel { box-shadow: none; }
  section, .mini, .tension, .bar-row, table.rank tr, .college { break-inside: avoid; }
  h2, h3, .pile-head { break-after: avoid; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  a { color: inherit; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
