/* Beacon premium SaaS UI layer. Page templates keep legacy classes for
   behavior, while these classes provide the shared visual system. */

:root {
  --b-ink: #171822;
  --b-ink-2: #2c3142;
  --b-muted: #6f7482;
  --b-faint: #9aa1ad;
  --b-paper: #fffdf8;
  --b-panel: #ffffff;
  --b-wash: #f6f0e7;
  --b-line: #e8dfd2;
  --b-line-2: #f0e8dc;
  --b-coral: #df5a3d;
  --b-coral-dark: #b84731;
  --b-gold: #d99b2d;
  --b-green: #2f7a51;
  --b-green-bg: #e8f5ed;
  --b-amber: #946318;
  --b-amber-bg: #fff2d2;
  --b-red: #9e352b;
  --b-red-bg: #fae4dd;
  --b-blue: #38567b;
  --b-blue-bg: #e9f0f8;
  --b-shadow: 0 18px 60px rgba(34, 28, 18, 0.09);
  --b-shadow-sm: 0 8px 24px rgba(34, 28, 18, 0.07);
  --b-radius: 8px;
}

html { min-height: 100%; }
body {
  min-height: 100%;
  letter-spacing: 0;
}

.b-shell {
  max-width: 1320px;
  margin: 22px auto 90px;
  padding: 0 28px;
}
.b-shell.narrow { max-width: 1060px; }

.b-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.b-crumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--b-muted);
  font-size: 12px;
}
.b-crumb a {
  color: var(--b-muted);
  text-decoration: none;
  font-weight: 650;
}
.b-crumb a:hover { color: var(--b-coral); }
.b-crumb b { color: var(--b-ink); }

.b-hero {
  background: var(--b-panel);
  border: 1px solid var(--b-line);
  border-radius: 10px;
  box-shadow: var(--b-shadow-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.b-hero-inner {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background:
    linear-gradient(90deg, rgba(255,253,248,0.97), rgba(248,241,230,0.9)),
    linear-gradient(135deg, rgba(223,90,61,0.07), transparent 54%);
}
.b-eyebrow {
  color: var(--b-coral);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.b-title {
  margin: 5px 0 8px;
  color: var(--b-ink);
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.b-title em {
  color: var(--b-coral);
  font-style: italic;
  font-weight: 450;
}
.b-subtitle {
  color: var(--b-muted);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 720px;
}
.b-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--b-muted);
  font-size: 12.5px;
}
.b-meta b { color: var(--b-ink); }

.b-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 8px;
  min-width: 520px;
}
.b-kpis.auto {
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  margin-bottom: 14px;
}
.b-kpi {
  background: rgba(255,255,255,0.84);
  border: 1px solid var(--b-line-2);
  border-radius: var(--b-radius);
  padding: 10px 12px;
}
.b-kpi .k {
  color: var(--b-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.b-kpi .v {
  margin-top: 4px;
  color: var(--b-ink);
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.02em;
}
.b-kpi.good .v { color: var(--b-green); }
.b-kpi.warn .v { color: var(--b-red); }

.b-card {
  background: var(--b-panel);
  border: 1px solid var(--b-line);
  border-radius: 10px;
  box-shadow: var(--b-shadow-sm);
  overflow: hidden;
}
.b-card-pad { padding: 16px; }
.b-panel-head {
  padding: 13px 15px;
  border-bottom: 1px solid var(--b-line-2);
  background: #fbf7f0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 780;
}
.b-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.b-btn {
  min-height: 34px;
  border: 1px solid var(--b-line);
  border-radius: 7px;
  background: var(--b-panel);
  color: var(--b-ink-2);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 680;
  font-size: 12.5px;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.b-btn:hover {
  border-color: var(--b-coral);
  color: var(--b-coral);
}
.b-btn.primary {
  background: linear-gradient(135deg, var(--b-coral-dark), var(--b-coral));
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 22px rgba(223,90,61,0.24);
}
.b-btn.primary:hover { color: white; box-shadow: 0 10px 28px rgba(223,90,61,0.3); }
.b-btn.danger:hover {
  border-color: var(--b-red);
  color: var(--b-red);
  background: var(--b-red-bg);
}
.b-btn:disabled { opacity: 0.48; cursor: not-allowed; box-shadow: none; }

.b-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--b-line);
  background: var(--b-panel);
  color: var(--b-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.b-chip.green { color: var(--b-green); background: var(--b-green-bg); border-color: #cfe8d8; }
.b-chip.amber { color: var(--b-amber); background: var(--b-amber-bg); border-color: #ead6a3; }
.b-chip.red { color: var(--b-red); background: var(--b-red-bg); border-color: #edc6bb; }
.b-chip.blue { color: var(--b-blue); background: var(--b-blue-bg); border-color: #ccd9e9; }

.b-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.b-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
}
.b-search {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 560px;
}
.b-search input,
.b-input,
.b-select,
.b-textarea {
  width: 100%;
  border: 1px solid var(--b-line);
  border-radius: 7px;
  background: var(--b-panel);
  color: var(--b-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.b-search input { height: 36px; padding: 0 12px 0 36px; }
.b-input,
.b-select { min-height: 40px; padding: 0 12px; }
.b-textarea { padding: 12px; min-height: 220px; resize: vertical; line-height: 1.55; }
.b-search input:focus,
.b-input:focus,
.b-select:focus,
.b-textarea:focus {
  border-color: var(--b-coral);
  box-shadow: 0 0 0 3px rgba(223,90,61,0.1);
}
.b-search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--b-faint);
  font-size: 15px;
}

.b-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.b-filter {
  min-width: 145px;
  height: 34px;
  border: 1px solid var(--b-line);
  border-radius: 7px;
  background: var(--b-panel);
  color: var(--b-ink-2);
  padding: 0 10px;
  font-size: 12px;
}

.b-table-shell {
  border: 1px solid var(--b-line);
  border-radius: 9px;
  overflow: auto;
  background: var(--b-panel);
  box-shadow: var(--b-shadow-sm);
}
.b-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.b-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbf7f0;
  color: var(--b-muted);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  padding: 10px;
  border-bottom: 1px solid var(--b-line);
}
.b-table td {
  padding: 10px;
  border-bottom: 1px solid var(--b-line-2);
  vertical-align: top;
}
.b-table tr:hover td { background: #fffaf3; }
.b-name {
  color: var(--b-ink);
  font-weight: 780;
  line-height: 1.24;
}
.b-small {
  color: var(--b-faint);
  font-size: 11px;
  line-height: 1.35;
  margin-top: 3px;
}

.b-field { margin-bottom: 16px; }
.b-field-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 7px;
  color: var(--b-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.b-field-hint {
  color: var(--b-faint);
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 10.5px;
}
.b-upload {
  position: relative;
  border: 1.5px dashed var(--b-line);
  border-radius: 9px;
  background: #fffdf8;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.b-upload:hover,
.b-upload.is-dragover {
  border-color: var(--b-coral);
  background: #fff6ed;
}
.b-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.b-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.b-ready-item {
  border: 1px solid var(--b-line-2);
  border-radius: 8px;
  background: #fffdf8;
  padding: 10px;
}
.b-ready-item .k {
  color: var(--b-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.b-ready-item .v {
  margin-top: 4px;
  color: var(--b-ink);
  font-weight: 780;
}

.b-flow {
  display: grid;
  gap: 8px;
}
.b-flow-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--b-line-2);
  border-radius: 8px;
  background: #fffdf8;
}
.b-flow-step .num {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #191b27;
  color: #fff8ef;
  font-weight: 780;
  font-size: 12px;
}
.b-alert {
  border: 1px solid var(--b-line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--b-muted);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
.b-alert.warn { background: var(--b-amber-bg); color: var(--b-amber); border-color: #ead6a3; }
.b-alert.danger { background: var(--b-red-bg); color: var(--b-red); border-color: #edc6bb; }

@media (max-width: 960px) {
  .b-shell { padding: 0 16px; }
  .b-hero-inner,
  .b-toolbar,
  .b-topline {
    flex-direction: column;
    align-items: stretch;
  }
  .b-kpis,
  .b-kpis.auto,
  .b-grid-2 {
    grid-template-columns: 1fr;
    min-width: 0;
  }
  .b-search {
    max-width: none;
    min-width: 0;
  }
  .b-readiness {
    grid-template-columns: 1fr;
  }
}

/* Beacon v16 premium parity layer: final production override. */
:root {
  --b-ink: #18202a;
  --b-ink-2: #2c3142;
  --b-muted: #5f6874;
  --b-faint: #89919d;
  --b-bg: #f4f1eb;
  --b-panel: rgba(255,255,255,.92);
  --b-card: rgba(255,255,255,.78);
  --b-warm: #fffdf8;
  --b-wash: #f6f0e7;
  --b-line: rgba(31,38,46,.11);
  --b-soft: #f0e8dc;
  --b-gold: #c69335;
  --b-gold-dark: #8f6421;
  --b-blue: #2e6f9f;
  --b-green: #2f855a;
  --b-green-bg: #e8f5ed;
  --b-amber: #b7791f;
  --b-amber-bg: #fff2d2;
  --b-red: #c2413b;
  --b-red-bg: #fae4dd;
  --b-violet: #6854b8;
  --b-violet-bg: #eeeafd;
  --b-shadow: 0 18px 44px rgba(31,38,46,.10);
  --b-shadow-sm: 0 8px 18px rgba(31,38,46,.10);
  --b-dense: 0 4px 14px rgba(31,38,46,.05);
  --dawn-cream: var(--b-bg);
  --dawn-cream-warm: var(--b-wash);
  --horizon-coral: var(--b-gold);
  --sun-orange: var(--b-gold-dark);
  --sun-gold: var(--b-gold);
  --sun-soft-glow: var(--b-amber-bg);
  --night-indigo: var(--b-ink);
  --warm-gray: var(--b-muted);
  --warm-gray-light: var(--b-faint);
  --border: var(--b-line);
  --border-soft: var(--b-soft);
  --green: var(--b-green);
  --green-soft: var(--b-green-bg);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--b-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #f7f4ee 0%, #ece7de 100%),
    repeating-linear-gradient(90deg, rgba(40,38,30,.025) 0 1px, transparent 1px 72px);
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
main { max-width: 1440px; margin: 0 auto; padding: 0 24px; }

.masthead {
  max-width: 1440px;
  margin: 0 auto 20px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--b-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--b-gold-dark), var(--b-gold));
  box-shadow: 0 10px 24px rgba(198,147,53,.22);
  overflow: hidden;
}
.brand-mark svg { width: 36px; height: 36px; }
.brand-name {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 820;
  line-height: 1.05;
  color: var(--b-ink);
}
.brand-name em { font-style: normal; color: var(--b-gold-dark); }
.brand-tag {
  margin-top: 4px;
  color: var(--b-faint);
  font: 700 10px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.user-greeting { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.greet-name { color: var(--b-ink); font-weight: 720; }
.greet-email { font: 700 10px ui-monospace, "JetBrains Mono", monospace; color: var(--b-faint); }
.nav-sep { display: none; }
.nav-link, .signout-link {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  color: var(--b-muted);
  font: 720 11px ui-monospace, "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
}
.nav-link:hover, .signout-link:hover {
  border-color: var(--b-line);
  background: rgba(255,255,255,.68);
  color: var(--b-ink);
}
.nav-link-admin { background: var(--b-ink); color: white !important; }

.b-shell, .compose-wrap, .crit-wrap, .rn-wrap {
  max-width: 1360px;
  margin: 22px auto 80px;
  padding: 0 24px;
}
.crit-wrap { max-width: 1320px; }
.rn-wrap { max-width: 1180px; }
.b-hero, .hero, .b-card, .card, .rn-card, .empty-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: var(--b-panel);
  box-shadow: var(--b-shadow-sm);
  overflow: hidden;
}
.b-hero-inner, .hero-inner {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background:
    linear-gradient(90deg, rgba(255,253,248,.97), rgba(248,241,230,.9)),
    linear-gradient(135deg, rgba(198,147,53,.10), transparent 54%);
}
.b-eyebrow, .eyebrow, .rn-label, .crit-label {
  color: var(--b-gold-dark);
  font: 760 10px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.b-title, h2.title, .compose-h1, .crit-h1, .rn-h1 {
  margin: 5px 0 8px;
  color: var(--b-ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 32px;
  font-weight: 760;
  line-height: 38px;
  letter-spacing: 0;
}
.b-title em, h2.title em, .compose-h1 em, .crit-h1 em, .rn-h1 em {
  color: var(--b-gold-dark);
  font-style: normal;
}
.b-subtitle, .subtitle, .compose-sub, .crit-sub, .rn-sub {
  color: var(--b-muted);
  font-size: 14px;
  line-height: 20px;
  max-width: 720px;
}
.b-kpis, .kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 8px;
  min-width: 520px;
}
.b-kpi, .kpi, .ready-tile {
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--b-soft);
  border-radius: 10px;
  background: rgba(255,255,255,.84);
}
.b-kpi .k, .kpi .k, .ready-tile .k, .k {
  color: var(--b-muted);
  font: 760 11px/14px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.b-kpi .v, .kpi .v, .ready-tile .v {
  margin-top: 4px;
  color: var(--b-ink);
  font-size: 22px;
  line-height: 28px;
  font-weight: 760;
}
.b-grid-2, .grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  gap: 18px;
  align-items: start;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-label, .label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--b-muted);
  font: 720 12px/16px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
input[type="text"], input[type="email"], input[type="password"], textarea, select,
.field-input, .input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: var(--b-panel);
  color: var(--b-ink);
  outline: none;
  box-shadow: none;
}
input[type="text"], input[type="email"], input[type="password"], select,
.field-input, .input, .select {
  height: 42px;
  padding: 11px 12px;
}
textarea, .textarea { min-height: 220px; padding: 12px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus,
.field-input:focus, .input:focus, .select:focus, .textarea:focus {
  border-color: var(--b-blue);
  box-shadow: 0 0 0 3px rgba(46,111,159,.16);
}

.b-btn, .btn, .btn-secondary, .login-submit, .rank-btn, .rn-link-btn,
.add-criterion-btn, .criterion-soft-delete, .criterion-delete {
  min-height: 38px;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255,255,255,.75);
  color: var(--b-ink-2);
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 16px;
  font-weight: 720;
  text-decoration: none;
  box-shadow: var(--b-dense);
}
.b-btn.primary, .btn.primary, .login-submit, .rank-btn:not(.secondary-btn), .rn-link-btn.visible {
  background: var(--b-ink);
  border-color: var(--b-ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31,38,46,.14);
}
button:disabled, .b-btn:disabled, .btn:disabled, .rank-btn:disabled { opacity: .48; cursor: not-allowed; }
.danger:hover, .btn.danger:hover, .criterion-soft-delete:hover {
  border-color: var(--b-red);
  color: var(--b-red);
  background: var(--b-red-bg);
}
.b-chip, .chip, .rn-state-chip, .stream-state-chip, .criterion-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--b-line);
  background: var(--b-panel);
  color: var(--b-muted);
  font: 720 11px/14px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .02em;
  text-transform: none;
  white-space: nowrap;
}
.b-chip.green, .chip.green, .rn-state-chip.done, .stream-state-chip.done {
  color: var(--b-green);
  background: var(--b-green-bg);
  border-color: #cfe8d8;
}
.b-chip.amber, .chip.amber, .rn-state-chip.running, .stream-state-chip.running {
  color: var(--b-amber);
  background: var(--b-amber-bg);
  border-color: #ead6a3;
}
.b-chip.red, .chip.red, .rn-state-chip.error, .stream-state-chip.error {
  color: var(--b-red);
  background: var(--b-red-bg);
  border-color: #edc6bb;
}
.b-chip.blue, .chip.blue { color: var(--b-blue); background: var(--b-blue-bg); border-color: #ccd9e9; }
.b-chip.violet, .chip.violet { color: var(--b-violet); background: var(--b-violet-bg); border-color: #ddd5fa; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.running .dot, .dot.active { animation: bPulse 1.2s infinite; }
@keyframes bPulse { 50% { opacity: .32; } }

.table-shell, .b-table-wrap {
  border: 1px solid var(--b-line);
  border-radius: 12px;
  overflow: auto;
  background: var(--b-panel);
  box-shadow: var(--b-shadow-sm);
}
table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; line-height: 18px; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 38px;
  padding: 10px 12px;
  text-align: left;
  background: #fbf7f0;
  color: var(--b-muted);
  border-bottom: 1px solid var(--b-line);
  font: 760 11px/14px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
td { height: 54px; padding: 10px 12px; border-bottom: 1px solid var(--b-soft); vertical-align: middle; }
tr:hover td { background: rgba(198,147,53,.08); }
tr.selected td { background: rgba(46,111,159,.08); }
input[type="checkbox"] { width: 16px; height: 16px; }
.name { color: var(--b-ink); font-weight: 760; line-height: 1.24; cursor: pointer; }
.small { color: var(--b-faint); font-size: 11px; line-height: 1.35; margin-top: 3px; }
.score { font-size: 19px; font-weight: 820; letter-spacing: 0; }
.toolbar { min-height: 58px; display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 12px 0; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }

.drop-zone, .upload {
  position: relative;
  min-height: 240px;
  padding: 28px 20px;
  text-align: center;
  border: 1.5px dashed rgba(31,38,46,.22);
  border-radius: 10px;
  background: var(--b-warm);
  cursor: pointer;
}
.drop-zone:hover, .upload:hover, .drop-zone.is-dragover {
  background: rgba(46,111,159,.08);
  border-color: var(--b-blue);
}
.drop-zone input, .upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ready { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.alert, .gen-error.active, .rn-error-banner.active, .error-banner {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  background: var(--b-warm);
  color: var(--b-muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.alert.green { background: var(--b-green-bg); color: var(--b-green); border-color: #cfe8d8; }
.alert.amber { background: var(--b-amber-bg); color: var(--b-amber); border-color: #ead6a3; }
.alert.red, .error-banner { background: var(--b-red-bg); color: var(--b-red); border-color: #edc6bb; }

.phase-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.phase {
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--b-soft);
  border-radius: 10px;
  background: var(--b-warm);
  font-size: 12px;
}
.phase.active { border-left: 3px solid var(--b-gold); background: rgba(198,147,53,.10); }
.progress-bar { height: 8px; border-radius: 999px; background: rgba(31,38,46,.10); overflow: hidden; }
.progress-bar span {
  display: block;
  height: 100%;
  width: 58%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--b-blue), var(--b-gold));
  animation: bLoad 1.8s ease-in-out infinite;
}
@keyframes bLoad { 50% { width: 82%; } }

.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: 440px;
  max-width: calc(100vw - 32px);
  padding: 28px;
  border: 1px solid var(--b-line);
  border-radius: 18px;
  background: var(--b-panel);
  box-shadow: var(--b-shadow);
  text-align: left;
}
.login-logo { width: 40px; height: 40px; margin: 0 0 22px; }
.login-card h1 { margin: 0 0 6px; color: var(--b-ink); font-size: 32px; line-height: 38px; font-weight: 760; }
.login-card h1 em { font-style: normal; color: var(--b-gold-dark); }
.login-tag { margin-bottom: 24px; color: var(--b-faint); font: 700 10px ui-monospace, "JetBrains Mono", monospace; letter-spacing: .16em; text-transform: uppercase; }
.login-greeting { font-size: 14px; line-height: 20px; color: var(--b-muted); margin: 0 0 20px; }
.login-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 10px; background: var(--b-wash); }
.login-tab { flex: 1; min-height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--b-muted); font-size: 13px; font-weight: 720; cursor: pointer; }
.login-tab.active { background: white; color: var(--b-ink); box-shadow: var(--b-dense); }

.criterion-card {
  min-height: 86px;
  background: var(--b-panel);
  border: 1px solid var(--b-line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 14px;
  align-items: start;
  box-shadow: var(--b-dense);
}
.criterion-card.criterion-manual { background: rgba(198,147,53,.08); }
.criterion-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: var(--b-ink);
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 760;
  padding: 0;
}
.criterion-name-display { font-size: 15px; line-height: 20px; font-weight: 720; color: var(--b-ink); margin-bottom: 6px; }
.criterion-desc-display { font-size: 13px; line-height: 19px; color: var(--b-muted); max-width: 760px; }
.add-criterion-form {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: var(--b-panel);
  padding: 16px;
  margin-top: 8px;
  box-shadow: var(--b-shadow-sm);
}
.crit-actions, .stream-actions, .rn-link-row, .submit-row, .two-btn-row, .aux-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.gen-progress { display: none; }
.gen-progress.active { display: block; }
.gen-error { display: none; }
.gen-error.active { display: block; }

@media (max-width: 1100px) {
  main { padding: 0 18px; }
  .masthead { padding: 16px 18px; }
  .b-kpis, .kpis, .flow, .phase-grid, .cards { grid-template-columns: repeat(2, 1fr); min-width: 0; }
  .b-grid-2, .grid2, .split { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  main { padding: 0 12px; }
  .masthead { flex-direction: column; align-items: stretch; }
  .b-hero-inner, .hero-inner, .toolbar, .b-topline, .topline { flex-direction: column; align-items: stretch; }
  .b-kpis, .kpis, .flow, .ready, .cards, .phase-grid { grid-template-columns: 1fr; }
  .b-title, h2.title, .compose-h1, .crit-h1, .rn-h1 { font-size: 30px; line-height: 36px; }
  .login-card { padding: 22px; }
  .drop-zone, .upload { min-height: 190px; }
}

/* Workspace-only cleanup: prevent legacy run-response UI from becoming
   the primary recruiter experience. */
.workspace-shell {
  border-radius: 18px !important;
  border: 1px solid var(--b-line) !important;
  background: var(--b-panel) !important;
  box-shadow: var(--b-shadow) !important;
}
.workspace-tabs {
  min-height: 46px !important;
  padding: 6px 10px !important;
  border-bottom: 1px solid var(--b-line) !important;
  background: #fbf7f0 !important;
}
.workspace-tab {
  min-height: 34px !important;
  border-radius: 10px !important;
  color: var(--b-muted) !important;
  font-size: 12px !important;
  font-weight: 720 !important;
}
.workspace-tab.active {
  background: var(--b-ink) !important;
  color: #fff !important;
  border-color: var(--b-ink) !important;
}
.workspace-section { padding: 18px !important; }
.workspace-title {
  color: var(--b-ink) !important;
  font-size: 18px !important;
  line-height: 24px !important;
  font-weight: 720 !important;
}
.workspace-sub { color: var(--b-muted) !important; font-size: 13px !important; line-height: 18px !important; }
.workspace-kpi, .evidence-health-card, .case-stat {
  border-radius: 10px !important;
  border: 1px solid var(--b-soft) !important;
  background: rgba(255,255,255,.84) !important;
}
.profiles-table .score-cell,
.leaderboard-table .score-cell,
.rank-card .match {
  color: var(--b-ink) !important;
  font-size: 24px !important;
  line-height: 28px !important;
  font-weight: 820 !important;
  letter-spacing: 0 !important;
}
.state-chip, .source-chip {
  min-height: 24px !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font: 720 11px/14px ui-monospace, "JetBrains Mono", monospace !important;
}
.workspace-add-card {
  margin-top: 16px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr);
  gap: 16px;
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--b-warm), #fff);
  box-shadow: var(--b-dense);
}
.workspace-add-card h3 {
  margin: 0 0 6px;
  color: var(--b-ink);
  font-size: 15px;
  line-height: 20px;
  font-weight: 720;
}
.workspace-add-card p,
.workspace-add-hint {
  margin: 0;
  color: var(--b-muted);
  font-size: 13px;
  line-height: 18px;
}
.workspace-file-chips { margin-top: 10px; }
.workspace-empty-state {
  padding: 26px;
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--b-warm), #fff);
  box-shadow: var(--b-dense);
  text-align: left;
}
.workspace-empty-state h3 {
  margin: 6px 0 8px;
  color: var(--b-ink);
  font-size: 20px;
  line-height: 26px;
}
.workspace-empty-state p {
  max-width: 620px;
  margin: 0 0 14px;
  color: var(--b-muted);
  font-size: 14px;
  line-height: 20px;
}
.raw-response-panel {
  margin-top: 14px;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: var(--b-warm);
}
.raw-response-panel > summary {
  color: var(--b-muted);
  font: 720 12px/16px ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: .02em;
}
.raw-response-panel[open] > summary { color: var(--b-ink); }
@media (max-width: 900px) {
  .workspace-add-card { grid-template-columns: 1fr; }
}

.pipeline-open-btn {
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  background: rgba(255,255,255,0.82);
  color: var(--b-ink);
  font-size: 12px;
  font-weight: 720;
}
.candidate-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(24,32,42,0.18);
  z-index: 80;
}
.candidate-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(460px, 100vw);
  height: 100vh;
  background: rgba(255,255,255,0.96);
  border-left: 1px solid rgba(31,38,46,0.12);
  box-shadow: -22px 0 60px rgba(31,38,46,0.18);
  z-index: 81;
  padding: 20px;
  overflow-y: auto;
}
.candidate-drawer[hidden],
.candidate-drawer-backdrop[hidden] { display: none; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.drawer-title {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  color: var(--b-ink);
}
.drawer-sub {
  margin-top: 4px;
  color: var(--b-muted);
  font-size: 12px;
}
.drawer-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  background: white;
}
.hiring-panel,
.notes-panel,
.evidence-breakdown-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  padding: 14px;
  margin-bottom: 14px;
}
.hiring-panel label {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 720;
  margin-bottom: 6px;
  color: var(--b-ink);
}
.hiring-panel select,
.hiring-panel input[type="url"],
.hiring-panel textarea {
  width: 100%;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: white;
}
.hiring-panel textarea {
  min-height: 130px;
  resize: vertical;
}
.drawer-save {
  margin-top: 10px;
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: var(--b-ink);
  color: white;
  padding: 0 14px;
  font-weight: 720;
}
.note-item {
  border-top: 1px solid var(--b-line);
  padding-top: 10px;
  margin-top: 10px;
}
.note-meta {
  color: var(--b-muted);
  font-size: 11px;
  line-height: 15px;
  margin-bottom: 4px;
}
.auth-score-big {
  font-size: 30px;
  line-height: 34px;
  font-weight: 780;
  color: var(--b-ink);
}
.skill-proof-help {
  color: var(--b-muted);
  font-size: 11px;
  line-height: 15px;
  max-width: 230px;
}
.run-score-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.run-score-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.82);
}
.run-score-card.top {
  border-color: rgba(47,133,90,0.5);
  background: rgba(47,133,90,0.10);
}
.run-pill {
  text-align: left;
  cursor: pointer;
}
.run-pill.active {
  outline: 2px solid rgba(198,147,53,0.45);
  outline-offset: 2px;
}
.comparison-table { min-width: 980px; }
.comparison-chip {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 720;
  background: #eef0f2;
}
.comparison-chip.strong-proof,
.comparison-chip.project-backed,
.comparison-chip.clearly-demonstrated {
  color: #2f855a;
  background: rgba(47,133,90,0.12);
}
.comparison-chip.some-proof,
.comparison-chip.partly-demonstrated {
  color: #8f6421;
  background: rgba(198,147,53,0.16);
}
.comparison-chip.no-proof-found,
.comparison-chip.possible-mismatch {
  color: #c2413b;
  background: rgba(194,65,59,0.10);
}
.comparison-chip.needs-follow-up,
.comparison-chip.mentioned-only,
.comparison-chip.self-claimed {
  color: #b7791f;
  background: rgba(183,121,31,0.12);
}

.profile-score-lg {
  display: inline-block;
  min-width: 54px;
  font-size: 22px;
  line-height: 26px;
  font-weight: 780;
  color: var(--b-ink);
  vertical-align: middle;
}

.matrix-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 18px 0 10px;
}

.matrix-heading h3 {
  margin: 0;
  font-size: 17px;
  line-height: 22px;
  font-weight: 760;
  color: var(--b-ink);
}

.matrix-heading p {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--b-muted);
}

.matrix-signal {
  margin-top: 6px;
  max-width: 210px;
  color: var(--b-muted);
  font-size: 12px;
  line-height: 16px;
  white-space: normal;
}

.ranking-status-line {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ranking-detail-actions {
  display: grid;
  gap: 8px;
  min-width: 360px;
}

.criterion-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.score-change-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 10px;
  min-width: 360px;
}

.explanation-placeholder {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed rgba(31, 38, 46, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
}

@media (max-width: 920px) {
  .criterion-card-grid,
  .explanation-grid,
  .score-change-board {
    grid-template-columns: 1fr;
  }
  .ranking-detail-actions {
    min-width: 260px;
  }
}

.profile-toolbar {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.toolbar-group {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.toolbar-btn {
  min-height: 30px;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.76);
  color: var(--b-ink);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

.toolbar-btn.select-action.is-active,
.toolbar-btn.is-active {
  background: rgba(46,111,159,0.12);
  border-color: rgba(46,111,159,0.45);
  color: #2e6f9f;
}

.toolbar-btn.risk-action.is-active {
  background: rgba(183,121,31,0.15);
  border-color: rgba(183,121,31,0.45);
  color: #8f6421;
}

.selection-reason-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.selection-reason-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(46,111,159,0.10);
  color: #2e6f9f;
  font-size: 11px;
  font-weight: 760;
}

.workspace-profile-row.priority-row {
  background: rgba(183,121,31,0.08);
}

.workspace-profile-row.is-duplicate {
  background: rgba(198,147,53,0.06);
}

.explanation-board {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
}

.explanation-summary-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  padding: 12px;
  align-self: start;
  position: sticky;
  top: 12px;
}

.explanation-source-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.copy-explanation-btn {
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: white;
  color: var(--b-ink);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 720;
}

.interview-guide-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.interview-candidate-rail {
  display: grid;
  gap: 8px;
  align-content: start;
  width: 300px;
  max-width: 300px;
  min-width: 0;
  overflow: hidden;
}

.interview-candidate-btn {
  text-align: left;
  border: 1px solid var(--b-line);
  border-radius: 12px;
  background: rgba(255,255,255,0.78);
  padding: 10px 12px;
  cursor: pointer;
  min-width: 0;
}

.interview-candidate-btn b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.interview-candidate-btn span {
  display: block;
  color: var(--b-muted);
  font-size: 12px;
  margin-top: 3px;
}

.interview-candidate-btn.active {
  border-color: rgba(46,111,159,0.45);
  background: rgba(46,111,159,0.10);
}

.interview-question-panel,
#interview-question-panel {
  min-width: 0;
  overflow: hidden;
}

.sticky-candidate-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.94);
  padding: 12px;
  margin-bottom: 12px;
}

.sticky-candidate-head h3 {
  margin: 0;
  font-size: 16px;
}

.sticky-candidate-head p {
  margin: 3px 0 0;
  color: var(--b-muted);
  font-size: 12px;
}

.question-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px;
}

.question-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  padding: 12px;
}

.question-card b {
  display: block;
  margin: 4px 0 8px;
  color: var(--b-ink);
}

.question-card p {
  margin: 7px 0 0;
  color: var(--b-muted);
  font-size: 12px;
  line-height: 16px;
}

.question-card span {
  color: var(--b-ink);
  font-weight: 760;
}

@media (max-width: 980px) {
  .profile-toolbar {
    justify-items: stretch;
  }
  .toolbar-group {
    justify-content: flex-start;
  }
  .explanation-board,
  .interview-guide-layout {
    grid-template-columns: 1fr;
  }
  .question-card-grid {
    grid-template-columns: 1fr;
  }
}

.skillprobe-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.skillprobe-card {
  border: 1px solid var(--b-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(31, 38, 46, 0.08);
}

.skillprobe-card h3 {
  margin: 4px 0 12px;
  font-size: 16px;
  color: var(--b-ink);
}

.card-kicker {
  font-size: 10px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--beacon-gold, #c69335);
}

.skillprobe-controls label {
  display: block;
  margin: 12px 0 6px;
  color: var(--b-ink);
  font-size: 12px;
  font-weight: 760;
}

.skillprobe-controls input,
.skillprobe-controls select,
.recruiter-side-panel input,
.recruiter-side-panel select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--b-ink);
  padding: 9px 11px;
  font: inherit;
  font-size: 13px;
}

.skillprobe-suggestions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.skill-suggestion,
.skillprobe-copy-one {
  border: 1px solid rgba(46, 111, 159, 0.22);
  border-radius: 999px;
  background: rgba(46, 111, 159, 0.08);
  color: #2e6f9f;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}


.skillprobe-actions,
.side-panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.skillprobe-output.empty,
.skillprobe-loading,
.skillprobe-error {
  border: 1px dashed rgba(31, 38, 46, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  padding: 14px;
  color: var(--b-muted);
  font-size: 13px;
  line-height: 18px;
}

.skillprobe-error {
  border-color: rgba(194, 65, 59, 0.28);
  background: rgba(194, 65, 59, 0.08);
  color: #9f302b;
}

.skillprobe-source-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.skillprobe-question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.skillprobe-question-card {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  min-height: 210px;
  padding: 15px;
}

.skillprobe-question-card b {
  display: block;
  margin-bottom: 9px;
  color: var(--b-ink);
  font-size: 15px;
  line-height: 20px;
}

.question-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rubric-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 16px;
  color: var(--b-muted);
}

.rubric-row span {
  font-weight: 800;
}

.rubric-row.green {
  background: rgba(47, 133, 90, 0.10);
}

.rubric-row.green span {
  color: #2f855a;
}

.rubric-row.yellow {
  background: rgba(183, 121, 31, 0.12);
}

.rubric-row.yellow span {
  color: #8f6421;
}

.rubric-row.red {
  background: rgba(194, 65, 59, 0.10);
}

.rubric-row.red span {
  color: #c2413b;
}

.side-panel-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 55;
  min-height: 40px;
  border: 1px solid rgba(31, 38, 46, 0.14);
  border-radius: 999px;
  background: #18202a;
  color: #fff;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(31, 38, 46, 0.20);
  cursor: pointer;
}

.recruiter-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 70;
  width: min(430px, 94vw);
  height: 100vh;
  overflow-y: auto;
  border-left: 1px solid rgba(31, 38, 46, 0.14);
  border-radius: 22px 0 0 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -22px 0 60px rgba(31, 38, 46, 0.18);
  padding: 18px;
}

.recruiter-side-panel[hidden] {
  display: none;
}

.side-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.side-panel-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 28px;
}

.side-panel-section {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(244, 241, 235, 0.72);
  padding: 12px;
  margin-bottom: 12px;
}

.side-panel-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--b-ink);
}

.side-metric {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 30px;
  border-bottom: 1px solid rgba(31, 38, 46, 0.08);
  color: var(--b-muted);
  font-size: 12px;
}

.side-metric:last-child {
  border-bottom: none;
}

.side-metric b,
.side-candidate-name {
  color: var(--b-ink);
  font-weight: 800;
}

.clipboard-item {
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.78);
  padding: 8px;
  margin-bottom: 7px;
  color: var(--b-ink);
  font-size: 12px;
  line-height: 16px;
}


@media (max-width: 1160px) {
  .skillprobe-layout {
    grid-template-columns: 1fr;
  }
  .skillprobe-question-grid {
    grid-template-columns: 1fr;
  }
}


/* Final Profiles toolbar + SkillProbe workspace rebuild */
.profile-toolbar-final {
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  justify-items: stretch;
}
.profile-toolbar-final .toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px;
  border: 1px solid rgba(31,38,46,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.60);
  width: 100%;
}
.profile-toolbar-final .primary-group {
  background: rgba(46,111,159,0.06);
}
.profile-toolbar-final .review-group {
  background: rgba(183,121,31,0.06);
}
.profile-selected-count {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(24,32,42,0.08);
  font-size: 12px;
  font-weight: 760;
  color: #18202a;
}
.toolbar-btn.is-active,
.profile-toolbar-final .risk-action.is-active {
  background: #18202a;
  color: #fff;
  border-color: #18202a;
  box-shadow: 0 8px 18px rgba(31,38,46,0.12);
}
.profile-more-menu {
  position: relative;
}
.profile-more-menu summary {
  list-style: none;
  cursor: pointer;
}
.profile-more-menu summary::-webkit-details-marker {
  display: none;
}
.profile-more-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 190px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(31,38,46,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 44px rgba(31,38,46,0.14);
}
.profile-more-popover a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  color: #18202a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 720;
}
.profile-more-popover a:hover {
  background: rgba(198,147,53,0.10);
}
.profile-filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(5, minmax(136px, 1fr)) 96px;
  gap: 8px;
  align-items: center;
  margin: 12px 0 8px;
  padding: 10px;
  border: 1px solid rgba(31,38,46,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  overflow-x: auto;
}
.profile-filter-panel input,
.profile-filter-panel select {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(31,38,46,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.88);
  color: #18202a;
  font-size: 13px;
  padding: 0 10px;
  outline: none;
}
.profile-filter-panel input:focus,
.profile-filter-panel select:focus {
  border-color: #2e6f9f;
  box-shadow: 0 0 0 3px rgba(46,111,159,0.16);
}
.profile-active-filters,
.selection-reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.active-filter-chip,
.selection-reason-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(46,111,159,0.20);
  border-radius: 999px;
  background: rgba(46,111,159,0.08);
  color: #205777;
  font-size: 11px;
  font-weight: 760;
  padding: 0 5px 0 10px;
  cursor: pointer;
}
.active-filter-chip .chip-remove {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(32,87,119,0.12);
  color: #205777;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1;
}
.active-filter-chip:hover .chip-remove,
.active-filter-chip:focus-visible .chip-remove {
  background: #205777;
  color: white;
}
.selection-reason-chip {
  border-color: rgba(198,147,53,0.26);
  background: rgba(198,147,53,0.10);
  color: #8f6421;
  cursor: default;
}
.workspace-profile-row.priority-row {
  background: rgba(198,147,53,0.08);
  box-shadow: inset 3px 0 0 #c69335;
}
.skillprobe-final-layout {
  grid-template-columns: 340px minmax(0, 1fr);
}
.skillprobe-controls select,
.skillprobe-controls input {
  margin-bottom: 10px;
}
.skillprobe-question-card.common {
  border-left: 4px solid #2e6f9f;
}
.skillprobe-question-card.candidate {
  border-left: 4px solid #c69335;
}
.skillprobe-question-card p {
  margin: 8px 0;
  color: #5f6874;
  font-size: 12.5px;
  line-height: 1.45;
}
.skillprobe-question-card p span,
.rubric-row span {
  font-weight: 760;
  color: #18202a;
}
@media (max-width: 1180px) {
  .profile-filter-panel {
    grid-template-columns: 1fr 1fr;
  }
  .skillprobe-final-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .profile-filter-panel {
    grid-template-columns: 1fr;
  }
  .profile-more-popover {
    left: 0;
    right: auto;
  }
}

/* Apple-level micro-interaction math overrides */
body {
  background: #f4f1eb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.case-wrap {
  max-width: 1680px !important;
  width: calc(100vw - 32px);
  margin: 24px auto 96px !important;
  padding: 0 24px !important;
}

.workspace-shell {
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(31,38,46,0.11);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(31,38,46,0.10);
}

.workspace-title {
  font-size: 26px !important;
  line-height: 32px !important;
  font-weight: 760 !important;
  letter-spacing: 0 !important;
}

.workspace-sub,
.candidate-meta,
.matrix-signal {
  font-size: 13px;
  line-height: 19px;
}

.workspace-tabs {
  min-height: 48px;
  gap: 6px;
}

.workspace-tab {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(31,38,46,0.10);
  letter-spacing: 0;
}

.workspace-tab.active {
  background: #18202a;
  color: #fff;
}

.run-timeline {
  min-height: 88px;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
}

.run-pill {
  flex: 0 0 220px;
  min-height: 76px;
  padding: 12px;
  border-radius: 14px;
}

.run-pill.active {
  border-left: 4px solid #c69335;
}

.run-pill .no {
  font-size: 14px;
  line-height: 18px;
  font-weight: 760;
}

.run-pill .meta {
  font-size: 11px;
  line-height: 15px;
}

.run-score-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.run-score-card {
  min-height: 132px;
  padding: 16px;
  border-radius: 12px;
}

.auth-score-big,
.profile-score-lg {
  font-size: 34px;
  line-height: 38px;
  font-weight: 800;
}

.run-score-card .candidate-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-status-line {
  min-height: 28px;
}

.comparison-table {
  min-width: max(1120px, 100%);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
  width: 260px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: rgba(255,255,255,0.96);
}

.comparison-table th {
  height: 52px;
}

.comparison-table td {
  min-height: 68px;
  padding: 12px;
  vertical-align: top;
}

.comparison-chip,
.state-chip,
.source-chip {
  min-height: 24px;
  border-radius: 999px;
}

.matrix-signal {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.leaderboard-table {
  min-width: 1180px;
  font-size: 12.5px;
  line-height: 18px;
}

.leaderboard-table th {
  height: 42px;
}

.leaderboard-table tbody tr {
  min-height: 64px;
}

.criterion-toggle,
.pipeline-open-btn,
.copy-explanation-btn,
.skillprobe-copy-one {
  min-height: 30px;
  border-radius: 10px;
}

.ranking-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.explanation-board {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(31,38,46,0.10);
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
}

.explanation-summary-card {
  width: 260px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(244,241,235,0.72);
}

.explanation-summary-card .auth-score-big {
  font-size: 42px;
  line-height: 44px;
}

.explanation-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.evidence-breakdown-card {
  min-height: 118px;
  padding: 14px;
  border-radius: 12px;
}

.evidence-breakdown-card b {
  font-size: 13px;
  line-height: 18px;
  font-weight: 760;
}

.evidence-breakdown-card .candidate-meta {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.score-change-board {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.criterion-card-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
}

.criterion-card-grid .evidence-breakdown-card {
  min-height: 132px;
}

.candidate-drawer {
  width: 460px;
  padding: 20px;
  border-radius: 22px 0 0 22px;
  box-shadow: -22px 0 60px rgba(31,38,46,0.18);
  transition: transform 220ms ease;
}

.candidate-drawer-backdrop {
  background: rgba(24,32,42,0.18);
}

.drawer-head {
  min-height: 72px;
}

.drawer-title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 760;
}

.drawer-close {
  width: 32px;
  height: 32px;
}

.hiring-panel {
  padding: 16px;
  border-radius: 14px;
}

.hiring-panel select,
.hiring-panel input[type="url"] {
  min-height: 40px;
}

.hiring-panel textarea {
  min-height: 116px;
}

.drawer-save {
  min-height: 38px;
}

.note-item {
  min-height: 72px;
  padding: 12px;
  border-radius: 12px;
}

.note-meta {
  font-size: 11px;
  line-height: 15px;
}

.skillprobe-final-layout {
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 16px;
}

.skillprobe-card {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
}

.skillprobe-controls label {
  font-size: 10.5px;
  line-height: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skillprobe-controls input,
.skillprobe-controls select {
  min-height: 40px;
  margin-bottom: 10px;
}

.skillprobe-actions .primary {
  width: 100%;
  min-height: 42px;
}

.skillprobe-output.empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.skillprobe-question-grid {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.skillprobe-question-card {
  min-height: 210px;
  padding: 15px;
}

.rubric-row {
  margin-top: 8px;
  padding-left: 9px;
  border-left: 3px solid rgba(31,38,46,0.18);
  font-size: 12px;
  line-height: 17px;
}

.rubric-row.green { border-left-color: #2f855a; }
.rubric-row.yellow { border-left-color: #b7791f; }
.rubric-row.red { border-left-color: #c2413b; }

.interview-guide-layout {
  grid-template-columns: 300px minmax(0, 1fr);
}

.question-card-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.question-card {
  min-height: 160px;
  padding: 14px;
}

.profile-toolbar-final .toolbar-group {
  min-height: 46px;
  gap: 8px;
}

.profile-selected-count {
  min-width: 160px;
  min-height: 30px;
}

.profile-more-menu summary {
  min-height: 34px;
}

.profile-more-popover {
  width: 200px;
}

.profile-filter-panel {
  grid-template-columns: minmax(280px, 1.6fr) repeat(5, minmax(136px, 1fr)) 96px;
  gap: 8px;
}

.profiles-table thead th {
  height: 40px;
}

.profiles-table tbody tr {
  min-height: 58px;
}

.workspace-profile-row.is-selected {
  background: rgba(46,111,159,0.08);
}

.workspace-profile-row.priority-row {
  background: rgba(198,147,53,0.08);
}

.profile-delete-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(194,65,59,0.20);
  border-radius: 999px;
  background: rgba(194,65,59,0.08);
  color: #9a302b;
  font-size: 16px;
  line-height: 1;
  font-weight: 850;
  cursor: pointer;
}

.profile-delete-btn:hover {
  background: rgba(194,65,59,0.14);
  border-color: rgba(194,65,59,0.34);
}

.recruiter-side-panel {
  width: 360px;
  padding: 18px;
}

.side-panel-section {
  border-radius: 12px;
  margin-bottom: 12px;
}

.side-panel-toggle {
  right: 24px;
  min-height: 38px;
}

.skillprobe-loading,
.explanation-placeholder {
  position: relative;
  min-height: 44px;
}

.skillprobe-error {
  min-height: 44px;
  border-color: rgba(194,65,59,0.22);
  background: rgba(194,65,59,0.08);
  color: #8a2b23;
}

@media (max-width: 1024px) {
  .case-wrap {
    width: calc(100vw - 24px);
    padding: 0 18px !important;
  }
  .explanation-board,
  .skillprobe-final-layout,
  .interview-guide-layout,
  .criterion-card-grid,
  .explanation-grid,
  .score-change-board {
    grid-template-columns: 1fr;
  }
  .explanation-summary-card {
    width: auto;
  }
}

@media (max-width: 520px) {
  .case-wrap {
    width: calc(100vw - 16px);
    padding: 0 12px !important;
  }
  .candidate-drawer {
    width: 100vw;
    border-radius: 0;
  }
  .skillprobe-question-grid,
  .question-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Skill Probe plain-language interview bands */
.workspace-tabs {
  gap: 8px !important;
  padding: 8px 12px !important;
}

.workspace-tab {
  padding: 0 14px !important;
  letter-spacing: 0 !important;
  word-spacing: 0.08em;
  white-space: nowrap;
}

.skillprobe-question-card {
  background: rgba(255,255,255,0.92);
  border-color: rgba(31,38,46,0.12);
  box-shadow: 0 12px 28px rgba(31,38,46,0.07);
}

.skillprobe-question-card b {
  font-size: 15.5px;
  line-height: 21px;
}

.listen-for-label {
  margin: 13px 0 6px;
  color: var(--b-ink);
  font-size: 10.5px;
  line-height: 14px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rubric-row {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid transparent;
  font-size: 12.5px;
  line-height: 17px;
}

.rubric-row span {
  line-height: 17px;
}

.rubric-row div {
  color: #384454;
}

.rubric-row.green {
  border-color: rgba(47,133,90,0.20);
  background: rgba(47,133,90,0.095);
}

.rubric-row.yellow {
  border-color: rgba(183,121,31,0.22);
  background: rgba(183,121,31,0.105);
}

.rubric-row.red {
  border-color: rgba(194,65,59,0.18);
  background: rgba(194,65,59,0.075);
}

.watch-out-note {
  margin-top: 10px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(183,121,31,0.18);
  background: rgba(255,246,226,0.72);
  color: #5d6672;
  font-size: 12px;
  line-height: 17px;
}

.watch-out-note span {
  color: #8f6421;
  font-weight: 820;
}

@media (max-width: 720px) {
  .workspace-tabs {
    overflow-x: auto;
    flex-wrap: nowrap !important;
  }

  .workspace-tab {
    flex: 0 0 auto;
  }

  .rubric-row {
    grid-template-columns: 1fr;
  }
}

/* Bulk-run selection UX */
.profile-toolbar-final,
.profile-filter-panel {
  position: sticky;
  z-index: 12;
}

.profile-toolbar-final {
  top: 0;
}

.profile-filter-panel {
  top: 58px;
  backdrop-filter: blur(12px);
}

.bulk-selection-bar,
.profile-band-bar,
.profile-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 10px 24px rgba(31,38,46,0.06);
}

.bulk-selection-bar[hidden] {
  display: none;
}

.bulk-selection-bar b {
  color: var(--b-ink);
}

.bulk-selection-bar span {
  color: var(--b-muted);
  font-size: 12.5px;
}

.bulk-actions,
.profile-page-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-actions select,
.bulk-actions input,
.profile-page-controls select {
  min-height: 34px;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.94);
  color: var(--b-ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 12.5px;
}

.bulk-actions input {
  min-width: 280px;
}

.profile-band-bar {
  justify-content: flex-start;
}

.band-filter {
  min-height: 34px;
  border: 1px solid rgba(31,38,46,0.11);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  color: var(--b-muted);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.band-filter b {
  margin-left: 5px;
  color: var(--b-ink);
  font-variant-numeric: tabular-nums;
}

.band-filter.active,
.band-filter:hover {
  border-color: rgba(46,111,159,0.30);
  background: rgba(46,111,159,0.09);
  color: #2e6f9f;
}

.new-profile-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(46,111,159,0.10);
  color: #2e6f9f;
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reviewed-toggle {
  min-height: 30px;
  border: 1px solid var(--b-line);
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: var(--b-muted);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.reviewed-toggle.is-reviewed {
  border-color: rgba(47,133,90,0.26);
  background: rgba(47,133,90,0.10);
  color: #2f855a;
}

.profile-pagination {
  color: var(--b-muted);
  font-size: 12.5px;
}

#profile-page-number {
  color: var(--b-ink);
  font-weight: 760;
}

@media (max-width: 900px) {
  .profile-toolbar-final,
  .profile-filter-panel {
    position: static;
  }

  .bulk-actions,
  .bulk-actions input,
  .profile-page-controls {
    width: 100%;
  }

  .bulk-actions input,
  .bulk-actions select,
  .bulk-actions button,
  .profile-page-controls button {
    flex: 1 1 100%;
  }
}

/* Screening scorecard desktop split-view */
.skillprobe-final-layout.scorecard-active {
  grid-template-columns: 320px minmax(620px, 1fr) 420px;
  align-items: start;
}

.skillprobe-scorecard-panel {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  border: 1px solid rgba(31,38,46,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 44px rgba(31,38,46,0.10);
  padding: 16px;
}

.skillprobe-scorecard-panel[hidden] {
  display: none;
}

.scorecard-too-small {
  display: none;
  padding: 14px;
  border: 1px solid rgba(183,121,31,0.24);
  border-radius: 12px;
  background: rgba(255,246,226,0.84);
  color: #6d4d18;
  font-size: 13px;
  line-height: 19px;
}

.scorecard-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.scorecard-head h3 {
  margin: 2px 0 4px;
  color: var(--b-ink);
  font-size: 18px;
  line-height: 24px;
}

.scorecard-head p,
.scorecard-progress-row {
  margin: 0;
  color: var(--b-muted);
  font-size: 12px;
  line-height: 16px;
}

.scorecard-verify {
  margin-bottom: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--b-amber);
  border-radius: 0 12px 12px 0;
  background: rgba(255,246,226,0.82);
  color: #6d4d18;
  font-size: 12.5px;
  line-height: 18px;
}

.scorecard-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.score-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--b-line);
  overflow: hidden;
  margin: 6px 0 14px;
}

.score-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--b-ink);
  transition: width 0.25s ease;
}

.scorecard-question-card,
.scorecard-grade-card,
.scorecard-summary-panel {
  border: 1px solid var(--b-line);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  padding: 14px;
  margin-bottom: 14px;
}

.scorecard-question-kicker {
  color: var(--b-muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#scorecard-question-text {
  margin: 0 0 14px;
  color: var(--b-ink);
  font-size: 17px;
  line-height: 25px;
  font-weight: 620;
}

.band-pill {
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 18px;
  margin-bottom: 7px;
  border: 1px solid transparent;
}

.band-pill .band-label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 14px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.band-pill.strong {
  border-color: rgba(47,133,90,0.22);
  background: rgba(47,133,90,0.10);
  color: #1f6f48;
}

.band-pill.partial {
  border-color: rgba(183,121,31,0.22);
  background: rgba(183,121,31,0.10);
  color: #8f6421;
}

.band-pill.weak {
  border-color: rgba(194,65,59,0.18);
  background: rgba(194,65,59,0.08);
  color: #9f332d;
}

.resume-claim-box {
  background: var(--b-bg);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 18px;
  font-style: italic;
  margin-top: 10px;
  color: var(--b-muted);
}

.grade-btn-row,
.scorecard-nav-buttons {
  display: flex;
  gap: 8px;
}

.grade-btn {
  flex: 1;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  background: white;
  color: var(--b-ink);
  font-weight: 760;
  font-size: 14px;
  cursor: pointer;
}

.grade-btn.selected {
  background: var(--b-ink);
  color: white;
  border-color: var(--b-ink);
}

.score-drawer-note {
  min-height: 68px;
  resize: vertical;
}

.scorecard-grade-card label,
.scorecard-summary-panel label {
  display: block;
  margin: 12px 0 6px;
  color: var(--b-ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
}

.scorecard-tip {
  color: var(--b-muted);
  font-size: 12px;
  line-height: 16px;
  margin-bottom: 8px;
}

.scorecard-nav .primary,
.scorecard-nav-buttons .primary {
  background: var(--b-ink);
  color: white;
}

.skillprobe-question-card.is-score-active {
  border-color: rgba(198,147,53,0.48);
  box-shadow: 0 0 0 3px rgba(198,147,53,0.12);
}

.skillprobe-score-action {
  min-height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(31,38,46,0.12);
  background: rgba(255,255,255,0.84);
  color: var(--b-ink);
  font-size: 11px;
  font-weight: 780;
  padding: 5px 9px;
  cursor: pointer;
}

.skillprobe-score-action:hover {
  background: rgba(198,147,53,0.10);
  border-color: rgba(198,147,53,0.28);
}

.scorecard-summary-panel h4 {
  margin: 0 0 12px;
  color: var(--b-ink);
}

.score-summary-row {
  margin-bottom: 10px;
  color: var(--b-muted);
  font-size: 12.5px;
  line-height: 18px;
}

.score-summary-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--b-line);
  overflow: hidden;
  margin: 4px 0;
}

.score-summary-fill {
  height: 100%;
  border-radius: 999px;
}

.score-summary-fill.strong { background: #2f855a; }
.score-summary-fill.partial { background: #b7791f; }
.score-summary-fill.weak { background: #c2413b; }

.decision-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--b-line);
  background: white;
  color: var(--b-ink);
  font-weight: 720;
  font-size: 14px;
  text-align: left;
  padding: 0 14px;
  cursor: pointer;
  margin-bottom: 8px;
}

.decision-btn.selected {
  background: var(--b-ink);
  color: white;
  border-color: var(--b-ink);
}

#scorecard-reason {
  min-height: 88px;
}

.drawer-screening-scorecard .scorecard-mini {
  display: grid;
  gap: 8px;
}

.scorecard-mini b {
  color: var(--b-ink);
}

.scorecard-mini .toolbar-btn {
  width: fit-content;
}

@media (max-width: 1180px) {
  .skillprobe-final-layout.scorecard-active {
    grid-template-columns: 1fr;
  }

  .skillprobe-scorecard-panel {
    position: static;
  }

  .scorecard-content {
    display: none;
  }

  .scorecard-too-small {
    display: block;
  }
}

/* Candidate email draft panel */
.email-draft-panel {
  position: fixed;
  right: 24px;
  top: 76px;
  width: min(520px, calc(100vw - 48px));
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  z-index: 90;
  border: 1px solid rgba(31,38,46,0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 24px 72px rgba(31,38,46,0.22);
  padding: 18px;
}

.email-draft-panel[hidden] {
  display: none;
}

.email-draft-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.email-draft-head h2 {
  margin: 2px 0 4px;
  color: var(--b-ink);
  font-size: 20px;
  line-height: 26px;
}

.email-draft-head p,
.email-draft-state {
  margin: 0;
  color: var(--b-muted);
  font-size: 12.5px;
  line-height: 18px;
}

.email-draft-warning,
.email-draft-confirm {
  margin: 10px 0 14px;
  padding: 11px 12px;
  border: 1px solid rgba(183,121,31,0.22);
  border-radius: 12px;
  background: rgba(255,246,226,0.82);
  color: #6d4d18;
  font-size: 12.5px;
  line-height: 18px;
}

.email-draft-confirm-actions,
.email-draft-actions,
.email-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.email-draft-panel label {
  display: block;
  margin: 12px 0 6px;
  color: var(--b-ink);
  font-size: 12px;
  line-height: 16px;
  font-weight: 760;
}

.email-draft-panel input,
.email-draft-panel textarea {
  width: 100%;
  border: 1px solid var(--b-line);
  border-radius: 10px;
  background: rgba(255,255,255,0.94);
  color: var(--b-ink);
  padding: 10px 11px;
  outline: none;
  font-size: 13px;
  line-height: 19px;
}

.email-draft-panel textarea {
  min-height: 220px;
  resize: vertical;
}

.email-draft-panel input:focus,
.email-draft-panel textarea:focus {
  border-color: rgba(46,111,159,0.44);
  box-shadow: 0 0 0 3px rgba(46,111,159,0.13);
}

.email-suggestion-chip {
  min-height: 28px;
  border: 1px solid rgba(46,111,159,0.20);
  border-radius: 999px;
  background: rgba(46,111,159,0.08);
  color: #2e6f9f;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 760;
  cursor: pointer;
}

.email-status-mini {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid var(--b-line);
  border-radius: 12px;
  background: rgba(244,241,235,0.62);
  color: var(--b-muted);
  font-size: 12.5px;
  line-height: 18px;
}

.email-status-mini b {
  color: var(--b-ink);
}
