.history-workspace{max-width:1320px;color:var(--ink)}
.history-tabs{display:flex;flex-wrap:wrap;gap:8px 24px;border-bottom:1px solid var(--line);margin:0 0 24px}
.history-tabs a{padding:12px 0;color:#677b73;border-bottom:3px solid transparent;font-weight:600;text-decoration:none}
.history-tabs a.active{color:var(--teal);border-bottom-color:var(--teal)}
.history-summary{display:flex;flex-wrap:wrap;gap:14px 40px;padding:4px 0 20px}
.history-summary>div{display:flex;align-items:baseline;gap:10px}
.history-summary strong{font-size:27px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.8px}
.history-summary span{color:#687c72;font-size:12px}
.history-note{font-size:12px;line-height:1.8;color:#5a7468;background:#ecf2ec;border-left:3px solid #8aab94;padding:12px 16px;margin:0 0 22px}
.history-filters{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 18px}
.history-filters input,.history-filters select{margin:0;min-height:40px;background:white;font-size:12px;width:auto;max-width:100%}
.history-filters input{flex:1;min-width:210px}
.history-filters select{min-width:140px}
.history-table-wrap{overflow-x:auto;background:white;border:1px solid var(--line);border-radius:9px}
.history-table{min-width:760px;width:100%;font-size:12px}
.history-table th{font-size:11px;letter-spacing:0;padding:13px 18px}
.history-table td{padding:17px 18px;max-width:340px;vertical-align:top;overflow-wrap:anywhere;line-height:1.6}
.history-table td:first-child{padding-left:20px}
.history-table tr:last-child td{border-bottom:0}
.history-table td>a{font-size:13px;font-weight:600}
.history-sub{display:block;font-size:11px;line-height:1.7;color:#738279;font-weight:400;white-space:pre-wrap;overflow-wrap:anywhere}
.history-amount{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:600}
.history-badge{display:inline-block;background:#edf1ec;color:#5c7067;border:1px solid #e0e7de;font-size:11px;line-height:1.5;padding:4px 9px;border-radius:5px;white-space:nowrap}
.history-badge.complete{background:#e8f2e9;color:#356b49;border-color:#d7e6d7}
.history-badge.review{background:#fff3e3;color:#895c29;border-color:#f0dfc7}
.history-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 0}
.history-pagination>div{display:flex;gap:8px}
.history-pagination button{min-height:34px;font-size:12px;padding:7px 13px}
.history-record-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:0 0 24px}
.history-record-heading h2{font-size:25px;line-height:1.35;letter-spacing:-.6px;margin:12px 0 8px;overflow-wrap:anywhere}
.history-record-heading>h2{margin-top:15px}
.history-record-heading a{font-size:12px}
.history-record-status{display:flex;flex-wrap:wrap;gap:8px;padding-top:14px}
.history-block{background:white;border:1px solid var(--line);border-radius:8px;padding:21px 24px;margin:0 0 20px;min-width:0}
.history-block>h2{font-size:15px;font-weight:650;margin:0 0 20px}
.history-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px 30px;margin:0 0 18px}
.history-fields:last-child{margin-bottom:0}
.history-fields dt{font-size:11px;color:#75867c;line-height:1.6;margin-bottom:5px}
.history-fields dd{font-size:13px;margin:0;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.history-parties{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.history-party .history-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px}
.history-party a{font-size:12px}
.history-lines{min-width:680px}
.history-lines td:first-child{width:43%}
.history-lines td:nth-child(2){width:28%}
.history-lines+small,.history-table-wrap+.history-sub{margin-top:12px}
.history-review{border-left:3px solid #d7af73;background:#fff8ec;padding:16px 20px;margin:0 0 20px;color:#785729}
.history-review h3{font-size:13px;margin:0 0 7px}
.history-review ul{font-size:12px;line-height:1.9;margin:0;padding-left:17px}
.history-source,.history-raw,.history-draft{border:1px solid var(--line);border-radius:7px;background:white;margin:0 0 14px;padding:15px 20px}
.history-source>summary,.history-raw>summary,.history-draft>summary{cursor:pointer;color:var(--teal);font-size:12px;font-weight:600;line-height:1.8;overflow-wrap:anywhere}
.history-source[open]>summary,.history-raw[open]>summary,.history-draft[open]>summary{margin-bottom:15px}
.history-source .history-raw{margin-top:12px;background:#fafbf9}
.history-raw pre{margin:0;max-height:400px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px;line-height:1.8;color:#4c6559}
.history-empty{padding:44px 24px;text-align:center;background:white;border:1px solid var(--line);border-radius:8px;color:#738579}
.history-empty h2{font-size:17px;color:var(--ink)}
.history-empty p{font-size:12px;margin:0;line-height:1.8}
.history-recontact-intro h2{font-size:22px;letter-spacing:-.4px}
.history-recontact-intro>p:not(.history-note){font-size:12px;color:#687e71;line-height:1.9;max-width:72ch}
.history-recontact-card{border:1px solid var(--line);background:white;border-radius:9px;padding:23px 25px;margin:0 0 22px}
.history-recontact-card>summary{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;cursor:pointer;list-style:none}
.history-recontact-card>summary::-webkit-details-marker{display:none}
.history-recontact-card>summary:before{content:'＋';color:var(--teal);font-size:18px;line-height:1.5}
.history-recontact-card[open]>summary{margin-bottom:22px}
.history-recontact-card[open]>summary:before{content:'−'}
.history-contact-name{flex:1;min-width:0}
.history-contact-name>strong{display:block;font-size:16px;line-height:1.5;margin:0 0 5px;overflow-wrap:anywhere}
.history-recontact-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:26px 0 18px}
.history-group-heading{font-size:16px;margin:0}
.history-recontact-heading button{font-size:11px;min-height:34px;padding:7px 12px}
.history-recontact-card .history-block{background:#fafcf9;padding:17px 19px;margin-bottom:16px}
.history-recontact-card .history-block>h2{margin-bottom:12px;font-size:13px}
.history-evidence{margin:0;padding-left:19px;line-height:1.8;font-size:12px}
.history-evidence li+li{margin-top:12px}
.history-evidence a{font-weight:600}
.history-letter{font:inherit;font-size:13px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere;max-width:76ch;margin:0;color:#294d3d}
.history-draft .history-fields{padding-top:8px}
.history-draft .history-block:last-child{margin-bottom:0}
.history-workspace .error{white-space:pre-wrap;line-height:1.9}
@media(max-width:900px){.history-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.history-parties{grid-template-columns:1fr}.history-summary{gap:12px 28px}.history-summary strong{font-size:24px}.history-summary span{font-size:11px}}
@media(max-width:600px){.history-tabs{gap:7px 18px;margin-bottom:20px}.history-tabs a{font-size:12px;padding:10px 0}.history-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 20px;padding-bottom:16px}.history-summary>div{gap:7px;flex-wrap:wrap}.history-summary strong{font-size:23px}.history-filters{gap:8px}.history-filters input{flex-basis:100%;width:100%;min-width:0}.history-filters select{min-width:0;flex:1;font-size:11px}.history-filters button{font-size:11px;min-height:38px;padding:8px 12px}.history-note{padding:10px 12px;font-size:11px;margin-bottom:18px}.history-block{padding:18px 16px;margin-bottom:15px}.history-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 18px}.history-fields dd{font-size:12px}.history-fields dt{font-size:10px}.history-record-heading{gap:12px;flex-wrap:wrap;margin-bottom:18px}.history-record-heading h2{font-size:21px}.history-record-status{padding-top:0}.history-pagination{align-items:flex-start;gap:10px}.history-pagination .history-sub{font-size:10px}.history-pagination button{padding:6px 9px;font-size:11px;min-height:32px}.history-parties{gap:0}.history-review{padding:13px 16px}.history-source,.history-raw,.history-draft{padding:13px 14px}.history-recontact-card{padding:18px 15px}.history-recontact-card>header{gap:10px}.history-recontact-card>header h3{font-size:15px}.history-recontact-card .history-block{padding:15px 13px}.history-letter{font-size:12px}.history-recontact-intro h2{font-size:20px}.history-empty{padding:32px 18px}}
@media(prefers-reduced-motion:reduce){.history-workspace *{scroll-behavior:auto;transition:none}}
