:root {
  --ink: #12344a;
  --muted: #607789;
  --brand-blue: #114a8b;
  --brand-blue-dark: #0a376a;
  --brand-blue-pale: #e7f0f8;
  --brand-sky: #5c93c8;
  --cream: #f3f6f9;
  --paper: #ffffff;
  --line: #d5e0e8;
  --shadow: 0 24px 70px rgba(17, 74, 139, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(17, 74, 139, .10), transparent 27rem),
    radial-gradient(circle at 92% 30%, rgba(92, 147, 200, .10), transparent 26rem),
    var(--cream);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, input, textarea { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }

.file-mode-notice {
  width: min(920px, calc(100% - 32px)); margin: 12px auto 0; padding: 15px 17px;
  position: sticky; top: 10px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  color: #173b59; background: #fff7e5; border: 1px solid #e4c577; border-radius: 13px;
  box-shadow: 0 12px 30px rgba(17, 74, 139, .16);
}
.file-mode-notice b, .file-mode-notice span { display: block; }
.file-mode-notice b { font-size: 13px; }
.file-mode-notice span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.file-mode-notice a {
  flex: 0 0 auto; padding: 9px 13px; color: white; background: var(--brand-blue);
  border-radius: 8px; text-decoration: none; font-size: 11px; font-weight: 800;
}

.app-shell { min-height: 100vh; overflow: hidden; }
.topbar {
  height: 76px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand-logo { width: 88px; height: 51px; display: block; object-fit: contain; }
.brand-product { padding-left: 14px; border-left: 1px solid rgba(21, 52, 62, .18); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.privacy-chip {
  padding: 8px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-blue-dark);
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(17, 74, 139, .18);
  border-radius: 100px;
  font-size: 12px;
  backdrop-filter: blur(12px);
}
.privacy-chip i { width: 8px; height: 8px; background: #46a77b; border-radius: 50%; box-shadow: 0 0 0 4px rgba(70, 167, 123, .13); }

main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 80px; }
.hero { min-height: 370px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.eyebrow { margin: 0 0 13px; color: var(--brand-blue); font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero h1 { margin: 0; max-width: 680px; font-family: Georgia, "Songti SC", serif; font-size: clamp(46px, 6vw, 76px); font-weight: 500; line-height: 1.08; letter-spacing: -.055em; }
.hero h1 em { color: var(--brand-blue); font-style: normal; }
.hero-copy { max-width: 600px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.9; }
.hero-visual { position: relative; height: 340px; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(17, 74, 139, .20); border-radius: 50%; transform: translate(-50%, -50%) rotate(-15deg); }
.orbit-one { width: 290px; height: 290px; }
.orbit-two { width: 390px; height: 210px; transform: translate(-50%, -50%) rotate(25deg); }
.score-disc {
  position: absolute; left: 50%; top: 50%; width: 146px; height: 146px;
  display: grid; place-content: center; text-align: center;
  color: white; background: linear-gradient(145deg, var(--brand-sky), var(--brand-blue)); border-radius: 50%; transform: translate(-50%, -50%);
  box-shadow: 0 30px 60px rgba(17, 74, 139, .28);
}
.score-disc::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; }
.score-disc b { font: 50px/1 Georgia, serif; }
.score-disc span { margin-top: 8px; font-size: 11px; letter-spacing: .2em; }
.floating-card {
  position: absolute; min-width: 150px; padding: 13px 15px;
  display: grid; grid-template-columns: 10px 1fr; column-gap: 9px;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(255,255,255,.8); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(17, 74, 139, .12); backdrop-filter: blur(14px);
}
.floating-card i { width: 8px; height: 8px; margin-top: 5px; background: #3ca678; border-radius: 50%; }
.floating-card span { color: var(--muted); font-size: 11px; }
.floating-card b { grid-column: 2; margin-top: 2px; font-size: 13px; }
.card-a { left: 2%; top: 21%; }
.card-b { right: 0; top: 16%; }
.card-c { right: 5%; bottom: 14%; }
.card-c i { background: #3ca678; }

.workspace {
  width: min(820px, 100%);
  margin: 0 auto;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.steps { height: 74px; padding: 0 40px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.step { flex: 1; position: relative; display: flex; align-items: center; gap: 10px; color: #95a4a5; font-size: 13px; }
.step:not(:last-child)::after { content: ""; height: 1px; position: absolute; left: 42px; right: 24px; top: 50%; background: var(--line); z-index: 0; }
.step span, .step b { position: relative; z-index: 1; background: var(--paper); }
.step span { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 11px; }
.step b { padding-right: 12px; font-weight: 650; }
.step.active { color: var(--brand-blue); }
.step.active span { color: white; background: var(--brand-blue); border-color: var(--brand-blue); }
.input-grid { padding: 38px 40px 31px; display: grid; grid-template-columns: 1fr; gap: 28px; }
.panel { min-width: 0; }
.panel-head { margin-bottom: 23px; display: flex; align-items: flex-start; gap: 14px; }
.panel-number { padding-top: 3px; color: var(--brand-sky); font: 15px Georgia, serif; }
.panel-head h2 { margin: 0 0 5px; font: 25px/1.25 Georgia, "Songti SC", serif; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12px; }
.field-label { margin-bottom: 8px; display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
textarea {
  width: 100%; height: 184px; padding: 16px; resize: vertical;
  color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; outline: none; line-height: 1.65;
}
textarea:focus, .path-field input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(17, 74, 139, .10); }
.file-row { min-height: 40px; margin-top: 11px; display: flex; align-items: center; gap: 12px; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-button, .folder-button {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  color: var(--brand-blue); font-size: 12px; font-weight: 700;
}
.file-button svg, .folder-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-name { min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone {
  height: 184px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); background: #f8fafc; border: 1px dashed #a9bfd3; border-radius: 12px; cursor: pointer; transition: .2s ease;
}
.jd-dropzone { height: 148px; margin-top: 11px; }
.dropzone:hover, .dropzone.dragging { color: var(--brand-blue); background: #eef5fb; border-color: var(--brand-blue); transform: translateY(-1px); }
.upload-icon { width: 42px; height: 42px; margin-bottom: 10px; display: grid; place-items: center; color: var(--brand-blue); background: var(--brand-blue-pale); border-radius: 50%; }
.upload-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dropzone strong { color: var(--ink); font-size: 14px; }
.dropzone small { margin-top: 5px; font-size: 10px; letter-spacing: .05em; }
.count-badge { margin-top: 11px; padding: 4px 10px; color: var(--brand-blue); background: var(--brand-blue-pale); border-radius: 100px; font-size: 10px; font-weight: 800; }
.folder-actions { min-height: 40px; margin-top: 11px; display: flex; align-items: center; gap: 18px; }
.text-button { padding: 0; color: var(--muted); background: none; border: 0; cursor: pointer; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.path-field { margin-top: 5px; }
.path-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 11px; }
.path-field small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.custom-prompt-panel {
  grid-column: 1 / -1; padding: 22px 24px;
  background: #f4f8fc; border: 1px solid #d7e4ef; border-radius: 14px;
}
.custom-prompt-head { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 12px; }
.custom-prompt-head > span {
  padding: 4px 8px; color: var(--brand-blue); background: var(--brand-blue-pale);
  border-radius: 100px; font-size: 9px; font-weight: 850; letter-spacing: .06em;
}
.custom-prompt-head h2 { margin: 0 0 4px; font: 20px/1.2 Georgia, "Songti SC", serif; }
.custom-prompt-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
#evaluation-prompt { height: 96px; min-height: 96px; background: white; }
.prompt-safety { display: block; margin-top: 7px; color: #7a8e9c; font-size: 9px; }
.primary-actions {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.primary-button {
  width: min(320px, 100%); height: 52px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: white; background: linear-gradient(135deg, var(--brand-sky), var(--brand-blue)); border: 0; border-radius: 100px; cursor: pointer;
  font-weight: 750; letter-spacing: .04em; box-shadow: 0 14px 30px rgba(17,74,139,.24); transition: .2s ease;
}
.primary-button:hover { background: var(--brand-blue-dark); transform: translateY(-2px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.demo-button {
  height: 52px; padding: 0 22px; color: var(--brand-blue); background: transparent;
  border: 1px solid rgba(17,74,139,.35); border-radius: 100px; cursor: pointer; font-size: 12px; font-weight: 750;
}
.demo-button:hover { background: var(--brand-blue-pale); }
.demo-button:disabled { opacity: .55; cursor: wait; }
.model-status {
  grid-column: 1 / -1; width: min(620px, 100%); margin: 2px auto 0; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); background: #f4f8fc; border: 1px solid #d5e3ef; border-radius: 12px;
}
.model-status.hybrid { background: #eaf2fa; border-color: #c8dced; }
.model-status-icon {
  width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center;
  color: white; background: var(--brand-blue); border-radius: 9px; font-size: 10px; font-weight: 850; letter-spacing: .06em;
}
.model-status b, .model-status small { display: block; }
.model-status b { font-size: 12px; }
.model-status small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.consent-note { grid-column: 1 / -1; margin: -16px 0 0; color: #8a9899; text-align: center; font-size: 10px; }

.loading-view { min-height: 440px; margin: 40px 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.loader-orbit { width: 92px; height: 92px; position: relative; border: 1px solid rgba(17,74,139,.2); border-radius: 50%; animation: spin 2s linear infinite; }
.loader-orbit::before { content: ""; position: absolute; inset: 16px; background: var(--brand-blue-pale); border-radius: 50%; }
.loader-orbit span { width: 13px; height: 13px; position: absolute; left: 6px; top: 12px; background: var(--brand-sky); border-radius: 50%; box-shadow: 0 0 0 6px rgba(92,147,200,.15); }
.loading-view h2 { margin: 28px 0 8px; font: 28px Georgia, serif; }
.loading-view p { color: var(--muted); font-size: 13px; }
.progress { width: 310px; height: 4px; margin-top: 14px; background: #dae2df; border-radius: 4px; overflow: hidden; }
.progress span { width: 12%; height: 100%; display: block; background: var(--brand-blue); border-radius: 4px; transition: width .65s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.results { margin-top: 40px; }
.results-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.results-head h2 { margin: 0 0 8px; font: 35px Georgia, "Songti SC", serif; }
.results-head p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.report-actions { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.secondary-button, .icon-button {
  min-height: 40px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-blue); background: rgba(255,255,255,.72); border: 1px solid rgba(17,74,139,.22);
  border-radius: 999px;
  text-decoration: none; font-size: 12px; font-weight: 750; cursor: pointer;
  box-sizing: border-box;
}
.icon-button { width: 40px; padding: 0; border-radius: 999px; }
.secondary-button:hover, .icon-button:hover {
  background: #fff;
  border-color: rgba(17,74,139,.35);
}
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.jd-card { padding: 25px 28px; display: grid; grid-template-columns: .85fr 1.15fr; gap: 25px; color: white; background: var(--ink); border-radius: 18px; }
.jd-main > span { color: #82b5e1; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.jd-main h3 { margin: 8px 0; font: 28px Georgia, "Songti SC", serif; }
.jd-main p { margin: 0; color: #c1ced0; font-size: 12px; line-height: 1.7; }
.criterion-chips { display: flex; align-content: center; align-items: center; flex-wrap: wrap; gap: 8px; }
.criterion-chips span { padding: 7px 10px; color: #d8e6e5; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.11); border-radius: 7px; font-size: 10px; }
.criterion-chips b { margin-left: 5px; color: #8fc0e9; }
.custom-rule-summary {
  margin-top: 12px; padding: 13px 16px; display: flex; align-items: flex-start; gap: 10px;
  color: #244b6a; background: #eaf2fa; border: 1px solid #cbddec; border-radius: 10px;
  font-size: 11px; line-height: 1.65;
}
.custom-rule-summary b { flex: 0 0 auto; color: var(--brand-blue); }
.warning-box { margin-top: 12px; padding: 12px 16px; color: #7b5423; background: #fff2d8; border: 1px solid #efd59c; border-radius: 10px; font-size: 11px; line-height: 1.7; }
.table-toolbar { padding: 27px 4px 13px; display: flex; align-items: center; justify-content: space-between; }
.table-toolbar b { font: 28px Georgia, serif; }
.table-toolbar span { color: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 15px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.grade-a { background: #32a876; }
.grade-b { background: #48a0b5; }
.grade-c { background: #dfa246; }
.candidate-list { display: grid; gap: 10px; }
.candidate-card {
  padding: 18px 21px; display: grid; grid-template-columns: 48px 1.2fr 100px 1.35fr 175px; align-items: center; gap: 18px;
  background: rgba(255,255,255,.82); border: 1px solid rgba(203,217,228,.9); border-radius: 13px; cursor: pointer; transition: .18s ease;
}
.candidate-card:hover { border-color: rgba(17,74,139,.45); box-shadow: 0 12px 30px rgba(17,74,139,.09); transform: translateY(-1px); }
.rank { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); background: #ebece5; border-radius: 50%; font: 17px Georgia, serif; }
.candidate-card:nth-child(-n+3) .rank { color: var(--brand-blue); background: var(--brand-blue-pale); }
.candidate-name strong, .candidate-name small { display: block; }
.candidate-name strong { font-size: 15px; }
.candidate-name small { margin-top: 5px; max-width: 240px; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score-block { display: flex; align-items: baseline; gap: 3px; }
.score-block b { font: 31px Georgia, serif; }
.score-block span { color: var(--muted); font-size: 10px; }
.evidence-preview { color: var(--muted); font-size: 11px; line-height: 1.55; }
.candidate-meta {
  width: 100%; display: grid; grid-template-columns: 44px minmax(84px, 1fr);
  grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 6px;
}
.grade-badge {
  width: 44px; height: 44px; grid-row: 1 / 3;
  display: grid; place-items: center; color: white; border-radius: 10px;
  font: 24px Georgia, serif; box-shadow: 0 7px 16px rgba(18, 52, 74, .12);
}
.grade-badge.A { background: #2f9a70; }
.grade-badge.B { background: #3e91a4; }
.grade-badge.C { background: #d69637; }
.grade-badge.D { background: #a0a8a7; }
.view-link {
  grid-column: 2; display: block; color: var(--brand-blue);
  text-align: center; font-size: 10px; font-weight: 800; white-space: nowrap;
}
.candidate-download, .drawer-download {
  padding: 6px 9px; color: white; background: var(--brand-blue); border-radius: 7px;
  text-decoration: none; font-size: 9px; font-weight: 800; white-space: nowrap;
}
.candidate-download { grid-column: 2; display: block; text-align: center; }
.candidate-download:hover, .drawer-download:hover { background: var(--brand-blue-dark); }
.drawer-download { margin-top: 12px; display: inline-flex; padding: 9px 13px; font-size: 10px; }

.drawer { visibility: hidden; position: fixed; inset: 0; z-index: 30; }
.drawer.open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8,30,35,.38); border: 0; opacity: 0; transition: .25s; backdrop-filter: blur(2px); }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  width: min(620px, 94vw); position: absolute; right: 0; top: 0; bottom: 0; padding: 42px;
  background: var(--paper); box-shadow: -20px 0 70px rgba(12,42,46,.18); overflow-y: auto;
  transform: translateX(100%); transition: .3s cubic-bezier(.2,.7,.2,1);
}
.drawer.open .drawer-panel { transform: none; }
.drawer-close { position: absolute; right: 22px; top: 18px; color: var(--muted); background: none; border: 0; font-size: 26px; cursor: pointer; }
.drawer-score { display: flex; align-items: center; gap: 19px; }
.drawer-score .score-disc { position: relative; left: auto; top: auto; width: 92px; height: 92px; flex: 0 0 auto; transform: none; box-shadow: none; }
.drawer-score .score-disc b { font-size: 34px; }
.drawer-score .score-disc span { font-size: 8px; }
.drawer-score h2 { margin: 0 0 5px; font: 31px Georgia, "Songti SC", serif; }
.drawer-score p { margin: 0; color: var(--muted); font-size: 11px; }
.drawer-section { margin-top: 30px; }
.drawer-section h3 { margin: 0 0 12px; font: 20px Georgia, "Songti SC", serif; }
.insight-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.insight-list li { padding: 11px 13px; color: #466269; background: #f3f5f1; border-radius: 8px; font-size: 11px; line-height: 1.6; }
.criteria-list { display: grid; gap: 8px; }
.criterion-row { padding: 12px 13px; background: #f7f6f1; border-radius: 9px; }
.criterion-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.criterion-top b { font-size: 12px; }
.status { padding: 3px 7px; border-radius: 100px; font-size: 9px; font-weight: 800; }
.status.good { color: #217252; background: #dcefe5; }
.status.partial { color: #8a6022; background: #f8e7c8; }
.status.missing { color: #7b6d60; background: #eae6df; }
.criterion-row p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: 520px; padding: 13px 18px; color: white; background: #8e4237; border-radius: 10px; box-shadow: 0 15px 40px rgba(0,0,0,.2); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }

.mobile-only { display: none; }

@media (max-width: 1400px) {
  main { width: min(100% - 28px, 720px); }
  .hero { min-height: 410px; grid-template-columns: 1fr; padding-top: 35px; }
  .hero-visual { display: none; }
  .input-grid { grid-template-columns: 1fr; }
  .candidate-card { grid-template-columns: 42px 1fr 80px 150px; }
  .evidence-preview { display: none; }
  .jd-card { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .file-mode-notice {
    width: min(920px, calc(100% - 20px));
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    gap: 10px;
  }
  .privacy-chip {
    max-width: 46vw;
    padding: 7px 10px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand-logo { width: 72px; height: 42px; }
  .brand-product { padding-left: 10px; }
  .brand small { display: none; }
  main {
    width: min(100% - 20px, 640px);
    padding-bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }
  .hero {
    min-height: 0;
    padding: 18px 0 8px;
    gap: 16px;
  }
  .eyebrow { font-size: 10px; letter-spacing: .14em; margin-bottom: 10px; }
  .hero h1 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.15;
    letter-spacing: -.04em;
  }
  .workspace { border-radius: 18px; }
  .steps {
    height: auto;
    min-height: 58px;
    padding: 12px 14px;
    gap: 4px;
  }
  .step {
    gap: 6px;
    font-size: 11px;
  }
  .step b {
    padding-right: 0;
    font-size: 11px;
    font-weight: 650;
  }
  .step:not(:last-child)::after {
    left: 30px;
    right: 6px;
  }
  .input-grid { padding: 22px 16px 24px; gap: 22px; }
  .panel-head { margin-bottom: 16px; gap: 10px; }
  .panel-head h2 { font-size: 22px; }
  .panel-head p { font-size: 12px; line-height: 1.55; }
  textarea { height: 160px; padding: 14px; font-size: 15px; }
  .file-row {
    min-height: 44px;
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .file-button, .folder-button {
    min-height: 44px;
    padding: 10px 12px;
    background: var(--brand-blue-pale);
    border-radius: 10px;
    font-size: 13px;
  }
  .dropzone {
    height: auto;
    min-height: 148px;
    padding: 22px 14px;
  }
  .dropzone strong { font-size: 15px; }
  .dropzone small { font-size: 11px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: inline; }
  .folder-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
  .path-field,
  #toggle-path { display: none !important; }
  .custom-prompt-panel { padding: 16px; }
  .custom-prompt-head h2 { font-size: 18px; }
  #evaluation-prompt { height: 110px; min-height: 110px; font-size: 15px; }
  .primary-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .primary-button,
  .demo-button {
    width: 100%;
    min-height: 48px;
    height: 48px;
  }
  .model-status {
    align-items: flex-start;
    padding: 12px 14px;
  }
  .consent-note {
    text-align: left;
    line-height: 1.6;
    font-size: 11px;
  }
  .loading-view {
    min-height: 320px;
    margin: 28px 0;
    padding: 0 8px;
  }
  .loading-view h2 { font-size: 22px; }
  .progress { width: min(310px, 100%); }
  .results { margin-top: 28px; }
  .results-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .results-head h2 { font-size: 26px; }
  .report-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }
  .secondary-button {
    min-height: 44px;
    justify-content: center;
    font-size: 12px;
  }
  .icon-button { width: 44px; height: 44px; min-height: 44px; }
  .jd-card { padding: 18px; gap: 16px; border-radius: 14px; }
  .jd-main h3 { font-size: 22px; }
  .table-toolbar {
    padding: 20px 2px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .table-toolbar b { font-size: 24px; }
  .legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 11px;
  }
  .candidate-card {
    padding: 14px;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name score"
      "meta meta meta";
    gap: 10px 12px;
    align-items: start;
  }
  .candidate-card:hover { transform: none; }
  .rank { grid-area: rank; width: 34px; height: 34px; font-size: 15px; }
  .candidate-name { grid-area: name; min-width: 0; }
  .candidate-name strong { font-size: 15px; }
  .candidate-name small {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.45;
  }
  .score-block { grid-area: score; align-self: center; }
  .score-block b { font-size: 26px; }
  .candidate-meta {
    grid-area: meta;
    width: 100%;
    grid-template-columns: 40px 1fr 1fr;
    grid-template-rows: auto;
    column-gap: 8px;
    row-gap: 0;
    align-items: center;
  }
  .grade-badge {
    width: 40px;
    height: 40px;
    grid-row: auto;
    font-size: 20px;
    border-radius: 9px;
  }
  .view-link,
  .candidate-download {
    grid-column: auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .view-link {
    color: var(--brand-blue);
    background: var(--brand-blue-pale);
    font-weight: 800;
  }
  .candidate-download { font-size: 12px; }

  /* 手机：详情改为底部抽屉 */
  .drawer-panel {
    width: 100%;
    max-height: min(92vh, 100%);
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 28px 18px calc(28px + env(safe-area-inset-bottom, 0px));
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -16px 50px rgba(12, 42, 46, .2);
  }
  .drawer-panel::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 4px;
    background: #d5e0e8;
    transform: translateX(-50%);
  }
  .drawer.open .drawer-panel { transform: none; }
  .drawer-close {
    right: 14px;
    top: 12px;
    width: 40px;
    height: 40px;
    font-size: 28px;
  }
  .drawer-score {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 8px;
  }
  .drawer-score .score-disc { width: 84px; height: 84px; }
  .drawer-score h2 { font-size: 26px; }
  .drawer-download {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 10px 14px;
    font-size: 12px;
  }
  .drawer-section { margin-top: 22px; }
  .drawer-section h3 { font-size: 18px; }
  .toast {
    left: 16px;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    width: auto;
    transform: translateY(15px);
    font-size: 13px;
  }
  .toast.show { transform: translateY(0); }
}

@media (max-width: 420px) {
  .step b { display: none; }
  .step:not(:last-child)::after { left: 28px; right: 4px; }
  .report-actions {
    grid-template-columns: 1fr;
  }
  .icon-button { width: 100%; }
  .privacy-chip span {
    max-width: 28vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Auth & admin */
.auth-actions { display: flex; align-items: center; gap: 12px; }
.auth-guest, .auth-user { display: flex; align-items: center; gap: 12px; }
.nav-dropdown {
  position: relative;
}
.nav-dropdown > summary {
  list-style: none;
  cursor: pointer;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 8px;
  display: grid;
  gap: 2px;
  background: #fff;
  border: 1px solid rgba(17, 74, 139, 0.16);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 35, 64, 0.12);
  z-index: 40;
}
.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--brand-blue-dark);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: #eef4fb;
  color: var(--brand-blue);
}
.nav-dropdown-menu a.is-current {
  background: #e7f0fb;
}
.user-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.quota-chip span { white-space: nowrap; }
.text-button {
  border: 0; background: transparent; color: var(--brand-blue-dark);
  cursor: pointer; font-size: 13px; font-weight: 700; text-decoration: none; padding: 0;
}
.text-button:hover { color: var(--brand-blue); }
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
}
.auth-card {
  width: min(420px, 100%); padding: 36px 32px 40px; background: var(--paper);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
}
.auth-brand { margin-bottom: 28px; }
.auth-card h1 {
  margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 28px; font-weight: 500;
}
.auth-lead { margin: 10px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-form { display: grid; gap: 8px; }
.auth-form input {
  width: 100%; margin-bottom: 10px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #f8fbfd;
}
.auth-form .primary-button { width: 100%; justify-content: center; margin-top: 8px; }
.auth-error { margin: 8px 0 0; color: #b42318; font-size: 13px; }
.admin-main {
  width: min(1100px, calc(100% - 48px)); margin: 0 auto 80px; display: grid; gap: 22px;
}
.admin-panel .admin-form {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end;
}
.admin-panel .admin-form .field-label { grid-column: span 1; }
.admin-panel .admin-form input {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
}
.admin-table { overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle;
}
.admin-table th { color: var(--muted); font-weight: 700; }
.admin-ops { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-ops button {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #f7fafc; cursor: pointer; font-size: 12px; font-weight: 700;
}
.admin-ops button:hover { border-color: var(--brand-sky); color: var(--brand-blue); }
.muted { color: var(--muted); }
@media (max-width: 900px) {
  .admin-panel .admin-form { grid-template-columns: 1fr 1fr; }
  .auth-actions { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 560px) {
  .admin-panel .admin-form { grid-template-columns: 1fr; }
}

/* ===== Job Grade ===== */
body.jg-page .topbar {
  padding: 0 max(24px, calc((100vw - 1560px) / 2));
}
.jg-main {
  width: min(1560px, calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 96px;
}
.jg-hero {
  display: none;
}
.jg-mode-chip {
  display: inline-flex;
  margin: 18px 0 10px;
  padding: 8px 14px;
  color: var(--brand-blue-dark);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(17,74,139,.16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.jg-mode-chip-inline {
  margin: 18px 0 10px;
}
.jg-workspace {
  /* override global .workspace { width: min(820px, 100%) } */
  width: 100% !important;
  max-width: none !important;
  margin: 0;
  padding: 40px 42px;
  border-radius: 28px;
}
.jg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 48px;
  align-items: start;
}
.jg-input-panel .panel-head,
.jg-result-panel .panel-head {
  margin-bottom: 28px;
}
.jg-input-panel .field-label {
  display: block;
  margin-bottom: 8px;
}
.jg-input-panel input[type="text"],
.jg-input-panel input[type="number"],
.jg-input-panel textarea,
.jg-input-panel .jg-select {
  width: 100%;
  margin: 0 0 20px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  box-sizing: border-box;
}
.jg-input-panel input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.jg-input-panel input[type="number"]::-webkit-outer-spin-button,
.jg-input-panel input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.jg-input-panel input::placeholder,
.jg-input-panel textarea::placeholder {
  font-size: 13px;
  color: #9aa5b5;
  opacity: 1;
}
.jg-input-panel .jg-select { margin-bottom: 8px; }
.jg-field-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.jg-org-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.jg-org-field:last-child { grid-column: span 2; }
.jg-org-field .field-label em { color: #ef4444; font-style: normal; }
.jg-market > div.is-positioning {
  outline: 2px solid #2f6df6;
  outline-offset: -2px;
  background: #edf4ff;
}
.jg-market-selection { margin: 10px 0 0; color: #2f6df6; font-size: 12px; font-weight: 700; }
.jg-input-panel textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.75;
}
.jg-dropzone {
  margin: 0 0 16px;
  height: 168px;
}
.jg-parse-hint {
  margin: 0 0 16px;
  color: var(--brand-blue);
  font-size: 12px;
  line-height: 1.6;
}
.jg-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  cursor: pointer;
}
.jg-toggle input { margin-top: 3px; }
.jg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.jg-status { margin: 14px 0 0; color: var(--brand-blue); font-size: 13px; }

.jg-result {
  display: grid;
  gap: 28px;
}
.jg-empty {
  padding: 72px 36px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #f8fbfe;
  text-align: center;
}
.jg-empty strong, .jg-empty span { display: block; }
.jg-empty strong { font-size: 20px; }
.jg-empty span {
  margin: 12px auto 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.jg-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: center;
  padding: 28px 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, #eef5fb, #f8fbfe);
  border: 1px solid rgba(17,74,139,.12);
}
.jg-summary-copy { min-width: 0; flex: 1; }
.jg-kicker {
  margin: 0 0 10px;
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}
.jg-summary-card h3 {
  margin: 0;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.25;
}
.jg-level { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.jg-grade-disc {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  color: white;
  background: radial-gradient(circle at 30% 25%, #5c93c8, #114a8b 70%);
  box-shadow: 0 18px 40px rgba(17,74,139,.24);
}
.jg-grade-disc b { font-size: 32px; line-height: 1; }
.jg-grade-disc span, .jg-grade-disc small { display: block; }
.jg-grade-disc span { margin-top: 5px; font-size: 12px; opacity: .92; }
.jg-grade-disc small { margin-top: 4px; font-size: 12px; opacity: .8; }

.jg-block {
  padding: 22px 22px 20px;
  border: 1px solid rgba(17,74,139,.10);
  border-radius: 20px;
  background: rgba(255,255,255,.72);
}
.jg-block-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}
.jg-block-head h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: .02em;
}
.jg-block-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.jg-city-tag {
  margin: 0;
  color: var(--brand-blue-dark);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.jg-market {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.jg-market > div {
  padding: 18px 14px;
  border-radius: 16px;
  background: #f8fbfe;
  border: 1px solid var(--line);
  text-align: center;
}
.jg-market span { display: block; color: var(--muted); font-size: 12px; }
.jg-market b {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  color: var(--brand-blue-dark);
  letter-spacing: -.02em;
}
.jg-market-mid {
  background: var(--brand-blue-pale) !important;
  border-color: rgba(17,74,139,.18) !important;
}
.jg-market-note {
  margin: 14px 0 0;
  color: #9a6b16;
  font-size: 12px;
  line-height: 1.65;
}

.jg-factors { display: grid; gap: 16px; }
.jg-factor-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}
.jg-factor-label span { color: var(--muted); font-size: 13px; }
.jg-factor-track {
  height: 12px;
  border-radius: 999px;
  background: #e7eef5;
  overflow: hidden;
}
.jg-factor-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5c93c8, #114a8b);
  border-radius: inherit;
}

.jg-narrative {
  margin: 0;
  padding: 22px 24px;
  border-left: 3px solid var(--brand-blue);
  background: #f7fafc;
  border-radius: 0 18px 18px 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}
.jg-ai-summary {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.jg-uncertainties {
  margin: 0;
  padding-left: 18px;
  color: #9a6b16;
  font-size: 13px;
  line-height: 1.65;
}

.jg-dim-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.jg-dim-row {
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.jg-dim-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.jg-dim-head b { display: block; font-size: 15px; }
.jg-dim-head span { color: var(--muted); font-size: 12px; }
.jg-dim-head select {
  min-width: 68px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfe;
}
.jg-dim-level-desc {
  margin: 8px 0 0;
  font-size: 12px;
  color: #5a6f86;
  line-height: 1.5;
}
.jg-hay-profile { margin-top: 4px; }
.jg-hay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.jg-hay-grid > div {
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}
.jg-hay-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.jg-hay-grid b {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--brand-blue-dark);
}
.jg-hay-grid small {
  display: block;
  margin-top: 8px;
  color: #5a6f86;
  font-size: 12px;
  line-height: 1.45;
}
.jg-profile-chip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef5fb;
  border: 1px solid rgba(17,74,139,.12);
}
.jg-profile-chip b { color: var(--brand-blue-dark); }
.jg-profile-chip span { color: #5a6f86; font-size: 13px; }
.jg-consistency {
  margin: 12px 0 0;
  padding-left: 1.1em;
}
.jg-consistency li {
  color: #9a6b16;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 4px;
}
.jg-dim-head select { min-width: 140px; }
@media (max-width: 900px) {
  .jg-hay-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .jg-layout { grid-template-columns: 1fr; gap: 32px; }
  .jg-workspace { padding: 28px 24px; }
  .jg-dim-list { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .jg-summary-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .jg-grade-disc { align-self: flex-start; }
  .jg-block-head { flex-direction: column; align-items: flex-start; }
  .jg-city-tag { text-align: left; }
  .jg-market b { font-size: 20px; }
}
@media (max-width: 560px) {
  .jg-main { width: calc(100% - 28px); }
  .jg-actions { flex-direction: column; align-items: stretch; }
  .jg-actions .primary-button,
  .jg-actions .secondary-button {
    width: 100%;
    justify-content: center;
  }
  .jg-market { grid-template-columns: 1fr; }
  .jg-org-grid { grid-template-columns: 1fr; }
  .jg-org-field:last-child { grid-column: span 1; }
}

/* Help modal */
.jg-help-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.jg-help-modal.hidden { display: none; }
.jg-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 48, .48);
  backdrop-filter: blur(4px);
}
.jg-help-panel {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(86vh, 920px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(17,74,139,.12);
  box-shadow: 0 28px 80px rgba(17,74,139,.22);
  overflow: hidden;
}
.jg-help-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fbff, #fff);
}
.jg-help-head h2 {
  margin: 6px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
}
.jg-help-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 8px 24px 28px;
}
.jg-help-body section {
  padding: 18px 0;
  border-bottom: 1px solid #eef2f6;
}
.jg-help-body section:last-child { border-bottom: 0; }
.jg-help-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--brand-blue-dark);
}
.jg-help-body p,
.jg-help-body li {
  color: var(--body, var(--ink));
  font-size: 14px;
  line-height: 1.75;
}
.jg-help-body ol,
.jg-help-body ul {
  margin: 0;
  padding-left: 1.2em;
}
.jg-help-body li + li { margin-top: 6px; }
.jg-help-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 12px;
  font-size: 13px;
}
.jg-help-body th,
.jg-help-body td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.jg-help-body th {
  background: #f3f8fc;
  color: var(--muted);
  font-weight: 700;
}
.jg-help-body code {
  font-size: 12px;
  background: #f3f8fc;
  padding: 1px 6px;
  border-radius: 6px;
}
body.jg-help-open { overflow: hidden; }

/* —— 用工合规体检 —— */
.cp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cp-summary {
  align-items: stretch;
}
.cp-summary-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.cp-counts {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  gap: 8px;
  min-width: 220px;
}
.cp-count {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  background: #fff;
}
.cp-count b {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}
.cp-count span {
  font-size: 12px;
  color: var(--muted);
}
.cp-count.sev-critical { border-color: #f1b4b4; background: #fff5f5; }
.cp-count.sev-critical b { color: #c0392b; }
.cp-count.sev-high { border-color: #f5c9a0; background: #fff8f1; }
.cp-count.sev-high b { color: #d35400; }
.cp-count.sev-medium { border-color: #f0e0a0; background: #fffdf3; }
.cp-count.sev-medium b { color: #b7950b; }
.cp-count.sev-low { border-color: #b9d7f0; background: #f4f9fd; }
.cp-count.sev-low b { color: var(--brand-blue); }
.cp-count.sev-info { border-color: var(--line); }

.cp-priority {
  margin: 18px 0;
}
.cp-priority h3,
.cp-report-head h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.cp-priority ol {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.cp-findings {
  display: grid;
  gap: 12px;
}
.cp-finding {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}
.cp-finding.sev-critical { border-left-color: #c0392b; }
.cp-finding.sev-high { border-left-color: #d35400; }
.cp-finding.sev-medium { border-left-color: #b7950b; }
.cp-finding.sev-low { border-left-color: var(--brand-blue); }
.cp-finding.sev-info { border-left-color: #9aa5b5; }
.cp-finding header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 10px;
  margin-bottom: 8px;
}
.cp-finding h4 {
  margin: 0;
  flex: 1 1 180px;
  font-size: 15px;
}
.cp-sev,
.cp-theme {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f8fc;
  color: var(--brand-blue-dark);
}
.cp-finding p,
.cp-finding li {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}
.cp-finding p + p,
.cp-finding ul {
  margin-top: 8px;
}
.cp-risk { color: #5a6573 !important; }
.cp-basis { color: var(--muted) !important; }
.cp-recs,
.cp-finding ul {
  padding-left: 1.1em;
}
.cp-missing {
  margin-top: 10px !important;
  font-weight: 700;
  color: var(--muted) !important;
}

.cp-report-block {
  margin-top: 22px;
}
.cp-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.cp-report {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fafc;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.65;
  max-height: 420px;
  overflow: auto;
}
.cp-disclaimer {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 900px) {
  .cp-grid-2 { grid-template-columns: 1fr; }
  .cp-counts { min-width: 0; width: 100%; }
  .cp-summary {
    flex-direction: column;
  }
}

.cp-upload-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.cp-upload-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.cp-upload-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.cp-hour-block {
  margin: 4px 0 8px;
  padding: 14px 14px 6px;
  border: 1px solid rgba(17, 74, 139, 0.1);
  border-radius: 14px;
  background: #f7fafc;
}
.cp-field-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.cp-doc-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.cp-doc-type {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.cp-doc-type.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
}
.cp-file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cp-file-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfd;
}
.cp-file-name {
  font-size: 13px;
  font-weight: 700;
}
.cp-file-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.cp-ai-card {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 74, 139, .22);
  background: linear-gradient(145deg, #f5f9fd, #eaf2fa);
}
.cp-ai-level {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--brand-blue);
}
.cp-ai-level.sev-critical { background: #c0392b; }
.cp-ai-level.sev-high { background: #d35400; }
.cp-ai-level.sev-medium { background: #b7950b; }
.cp-ai-level.sev-low { background: var(--brand-blue); }
.cp-ai-level.sev-info { background: #7a8794; }
.cp-ai-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.cp-ai-summary {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}
.cp-ai-judgment {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: #2a4456;
}
.cp-theme-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.cp-theme-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}
.cp-theme-item b { color: var(--brand-blue-dark); }
.cp-muted { color: var(--muted); }
