@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/poppins-600.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-700.ttf") format("truetype");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/poppins-800.ttf") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-400.ttf") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-700.ttf") format("truetype");
}

:root {
  --navy: #0F1B2D;
  --navy-2: #16263c;
  --navy-3: #1c314d;
  --steel: #3D5A80;
  --cream: #F4EFE6;
  --ice: #90CAF9;
  --ink: #E8E4DA;
  --muted: #9AA8BB;
  --line: #2A3F5A;
  --ok: #7DCEA0;
  --ok-bg: #173528;
  --warn: #F0C36A;
  --warn-bg: #3A2E12;
  --danger: #E07A6A;
  --danger-bg: #3A1C1A;
  --tap: 44px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #0A1220; }
body {
  font-family: "Lato", "Segoe UI", system-ui, sans-serif;
  background: #0A1220;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}

h1, h2, h3, h4, .brand-name, .score, .stat b, .stamp {
  font-family: "Poppins", "Segoe UI", sans-serif;
}

a { color: var(--ice); }
a:focus-visible, button:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 2px;
}

.shell {
  max-width: 390px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--navy);
  padding-bottom: 118px;
  position: relative;
}
@media (min-width: 480px) {
  body { padding: 20px 0 32px; }
  .shell {
    border: 8px solid #1a2a40;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0,0,0,.5);
    min-height: 780px;
    overflow: hidden;
  }
}
@media (min-width: 900px) {
  .shell { max-width: 430px; }
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy);
}
.brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 6px;
}
.brand-name {
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 17px;
}
.brand .sub {
  color: var(--ice);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.banner {
  background: #2A2416;
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid #4A3E1E;
  border-bottom: 1px solid #4A3E1E;
}
.nav-small {
  display: flex;
  gap: 12px;
  padding: 6px 16px 8px;
  background: var(--navy-2);
}
.nav-small a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.nav-small a.on, .nav-small a[aria-current="page"] { color: var(--ice); }

main { padding: 16px; }

h1 { font-size: 22px; margin: 0 0 8px; color: var(--cream); font-weight: 700; }
h2 { font-size: 16px; margin: 22px 0 8px; color: var(--cream); font-weight: 700; }
h3 { font-size: 15px; margin: 0 0 6px; color: var(--cream); font-weight: 600; }
p.lead { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
p.map {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 4px solid var(--ice);
  background: var(--navy-2);
  color: var(--cream);
  font-size: 14px;
  font-weight: 700;
}
.meta { color: var(--muted); font-size: 13px; }
.jump { margin: 0 0 14px; font-size: 14px; }
.jump a { margin-right: 8px; }
.empty { color: var(--muted); padding: 10px 0; }

.tabs {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #0B1524;
  border-top: 1px solid var(--line);
  z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  max-width: 390px;
  margin: 0 auto;
}
@media (min-width: 480px) {
  .tabs {
    position: absolute;
    max-width: none;
    border-radius: 0 0 20px 20px;
  }
}
@media (min-width: 900px) {
  .shell { max-width: 430px; }
  .tabs { max-width: none; }
}
.tabs a {
  color: #9AA8BB;
  text-decoration: none;
  min-height: var(--tap);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 0 2px;
  text-align: center;
  font-family: "Poppins", sans-serif;
}
.tabs a.on, .tabs a[aria-current="page"] {
  color: var(--navy);
  background: var(--ice);
}

.flash {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  min-height: var(--tap);
  display: flex;
  align-items: center;
}
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--danger-bg); color: var(--danger); }
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.flash[hidden] { display: none; }

.card {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin: 0 0 10px;
}
.card a.block {
  display: block;
  text-decoration: none;
  color: inherit;
  min-height: var(--tap);
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.row.wrap { flex-wrap: wrap; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--navy-3);
  color: var(--ice);
  white-space: nowrap;
}
.badge.real { background: var(--ice); color: var(--navy); }
.badge.open { background: var(--ok-bg); color: var(--ok); }
.badge.low { background: var(--danger-bg); color: var(--danger); }
.badge.praise { background: #1F3A2C; color: var(--ok); }
.badge.safety { background: #1b1b1b; color: #fff; }
.badge.float { background: var(--steel); color: var(--cream); }
.badge.inactive { background: #2A2A32; color: #8A8A96; }
.badge.proposed { background: #1A3348; color: var(--ice); }
.badge.countered { background: var(--warn-bg); color: var(--warn); }
.badge.accepted { background: #1F3A2C; color: var(--ok); }
.badge.hired { background: var(--ok); color: var(--navy); }
.badge.passed { background: var(--danger-bg); color: var(--danger); }
.badge.sug { background: var(--warn-bg); color: var(--warn); }
.badge.incoming { background: #2A2416; color: var(--warn); }

.score {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 22px;
  color: var(--ice);
}
.score small { font-size: 12px; color: var(--muted); font-weight: 600; }
.breakdown { font-size: 13px; color: var(--muted); margin-top: 6px; }
.queue-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.count { color: var(--muted); font-size: 13px; }
.queue-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
h3.subq { font-size: 14px; margin: 16px 0 8px; color: var(--ice); }

label { display: block; font-weight: 700; font-size: 14px; margin: 12px 0 6px; color: var(--cream); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="file"], input[type="date"], select, textarea {
  width: 100%;
  min-height: var(--tap);
  border: 1px solid var(--steel);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  background: #0B1524;
  color: var(--cream);
  font-family: inherit;
}
textarea { min-height: 88px; resize: vertical; }
.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.scores label { margin-top: 0; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-weight: 700;
}
.check input { width: 22px; height: 22px; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--ice);
  color: var(--navy);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  font-family: "Poppins", sans-serif;
}
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--ice);
  border: 1.5px solid var(--ice);
}
button.ghost, .btn.ghost {
  background: var(--navy-3);
  color: var(--cream);
}
button.danger { background: var(--danger); color: #fff; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-row .btn, .btn-row button { margin-top: 8px; }
.btn-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.btn-row-3 .btn, .btn-row-3 button { margin-top: 8px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--navy-2);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 16px;
}
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-family: "Poppins", sans-serif;
}

.statgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.stat {
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.stat b { display: block; font-size: 22px; color: var(--cream); }
.stat span { color: var(--muted); font-size: 12px; font-weight: 700; }

.dl { margin: 0; }
.dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.dl dt { color: var(--muted); font-size: 13px; }
.dl dd { margin: 0; font-weight: 700; text-align: right; color: var(--cream); }

.chips, .creds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--navy-3);
  color: var(--muted);
  white-space: nowrap;
}
.chip.on { background: var(--ok-bg); color: var(--ok); }
.chip.off { background: #1A1F28; color: #6B7787; }
.chip.float { background: var(--steel); color: var(--cream); }
.chip.rel { background: var(--warn-bg); color: var(--warn); }
.chip.room { background: #1A3348; color: var(--ice); }
.chip.lang { background: #1A3348; color: var(--cream); }

.letter-doc {
  background: #141C1A;
  border: 2px solid var(--ice);
  border-radius: 12px;
  padding: 18px 16px 16px;
  margin: 0 0 12px;
  color: var(--cream);
}
.letter-doc.hired { border-color: var(--ok); background: var(--ok-bg); }
.letter-doc.passed { border-color: var(--danger); background: var(--danger-bg); }
.letter-doc.counter { border-color: var(--warn); }
.stamp {
  display: inline-block;
  border: 3px solid var(--ok);
  color: var(--ok);
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 10px;
  transform: rotate(-8deg);
  font-size: 18px;
}
.stamp.passed { border-color: var(--danger); color: var(--danger); }
.letter-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

.thread { margin: 8px 0 0; padding: 0; list-style: none; }
.thread li {
  position: relative;
  padding: 0 0 14px 18px;
  border-left: 3px solid var(--steel);
}
.thread li:last-child { padding-bottom: 0; }
.thread li::before {
  content: "";
  position: absolute;
  left: -6px; top: 4px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ice);
}
.thread .who { font-weight: 700; color: var(--cream); }

.two { display: grid; gap: 8px; }
@media (min-width: 390px) {
  .two { grid-template-columns: 1fr 1fr; }
}

.muted-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.primary-story {
  border-color: var(--ice);
  box-shadow: inset 3px 0 0 var(--ice);
}
.inactive-card { opacity: 0.72; }
code {
  background: var(--navy-3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--ice);
}
.why {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--cream);
}
.why strong { color: var(--ice); font-weight: 700; }
.below { margin-top: 24px; padding-top: 8px; border-top: 1px dashed var(--line); }
.hidden { display: none !important; }
.walk {
  background: var(--navy-3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.walk b { color: var(--cream); }
