/* Account appearance. No private data is stored by the theme script. */
:root { color-scheme: light; --surface-alt: #faf8fc; --field-border: #dfd8e7; }
.account-settings-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 25px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.account-settings-nav a { padding: 10px 16px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.account-settings-nav a:hover { background: var(--white); color: var(--plum); }
.account-settings-nav a[aria-current="page"] { background: var(--plum-soft); color: var(--plum); }
.appearance-panel { max-width: 850px; }
.appearance-panel > p { max-width: 650px; line-height: 1.8; }
.appearance-options { border: 0; margin: 8px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.appearance-choice { position: relative; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; gap: 10px; }
.appearance-choice input { position: absolute; top: 16px; right: 16px; }
.appearance-choice:has(input:checked) { border-color: var(--plum); outline: 1px solid var(--plum); background: var(--plum-soft); }
.appearance-choice:focus-within { outline: 3px solid var(--plum); outline-offset: 3px; }
.appearance-choice strong { margin-top: 4px; font-size: 14px; color: var(--ink); }
.appearance-preview { display: grid; grid-template-columns: 25% 1fr; gap: 8px; width: 100%; height: 92px; margin-top: 22px; padding: 9px; background: #f5f2f8; border: 1px solid #ded8e5; border-radius: 7px; }
.appearance-preview > span:first-child { background: #e1d5eb; border-radius: 3px; }
.appearance-preview > span:last-child { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.appearance-preview i { display: block; height: 12px; background: white; border: 1px solid #e9e2ef; border-radius: 3px; }
.appearance-preview i:first-child { width: 65%; height: 6px; background: #8755a4; border: 0; }
.appearance-preview-dark { background: #211b2b; border-color: #4d405c; }
.appearance-preview-dark > span:first-child { background: #362a43; }
.appearance-preview-dark i { background: #352c40; border-color: #51415d; }
.appearance-preview-dark i:first-child { background: #c19bdc; }
.appearance-preview-system { background: linear-gradient(115deg, #f5f2f8 50%, #211b2b 50%); }
.appearance-preview-system > span:first-child { background: #d9cde4; }
.appearance-preview-system i { background: #8e7b9e; border-color: transparent; }

@media screen {
  html[data-theme="dark"] {
    color-scheme: dark;
    --plum: #d2adef;
    --plum-dark: #ead5fa;
    --plum-soft: #362641;
    --lime: #c4d064;
    --lime-soft: #2d3520;
    --ink: #f0eaf6;
    --muted: #b9afc6;
    --line: #3c3348;
    --canvas: #18141f;
    --white: #231d2c;
    --surface-alt: #2b2335;
    --field-border: #55465f;
    --green: #8dd4b5;
    --green-soft: #1d392e;
    --blue: #aac9f3;
    --blue-soft: #23354c;
    --amber: #efc888;
    --amber-soft: #3e3020;
    --red: #ffa8b8;
    --red-soft: #42232d;
    --shadow: 0 3px 18px #0002;
  }
  html[data-theme="dark"] :is(.gh-state-page, .gh-state-embedded, .gh-feedback) {
    --gh-plum: var(--plum); --gh-plum-dark: var(--plum-dark); --gh-plum-soft: var(--plum-soft);
    --gh-lime: var(--lime); --gh-ink: var(--ink); --gh-muted: var(--muted); --gh-line: var(--line); --gh-canvas: var(--canvas);
  }
  html[data-theme="dark"] :is(.profile-popover, .stat-card, .portfolio-item, .details-panel, .plan-card,
    .article-card, .auth-shell, .gh-state-card, .gh-state-symbol, .gh-feedback-private-link,
    .ug-screen-card, .ug-screen-tabs a, .ug-example-top, .ug-hero-emblem > svg) {
    background: var(--white); border-color: var(--line); color: var(--ink);
  }
  html[data-theme="dark"] :is(.workspace-box, .mode-badge, .nav-link:hover, .data-table th,
    .data-table tbody tr:hover, .allowance-note, .form-actions, .conversation-intro, .composer,
    .usage-item, .approval-card .prose, .article-body pre, .policy-note, .coverage-notice,
    .mfa-help, .inbox-item:hover, .inbox-item:focus-visible, .attachment-picker,
    .attachment-selection-summary, .ug-demo-message, .gh-state-help) {
    background: var(--surface-alt); border-color: var(--line);
  }
  html[data-theme="dark"] .auth-form input:not([type="checkbox"]):not([type="radio"]),
  html[data-theme="dark"] :is(input, select, textarea, .auth-form input, .search-field input,
    .attachment-picker input, .authenticator-boxes span) {
    color: var(--ink); background: var(--canvas); border-color: var(--field-border);
  }
  html[data-theme="dark"] :is(input, textarea)::placeholder { color: #a296b0; }
  html[data-theme="dark"] :is(input, select, textarea):focus { border-color: var(--plum); outline-color: #bb8bdc45; }
  html[data-theme="dark"] .button.primary { background: var(--brand-button, #79459c); color: #fff; }
  html[data-theme="dark"] .button.primary:hover { background: var(--brand-button-hover, #9258b8); }
  html[data-theme="dark"] :is(.button.secondary, .attachment-remove) { background: var(--white); color: var(--ink); border-color: var(--field-border); }
  html[data-theme="dark"] :is(.button.secondary:hover, .attachment-remove:hover) { background: var(--surface-alt); }
  html[data-theme="dark"] .button.danger { border-color: #7c3a49; }
  html[data-theme="dark"] :is(label, .nav-link, .breadcrumb strong, .cell-label, .prose,
    .detail-list dd, .mini-ledger b, .timeline strong, .time-row p, .article-body p,
    .article-body li, .profile-popover button, .inbox-item, .coverage-notice, .policy-note) { color: var(--ink); }
  html[data-theme="dark"] :is(.nav-heading, .nav-link svg, .sidebar-footer, .support-mark,
    .breadcrumb, .mode-badge, .profile-menu summary > span:last-child, .page-footer, .icon-button,
    .stat-label, .stat-card small, .table-meta, .data-table th, .data-table td > small,
    .priority, .guide-callout p, .allowance-plan strong, .mini-ledger > div, .allowance-note,
    .help, .detail-list dt, .ticket-heading .subline, .message-header small, .message-header time,
    .timeline li, .time-row small, .usage-item span, .usage-item small, .credit-row p,
    .auth-note, .authenticator-control .field-help, .mfa-note, .inbox-copy time,
    .attachment-selection-file small) { color: var(--muted); }
  html[data-theme="dark"] :is(.support-mark strong, .plan-price, .usage-item strong, .details-panel summary,
    .inbox-action, .inbox-unread, .inbox-filters a, .attachment-picker > svg, .login-password-toggle) { color: var(--plum); }
  html[data-theme="dark"] :is(.badge:not([class*="badge-"]), .badge-archived, .badge-retired,
    .badge-historical, .badge-suppressed, .badge-disabled, .badge-simulated) { color: #c5bad1; background: #352b40; }
  html[data-theme="dark"] .data-table td { border-color: var(--line); }
  html[data-theme="dark"] :is(.guide-callout, .ug-hero, .gh-state-aside) { background: linear-gradient(125deg, #30233c, #241d2c); border-color: var(--line); }
  html[data-theme="dark"] :is(.guide-art, .org-monogram, .mfa-hero-icon, .inbox-symbol,
    .authenticator-boxes span.is-filled, .inbox-filters a[aria-current="page"], .timer-box,
    .login-password-toggle:hover, .ug-demo-digits span) { background: var(--plum-soft); color: var(--plum); border-color: #624575; }
  html[data-theme="dark"] .authenticator-boxes span.is-current { border-color: var(--plum); box-shadow: 0 0 0 3px #b585d733; }
  html[data-theme="dark"] .art-dot { border-color: var(--plum-soft); }
  html[data-theme="dark"] .ring-track { stroke: #43344f; }
  html[data-theme="dark"] :is(.care-card, .care-icon) { background: var(--lime-soft); border-color: #44512d; }
  html[data-theme="dark"] :is(.care-card p, .care-card .text-link, .care-icon) { color: #cad598; }
  html[data-theme="dark"] :is(.message.private, .private-composer, .ug-private-note) { background: var(--amber-soft); border-color: #6a512b; }
  html[data-theme="dark"] :is(.private-composer summary, .ug-private-note p, .login-verification-notice) { color: var(--amber); }
  html[data-theme="dark"] .timeline li { border-color: var(--line); }
  html[data-theme="dark"] .timeline li:before { background: var(--plum); }
  html[data-theme="dark"] :is(.inbox-list li, .attachment-selection, .attachment-selection-list li, .renewal-offer, .ug-screen-frame) { border-color: var(--line); }
  html[data-theme="dark"] .attachment-picker input::file-selector-button { background: var(--plum-soft); color: var(--plum); }
  html[data-theme="dark"] :is(.attachment-client-error, .attachment-server-error) { color: var(--red); background: var(--red-soft); border-color: #713a49; }
  html[data-theme="dark"] :is(.ug-demo-fields input:disabled, .ug-demo-fields textarea:disabled, .ug-demo-fields select:disabled) { background: var(--canvas); color: var(--ink); -webkit-text-fill-color: var(--ink); }
  html[data-theme="dark"] .ug-screen-tabs a[aria-current="page"] { background: #79459c; color: white; }
  html[data-theme="dark"] .alert { border-color: var(--line); }
  html[data-theme="dark"] .alert.success { background: var(--green-soft); color: var(--green); border-color: #35624c; }
  html[data-theme="dark"] .alert.error { color: var(--red); border-color: #713a49; }
  html[data-theme="dark"] .alert.notice { color: var(--amber); border-color: #6a512b; }
  html[data-theme="dark"] .gh-feedback { --gh-feedback-accent: var(--plum); --gh-feedback-background: #30223b; --gh-feedback-border: #574363; --gh-feedback-symbol: #473053; }
  html[data-theme="dark"] .gh-feedback-success { --gh-feedback-accent: var(--green); --gh-feedback-background: #1d332a; --gh-feedback-border: #35624c; --gh-feedback-symbol: #2c4d3b; }
  html[data-theme="dark"] .gh-feedback-error { --gh-feedback-accent: var(--red); --gh-feedback-background: #3d222d; --gh-feedback-border: #713a49; --gh-feedback-symbol: #542c3a; }
  html[data-theme="dark"] .gh-feedback-warning { --gh-feedback-accent: var(--amber); --gh-feedback-background: #3e3020; --gh-feedback-border: #6a512b; --gh-feedback-symbol: #564020; }
  html[data-theme="dark"] .back-to-top { background: var(--brand-button, #5a326f); border-color: var(--plum); }
  html[data-theme="dark"] .back-to-top:hover { background: var(--brand-button-hover, #79459c); }
  html[data-theme="dark"] .brand img { background: #fff; border-radius: 7px; padding: 3px; }
  html[data-theme="dark"] .auth-story .brand img { padding: 5px; }
}
@media (max-width: 600px) {
  .appearance-options { grid-template-columns: 1fr; }
  .appearance-choice { display: grid; grid-template-columns: 100px 1fr; align-items: center; padding-right: 42px; }
  .appearance-choice .appearance-preview { grid-row: span 2; margin: 0; height: 72px; }
  .appearance-choice strong { align-self: end; margin: 0; }
  .appearance-choice .help { align-self: start; }
  .account-settings-nav a { padding: 9px 11px; }
}
@media print { .account-settings-nav, .appearance-options { display: none; } }
