/* System/light/dark share the same green identity and layout. */
.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; }
.theme-control { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-size: 12px; }
.theme-control select { padding: 7px 9px; min-height: 34px; font-size: 12px; width: 86px; }
.top-theme { flex: none; }
.login-footer { display: flex; flex-direction: column; align-items: center; gap: 16px; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ground: #191f1b; --surface: #222a25;
  --ink: #c9d0c9; --ink-2: #adb8ae; --ink-3: #9ea99f;
  --line: #333d35; --line-strong: #48554b;
  --accent: #aabd9f; --accent-tint: #2d3b30;
  --support: #a4bca7; --ok: #a4bca7; --admin: #b9b5ca;
  --signal: #d2a2a3; --signal-tint: #382d30;
  --other: #c7b38b; --gold: #b4a17d; --done: #7f9083;
  --shadow: 0 4px 18px #0000000c;
}
html[data-theme="dark"] :is(.top, .list-pane, .list-head, .thread-head, .composer, .composer-note, .composer-error, .composer-reply, .settings-card, .filters, .members-list, .member-card, .profile, .dialog, .reopen-dialog, .a-composer, .a-detail, .a-stop-confirmation, .cash-history) { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] :is(.thread-pane, .msgs, .login-form-side, .member-profile, .profile-empty) { background: var(--ground); }
html[data-theme="dark"] :is(.rail, .convs .section, .search-field, .tabs, .connection-status, .members-list > input, .hbar-track, .table th, .table thead, .a-message, .cash .cash-table th) { background: #273129; color: var(--ink-2); border-color: var(--line); }
html[data-theme="dark"] .sidebar { background: #1c2922; border-color: #354137; }
html[data-theme="dark"] :is(.page-head, .thread-context, .cash-history, .tile) { border-color: var(--line); }
html[data-theme="dark"] :is(.page-heading .eyebrow, .a-kicker) { color: #beae8d; }
html[data-theme="dark"] .btn:not(.btn-quiet) { background: #394f40; color: #dce3d9; border-color: #5a6c59; box-shadow: none; }
html[data-theme="dark"] .btn:hover { background: #435c49; border-color: #7d9277; }
html[data-theme="dark"] .btn-quiet { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
html[data-theme="dark"] .btn-quiet:hover { background: #303e33; color: var(--ink); border-color: #76866c; }
html[data-theme="dark"] :is(.btn-danger, .btn-danger-solid) { color: #dcc0ba; background: #4a3438; border-color: #785159; }
html[data-theme="dark"] :is(input, select, textarea, .composer textarea, .login-card input) { color: var(--ink); background: #1e2721; border-color: var(--line-strong); }
html[data-theme="dark"] .search-field input { background: transparent; }
html[data-theme="dark"] :is(.tabs button[aria-selected="true"], .tabs button[aria-pressed="true"], .chip-btn[aria-pressed="true"], .member-card[aria-selected="true"], .rail-item[aria-pressed="true"], .conv[aria-selected="true"], .table tr[data-selected="true"] td) { color: var(--ink); background: #344235; border-color: #708066; }
html[data-theme="dark"] :is(.rail-title, .thread-where, .member-card:hover, .member-card[aria-selected="true"] .member-card-name) { color: var(--ink-2); }
html[data-theme="dark"] :is(.rail-item:hover, .conv:hover, .member-card:hover, .table tbody tr:hover, .table tr.clickable:hover td, .cash .cash-table tbody tr:hover) { background: #2d3830; }
html[data-theme="dark"] .conv { border-bottom-color: var(--line); }
html[data-theme="dark"] .bubble { background: #28332b; border-color: #3b483d; color: var(--ink); box-shadow: none; }
html[data-theme="dark"] .bubble.agent { background: #344235; border-color: #485642; color: #cbd4c5; }
html[data-theme="dark"] .bubble.failed { background: var(--signal-tint); border-color: #735054; }
html[data-theme="dark"] :is(.bubble-meta, .bubble.agent .bubble-meta, .message-quote strong) { color: #aebca5; }
html[data-theme="dark"] .message-quote { background: #171e1840; border-color: #a29372; color: #bcc7b4; }
html[data-theme="dark"] :is(.thread-context, .sys.reopening, .a-preview, .a-attention) { background: #323329; border-color: #4d503e; color: #c5bb9c; }
html[data-theme="dark"] :is(.thread-context strong, .reopening-label) { color: #c8b893; }
html[data-theme="dark"] :is(.empty-icon, .settings-icon, .login-symbol, .count-badge, .me-avatar, .presence .avatar) { color: #b0bfa4; background: #303d31; border-color: #45513e; box-shadow: none; }
html[data-theme="dark"] .chip { background: #313c33; color: #b7c4b7; }
html[data-theme="dark"] :is(.chip-support, .cash .cash-badge[data-state="fresh"], .a-badge[data-status="active"], .a-badge[data-status="sent"], .a-badge[data-status="completed"]) { background: #314034; color: #b0c6b4; }
html[data-theme="dark"] :is(.chip-admin, .chip-role) { background: #363642; color: #beb9d0; }
html[data-theme="dark"] :is(.chip-other, .chip-star, .cash .cash-badge[data-state="stale"], .a-badge[data-status="uncertain"], .a-badge[data-status="unknown"], .a-badge[data-status="paused"]) { background: #3b372c; color: #c9ba99; }
html[data-theme="dark"] :is(.chip-bad, .a-badge[data-status="failed"], .a-badge[data-status="stopped"]) { background: var(--signal-tint); color: var(--signal); }
html[data-theme="dark"] .chip-muted, html[data-theme="dark"] .a-badge { background: #313a33; color: var(--ink-2); }
html[data-theme="dark"] .a-badge[data-status="sending"] { background: var(--accent-tint); color: var(--accent); }
html[data-theme="dark"] .a-message[data-attribution="admin"] { background: #34332a; border-color: #81704b; }
html[data-theme="dark"] .a-message[data-attribution="senior"] { background: #2a3337; border-color: #637c89; }
html[data-theme="dark"] .a-notice:not(:empty) { background: #303e32; border-color: #4d6050; color: #bcccb4; }
html[data-theme="dark"] .a-error:not(:empty) { border-color: #705253; }
html[data-theme="dark"] .cash .cash-table tbody tr:nth-child(even) { background: #252e27; }
html[data-theme="dark"] .cash .cash-group-history { background: transparent; border: 0; color: var(--ink); }
html[data-theme="dark"] .cash-summary-card[data-state="fresh"] > strong { color: #b0c7b0; }
html[data-theme="dark"] .cash-summary-card[data-state="stale"] > strong { color: #c9b891; }
html[data-theme="dark"] .cash-summary-card[aria-pressed="true"] { background: #303f32; border-color: #869671; }
html[data-theme="dark"] .cash-summary-card:hover { border-color: #7c8c6e; }
html[data-theme="dark"] .tile { --tone: #b0bfa4; --tint: #313f32; border-top-color: #776e52; }
html[data-theme="dark"] .tone-rose { --tone: #cdb0ad; --tint: #3d3236; }
html[data-theme="dark"] .tone-amber { --tone: #c9ba95; --tint: #39372d; }
html[data-theme="dark"] .tone-blue { --tone: #b2c1c8; --tint: #303b40; }
html[data-theme="dark"] .tone-teal { --tone: #b0c6b9; --tint: #303f38; }
html[data-theme="dark"] .chart-empty { background: repeating-linear-gradient(to top, transparent 0 51px, #333d35 51px 52px); }
html[data-theme="dark"] .trend-area { fill: #a8be9613; }
html[data-theme="dark"] :is(.trend-line.series-0, .trend-point.series-0) { stroke: #a8be96; }
html[data-theme="dark"] :is(.trend-line.series-1, .trend-point.series-1) { stroke: #bdae86; }
html[data-theme="dark"] .trend-point { fill: var(--surface); }
html[data-theme="dark"] .chart-grid { stroke: var(--line); }
html[data-theme="dark"] .axis-label { fill: var(--ink-3); }
html[data-theme="dark"] .login-story { background: #1c2922; }
html[data-theme="dark"] .dialog::backdrop, html[data-theme="dark"] .reopen-dialog::backdrop { background: #0009; }
html[data-theme="dark"] #syncStatus { background: var(--surface); color: var(--ink); }
@media (max-width: 800px) {
  .top { gap: 8px; }
  .top .connection-status { padding: 7px; }
  .top #connLabel { display: none; }
  .top-theme select { width: 78px; }
}
@media (max-width: 500px) { .top .presence { display: none; } }
html[data-theme="dark"] :is(.profile-head, .strip, .recent, .detail, .account-identity, .announcement-grants, .senior-control, .chip-btn, .assignment-dialog) { background: var(--surface); color: var(--ink); border-color: var(--line); }
html[data-theme="dark"] .member-card[aria-pressed="true"] { background: var(--accent-tint); }
html[data-theme="dark"] .confirm { background: var(--signal-tint); border-color: #705253; }
html[data-theme="dark"] .assignment-dialog::backdrop { background: #0009; }
html[data-theme="dark"] .pill { background: #854b54; color: #e8d8d3; }

/* Soft charcoal surfaces, restrained sage accents, and clear reading sizes. */
html[data-theme="dark"] .brand { color: #d0d8cf; }
html[data-theme="dark"] .brand-mark { background: #b7aa84; border-color: #c0b491; color: #25382c; }
html[data-theme="dark"] .brand small { color: #aab3a3; }
html[data-theme="dark"] .nav-caption { color: #9eac9f; }
html[data-theme="dark"] .nav a { color: #b3c0b5; }
html[data-theme="dark"] .nav a:hover { background: #2b3930; color: #d0d8ca; }
html[data-theme="dark"] .nav a[aria-current="page"] { background: #324237; border-color: #4c604f; color: #d4dcca; }
html[data-theme="dark"] .nav a[aria-current="page"] > [data-icon] { color: #c1b388; }
html[data-theme="dark"] .nav a[aria-current="page"]::before { background: #ad9e77; }
html[data-theme="dark"] :is(.sidebar-footer b, .sidebar-footer > [data-icon]) { color: #b1bda9; }
html[data-theme="dark"] .sidebar-footer { color: #9eac9f; border-top-color: var(--line); }
html[data-theme="dark"] :is(.bubble-text, .a-message) { font-size: 14px; line-height: 1.75; }
html[data-theme="dark"] :is(.bubble-meta, .sys time, .conv-top time, .thread-where, .cash .cash-table small) { font-size: 11px; line-height: 1.55; }
html[data-theme="dark"] .sys:not(.reopening) { font-size: 11px; line-height: 1.65; }
html[data-theme="dark"] .table { font-size: 13px; line-height: 1.6; }
html[data-theme="dark"] .table th { font-size: 11px; }
html[data-theme="dark"] :is(.chip, .a-badge, .cash .cash-badge) { font-size: 11px; font-weight: 500; }
html[data-theme="dark"] .conv-preview { font-size: 12px; line-height: 1.55; }
html[data-theme="dark"] :is(.message-quote, .reply-target-text) { line-height: 1.6; }
html[data-theme="dark"] .login-intro h1 { color: #d4dbd1; }
html[data-theme="dark"] .login-intro h1 em { color: #c3b68f; }
html[data-theme="dark"] .illustration-card b { color: #c5cec2; }
html[data-theme="dark"] :focus-visible { outline-color: #a5b490; outline-width: 2px; outline-offset: 3px; }
html[data-theme="dark"] * { scrollbar-color: #536255 transparent; }
html[data-theme="dark"] ::selection { background: #485e45; color: #e0e7d9; }
html[data-theme="dark"] .tile:not(.tone-rose):not(.tone-amber):not(.tone-blue):not(.tone-teal) { --tone: #b0bfa4; --tint: #313f32; }
html[data-theme="dark"] :is(.conv-avatar, .member-card .avatar, .table-person .avatar) { filter: saturate(.45); color: #d4dbd1; }
html[data-theme="dark"] .rail-meta { font-size: 11px; }
html[data-theme="dark"] .convs .section { font-size: 10.5px; }
html[data-theme="dark"] :is(.rail-item[aria-pressed="true"] .rail-meta, .conv[aria-selected="true"] time) { color: var(--ink-2); }
