/* ============================================================
   NobleCamps Virtual Interview
   Shared design system. Used by apply.html and admin.html.

   Direction: near-black ground, stark white type, condensed
   uppercase display faces, square corners, hairline rules.
   High contrast, minimal chrome, one accent colour.

   To swap the accent for something electric, change --accent
   (and --accent-soft / --accent-deep) below. Nothing else needs
   to move. For example:
       --accent: #e9ff3d; --accent-soft: #f2ff7a; --accent-deep: #b4c528;
   ============================================================ */

:root {
  /* Ground and type */
  --paper:   #0a0a0b;   /* page */
  --paper-2: #121214;   /* card */
  --paper-3: #1a1a1d;   /* raised panel */
  --card:       #121214;
  --card-hover: #1a1a1d;
  --ink:   #ffffff;
  --muted: #8b8b93;

  /* Accent */
  --accent:      #c9a961;
  --accent-soft: #e0c485;
  --accent-deep: #8a7342;

  /* Rules: hairlines, not borders */
  --line:        #242428;
  --line-strong: #3a3a41;

  /* Status */
  --success: #6ab598;
  --warning: #d4b876;
  --danger:  #e06a55;

  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent);

  /* Square. No rounding anywhere. */
  --radius: 0px;
  --radius-lg: 0px;

  --font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Sofia Sans Condensed', 'Inter', sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
body { min-height: 100vh; }

button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -60px; left: 0;
  z-index: 500;
  background: var(--accent);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============ TYPOGRAPHY ============
   Display type is condensed, uppercase and tightly tracked.
   Body copy stays in Inter for legibility at small sizes. */
h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--ink);
}
h1 em, h2 em { font-style: normal; color: var(--accent); font-weight: 800; }

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .current { color: var(--accent); }

.reg-mark {
  font-size: 9px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 2px;
  vertical-align: super;
  line-height: 0;
}
/* The logo. Every page used to set a font-size here for the
   wordmark it replaced, so the height is in em: each place keeps the
   proportion it already chose, and one number changes all of them.
   The white artwork is the right one because every page is dark. */
.mark {
  display: inline-block;
  height: 1.9em;
  width: auto;
  vertical-align: middle;
}

.lede {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 58ch;
}

/* ============ FORM CONTROLS ============ */
.field { margin-bottom: 22px; display: block; }
.field-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
  display: block;
}
.field-label .req { color: var(--accent); margin-left: 3px; }
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 7px;
  line-height: 1.5;
}

input, select, textarea {
  font-family: var(--font);
  font-size: 15px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-2);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper-3);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.6; }
textarea { resize: vertical; line-height: 1.55; }

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath fill='%23c9a961' d='M5.5 7L0 0h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: var(--danger); }
.field-error {
  display: none;
  font-size: 12px;
  color: var(--danger);
  margin-top: 8px;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.field.invalid .field-error { display: block; }
.field-error::before { content: "\26A0  "; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.rate-group { display: grid; grid-template-columns: 1fr 120px; gap: 8px; }

/* ============ BUTTONS ============
   Square, letterspaced, uppercase. Ghost by default; solid to commit. */
.btn {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid transparent;
  border-radius: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.3; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent-soft); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); background: var(--paper-2); }

.btn-success { background: var(--success); color: var(--paper); border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: transparent; color: var(--success); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); color: var(--paper); }

.btn-record { background: var(--danger); color: var(--paper); border-color: var(--danger); }
.btn-record:hover:not(:disabled) { background: transparent; color: var(--danger); }

.btn-sm { padding: 9px 15px; font-size: 10px; letter-spacing: 0.14em; }
.btn-block { width: 100%; }

/* ============ CHIPS ============ */
.chip {
  display: inline-block;
  padding: 4px 9px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 0;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-pending  { color: var(--warning); border-color: rgba(212,184,118,0.4); }
.chip-approved { color: var(--success); border-color: rgba(106,181,152,0.45); }
.chip-rejected { color: var(--danger);  border-color: rgba(224,106,85,0.45); }
.chip-sector   { color: var(--ink); border-color: var(--line-strong); font-weight: 600; }
.chip-new      { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.chip-sample   { color: var(--muted); border-color: var(--line); }

/* ============ NOTICES ============ */
.notice {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--paper-2);
  padding: 14px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 20px;
}
.notice strong {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 5px;
  color: var(--accent);
}
.notice.danger { border-left-color: var(--danger); }
.notice.danger strong { color: var(--danger); }
.notice p { color: var(--muted); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(140px);
  background: var(--ink);
  color: var(--paper);
  padding: 15px 26px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  z-index: 400;
  transition: transform 0.25s;
  max-width: calc(100vw - 24px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); color: var(--paper); }
.toast.danger  { background: var(--danger);  color: var(--paper); }

/* ============ MODE BADGE ============ */
.mode-badge {
  position: fixed;
  top: 0; right: 0;
  background: var(--paper-3);
  color: var(--muted);
  padding: 6px 13px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  z-index: 300;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
@media (max-width: 700px) {
  .mode-badge {
    top: auto; right: 0; bottom: 0;
    border-bottom: none;
    border-top: 1px solid var(--line);
    opacity: 0.8;
  }
}

/* ============ EMPTY STATE ============ */
.empty-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .row, .row-3 { grid-template-columns: 1fr; }
}

/* ============ PROJECT PIPELINE ============
   Green: done. Red: where the project sits right now. Dim: not reached.
   Each step is a button that reveals that stage's panel. */
.pipeline {
  display: flex;
  border: 1px solid var(--line);
  margin-bottom: 12px;
  overflow-x: auto;
}
.pipe-step {
  flex: 1 1 0;
  min-width: 118px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  padding: 14px 14px 13px;
  text-align: left;
  color: var(--muted);
  position: relative;
  transition: background 0.15s;
}
.pipe-step:last-child { border-right: none; }
.pipe-step::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; background: transparent;
}
.pipe-step .n { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; }
.pipe-step .l {
  display: block;
  font-family: var(--display);
  font-size: 17px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.01em;
  line-height: 1; margin-top: 5px;
}
.pipe-step .s { display: block; font-size: 11px; margin-top: 6px; color: var(--muted); line-height: 1.35; }

.pipe-step.done { color: var(--ink); }
.pipe-step.done .n { color: var(--success); }
.pipe-step.done::after { background: var(--success); }

.pipe-step.current { color: var(--ink); background: var(--paper-2); }
.pipe-step.current .n { color: var(--danger); }
.pipe-step.current .s { color: var(--danger); }
.pipe-step.current::after { background: var(--danger); }

.pipe-step.cancelled { color: var(--ink); }
.pipe-step.cancelled .n, .pipe-step.cancelled .s { color: var(--danger); }
.pipe-step.cancelled::after { background: var(--danger); }

.pipe-step.upcoming { opacity: 0.4; cursor: not-allowed; }

.pipe-step:not(:disabled):hover { background: var(--paper-3); }
.pipe-step.active { outline: 1px solid var(--accent); outline-offset: -1px; background: var(--paper-3); }

.pipe-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 30px; }
.pipe-tab {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 9px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 9px 13px;
}
.pipe-tab:hover { color: var(--ink); }
.pipe-tab.active { color: var(--ink); border-color: var(--accent); }
.pipe-badge { color: var(--accent); margin-left: 4px; }

.step-panel[hidden] { display: none !important; }

/* ------------------------------------------------------------
   INTERVIEW
   The call that happens before anything is awarded. Both portals
   render these, so the shapes live here rather than in either page.
   ------------------------------------------------------------ */
.iv-card { border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 12px; }
.iv-card.settled { border-left: 2px solid var(--success); }
.iv-card.overdue { border-left: 2px solid var(--danger); }

.iv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.iv-head .n {
  font-family: var(--display); font-size: 20px; font-weight: 700;
  text-transform: uppercase; line-height: 1;
}
.iv-head .e { font-size: 11.5px; color: var(--muted); }

.iv-when {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line-strong); padding: 14px 16px; margin-bottom: 14px;
}
.iv-when .big {
  font-family: var(--display); font-size: 22px; font-weight: 700;
  text-transform: uppercase; line-height: 1;
}
.iv-when .sub { font-size: 12px; color: var(--muted); }
.iv-join { font-family: var(--mono); font-size: 12px; color: var(--accent); word-break: break-all; }

.iv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.iv-grid .wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .iv-grid { grid-template-columns: 1fr; } }

.iv-agenda { margin-top: 18px; }
.iv-agenda-head {
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.iv-q {
  border-left: 2px solid var(--line-strong); padding: 2px 0 2px 14px;
  margin-bottom: 14px; font-size: 13.5px; line-height: 1.6; white-space: pre-wrap;
}
.iv-q.from-trainer { border-left-color: var(--accent); }
.iv-q .from {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 5px; white-space: normal;
}
.iv-q.from-trainer .from { color: var(--accent); }
.iv-empty { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ------------------------------------------------------------
   PARTICIPANT FEEDBACK
   The QR panel, the results, and the fullscreen code for a
   projector. Both portals render these from feedback.js.
   ------------------------------------------------------------ */
.qr-block { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.qr-code {
  width: 190px; flex-shrink: 0; padding: 12px;
  background: #fff; border: 1px solid var(--line-strong);
}
.qr-side { flex: 1; min-width: 250px; }
.qr-lede { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin-bottom: 14px; }
.qr-url {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  word-break: break-all; line-height: 1.6;
  border: 1px solid var(--line); padding: 10px 12px;
}
.qr-open {
  margin-top: 16px; font-size: 9px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--success);
}

.fb-headline {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  border: 1px solid var(--line-strong); padding: 20px 22px; margin-bottom: 24px;
}
.fb-score {
  font-family: var(--display); font-size: 54px; font-weight: 800;
  line-height: 0.9; color: var(--accent);
}
.fb-score .of { font-size: 20px; color: var(--muted); margin-left: 2px; }
.fb-headline-note { font-size: 12.5px; color: var(--muted); }

.fb-question { margin-bottom: 26px; }
.fb-q-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; margin-bottom: 12px;
}
.fb-q-head .q { font-size: 13.5px; }
.fb-q-head .a {
  font-family: var(--display); font-size: 20px; font-weight: 700; white-space: nowrap;
}
.fb-q-head .ideal {
  font-family: var(--body); font-size: 10px; font-weight: 400;
  letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase;
}
.fb-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; align-items: end; }
.fb-bar {
  position: relative; height: 92px; border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.fb-bar .fill { background: var(--accent); opacity: 0.75; min-height: 2px; }
.fb-bar.ideal .fill { background: var(--success); }
.fb-bar .n {
  position: absolute; top: 6px; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.fb-bar .l {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 7px;
  font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); text-align: center; line-height: 1.3;
}
.fb-question { padding-bottom: 24px; }

.fb-comments { margin-top: 34px; }
.fb-comment {
  border-left: 2px solid var(--line-strong); padding: 2px 0 2px 14px;
  margin-bottom: 16px; font-size: 13.5px; line-height: 1.6;
}
.fb-comment .when {
  display: block; font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}

/* The fullscreen code. Deliberately plain: a big black square on
   white reads from the back of a room, anything clever does not. */
#qr-stage {
  position: fixed; inset: 0; z-index: 4000; background: #ffffff;
  display: flex; align-items: center; justify-content: center; padding: 4vmin;
}
.qr-stage-inner {
  display: flex; gap: 6vmin; align-items: center; flex-wrap: wrap; justify-content: center;
}
.qr-stage-code { width: min(62vh, 62vw); background: #fff; }
.qr-stage-words { color: #0a0a0a; max-width: 42ch; }
.qr-stage-words .k {
  font-size: 12px; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: #6b6b6b;
}
.qr-stage-words .t {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 6vw, 76px); line-height: 0.95; margin: 14px 0 18px;
}
.qr-stage-words .s { font-size: clamp(14px, 1.6vw, 20px); color: #4a4a4a; }
.qr-stage-close {
  position: absolute; top: 20px; right: 20px;
  background: transparent; border: 1px solid #cfcfcf; color: #4a4a4a;
  padding: 10px 16px; font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
}
.qr-stage-close:hover { border-color: #0a0a0a; color: #0a0a0a; }
@media (max-width: 720px) { .qr-stage-code { width: 72vw; } }
