/* Lighter cream & teal light theme.
   Background #F8F3E8; cream tint #F4ECD7; teal #2A8C82; blue #155A8A;
   red #9E3D2F; ink #3A3343; Query headings #0C324C. */
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f8f3e8;
  --paper-deep: #f3eee4;
  --card: #fcfaf5;
  --ink: #3a3343;
  --muted: #716c74;
  --faint: #6f6c72;
  --line: #e1dedc;
  --line-strong: #cac6c7;
  --forest: #257a71;
  --forest-strong: #1e625b;
  --forest-soft: #ecf2ec;
  --forest-mid: #2f716f;
  --peach: #9e3d2f;
  --peach-hover: #90382b;
  --peach-soft: #f6eee8;
  --accent: #257a71;
  --on-accent: #fffdf8;
  --amber: #946724;
  --red: #9e3d2f;
  --surface-raised: #faf7ee;
  --surface-hover: #eef3ee;
  --surface-input: #fefdfb;
  --surface-glass: rgba(252, 250, 245, 0.97);
  --warning-surface: #faf2df;
  --warning-text: #755012;
  --danger-surface: #faeeeb;
  --danger-line: #d3a89f;
  --shadow-sm: 0 1px 2px rgba(52, 46, 60, 0.04), 0 8px 22px rgba(52, 46, 60, 0.03);
  --shadow-md: 0 16px 38px rgba(52, 46, 60, 0.08), 0 2px 8px rgba(52, 46, 60, 0.04);
  --shadow-lg: 0 32px 90px rgba(52, 46, 60, 0.17), 0 4px 12px rgba(52, 46, 60, 0.08);
  --network-card-surface: #fcfaf5;
  --network-card-surface-hover: #eef3ee;
  --network-card-border: var(--line);
  --network-card-border-hover: var(--line-strong);
  --network-card-shadow: var(--shadow-sm);
  --network-card-shadow-hover: var(--shadow-md);
  --auth-surface: #fcfaf5;
  --auth-input: #fefdfb;
  --auth-text: #3a3343;
  --auth-text-secondary: var(--muted);
  --auth-primary: #216d65;
  --auth-on-primary: #fffdf8;
  --auth-border: var(--line-strong);
  --auth-danger: #9e3d2f;
  --palette-brand: #216d65;
  --palette-on-brand: #fffdf8;
  --palette-brand-hover: #1e625b;
  --palette-secondary: #155a8a;
  --palette-secondary-text: #155a8a;
  --palette-secondary-soft: #edf0ee;
  --palette-query-heading: #0c324c;
  --palette-on-secondary: #ffffff;
  --palette-secondary-hover: #13517c;
  --palette-accent: #9e3d2f;
  --palette-on-accent: #ffffff;
  --palette-brand-08: rgba(42, 140, 130, 0.08);
  --palette-brand-10: rgba(42, 140, 130, 0.1);
  --palette-brand-12: rgba(42, 140, 130, 0.12);
  --palette-focus: #2a8c82;
  --palette-focus-ring: rgba(42, 140, 130, 0.22);
  --palette-on-brand-12: rgba(255, 253, 248, 0.12);
  --palette-accent-14: rgba(158, 61, 47, 0.14);
  --palette-accent-24: rgba(158, 61, 47, 0.24);
  --palette-danger-ring: rgba(158, 61, 47, 0.15);
  --palette-warning-line: #d4bd85;
  --palette-success-line: #93c3bc;
  --palette-meter-start: #93c3bc;
  --palette-paper-glass: rgba(248, 243, 232, 0.72);
  --palette-paper-clear: rgba(248, 243, 232, 0);
  --palette-scrim: rgba(0, 0, 0, 0.3);
  --palette-avatar-text: #183d32;
}
:root[data-theme="light"] body {
  background: var(--paper);
  color: var(--ink);
}
:root[data-theme="light"] dialog { color: var(--ink); }
:root[data-theme="light"] ::selection { background: var(--forest); color: var(--on-accent); }
:root[data-theme="light"] :is(button, a, input, textarea, select):focus-visible {
  outline-color: var(--forest);
}
:root[data-theme="light"] :is(input, textarea, select) { caret-color: var(--forest); }

/* Dark ink carries headings; colored ink identifies actions. */
:root[data-theme="light"] :is(.hero-card h2, .network-page-heading h2, .contact-identity-name, .detail-top-group h2, .reminder-tray-header h2, .profile-ai-usage h3, .profile-ai-metrics strong, .deep-search-panel h2, .settings-theme legend, .app-about-card h3, .app-about-contact h3) { color: var(--ink); }
:root[data-theme="light"] .query-action-card h2 { color: var(--forest); }
:root[data-theme="light"] :is(.home-note-composer > button, .note-dictate-button, .mobile-nav-capture, .hero-action, .button.peach) { background: var(--peach); color: var(--palette-on-accent); }
:root[data-theme="light"] :is(.home-note-composer > button, .note-dictate-button, .mobile-nav-capture, .hero-action, .button.peach):hover { background: var(--peach-hover); }

/* Navigation, translucent layers and shared cards. */
:root[data-theme="light"] .sidebar { background: var(--card); border-color: var(--line); }
:root[data-theme="light"] .nav-item { color: var(--muted); }
:root[data-theme="light"] .nav-item:hover { background: var(--forest-soft); }
:root[data-theme="light"] .nav-item em { background: var(--forest-soft); }
:root[data-theme="light"] .nav-item.active { background: var(--forest); color: var(--on-accent); }
:root[data-theme="light"] .nav-item.active em { background: var(--palette-on-brand-12); color: var(--on-accent); }
:root[data-theme="light"] :is(.how-it-works-button, .feedback-button, .topbar-about-link, .nested-back-button, .contact-log-button) {
  border-color: var(--line);
  background: var(--card);
}
:root[data-theme="light"] :is(.how-it-works-button, .feedback-button, .topbar-about-link, .nested-back-button, .contact-log-button):hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}
:root[data-theme="light"] :is(.how-it-works-button.active, .topbar-about-link.active) { background: var(--forest); color: var(--on-accent); }
:root[data-theme="light"] .avatar-button { border-color: var(--line-strong); background: var(--forest-soft); }
:root[data-theme="light"] .avatar-button:hover { background: var(--surface-hover); }
:root[data-theme="light"] .account-sign-out { color: var(--red); }
:root[data-theme="light"] .list-sort-toggle { background: var(--paper-deep); }
:root[data-theme="light"] :is(.reminder-tray, .group-picker-suggestions) {
  border-color: var(--line-strong);
  background: var(--surface-glass);
  box-shadow: var(--shadow-lg);
}
:root[data-theme="light"] .reminder-tray-scrim { background: rgba(0, 0, 0, .4); }
:root[data-theme="light"] :is(.capture-draft-card, .memory-row, .activity-row, .panel-card, .how-note-example, .how-query-examples button, .how-reminder-panel) {
  border-color: var(--line);
  background: var(--card);
}
:root[data-theme="light"] .empty-state { border-color: var(--line-strong); background: var(--card); }
:root[data-theme="light"] :is(.person-card footer, .group-card footer, .reminder-row, .reminder-tray-item, .saved-note-card + .saved-note-card, .contact-profile-footer) { border-color: var(--line); }
:root[data-theme="light"] .saved-notes-panel { border-color: var(--line); }
:root[data-theme="light"] .group-pill { border-color: var(--line-strong); background: var(--forest-soft); color: var(--forest); }
/* Initials keep their assigned pastel avatar colors; photos are untouched. */
:root[data-theme="light"] .person-avatar { color: var(--palette-avatar-text); }
:root[data-theme="light"] .group-icon:not([class*="group-icon-color-"]) { color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  :root[data-theme="light"] .contact-identity-copy:has(> .contact-identity-edit-target:hover) { background: var(--forest-soft); }
}
/* Detail back arrows keep their full tap target without a frame beside the avatar. */
:root[data-theme="light"] :is(.detail-top-group, .detail-top-contact) .nested-back-button,
:root[data-theme="light"] :is(.detail-top-group, .detail-top-contact) .nested-back-button:hover {
  border-color: transparent;
  background: transparent;
}

/* Form surfaces use a quiet inset color, including all contact editors. */
:root[data-theme="light"] :is(.field input, .field textarea, .field select, .search-control input, .home-query-form input, .contact-merge-search input, .group-picker-control, .contact-search-control, .ask-form, .voice-transcript-card) {
  border-color: var(--line-strong);
  background: var(--surface-input);
  color: var(--ink);
  box-shadow: none;
}
:root[data-theme="light"] :is(.home-note-composer textarea, .note-composer-field textarea) {
  border-color: var(--line);
  background: var(--surface-input);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
:root[data-theme="light"] :is(.home-note-composer textarea, .note-composer-field textarea):hover { background: var(--surface-input); border-color: var(--line-strong); }
:root[data-theme="light"] :is(.field input, .field textarea, .field select, .home-query-form input):focus,
:root[data-theme="light"] :is(.group-picker-control, .contact-search-control):focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--palette-focus-ring);
}
:root[data-theme="light"] :is(.home-note-composer textarea, .note-composer-field textarea):focus {
  background: var(--surface-input);
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--palette-focus-ring);
}
:root[data-theme="light"] :is(.field input:read-only, .field input:disabled, .field textarea:disabled, .field select:disabled, .home-query-form input:disabled, .ask-form[aria-disabled="true"]) {
  border-color: var(--line);
  background: var(--paper-deep);
  color: var(--faint);
}
:root[data-theme="light"] :is(.field.provisional input, .field.provisional textarea) { background: var(--surface-input); }
:root[data-theme="light"] .field input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px var(--palette-danger-ring); }
:root[data-theme="light"] .contact-details-dialog .field > .date-control {
  border-color: var(--line-strong);
  background: var(--surface-input);
}
:root[data-theme="light"] .contact-details-dialog .date-control:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px var(--palette-focus-ring);
}
:root[data-theme="light"] .contact-details-dialog .date-control:has(input:disabled) {
  border-color: var(--line);
  background: var(--paper-deep);
}
/* The wrapper owns decoration so the native iPhone field stays within it. */
:root[data-theme="light"] .contact-details-dialog .date-control input,
:root[data-theme="light"] .contact-details-dialog .date-control input:focus {
  background: transparent;
  box-shadow: none;
}
:root[data-theme="light"] :is(.search-control [data-standalone-icon], .contact-picker-search > span, .group-assignment-search > span) { color: var(--faint); }

/* Mint actions always have dark labels; destructive and peach actions retain
   their own contrasting foregrounds. */
:root[data-theme="light"] :is(.button.primary, .home-query-form button, .ask-form button, .bulk-import-notice, .vault-pairing-row button, .install-steps li > span, .ask-choice .voice-choice-icon, .app-about-callout > button) {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--on-accent);
}
:root[data-theme="light"] :is(.button.primary:hover, .home-query-form button:hover, .ask-form button:hover, .bulk-import-notice:hover) { background: var(--forest-strong); color: var(--on-accent); }
:root[data-theme="light"] :is(.home-query-form button:disabled, .ask-form button:disabled) { background: var(--line); color: var(--faint); }
:root[data-theme="light"] .button:hover { border-color: var(--line-strong); }
:root[data-theme="light"] .button:not(.primary):not(.peach):not(.danger):hover { background: var(--surface-hover); }
:root[data-theme="light"] .button.danger { border-color: var(--danger-line); color: var(--red); }
:root[data-theme="light"] .button.danger:hover { background: var(--danger-surface); }
:root[data-theme="light"] .confirm-actions .button.danger { border-color: #8d4037; background: #8d4037; color: #fff4ef; }
:root[data-theme="light"] :is(.group-add-option, .group-new-input-row .icon-button, .contact-reassignment-summary button, .capture-target-card button, .reminder-tray-actions button, .reminder-snooze-options button, .note-composer-close, .deep-search-button, .intent-pill) {
  border-color: var(--line-strong);
  background: var(--surface-raised);
}
:root[data-theme="light"] :is(.group-add-option, .icon-button, .contact-reassignment-summary button, .capture-target-card button, .reminder-tray-actions button, .reminder-snooze-options button, .note-composer-close, .deep-search-button):hover {
  border-color: var(--forest-mid);
  background: var(--surface-hover);
}
:root[data-theme="light"] .prompt-chip { border-color: var(--line-strong); background: var(--card); color: var(--muted); }
:root[data-theme="light"] .prompt-chip:hover { border-color: var(--forest-mid); background: var(--surface-hover); color: var(--ink); }

/* Capture, Ask and their review states. */
:root[data-theme="light"] :is(.home-action-grid .hero-card, .capture-dialog.note-composer-dialog, .capture-dialog.voice-dictation-dialog) {
  border-color: var(--line);
  background: var(--card);
}
:root[data-theme="light"] :is(.query-action-card, .query-awaiting-first-contact, .ask-hero, .deep-search-invitation, .deep-search-panel, .profile-ai-usage, .profile-vault-security) {
  border-color: var(--line);
  background: var(--surface-raised);
}
:root[data-theme="light"] .deep-search-invitation:hover { border-color: var(--forest-mid); background: var(--surface-hover); }
:root[data-theme="light"] :is(.query-locked-note, .query-action-card .prompt-chip) { border-color: var(--line); background: var(--card); }
:root[data-theme="light"] :is(.first-contact-reassurance > span, .duplicate-contact-search-icon, .action-step span) { background: var(--forest-soft); }
:root[data-theme="light"] :is(.capture-dialog, .feedback-dialog, .confirm-dialog, .bulk-import-dialog) { border-color: var(--line-strong); }
:root[data-theme="light"] :is(.capture-dialog, .feedback-dialog, .confirm-dialog, .bulk-import-dialog)::backdrop { background: var(--palette-scrim); }
:root[data-theme="light"] :is(.dialog-header, .feedback-header, .feedback-footer) { border-color: var(--line); background: var(--surface-raised); }
:root[data-theme="light"] .capture-dialog.new-contact-review .dialog-header { border-color: var(--line); background: var(--peach-soft); }
:root[data-theme="light"] .capture-dialog.existing-contact-review .dialog-header { border-color: var(--line-strong); background: var(--forest-soft); }
:root[data-theme="light"] :is(.dictation-guide, .reminder-fields, .contact-create-new) { border-color: var(--line); background: var(--peach-soft); }
:root[data-theme="light"] .contact-create-new:hover { border-color: var(--forest); background: var(--surface-hover); }
:root[data-theme="light"] :is(.voice-choice-card.ask-choice, .action-rail, .spoken-groups, .original-words, .duplicate-contact-suggestions, .capture-target-card, .vault-recovery-code, .bulk-import-batch-field) {
  border-color: var(--line-strong);
  background: var(--forest-soft);
}
:root[data-theme="light"] .voice-choice-card.capture-choice { background: var(--surface-raised); color: var(--ink); }
:root[data-theme="light"] .capture-choice .voice-choice-copy span { color: var(--muted); }
:root[data-theme="light"] .ask-choice .voice-choice-arrow { background: var(--surface-hover); }
:root[data-theme="light"] :is(.memory-original-date, .contact-reassignment, .contact-chooser-empty, .reminder-contact-options, .deep-search-status-line, .evidence) {
  border-color: var(--line-strong);
  background: var(--paper-deep);
  color: var(--muted);
}
:root[data-theme="light"] :is(.confidence, .duplicate-contact-search-all, .contact-reassignment-panel, .profile-ai-breakdown) { border-color: var(--line); }
:root[data-theme="light"] :is(.group-merge-choice, .group-choice, .contact-choice, .duplicate-contact-option) { border-color: var(--line); background: var(--card); }
:root[data-theme="light"] :is(.group-merge-choice, .group-choice, .contact-choice, .duplicate-contact-option):hover { border-color: var(--line-strong); background: var(--surface-hover); }
:root[data-theme="light"] :is(.group-merge-choice, .group-choice, .contact-choice, .contact-picker-row):has(input:checked) { border-color: var(--forest-mid); background: var(--forest-soft); }
:root[data-theme="light"] :is(.contact-reassignment-option:hover, .contact-reassignment-option:focus-visible, .contact-reassignment-option.selected) { border-color: var(--line-strong); background: var(--surface-hover); }
:root[data-theme="light"] :is(.group-merge-check, .group-choice-check, .contact-choice-check, .bulk-contact-checkbox) { border-color: var(--line-strong); background: var(--surface-input); }
:root[data-theme="light"] :is(.group-merge-choice, .group-choice):has(input:checked) :is(.group-merge-check, .group-choice-check),
:root[data-theme="light"] .contact-choice input:checked + .contact-choice-check,
:root[data-theme="light"] .bulk-contact-create-toggle[aria-checked="true"] .bulk-contact-checkbox {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--on-accent);
}
:root[data-theme="light"] :is(.contact-picker-empty, .group-assignment-empty) { border-color: var(--line-strong); }
:root[data-theme="light"] .group-picker-chip button { background: var(--palette-brand-12); }
:root[data-theme="light"] :is(.deep-result-card, .deep-search-match-block.is-low .deep-result-card, .deep-search-status > .deep-search-match-block, .query-group-result-card) { border-color: var(--line); background: var(--card); }
:root[data-theme="light"] .deep-search-match-block.is-high .deep-result-card { border-color: var(--palette-success-line); }
:root[data-theme="light"] .deep-search-match-block.is-low .deep-result-card { border-color: var(--palette-warning-line); }
:root[data-theme="light"] :is(.deep-search-panel-mark, .profile-ai-metrics > div, .vault-device-row, .feedback-preview, .install-steps li) { border-color: var(--line); background: var(--surface-raised); }
:root[data-theme="light"] .deep-match-strength.is-high > strong { background: var(--forest-soft); color: var(--forest); }
:root[data-theme="light"] .deep-match-strength.is-low > strong { background: var(--warning-surface); color: var(--warning-text); }
:root[data-theme="light"] .deep-search-match-block.is-high > h3 { color: var(--forest); }
:root[data-theme="light"] :is(.deep-search-match-block.is-low > h3, .deep-lower-potential-toggle) { color: var(--warning-text); }
:root[data-theme="light"] .deep-match-meter { background: var(--line); }
:root[data-theme="light"] .deep-match-strength.is-high .deep-match-meter i { background: linear-gradient(90deg, var(--palette-meter-start), var(--forest)); }
:root[data-theme="light"] .deep-match-strength.is-low .deep-match-meter i { background: linear-gradient(90deg, #c89a52, var(--amber)); }
:root[data-theme="light"] :is(.deep-search-badge, .vault-pairing-row, .completed-reminder-card) { border-color: var(--line); background: var(--peach-soft); }
:root[data-theme="light"] :is(.result-card, .note-card, .query-group-result-card):hover { border-color: var(--line-strong); }

/* Replace fixed dark inks on secondary copy and colored chips. */
:root[data-theme="light"] :is(.reminder-row strong, .fact-cell strong, .note-card p, .how-note-example > p, .query-summary, .live-transcript, .detail-top-contact .contact-identity-role, .deep-search-reason) { color: var(--ink); }
:root[data-theme="light"] :is(.how-hero > p:last-child, .how-query-examples button, .original-words p, .dictation-purpose, .note-composer-heading p, .install-security-note, .note-composer-close) { color: var(--muted); }
:root[data-theme="light"] :is(.first-contact-kicker, .home-note-meta > button, .query-locked-note span, .capture-draft-card > span, .query-summary span, .deep-search-badge, .group-add-option-icon.peach, .group-picker-suggestion.create > span:first-child, .contact-create-new-icon, .contact-create-new > svg, .how-kicker, .how-closing p, .voice-listening-heading .live-label, .note-composer-tip > span, .completed-reminder-card time, .completed-reminder-card .source-badge, .reminder-tray-item.is-due .reminder-tray-content span, .bulk-contact-issues) { color: var(--peach); }
:root[data-theme="light"] :is(.delete-memory-link, .delete-contact-link, .form-error) { color: var(--red); }
:root[data-theme="light"] :is(.auth-message, .form-save-error, .bulk-import-error) { border-color: var(--danger-line); background: var(--danger-surface); color: var(--red); }
:root[data-theme="light"] .draft-warning { border-color: var(--palette-warning-line); background: var(--warning-surface); color: var(--warning-text); }
:root[data-theme="light"] .confirm-icon { background: var(--danger-surface); }
:root[data-theme="light"] .vault-device-row button { border-color: var(--danger-line); background: var(--danger-surface); color: var(--red); }
:root[data-theme="light"] .vault-device-row button[data-vault-action="rename"] { border-color: var(--line-strong); background: var(--surface-raised); color: var(--forest); }
:root[data-theme="light"] .vault-pairing-row button { border-color: var(--forest); background: var(--forest); color: var(--on-accent); }
:root[data-theme="light"] .feedback-upload { border-color: var(--line-strong); background: var(--paper-deep); }
:root[data-theme="light"] :is(.install-app-icon, .how-step-number) { border-color: var(--line-strong); }
:root[data-theme="light"] kbd { border-color: var(--line-strong); background: var(--surface-raised); }
:root[data-theme="light"] .timeline::before { background: var(--line); }
:root[data-theme="light"] .note-timeline-item::before { box-shadow: 0 0 0 1px var(--line-strong); }
:root[data-theme="light"] :is(.reminder-check, .reminder-check::before) { border-color: var(--faint); }
:root[data-theme="light"] .reminder-tray-item.is-complete { background: var(--forest-soft); }
:root[data-theme="light"] .reminder-tray-item.is-due { background: var(--peach-soft); }
:root[data-theme="light"] .how-reminder-row .reminder-content:hover strong { color: var(--forest); }
:root[data-theme="light"] .bulk-review-group:has(input:checked) { border-color: var(--forest-mid); }
:root[data-theme="light"] .bulk-contact-checkbox { color: var(--surface-input); }
:root[data-theme="light"] .toast { border-color: var(--line-strong); background: var(--surface-hover); }
:root[data-theme="light"] .toast.error { background: #6c302b; }

/* Auth and recovery screens follow the same palette before the app loads. */
:root[data-theme="light"] .auth-gate { background: var(--paper); }
:root[data-theme="light"] .auth-card { border-color: var(--line-strong); background: var(--surface-glass); box-shadow: var(--shadow-lg); }
:root[data-theme="light"] .auth-gate[data-auth-screen="sign-in"] .auth-waitlist-callout { background: var(--forest-soft); border-color: var(--line-strong); color: var(--ink); }
:root[data-theme="light"] .auth-waitlist-callout h2 { color: var(--ink); }
:root[data-theme="light"] .auth-waitlist-button { border-color: var(--forest); background: var(--forest); color: var(--on-accent); }
:root[data-theme="light"] .auth-waitlist-button:hover,
:root[data-theme="light"] .auth-waitlist-button:focus-visible { background: var(--forest-strong); }

/* In-app About retains its illustrations, videos and brand-colored panels. */
:root[data-theme="light"] :is(.app-about-card, .app-about-number, .app-about-examples > p, .app-about-contact > a, .app-about-video-shell) { border-color: var(--line-strong); }
:root[data-theme="light"] .app-about-log { background: var(--peach-soft); }
:root[data-theme="light"] .app-about-query { background: var(--card); }
:root[data-theme="light"] .app-about-remind { background: var(--forest-soft); }
:root[data-theme="light"] .app-about-card header p { color: var(--muted); }
:root[data-theme="light"] .app-about-examples > p { background: var(--card); }
:root[data-theme="light"] .app-about-query .app-about-examples > p { background: var(--forest-soft); color: var(--ink); }
:root[data-theme="light"] .app-about-query .app-about-examples > p > span { background: var(--palette-brand-10); color: var(--peach); }
:root[data-theme="light"] .app-about-remind .app-about-examples > p > span { background: var(--forest-soft); }
:root[data-theme="light"] .app-about-security { background: var(--surface-raised); }
:root[data-theme="light"] :is(.app-about-security-proof, .app-about-key-stays p > span, .app-about-ai-boundary p > span, .app-about-protection-flow article > p, .app-about-security-details p, .app-about-flow-label, .app-about-flow-arrow span) { color: var(--muted); }
:root[data-theme="light"] .app-about-video-error { background: var(--forest-soft); }
:root[data-theme="light"] .about-video-error { background: var(--danger-surface); color: var(--red); }
:root[data-theme="light"] .about-video-pagination button { background: var(--line-strong); }
:root[data-theme="light"] .about-video-pagination button[aria-current="true"] { background: var(--forest); }

/* Evidence pulses must not flash a light card while its text is light. */
:root[data-theme="light"] .note-timeline-item.search-evidence-focus .note-card {
  border-color: var(--peach);
  background: var(--peach-soft);
  animation-name: palette-evidence-note-pulse;
}
:root[data-theme="light"] .reminder-row.search-evidence-focus { background: var(--peach-soft); animation-name: palette-evidence-reminder-pulse; }
@keyframes palette-evidence-note-pulse {
  0%, 18% { border-color: var(--peach); background: var(--peach-soft); box-shadow: 0 0 0 5px var(--palette-accent-24), var(--shadow-md); }
  48% { border-color: var(--peach); background: var(--surface-hover); box-shadow: 0 0 0 3px var(--palette-accent-14), var(--shadow-md); }
  100% { border-color: var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
}
@keyframes palette-evidence-reminder-pulse {
  0%, 20% { background: var(--peach-soft); box-shadow: 0 0 0 5px var(--palette-accent-24), var(--shadow-md); }
  48% { background: var(--surface-hover); box-shadow: 0 0 0 3px var(--palette-accent-14), var(--shadow-sm); }
  100% { background: transparent; box-shadow: none; }
}

@media (max-width: 800px) {
  :root[data-theme="light"] .topbar { border-color: var(--line); background: linear-gradient(to bottom, var(--paper), var(--palette-paper-glass) 42%, var(--palette-paper-clear)); }
  :root[data-theme="light"] .mobile-brand .reminder-badge { border-color: var(--paper); }
  :root[data-theme="light"] .mobile-nav-item { color: var(--faint); }
  :root[data-theme="light"] .mobile-nav-item.active { color: var(--forest); }
  :root[data-theme="light"] .mobile-nav-item.active::after { background: var(--forest); }
  :root[data-theme="light"] .list-sort-toggle { background: transparent; }
  :root[data-theme="light"] .mobile-nav {
    border-color: var(--line-strong);
    background: var(--surface-glass);
    box-shadow: inset 0 1px 0 var(--palette-brand-08), var(--shadow-md);
  }
  :root[data-theme="light"] .mobile-nav-capture { border-color: var(--card); box-shadow: 0 0 0 1px var(--line-strong), 0 9px 22px rgba(0, 0, 0, .3); }
  :root[data-theme="light"] .mobile-nav-capture:active { box-shadow: 0 0 0 1px var(--line-strong), 0 5px 13px rgba(0, 0, 0, .3); }
  :root[data-theme="light"] :is(.dictation-actions, .draft-actions) { background: var(--surface-glass); }
  :root[data-theme="light"] .note-composer-view .dictation-actions { background: transparent; }
  :root[data-theme="light"] :is(.note-composer-view .dictation-actions, .voice-dictation-view .listening-actions) .button.ghost { background: var(--surface-raised); }
}
:root[data-theme="light"] .bulk-import-footer { background: var(--surface-glass); }

:root[data-theme="light"] :is(input, textarea, select)::placeholder { color: var(--faint); opacity: 1; }
:root[data-theme="light"] :is(button, a, input, textarea, select):focus-visible { outline-color: var(--palette-focus); }
:root[data-theme="light"] :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--palette-brand); }
:root[data-theme="light"] ::selection { background: var(--palette-brand); color: var(--palette-on-brand); }

/* A filled swatch and a readable text tint have distinct responsibilities. */
:root[data-theme="light"] :is(.button.primary, .bulk-import-notice, .vault-pairing-row button, .install-steps li > span, .app-about-callout > button, .auth-waitlist-button, .nav-item.active, .how-it-works-button.active, .topbar-about-link.active) {
  border-color: var(--palette-brand); background: var(--palette-brand); color: var(--palette-on-brand);
}
:root[data-theme="light"] :is(.button.primary, .bulk-import-notice, .vault-pairing-row button, .auth-waitlist-button):hover { background: var(--palette-brand-hover); color: var(--palette-on-brand); }
:root[data-theme="light"] .nav-item.active em { color: var(--palette-on-brand); background: var(--palette-on-brand-12); }
:root[data-theme="light"] :is(.group-merge-choice, .group-choice):has(input:checked) :is(.group-merge-check, .group-choice-check),
:root[data-theme="light"] .contact-choice input:checked + .contact-choice-check,
:root[data-theme="light"] .bulk-contact-create-toggle[aria-checked="true"] .bulk-contact-checkbox { border-color: var(--palette-brand); background: var(--palette-brand); color: var(--palette-on-brand); }
:root[data-theme="light"] .group-icon:not([class*="group-icon-color-"]) { background: var(--palette-brand); color: var(--palette-on-brand); }
:root[data-theme="light"] :is(.home-note-composer > button, .note-dictate-button, .mobile-nav-capture, .hero-action, .button.peach) { background: var(--palette-accent); color: var(--palette-on-accent); }
:root[data-theme="light"] :is(.home-note-composer > button, .note-dictate-button, .mobile-nav-capture, .hero-action, .button.peach):hover { background: var(--peach-hover); color: var(--palette-on-accent); }
:root[data-theme="light"] :is(.capture-choice .voice-choice-icon, .voice-listening-icon, .dictation-guide > span) { background: var(--palette-accent); color: var(--palette-on-accent); }
:root[data-theme="light"] :is(.first-contact-kicker::before, .first-contact-kicker::after) { background: var(--palette-accent); }
:root[data-theme="light"] .note-composer-tip > span { background: var(--peach-soft); color: var(--peach); }
:root[data-theme="light"] .capture-draft-card .draft-delete { color: var(--red); }
:root[data-theme="light"] :is(.home-action-grid .hero-card, .note-card, .capture-draft-card, .panel-card, .result-card, .query-group-result-card) { background: var(--card); border-color: var(--line); }

/* Secondary blue (or its edited hue) gives Query a recognizable role. */
:root[data-theme="light"] :is(.query-action-card, .query-awaiting-first-contact, .ask-hero, .deep-search-panel, .deep-search-invitation) { background: var(--palette-secondary-soft); border-color: var(--line); }
:root[data-theme="light"] :is(.deep-search-panel h2, .deep-search-invitation strong, .deep-search-button, .ask-choice .voice-choice-copy strong) { color: var(--palette-secondary-text); }
:root[data-theme="light"] :is(.query-action-card h2, .ask-hero h2) { color: var(--palette-query-heading); }
:root[data-theme="light"] :is(.home-query-form button, .ask-form button, .ask-choice .voice-choice-icon) { border-color: var(--palette-secondary); background: var(--palette-secondary); color: var(--palette-on-secondary); }
:root[data-theme="light"] :is(.home-query-form button, .ask-form button):hover { background: var(--palette-secondary-hover); color: var(--palette-on-secondary); }
:root[data-theme="light"] :is(.home-query-form button:disabled, .ask-form button:disabled) { background: var(--line); color: var(--faint); }
:root[data-theme="light"] :is(.deep-search-badge, .query-summary span) { color: var(--palette-secondary-text); background: var(--palette-secondary-soft); }

/* Keep alerts semantic, and give ordinary toast text readable contrast in light. */
:root[data-theme="light"] .toast { color: var(--ink); background: var(--surface-raised); border-color: var(--line-strong); }
:root[data-theme="light"] .toast button { color: var(--forest); background: var(--forest-soft); }
:root[data-theme="light"] .toast.error { color: var(--red); background: var(--danger-surface); border-color: var(--danger-line); }
:root[data-theme="light"] .toast.error button { color: var(--red); background: var(--danger-surface); }

/* About and account panels include a few literal production inks. */
:root[data-theme="light"] .app-about-security { color: var(--ink); background: var(--surface-raised); }
:root[data-theme="light"] :is(.app-about-security-heading h3, .app-about-key-stays strong, .app-about-ai-boundary strong, .app-about-protection-flow article > strong, .app-about-security-details strong) { color: var(--ink); }
:root[data-theme="light"] :is(.app-about-security-mark, .app-about-flow-arrow, .app-about-boundary-number, .app-about-security-link, .app-about-security-details li > span) { color: var(--palette-secondary-text); border-color: var(--line-strong); }
:root[data-theme="light"] :is(.app-about-security-visual, .app-about-protection-flow article) { background: var(--card); border-color: var(--line); }
:root[data-theme="light"] .app-about-protection-flow article:last-child { background: var(--peach-soft); border-color: var(--line); }
:root[data-theme="light"] :is(.app-about-security-proof, .app-about-key-stays, .app-about-ai-boundary, .app-about-security-details, .app-about-security-details li + li) { border-color: var(--line); }
:root[data-theme="light"] .app-about-ai-boundary { background: var(--surface-raised); }
:root[data-theme="light"] .app-about-key-dot { border-color: var(--palette-secondary); box-shadow: 0 0 0 6px var(--palette-brand-08); }
:root[data-theme="light"] .app-about-examples > p > span { background: var(--peach-soft); color: var(--forest); }
:root[data-theme="light"] .auth-confirmation-mark { background: var(--forest-soft); color: var(--forest); }
