.email-studio{max-width:1500px;margin:auto}.email-studio .section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.email-studio .form-row>label:last-child{flex:1;min-width:220px}.email-studio input[name=subject]{width:100%}
.email-design-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.email-source{min-width:0}.email-source textarea{width:100%;box-sizing:border-box;font:12px/1.6 ui-monospace,monospace;resize:vertical;margin:8px 0}.email-source textarea[name=html]{min-height:380px}.email-insert-toolbar,.email-variable-list{display:flex;gap:6px;flex-wrap:wrap}.email-variable-list button{font:11px ui-monospace,monospace}.email-source .muted{font-size:12px;line-height:1.6;margin:12px 0}
.email-attachments{border:1px solid var(--border);border-radius:12px;padding:16px;margin-top:16px}.email-attachments label{display:flex;align-items:center;gap:8px;margin:8px 0}.email-attachments small{display:block;line-height:1.5}
.email-live{position:sticky;top:0;border:1px solid var(--border);border-radius:16px;background:var(--theme-panel);color:var(--theme-panel-ink);padding:16px;min-width:0}.email-live header{display:flex;align-items:center;justify-content:space-between;gap:8px}.email-live h3{font-size:17px}.email-live p{margin:12px 0;overflow-wrap:anywhere}.email-live small{line-height:1.5}.email-preview-canvas{overflow:auto;padding:10px;background:#e4e8eb;border-radius:12px;min-width:0}.email-preview-canvas iframe{display:block;width:100%;height:550px;border:0;background:#fff;color-scheme:light}.email-preview-canvas.mobile iframe{max-width:360px;margin:auto}.email-studio-footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 0;border-top:1px solid var(--border);margin-top:20px}.email-send{margin:24px 0}.email-send form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.email-send input{min-width:260px}
.companion-panel>[data-companion-email]{margin:4px 16px;text-align:left}.supplier-file-history{margin-top:32px}.supplier-file-history small{display:block}.supplier-correction-dialog{width:min(1200px,96vw);max-width:96vw;max-height:94dvh;box-sizing:border-box;background:var(--theme-surface);color:var(--theme-surface-ink);border:1px solid var(--border);border-radius:18px;padding:20px}.supplier-correction-dialog::backdrop{background:#0009}.supplier-correction-dialog header,.supplier-correction-dialog footer{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:16px}.supplier-correction-dialog footer{margin:16px 0 0;flex-wrap:wrap}.supplier-correction-table{max-height:50dvh;overflow:auto;border:1px solid var(--border);margin:16px 0}.supplier-correction-table table{border-collapse:collapse;font-size:12px}.supplier-correction-table th{position:sticky;top:0;background:var(--theme-header);color:var(--theme-header-ink);padding:8px}.supplier-correction-table td{border:1px solid var(--border);padding:4px;min-width:160px}.supplier-correction-table input{width:100%;min-width:140px;box-sizing:border-box}.supplier-cell-issue{background:var(--theme-warning);color:var(--theme-warning-ink)}.supplier-issue-tag{font-size:10px;font-weight:bold}.supplier-cell-edited{outline:2px solid var(--green)}[data-correction-issues]{max-height:100px;overflow:auto;font-size:12px}[data-correction-issues] p{margin:6px 0}
.email-notifications{margin:20px 0;padding:18px;border:1px solid var(--border);border-radius:14px}.email-notifications form{display:grid;gap:12px;margin-top:14px}.email-notifications label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px}.email-notifications input[type=checkbox]{width:auto!important;margin:0;flex:none}.email-notifications input[name=recipients]{width:100%}.email-notifications button{justify-self:start}
@media(max-width:900px){.email-design-grid{grid-template-columns:1fr}.email-live{position:static}.email-preview-canvas iframe{height:450px}.email-studio .section-heading{align-items:start;flex-wrap:wrap}.email-studio .form-row>label{width:100%}.supplier-correction-dialog{padding:12px}}
.email-metadata{display:grid;grid-template-columns:minmax(160px,1fr) minmax(200px,2fr);gap:20px;margin:24px 0}.email-metadata input{width:100%;box-sizing:border-box}.email-preview-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.email-preview-controls label:last-child{grid-column:1/-1}.email-preview-controls select{max-width:100%;width:100%}.email-live header label{min-width:100px}.email-source details{border-top:1px solid var(--border);padding:16px 0;margin-top:12px}.email-source summary,.email-starters summary{cursor:pointer;font-weight:600}.email-starter-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:16px 0}.email-starter-grid button{text-align:left;padding:16px}.email-starter-grid small{display:block;line-height:1.5;margin-top:8px;font-weight:normal}.email-custom-variable{display:flex;align-items:center;gap:8px;padding:8px 0}.email-custom-variable small{flex:1;overflow-wrap:anywhere}.email-document{padding:10px;border-radius:10px;background:var(--theme-panel)}.email-document input{width:auto!important;flex:none}.email-document small{font-weight:normal;margin-top:4px}.email-document.unavailable{opacity:.72}.email-studio h4{display:flex;align-items:center;gap:12px;flex-wrap:wrap}@media(max-width:650px){.email-metadata,.email-preview-controls{grid-template-columns:1fr}.email-custom-variable{flex-wrap:wrap}}

.email-insert-toolbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.email-action-choice{border:1px solid var(--line);border-radius:10px;padding:12px;display:grid;gap:8px;align-content:start}.email-action-choice small{line-height:1.5;color:var(--muted)}
.file-review-page{padding:24px;max-width:none}.file-review-page .review-findings{display:flex;flex-wrap:wrap;gap:12px}.review-finding{border:1px solid var(--line);border-radius:10px;padding:12px;max-width:460px}

.review-finding strong,.review-finding small{display:block;margin-bottom:6px}.file-review-page>p{margin:12px 0}

/* Keep descriptions available on demand and give the email most of the space. */
.email-studio .section-heading h2{font-size:20px;margin:0}.email-metadata{margin:12px 0;gap:12px}.email-studio>.form-row{margin:12px 0}.email-source .email-action-choice{padding:8px 10px;margin:0;border:1px solid var(--border);border-radius:8px;flex:1 1 160px}.email-action-choice summary{font-size:12px}.email-action-choice p{font-size:12px;line-height:1.5}.email-action-choice button{font-size:12px}.email-live{height:var(--preview-height,calc(100dvh - 280px));max-height:calc(100dvh - 24px);min-height:280px;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:12px;overflow:hidden}.email-live header{flex:none}.email-live h3{margin:0;font-size:14px}.email-live header label{display:flex;align-items:center;gap:6px;font-size:11px;min-width:0}.email-live header select{padding:5px;width:auto}.email-preview-controls{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr) minmax(0,1fr);gap:8px;margin:0;flex:none}.email-preview-controls label:last-child{grid-column:auto}.email-preview-controls label{font-size:11px;min-width:0}.email-preview-controls select{padding:6px;font-size:12px;margin-top:4px;min-width:0}.email-live p{margin:0;font-size:12px;line-height:1.4}.email-live [data-email-preview-subject]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:none}.email-preview-canvas{flex:1;min-height:0;padding:4px;overflow:hidden}.email-preview-canvas iframe{height:100%;min-height:0}.email-live [data-email-preview-status]{max-height:54px;overflow:auto;flex:none}.email-live [data-email-preview-status]:empty{display:none}.email-preview-note{font-size:11px;flex:none;max-height:90px;overflow:auto}.email-preview-note summary{cursor:pointer}.email-preview-note small{font-size:11px}@media(max-width:900px){.email-live{height:65dvh;min-height:360px;max-height:calc(100dvh - 24px)}.email-preview-canvas iframe{height:100%}}

/* One compact command row; source and preview start together near the top. */
.email-studio{max-width:none}.email-studio-tools{display:flex;gap:8px;align-items:end;flex-wrap:wrap;margin:0 0 10px}.email-studio-tools>label{min-width:200px}.email-studio-tools>label select{width:100%;margin-top:3px}.email-studio-tools button{padding:7px 10px;font-size:12px}.email-studio-tools .email-starters{margin:0;position:relative}.email-studio-tools .email-starters>summary{padding:8px;border:1px solid var(--border);border-radius:7px;font-size:12px}.email-studio-tools .email-starter-grid{position:absolute;left:0;top:100%;z-index:8;min-width:330px;max-height:65vh;overflow:auto;display:grid;background:var(--theme-panel);border:1px solid var(--border);padding:12px;margin:0;box-shadow:0 8px 20px #0004}.email-studio-tools .email-starters:not([open])>.email-starter-grid{display:none}.email-studio .email-metadata{margin:0 0 8px;display:block;max-width:420px}.email-studio .email-metadata label{display:flex;align-items:center;gap:8px;font-size:12px}.email-studio .email-metadata input{padding:6px;flex:1;min-width:0}.email-design-grid{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:16px}.email-source>label{font-size:12px}.email-source>label input{padding:7px;margin:4px 0 8px}.email-source-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.email-source-heading label{font-size:12px}.email-source-heading button{font-size:11px;padding:4px 8px}.email-code-stack{position:relative;isolation:isolate;height:clamp(360px,58dvh,800px);min-width:0;border:1px solid var(--border);border-radius:8px;background:var(--theme-input);overflow:hidden}.email-source .email-code-stack :is(textarea,pre){position:absolute;inset:0;box-sizing:border-box;margin:0!important;padding:10px!important;border:0!important;font:12px/1.65 ui-monospace,monospace!important;letter-spacing:normal;tab-size:2;white-space:pre!important;overflow:auto;resize:none;min-height:0!important;height:100%;width:100%;border-radius:0}.email-html-colors{pointer-events:none;background:transparent;color:var(--theme-input-ink);z-index:0;max-height:none}.email-source .email-code-stack textarea{background:transparent!important;color:transparent!important;-webkit-text-fill-color:transparent;caret-color:var(--theme-input-ink);z-index:1}.email-code-stack textarea::selection{background:#88b9ff66}.email-syntax-tag{color:var(--theme-syntax-field)}.email-syntax-attribute{color:var(--theme-syntax-action)}.email-syntax-string{color:var(--theme-syntax-string)}.email-syntax-variable{color:var(--theme-syntax-logic);font-weight:600}.email-syntax-comment{color:var(--theme-input-muted);font-style:italic}.email-tag-match{background:#77bbff26;outline:1px solid var(--theme-accent);border-radius:2px}.email-code-stack.email-composing textarea{color:var(--theme-input-ink)!important;-webkit-text-fill-color:var(--theme-input-ink);background:var(--theme-input)!important}.email-code-stack.email-composing .email-html-colors{visibility:hidden}.email-live{border-radius:10px}.email-live .email-preview-controls{gap:6px}.email-studio-footer{margin-top:10px;padding:10px 0}.email-source details{padding:10px 0;margin-top:8px}.email-source .email-variable-list{max-height:140px;overflow:auto}
@media(max-width:900px){.email-design-grid{grid-template-columns:1fr}.email-studio-tools{gap:6px}.email-studio-tools>label{flex:1;min-width:160px}.email-live{height:70dvh}.email-studio-tools .email-starter-grid{position:fixed;inset:20% 12px auto;min-width:0}.email-code-stack{height:55dvh}}
@media(forced-colors:active){.email-source .email-code-stack textarea{color:CanvasText!important;-webkit-text-fill-color:CanvasText;background:Canvas!important}.email-html-colors{display:none}}
.email-behavior-dialog{width:min(1100px,95vw);max-width:1100px;max-height:90vh;overflow:hidden}.email-behavior-tools,.email-behavior-card-heading{display:flex;align-items:center;gap:12px}.email-behavior-tools{margin:12px 0}.email-behavior-tools label{min-width:220px}.email-behavior-cards{overflow:auto;min-height:160px;max-height:52vh;padding:2px 8px 8px 0}.email-behavior-card{border:1px solid var(--border);border-radius:10px;padding:14px;margin-bottom:12px}.email-behavior-card-heading>label:first-child{flex:1}.email-behavior-card-heading input[type=checkbox]{width:auto}.email-behavior-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}.email-behavior-dialog label{display:flex;flex-direction:column;gap:4px}.email-behavior-dialog label.inline{flex-direction:row;align-items:center}.email-behavior-dialog footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.email-severity-help{font-size:.88rem;margin-top:10px}.email-severity-help p{max-width:90ch}@media(max-width:650px){.email-behavior-fields{grid-template-columns:1fr}.email-behavior-dialog{max-height:95vh}.email-behavior-tools{flex-wrap:wrap}.email-behavior-cards{max-height:50vh}}
