/* The cover letter workspace follows the shared pale panels, raised heading
   blocks and compact blue actions used by the citation and data workspaces. */
body.cover-letter-view .workspace,
body.cover-letter-view #data-check-screen,
body.cover-letter-view #citation-screen{display:none!important}
body.cover-letter-view #cover-letter-panel:not([hidden]){display:block}
body.cover-letter-view .sidebar :is(.conversion-space-tools,#new-project,#selfcheck-new-project,.history-heading,.history-list,.selfcheck-history-heading,.selfcheck-history-list){display:none!important}
body.cover-letter-view #cover-letter-nav{background:#e9eefc;color:#244eb7;font-weight:750}
.cover-letter-panel{min-height:calc(100vh - 78px);background:#fff;color:#243956}
.cover-letter-panel[hidden],.cover-letter-panel [hidden]{display:none!important}
.cl-shell{width:min(1100px,100%);margin:0 auto;padding:28px 40px 48px;box-sizing:border-box}
.cl-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}
.cl-heading-row{display:flex;align-items:center;gap:14px}
.cl-heading-mark{display:block;flex:none;width:6px;height:58px;border-radius:4px;background:#2455df;box-shadow:0 5px 12px rgb(36 85 223 / .18)}
.cl-title{display:flex;align-items:center;gap:12px;margin:0;color:#294364;font-size:25px;line-height:1.25;letter-spacing:-.04em}
.cl-title-block{display:inline-grid;place-items:center;min-height:45px;padding:5px 12px;border-radius:10px;font-weight:800;box-shadow:5px 5px 0 var(--cl-block-edge),0 10px 18px rgb(42 64 96 / .08),inset 0 1px 0 rgb(255 255 255 / .92)}
.cl-title-block[data-tone="blue"]{background:#edf3ff;color:#3159a4;--cl-block-edge:#c5d5f2}
.cl-title-block[data-tone="green"]{background:#eaf7ef;color:#2d7450;--cl-block-edge:#b9dfc5}
.cl-heading-subtitle{margin:10px 0 0 20px;color:#5573a9;font-size:11px;font-weight:750;letter-spacing:.14em}
.cl-status{margin:0 0 16px;padding:10px 13px;border-radius:9px;background:#eff5fc;color:#45627f;font-size:12px;line-height:1.6}
.cl-status:empty{display:none}
.cl-status[data-tone="error"]{background:#fff2f2;color:#a4404f}
.cl-status[data-tone="success"]{background:#edf8f0;color:#2d7851}
.cl-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.06fr);align-items:start;gap:22px}
.cl-form,.cl-form-controls{min-width:0;margin:0;padding:0;border:0}
.cl-form-controls{display:grid;gap:16px}
.cl-card{min-width:0;padding:18px;border:0;border-radius:18px;background:#eef2fa;box-shadow:0 10px 26px rgb(42 64 96 / .055),inset 0 1px 0 rgb(255 255 255 / .45)}
.cl-preview-header h2{margin:0;color:#31527f;font-size:14px;font-weight:750}
.cl-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0 0 13px}
.cl-field:last-child{margin-bottom:0}
.cl-field-caption{color:#425b7d;font-size:12px;font-weight:650}
.cl-required{color:#647fab;font-size:11px}
.cl-input{box-sizing:border-box;width:100%;min-width:0;min-height:36px;margin:0;padding:7px 10px;border:1px solid #d7e1ef;border-radius:8px;background:#fff;color:#2f496b;font-family:inherit;font-size:12px;font-weight:400;line-height:1.6;transition:border-color .15s,box-shadow .15s}
textarea.cl-input{resize:vertical;min-height:65px}
/* A compact writing area keeps the form balanced with the letter preview. */
.cl-input.cl-abstract{height:174px}
.cl-date-field{max-width:200px}
.cl-input::placeholder{color:#97a5b8;font-weight:400}
.cl-input:focus{border-color:#7c9bd8;outline:2px solid rgb(124 155 216 / .17);outline-offset:1px}
.cl-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cl-field-grid.cl-journal-grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:12px}
.cl-field-grid>.cl-field{margin-bottom:13px}
.cl-name-group{min-width:0}
.cl-name-caption-row{display:flex;align-items:center;gap:10px;min-height:19px}
.cl-name-caption-row>.cl-field-caption{white-space:nowrap}
.cl-name-caption-row .cl-phd-option{align-items:center;gap:5px;flex:none;font-size:10px;line-height:1.4}
.cl-name-caption-row .cl-phd-option input{width:12px;height:12px;margin:0}
.cl-field-hint{margin:0;color:#7a8ba3;font-size:10px;font-weight:400;line-height:1.6}
.cl-details{margin-top:16px;padding-top:13px;border-top:1px solid #d9e2f0}
.cl-details summary{color:#526c8f;font-size:11px;font-weight:650;line-height:1.5;cursor:pointer}
.cl-details-body{padding-top:16px}
.cl-checkbox{display:flex;align-items:flex-start;gap:9px;color:#526682;font-size:11px;line-height:1.6;cursor:pointer}
.cl-checkbox input{width:14px;height:14px;flex:none;margin:2px 0 0;accent-color:#3159a4}
.cl-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;margin:0;padding:8px 12px;border:0;border-radius:9px;background:#fff;color:#425b7d;font:inherit;font-size:12px;font-weight:650;line-height:1.4;white-space:nowrap;cursor:pointer;transition:background .15s,box-shadow .15s}
.cl-button-quiet{background:#eef2fa;color:#536b8d}
.cl-button-quiet:hover:not(:disabled){background:#e4ecfa;color:#315ac2}
.cl-button-primary{background:#2455df;color:#fff;box-shadow:0 7px 17px rgb(36 85 223 / .14)}
.cl-button-primary:hover:not(:disabled){background:#1742bd;box-shadow:0 8px 18px rgb(36 85 223 / .22)}
.cl-generate{justify-content:space-between;width:100%;min-height:40px;margin-top:16px;padding:10px 14px;font-size:13px}
.cl-generate>span:last-child{font-size:18px;line-height:1}
.cl-button:disabled{cursor:default;opacity:.58;box-shadow:none}
.cl-button-primary:disabled{background:#dce5f8;color:#7b90b3;opacity:1}
.cl-form-controls:disabled .cl-checkbox{cursor:default}
.cl-preview{position:sticky;top:22px;min-width:0;padding:18px;border-radius:18px;background:#eef2fa;box-shadow:0 10px 26px rgb(42 64 96 / .055),inset 0 1px 0 rgb(255 255 255 / .45)}
.cl-preview-header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cl-preview-state{padding:5px 8px;border-radius:6px;background:#e3eaf5;color:#7a8ba4;font-size:10px;white-space:nowrap}
.cl-preview-state[data-state="ready"]{background:#e1eee6;color:#49745b}
.cl-preview-state[data-state="stale"]{background:#fff1d8;color:#93682d}
.cl-preview-hint{margin:8px 0 14px;color:#8190a5;font-size:10px;line-height:1.7}
.cl-paper{position:relative;min-height:480px;background:#fff;box-shadow:0 5px 18px rgb(41 61 92 / .055);border-radius:3px}
.cl-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:480px;padding:27px;text-align:center}
.cl-empty-sheet{width:106px;min-height:136px;padding:18px 15px;margin:0 0 24px;border:1px solid #e0e7f2;border-radius:2px;background:#fff;box-shadow:5px 6px 0 #f1f5fb;transform:rotate(-4deg);text-align:left}
.cl-empty-sheet span{display:block;margin-bottom:18px;color:#8193ae;font-family:Georgia,'Times New Roman',serif;font-size:9px}
.cl-empty-sheet i{display:block;height:3px;width:100%;margin-bottom:8px;background:#e9eef6}
.cl-empty-sheet i:nth-child(3){width:83%}
.cl-empty-sheet i:nth-child(4){margin-top:14px}
.cl-empty-sheet i:last-child{width:57%}
.cl-empty>strong{color:#6d829f;font-size:13px;font-weight:650}
.cl-empty>p{margin:10px 0 0;color:#99a6b8;font-size:11px;line-height:1.9;white-space:pre-line}
.cl-letter{display:block;box-sizing:border-box;width:100%;height:480px;min-height:420px;max-height:75vh;margin:0;padding:29px 27px;resize:vertical;border:1px solid transparent;border-radius:3px;outline:0;background:#fff;color:#303d50;font-family:Georgia,'Times New Roman',serif;font-size:14px;font-weight:400;line-height:1.75;tab-size:4}
.cl-letter:focus{border-color:#a9bddf;box-shadow:0 0 0 2px rgb(124 155 216 / .1)}
.cl-letter[data-style="formal"]{font-family:'Times New Roman',Georgia,serif}
.cl-letter:read-only{color:#6d7d94}
.cl-preview-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:9px;margin-top:13px}
.cl-word-count{color:#8a9aaf;font-size:10px;font-variant-numeric:tabular-nums;white-space:nowrap}
.cl-preview-actions{display:flex;align-items:center;gap:8px;margin-left:auto}
.cl-preview-actions .cl-button-quiet{background:#fff}
.cl-draft-note{margin:13px 0 0;color:#8c9ab0;font-size:10px;line-height:1.7}
.cl-draft-note.is-stale{padding:9px 11px;border-radius:7px;background:#fff7e9;color:#916a36}
/* Keep the established preview spacing while removing its introductory copy. */
#cover-letter-panel .cl-preview-hint,
#cover-letter-panel .cl-empty>strong,
#cover-letter-panel .cl-empty>p,
#cover-letter-panel .cl-draft-note:not(.is-stale){visibility:hidden}
.cl-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 36px));max-width:none;max-height:calc(100dvh - 48px);overflow:auto;padding:24px;border:1px solid #d7e1ed;border-radius:17px;background:#fff;color:#243956;box-shadow:0 26px 90px rgb(17 39 72 / .22)}
.cl-dialog::backdrop{background:rgb(20 36 61 / .48);backdrop-filter:blur(3px)}
.cl-dialog h2{margin:0;color:#294362;font-size:19px;line-height:1.4}
.cl-dialog-copy{margin:13px 0 18px;color:#71839c;font-size:12px;line-height:1.8}
.cl-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}
.cl-confirm-dialog{width:min(420px,calc(100vw - 36px))}
.cover-letter-panel button:focus-visible,.cl-details summary:focus-visible{outline:3px solid #88a5db;outline-offset:3px}
.cl-title:focus,.cl-preview-header h2:focus{outline:none}

@media (min-width:1500px){.cl-shell{padding-top:34px}.cl-letter,.cl-paper,.cl-empty{min-height:540px}.cl-letter{height:540px}}
@media (max-width:1150px){.cl-shell{padding:28px 26px 45px}.cl-layout{gap:18px}.cl-card,.cl-preview{padding:17px}.cl-field-grid{grid-template-columns:1fr;gap:0}.cl-letter{padding:27px 23px}}
@media (max-width:900px){.cl-layout{grid-template-columns:1fr}.cl-preview{position:static}.cl-field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cl-letter{height:580px;max-height:none}.cl-paper,.cl-empty{min-height:430px}.cl-preview{scroll-margin-top:24px}}
@media (max-width:600px){.cl-shell{padding:24px 16px 36px}.cl-heading{gap:10px}.cl-heading-row{gap:10px}.cl-heading-mark{width:4px;height:45px}.cl-title{gap:9px;font-size:20px}.cl-title-block{min-height:38px;padding:4px 9px;border-radius:8px;box-shadow:4px 4px 0 var(--cl-block-edge),0 7px 13px rgb(42 64 96 / .07)}.cl-heading-subtitle{margin-left:14px;font-size:10px}.cl-heading>.cl-button{min-height:34px;padding:8px 10px;font-size:10px}.cl-card,.cl-preview{padding:16px;border-radius:16px}.cl-preview-header h2{font-size:13px}.cl-field-grid{grid-template-columns:1fr;gap:0}.cl-input{font-size:16px;min-height:42px}.cl-field-caption{font-size:11px}.cl-letter{padding:26px 21px;font-size:14px;min-height:480px;height:600px}.cl-empty{min-height:370px;padding:24px}.cl-paper{min-height:370px}.cl-preview-actions{gap:6px}.cl-preview-actions .cl-button{padding:9px 11px;font-size:11px}.cl-dialog{padding:20px}.cl-dialog-actions{flex-wrap:wrap}}
@media (prefers-reduced-motion:reduce){.cover-letter-panel *{scroll-behavior:auto!important;transition:none!important}}
@media (max-width:600px){.cl-field-grid.cl-journal-grid{grid-template-columns:1fr;gap:0}}
