:root {
  --ink: #18332d;
  --forest: #173f36;
  --forest-2: #245c4f;
  --paper: #f4f0e7;
  --paper-2: #ebe4d8;
  --white: #fffdf8;
  --warm: #f3b75f;
  --warm-dark: #9c5a16;
  --red: #ad453b;
  --muted: #6c7772;
  --line: rgba(23, 63, 54, 0.15);
  --shadow: 0 18px 44px rgba(24, 51, 45, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 4%, rgba(243, 183, 95, 0.24), transparent 24rem),
    linear-gradient(180deg, #f8f5ee 0, var(--paper) 42rem);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px clamp(18px, 5vw, 72px);
  background: rgba(248, 245, 238, 0.88);
  border-bottom: 1px solid rgba(23, 63, 54, 0.08);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 7px 18px rgba(23, 63, 54, 0.18); }
.brand span { display: grid; gap: 1px; }
.brand b { font-size: 17px; letter-spacing: 0.08em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: 0.1em; }
.top-actions { display: flex; gap: 10px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: var(--forest); box-shadow: 0 8px 20px rgba(23, 63, 54, .2); }
.button.primary:hover { background: var(--forest-2); }
.button.subtle { color: var(--forest); border-color: var(--line); background: rgba(255,255,255,.48); }
.button.warm { color: #39230b; background: var(--warm); }
.button.outline-light { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.button.disabled { opacity: .45; pointer-events: none; }
.refresh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warm); }
.refreshing .refresh-dot { animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.8); opacity: .4; } }

main { overflow: hidden; }
.hero {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 120px) clamp(20px, 5vw, 72px) 54px;
}
.hero::after {
  content: "";
  position: absolute;
  top: 70px;
  right: 5%;
  width: clamp(180px, 30vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(23, 63, 54, .12);
  border-radius: 50%;
  box-shadow: inset 0 0 0 46px rgba(23, 63, 54, .025), inset 0 0 0 92px rgba(23, 63, 54, .025);
  pointer-events: none;
}
.eyebrow { color: var(--warm-dark); font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1 { position: relative; z-index: 1; margin: 16px 0 20px; max-width: 760px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(48px, 8vw, 92px); line-height: .98; letter-spacing: -.05em; }
h1 em { color: var(--forest-2); font-style: normal; }
.hero-copy { position: relative; z-index: 1; max-width: 680px; margin: 0; color: #43534e; font-size: clamp(17px, 2vw, 21px); line-height: 1.75; }
.hero-meta { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; color: var(--muted); font-size: 12px; }
.hero-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--warm); vertical-align: 1px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1040px; margin: 0 auto 44px; padding: 0 20px; }
.stat { min-height: 122px; padding: 24px 28px; background: rgba(255,253,248,.72); border: 1px solid var(--line); border-right: 0; }
.stat:first-child { border-radius: 18px 0 0 18px; }
.stat:last-child { border-right: 1px solid var(--line); border-radius: 0 18px 18px 0; }
.stat strong { display: block; margin-bottom: 8px; font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.stat span { color: var(--muted); font-size: 12px; }

.notice { display: flex; gap: 16px; max-width: 1000px; margin: 0 auto 70px; padding: 18px 22px; border-left: 3px solid var(--warm); background: rgba(243,183,95,.1); }
.notice-mark { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%; color: var(--forest); background: var(--warm); font-weight: 900; }
.notice b { font-size: 14px; }
.notice p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.workspace { max-width: 1120px; margin: 0 auto; padding: 0 20px 84px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.section-head > div { display: flex; align-items: baseline; gap: 15px; }
.section-head h2, .resume-panel h2 { margin: 0 0 13px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.03em; }
.section-index { color: var(--warm-dark); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.section-index.light { color: var(--warm); }
.result-count { margin-bottom: 14px; color: var(--muted); font-size: 12px; }
.section-note { max-width: 760px; margin: -8px 0 26px; color: var(--muted); font-size: 13px; line-height: 1.7; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.searchbox { display: flex; align-items: center; flex: 1 1 380px; max-width: 520px; height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.8); }
.searchbox span { color: var(--muted); font-size: 23px; }
.searchbox input { width: 100%; padding: 0 10px; color: var(--ink); border: 0; outline: 0; background: transparent; }
.filters { display: flex; gap: 7px; overflow-x: auto; padding: 2px; }
.filter { flex: 0 0 auto; padding: 8px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; }
.filter.active { color: #fff; border-color: var(--forest); background: var(--forest); }

.opportunity-list { display: grid; gap: 13px; }
.opportunity { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,253,248,.83); box-shadow: 0 1px 0 rgba(255,255,255,.8); }
.opportunity[open] { box-shadow: var(--shadow); background: var(--white); }
.opportunity summary { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 26px; align-items: center; gap: 15px; min-height: 96px; padding: 15px 20px; list-style: none; cursor: pointer; }
.opportunity summary::-webkit-details-marker { display: none; }
.priority { display: grid; place-items: center; min-height: 48px; color: var(--forest); border-radius: 12px; background: var(--paper-2); font-size: 12px; font-weight: 800; }
.priority.p1 { color: #4b2907; background: rgba(243,183,95,.45); }
.opportunity-title { min-width: 0; }
.opportunity-title h3 { margin: 0 0 8px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.meta-row { display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--muted); font-size: 11px; }
.deadline { text-align: right; }
.deadline b { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 17px; }
.deadline span { color: var(--muted); font-size: 10px; }
.chevron { font-size: 23px; transition: transform .2s ease; }
.opportunity[open] .chevron { transform: rotate(45deg); }
.opportunity-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 0 20px 22px 119px; }
.body-block { min-width: 0; }
.body-block h4 { margin: 0 0 7px; color: var(--warm-dark); font-size: 11px; letter-spacing: .1em; }
.body-block p, .body-block li { color: #4d5c57; font-size: 13px; line-height: 1.7; }
.body-block p { margin: 0; }
.body-block ul { margin: 0; padding-left: 18px; }
.wide { grid-column: 1 / -1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag { padding: 4px 8px; color: var(--forest-2); border-radius: 7px; background: rgba(36,92,79,.08); font-size: 10px; font-weight: 700; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 17px; border-top: 1px solid var(--line); }
.card-actions .button { min-height: 38px; padding: 0 14px; font-size: 12px; }
.status-select { min-height: 38px; padding: 0 35px 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.verify { display: inline-flex; align-items: center; gap: 5px; }
.verify::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #bf8b39; }
.verify.official::before { background: #3b876a; }
.empty { padding: 52px 20px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 17px; }

.resume-panel { display: flex; align-items: end; justify-content: space-between; gap: 28px; max-width: 1080px; margin: 0 auto 84px; padding: 36px 40px; color: #fff; border-radius: 24px; background: var(--forest); box-shadow: 0 22px 54px rgba(23,63,54,.18); }
.resume-panel p { max-width: 570px; margin: 0; color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.7; }
.resume-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 10px; }

.company-matrix { display: grid; gap: 12px; }
.company-group { border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.75); }
.company-group summary { display: flex; align-items: center; justify-content: space-between; padding: 19px 21px; list-style: none; cursor: pointer; font-weight: 800; }
.company-group summary::-webkit-details-marker { display: none; }
.company-group summary span { color: var(--muted); font-size: 11px; font-weight: 500; }
.company-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; padding: 1px; background: var(--line); border-top: 1px solid var(--line); }
.company-card { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 11px; min-height: 72px; padding: 13px 18px; background: var(--white); }
.source-dot { width: 9px; height: 9px; border-radius: 50%; background: #aaa; }
.source-dot.ok { background: #3b876a; box-shadow: 0 0 0 4px rgba(59,135,106,.11); }
.source-dot.fail { background: var(--red); box-shadow: 0 0 0 4px rgba(173,69,59,.1); }
.source-dot.changed { background: var(--warm); box-shadow: 0 0 0 4px rgba(243,183,95,.2); }
.company-name b { display: block; margin-bottom: 4px; font-size: 13px; }
.company-name small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.company-card a { color: var(--forest-2); font-size: 11px; font-weight: 800; text-decoration: none; }

footer { padding: 30px 20px 46px; color: var(--muted); text-align: center; font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 40; max-width: min(390px, calc(100vw - 44px)); padding: 13px 17px; color: #fff; border-radius: 12px; background: var(--forest); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
  .button.subtle { display: none; }
  .hero::after { opacity: .5; right: -80px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { min-height: 104px; border: 1px solid var(--line); border-radius: 14px !important; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .searchbox { flex-basis: 46px; max-width: none; }
  .opportunity summary { grid-template-columns: 68px minmax(0, 1fr) 22px; }
  .deadline { display: none; }
  .opportunity-body { grid-template-columns: 1fr; padding-left: 20px; }
  .wide { grid-column: auto; }
  .resume-panel { align-items: stretch; flex-direction: column; margin-inline: 20px; padding: 30px 24px; }
  .company-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar { min-height: 66px; padding-inline: 14px; }
  .brand small { display: none; }
  .button.primary { padding-inline: 13px; }
  .hero { padding-top: 55px; }
  h1 { font-size: 50px; }
  .stats { padding-inline: 14px; }
  .stat { padding: 20px; }
  .opportunity summary { grid-template-columns: 58px minmax(0, 1fr) 18px; padding-inline: 13px; gap: 10px; }
  .opportunity-title h3 { font-size: 14px; }
  .opportunity-body { padding-inline: 14px; }
  .priority { min-height: 42px; font-size: 10px; }
  .resume-actions { flex-direction: column; }
}
