:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #d9e0e9;
  --line-strong: #c4cedb;
  --text: #182132;
  --text-soft: #313c4e;
  --muted: #65738a;
  --muted-2: #8a96a8;
  --blue: #6c8ebf;
  --blue-ink: #3f5f8f;
  --blue-soft: #edf3fb;
  --green: #82b366;
  --green-ink: #4f713e;
  --green-soft: #eef6eb;
  --amber: #d79b00;
  --amber-ink: #795600;
  --amber-soft: #fff7df;
  --red: #b85450;
  --red-ink: #7b3a36;
  --red-soft: #f8eeee;
  --shadow: 0 12px 30px rgba(31, 42, 58, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Arial Unicode MS", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
select,
.company-row {
  outline-color: var(--blue);
}

a {
  color: var(--blue-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.career-shell {
  width: min(100%, 1920px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 22px 32px;
}

.career-topbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 10px 2px 18px;
}

.career-heading {
  min-width: 0;
}

h1,
h2,
h3,
h4,
p {
  letter-spacing: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.18;
}

.scope-line {
  margin: 7px 0 0;
  color: var(--green-ink);
  font-size: 13px;
  font-weight: 700;
}

.topbar-note {
  max-width: 900px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.topbar-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-actions {
  justify-content: flex-end;
}

.topbar-actions a,
.detail-actions a,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.topbar-actions a:first-child,
.detail-actions a {
  border-color: var(--text);
  background: var(--text);
  color: #fff;
}

.topbar-actions a:hover,
.detail-actions a:hover,
.secondary-button:hover {
  text-decoration: none;
  filter: brightness(0.98);
}

.career-workspace {
  display: grid;
  gap: 12px;
}

.update-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px 14px;
}

.update-status {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.update-status strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.update-status p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 4px rgba(138, 150, 168, 0.14);
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(130, 179, 102, 0.16);
}

.status-dot.warning,
.status-dot.pending {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(215, 155, 0, 0.14);
}

.status-dot.failed {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(184, 84, 80, 0.14);
}

.update-time {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 118px;
}

.update-time span {
  color: var(--muted);
  font-size: 11px;
}

.update-time strong {
  font-size: 13px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.summary-tile {
  min-width: 0;
  min-height: 68px;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.summary-tile:last-child {
  border-right: 0;
}

.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.summary-tile strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  line-height: 1.1;
}

.summary-tile:last-child strong {
  font-size: 16px;
  line-height: 1.3;
}

.discovery-rail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.discovery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px 10px;
}

.discovery-head h2 {
  font-size: 16px;
  line-height: 1.3;
}

.discovery-head p,
.discovery-health {
  color: var(--muted);
  font-size: 12px;
}

.discovery-head p {
  margin: 4px 0 0;
}

.discovery-health {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  line-height: 1.5;
}

.discovery-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.discovery-item {
  min-width: 0;
  padding: 12px 14px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.discovery-item:nth-child(3n) {
  border-right: 0;
}

.discovery-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.discovery-title-line h3 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.35;
}

.evidence-tag {
  flex: 0 0 auto;
  border-radius: 5px;
  background: var(--amber-soft);
  color: var(--amber-ink);
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 700;
}

.discovery-status {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.discovery-sources {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.discovery-sources a {
  display: block;
  overflow: hidden;
  color: var(--blue-ink);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-empty {
  grid-column: 1 / -1;
  padding: 16px 14px;
  color: var(--muted);
  font-size: 13px;
}

.control-band {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(126px, 1fr));
  gap: 9px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  padding: 10px;
  box-shadow: 0 5px 16px rgba(31, 42, 58, 0.05);
}

.control-band label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.control-band span {
  color: var(--muted);
  font-size: 11px;
}

.control-band input,
.control-band select {
  width: 100%;
  height: 35px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 6px 9px;
  font-size: 13px;
}

.control-band input:focus,
.control-band select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(108, 142, 191, 0.13);
}

.career-grid {
  display: grid;
  grid-template-columns: minmax(780px, 1.45fr) minmax(420px, 0.75fr);
  gap: 12px;
  align-items: start;
}

.company-panel,
.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.company-panel {
  overflow: hidden;
}

.detail-panel {
  position: sticky;
  top: 68px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 16px;
  line-height: 1.3;
}

.panel-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.list-header,
.company-row {
  display: grid;
  grid-template-columns: minmax(205px, 1.3fr) 106px 122px minmax(170px, 0.95fr) minmax(200px, 1.05fr);
  gap: 11px;
  align-items: start;
}

.list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.company-list {
  display: grid;
}

.company-row {
  width: 100%;
  min-height: 126px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.company-row:hover {
  background: #f9fbfd;
}

.company-row.active {
  background: var(--blue-soft);
  box-shadow: inset 3px 0 0 var(--blue);
}

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

.company-primary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.company-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.company-name {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.website-link {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 650;
}

.business-direction {
  overflow: hidden;
  color: var(--blue-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.decision-cell {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.score-value,
.detail-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.score-value strong {
  font-size: 20px;
  line-height: 1;
}

.score-value span,
.detail-score span {
  color: var(--muted);
  font-size: 10px;
}

.stage-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 23px;
  border: 1px solid rgba(130, 179, 102, 0.32);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 700;
}

.stage-pill.probe {
  border-color: rgba(108, 142, 191, 0.32);
  background: var(--blue-soft);
  color: var(--blue-ink);
}

.stage-pill.observe {
  border-color: rgba(215, 155, 0, 0.3);
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.score-line {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.field {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.field.founded {
  display: grid;
  gap: 3px;
}

.field.founded strong {
  color: var(--text);
  font-size: 12px;
}

.field.founded span:last-child {
  color: var(--green-ink);
  font-weight: 650;
}

.funding-summary {
  display: grid;
  gap: 5px;
}

.funding-summary div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 5px;
}

.funding-summary span {
  color: var(--muted);
}

.funding-summary strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.field.founder {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.company-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.detail-toolbar {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-back {
  display: none;
  width: fit-content;
}

.detail-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
}

.detail-title h2 {
  font-size: 22px;
  line-height: 1.25;
}

.detail-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.detail-score strong {
  font-size: 30px;
  line-height: 1;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 3px 7px;
  font-size: 11px;
}

.decision-brief {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.decision-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

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

.decision-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.decision-row p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.55;
}

.decision-row.positive p {
  color: var(--green-ink);
}

.decision-row.risk p {
  color: var(--red-ink);
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.detail-kv {
  min-width: 0;
  padding: 9px 8px 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-kv:nth-child(odd) {
  padding-right: 12px;
}

.detail-kv:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.detail-kv dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
}

.detail-kv dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.markdown-body {
  display: grid;
  gap: 10px;
}

.markdown-body h2 {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.35;
}

.markdown-body h3 {
  margin-top: 4px;
  font-size: 14px;
}

.markdown-body p,
.markdown-body li {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.75;
}

.markdown-body p,
.markdown-body ul {
  margin: 0;
}

.markdown-body ul {
  padding-left: 18px;
}

.markdown-body code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f2f5f9;
  padding: 1px 4px;
  font-size: 11px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.markdown-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 11px;
}

.markdown-body th,
.markdown-body td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.markdown-body th {
  background: var(--panel-soft);
  color: var(--muted);
  font-weight: 800;
}

.markdown-body tr:last-child td {
  border-bottom: 0;
}

.error-state {
  border: 1px solid rgba(184, 84, 80, 0.28);
  border-radius: 6px;
  background: var(--red-soft);
  color: var(--red-ink);
  padding: 12px;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1500px) {
  .career-grid {
    grid-template-columns: minmax(720px, 1.35fr) minmax(400px, 0.75fr);
  }

  .list-header,
  .company-row {
    grid-template-columns: minmax(190px, 1.2fr) 98px 112px minmax(150px, 0.9fr) minmax(180px, 1fr);
    gap: 9px;
  }
}

@media (max-width: 1280px) {
  .control-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .control-band .search-field {
    grid-column: span 3;
  }

  .career-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
    max-height: none;
  }

  .detail-back {
    display: inline-flex;
  }
}

@media (max-width: 1000px) {
  .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-tile:nth-child(3) {
    border-right: 0;
  }

  .summary-tile:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .discovery-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .discovery-item:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .discovery-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  .career-shell {
    padding: 12px;
  }

  .career-topbar,
  .update-banner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .update-time {
    justify-items: start;
  }

  .control-band {
    position: static;
    grid-template-columns: 1fr;
  }

  .control-band .search-field {
    grid-column: auto;
  }

  .discovery-list {
    grid-template-columns: 1fr;
  }

  .discovery-item,
  .discovery-item:nth-child(2n),
  .discovery-item:nth-child(3n) {
    border-right: 0;
  }

  .list-header {
    display: none;
  }

  .company-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 14px;
    min-height: 0;
  }

  .company-primary,
  .funding-summary,
  .field.founder {
    grid-column: 1 / -1;
  }

  .field.founder::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    content: "创始人背景";
    font-size: 10px;
    font-weight: 700;
  }

  .detail-summary {
    grid-template-columns: 1fr;
  }

  .detail-kv,
  .detail-kv:nth-child(odd),
  .detail-kv:nth-child(even) {
    padding: 9px 0 10px;
    border-left: 0;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 23px;
  }

  .scope-line,
  .topbar-note {
    font-size: 12px;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-tile,
  .summary-tile:nth-child(3) {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .summary-tile:nth-child(2n) {
    border-right: 0;
  }

  .summary-tile:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .summary-tile strong {
    font-size: 20px;
  }

  .discovery-head,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .company-primary,
  .funding-summary,
  .field.founder {
    grid-column: auto;
  }

  .detail-title {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .decision-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
