:root { --color-background-primary: #ffffff; --color-background-secondary: #f5f4f0; --color-background-tertiary: #eeede8; --color-background-info: #e6f1fb; --color-text-primary: #1a1a18; --color-text-secondary: #5f5e5a; --color-text-tertiary: #888780; --color-text-info: #185fa5; --color-border-tertiary: rgba(0,0,0,0.12); --color-border-secondary: rgba(0,0,0,0.22); --color-border-primary: rgba(0,0,0,0.35); --color-border-info: #b5d4f4; --font-sans: system-ui, -apple-system, sans-serif; --border-radius-md: 8px; --border-radius-lg: 12px; }
@media (prefers-color-scheme: dark) { :root { --color-background-primary: #1e1e1c; --color-background-secondary: #2a2a28; --color-background-tertiary: #333331; --color-background-info: #0c2840; --color-text-primary: #f0efe8; --color-text-secondary: #a8a79f; --color-text-tertiary: #6e6d68; --color-text-info: #85b7eb; --color-border-tertiary: rgba(255,255,255,0.1); --color-border-secondary: rgba(255,255,255,0.18); --color-border-primary: rgba(255,255,255,0.28); --color-border-info: #185fa5; } }
body { font-family: var(--font-sans); color: var(--color-text-primary); background: var(--color-background-tertiary); min-height: 100vh; padding: 2rem 1rem; }
.container { max-width: 720px; margin: 0 auto; background: var(--color-background-primary); border-radius: var(--border-radius-lg); border: 0.5px solid var(--color-border-tertiary); padding: 2rem; }
h2 { font-size: 20px; font-weight: 500; margin-bottom: 4px; } .sub { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 1.5rem; }
.tabs { display: flex; gap: 8px; margin-bottom: 1.5rem; flex-wrap: wrap; } .tab { padding: 6px 14px; border-radius: var(--border-radius-md); border: 0.5px solid var(--color-border-secondary); font-size: 13px; cursor: pointer; background: transparent; color: var(--color-text-secondary); font-family: var(--font-sans); } .tab.active { background: var(--color-background-secondary); color: var(--color-text-primary); border-color: var(--color-border-primary); font-weight: 500; } .tab:hover { background: var(--color-background-secondary); }
.school-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 1.25rem; } .school-bar input { flex: 1; padding: 7px 10px; border-radius: var(--border-radius-md); border: 0.5px solid var(--color-border-secondary); font-size: 14px; background: transparent; color: var(--color-text-primary); font-family: var(--font-sans); } .add-btn { padding: 7px 14px; border-radius: var(--border-radius-md); border: 0.5px solid var(--color-border-secondary); font-size: 13px; cursor: pointer; background: transparent; color: var(--color-text-primary); white-space: nowrap; font-family: var(--font-sans); } .add-btn:hover { background: var(--color-background-secondary); }
.school-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1.5rem; } .stab { padding: 5px 12px; border-radius: var(--border-radius-md); border: 0.5px solid var(--color-border-tertiary); font-size: 13px; cursor: pointer; background: transparent; color: var(--color-text-secondary); display: flex; align-items: center; gap: 6px; font-family: var(--font-sans); } .stab.active { background: var(--color-background-info); color: var(--color-text-info); border-color: var(--color-border-info); } .stab .del { font-size: 11px; opacity: 0.6; cursor: pointer; } .stab .del:hover { opacity: 1; }
.section { margin-bottom: 1.5rem; } .sec-title { font-size: 13px; font-weight: 500; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 0.5px solid var(--color-border-tertiary); }
.row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; } .row label { font-size: 13px; flex: 1; color: var(--color-text-primary); } .row .q { font-size: 11px; color: var(--color-text-tertiary); display: block; margin-top: 2px; } .stars { display: flex; gap: 3px; padding-top: 2px; } .star { width: 26px; height: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
.total-card { background: var(--color-background-secondary); border-radius: var(--border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; } .total-num { font-size: 32px; font-weight: 500; } .total-label { font-size: 13px; color: var(--color-text-secondary); } .tier { font-size: 13px; font-weight: 500; }
.notes-area { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: var(--border-radius-md); border: 0.5px solid var(--color-border-secondary); font-size: 13px; resize: vertical; min-height: 60px; background: transparent; color: var(--color-text-primary); font-family: var(--font-sans); }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; } .comp-card { background: var(--color-background-primary); border: 0.5px solid var(--color-border-tertiary); border-radius: var(--border-radius-lg); padding: 1rem; } .comp-name { font-size: 14px; font-weight: 500; margin-bottom: 8px; } .comp-total { font-size: 28px; font-weight: 500; margin-bottom: 2px; } .comp-tier { font-size: 12px; color: var(--color-text-secondary); margin-bottom: 10px; } .comp-row { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; border-bottom: 0.5px solid var(--color-border-tertiary); } .comp-row:last-child { border-bottom: none; } .comp-cat { color: var(--color-text-secondary); } .comp-val { font-weight: 500; }
.empty { font-size: 13px; color: var(--color-text-tertiary); text-align: center; padding: 2rem; }
.questions-sec { background: var(--color-background-secondary); border-radius: var(--border-radius-lg); padding: 1rem 1.25rem; margin-bottom: 1rem; } .q-title { font-size: 13px; font-weight: 500; margin-bottom: 10px; } .q-item { font-size: 13px; color: var(--color-text-secondary); padding: 6px 0; border-bottom: 0.5px solid var(--color-border-tertiary); display: flex; gap: 8px; } .q-item:last-child { border-bottom: none; } .q-num { font-weight: 500; color: var(--color-text-primary); min-width: 18px; } .q-cat { font-size: 11px; color: var(--color-text-tertiary); margin-bottom: 2px; } </style>
Rate each school on tour to find your best fit
`; html += `</div>`;
}
if (activeView === "questions") {
html += <div class="questions-sec"><div class="q-title">Questions to ask your tour guide</div>;
QUESTIONS.forEach((q, i) => {
html += <div class="q-item"><span class="q-num">${i+1}</span><div><div class="q-cat">${q.cat}</div>${q.q}</div></div>;
});
html += </div>;
html += `<div class="questions-sec"><div class="q-title">Questions to ask admissions / financial aid</div>
<div class="q-item"><span class="q-num">1</span><div><div class="q-cat">Financial</div>"What percentage of demonstrated financial need does the school meet on average, and are merit scholarships renewable?"</div></div>
<div class="q-item"><span class="q-num">2</span><div><div class="q-cat">Outcomes</div>"What's the 4-year graduation rate for engineering, and what's the average starting salary for recent grads in my major?"</div></div>
<div class="q-item"><span class="q-num">3</span><div><div class="q-cat">Access</div>"How many undergrads are in paid research positions, and what's the co-op or internship participation rate?"</div></div>
</div>`;
}
if (activeView === "compare") {
const rated = schools.filter(s => getScore(s) > 0);
if (rated.length === 0) {
html += <div class="empty">Rate at least one school to see comparisons here.</div>;
} else {
const sorted = [...rated].sort((a,b) => getScore(b)-getScore(a));
html += <div class="compare-grid">;
sorted.forEach(s => {
const sc = getScore(s);
const t = getTier(sc);
html += <div class="comp-card"> <div class="comp-name">${s}</div> <div class="comp-total" style="color:${t.color}">${sc}</div> <div class="comp-tier">${t.label}</div>;
CRITERIA.forEach(cat => {
const cs = getCatScore(s, cat.cat);
html += <div class="comp-row"> <span class="comp-cat">${cat.cat.split(" ")[0]}</span> <span class="comp-val" style="color:${cs>=70?'#1D9E75':cs>=50?'#378ADD':cs>0?'#BA7517':'#888780'}">${cs>0?cs+'%':'—'}</span> </div>;
});
html += </div>;
});
html += </div>;
}
}
app.innerHTML = html; }
function setView(v) { activeView = v; saveData(); render(); } function selectSchool(i) { activeSchool = i; saveData(); render(); } function addSchool() { const inp = document.getElementById("newname"); const name = inp?.value?.trim(); if (!name) return; if (!schools.includes(name)) { schools.push(name); data[name] = {}; } activeSchool = schools.indexOf(name); saveData(); render(); } function removeSchool(i) { if (schools.length === 1) return; delete data[schools[i]]; schools.splice(i, 1); activeSchool = Math.min(activeSchool, schools.length - 1); saveData(); render(); } function rate(id, val) { const sname = schools[activeSchool]; if (!data[sname]) data[sname] = {}; data[sname][id] = (data[sname][id] === val) ? 0 : val; saveData(); render(); } function saveNote(val) { const sname = schools[activeSchool]; if (!data[sname]) data[sname] = {}; data[sname]._notes = val; saveData(); }
// Load data on page load loadData();
render(); </script>