@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&family=Source+Sans+3:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ocean: #004161;
  --ocean-dark: #002c44;
  --orange: #E47618;
  --prospect: #0084B4;
  --sky: #7CC6E7;
  --mist: #EAF3F8;
  --ink: #14313f;
  --grey: #5c7482;
  --line: #d7e4ea;
  --white: #ffffff;
  --radius: 10px;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: 'Source Sans 3', Calibri, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Nunito', Montserrat, sans-serif;
  font-weight: 800;
  color: var(--ocean);
  letter-spacing: -0.01em;
  margin: 0 0 0.4em 0;
}

.eyebrow, .utility, .kicker {
  font-family: var(--mono);
  text-transform: uppercase;
}

a { color: var(--prospect); }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--ocean);
  color: #cfe3ec;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 22px 8px;
}
.sidebar .brand img.mark { height: 40px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 5px 7px; }
.sidebar .brand .tag { font-size: 11px; color: #9fc2d2; margin-top: 2px; }

.sidebar a.nav-link {
  display: block;
  color: #cfe3ec;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
}
.sidebar a.nav-link:hover { background: rgba(255,255,255,0.07); }
.sidebar a.nav-link.active { background: var(--orange); color: #1a1103; font-weight: 600; }

.sidebar .who {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 13px;
  color: #9fc2d2;
}
.sidebar .who .name { color: #fff; font-weight: 600; display: block; margin-bottom: 2px; }
.sidebar button.signout {
  margin-top: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #cfe3ec;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}
.sidebar button.signout:hover { background: rgba(255,255,255,0.08); }

.main { flex: 1; padding: 34px 40px; max-width: 980px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; font-weight: 700; color: var(--orange); margin-bottom: 6px; }
.lede { color: var(--grey); font-size: 15.5px; max-width: 640px; margin-bottom: 26px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mist); color: var(--ocean);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}
.badge.non-negotiable { background: #fdeee0; color: var(--orange); border-color: #f4c99a; }
.badge .star { color: var(--orange); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } .layout { flex-direction: column; } .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; } .sidebar .who { display:none; } .main { padding: 22px 18px; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orange); color: #241505; border: none;
  font-weight: 700; font-size: 14px;
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
  text-decoration: none;
}
.btn:hover { filter: brightness(0.96); }
.btn.secondary { background: var(--white); color: var(--ocean); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--prospect); border: 1px solid var(--line); }
.btn.danger { background: #fdecec; color: #a3312a; border: 1px solid #f2c6c2; }

input, select, textarea {
  font-family: inherit; font-size: 14.5px;
  padding: 9px 11px; border-radius: 7px; border: 1px solid var(--line);
  width: 100%; background: var(--white); color: var(--ink);
}
label { font-size: 13px; font-weight: 600; color: var(--ocean); display: block; margin-bottom: 5px; }
.field { margin-bottom: 14px; }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab {
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--white); border: 1px solid var(--line); color: var(--grey); cursor: pointer;
}
.tab.active { background: var(--ocean); color: #fff; border-color: var(--ocean); }

.resource-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.resource-item:last-child { border-bottom: none; }
.resource-item .meta { font-size: 12px; color: var(--grey); margin-top: 4px; }
.resource-item h4 { margin: 0 0 3px 0; font-size: 15.5px; color: var(--ink); font-family: 'Source Sans 3', sans-serif; font-weight: 700; }
.empty { color: var(--grey); font-size: 14px; padding: 18px 0; }

.error-text { color: #a3312a; font-size: 13.5px; margin-top: 8px; }
.ok-text { color: #1c7a4d; font-size: 13.5px; margin-top: 8px; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--ocean) 0%, var(--ocean-dark) 100%);
  padding: 20px;
}
.login-card { background: var(--white); border-radius: 14px; padding: 36px 34px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
.login-card img.mark { height: 40px; width: auto; display: block; margin-bottom: 18px; }

.hidden { display: none !important; }
.back-link { display:inline-block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--grey); text-decoration: none; margin-bottom: 14px; }
.back-link:hover { color: var(--prospect); }
code.k { background: var(--mist); padding: 2px 6px; border-radius: 5px; font-size: 13px; font-family: var(--mono); }

/* ---- Hiring Wizard ---- */
.wizard-track { display: flex; align-items: flex-start; gap: 0; margin: 22px 0 30px 0; overflow-x: auto; padding-bottom: 6px; }
.wizard-step-btn { flex: 1; min-width: 108px; display: flex; flex-direction: column; align-items: center; text-align: center; background: none; border: none; cursor: pointer; padding: 0 6px; position: relative; }
.wizard-step-btn .num {
  width: 38px; height: 38px; border-radius: 50%; background: var(--white); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; color: var(--grey);
  margin-bottom: 8px; z-index: 1;
}
.wizard-step-btn.active .num { background: var(--orange); border-color: var(--orange); color: #241505; }
.wizard-step-btn.done .num { background: var(--ocean); border-color: var(--ocean); color: #fff; }
.wizard-step-btn .lbl { font-size: 12.5px; font-weight: 600; color: var(--grey); line-height: 1.25; }
.wizard-step-btn.active .lbl { color: var(--ocean); }
.wizard-track::before { content: none; }
.wizard-step-btn:not(:last-child)::after {
  content: ""; position: absolute; top: 19px; left: 55%; width: 90%; height: 2px; background: var(--line); z-index: 0;
}
.wizard-step-btn.done:not(:last-child)::after { background: var(--ocean); }

.step-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--mist); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-icon svg { width: 28px; height: 28px; stroke: var(--ocean); }
.step-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 6px; }
.step-num-tag { font-family: var(--mono); font-size: 12px; color: var(--orange); font-weight: 600; letter-spacing: 0.06em; }

.checklist { list-style: none; padding: 0; margin: 14px 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.checklist li:last-child { border-bottom: none; }
.checklist li .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--sky); color: #04303f; flex-shrink: 0; display:flex; align-items:center; justify-content:center; font-size: 11px; font-weight: 700; margin-top: 1px; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.stat-pill { background: var(--mist); border-radius: 10px; padding: 10px 14px; min-width: 110px; }
.stat-pill .n { font-family: var(--mono); font-weight: 600; font-size: 20px; color: var(--ocean); display: block; }
.stat-pill .l { font-size: 11.5px; color: var(--grey); }

.step-actions { display: flex; justify-content: space-between; margin-top: 22px; }
.wizard-resources { margin-top: 10px; }
.wizard-resources .resource-item h4 { font-size: 14.5px; }

.sidebar .nav-divider {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7ea6bb;
  padding: 16px 12px 6px;
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.14);
}

/* ---- ask a question ---- */
#askFab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  background: var(--orange); color: #241505; border: none;
  border-radius: 999px; padding: 12px 18px;
  font-family: 'Source Sans 3', sans-serif; font-weight: 700; font-size: 14px;
  cursor: pointer; box-shadow: 0 6px 20px rgba(0,65,97,.28);
}
#askFab:hover { filter: brightness(.96); }
#askWrap {
  position: fixed; inset: 0; z-index: 61; background: rgba(20,49,63,.55);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
@media (min-width: 760px){ #askWrap { align-items: center; } }
#askBox {
  background: #fff; border-radius: 14px; padding: 22px 24px;
  width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
#askBox h3 { margin: 0 0 4px; font-size: 18px; }
#askBox p.ctx { font-size: 12.5px; color: var(--grey); margin: 0 0 14px; font-family: var(--mono); }
#askBox textarea { width: 100%; min-height: 110px; }
#askBox .row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }

/* --- Quiz interaction ------------------------------------------------------
   Clearance below the action bar. #askFab is fixed to bottom-right, and
   .step-actions puts the primary button on the right — so on a phone the
   "Ask a question" pill landed exactly on top of Submit. Someone trying to
   finish a quiz hit Ask instead, every time. This lets the bar scroll clear
   of it. */
.step-actions { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

/* A question still waiting for an answer, marked after a submit attempt. */
.q-card.needs-answer {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(228, 118, 24, .18);
  scroll-margin-top: 20px;
  scroll-margin-bottom: 120px;
}

/* Live count above the submit button. */
.quiz-progress {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--grey);
  padding: 10px 2px 0;
}
.quiz-progress.complete { color: #1c7a4d; }
.quiz-progress.missing { color: #a3312a; font-weight: 600; }
