/* Source: style.css */
:root {
  color-scheme: light;
  --page: #f6f7f9;
  --surface: #fff;
  --surface-soft: #edf2fc;
  --surface-quiet: #f8f9fb;
  --ink: #20252f;
  --muted: #526176;
  --faint: #66748a;
  --line: #e8ebef;
  --line-strong: #d5dce6;
  --blue: #3159c7;
  --blue-deep: #3159c7;
  --blue-soft: #edf2fc;
  --amber: #95601c;
  --amber-soft: #fff4de;
  --red: #ac3c37;
  --red-soft: #fcefeb;
  --shadow: 0 16px 60px #24375620, 0 2px 8px #24375608;
  --sidebar-width: 196px;
  --list-width: 400px;
  --workspace-top: 160px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html { font-size: 17px; }
body { min-height: 100vh; margin: 0; color: var(--ink); background: var(--page); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-weight: 400; line-height: 1.55; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; transition: transform 120ms var(--ease-out), background-color 120ms ease, color 120ms ease; }
button:not(:disabled):active { transform: scale(.97); }
button:disabled { opacity: .46; cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #3159c74d; outline-offset: 3px; }
a { color: var(--blue); }
svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: 10px 16px; transform: translateY(-160%); border-radius: 8px; color: #fff; background: var(--blue); }
.skip-link:focus { transform: none; }
.app-shell { min-height: 100vh; }
.desktop-sidebar { position: fixed; z-index: 25; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 26px 14px 20px; border-right: 1px solid var(--line); background: var(--page); }
.sidebar-brand { display: flex; align-items: center; gap: 9px; margin: 0 4px 44px; color: var(--ink); font-size: 1.02rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; color: var(--blue); background: #e8eefb; }
.brand-mark svg { width: 21px; height: 21px; }
.sidebar-brand small { display: block; margin-top: 2px; color: var(--faint); font-size: .57rem; letter-spacing: .13em; }
.nav-section-label { margin: 0 11px 10px; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .05em; }
.sidebar-nav { display: grid; gap: 6px; }
.sidebar-nav-button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 10px 12px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; text-align: left; font-size: .87rem; font-weight: 550; }
.sidebar-nav-button.active { color: var(--blue); background: #e9eef9; font-weight: 650; }
.sidebar-nav-button svg { width: 18px; height: 18px; }
.sidebar-note { display: flex; align-items: flex-start; gap: 8px; margin: auto 10px 26px; color: var(--faint); }
.sidebar-note p { margin: 0; font-size: .73rem; line-height: 1.8; }
.keyboard-hint { display: block; margin-top: 14px; font-size: .65rem; white-space: nowrap; }
.keyboard-hint kbd { padding: 1px 3px; border: 1px solid #dce2eb; border-radius: 3px; font: inherit; }
.subtle-dot { width: 5px; height: 5px; flex: 0 0 5px; margin-top: 9px; border-radius: 50%; background: #8799b4; }
.sidebar-settings { font-size: .82rem; }
.topbar { position: relative; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 80px; margin-left: var(--sidebar-width); padding: 18px 24px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mobile-brand-mark { display: none; }
.brand-name { margin: 0; font-size: .89rem; font-weight: 650; letter-spacing: -.01em; }
.agent-status { overflow: hidden; margin: 2px 0 0; color: var(--muted); font-size: .72rem; font-weight: 450; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { position: relative; display: flex; align-items: center; gap: 12px; }
.sync-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); font-size: .79rem; font-weight: 600; white-space: nowrap; }
.sync-button svg { width: 17px; height: 17px; }
.sync-button.is-syncing svg { animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-button, .back-button, .close-button, .avatar-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; }
.avatar-button { width: 44px; height: 44px; flex-basis: 44px; color: #536176; background: #e6ebf2; font-size: .7rem; font-weight: 750; }
.close-button { font-size: 1.5rem; line-height: 1; }
.account-menu { position: absolute; z-index: 40; top: calc(100% + 12px); right: 0; width: min(340px, calc(100vw - 28px)); max-height: calc(100dvh - 100px); overflow-y: auto; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); transform-origin: top right; }
.account-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 15px; font-size: .85rem; }
.account-menu-heading strong { color: var(--muted); font-weight: 550; }
.notification-strip { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notification-copy p { margin: 0; font-size: .85rem; font-weight: 600; }
.notification-copy span { display: block; margin-top: 5px; color: var(--muted); font-size: .77rem; line-height: 1.6; }
.notification-actions { display: flex; gap: 8px; margin-top: 14px; }
.notification-choice { flex: 1; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: .82rem; font-weight: 600; }
.notification-choice.active { color: var(--blue); border-color: #ccd8f5; background: var(--blue-soft); }
.logout-button { width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 8px; border: 0; border-radius: 8px; color: var(--red); background: transparent; text-align: left; font-size: .85rem; }
.warning-panel { margin-top: 14px; padding: 12px; border-radius: 8px; color: #815014; background: var(--amber-soft); font-size: .75rem; overflow-wrap: anywhere; }
.warning-panel ul { margin: 6px 0 0; padding-left: 18px; }
.app-shell > main { margin-left: var(--sidebar-width); padding: 0 24px; }
.greeting-section { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 80px; padding-bottom: 18px; }
.greeting-copy { min-width: 0; }
.greeting-section h1 { margin: 0; font-size: 1.3rem; font-weight: 680; line-height: 1.25; letter-spacing: -.025em; }
.greeting-note { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }
.today-label { margin: 0; color: var(--faint); font-size: .74rem; white-space: nowrap; }
.mail-workspace { position: fixed; top: var(--workspace-top); right: 24px; bottom: 24px; left: calc(var(--sidebar-width) + 24px); display: grid; grid-template-columns: var(--list-width) minmax(0, 1fr); gap: 16px; min-height: 0; }
.inbox-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.inbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 18px 12px; }
.inbox-heading h2 { margin: 0; font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.sync-note { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: .67rem; white-space: nowrap; }
.sync-dot { width: 5px; height: 5px; border-radius: 50%; background: #7c9689; }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 14px 9px; padding-left: 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--faint); background: var(--surface-quiet); }
.search-field:focus-within { border-color: #a8bce9; box-shadow: 0 0 0 3px #3159c713; }
.search-field > svg { width: 17px; height: 17px; }
.search-field input { min-width: 0; min-height: 42px; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: .78rem; }
.search-field input:focus { border: 0; box-shadow: none; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 44px; min-height: 44px; flex: 0 0 44px; padding: 0; border: 0; border-radius: 6px; color: var(--faint); background: transparent; font-size: 1.2rem; }
.filters { display: flex; gap: 1px; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: 1 0 auto; min-height: 44px; padding: 9px 7px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); background: transparent; font-size: .77rem; font-weight: 500; white-space: nowrap; }
.filter.active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 650; }
.filter span { margin-left: 2px; font-size: .66rem; font-variant-numeric: tabular-nums; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 45px; padding: 4px 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fcfcfd; }
.result-count { color: var(--faint); font-size: .7rem; }
.attachment-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font-size: .71rem; }
.attachment-filter svg { width: 14px; height: 14px; }
.attachment-filter[aria-pressed="true"] { color: var(--blue); border-color: #cfdaf2; background: var(--blue-soft); }
.email-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cfd6e0 transparent; }
.email-row { position: relative; }
.email-row + .email-row { border-top: 1px solid #edf0f4; }
.email-button { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px 9px; align-items: start; width: 100%; min-height: 142px; padding: 16px 15px; border: 0; border-radius: 0; background: transparent; text-align: left; }
.email-button:not(:disabled):active { transform: none; background: var(--blue-soft); }
.email-button:focus-visible { z-index: 1; outline-offset: -3px; }
.email-button.is-selected, .email-row.is-selected .email-button, .email-button[aria-current="true"], .email-button[aria-selected="true"] { background: #edf2fc; }
.email-button.is-selected::before, .email-row.is-selected .email-button::before, .email-button[aria-current="true"]::before, .email-button[aria-selected="true"]::before { content: ""; position: absolute; top: 14px; bottom: 14px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.sender-avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; color: #596a82; background: #edf0f5; font-size: .65rem; font-weight: 700; }
.email-copy { display: block; min-width: 0; }
.email-sender { display: block; max-width: 100%; overflow: hidden; margin: 1px 0 6px; color: var(--ink); font-size: .81rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.email-subject { display: block; overflow-wrap: anywhere; font-size: .94rem; font-weight: 600; line-height: 1.43; }
.email-summary { display: -webkit-box; overflow: hidden; margin-top: 7px; color: var(--muted); font-size: .78rem; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.email-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.email-time { color: var(--faint); font-size: .66rem; font-weight: 450; font-variant-numeric: tabular-nums; white-space: nowrap; }
.priority-label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .67rem; font-weight: 500; white-space: nowrap; }
.priority-dot { width: 5px; height: 5px; border-radius: 50%; background: #8193ad; }
.priority-dot.priority-urgent, .priority-dot.priority-error { background: var(--red); }
.priority-dot.priority-high { background: #bb863d; }
.priority-dot.priority-low { background: var(--faint); }
.email-badges, .email-labels { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.attachment-badge, .model-badge { display: inline-flex; align-items: center; margin: 4px 4px 0 0; padding: 2px 6px; border-radius: 5px; color: var(--muted); background: #f0f3f8; font-size: .62rem; font-weight: 550; line-height: 1.6; white-space: nowrap; vertical-align: 1px; }
.attachment-badge { color: #48658d; background: #edf2fa; }
.model-badge.model-luna { color: #59667c; background: #f0f2f6; }
.model-badge.model-sol { color: #8b672f; background: #fbf3e5; }
.model-badge.model-astra { color: #625a91; background: #f0edf9; }
.model-history-label { display: inline-block; color: var(--faint); font-size: .62rem; font-weight: 450; white-space: nowrap; }
.empty-state { padding: 54px 20px; color: var(--muted); text-align: center; font-size: .86rem; }
.empty-state p { margin: 14px 0 0; }
.reader-placeholder { display: grid; align-items: center; min-width: 0; padding: 36px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); text-align: center; }
.reader-placeholder-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 15px; border-radius: 20px; color: #9baac0; background: #f6f8fb; }
.reader-placeholder-icon svg { width: 42px; height: 42px; stroke-width: 1.2; }
.reader-placeholder h2 { margin: 0; font-size: 1.08rem; font-weight: 600; letter-spacing: -.02em; }
.reader-placeholder p { margin: 12px 0 0; color: var(--muted); font-size: .83rem; line-height: 1.8; }
.reader-placeholder small { display: block; margin-top: 38px; color: var(--faint); font-size: .74rem; }
.mobile-nav { display: none; }

/* Reading is a parallel workspace on desktop, a focused full-screen task on mobile. */
dialog { width: min(760px, calc(100% - 32px)); max-width: none; max-height: 90dvh; padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
dialog::backdrop { background: #1f29375c; }
#detailDialog { position: fixed; z-index: 22; inset: var(--workspace-top) 24px 24px calc(var(--sidebar-width) + var(--list-width) + 40px); width: auto; height: auto; max-height: none; margin: 0; border-radius: 13px; box-shadow: none; overflow: hidden; }
.dialog-shell { height: 100%; max-height: 100%; padding: 0 28px 36px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #cfd6e0 transparent; }
.dialog-header { position: sticky; z-index: 5; top: 0; display: flex; align-items: center; gap: 6px; min-height: 62px; margin: 0 -28px 24px; padding: 8px 17px; border-bottom: 1px solid #edf0f4; background: #fffffff5; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.dialog-header .back-button { display: none; }
.dialog-kicker { color: var(--faint); font-size: .75rem; font-weight: 600; }
.reader-navigation { display: flex; align-items: center; gap: 1px; margin-left: auto; }
#detailPosition { margin-right: 7px; color: var(--faint); font-size: .7rem; font-variant-numeric: tabular-nums; }
.reader-navigation .icon-button { width: 44px; flex-basis: 44px; }
.reader-navigation .icon-button svg { width: 17px; height: 17px; }
.dialog-title { padding: 0; }
.detail-eyebrow { display: flex; align-items: center; gap: 10px; }
.detail-reading-label { color: var(--faint); font-size: .71rem; }
.dialog-title h2 { margin: 12px 0 10px; overflow-wrap: anywhere; font-size: clamp(1.35rem, 1.9vw, 1.85rem); font-weight: 660; letter-spacing: -.025em; line-height: 1.3; }
.dialog-title .muted { margin: 0; font-size: .8rem; line-height: 1.7; overflow-wrap: anywhere; }
.quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 21px; }
.quick-actions button { min-height: 42px; font-size: .77rem; }
.detail-work-status { margin: 12px 0 0; color: var(--blue); font-size: .8rem; }
.detail-work-status:empty { display: none; }
.primary-button, .secondary-button, .send-button, .quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 8px; font-size: .85rem; font-weight: 600; line-height: 1.4; }
.primary-button, .send-button { color: #fff; background: var(--blue); }
.primary-button svg, .send-button svg { width: 17px; height: 17px; }
.secondary-button { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.quiet-button { color: var(--muted); background: transparent; }
.full-width-button { width: 100%; margin-top: 12px; }
.attachment-entry { display: grid; grid-template-columns: 38px minmax(0, 1fr) 20px; align-items: center; gap: 11px; margin-top: 22px; padding: 13px; border: 1px solid #dce5f7; border-radius: 10px; color: var(--ink); background: #f5f8fe; text-decoration: none; }
.attachment-entry-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; color: var(--blue); background: #e6edfb; }
.attachment-entry strong, .attachment-entry small { display: block; }
.attachment-entry strong { font-size: .88rem; font-weight: 650; }
.attachment-entry small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.attachment-entry > svg { width: 17px; color: var(--blue); }
.priority-pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 5px; font-size: .69rem; font-weight: 650; }
.priority-urgent, .priority-error { color: #a13c36; background: var(--red-soft); }
.priority-high { color: #8b611f; background: var(--amber-soft); }
.priority-normal { color: #526c96; background: var(--blue-soft); }
.priority-low { color: var(--muted); background: #f0f2f5; }
.analysis-summary { margin-top: 25px; padding: 20px; border: 1px solid #e5ebf5; border-radius: 11px; background: #f6f8fd; }
.analysis-summary h3, .analysis-section h3 { margin: 0 0 10px; color: #3e5373; font-size: .84rem; font-weight: 650; }
.analysis-summary p, .analysis-section p, .analysis-section ul { margin: 0; line-height: 1.85; }
.analysis-summary p { font-size: 1rem; font-weight: 450; }
.analysis-grid { display: grid; grid-template-columns: 1fr; margin-top: 10px; }
.analysis-section { padding: 22px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.analysis-section ul { padding-left: 1.25em; }
.analysis-section li + li { margin-top: 9px; }
.analysis-section small { color: var(--muted); font-size: .84rem; }
.analysis-context { margin-top: 16px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; }
.analysis-context > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; color: var(--muted); cursor: pointer; font-size: .8rem; font-weight: 550; list-style: none; }
.analysis-context > summary::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.analysis-context[open] > summary::before { transform: rotate(45deg); }
.analysis-context > summary::-webkit-details-marker { display: none; }
.analysis-context .analysis-section { padding: 16px 0; font-size: .88rem; }
.analysis-context .analysis-section:last-child { border-bottom: 0; }
.next-step h3 { color: var(--blue); }
.reanalyze-button { margin-top: 14px; }
.model-options, .source-details { margin-top: 18px; border: 1px solid var(--line); border-radius: 9px; }
.model-options > summary, .source-details > summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 14px; color: var(--muted); cursor: pointer; font-size: .8rem; font-weight: 550; list-style: none; }
.model-options > summary::before, .source-details > summary::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(-45deg); }
.model-options[open] > summary::before, .source-details[open] > summary::before { transform: rotate(45deg); }
.model-options > summary::-webkit-details-marker, .source-details > summary::-webkit-details-marker { display: none; }
.summary-helper { margin-left: auto; color: var(--faint); font-size: .69rem; }
.model-routing-card { padding: 2px 14px 16px; }
.model-routing-heading, .model-routing-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.model-routing-heading strong, .model-routing-heading small { display: block; }
.model-routing-heading strong { font-size: .84rem; font-weight: 650; }
.model-routing-heading small { margin-top: 4px; color: var(--muted); font-size: .76rem; }
.resolved-model-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font-size: .72rem; font-weight: 650; }
.resolved-model-badge.model-sol { color: #8b672f; background: #fbf3e5; }
.resolved-model-badge.model-astra { color: #625a91; background: #f0edf9; }
.resolved-model-badge.model-luna { color: #59667c; background: #f0f2f6; }
.model-routing-note { margin: 11px 0 0; color: var(--muted); font-size: .74rem; line-height: 1.75; overflow-wrap: anywhere; }
.model-routing-warning { padding: 10px; border-radius: 7px; color: #815014; background: var(--amber-soft); }
.attachment-preflight { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--surface-quiet); overflow-wrap: anywhere; }
.attachment-preflight strong { display: block; font-size: .78rem; font-weight: 650; }
.attachment-preflight p { margin: 5px 0 0; color: var(--muted); font-size: .74rem; }
.attachment-preflight p:empty { display: none; }
.attachment-preflight small { display: block; margin-top: 7px; color: var(--faint); font-size: .71rem; line-height: 1.7; }
.model-segmented { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 13px; padding: 4px; border-radius: 9px; background: var(--page); }
.model-segmented button { min-height: 44px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 600; }
.model-segmented button.active { border-color: var(--line); color: var(--blue); background: var(--surface); box-shadow: 0 1px 3px #23345308; }
.model-routing-footer { align-items: flex-end; margin-top: 14px; }
.model-routing-footer span { color: var(--faint); font-size: .7rem; }
.model-routing-footer button { flex: 0 0 auto; min-height: 44px; padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); font-size: .74rem; font-weight: 550; }
.source-details pre { max-height: 380px; overflow: auto; margin: 0; padding: 0 16px 18px; color: var(--muted); font: .86rem/1.8 -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-workspace { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-strong); scroll-margin-top: 76px; }
.draft-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 14px; }
.section-kicker { margin: 0 0 4px; color: var(--faint); font-size: .71rem; font-weight: 550; letter-spacing: .025em; }
.draft-heading h3 { margin: 0; font-size: 1.1rem; font-weight: 650; }
.draft-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--page); }
.draft-tab { min-height: 44px; padding: 8px 11px; border: 1px solid transparent; border-radius: 6px; color: var(--muted); background: transparent; font-size: .77rem; font-weight: 550; }
.draft-tab.active { border-color: var(--line); color: var(--blue); background: var(--surface); }
.draft-local-note { margin: 0 0 14px; color: #6a7486; font-size: .74rem; }
.draft-local-note:empty { display: none; }
.draft-workspace label { display: block; margin: 14px 0 7px; color: var(--muted); font-size: .77rem; font-weight: 600; }
input, textarea { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px; outline: none; color: var(--ink); background: var(--surface); font-size: .95rem; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #77849a; opacity: 1; }
input:focus, textarea:focus { border-color: #8da8e5; box-shadow: 0 0 0 3px #3159c714; }
textarea { resize: vertical; line-height: 1.8; }
.muted { color: var(--muted); font-size: .8rem; line-height: 1.7; }
.copy-draft-button { margin-top: 12px; }
.rewrite-card { margin-top: 22px; padding: 16px; border-radius: 10px; background: var(--surface-quiet); }
.rewrite-card label { margin: 0 0 10px; font-size: .83rem; font-weight: 600; }
.rewrite-row { display: flex; gap: 8px; }
.rewrite-row input { flex: 1; min-width: 0; font-size: .86rem; }
.rewrite-row button { flex: 0 0 auto; font-size: .78rem; }
.rewrite-note { margin: 9px 0 0; color: var(--faint); font-size: .72rem; }
.send-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.send-row .muted { flex: 1 1 200px; margin: 0; font-size: .74rem; }
.draft-workspace #emailDraftPanel.hidden ~ .send-row { display: none; }
.send-button { flex: 0 0 auto; }
.inline-error { margin: 14px; padding: 14px; border: 1px solid #f1d5cb; border-radius: 9px; color: #8d493b; background: #fff5f0; font-size: .8rem; }
.inline-error p { margin: 0 0 12px; }
.inline-error h2 { margin: 0 0 12px; font-size: 1.1rem; }
.inline-error .secondary-button { min-height: 40px; font-size: .76rem; }
.detail-loading { padding: 55px 10px; color: var(--muted); text-align: center; }
.detail-loading h2 { margin: 20px 0 8px; font-size: 1.08rem; font-weight: 600; }
.detail-loading p { font-size: .83rem; }
.detail-error { margin: 30px 0; }
.loading-indicator { display: inline-block; width: 22px; height: 22px; border: 2px solid #dce4f1; border-top-color: var(--blue); border-radius: 50%; animation: spin 700ms linear infinite; }
.agent-dialog { width: min(670px, calc(100% - 32px)); }
.agent-dialog-shell { padding: 26px; }
.agent-dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.agent-dialog-heading h2 { margin: 0; font-size: 1.5rem; font-weight: 650; letter-spacing: -.025em; }
.agent-dialog-heading .close-button { margin: -8px -10px 0 0; }
.agent-intro { margin: 16px 0 22px; color: var(--muted); font-size: .87rem; }
.agent-composer { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.agent-composer:focus-within { border-color: #8da8e5; box-shadow: 0 0 0 3px #3159c714; }
.agent-composer input { flex: 1; min-width: 0; padding: 9px 6px; border: 0; border-radius: 0; box-shadow: none; font-size: .92rem; }
.agent-composer input:focus { box-shadow: none; }
.agent-composer .primary-button { flex: 0 0 auto; min-height: 44px; font-size: .8rem; }
.chat-answer { margin-top: 20px; padding: 20px; border-radius: 10px; background: var(--surface-quiet); font-size: .96rem; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.agent-disclaimer { margin: 18px 0 0; color: var(--faint); font-size: .73rem; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: min(440px, calc(100% - 32px)); padding: 14px 18px; border: 1px solid #ffffff24; border-radius: 10px; color: #fff; background: #273244; box-shadow: var(--shadow); font-size: .86rem; line-height: 1.6; }
@media (hover: hover) and (pointer: fine) {
  .sidebar-nav-button:not(.active):hover, .quiet-button:hover, .icon-button:hover, .back-button:hover, .close-button:hover { background: #e9edf3; }
  .email-button:hover { background: #f7f9fc; }
  .email-button.is-selected:hover, .email-row.is-selected .email-button:hover, .email-button[aria-current="true"]:hover { background: #e8effc; }
  .secondary-button:hover, .sync-button:hover { border-color: #b9c6db; background: #fafbfe; }
  .primary-button:hover, .send-button:hover { background: #294dab; }
  .attachment-entry:hover { border-color: #bcccf0; background: #edf3ff; }
  .filter:not(.active):hover, .attachment-filter:hover { background: var(--surface-quiet); }
  .logout-button:hover { background: var(--red-soft); }
}
@media (min-width: 1500px) { :root { --list-width: 440px; } .dialog-shell { padding-right: 40px; padding-left: 40px; } .dialog-header { margin-right: -40px; margin-left: -40px; } .analysis-grid { grid-template-columns: 1fr 1fr; gap: 0 28px; } }
@media (max-width: 1179px) {
  .desktop-sidebar { width: 180px; }
  .topbar { margin-left: 180px; }
  .app-shell > main { max-width: 900px; margin-left: 180px; padding-bottom: 30px; }
  .greeting-section { height: 92px; }
  .mail-workspace { position: static; display: block; }
  .inbox-panel { max-height: none; }
  .email-list { overflow: visible; }
  .email-button { min-height: 118px; grid-template-columns: 38px minmax(0, 1fr) auto; padding: 18px; gap: 12px; }
  .sender-avatar { width: 38px; height: 38px; font-size: .75rem; }
  .email-sender { font-size: .85rem; }
  .email-subject { font-size: .94rem; }
  .email-summary { font-size: .86rem; }
  .filters { justify-content: flex-start; }
  .filter { flex-grow: 0; padding-right: 14px; padding-left: 14px; }
  .reader-placeholder { display: none; }
  #detailDialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .dialog-shell { max-width: 900px; height: 100%; margin: 0 auto; padding: 0 28px calc(36px + env(safe-area-inset-bottom)); }
  .dialog-header { min-height: 64px; padding-top: max(8px, env(safe-area-inset-top)); }
  .dialog-header .back-button { display: inline-flex; }
  .dialog-title h2 { font-size: 1.7rem; }
  .quick-actions button { min-height: 44px; font-size: .84rem; }
  .analysis-grid { grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .agent-status { max-width: 440px; }
}
@media (max-width: 760px) {
  .desktop-sidebar { display: none; }
  .topbar { position: sticky; top: 0; height: auto; min-height: 78px; margin-left: 0; padding: max(12px, env(safe-area-inset-top)) 16px 12px; background: #f6f7f9f5; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .mobile-brand-mark { display: inline-flex; width: 34px; height: 34px; flex-basis: 34px; }
  .brand { gap: 8px; }
  .brand-name { font-size: .9rem; }
  .agent-status { max-width: min(50vw, 260px); margin-top: 3px; font-size: .64rem; }
  .top-actions { gap: 6px; }
  .sync-button { width: 44px; height: 44px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .sync-button span { display: none; }
  .sync-button svg { width: 20px; height: 20px; }
  .avatar-button { width: 44px; flex-basis: 44px; min-height: 44px; }
  .account-menu { right: 0; }
  .app-shell > main { max-width: none; margin-left: 0; padding: 0 12px calc(94px + env(safe-area-inset-bottom)); }
  .greeting-section { height: auto; min-height: 94px; align-items: flex-start; padding: 12px 4px 20px; }
  .greeting-section h1 { font-size: 1.35rem; }
  .greeting-note { max-width: 280px; margin-top: 8px; font-size: .78rem; }
  .today-label { max-width: 95px; padding-top: 4px; white-space: normal; text-align: right; font-size: .66rem; line-height: 1.7; }
  .inbox-panel { border-radius: 12px; }
  .inbox-heading { padding: 17px 15px 12px; }
  .inbox-heading h2 { font-size: 1.05rem; }
  .sync-note { font-size: .65rem; }
  .search-field { margin: 0 12px 7px; }
  .search-field input { font-size: .95rem; }
  .filters { padding: 0 7px; }
  .filter { flex: 1 0 auto; padding: 10px 7px; font-size: .77rem; }
  .filter span { font-size: .64rem; }
  .list-toolbar { padding-left: 14px; padding-right: 10px; }
  .attachment-filter { min-height: 44px; }
  .email-button { grid-template-columns: 32px minmax(0, 1fr); min-height: 150px; gap: 6px 10px; padding: 17px 13px; }
  .sender-avatar { width: 32px; height: 32px; font-size: .68rem; }
  .email-sender { padding-right: 0; font-size: .87rem; margin-bottom: 6px; }
  .email-subject { font-size: .98rem; line-height: 1.48; }
  .email-summary { margin-top: 8px; font-size: .87rem; line-height: 1.7; }
  .email-meta { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 4px; }
  .email-time, .priority-label { font-size: .71rem; }
  .attachment-badge, .model-badge { font-size: .65rem; }
  .model-history-label { font-size: .65rem; }
  .mobile-nav { position: fixed; z-index: 26; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: 5px 12px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid #e4e8ef; background: #ffffffef; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .mobile-nav-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; padding: 6px; border: 0; border-radius: 8px; color: var(--faint); background: transparent; font-size: .65rem; font-weight: 550; }
  .mobile-nav-button svg { width: 21px; height: 21px; }
  .mobile-nav-button.active { color: var(--blue); }
  .dialog-shell { padding: 0 20px calc(30px + env(safe-area-inset-bottom)); }
  .dialog-header { gap: 2px; margin: 0 -20px 20px; padding-right: 10px; padding-left: 10px; }
  .dialog-kicker { font-size: .73rem; }
  #detailPosition { font-size: .65rem; }
  .dialog-header .close-button { display: none; }
  .dialog-title h2 { margin: 12px 0 12px; font-size: 1.5rem; line-height: 1.32; }
  .dialog-title .muted { font-size: .83rem; }
  .quick-actions { gap: 7px; margin-top: 20px; }
  .quick-actions button { padding: 9px 11px; font-size: .78rem; }
  .quick-actions .quiet-button { padding-right: 6px; padding-left: 6px; }
  .attachment-entry { margin-top: 20px; padding: 12px; }
  .attachment-entry strong { font-size: .88rem; }
  .attachment-entry small { font-size: .72rem; }
  .analysis-summary { margin-top: 22px; padding: 18px 16px; }
  .analysis-summary p { font-size: 1rem; line-height: 1.9; }
  .analysis-grid { grid-template-columns: 1fr; }
  .analysis-section { padding: 22px 0; font-size: 1rem; }
  .analysis-summary h3, .analysis-section h3 { font-size: .86rem; }
  .analysis-section small { font-size: .86rem; }
  .model-routing-heading { align-items: flex-start; }
  .model-routing-heading small { font-size: .77rem; line-height: 1.65; }
  .model-routing-footer { flex-direction: column; align-items: stretch; }
  .model-routing-footer button { width: 100%; }
  .draft-heading { flex-direction: column; align-items: stretch; gap: 14px; }
  .draft-tabs { width: 100%; }
  .draft-tab { flex: 1; font-size: .82rem; }
  .rewrite-card { padding: 14px; }
  .rewrite-row { flex-direction: column; }
  .rewrite-row input { font-size: .95rem; }
  .rewrite-row button { width: 100%; min-height: 44px; font-size: .84rem; }
  .send-row { display: block; }
  .send-button { width: 100%; margin-top: 14px; }
  .agent-dialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .agent-dialog-shell { min-height: 100%; padding: max(22px, env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
  .agent-dialog-heading h2 { font-size: 1.4rem; }
  .agent-composer { align-items: stretch; flex-direction: column; padding: 10px; }
  .agent-composer input { width: 100%; min-height: 48px; padding: 6px 2px; font-size: 1rem; }
  .agent-composer .primary-button { align-self: flex-end; padding: 10px 16px; }
  .chat-answer { padding: 16px; }
  .toast { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); width: calc(100% - 32px); }
  body:has(dialog[open]) .mobile-nav { visibility: hidden; }
  body:has(dialog[open]) .toast { bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) { .brand-name { font-size: .83rem; } .brand { gap: 6px; } .mobile-brand-mark { display: none; } .dialog-shell { padding-right: 16px; padding-left: 16px; } .dialog-header { margin-right: -16px; margin-left: -16px; } .quick-actions { gap: 4px; } .quick-actions button { font-size: .72rem; padding: 8px; } .today-label { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } button:not(:disabled):active { transform: none; } }
@media (prefers-reduced-transparency: reduce) { .topbar, .dialog-header, .mobile-nav { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-contrast: more) { :root { --muted: #344256; --faint: #46546b; --line: #a9b5c5; --line-strong: #8393a9; } .email-row + .email-row { border-color: var(--line); } .agent-status, .notification-copy span, .greeting-note { color: var(--muted); } }


/* Source: focus.css */
/* Approved focused inbox layout. */
:root {
  --page: #f5f5f3;
  --ink: #242629;
  --muted: #60636a;
  --faint: #6e7279;
  --line: #e8e8e5;
  --line-strong: #dcdedc;
  --blue: #345ee1;
  --blue-deep: #345ee1;
  --blue-soft: #edf1fe;
  --surface-quiet: #f6f7f8;
  --shadow: 0 20px 80px #20252f12, 0 3px 14px #20252f06;
}
html, body { background: var(--page); }
body { font-weight: 450; letter-spacing: -.015em; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
.topbar {
  position: relative; height: 88px; max-width: 1392px; margin: 0 auto;
  padding: 0 48px; border-bottom: 1px solid #e5e6e3; background: transparent;
}
.brand-mark { display: inline-flex; width: 39px; height: 39px; flex-basis: 39px; border-radius: 13px; background: var(--ink); color: #fff; }
.brand { gap: 12px; }
.brand-name { display: flex; align-items: center; gap: 16px; font-size: 17px; font-weight: 700; }
.brand-divider { color: #bec1c6; font-weight: 400; }
.brand-personal { color: var(--muted); font-size: 14px; font-weight: 450; }
.agent-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.desk-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 30px; background: #eaece8; }
.desk-nav button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 88px; height: 40px; padding: 0 19px; border: 0; border-radius: 24px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 600; }
.desk-nav button.active { color: var(--ink); background: white; box-shadow: 0 2px 5px #20252f08; }
.desk-nav svg { width: 16px; height: 16px; }
.top-actions { gap: 18px; }
.sync-button { border: 0; background: transparent; font-size: 14px; font-weight: 550; padding: 10px 0; }
.sync-button svg { width: 18px; height: 18px; }
.avatar-button { width: 40px; height: 40px; flex-basis: 40px; border-radius: 50%; background: #e4e8ef; color: #4d5c74; box-shadow: inset 0 0 0 1px #c6cddd50; font-size: 12px; }
.app-shell > main { width: min(1144px, calc(100% - 96px)); max-width: none; margin: 0 auto; padding: 0 0 64px; }
.greeting-section { height: auto; min-height: 185px; align-items: flex-end; padding: 40px 0 32px; }
.workspace-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 13px; color: var(--muted); font-size: 13px; font-weight: 550; }
.preview-label { margin-left: 12px; padding-left: 17px; border-left: 1px solid #d6d9db; color: #796a52; font-size: 11px; font-weight: 450; letter-spacing: 0; }
.greeting-section h1 { font-size: clamp(26px, 3.1vw, 38px); font-weight: 730; letter-spacing: -.045em; line-height: 1.3; }
.heading-period { margin-left: 3px; color: var(--blue); }
.greeting-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.today-label { padding-bottom: 2px; font-size: 13px; color: var(--muted); }
.mail-workspace { position: static; display: block; }
.inbox-panel { display: block; max-height: none; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.inbox-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.filters { flex: 1; order: 1; gap: 3px; padding: 0; }
.filter { flex: 0 0 auto; padding: 9px 12px; min-height: 42px; border: 0; border-radius: 24px; color: var(--muted); font-size: 14px; font-weight: 550; }
.filter.active { color: white; background: var(--ink); font-weight: 600; }
.filter span { margin-left: 5px; font-size: 12px; opacity: .72; }
.search-field { order: 2; width: 236px; margin: 0; padding-left: 13px; border: 1px solid #e1e3e2; border-radius: 24px; background: transparent; }
.search-field input { font-size: 13px; width: 100%; padding-right: 8px; }
.search-field input::placeholder { color: #787d85; }
.search-field:focus-within { border-color: #8199ec; box-shadow: 0 0 0 3px #345ee114; background: #fff; }
.list-toolbar { order: 3; min-height: 44px; padding: 0; border: 0; background: transparent; }
.result-count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.attachment-filter { gap: 6px; min-height: 44px; padding: 8px 13px; border: 1px solid #e1e3e2; border-radius: 24px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.attachment-filter svg { width: 15px; height: 15px; }
.email-list { display: grid; gap: 10px; overflow: visible; }
.email-row { border: 1px solid #e9eae7; border-radius: 17px; background: white; box-shadow: 0 2px 3px #23272802; }
.email-row + .email-row { border-top: 1px solid #e9eae7; }
.email-button { grid-template-columns: 42px minmax(0,1fr) 80px; gap: 20px; min-height: 128px; align-items: start; padding: 26px 25px; border-radius: 17px; background: transparent; }
.email-button:focus-visible { outline-offset: 3px; }
.email-copy { display: grid; grid-template-columns: 174px minmax(0,1fr); grid-template-rows: auto auto; gap: 8px 24px; }
.sender-avatar { width: 42px; height: 42px; border: 1px solid #dbdfef; border-radius: 50%; background: #edf0fb; color: #626f9e; font-size: 12px; font-weight: 650; }
.email-row:nth-child(4n + 2) .sender-avatar { color: #8c6652; background: #f5e9e1; border-color: #eeddcf; }
.email-row:nth-child(4n + 3) .sender-avatar { color: #6d7381; background: #ebeff4; border-color: #dce1e8; }
.email-row:nth-child(4n + 4) .sender-avatar { color: #77795b; background: #efefe5; border-color: #e2e3d7; }
.email-sender { grid-column: 1; grid-row: 1; margin: 1px 0 0; color: #484c54; font-size: 14px; font-weight: 630; line-height: 1.65; }
.email-subject { grid-column: 2; grid-row: 1; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; color: var(--ink); font-size: 17px; line-height: 1.55; font-weight: 660; letter-spacing: -.02em; }
.email-summary { grid-column: 2; grid-row: 2; margin: 0; font-size: 14px; line-height: 1.65; -webkit-line-clamp: 2; color: #666b75; font-weight: 450; }
.email-labels { grid-column: 1; grid-row: 2; align-items: flex-start; gap: 4px; margin: 0; }
.attachment-badge { gap: 4px; margin: 1px 0 0; padding: 0; background: transparent; color: #737984; font-size: 12px; font-weight: 450; }
.attachment-badge::before { content: ''; width: 8px; height: 12px; margin-right: 3px; border: 1.2px solid #959aa4; border-radius: 4px; transform: rotate(32deg); }
.email-meta { gap: 10px; margin-top: 2px; }
.email-time { color: #7a7e85; font-size: 12px; }
.priority-label { gap: 5px; font-size: 12px; font-weight: 550; }
.priority-dot { width: 5px; height: 5px; }
.priority-urgent .priority-label { color: #ad433a; }
.email-button.is-selected, .email-row.is-selected .email-button, .email-button[aria-current="true"] { background: #f5f7ff; }
.email-button[aria-current="true"]::before, .email-row.is-selected .email-button::before { display: none; }
.email-row.is-selected { border-color: #b5c4f1; }
.inline-error { margin-bottom: 16px; }
.empty-state { padding: 72px 24px; border-radius: 18px; background: white; }
.reader-placeholder, .desktop-sidebar { display: none; }

/* Reading becomes a focused page, not a third column in a control panel. */
#detailDialog { position: fixed; inset: 0; width: min(980px, calc(100% - 80px)); height: calc(100dvh - 64px); max-height: calc(100dvh - 64px); margin: auto; border: 0; border-radius: 22px; background: #fff; box-shadow: 0 35px 120px #11182029; }
#detailDialog::backdrop { background: #20252f35; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
body.reading-mail { overflow: hidden; }
.dialog-shell { max-width: none; margin: 0; padding: 0 70px 64px; }
.dialog-header { min-height: 74px; margin: 0 -70px 32px; padding: 12px 22px; border-bottom: 0; background: #ffffffee; }
.dialog-header .back-button { display: inline-flex; }
.dialog-kicker { font-size: 13px; color: var(--muted); }
.dialog-header .close-button { display: none; }
.dialog-header .reader-navigation { padding-right: 3px; }
.dialog-title h2 { max-width: 790px; margin: 17px 0 16px; font-size: 32px; font-weight: 700; letter-spacing: -.035em; line-height: 1.36; }
.detail-reading-label { display: none; }
.dialog-title .muted { font-size: 14px; color: #6b717c; }
.priority-pill { padding: 4px 8px; border-radius: 7px; font-size: 12px; }
.quick-actions { gap: 8px; margin-top: 27px; }
.quick-actions button { min-height: 44px; padding: 10px 18px; border-radius: 24px; font-size: 14px; }
.primary-button { background: var(--ink); }
.quick-actions .secondary-button { border-color: #e2e5e9; }
.attachment-entry { grid-template-columns: 34px minmax(0,1fr) 20px; gap: 12px; margin-top: 26px; padding: 15px 16px; border: 1px solid #e7e9f2; border-radius: 13px; background: #f7f8fc; }
.attachment-entry-icon { width: 34px; height: 38px; border-radius: 8px; background: #e9edfb; }
.attachment-entry strong { font-size: 14px; }
.attachment-entry small { margin-top: 3px; font-size: 12px; }
.analysis-summary { margin-top: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.analysis-summary h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; color: var(--blue); font-size: 13px; font-weight: 650; }
.analysis-summary h3::before { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.analysis-summary p { font-size: 20px; line-height: 1.85; color: #343a46; font-weight: 500; letter-spacing: -.025em; }
.analysis-grid { grid-template-columns: 1fr; margin-top: 14px; }
.analysis-section { padding: 25px 0; border-color: #edf0f4; font-size: 17px; }
.analysis-section h3 { color: #333c4c; font-size: 14px; }
.analysis-section p, .analysis-section ul { color: #566070; line-height: 1.9; }
.analysis-context, .model-options, .source-details { padding: 0; border: 0; border-bottom: 1px solid #eceef2; border-radius: 0; }
.analysis-context > summary, .model-options > summary, .source-details > summary { min-height: 56px; padding: 12px 0; font-size: 14px; }
.model-routing-card { padding: 12px 0 20px; }
.model-routing-card * { letter-spacing: 0; }
.draft-workspace { margin-top: 40px; padding: 30px 0 0; border-top: 1px solid #e9ebef; }
.draft-heading { align-items: flex-start; }
.draft-heading h3 { font-size: 25px; font-weight: 680; letter-spacing: -.035em; }
.draft-tabs { border-radius: 24px; }
.draft-tab { border-radius: 20px; }
.draft-local-note, #emailDraftHint { font-size: 13px; }
#draftTo, #draftSubject { margin-bottom: 16px; min-height: 48px; padding-left: 0; border: 0; border-bottom: 1px solid #e5e8ef; border-radius: 0; box-shadow: none; }
#draftBody, #wechatDraft { padding: 20px; border-color: #e4e7ef; border-radius: 14px; font-size: 17px; line-height: 1.8; }
.rewrite-card { padding: 20px; border-radius: 16px; background: #f4f6fb; }
.send-button, .copy-draft-button, .rewrite-row button { border-radius: 24px; }
.agent-dialog { border: 0; border-radius: 22px; }
.agent-dialog-shell { padding: 32px; }
.agent-dialog-heading h2 { font-size: 28px; letter-spacing: -.03em; }
.agent-composer { border-radius: 16px; }
.account-menu { border: 1px solid #e8e9ec; border-radius: 18px; }
@media (hover: hover) and (pointer: fine) {
  .email-button:hover { background: #fafbfe; }
  .email-row:has(.email-button:hover) { border-color: #d7dde9; box-shadow: 0 5px 16px #28365506; }
  .filter:not(.active):hover { background: #e9eae7; }
  .primary-button:hover { background: #3e444f; }
  .desk-nav button:not(.active):hover { color: var(--ink); }
}
@media (max-width: 1179px) {
  .topbar { margin-left: auto; padding: 0 28px; }
  .brand-personal, .brand-divider { display: none; }
  .app-shell > main { width: calc(100% - 56px); max-width: 1040px; margin: 0 auto; }
  .email-copy { grid-template-columns: 140px minmax(0,1fr); column-gap: 18px; }
  .email-button { padding: 22px; gap: 15px; }
  .search-field { width: 200px; }
  .filter { padding: 10px; }
  .greeting-section { min-height: 172px; }
  .dialog-shell { padding-left: 50px; padding-right: 50px; }
  .dialog-header { margin-left: -50px; margin-right: -50px; }
}
@media (max-width: 920px) {
  .email-copy { display: block; }
  .email-sender { margin-bottom: 5px; }
  .email-summary { margin-top: 7px; }
  .email-labels { margin-top: 10px; }
  .search-field { width: 185px; }
  .filter span { display: none; }
  .greeting-section h1 { font-size: 32px; }
  .email-subject { -webkit-line-clamp: 2; }
}
@media (max-width: 760px) {
  .topbar { position: sticky; z-index: 30; top: 0; height: auto; min-height: 72px; padding: max(12px, env(safe-area-inset-top)) 20px 12px; background: #f5f5f3ed; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid #e8e9e5; }
  .brand-mark { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
  .brand-name { font-size: 16px; }
  .brand { gap: 9px; }
  .desk-nav { display: none; }
  .top-actions { gap: 12px; }
  .avatar-button { width: 38px; height: 38px; min-height: 38px; flex-basis: 38px; }
  .sync-button { width: 36px; height: 44px; }
  .app-shell > main { width: auto; max-width: none; margin: 0; padding: 0 18px calc(100px + env(safe-area-inset-bottom)); }
  .greeting-section { min-height: 0; padding: 25px 2px 24px; }
  .workspace-eyebrow { margin-bottom: 11px; font-size: 12px; }
  .preview-label { margin-left: 5px; padding-left: 10px; font-size: 10px; }
  .greeting-section h1 { font-size: clamp(24px, 6.4vw, 31px); font-weight: 700; letter-spacing: -.055em; }
  .greeting-note { max-width: none; margin-top: 10px; font-size: 13px; }
  .today-label { display: none; }
  .inbox-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px 10px; margin-bottom: 18px; }
  .search-field { grid-column: 1; grid-row: 1; width: auto; min-height: 44px; border-radius: 14px; background: #ebedea; border: 0; }
  .search-field input { font-size: 16px; }
  .list-toolbar { grid-column: 2; grid-row: 1; }
  .attachment-filter { min-height: 44px; padding: 9px 10px; font-size: 13px; border: 1px solid #e0e2df; border-radius: 14px; }
  .filters { grid-column: 1 / -1; grid-row: 2; gap: 3px; width: 100%; }
  .filter { flex: 1 0 auto; padding: 9px 8px; min-height: 42px; font-size: 13px; }
  .filter span { display: inline; margin-left: 3px; font-size: 11px; }
  .email-list { gap: 12px; }
  .email-row { border-radius: 18px; border-color: #e9eae6; }
  .email-button { grid-template-columns: 28px minmax(0,1fr) auto; gap: 0 9px; min-height: 0; padding: 18px; border-radius: 18px; }
  .sender-avatar { grid-column: 1; grid-row: 1; width: 28px; height: 28px; border-radius: 50%; font-size: 10px; }
  .email-copy { display: contents; }
  .email-sender { grid-column: 2; grid-row: 1; margin: 0; align-self: center; color: #5a606b; font-size: 13px; line-height: 28px; font-weight: 600; }
  .email-meta { grid-column: 3; grid-row: 1; align-self: center; gap: 0; margin: 0; }
  .email-time { color: #7d8188; font-size: 11px; line-height: 28px; }
  .priority-label { position: absolute; bottom: 18px; right: 18px; font-size: 12px; }
  .email-subject { grid-column: 1 / -1; grid-row: 2; margin-top: 14px; font-size: 18px; font-weight: 650; line-height: 1.45; -webkit-line-clamp: 2; }
  .email-summary { grid-column: 1 / -1; grid-row: 3; margin-top: 9px; color: #626b78; font-size: 15px; line-height: 1.7; -webkit-line-clamp: 2; }
  .email-labels { grid-column: 1 / -1; grid-row: 4; min-height: 19px; margin-top: 15px; padding-right: 54px; }
  .attachment-badge { font-size: 12px; }
  .mobile-nav { right: 22px; bottom: max(14px, env(safe-area-inset-bottom)); left: 22px; padding: 4px; border: 1px solid #e1e4e5; border-radius: 26px; background: #ffffffed; box-shadow: 0 7px 26px #202a3614; }
  .mobile-nav-button { min-height: 52px; gap: 3px; border-radius: 21px; font-size: 10px; }
  .mobile-nav-button svg { width: 19px; height: 19px; }
  .mobile-nav-button.active { color: var(--ink); background: #f0f2ef; }
  #detailDialog { inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; box-shadow: none; }
  .dialog-shell { padding: 0 24px calc(36px + env(safe-area-inset-bottom)); }
  .dialog-header { min-height: 64px; margin: 0 -24px 22px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .dialog-title h2 { margin: 16px 0 15px; font-size: 27px; font-weight: 700; line-height: 1.34; }
  .dialog-title .muted { font-size: 13px; }
  .quick-actions { flex-wrap: nowrap; gap: 7px; margin-top: 23px; }
  .quick-actions button { flex: 0 1 auto; min-height: 44px; padding: 10px 13px; font-size: 13px; white-space: nowrap; }
  .quick-actions .quiet-button { padding: 10px 3px; }
  .attachment-entry { margin-top: 22px; padding: 13px; }
  .attachment-entry small { font-size: 11px; }
  .analysis-summary { margin-top: 28px; }
  .analysis-summary p { font-size: 19px; line-height: 1.85; }
  .analysis-section { font-size: 17px; }
  .analysis-grid { grid-template-columns: 1fr; }
  .draft-heading { align-items: stretch; }
  .draft-heading h3 { font-size: 25px; }
  .draft-tabs { margin-top: 12px; }
  .rewrite-card { padding: 16px; }
  .agent-dialog { border-radius: 0; }
  .agent-dialog-shell { padding: max(22px, env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(94px + env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
  .app-shell > main { padding-left: 12px; padding-right: 12px; }
  .email-button { padding: 16px; }
  .filter { padding: 9px 7px; font-size: 12px; }
  .filter span { font-size: 10px; }
  .dialog-shell { padding-right: 19px; padding-left: 19px; }
  .dialog-header { margin-right: -19px; margin-left: -19px; }
  .quick-actions { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
  button:not(:disabled):active { transform: none; }
}


/* Source: typography.css */
/* Personal Agent typography: clear, approachable, and identical across devices. */
:root {
  --agent-font: "Mail Manrope", "Mail MiSans", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --type-primary: #303846;
  --type-secondary: #596371;
  font-size: 106.25%;
}
body, body.attachment-page {
  font-family: var(--agent-font);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: normal;
  line-height: 1.7;
}
body.attachment-page { font-size: 1rem; }
button, input, textarea, select { font-family: var(--agent-font); letter-spacing: normal; }
input, textarea, select { font-size: 1rem; }
.brand-name { font-size: 1rem; font-weight: 600; }
.brand-personal { font-size: .8235rem; font-weight: 500; }
.workspace-eyebrow { font-size: .8235rem; font-weight: 400; }
.preview-label { font-size: .7059rem; font-weight: 400; }
.greeting-section h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
.greeting-note { font-size: .8824rem; line-height: 1.65; color: var(--type-secondary); }
.today-label { font-size: .8235rem; }
.desk-nav button, .sync-button, .filter, .attachment-filter {
  font-size: .8235rem;
  font-weight: 500;
}
.desk-nav button.active, .filter.active { font-weight: 600; }
.filter span { font-size: .7059rem; }
.search-field input { font-size: .9412rem; }
.sender-avatar, .avatar-button { font-weight: 600; }
.email-sender { font-size: .8824rem; line-height: 1.65; font-weight: 500; color: var(--type-secondary); }
.email-subject {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
}
.email-summary {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--type-primary);
}
.email-time, .priority-label, .attachment-badge { font-size: .7647rem; }
.email-time, .attachment-badge { color: var(--type-secondary); }
.priority-label { font-weight: 500; }
.email-copy { row-gap: 10px; }
.dialog-title h2, .email-context h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.8824rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}
.dialog-title .muted, .context-kicker { font-size: .8824rem; color: var(--type-secondary); }
.dialog-kicker, #detailPosition { font-size: .8235rem; }
.priority-pill { font-size: .7647rem; font-weight: 500; }
.quick-actions button { font-size: .8824rem; font-weight: 500; }
.attachment-entry strong { font-size: .9412rem; font-weight: 500; }
.attachment-entry small { font-size: .7647rem; color: var(--type-secondary); }
.analysis-summary h3, .analysis-section h3 {
  font-size: .9412rem;
  font-weight: 500;
  letter-spacing: 0;
}
.analysis-summary p {
  font-size: 1.0588rem;
  line-height: 1.85;
  font-weight: 400;
  color: var(--type-primary);
  letter-spacing: 0;
}
.analysis-section, .analysis-section p, .analysis-section ul {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--type-primary);
}
.analysis-section small { font-size: .8824rem; color: var(--type-secondary); }
.analysis-context > summary, .model-options > summary, .source-details > summary {
  font-size: .8824rem;
  font-weight: 500;
}
.draft-heading h3, .agent-dialog-heading h2 {
  font-size: 1.5294rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
}
.draft-local-note, #emailDraftHint { font-size: .8235rem; line-height: 1.7; }
.draft-workspace label { font-weight: 500; }
#draftTo, #draftSubject, #draftBody, #wechatDraft, #rewriteInstruction, #chatInput { font-size: 1rem; font-weight: 400; }
#draftBody, #wechatDraft { line-height: 1.8; }
.draft-tab, .copy-draft-button, .send-button, .rewrite-row button { font-weight: 500; }
.agent-intro, .chat-answer { font-size: 1rem; line-height: 1.8; color: var(--type-primary); }
.agent-disclaimer { font-size: .8235rem; line-height: 1.7; }
.account-menu-heading, .notification-copy p, .notification-choice, .logout-button { font-size: .8824rem; font-weight: 500; }
.notification-copy span { font-size: .8235rem; }
.attachment-page .context-note { font-size: .9412rem; line-height: 1.75; }
.attachment-page .attachment-topbar h1 { font-size: 1.0588rem; font-weight: 600; }
.attachment-page .attachment-toolbar strong { font-weight: 600; }
.attachment-page .file-heading h3, .attachment-page .file-name { font-weight: 600; letter-spacing: 0; }
.attachment-page .attachment-model-buttons button { font-weight: 500; }
.login-page h1 { font-size: 1.8824rem; font-weight: 600; letter-spacing: 0; }
.login-page label, .login-page button { font-weight: 500; }
.font-credit-link { display: block; margin-top: 12px; padding: 10px 0 0; border-top: 1px solid #e8ebef; font-size: .7647rem; line-height: 1.7; color: var(--type-secondary); text-decoration: none; }
.font-credit-link:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .brand-name { font-size: .9412rem; }
  .greeting-section h1 { font-size: clamp(1.35rem, 6.5vw, 1.75rem); font-weight: 500; letter-spacing: 0; }
  .workspace-eyebrow { font-size: .7647rem; }
  .preview-label { font-size: .6471rem; }
  .greeting-note { font-size: .8235rem; }
  .email-sender { font-size: .8235rem; }
  .email-subject { font-size: 1.0588rem; font-weight: 500; line-height: 1.6; letter-spacing: 0; }
  .email-summary { font-size: 1rem; font-weight: 400; line-height: 1.75; color: var(--type-primary); }
  .email-time { font-size: .7059rem; }
  .attachment-badge, .priority-label { font-size: .7647rem; }
  .filter { font-size: .8235rem; padding-inline: 8px; }
  .filter span { font-size: .7059rem; }
  .search-field input { font-size: .9412rem; }
  .attachment-filter { font-size: .8235rem; }
  .mobile-nav-button { font-size: .7059rem; font-weight: 500; }
  .dialog-title h2 { font-size: 1.5294rem; font-weight: 500; line-height: 1.45; }
  .dialog-title .muted { font-size: .8235rem; }
  .quick-actions { flex-wrap: wrap; }
  .quick-actions button { font-size: .8235rem; padding-inline: 12px; }
  .attachment-entry strong { font-size: .8824rem; }
  .attachment-entry small { font-size: .7647rem; }
  .analysis-summary p { font-size: 1.0588rem; line-height: 1.85; }
  .analysis-section { font-size: 1rem; }
}


/* Source: colors.css */
/* Semantic accents: colour reinforces text labels, never replaces them. */
:root, body.attachment-page {
  --ink: #27364e;
  --muted: #58667d;
  --faint: #64748b;
  --blue: #355bc4;
  --blue-deep: #2c4fab;
  --blue-soft: #edf2ff;
  --accent-violet: #6850ad;
  --accent-violet-soft: #f2edfc;
  --accent-teal: #226e61;
  --accent-teal-soft: #eaf6f1;
  --accent-red: #a83742;
  --accent-red-soft: #fff0f1;
  --accent-amber: #8e5a17;
  --accent-amber-soft: #fff4df;
  --accent-slate: #536681;
  --accent-slate-soft: #eef2f7;
  --type-primary: #34435b;
  --type-secondary: #58667d;
}
.greeting-section h1, .dialog-title h2, .email-context h2,
.brand-name, .email-subject, .draft-heading h3, .file-name { color: var(--ink); }
.greeting-note, .workspace-eyebrow, .dialog-title .muted { color: var(--type-secondary); }
.email-summary, .analysis-summary p, .analysis-section p,
.analysis-section ul, .chat-answer { color: var(--type-primary); }
.brand-mark { background: var(--blue); color: #fff; box-shadow: 0 3px 9px #355bc41c; }
.avatar-button { color: var(--accent-violet); background: #eeeafa; box-shadow: inset 0 0 0 1px #dfd8f0; }
.heading-period, .sync-button, .dialog-kicker, .analysis-section h3 { color: var(--blue-deep); }
.analysis-summary h3, .agent-dialog-heading h2, .agent-dialog-heading .section-kicker { color: var(--accent-violet); }
.desk-nav button.active { color: var(--blue-deep); background: #fff; }
.desk-nav button[data-scroll-target="agentComposer"] { color: var(--accent-violet); }
.mobile-nav-button.active { color: var(--blue-deep); background: var(--blue-soft); }
.mobile-nav-button[data-scroll-target="agentComposer"] svg { color: var(--accent-violet); }
.mobile-nav-button[data-scroll-target="agentComposer"].active { color: var(--accent-violet); background: var(--accent-violet-soft); }
.mobile-nav-button#mobileSettingsButton svg { color: var(--accent-slate); }
.primary-button, .send-button, .attachment-page .analyze-all-button {
  color: #fff; background: var(--blue); border-color: var(--blue);
}
.quick-actions .secondary-button, .secondary-button.copy-draft-button,
.file-download, .attachment-page .secondary-button {
  color: var(--blue-deep); background: #f5f8ff; border-color: #dce5fa;
}
#quickWechatButton, #copyWechatButton {
  color: var(--accent-teal); background: var(--accent-teal-soft); border-color: #cde7df;
}
#chatButton { color: #fff; background: var(--accent-violet); border-color: var(--accent-violet); }
#rewriteButton { color: var(--accent-violet); background: #fff; border-color: #ded5f2; }
.rewrite-card { background: #f5f2fb; }
.draft-tab.active { color: var(--blue-deep); background: var(--blue-soft); }
#wechatDraftTab.active { color: var(--accent-teal); background: var(--accent-teal-soft); }
.quiet-button, .back-button, .reader-navigation .icon-button { color: var(--blue-deep); }
.filter[data-filter="urgent"] { --filter-ink: var(--accent-red); --filter-soft: var(--accent-red-soft); }
.filter[data-filter="high"] { --filter-ink: var(--accent-amber); --filter-soft: var(--accent-amber-soft); }
.filter[data-filter="normal"] { --filter-ink: var(--accent-slate); --filter-soft: var(--accent-slate-soft); }
.filter[data-filter="error"] { --filter-ink: var(--accent-violet); --filter-soft: var(--accent-violet-soft); }
.filter:not([data-filter="all"]) { color: var(--filter-ink); background: var(--filter-soft); }
.filter.active { color: #fff; background: var(--blue); }
.filter:not([data-filter="all"]).active { color: #fff; background: var(--filter-ink); }
.filter.active span { opacity: 1; }
.email-row { --priority-ink: var(--accent-slate); --priority-soft: var(--accent-slate-soft); color: var(--ink); background: #fff; }
.email-row.priority-urgent { --priority-ink: var(--accent-red); --priority-soft: var(--accent-red-soft); }
.email-row.priority-high { --priority-ink: var(--accent-amber); --priority-soft: var(--accent-amber-soft); }
.email-row.priority-error { --priority-ink: var(--accent-violet); --priority-soft: var(--accent-violet-soft); }
.email-row .priority-label { color: var(--priority-ink); background: var(--priority-soft); padding: 3px 8px; border-radius: 7px; line-height: 1.6; }
.email-row .priority-dot { background: currentColor; }
.priority-pill.priority-urgent { color: var(--accent-red); background: var(--accent-red-soft); }
.priority-pill.priority-high { color: var(--accent-amber); background: var(--accent-amber-soft); }
.priority-pill.priority-normal, .priority-pill.priority-low { color: var(--accent-slate); background: var(--accent-slate-soft); }
.priority-pill.priority-error { color: var(--accent-violet); background: var(--accent-violet-soft); }
.attachment-badge { color: var(--accent-violet); background: var(--accent-violet-soft); padding: 3px 7px; border-radius: 7px; line-height: 1.6; }
.attachment-badge::before { border-color: currentColor; }
.attachment-filter { color: var(--accent-violet); border-color: #ded5ef; background: #f8f5fd; }
.attachment-filter[aria-pressed="true"] { color: #fff; border-color: var(--accent-violet); background: var(--accent-violet); }
.attachment-entry { background: #f8f5fd; border-color: #e8e0f5; }
.attachment-entry-icon { color: var(--accent-violet); background: #ece5f9; }
.attachment-entry strong, .attachment-entry > svg { color: var(--accent-violet); }
.file-icon { color: var(--accent-slate); background: var(--accent-slate-soft); border-color: #dce3ed; }
.file-icon[data-file-category="pdf"] { color: var(--accent-red); background: var(--accent-red-soft); border-color: #f0d8dc; }
.file-icon[data-file-category="spreadsheet"] { color: var(--accent-teal); background: var(--accent-teal-soft); border-color: #cde7df; }
.file-icon[data-file-category="document"] { color: var(--blue-deep); background: var(--blue-soft); border-color: #dce5fa; }
.file-icon[data-file-category="drawing_2d"], .file-icon[data-file-category="model_3d"],
.file-icon[data-file-category="image"] { color: var(--accent-violet); background: var(--accent-violet-soft); border-color: #ded5ef; }
.file-analyze { color: var(--accent-violet); background: var(--accent-violet-soft); }
.file-unlock { color: var(--accent-amber); background: var(--accent-amber-soft); }
.file-status.analyzed { color: var(--accent-teal); background: var(--accent-teal-soft); }
.notification-choice.is-active { color: var(--accent-teal); background: var(--accent-teal-soft); }
@media (hover: hover) and (pointer: fine) {
  .primary-button:not(:disabled):hover, .send-button:not(:disabled):hover,
  .attachment-page .analyze-all-button:not(:disabled):hover { background: var(--blue-deep); color: #fff; }
  #chatButton:not(:disabled):hover { background: #584097; }
  #quickWechatButton:not(:disabled):hover, #copyWechatButton:not(:disabled):hover { background: #dcefe7; color: #1b594e; }
  .filter:not([data-filter="all"]):not(.active):hover { background: var(--filter-soft); box-shadow: inset 0 0 0 1px var(--filter-ink); }
  .attachment-filter:hover { box-shadow: inset 0 0 0 1px var(--accent-violet); }
}
@media (max-width: 760px) {
  /* Reserve a real footer row, including on mail without attachments. */
  .email-labels { min-height: 28px; padding-right: 76px; }
  .email-row .priority-label { bottom: 18px; }
}
@media (prefers-contrast: more) {
  .priority-label, .priority-pill, .attachment-badge { outline: 1px solid currentColor; }
}

/* Mailbox identity stays visible while using the same workspace. */
.mailbox-switcher { display: grid; gap: 2px; min-width: 160px; max-width: 220px; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.mailbox-switcher select { width: 100%; min-height: 26px; padding: 0 20px 0 0; border: 0; color: var(--ink); background: transparent; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.mailbox-switcher select:focus-visible { outline: 3px solid #3159c74d; outline-offset: 3px; border-radius: 3px; }
.mailbox-address { overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0; }
.draft-sender { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-quiet); font-size: .78rem; }
.draft-sender span { color: var(--muted); }
.draft-sender strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.agent-mailbox-context { margin: -6px 0 18px; color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
@media (max-width: 1179px) and (min-width: 761px) {
  .top-actions { gap: 12px; }
  .brand-personal, .brand-divider { display: none; }
}
@media (max-width: 760px) {
  .topbar { display: grid; grid-template-columns: minmax(0, 1fr) 36px 38px; column-gap: 12px; row-gap: 10px; }
  .topbar .brand { grid-area: 1 / 1; }
  .topbar .top-actions { display: contents; }
  .topbar .sync-button { grid-area: 1 / 2; }
  .topbar .avatar-button { grid-area: 1 / 3; }
  .topbar .mailbox-switcher { grid-area: 2 / 1 / 3 / 4; display: flex; align-items: center; gap: 12px; min-width: 0; max-width: none; min-height: 44px; padding: 8px 12px; border-radius: 11px; }
  .mailbox-switcher select { flex: 0 1 130px; min-width: 88px; min-height: 28px; }
  .mailbox-address { flex: 1; text-align: right; font-size: 11px; }
  .topbar .account-menu { top: 62px; right: 16px; }
}
