.hr-workspace { --hr-gap: 24px; color: var(--ink); }
.hr-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.hr-toolbar h2 { margin: 0 0 9px; font-size: 23px; letter-spacing: -.03em; }
.hr-muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.hr-toolbar .hr-muted { margin: 0; }
.hr-draft-tools, .hr-scenarios, .hr-export-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hr-draft-tools { justify-content: flex-end; flex-shrink: 0; }
.hr-draft-tools .button { min-height: 36px; padding: 7px 11px; font-size: 12px; }
.hr-scenarios { margin-bottom: 20px; }
.hr-scenarios .button { border-radius: 7px; }
.hr-scenarios .button[aria-pressed="true"] { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.hr-template-library { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 24px; }
.hr-template-library > summary { padding: 16px 18px; cursor: pointer; font-size: 14px; font-weight: 650; }
.hr-template-library > summary span { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 12px; }
.hr-template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; padding: 0 10px 12px; }
.hr-template-option { display: flex; gap: 9px; align-items: flex-start; padding: 12px 9px; border-radius: 7px; cursor: pointer; }
.hr-template-option:has(input:checked) { background: var(--green-soft); }
.hr-template-option input { width: 16px; height: 16px; flex: 0 0 16px; margin: 3px 0 0; accent-color: var(--green); }
.hr-template-option strong { display: block; font-size: 13px; line-height: 1.6; font-weight: 600; }
.hr-template-option small { display: block; color: var(--muted); font-size: 11px; line-height: 1.55; margin-top: 4px; }
.hr-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .95fr); align-items: start; gap: var(--hr-gap); }
.hr-section-heading { margin: 0 0 16px; }
.hr-section-heading h3, .hr-preview-heading h3 { font-size: 15px; margin: 0 0 5px; }
.hr-field-group { border-bottom: 1px solid var(--line); padding: 0 0 12px; margin: 0 0 14px; }
.hr-field-group summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; font-size: 14px; font-weight: 600; }
.hr-field-group summary::after { content: '+'; font-size: 17px; color: var(--muted); font-weight: 400; }
.hr-field-group[open] summary::after { content: '−'; }
.hr-field-group summary small { margin-left: auto; color: var(--muted); font-size: 11px; font-weight: 400; }
.hr-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 14px; padding: 12px 0; }
.hr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.hr-field > span { color: var(--ink); font-size: 12px; line-height: 1.5; }
.hr-field > span small { margin-left: 6px; font-weight: 400; font-size: 10px; color: var(--muted); }
.hr-field > small { font-size: 11px; line-height: 1.5; color: var(--muted); }
.hr-field input, .hr-field select, .hr-field textarea, .hr-preview-heading select { width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; color: var(--ink); padding: 9px 10px; min-height: 40px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; }
.hr-field textarea { resize: vertical; line-height: 1.65; }
.hr-field-wide { grid-column: 1 / -1; }
.hr-required { color: var(--amber); }
.hr-company-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; }
.hr-company-tools .button { min-height: 32px; font-size: 11px; padding: 6px 9px; }
.hr-company-tools span { display: block; width: 100%; color: var(--muted); font-size: 11px; line-height: 1.6; }
.hr-preview-panel { min-width: 0; position: sticky; top: 20px; }
.hr-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hr-preview-heading label { min-width: 0; max-width: 70%; }
.hr-preview-heading select { min-height: 36px; padding: 7px; font-size: 12px; }
.hr-preview-panel > .hr-muted { margin: 8px 0 12px; font-size: 11px; }
[data-hr-preview] { background: #f0f1ee; border: 1px solid var(--line); border-radius: 8px; padding: 15px; max-height: 65vh; min-height: 320px; overflow: auto; }
.hr-paper { padding: 30px 26px; background: white; color: #222; box-shadow: 0 1px 6px #0000000a; font-family: 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.hr-paper .hr-paper-company { text-align: right; font-size: 9px; color: #5e6f66; margin-bottom: 22px; }
.hr-paper h3 { text-align: center; font-size: 20px; line-height: 1.6; font-weight: 650; margin: 0 0 25px; }
.hr-paper h4 { font-size: 12px; margin: 18px 0 7px; }
.hr-paper p { white-space: pre-wrap; margin: 8px 0; }
.hr-paper .hr-signature { margin: 25px 0 14px; }
.hr-preview-table table { border-collapse: collapse; width: 100%; font-size: 10px; margin: 12px 0; }
.hr-preview-table td { border: 1px solid #d9d9d9; padding: 7px; white-space: pre-wrap; vertical-align: top; }
.hr-preview-table table:has(colgroup) { table-layout: fixed; }
.hr-preview-table table:has(colgroup) td:first-child { color: #333; background: #f7f7f5; }
.hr-export-bar { padding: 14px 0 0; }
.hr-export-buttons .button { flex: 1 0 auto; font-size: 12px; padding: 8px 10px; }
.hr-export-buttons [hidden] { display: none; }
[data-hr-export-status] { font-size: 12px; color: var(--muted); min-height: 18px; margin: 8px 0 0; }
.hr-error { border: 1px solid var(--amber); background: var(--amber-soft); color: var(--ink); border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; font-size: 12px; line-height: 1.8; }
.hr-error[hidden] { display: none; }
.hr-error ul { padding-left: 20px; margin: 5px 0 0; columns: 2; }
.hr-error li { break-inside: avoid; }
.hr-bottom-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; margin-top: 22px; border-top: 1px solid var(--line); }
.hr-workspace input:focus-visible, .hr-workspace textarea:focus-visible, .hr-workspace select:focus-visible, .hr-workspace summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 1150px) { .hr-toolbar { flex-direction: column; gap: 14px; } .hr-draft-tools { justify-content: flex-start; } .hr-template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hr-columns { gap: 18px; grid-template-columns: minmax(0,1fr) minmax(300px,.9fr); } .hr-fields-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 850px) { .hr-columns { grid-template-columns: minmax(0, 1fr); } .hr-preview-panel { position: static; } .hr-fields-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } [data-hr-preview] { max-height: 540px; } .hr-error ul { columns: 1; } }
@media (max-width: 540px) { .hr-toolbar h2 { font-size: 21px; } .hr-template-grid, .hr-fields-grid { grid-template-columns: minmax(0, 1fr); } .hr-bottom-tools { align-items: flex-start; flex-direction: column; } .hr-paper { padding: 24px 18px; } [data-hr-preview] { padding: 9px; } .hr-preview-heading { align-items: flex-start; flex-direction: column; } .hr-preview-heading label { max-width: 100%; width: 100%; } .hr-scenarios .button { font-size: 12px; padding: 8px 10px; } }

.hr-workspace .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.hr-paper-logo { display: block; width: 122px; height: auto; max-height: 55px; object-fit: contain; object-position: left center; margin-bottom: 14px; }
