/* Shared page finish: one hierarchy, readable records and deliberate controls. */
:root { --page-heading:#20384b; --page-rule:#dce4eb; --page-muted:#586b7c; }
:root[data-theme=dark] { --page-heading:#e5edf4; --page-rule:#354959; --page-muted:#aabcc9; }
#view h2,#view h3,#view .card-title { color:var(--page-heading); }
#view h2 { letter-spacing:-.025em; line-height:1.3; }
#view h3 { letter-spacing:-.015em; line-height:1.4; }
#view .card-head { padding-bottom:4px; }
#view .list-toolbar,#view .report-toolbar { gap:12px; margin-bottom:20px; }
#view .table th { background:var(--surface-2); color:var(--page-muted); font-size:11px; letter-spacing:.045em; line-height:1.5; border-bottom:1px solid var(--page-rule); }
#view .table td { line-height:1.55; }
#view .table tbody tr:last-child td { border-bottom:0; }
#view .field { gap:7px; font-size:12px; font-weight:500; color:var(--text-2); }
#view .field input,#view .field select,#view .field textarea { border-radius:8px; border-color:var(--border-strong); background:var(--surface); color:var(--text); }
#view .field input:focus,#view .field select:focus,#view .field textarea:focus { outline:2px solid color-mix(in srgb,var(--brand) 55%,transparent); outline-offset:2px; border-color:var(--brand-600); }
.btn:disabled,.icon-btn:disabled { cursor:not-allowed; }
.btn:focus-visible,.icon-btn:focus-visible,.nav-item:focus-visible,.mobile-nav-item:focus-visible,[role=button]:focus-visible { outline:2px solid var(--brand-600); outline-offset:3px; }
#view .table-tools { border-top:1px solid var(--page-rule); padding-top:14px; }
#view .badge { font-size:11px; font-weight:600; line-height:1.5; }
#view .empty-state-inline { border:1px dashed var(--border-strong); border-radius:10px; background:var(--surface-2); padding:24px; }
@media(hover:hover) and (pointer:fine) {
 #view .table tbody tr:hover td { background:color-mix(in srgb,var(--brand) 5%,var(--surface)); }
}
@media(prefers-reduced-motion:no-preference) {
 .nav-item:active { transform:translateX(2px); }
 .priority-card { transition:transform 140ms cubic-bezier(.2,0,0,1),border-color 160ms ease; }
 .priority-card:active { transform:scale(.99); border-color:var(--brand); }
}
@media(max-width:900px) {
 #view h2 { font-size:22px; } #view h3 { font-size:16px; }
 #view .list-toolbar,#view .report-toolbar { gap:10px; margin-bottom:16px; }
 #view .field { font-size:13px; }
 #view .table td { line-height:1.6; }
 #view .empty-state-inline { padding:20px 16px; }
}
#view .workflow-console-head h2,#view .landing-hero h2 { color:#f5f7fa; }

/* Full-width message reading; analysis only occupies space when present. */
.reply-analysis-layout.message-only { display:block; }
.mail-reader-content { width:100%; max-width:900px; box-sizing:border-box; padding:28px clamp(20px,2.5vw,40px) 36px; }
.mail-body { min-width:0; max-width:100%; font-size:14px; line-height:1.75; color:var(--text); white-space:pre-wrap; overflow-wrap:break-word; }
.mail-correspondent { flex-wrap:wrap; row-gap:10px; }
.mail-correspondent>div { flex:1; min-width:120px; }
.mail-correspondent small { white-space:normal; overflow-wrap:anywhere; }
.mail-correspondent time { white-space:normal; line-height:1.5; }
.mail-reader-content h2 { overflow-wrap:anywhere; font-size:clamp(20px,1.8vw,27px); }
@media(max-width:1500px) { .mail-reader .reply-analysis-layout.has-analysis { grid-template-columns:minmax(0,1fr); } }
@media(max-width:900px) { .drawer .mail-reader-content { padding:16px 0 28px; }.mail-body{font-size:15px;line-height:1.7} }

.mail-html-body{display:block;width:100%;height:640px;min-height:420px;border:0;background:#fff;margin:16px 0;color-scheme:light}
@media(max-width:900px){.mail-html-body{height:65dvh;min-height:420px}}
