@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --navy-950: #0a1a33;
  --navy-900: #0e2148;
  --navy-800: #163264;
  --navy-700: #1f4380;
  --gold-500: #c9a227;
  --gold-400: #dab94a;
  --gold-100: #f6ecc9;
  --cream: #f7f4ec;
  --paper: #fffdf7;
  --ink: #14203a;
  --ink-soft: #4d5a75;
  --line: #dcd4bd;
  --admit-green: #1e6b4f;
  --admit-green-bg: #e5f2ec;
  --deny-rust: #9a3b28;
  --deny-rust-bg: #f7e9e3;
  --radius: 10px;
  --shadow: 0 10px 30px -12px rgba(10, 26, 51, 0.25);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--navy-900);
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: var(--navy-800); }

.mono { font-family: 'IBM Plex Mono', monospace; }

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--gold-100);
  padding: 20px 0;
  border-bottom: 3px solid var(--gold-500);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
}
.brand-mark .accent { color: var(--gold-400); }
.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-100);
  opacity: 0.75;
}
.nav-links { display: flex; gap: 22px; font-size: 0.92rem; }
.nav-links a { color: var(--gold-100); text-decoration: none; opacity: 0.85; }
.nav-links a:hover { opacity: 1; text-decoration: underline; text-decoration-color: var(--gold-500); }

/* ---------- Layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.wrap.narrow { max-width: 820px; }

.hero {
  padding: 8px 0 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  background: var(--navy-900);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 2.5rem; font-weight: 600; max-width: 700px; }
.hero p.lede { color: var(--ink-soft); font-size: 1.08rem; max-width: 620px; margin-top: 14px; }

.stat-strip {
  display: flex;
  gap: 0;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.stat-cell {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--navy-900);
}
.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ---------- Form ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
fieldset {
  border: none;
  padding: 0;
  margin: 0 0 28px;
}
legend {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  color: var(--navy-800);
  padding: 0 0 12px;
  border-bottom: 2px solid var(--gold-500);
  width: 100%;
  margin-bottom: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.74rem; color: var(--ink-soft); font-weight: 400; }
input[type=number], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--ink);
}
input[type=number]:focus, select:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
  border-color: var(--gold-500);
}
input[type=file] {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  width: 100%;
  background: #fff;
}

.btn {
  display: inline-block;
  background: var(--navy-900);
  color: #fff;
  border: none;
  padding: 13px 26px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--navy-800); }
.btn.gold { background: var(--gold-500); color: var(--navy-950); }
.btn.gold:hover { background: var(--gold-400); }
.btn.ghost { background: transparent; color: var(--navy-800); border: 1px solid var(--navy-800); }

/* ---------- Result ---------- */
.verdict {
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  border: 1px solid var(--line);
  margin-bottom: 28px;
}
.verdict.admit { background: var(--admit-green-bg); border-color: var(--admit-green); }
.verdict.deny { background: var(--deny-rust-bg); border-color: var(--deny-rust); }
.verdict-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.verdict.admit .verdict-label { color: var(--admit-green); }
.verdict.deny .verdict-label { color: var(--deny-rust); }
.verdict-headline {
  font-family: 'Fraunces', serif;
  font-size: 2.3rem;
  font-weight: 700;
  margin: 10px 0 4px;
}
.verdict.admit .verdict-headline { color: var(--admit-green); }
.verdict.deny .verdict-headline { color: var(--deny-rust); }
.gauge-wrap { margin: 22px auto; max-width: 360px; }

.factor-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.factor-name { width: 190px; font-size: 0.88rem; font-weight: 500; }
.factor-bar-track { flex: 1; height: 8px; background: #eee7d0; border-radius: 4px; overflow: hidden; }
.factor-bar-fill { height: 100%; background: linear-gradient(90deg, var(--navy-800), var(--gold-500)); }
.factor-pct { width: 46px; text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Admin ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }
.metric-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.metric-card .num { font-family: 'Fraunces', serif; font-size: 1.9rem; color: var(--navy-900); font-weight: 600; }
.metric-card .lbl { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; background: var(--paper); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--navy-900); color: var(--gold-100); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: #faf6e8; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 0.74rem; font-weight: 600; }
.pill.admit { background: var(--admit-green-bg); color: var(--admit-green); }
.pill.deny { background: var(--deny-rust-bg); color: var(--deny-rust); }

.section-title { font-size: 1.3rem; margin: 40px 0 16px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.note-box {
  background: var(--gold-100);
  border: 1px solid var(--gold-500);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.86rem;
  color: var(--navy-900);
  margin-bottom: 24px;
}
