/* Shared structure. Skins replace material tokens, never the meaning of controls. */
:root{--collection-width:1180px;--editor-width:850px;--reading-width:1160px;--document-width:1040px;--workspace-gap:24px;--working-surface:var(--paper);--working-field:var(--panel);--working-border:var(--line);--workspace-shadow:0 10px 30px #0002;--control-height:44px}
.collection-workspace{max-width:var(--collection-width);margin:12px auto 40px;padding:28px 32px;background:var(--working-surface);color:var(--ink);border:1px solid var(--working-border);box-shadow:var(--workspace-shadow);border-radius:5px;min-width:0}
.collection-back{display:inline-block;color:var(--blue);font-size:14px;padding:5px 0;border-bottom:1px solid currentColor;margin-bottom:26px}
.collection-masthead{display:grid;grid-template-columns:170px minmax(0,1fr) auto;align-items:center;gap:28px;padding-bottom:30px;border-bottom:1px solid var(--line)}
.collection-heading h1{font-size:clamp(30px,3.5vw,44px);line-height:1.15;margin:7px 0;letter-spacing:-1px}.collection-heading .eyebrow{font-size:12px;letter-spacing:1.2px}.collection-create{display:flex;gap:14px;flex-wrap:wrap;justify-content:end;max-width:340px}.collection-calendar-link{font-size:14px;color:var(--blue);text-decoration:underline;text-underline-offset:4px}
.collection-controls{display:grid;grid-template-columns:minmax(0,1fr) 190px 190px;gap:16px;margin:24px 0}.collection-controls label{display:grid;gap:7px;font-size:13px;font-weight:650;min-width:0}
.collection-controls :is(input,select){width:100%;min-width:0;min-height:44px;padding:10px 12px;font-size:16px;border:1px solid var(--line);border-radius:3px;background:var(--working-field);color:var(--ink)}
.collection-records{min-width:0}.collection-count{font-size:13px;color:var(--muted);margin:0 0 12px}.collection-row{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:22px;align-items:start;padding:24px 0;border-top:1px solid var(--line);min-width:0}
.row-content h2{font:750 21px/1.3 'Public Sans',sans-serif;letter-spacing:-.4px;margin:0 0 7px;overflow-wrap:anywhere}.row-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:14px;color:var(--muted);line-height:1.6}.row-meta>span:not(.record-stamp){flex-basis:100%}.row-meta .record-stamp{font-size:11px}.row-actions{display:flex;flex-wrap:wrap;justify-content:end;gap:12px;max-width:260px;align-self:center}.row-content details,.row-content .related-records{font-size:14px;margin:12px 0 0}.row-content details summary{color:var(--blue);cursor:pointer}.row-content .application-pack{margin-top:12px}.collection-pagination{display:flex;justify-content:center;gap:20px;align-items:center;padding:22px 0 4px;flex-wrap:wrap;font-size:14px}.profile-summary{max-width:720px;padding:28px 0}.profile-summary>h2{margin-bottom:12px}.profile-summary section{margin-top:28px}.profile-summary h3{font-size:16px;margin-bottom:8px}.profile-summary p{white-space:pre-line;line-height:1.7}
/* Substantial, recognisable desk objects. Decoration stays out of the editor. */
.collection-emblem{position:relative;width:170px;height:126px;isolation:isolate;pointer-events:none;--emblem-paper:#f0e6cf;--emblem-ink:#304652}
.emblem-face{display:block;position:absolute;inset:7px 13px;background:var(--emblem-paper);border:1px solid #aaa18c;box-shadow:3px 7px 9px #0004;padding:23px 15px;color:var(--emblem-ink)}
.emblem-face i{display:block;background:currentColor;opacity:.35;height:3px;width:90%;margin:7px 0}.emblem-face i:nth-child(2n){width:65%}.emblem-sheet{position:absolute;inset:8px 12px;background:#e4d8bd;border:1px solid #aaa18c;transform:rotate(-7deg);box-shadow:2px 3px 4px #0003}.emblem-sheet:nth-child(2){transform:rotate(4deg)}
.emblem-paper .emblem-face{transform:rotate(-2deg)}.emblem-paper .emblem-face b{position:absolute;top:10px;left:15px;width:30px;height:5px;background:var(--emblem-ink)}
.emblem-cork{background:var(--cork-seed);background-image:var(--cork-grain);background-size:220px;background-blend-mode:soft-light;border:7px solid var(--chrome2);border-radius:3px;box-shadow:inset 0 2px 4px #0007,0 0 0 1px var(--chrome3),0 1px 0 2px var(--chrome1),2px 5px 7px #0004}
.emblem-cork .emblem-sheet{inset:20px 73px 24px 11px;transform:rotate(-9deg)}.emblem-cork .emblem-sheet:nth-child(2){inset:32px 12px 12px 82px;transform:rotate(7deg)}.emblem-cork .emblem-face{inset:10px 45px auto;background:#f1e9da;height:19px;box-shadow:1px 2px 3px #0003;border:0;padding:0}.emblem-cork i{display:none}.emblem-cork b:before,.emblem-cork b:after{content:'';position:absolute;top:22px;width:9px;height:9px;border-radius:50%;background:radial-gradient(at 30% 20%,#faf8e8,#99a3a3 45%,#48555b);box-shadow:1px 2px 3px #0006}.emblem-cork b:before{left:-13px}.emblem-cork b:after{right:-13px;top:33px}
.emblem-monitor{background:linear-gradient(140deg,var(--chrome1),var(--chrome3));border:4px solid var(--chrome2);border-radius:20px 20px 15px 15px;box-shadow:inset 0 2px 2px #fff7,inset 0 -5px 3px #0005,3px 7px 8px #0005;height:116px;margin-bottom:10px}.emblem-monitor .emblem-sheet{display:none}.emblem-monitor .emblem-face{inset:10px 11px 24px;border:5px solid #35434a;border-radius:8px;padding:4px 9px;box-shadow:inset 2px 3px 7px #0006}.emblem-monitor i{height:3px;margin:6px 0}.emblem-monitor .emblem-face:after{content:'';position:absolute;bottom:-33px;left:28px;width:65px;height:12px;background:var(--chrome3);border-radius:0 0 6px 6px;box-shadow:1px 4px 4px #0005}.emblem-monitor b{position:absolute;right:5px;bottom:-19px;width:5px;height:5px;border-radius:50%;background:#b6cf72}
.emblem-calendar .emblem-sheet{display:none}.emblem-calendar .emblem-face{inset:7px 0 1px;border:5px solid var(--chrome2);border-radius:5px;padding:26px 9px 10px;box-shadow:0 0 0 1px var(--chrome3),2px 4px 0 var(--chrome3),3px 7px 8px #0004;background-color:var(--paper);color:var(--ink)}.emblem-calendar i{position:absolute;top:-14px;width:7px;height:29px;border-radius:6px;background:linear-gradient(90deg,#384b55,#e3e8e9 40%,#677780 72%,#34454e);margin:0;opacity:1;box-shadow:1px 2px 2px #0007}.emblem-calendar i:nth-child(1){left:9%}.emblem-calendar i:nth-child(2){left:24%}.emblem-calendar i:nth-child(3){left:39%}.emblem-calendar i:nth-child(4){left:54%}.emblem-calendar i:nth-child(5){left:69%}.emblem-calendar i:nth-child(6){left:84%}.emblem-calendar b{display:block;width:100%;height:66px;background:repeating-linear-gradient(0deg,transparent 0 15px,var(--line) 15px 16px),repeating-linear-gradient(90deg,transparent 0 19px,var(--line) 19px 20px);border:1px solid var(--line)}.emblem-calendar b:after{content:'';display:block;width:14px;height:14px;background:var(--blue);border-radius:50%;margin:19px 43px}
.emblem-cabinet{border:3px solid var(--chrome2);border-radius:4px;background:var(--chrome3);padding:8px;box-shadow:inset 0 1px 2px #fffa,3px 5px 0 #263740,4px 8px 7px #0005}.emblem-cabinet .emblem-sheet{display:none}.emblem-cabinet .emblem-face{position:relative;inset:auto;display:grid;grid-template-columns:1fr;padding:0;border:0;box-shadow:none;background:transparent;gap:7px}.emblem-cabinet i{height:46px;width:100%;margin:0;opacity:1;background:linear-gradient(var(--chrome2),var(--chrome3));border:1px solid #93a2a8;box-shadow:inset 0 1px #fff5,0 2px 2px #0008;position:relative}.emblem-cabinet i:nth-child(n+3){display:none}.emblem-cabinet i:before{content:'';position:absolute;inset:7px 24px 19px;background:var(--emblem-paper);border:2px solid #879393;box-shadow:inset 0 1px 3px #0005}.emblem-cabinet i:after{content:'';position:absolute;bottom:6px;left:35%;width:30%;height:6px;border-radius:4px;background:linear-gradient(#dee4e2,#6c7a7f);box-shadow:0 2px 3px #0008}
.emblem-poster .emblem-sheet{display:none}.emblem-poster .emblem-face{background:var(--paper);color:var(--ink);inset:7px 5px;transform:rotate(-2deg)}.emblem-poster:before,.emblem-poster:after{content:'';position:absolute;z-index:1;top:0;width:44px;height:19px;background:var(--tape-seed,#c5ae7b);opacity:.8;transform:rotate(-35deg);left:-7px}.emblem-poster:after{left:auto;right:-7px;transform:rotate(35deg)}
.record-token{width:65px;min-height:75px;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:12px;padding:8px;box-shadow:2px 3px 4px #0002;border:1px solid var(--line);background:var(--paper2);color:var(--ink)}.token-note{background:#ead7a9;transform:rotate(-3deg);position:relative}.token-note:before{content:'';position:absolute;top:4px;width:8px;height:8px;border-radius:50%;background:radial-gradient(at 30% 20%,#fff,#879496 65%,#364650);box-shadow:1px 2px 2px #0006}.token-note:after{content:'';width:75%;height:28px;background:repeating-linear-gradient(0deg,transparent 0 8px,#9a805844 8px 10px)}.token-document,.token-screen{background:var(--publication-paper);color:var(--publication-ink)}.token-document{box-shadow:2px 2px 0 var(--paper2),4px 4px 0 var(--line)}.record-token i{width:90%;height:2px;background:currentColor;opacity:.35;margin-top:7px}.token-screen{border:5px solid var(--chrome3);border-radius:7px;min-height:60px}.token-screen b{font-size:7px;overflow:hidden;max-height:22px}.token-date{border-top:8px solid var(--chrome3);text-transform:uppercase}.token-date b{font:750 30px/1.3 Fraunces,serif}.token-file{border-radius:2px 12px 2px 2px}
/* One working surface, one editor shell, one footer, independent of record type. */
body :is(#editor:not([data-kind=prepare]),#letter-editor){width:calc(100% - 32px);max-width:var(--editor-width);max-height:calc(100dvh - 32px);padding:0;overflow:hidden}
body :is(#editor .dialog-frame,#letter-editor .letter-paper){background:var(--working-surface);background-image:none;margin:8px;border:1px solid var(--working-border);border-radius:4px;display:flex;flex-direction:column;max-height:calc(100dvh - 50px)}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header{position:relative;padding:24px 28px;border:0;border-bottom:1px solid var(--line);background:var(--working-surface);flex-shrink:0}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header h2{font-size:28px;line-height:1.25;padding-right:44px;margin:8px 0 0}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header>button{position:absolute;right:22px;top:22px;width:40px;height:40px;min-height:40px}
body :is(#editor-form,#letter-editor form){display:flex;flex-direction:column;min-height:0;flex:1}
body :is(#editor:not([data-kind=prepare]) .dialog-body,#letter-editor .letter-body){padding:26px 28px;overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;max-height:none;background:var(--working-surface)}
body :is(#editor,#letter-editor) .form-field{font-size:14px;font-weight:650;gap:8px;min-width:0}
body :is(#editor,#letter-editor) .form-field :is(input,select,textarea){background:var(--working-field);color:var(--ink);border:1px solid var(--working-border);border-radius:3px;padding:11px 12px;font-size:16px;min-height:44px;width:100%;max-width:100%;line-height:1.5}
body :is(#editor,#letter-editor) .form-field textarea{min-height:140px}.form-grid{gap:22px}.letter-body{display:grid;gap:22px}.letter-body .field-help{margin:8px 0 0}
body :is(#dialog-footer,#letter-editor footer,.document-footer){display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding:18px 28px;border-top:1px solid var(--line);background:var(--working-surface);flex-shrink:0;justify-content:space-between}
.save-feedback{display:flex;gap:12px;align-items:center;flex:1 1 180px;font-size:13px;line-height:1.5;min-width:0;color:var(--muted)}.save-feedback[data-state=error],.save-feedback[data-state=invalid]{flex-basis:100%;background:var(--panel);border-left:4px solid var(--orange);padding:12px;color:var(--ink);font-weight:650}.editor-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:end}.save-feedback [hidden]{display:none!important}
body .ui-button.ui-destructive{--button-face:#913d31;--button-ink:#fff6ef}
body :is(.collection-workspace,#editor,#letter-editor,#document-viewer) .ui-button{min-height:var(--control-height)!important;font-size:14px!important;padding:10px 14px!important;transform:none!important;white-space:normal;line-height:1.35!important;text-align:center;justify-content:center}
body .editor-actions .ui-button{flex:0 1 auto!important}.document-footer{justify-content:flex-end!important}.document-toolbar{flex-shrink:0}
@media(max-width:850px){.collection-masthead{grid-template-columns:145px minmax(0,1fr);gap:22px}.collection-create{grid-column:1/-1;justify-content:start;max-width:none}.collection-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.collection-controls label:first-child{grid-column:1/-1}.collection-row{grid-template-columns:65px minmax(0,1fr);gap:18px}.row-actions{grid-column:2;max-width:none;justify-content:start}.collection-emblem{transform:scale(.85);transform-origin:left center;margin-right:-25px}.row-content .record-stamp{max-width:100%}}
@media(max-width:480px){.collection-workspace{margin:5px auto 22px;padding:20px 16px}.collection-masthead{grid-template-columns:100px minmax(0,1fr);gap:12px;padding-bottom:22px}.collection-emblem{transform:scale(.58);transform-origin:left center;width:170px;height:126px;margin:-25px -70px -25px 0}.collection-heading h1{font-size:27px}.collection-heading .eyebrow{font-size:10px}.collection-controls{gap:12px}.collection-create{gap:12px}.collection-row{grid-template-columns:48px minmax(0,1fr);gap:16px}.record-token{width:46px;min-height:58px;padding:5px}.row-content h2{font-size:18px}.row-actions{grid-column:1/-1;gap:12px}.row-meta{font-size:13px}.row-content .application-pack{overflow-wrap:anywhere}
 body :is(#editor:not([data-kind=prepare]),#letter-editor){width:calc(100% - 12px);max-height:calc(100dvh - 12px)}
 body :is(#editor .dialog-frame,#letter-editor .letter-paper){margin:5px;max-height:calc(100dvh - 24px)}
 body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header{padding:18px 16px}body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header h2{font-size:24px}body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header>button{right:14px;top:17px}
 body :is(#editor:not([data-kind=prepare]) .dialog-body,#letter-editor .letter-body){padding:22px 16px}
 body :is(#dialog-footer,#letter-editor footer,.document-footer){padding:14px 16px;gap:12px}.save-feedback{flex-basis:100%}.editor-actions{width:100%}.form-grid{grid-template-columns:1fr}.form-grid>.full{grid-column:1/-1}
}
:root{--ui-control-face:#465c66;--ui-control-ink:#fff9ef}
:root[data-theme=dark]{--ui-control-face:#405763;--ui-control-ink:#fff9ef}
body :is(#editor,#letter-editor) [aria-invalid=true]{border-color:#bd4a27!important;outline:1px solid #bd4a27}
body [data-letter-preview][hidden]{display:none!important}
.emblem-cabinet .emblem-face i:nth-child(n){width:100%}
.emblem-calendar .emblem-face i:nth-child(n){width:7px}

body #editor[data-kind=prepare]{max-width:var(--reading-width)}
body #document-viewer{max-width:var(--document-width)}
/* Lifecycle controls use the same language and placement in every collection. */
.collection-controls{grid-template-columns:minmax(180px,1.5fr) repeat(3,minmax(120px,1fr))}
.collection-row.is-archived{background:color-mix(in srgb,var(--working-surface) 92%,var(--ink));padding-inline:12px}
.collection-row.is-archived .record-token{filter:saturate(.6)}
.archived-badge{display:inline-block;border:1px solid var(--line);background:var(--paper2);color:var(--ink);font:600 12px/1.5 'Public Sans',sans-serif;letter-spacing:0;padding:2px 7px;border-radius:3px;vertical-align:middle;white-space:nowrap}
.record-options{display:inline-flex;position:relative;margin:0;font-size:14px;max-width:100%}
.record-menu{position:fixed;inset:auto;margin:0;padding:6px;width:210px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;border:1px solid var(--line);border-radius:5px;background:var(--working-surface);color:var(--ink);box-shadow:0 6px 20px #0004;z-index:1000}
.record-menu:popover-open{display:block}
.record-menu [role=separator]{height:1px;background:var(--line);margin:5px 8px}
.record-menu::backdrop{background:transparent}
.editor-header-actions{display:flex;align-items:center;justify-content:end;gap:4px;grid-column:2;grid-row:1}
.editor-header-actions [data-editor-lifecycle]:empty{display:none}
[data-editor-archive-label]:not(:empty){display:block;margin-top:10px}
.choice-group{display:grid;gap:8px;width:100%}.choice-group>span{font-size:13px;font-weight:700;color:var(--muted)}
.archived-choice-group{border-top:1px solid var(--line);padding-top:12px;margin-top:6px}
.choice-group label{flex-wrap:wrap}.choice-group input{flex-shrink:0}
.record-delete-dialog{width:calc(100% - 24px);max-width:600px;max-height:calc(100dvh - 24px);padding:8px;overflow:auto}
.delete-card{background:var(--working-surface);border:1px solid var(--line);padding:24px;color:var(--ink);border-radius:4px}
.delete-card h2{font-size:27px;line-height:1.2;margin-bottom:18px}.delete-card p{font-size:15px;line-height:1.65;overflow-wrap:anywhere}.delete-name{font-weight:750;margin-bottom:12px}.delete-impact{border:1px solid var(--line);padding:16px;margin-top:20px;background:var(--panel)}
.delete-impact h3{font-size:15px}.delete-impact ul{padding-left:20px;max-height:190px;overflow:auto}.delete-impact li{font-size:14px;margin:8px 0;overflow-wrap:anywhere}.delete-impact small{display:block;color:var(--muted)}.delete-actions{display:flex;gap:16px;justify-content:end;margin-top:24px}
[data-delete-feedback]:empty{display:none}[data-delete-feedback]{padding:12px 0;color:var(--ink);font-weight:650}
@media(max-width:850px){.collection-controls{grid-template-columns:repeat(3,minmax(0,1fr))}.collection-controls label:first-child{grid-column:1/-1}}
@media(max-width:600px){.collection-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-controls label:last-child{grid-column:1/-1}.delete-card{padding:20px}.delete-card h2{font-size:24px}.delete-actions>*{flex:1}}

.compact-calendar-actions>button{flex-shrink:0;white-space:nowrap!important}
.job-status-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.job-status-heading>button{font-size:14px;color:var(--blue);min-height:44px;white-space:nowrap}
[data-status-creator]{display:grid;gap:12px;border:1px solid var(--line);padding:16px;background:var(--panel);margin-top:8px;min-width:0}[data-status-creator][hidden]{display:none}[data-status-creator] input{min-width:0;width:100%}.status-creator-actions{display:flex;justify-content:end;gap:12px;flex-wrap:wrap}#job-status-feedback:empty{display:none}#job-status-feedback{font-size:14px;line-height:1.5;color:var(--ink)}

/* Working hierarchy shared by every collection and editor. */
/* Letters share the CV collection's paper motif and the common working editor. */
.letter-body{align-content:start}
.letter-body>.application-selects{margin:0}
.letter-job-section,.letter-job-row,.letter-connections{min-width:0}
[data-letter-jobs]{display:grid;gap:16px}
.letter-job-row{display:flex;gap:12px;align-items:end}
.letter-job-row>.form-field{flex:1;min-width:0}
.letter-job-section>[data-letter-add-job]{margin-top:8px}
.letter-connections,.letter-create-actions{display:flex;flex-wrap:wrap;gap:8px 20px}
.letter-connections:empty,[data-letter-related]:empty,[data-letter-replacements]:empty{display:none}
.letter-replacement{display:flex;align-items:start;gap:10px;padding:12px;border:1px solid var(--working-border);background:var(--working-field);font-size:14px;margin-top:12px}
.letter-replacement input{flex:none;margin-top:4px}
.letter-connections .ui-action{max-width:100%;white-space:normal;text-align:left;overflow-wrap:anywhere}
.letter-body [data-letter-text] textarea{min-height:280px}
@media(max-width:480px){.letter-job-row{align-items:stretch;flex-direction:column}.letter-job-row>[data-letter-remove-job]{align-self:start}}
.collection-back{margin-bottom:14px;min-height:36px;display:inline-flex;align-items:center}
.collection-masthead{grid-template-columns:122px minmax(0,1fr) auto;gap:20px;padding-bottom:20px}
.collection-masthead .collection-emblem{transform:scale(.7);transform-origin:left center;margin:-16px -48px -16px 0}
.collection-create{max-width:260px;gap:12px;align-items:center}
.collection-heading h1{font-size:clamp(28px,3vw,38px)}
.collection-controls{grid-template-columns:minmax(180px,1.2fr) minmax(0,2fr);gap:20px;margin:20px 0}
.collection-controls label{font-size:14px}
.collection-filter-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body .collection-filter-toggle{display:none!important}
.collection-row{grid-template-columns:64px minmax(0,1fr) auto;gap:18px;padding:20px 0}
.row-actions{max-width:none;gap:14px;align-self:start;align-items:center}
body .row-content h2 [data-record-title]{display:inline-flex!important;min-height:44px!important;padding:2px 0!important;font:inherit!important;text-align:left;color:var(--blue)!important;line-height:inherit!important;text-decoration:underline!important;text-decoration-color:color-mix(in srgb,var(--blue) 40%,transparent)!important;text-underline-offset:4px}
body .row-content h2 [data-record-title]:hover{color:var(--blue)!important;background:none!important;text-decoration:underline!important;text-underline-offset:4px}
.row-meta .record-stamp{font-size:12px}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;padding:16px 24px}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header h2{grid-column:1/-1;padding-right:0;margin:4px 0 8px}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header .eyebrow{grid-row:1;grid-column:1;font-size:12px;margin:0}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header .editor-header-actions{grid-row:1;grid-column:2}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header [data-editor-archive-label]{grid-column:1/-1;margin:0}
.prep-purpose{grid-column:1/-1;margin:0!important}
.prep-mode-control{grid-column:1/-1;display:flex;align-items:center;gap:9px;min-height:40px;font-size:14px;cursor:pointer;justify-self:start}
.prep-mode-control input{width:18px;height:18px;accent-color:var(--blue)}
body :is(#dialog-footer,#letter-editor footer){padding:10px 24px;gap:8px 16px;flex-wrap:nowrap}
.save-feedback{flex:1 1 auto;gap:12px;flex-wrap:wrap;font-size:13px}
.editor-actions{flex:0 0 auto;gap:16px}
.save-feedback:is([data-state=error],[data-state=invalid]){background:var(--paper2);border:1px solid var(--orange);border-left-width:4px;padding:12px;flex:1 1 100%;font-size:14px}
body :is(#dialog-footer,#letter-editor footer):has(.save-feedback:is([data-state=error],[data-state=invalid])){flex-wrap:wrap}
body :is(#dialog-footer,#letter-editor footer):has(.save-feedback:is([data-state=error],[data-state=invalid])) .editor-actions{margin-left:auto}
body .document-footer [data-document-close]{margin-right:auto}
body .question-tools .ui-action{min-width:36px;padding:6px!important;justify-content:center;text-decoration:none!important;font-size:18px!important}
/* Printed labels remain readable against cork in either lighting theme. */
.desk-expanded .jobs-content .object-actions{--blue:var(--note-ink);--ink:var(--note-ink);background:var(--note-seed);padding:0 10px;box-shadow:0 1px 2px #0003}
@media(max-width:1000px){.collection-row{grid-template-columns:64px minmax(0,1fr)}.row-actions{grid-column:2;justify-content:start}.collection-masthead{grid-template-columns:108px minmax(0,1fr) auto}.collection-masthead .collection-emblem{transform:scale(.62);margin:-22px -62px -22px 0}.collection-create{grid-column:auto;max-width:210px;justify-content:end}.collection-controls{grid-template-columns:minmax(160px,1fr) minmax(0,2fr)}.collection-controls label:first-child{grid-column:auto}}
@media(max-width:760px){
 .collection-workspace{padding:18px 20px;margin:0 auto 24px}
 .collection-masthead{grid-template-columns:80px minmax(0,1fr);gap:10px 16px;padding-bottom:16px}
 .collection-masthead .collection-emblem{transform:scale(.47);margin:-33px -90px -33px 0}
 .collection-create{grid-column:1/-1;max-width:none;justify-content:start}
 .collection-controls{grid-template-columns:minmax(0,1fr);gap:8px;margin:16px 0 8px}
 body .collection-filter-toggle{display:flex!important;justify-content:space-between;align-items:center;width:100%;gap:14px;padding:5px 0!important;color:var(--blue)!important}
 .collection-filter-toggle>span{white-space:nowrap}
 .collection-filter-toggle small{font-size:12px;text-align:right;color:var(--muted);font-weight:500}
 .collection-filter-fields{display:none;padding:10px 0 16px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .collection-filter-fields[data-open=true]{display:grid}
 .collection-filter-fields>label:last-child{grid-column:1/-1}
 .collection-controls .collection-search{gap:6px}
 .collection-row{gap:8px 14px;padding:16px 0}
 .row-actions{grid-column:1/-1;gap:16px}
 body .row-actions .ui-action{font-size:14px!important}
 .collection-heading h1{font-size:28px}
 .collection-heading .eyebrow{font-size:12px;letter-spacing:.8px}
 .collection-back{margin-bottom:8px;font-size:14px}
}
@media(max-width:480px){
 .collection-filter-fields{grid-template-columns:minmax(0,1fr)}
 .collection-workspace{padding:14px}
 .collection-row{grid-template-columns:46px minmax(0,1fr)}
 .row-content h2{font-size:19px}.row-meta{font-size:14px}
 body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header{padding:10px 14px;gap:0 8px}
 body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header h2{font-size:24px}
 body :is(#dialog-footer,#letter-editor footer){padding:8px 14px;flex-wrap:wrap}
 body :is(#dialog-footer,#letter-editor footer) .editor-actions{width:100%;min-width:0;gap:12px}
 body :is(#dialog-footer,#letter-editor footer) .save-feedback{flex-basis:100%;gap:0 10px}
 body .document-footer{padding:12px 16px;gap:8px 16px}
 .document-footer [data-document-download]{margin-left:auto}
}

.collection-controls,.collection-filter-fields{align-items:start}
#sort-date-help{font-weight:400;margin:0}
#sort-date-help[hidden]{display:none}


.conflict-review{width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
.conflict-review fieldset{min-width:0;margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:6px}
.conflict-review legend{font-weight:750;padding:0 8px;overflow-wrap:anywhere}.conflict-versions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.conflict-versions label{display:flex;align-items:center;gap:8px;min-height:44px;font-weight:700}.conflict-versions input{width:auto;min-height:0}.conflict-versions details{margin-top:12px;overflow-wrap:anywhere;white-space:pre-wrap}.conflict-versions summary{font-weight:650;cursor:pointer}.conflict-versions dt{font-weight:700;margin-top:10px}.conflict-versions dd{margin:4px 0 12px}.conflict-versions dd dl,.conflict-versions ol{padding-left:16px}.conflict-review [data-feedback]{margin-top:16px;font-weight:650}.conflict-review .document-footer{flex-wrap:wrap}.conflict-review .document-scroll{min-height:0;overflow:auto}
@media(max-width:640px){.conflict-versions{grid-template-columns:1fr}.conflict-review fieldset{padding:10px}.conflict-review .document-footer button{flex:1 1 150px}}

.job-status-control{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px;max-width:100%;font-size:14px;font-weight:650}.job-status-control select{width:auto;min-width:0;max-width:100%;min-height:44px;padding:8px 30px 8px 10px;color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:5px;font:inherit;font-size:16px}


/* Header tools and raised footer buttons need room outside their hit boxes. */
.editor-header-actions{gap:12px}
body :is(#editor .dialog-frame,#letter-editor .letter-paper)>header{row-gap:12px}
body :is(#dialog-footer,#letter-editor footer){padding-block:16px}

/* Small screens use one scrolling dialog, so header/status/actions cannot
   reserve most of the viewport or trap the form in a small inner scroller. */
@media(max-width:600px),(max-height:480px){
 body :is(#editor:not([data-kind=prepare]),#letter-editor){overflow:auto;overscroll-behavior:contain}
 body :is(#editor:not([data-kind=prepare]) .dialog-frame,#letter-editor .letter-paper){height:auto;max-height:none;overflow:visible}
 body :is(#editor:not([data-kind=prepare]) #editor-form,#letter-editor form){flex:none}
 body :is(#editor:not([data-kind=prepare]) .dialog-body,#letter-editor .letter-body){flex:none;overflow:visible}
 .cv-editor-layout,.page-editor-layout,.letter-dialog[data-letter-mode=text] .letter-editor-layout{height:auto;min-height:0}
 .cv-edit-fields,.cv-live-preview,.page-edit-fields,.page-live-preview,.letter-dialog[data-letter-mode=text] :is(.letter-edit-fields,.letter-live-preview){max-height:none;overflow:visible}
 .cv-live-preview :is(.document-preview,.document-pdf-stage),.page-live-preview .professional-page,.letter-live-preview :is(.document-preview,.document-pdf-stage){max-height:none}
 .cv-live-preview .document-preview,.page-live-preview .professional-page,.letter-live-preview .document-preview{overflow:visible}
}
@media(max-width:600px){
 body :is(#editor:not([data-kind=prepare]) .dialog-frame,#letter-editor .letter-paper)>header{padding:8px 14px;gap:6px 8px}
 body :is(#editor:not([data-kind=prepare]) .dialog-frame,#letter-editor .letter-paper)>header h2{grid-column:1;grid-row:1;margin:0;font-size:20px;overflow-wrap:anywhere}
 body :is(#editor:not([data-kind=prepare]) .dialog-frame,#letter-editor .letter-paper)>header .eyebrow{display:none}
 body :is(#editor:not([data-kind=prepare]) .dialog-frame,#letter-editor .letter-paper)>header [data-editor-archive-label]:empty{display:none}
 body :is(#editor:not([data-kind=prepare]) #dialog-footer,#letter-editor footer){padding:8px 14px;gap:8px}
 body :is(#editor:not([data-kind=prepare]),#letter-editor) .save-feedback{gap:4px 10px}
 body :is(#editor:not([data-kind=prepare]),#letter-editor) .editor-actions{gap:8px}
}

.publication-review{display:grid;gap:12px}.publication-review>div{display:grid;grid-template-columns:minmax(90px,30%) minmax(0,1fr);gap:12px}.publication-review dt{font-weight:700}.publication-review dd{margin:0;overflow-wrap:anywhere}.publication-dialog .document-footer{flex-wrap:wrap}.publication-dialog input[readonly]{width:100%;min-width:0;box-sizing:border-box}@media(max-width:600px),(max-height:480px){.publication-dialog{overflow:auto}.publication-dialog .document-scroll{flex:none;overflow:visible}.publication-dialog header{padding:12px 16px}.publication-dialog header .eyebrow{display:none}.publication-dialog .document-footer{padding:12px 16px}.publication-dialog .record-view-body{padding:16px}}
