:root {
  --paper: #f3efe6;
  --card: #fffdf8;
  --ink: #1c2230;
  --ink-2: #3a4152;
  --muted: #737888;
  --line: #e0d9ca;
  --line-2: #ece6d9;
  --accent: #d4472a;
  --accent-soft: #f9e2da;
  --ok: #2c7a57;
  --ok-soft: #dcefe5;
  --warn: #b0731b;
  --warn-soft: #f6ead3;
  --side: #1c2230;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SFMono-Regular", monospace;
}

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

html {
  height: 100%;
}

/* 只给最小高度：body 锁成一屏高时，长页面滚动会把 sticky 侧栏带走 */
body {
  min-height: 100%;
  display: grid;
  grid-template-columns: 232px 1fr;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(28, 34, 48, 0.05) 1px, transparent 1px);
  background-size: 5px 5px;
  z-index: 0;
}

/* ---------- sidebar ---------- */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--side);
  color: #e9e5dc;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 22px;
  z-index: 2;
}

.brand {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 12px;
  color: #9aa0ae;
}

.nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #555d6d transparent;
  gap: 2px;
  margin-top: 22px;
  margin-bottom: 16px;
}

.nav > * {
  flex-shrink: 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 8px;
  color: #c9c6be;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.nav a .num {
  font-family: var(--mono);
  font-size: 11px;
  color: #6f7686;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav a.on {
  background: rgba(212, 71, 42, 0.16);
  color: #fff;
}

.nav a.on .num {
  color: var(--accent);
}

.side-foot {
  flex-shrink: 0;
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.company {
  color: #c9c6be;
  margin-bottom: 8px;
}

.mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c9c6be;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mode::before {
  flex-shrink: 0;
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa0ae;
}

.mode.live::before {
  background: #4cc38a;
  box-shadow: 0 0 0 3px rgba(76, 195, 138, 0.2);
}

/* ---------- main ---------- */
.main {
  position: relative;
  z-index: 1;
  padding: 40px 48px 64px;
  max-width: 1280px;
  width: 100%;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

h2 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
}

h3 {
  font-size: 15px;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  margin-top: 6px;
  max-width: 640px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 1px 0 rgba(28, 34, 48, 0.03), 0 10px 30px -18px rgba(28, 34, 48, 0.25);
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}

.btn:hover {
  background: #2c3446;
}

.btn:active {
  transform: translateY(1px);
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover {
  border-color: var(--ink);
}

.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
}

.btn.small {
  padding: 4px 10px;
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--line-2);
  color: var(--ink-2);
  white-space: nowrap;
}

.chip.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip.bad {
  background: var(--accent-soft);
  color: var(--accent);
}

.tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--line-2);
  border-radius: 10px;
}

.tabs button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.tabs button.on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(28, 34, 48, 0.12);
  font-weight: 600;
}

textarea,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

textarea:focus,
input[type="text"]:focus {
  outline: 2px solid rgba(212, 71, 42, 0.25);
  border-color: var(--accent);
}

/* ---------- today ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-main {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #f3efe6;
  border: 0;
  padding: 30px 32px;
}

.hero-main::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 40px solid rgba(212, 71, 42, 0.18);
}

.hero-main .eyebrow {
  color: #f0957f;
}

.big-number {
  font-family: var(--serif);
  font-size: 92px;
  line-height: 1;
  font-weight: 700;
  color: #fff;
  margin: 10px 0 6px;
}

.big-number small {
  font-size: 28px;
  margin-left: 6px;
  color: #c9c6be;
}

.hero-main p {
  color: #b9b6ae;
  max-width: 420px;
}

.hero-main .btn {
  margin-top: 20px;
  background: var(--accent);
  border-color: var(--accent);
}

.scenario .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.scenario .row:last-of-type {
  border-bottom: 0;
}

.scenario .val {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
}

.scenario .val.accent {
  color: var(--accent);
}

.footnote {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.funnel .f-row {
  display: grid;
  grid-template-columns: 84px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.bar i.accent {
  background: var(--accent);
}

.top-list {
  margin-top: 6px;
}

.top-item {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
}

.top-item:last-child {
  border-bottom: 0;
}

.top-item:hover .t-name {
  color: var(--accent);
}

.rank {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.t-name {
  font-weight: 700;
}

.t-sub {
  font-size: 12px;
  color: var(--muted);
}

.score-pill {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
}

/* ---------- screening ---------- */
.screen-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.cand-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cand {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  animation: rise 0.35s both;
}

.cand:hover {
  border-color: var(--ink-2);
}

.cand.sel {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212, 71, 42, 0.12);
}

.cand.dim {
  opacity: 0.55;
}

.ring {
  --p: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--c, var(--ink)) calc(var(--p) * 1%), var(--line-2) 0);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
}

.ring span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
}

.cand .meta {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.detail {
  position: sticky;
  top: 24px;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  position: relative;
}

.stamp {
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border: 3px double currentColor;
  border-radius: 8px;
  transform: rotate(-8deg);
  white-space: nowrap;
  animation: stamp 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}

.stamp.ok {
  color: var(--ok);
}

.stamp.warn {
  color: var(--warn);
}

.stamp.bad {
  color: var(--accent);
}

.crit {
  display: grid;
  grid-template-columns: 1fr 120px 28px;
  gap: 4px 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}

.crit:last-child {
  border-bottom: 0;
}

.crit .c-name {
  font-weight: 600;
}

.crit .c-name .hard {
  margin-left: 6px;
}

.crit .dots {
  display: flex;
  gap: 4px;
}

.crit .dots i {
  width: 18px;
  height: 8px;
  border-radius: 3px;
  background: var(--line-2);
}

.crit .dots i.f {
  background: var(--ink);
}

.crit.fail .dots i.f {
  background: var(--accent);
}

.crit .c-score {
  font-family: var(--mono);
  text-align: right;
}

.crit .evidence {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--ink-2);
  padding-left: 12px;
  border-left: 3px solid var(--line);
}

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
}

.resume-box {
  background: var(--paper);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-2);
}

.resume-box p + p {
  margin-top: 6px;
}

.decide {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  align-items: center;
}

/* HR 拍板按钮和「人才入库」之间留出间隔，表示是两类操作 */
.decide-gap { width: 14px; }
.decide .btn.on {
  outline: 3px solid rgba(212, 71, 42, 0.3);
}

.risk {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--warn);
  margin-top: 4px;
}

.risk-list {
  margin-top: 8px;
  font-size: 13px;
}

.risk-list summary {
  cursor: pointer;
  color: var(--warn);
}

/* ---------- jobs ---------- */
.job-card h2 {
  margin-bottom: 4px;
}

.weights {
  margin-top: 18px;
}

.w-row {
  display: grid;
  grid-template-columns: 1fr 96px 26px;
  font-size: 13px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
}

.w-row:last-child {
  border-bottom: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ---------- pack ---------- */
.pack-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.copy-block {
  position: relative;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 76px 18px 20px; /* 右侧给「复制」按钮留位，免得压住文字 */
  font-size: 14px;
  line-height: 1.8;
}

.copy-block .btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

.greet {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.greet .copy-block {
  padding-right: 80px;
}

.poster {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: var(--ink);
  color: #f3efe6;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.poster::before {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.9;
}

.poster > * {
  position: relative;
}

.poster .p-co {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #f0957f;
}

.poster .p-main {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.35;
  font-weight: 700;
  margin: 18px 0 10px;
}

.poster .p-sub {
  color: #c9c6be;
}

.poster ul {
  list-style: none;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster li {
  font-size: 13px;
  padding: 7px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
}

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--warn-soft);
  color: #7a4f12;
  font-size: 13px;
  margin-top: 14px;
}

/* ---------- replies ---------- */
.reply-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.reply-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 16px;
}

.reply-item:last-child {
  border-bottom: 0;
}

.reply-item .q {
  font-weight: 700;
}

.reply-item .a {
  color: var(--ink-2);
  grid-column: 1 / 2;
}

.reply-item .btn {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
}

.ph {
  background: var(--warn-soft);
  color: #7a4f12;
  border-radius: 4px;
  padding: 0 3px;
}

/* ---------- about ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  margin: 18px 0 8px;
}

.flow .step {
  position: relative;
  padding: 16px 14px;
  border: 1px solid var(--line);
  background: #fff;
  margin-right: -1px;
}

.flow .step:first-child {
  border-radius: 12px 0 0 12px;
}

.flow .step:last-child {
  border-radius: 0 12px 12px 0;
}

.flow .step.ai {
  background: var(--ink);
  color: #f3efe6;
  border-color: var(--ink);
}

.flow .step.human {
  background: var(--accent-soft);
}

.flow .s-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.flow .step.ai .s-num {
  color: #f0957f;
}

.flow .s-name {
  font-weight: 700;
  margin: 4px 0;
}

.flow .s-who {
  font-size: 12px;
  opacity: 0.8;
}

.rules li {
  list-style: none;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--line-2);
  position: relative;
}

.rules li::before {
  content: "✓";
  position: absolute;
  left: 4px;
  color: var(--ok);
  font-weight: 700;
}

.rules li.no::before {
  content: "✕";
  color: var(--accent);
}

/* ---------- modal & toast ---------- */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(28, 34, 48, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  animation: fade 0.15s both;
}

.modal {
  width: min(680px, 92vw);
  background: var(--card);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes stamp {
  from {
    opacity: 0;
    transform: rotate(-8deg) scale(1.6);
  }
}

.view-enter > * {
  animation: rise 0.4s both;
}

.view-enter > *:nth-child(2) {
  animation-delay: 0.05s;
}

.view-enter > *:nth-child(3) {
  animation-delay: 0.1s;
}

.view-enter > *:nth-child(4) {
  animation-delay: 0.15s;
}

@media (max-width: 1100px) {
  .hero,
  .screen-layout,
  .pack-layout,
  .reply-layout {
    grid-template-columns: 1fr;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .flow {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail {
    position: static;
  }
}

@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }
  .side {
    position: static;
    height: auto;
  }
  .nav {
    flex: none;
    overflow-y: visible;
  }
  .main {
    padding: 24px 16px 48px;
  }
}
/* Persistent save feedback stays visible without covering the sidebar. */
.workspace-status{position:fixed;right:16px;bottom:10px;z-index:80;max-width:min(520px,calc(100vw - 32px));padding:7px 12px;border:1px solid #ded7c8;border-radius:8px;background:#fffdf7;color:#566174;font-size:12px;box-shadow:0 2px 10px #0001;cursor:pointer;overflow-wrap:anywhere}
.workspace-status[data-error="true"]{color:#a52f1f;background:#fff0e9;border-color:#d88270}
.candidate-conclusion{margin:20px 0;padding:18px;background:#f5f0e5;border-radius:12px}
.candidate-conclusion h4{margin:14px 0 5px;font-size:13px;color:#9c461e}
.candidate-conclusion p,.candidate-conclusion ul{margin:6px 0;font-size:14px;white-space:pre-line}
.need-conflict .btn{margin:5px 8px 0 0;white-space:normal;text-align:left}
[data-jobstatus]{max-width:135px;padding:9px;border:1px solid #d9d1c0;border-radius:8px;background:#fffdf7;font:inherit;font-size:13px}
.resume-box{white-space:pre-wrap}
.workspace-tools{margin:0 0 18px;color:#687487;font-size:13px}
.workspace-tools[open]{padding:14px;border:1px solid #ded7c8;border-radius:10px;background:#fffdf7}
.workspace-tools summary{cursor:pointer;width:fit-content}

/* 简历隐藏指令提醒（第 ⑤ 步候选人详情） */
.injection-alert{margin:16px 0;padding:14px 16px;border:1px solid var(--accent);border-left-width:4px;border-radius:10px;background:var(--accent-soft);color:var(--ink)}
.injection-alert b{color:var(--accent)}
.injection-alert p{margin:6px 0;font-size:13px;color:var(--ink-2)}
.injection-alert blockquote{margin:6px 0 0;padding:6px 10px;background:var(--card);border-radius:6px;font-family:var(--mono);font-size:12px;overflow-wrap:anywhere}
