/* ============================================================
   简历校准台 — 校样稿视觉系统
   规则：宋体只说用户文档里的话，黑体只说工具自己的话。
   朱砂只用于红笔动作与"需核实"，松绿/赭石只用于结论。
   ============================================================ */

:root {
    --ink: #1c221f;
    --ink-2: #3b443f;
    --muted: #5c645e;
    --faint: #6d756c;
    --paper: #fdfdfa;
    --desk: #ecedE6;
    --rule: #d5d7cc;
    --rule-strong: #b9bcaf;
    --red: #be3a28;
    --red-deep: #96291b;
    --red-wash: #f6e7e2;
    --green: #2a5c49;
    --green-wash: #e4ede7;
    --amber: #8a5a14;
    --amber-wash: #f4ead8;
    --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-doc: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", SimSun, serif;
    color: var(--ink);
    background: var(--desk);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-width: 320px;
    background: var(--desk);
    font-family: var(--font-ui);
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    overflow-x: hidden;
}
h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; }
button, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
.drop-zone:focus-within {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 报头 ---------- */

.masthead {
    background: var(--desk);
    border-bottom: 1px solid var(--rule);
}
.masthead-inner {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 0 48px;
}
.masthead-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.seal {
    display: grid;
    place-items: center;
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 2px;
    background: var(--red);
    color: #fff8f4;
    font-family: var(--font-doc);
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(255, 248, 244, .35), inset 0 0 0 3px var(--red);
    user-select: none;
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.brand-caption { font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.masthead-actions { display: flex; align-items: center; gap: 6px; }
.folio {
    margin-right: 8px;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .08em;
}
.text-button {
    min-height: 38px;
    padding: 0 10px;
    color: var(--muted);
    font-size: 12px;
    border-bottom: 1px solid transparent;
}
.text-button:hover { color: var(--ink); border-bottom-color: var(--ink); }
.account-button {
    min-height: 38px;
    margin-left: 4px;
    padding: 0 14px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.account-button:hover { border-color: var(--ink); }
.account-button.is-authenticated { color: var(--muted); border-color: var(--rule); }

/* ---------- 四步目录 ---------- */

.steps {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 0 -48px;
    padding: 0 48px;
    background: var(--desk);
    border-top: 1px solid var(--rule);
}
.steps::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: var(--ink);
    transform-origin: left center;
    animation: ruleDraw .7s cubic-bezier(.2, .7, .3, 1) both;
}
.flow-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.flow-nav-item { min-width: 0; border-left: 1px solid var(--rule); }
.flow-nav-item:first-child { border-left: 0; }
.flow-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "index copy"
        "index state";
    align-items: baseline;
    column-gap: 10px;
    width: 100%;
    min-height: 66px;
    padding: 13px 16px 12px;
    border-bottom: 2px solid transparent;
    text-align: left;
    color: var(--ink);
    transition: background .15s ease, border-color .15s ease;
}
.flow-nav-item:first-child .flow-link { padding-left: 0; }
.flow-link:hover:not(:disabled) { background: rgba(255, 255, 255, .45); }
.flow-link:disabled { cursor: not-allowed; }
.flow-index {
    grid-area: index;
    color: var(--faint);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .06em;
}
.flow-copy { grid-area: copy; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.flow-copy strong { font-size: 13px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.flow-copy small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.flow-state {
    grid-area: state;
    margin-top: 3px;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: .06em;
}
.flow-nav-item.is-current .flow-link {
    background: var(--paper);
    box-shadow: inset 0 2px 0 var(--red);
}
.flow-nav-item.is-current .flow-index { color: var(--red); }
.flow-nav-item.is-current .flow-copy strong { color: var(--red-deep); }
.flow-nav-item.is-current .flow-state { color: var(--red-deep); }
.flow-nav-item.is-complete .flow-index,
.flow-nav-item.is-complete .flow-state { color: var(--green); }
.flow-nav-item.is-complete .flow-copy strong { color: var(--ink-2); }
.flow-nav-item.is-locked .flow-copy strong { color: var(--muted); }
.flow-nav-item.is-locked .flow-copy small { color: var(--faint); }

.steps-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--rule);
}
.steps-progress span {
    display: block;
    height: 100%;
    width: 25%;
    background: var(--ink);
    transition: width .35s cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 工作区：稿纸左边线 ---------- */

.workspace {
    flex: 1;
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 0 48px 0 82px;
    border-left: 0;
    position: relative;
}
.workspace::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 48px;
    width: 1px;
    background: rgba(190, 58, 40, .32);
}
.context-line {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 26px 0 0;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}
.context-line::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--red);
    flex: none;
}

.flow-step { padding: 26px 0 48px; }
.flow-step + .flow-step { border-top: 1px solid var(--rule); }

.view-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px;
    padding-bottom: 24px;
    margin-bottom: 28px;
}
.view-heading h1 {
    max-width: 21em;
    margin-bottom: 12px;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -.035em;
}
.heading-copy {
    max-width: 58ch;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.8;
}
.quiet-badge,
.step-state {
    flex: none;
    margin-top: 8px;
    padding: 4px 9px;
    border: 1px solid currentColor;
    border-radius: 1px;
    color: var(--muted);
    font-family: var(--font-doc);
    font-size: 11.5px;
    letter-spacing: .14em;
    white-space: nowrap;
    transform: rotate(-1.5deg);
}
.quiet-badge { color: var(--red); }

/* ---------- 输入纸面 ---------- */

.sheet,
.resume-input-area {
    padding: 26px 28px 28px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-top: 2px solid var(--ink);
    box-shadow: 0 20px 36px -32px rgba(28, 34, 31, .5);
}
.job-entry-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--rule-strong);
}
.job-entry-tab {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}
.job-entry-tab:hover,
.job-entry-tab:focus-visible { color: var(--ink); }
.job-entry-tab.is-selected { border-bottom-color: var(--red); color: var(--red-deep); font-weight: 700; }
.job-entry-panel { margin-top: 0; }
.text-input {
    display: block;
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}
.text-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(190, 58, 40, .09); }
.compact-field { margin-top: 20px; }
.compact-editor { min-height: 120px; }
.role-result { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); }
.role-result-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.role-result h2 { margin: 0; font-size: 18px; line-height: 1.35; }
.role-result-status { color: var(--green); font-size: 12px; white-space: nowrap; }
.role-result-message { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.role-sample-list { display: grid; gap: 9px; margin: 16px 0 0; padding: 0; list-style: none; }
.role-sample-list li { padding: 10px 12px; border-left: 2px solid var(--amber); background: #fffdf8; color: var(--ink-2); font-family: var(--font-doc); font-size: 12.5px; line-height: 1.65; }
.role-source-list { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 14px; }
.role-source-list a { color: var(--red-deep); font-size: 12px; }
.role-confirm-box { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.role-confirm-box textarea { min-height: 170px; }
.role-privacy-note { margin: 17px 0 0; color: var(--faint); font-size: 11px; line-height: 1.6; }
.role-fallback { margin-top: 18px; padding: 15px 16px; border: 1px solid #e5b7ad; background: #fffaf8; }
.role-fallback strong { display: block; font-size: 13px; }
.role-fallback p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.general-review-notice { margin-top: 12px; padding-left: 11px; border-left: 2px solid var(--amber); color: var(--muted); font-size: 12px; line-height: 1.6; }
.field-block label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .01em;
}
.field-aside {
    color: var(--faint);
    font-family: var(--font-doc);
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: .1em;
}
.text-editor {
    display: block;
    width: 100%;
    min-height: 300px;
    padding: 20px 22px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-doc);
    font-size: 14.5px;
    line-height: 1.95;
    resize: vertical;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.text-editor::placeholder { color: var(--faint); font-family: var(--font-ui); font-size: 13px; }
.text-editor:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(190, 58, 40, .09);
}
.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 9px;
    color: var(--faint);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; }
.action-hint { color: var(--muted); font-size: 12px; }
.check-annotation { margin-top: 18px; }
.check-annotation-inner { padding: 16px 18px; border: 1px solid #e5b7ad; background: #fffaf8; }
.check-annotation-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.check-annotation-head h3 { margin: 0; font-size: 13px; }
.check-annotation-head span { color: var(--muted); font-size: 11px; }
.check-legend { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-bottom: 11px; font-size: 11px; font-weight: 700; }
.check-legend span { display: inline-flex; align-items: center; gap: 5px; }
.check-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.check-legend-problem { color: var(--red-deep); }
.check-legend-problem::before { background: var(--red); }
.check-legend-warning { color: var(--amber); }
.check-legend-warning::before { background: var(--amber); }
.check-legend-review { color: #245b86; }
.check-legend-review::before { background: #397eae; }
.check-annotation-text { margin: 0; color: var(--ink); font-family: var(--font-doc); font-size: 14px; line-height: 1.9; white-space: pre-wrap; }
.check-highlight { padding: 1px 2px; border-radius: 2px; font-weight: 700; }
.check-highlight-problem { color: #8f2016; background: #ffd9d1; box-shadow: inset 0 -2px 0 var(--red); }
.check-highlight-warning { color: #70450b; background: #f9e5b5; box-shadow: inset 0 -2px 0 var(--amber); }
.check-highlight-review { color: #1f527a; background: #d9ebf7; box-shadow: inset 0 -2px 0 #397eae; }
.check-suggestions { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); }
.check-suggestion-list { display: grid; gap: 10px; }
.check-suggestion { padding: 16px 18px; border-left: 3px solid var(--red); background: #fffaf8; }
.check-suggestion-warning { border-left-color: var(--amber); background: #fffaf2; }
.check-suggestion-review { border-left-color: #397eae; background: #f5faff; }
.check-suggestion-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-suggestion h4 { margin: 0; font-size: 13px; }
.check-suggestion-message { margin: 10px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.75; }
.check-finding-list, .check-row-findings { display: grid; gap: 8px; margin: 11px 0 0; padding: 10px 0 0 16px; border-top: 1px dashed var(--rule-strong); list-style: none; }
.check-finding-list li, .check-row-findings li { position: relative; display: grid; gap: 2px; color: var(--ink-2); font-size: 12px; line-height: 1.65; }
.check-finding-list li::before, .check-row-findings li::before { content: ""; position: absolute; margin-left: -13px; margin-top: .58em; width: 5px; height: 5px; background: currentColor; }
.check-finding-list strong, .check-row-findings strong { color: var(--ink); font-weight: 700; }
.check-finding-list span, .check-row-findings span { color: var(--muted); }
.check-suggestion-action { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 12.5px; line-height: 1.75; }
.check-suggestion-action strong { color: var(--ink); }

/* ---------- 按钮 ---------- */

.button {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 2px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { background: var(--red); color: #fff8f4; }
.button-primary:hover:not(:disabled) { background: var(--red-deep); }
.button-quiet { border-color: var(--rule-strong); color: var(--ink-2); background: transparent; }
.button-quiet:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.next-step-row { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--rule); }
.loading { position: relative; color: transparent !important; }
.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 13px;
    margin: -7px 0 0 -7px;
    border: 1.5px solid rgba(255, 248, 244, .4);
    border-top-color: #fff8f4;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.button-quiet.loading::after { border-color: rgba(28, 34, 31, .25); border-top-color: var(--ink); }

/* ---------- 结果区 ---------- */

.result-shell { margin-top: 38px; animation: reveal .35s ease both; }
.result-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--ink);
}
.result-header h2,
.result-header h3 { font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.result-header p { color: var(--muted); font-size: 12px; }

.result-section { margin-top: 34px; }
.analysis-panel { margin-top: 22px; padding: 20px 22px; border: 1px solid var(--rule); border-top: 2px solid var(--ink); background: var(--paper); }
.analysis-panel + .analysis-panel { margin-top: 14px; }
.analysis-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.analysis-kicker { display: block; margin-bottom: 6px; color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.analysis-panel h3 { margin: 0; font-size: 18px; font-weight: 800; }
.analysis-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.analysis-summary { max-width: 70ch; margin: 13px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.analysis-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 18px; }
.analysis-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 17px; border-top: 1px solid var(--rule); }
.analysis-label { display: block; margin-bottom: 8px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.analysis-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.analysis-list li { position: relative; padding-left: 13px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.analysis-list li::before { content: ""; position: absolute; top: .65em; left: 0; width: 5px; height: 5px; background: var(--red); }
.analysis-empty { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.55; }
.analysis-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.analysis-stats div { display: grid; gap: 3px; padding: 13px 16px 12px 0; }
.analysis-stats div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.analysis-stats strong { font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.analysis-stats span { color: var(--muted); font-size: 11px; }
.analysis-evidence { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.analysis-detail-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; line-height: 1.5; }
@media (max-width: 680px) {
    .analysis-panel { padding: 17px 16px; }
    .analysis-columns { grid-template-columns: 1fr; gap: 16px; }
    .analysis-columns-3 { padding-top: 16px; }
    .analysis-stats strong { font-size: 21px; }
    .job-entry-tab { flex: 1 1 100%; justify-content: flex-start; text-align: left; border-bottom-width: 1px; }
    .job-entry-tab.is-selected { border-left: 2px solid var(--red); border-bottom-color: transparent; }
    .role-result-head { display: block; }
    .role-result-status { display: block; margin-top: 7px; }
}
.result-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule-strong);
}
.result-section-head h3 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.result-section-head p { color: var(--muted); font-size: 12px; }

.empty-result {
    padding: 20px 18px;
    border: 1px dashed var(--rule-strong);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

/* 关键词索引 */
.rank-section { margin-top: 30px; }
.rank-list { list-style: none; }
.rank-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
    padding: 20px 0 22px;
    border-bottom: 1px solid var(--rule);
}
.rank-num {
    color: var(--rule-strong);
    font-family: var(--font-doc);
    font-size: 28px;
    line-height: 1.1;
    user-select: none;
}
.rank-row.is-first .rank-num { color: var(--red); font-size: 36px; }
.rank-keyword {
    color: var(--ink);
    font-family: var(--font-doc);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .01em;
    overflow-wrap: anywhere;
}
.rank-row.is-first .rank-keyword { font-size: 33px; }
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 16px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.rank-flag { color: var(--red-deep); font-weight: 600; }
.rank-evidence {
    max-width: 76ch;
    margin-top: 10px;
    padding-left: 13px;
    border-left: 1px solid var(--rule-strong);
    color: var(--ink-2);
    font-family: var(--font-doc);
    font-size: 13.5px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.rank-evidence-label {
    margin-right: 8px;
    color: var(--faint);
    font-family: var(--font-ui);
    font-size: 10.5px;
    letter-spacing: .08em;
}

/* 覆盖度刻度尺 */
.coverage-meter { margin: 30px 0 6px; }
.meter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}
.meter-score {
    display: flex;
    align-items: baseline;
    gap: 10px;
    color: var(--muted);
    font-size: 12.5px;
}
.meter-score strong {
    color: var(--ink);
    font-family: var(--font-doc);
    font-size: 34px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.meter-note { max-width: 44ch; color: var(--muted); font-size: 12px; line-height: 1.6; text-align: right; }
.meter-track {
    display: flex;
    height: 12px;
    margin: 14px 0 0;
    border: 1px solid var(--rule-strong);
    background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(28, 34, 31, .08) 4px 5px);
}
.meter-seg { height: 100%; box-shadow: inset -1px 0 0 var(--paper); }
.meter-seg.is-covered { background: var(--green); }
.meter-seg.is-partial { background: repeating-linear-gradient(135deg, var(--amber) 0 3px, #c09552 3px 4px); }
.meter-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 12px;
    color: var(--ink-2);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.meter-legend span { display: inline-flex; align-items: center; gap: 7px; }
.meter-legend i { width: 10px; height: 10px; border: 1px solid var(--rule-strong); }
.meter-legend .is-covered i { background: var(--green); border-color: var(--green); }
.meter-legend .is-partial i { background: var(--amber); border-color: var(--amber); }
.meter-legend .is-missing i { background: repeating-linear-gradient(135deg, transparent 0 2px, rgba(28, 34, 31, .35) 2px 3px); }
.meter-legend strong { font-weight: 700; }

/* 覆盖明细：双栏校样 */
.proof-list { list-style: none; border-top: 1px solid var(--rule); }
.proof-row {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 30px;
    padding: 20px 0 22px;
    border-bottom: 1px solid var(--rule);
}
.proof-key { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.proof-keyword {
    font-family: var(--font-doc);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.proof-quote {
    color: var(--ink-2);
    font-family: var(--font-doc);
    font-size: 14px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}
.proof-quote.is-empty { color: var(--faint); }
.proof-note {
    max-width: 74ch;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}

/* 结论印章 */
.stamp {
    display: inline-block;
    padding: 3px 8px 2px;
    border: 1px solid currentColor;
    border-radius: 1px;
    font-family: var(--font-doc);
    font-size: 11.5px;
    line-height: 1.35;
    letter-spacing: .14em;
    white-space: nowrap;
    transform: rotate(-1.5deg);
    animation: stampIn .3s cubic-bezier(.2, .8, .3, 1) both;
}
.stamp-covered,
.stamp-pass { color: var(--green); background: var(--green-wash); }
.stamp-problem { color: var(--red-deep); background: var(--red-wash); }
.stamp-partial,
.stamp-warning { color: var(--amber); background: var(--amber-wash); }
.stamp-not-mentioned { color: var(--red); background: var(--red-wash); }
.stamp-review { color: #245b86; background: #d9ebf7; }

/* 可选改句 */
.edit-list { border-top: 1px solid var(--rule); }
.edit-row { padding: 22px 0 20px; border-bottom: 1px solid var(--rule); }
.edit-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}
.edit-tag {
    display: block;
    margin-bottom: 7px;
    color: var(--faint);
    font-size: 10.5px;
    letter-spacing: .12em;
}
.edit-text {
    color: var(--ink);
    font-family: var(--font-doc);
    font-size: 14px;
    line-height: 1.85;
    overflow-wrap: anywhere;
}
.edit-cell.is-suggested .edit-text { color: var(--red-deep); }
.edit-mark {
    justify-self: center;
    padding: 5px 6px 4px;
    border: 1px solid var(--red);
    color: var(--red);
    font-family: var(--font-doc);
    font-size: 12px;
    line-height: 1;
    transform: rotate(-3deg);
}
.edit-reason {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--rule-strong);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}

/* 投递前检查 */
.check-list { list-style: none; border-top: 1px solid var(--rule); }
.check-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
    padding: 19px 0 20px;
    border-bottom: 1px solid var(--rule);
}
.check-row .stamp { margin-top: 3px; }
.check-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; line-height: 1.5; }
.check-message {
    max-width: 74ch;
    margin-top: 6px;
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.8;
}

/* ---------- 第二步：输入方式 ---------- */

.resume-tabs {
    display: flex;
    gap: 26px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--rule);
}
.resume-tab {
    min-height: 42px;
    padding: 0 1px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.resume-tab:hover { color: var(--ink); }
.resume-tab.is-selected { border-bottom-color: var(--red); color: var(--ink); }

.drop-zone {
    position: relative;
    min-height: 240px;
    display: grid;
    place-items: center;
    padding: 32px 22px;
    border: 1px solid var(--rule-strong);
    background:
        linear-gradient(var(--paper), var(--paper)) padding-box;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}
.drop-zone::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 1px dashed var(--rule);
    pointer-events: none;
    transition: border-color .15s ease;
}
.drop-zone:hover { border-color: var(--ink); }
.drop-zone:hover::before { border-color: var(--rule-strong); }
.drop-zone.is-dragging { border-color: var(--red); background: var(--red-wash); }
.drop-zone.is-dragging::before { border-color: var(--red); }
.drop-zone input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.drop-inner { position: relative; display: grid; justify-items: center; gap: 4px; }
.file-glyph {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border: 1px solid var(--rule-strong);
    color: var(--red);
    font-family: var(--font-doc);
    font-size: 24px;
    line-height: 1;
    transition: border-color .15s ease, background .15s ease;
}
.drop-zone:hover .file-glyph { border-color: var(--red); }
.drop-title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.drop-subtitle { color: var(--muted); font-size: 12px; }
.selected-file { margin-top: 14px; min-height: 18px; color: var(--ink-2); font-size: 12px; }
.file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; }

.file-preview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
    margin-top: 24px;
}
.preview-box {
    min-width: 0;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}
.preview-box h3 { margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.preview-text {
    display: block;
    width: 100%;
    min-height: 260px;
    padding: 14px 15px;
    border: 1px solid var(--rule);
    border-radius: 2px;
    background: #fff;
    color: var(--ink-2);
    font-family: var(--font-doc);
    font-size: 12.5px;
    line-height: 1.85;
    resize: vertical;
}
.file-meta-list { display: grid; align-content: start; margin-top: 16px; border-top: 1px solid var(--rule); }
.file-meta-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
}
.file-meta-list dt { color: var(--muted); font-size: 11px; }
.file-meta-list dd { font-size: 12.5px; text-align: right; overflow-wrap: anywhere; }
.notice-line {
    margin: 16px 0;
    padding: 2px 0 2px 12px;
    border-left: 2px solid var(--red);
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
}
.confirm-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}
.confirm-row input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--red); flex: none; }
.confirm-row label { color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }

/* ---------- 页脚 ---------- */

.page-footer {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 18px 48px 40px 82px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 20px;
    color: var(--faint);
    font-size: 11px;
    position: relative;
}
.page-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 82px;
    right: 48px;
    height: 1px;
    background: var(--rule);
}
.footer-brand { color: var(--muted); font-family: var(--font-doc); letter-spacing: .08em; }

/* ---------- 提示 ---------- */

.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    max-width: min(380px, calc(100vw - 48px));
    padding: 12px 16px;
    background: var(--ink);
    color: #f4f4ef;
    font-size: 12.5px;
    line-height: 1.6;
    border-left: 3px solid var(--red);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- 登录 ---------- */

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(20, 25, 22, .55);
    backdrop-filter: blur(3px);
}
.auth-card {
    position: relative;
    width: min(430px, 100%);
    padding: 32px 34px 26px;
    background: var(--paper);
    border: 1px solid var(--rule-strong);
    border-top: 3px solid var(--red);
    box-shadow: 0 34px 80px -30px rgba(20, 25, 22, .55);
    animation: cardIn .32s cubic-bezier(.2, .8, .3, 1) both;
}
.auth-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}
.auth-close:hover { color: var(--ink); }
.auth-seal { width: 30px; height: 30px; font-size: 17px; margin-bottom: 14px; }
.auth-card h2 {
    margin-bottom: 8px;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.3;
}
.auth-intro { max-width: 40ch; color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.auth-tabs { display: flex; gap: 24px; margin: 22px 0 18px; border-bottom: 1px solid var(--rule); }
.auth-tab {
    min-height: 38px;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.auth-tab.is-selected { border-bottom-color: var(--red); color: var(--ink); }
.auth-form label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 700;
}
.auth-form input {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    background: #fff;
    font-size: 14px;
    letter-spacing: .02em;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(190, 58, 40, .09);
}
.code-field { margin-top: 15px; }
.code-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
.code-button {
    min-height: 44px;
    border: 1px solid var(--rule-strong);
    border-radius: 2px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.code-button:hover:not(:disabled) { border-color: var(--red); color: var(--red-deep); background: var(--red-wash); }
.code-button:disabled { cursor: not-allowed; color: var(--faint); border-color: var(--rule); }
.auth-message { min-height: 20px; margin-top: 9px; color: var(--red-deep); font-size: 12px; line-height: 1.55; }
.auth-message.is-success { color: var(--green); }
.auth-submit { width: 100%; margin-top: 8px; }
.auth-footnote {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--rule);
    color: var(--faint);
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}
body.auth-locked { overflow: hidden; }

/* ---------- 动效 ---------- */

@keyframes ruleDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes reveal { from { opacity: 0; } to { opacity: 1; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes stampIn {
    from { opacity: 0; transform: rotate(-1.5deg) scale(1.3); }
    to { opacity: 1; transform: rotate(-1.5deg) scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.proof-row:nth-child(1) .stamp,
.check-row:nth-child(1) .stamp { animation-delay: .04s; }
.proof-row:nth-child(2) .stamp,
.check-row:nth-child(2) .stamp { animation-delay: .09s; }
.proof-row:nth-child(3) .stamp,
.check-row:nth-child(3) .stamp { animation-delay: .14s; }
.proof-row:nth-child(4) .stamp,
.check-row:nth-child(4) .stamp { animation-delay: .19s; }
.proof-row:nth-child(5) .stamp,
.check-row:nth-child(5) .stamp { animation-delay: .24s; }
.check-row:nth-child(6) .stamp { animation-delay: .29s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-delay: 0s !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- 窄屏 ---------- */

@media (max-width: 1000px) {
    .masthead-inner { padding: 0 30px; }
    .steps { margin: 0 -30px; padding: 0 30px; overflow-x: auto; scrollbar-width: thin; }
    .flow-nav { grid-template-columns: repeat(4, minmax(200px, 1fr)); }
    .flow-link { padding-left: 14px; }
    .workspace { padding: 0 30px 0 64px; }
    .workspace::before { left: 30px; }
    .page-footer { padding: 18px 30px 36px 64px; }
    .page-footer::before { left: 64px; right: 30px; }
}

@media (max-width: 760px) {
    .masthead-inner { padding: 0 18px; }
    .masthead-top { flex-wrap: wrap; gap: 12px; padding: 16px 0 14px; }
    .masthead-actions { gap: 2px; }
    .folio { display: none; }
    .steps { margin: 0 -18px; padding: 0 18px; }
    .flow-nav { grid-template-columns: repeat(4, minmax(168px, 1fr)); }
    .flow-link { min-height: 58px; padding: 10px 12px; }
    .flow-copy small { display: none; }
    .flow-state { font-size: 9.5px; }
    .workspace { padding: 0 18px 0 30px; }
    .workspace::before { left: 18px; }
    .page-footer { padding: 16px 18px 30px 30px; }
    .page-footer::before { left: 30px; right: 18px; }
    .flow-step { padding: 22px 0 36px; }
    .view-heading { display: block; padding-bottom: 18px; margin-bottom: 22px; }
    .view-heading h1 { font-size: 29px; letter-spacing: -.03em; }
    .heading-copy { font-size: 13px; }
    .quiet-badge, .step-state { display: inline-block; margin-top: 14px; }
    .sheet, .resume-input-area { padding: 18px 16px 20px; }
    .text-editor { min-height: 220px; padding: 15px 14px; font-size: 14px; }
    .result-shell { margin-top: 28px; }
    .rank-row { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 16px 0 18px; }
    .rank-num { font-size: 22px; }
    .rank-row.is-first .rank-num { font-size: 28px; }
    .rank-keyword { font-size: 21px; }
    .rank-row.is-first .rank-keyword { font-size: 26px; }
    .proof-row { grid-template-columns: 1fr; gap: 10px; padding: 16px 0 18px; }
    .proof-key { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
    .meter-note { text-align: left; }
    .edit-pair { grid-template-columns: 1fr; gap: 14px; }
    .edit-mark { justify-self: start; margin-left: 2px; }
    .check-row { grid-template-columns: 1fr; gap: 8px; }
    .check-row .stamp { margin-top: 0; }
    .file-preview { grid-template-columns: 1fr; }
    .page-actions { gap: 10px; }
    .page-footer { flex-direction: column; }
    .auth-card { padding: 26px 20px 22px; }
    .auth-card h2 { font-size: 23px; }
}

@media (max-width: 420px) {
    .brand-caption { display: none; }
    .masthead-top { padding: 13px 0 11px; }
    .text-button { display: none; }
    .view-heading h1 { font-size: 25px; }
    .meter-score strong { font-size: 28px; }
    .stamp { letter-spacing: .08em; }
}
