/* Light mode. Loaded last. The v30 layer and the later page styles were built
   dark-first (fixed --o-* tokens and some hard-coded whites and blacks), which
   left white text on white in light mode. Everything here is scoped to
   html[data-theme="light"], so dark mode is untouched. */
html[data-theme="light"] { color-scheme: light; }
html[data-theme="light"] body.orbit-v27 {
  --o-accent: #1a73e8;
  --o-accent-ink: #0b57d0;
  --o-accent-soft: rgba(26, 115, 232, .1);
  --o-bg: #fff;
  --o-side: #f0f0f2;
  --o-raise: #f4f4f5;
  --o-raise-2: #ececef;
  --o-ink: #18181b;
  --o-ink-2: #3f3f46;
  --o-muted: #5f5f67;
  --o-faint: #6e6e76;
  --o-line: #e6e6e9;
  --o-line-strong: #d1d1d6;
  --o-p1: #c5221f;
  --o-p2: #a05a00;
  --o-p3: #1e7c4a;
  --o-p4: #6b6b73;
  --bg: #fff;
  --panel: #fff;
  --sidebar: #f0f0f2;
  --pale: #f4f4f5;
  --ink: #18181b;
  --muted: #5f5f67;
  --border: #e6e6e9;
  --accent-soft: rgba(26, 115, 232, .1);
  --accent-ink: #0b57d0;
  background: #fff;
  color: #18181b;
}

/* Selected and hovered rows in the sidebar, tabs and lists (were white-on-white). */
html[data-theme="light"] body.orbit-v27 .tabs button.active,
html[data-theme="light"] body.orbit-v27 .tabs button[aria-pressed="true"],
html[data-theme="light"] body.orbit-v27 .sidebar-categories button.active { background: rgba(0, 0, 0, .06); color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 .tabs button:hover,
html[data-theme="light"] body.orbit-v27 .sidebar-categories button:hover { background: rgba(0, 0, 0, .04); }
html[data-theme="light"] body.orbit-v27.sidebar-rail:not(.sidebar-open) #sidebarCategories button.active { color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 .task-row:hover { background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .025) 8%, rgba(0, 0, 0, .025) 92%, transparent); }
html[data-theme="light"] body.orbit-v27 .task-row .task-title-button:hover { color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 .task-row-meta .priority-tap:hover { background: rgba(0, 0, 0, .05); }
html[data-theme="light"] body.orbit-v27 #agentCount { color: #fff; }

/* Task sheet (was a black panel). */
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog.task-sheet,
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .sheet-head { background: #fff; color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog.task-sheet { box-shadow: -24px 0 60px rgba(0, 0, 0, .14); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog.task-sheet::backdrop { background: rgba(0, 0, 0, .28); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .sheet-head .task-check.done::after,
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog button.primary,
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .agent-ask-actions .primary,
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog a.bridge-work-link { color: #fff; }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .agent-suggestion:hover { border-color: #a1a1aa; color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .agent-suggestion[aria-pressed="true"] { color: var(--o-accent-ink); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .bridge-work-handoff { border-color: rgba(26, 115, 232, .35); background: rgba(26, 115, 232, .05); color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .bridge-proposal { border-color: rgba(30, 124, 74, .35); background: rgba(30, 124, 74, .05); }
html[data-theme="light"] body.orbit-v27 #bridgeTaskDialog .bridge-stale { color: #8a5300; }
html[data-theme="light"] body.orbit-v27 .agent-steps li.done { border-color: #7aa7dc; }
html[data-theme="light"] body.orbit-v27 .agent-steps li.now,
html[data-theme="light"] body.orbit-v27 .agent-question { color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 .agent-request.is-awaiting_user.is-current,
html[data-theme="light"] body.orbit-v27 .agent-request.is-result.is-current { border-color: rgba(26, 115, 232, .45); }
html[data-theme="light"] body.orbit-v27 .task-agent-state.is-needs,
html[data-theme="light"] body.orbit-v27 .task-agent-state.is-ready { color: var(--o-accent-ink); border-color: rgba(26, 115, 232, .4); background: rgba(26, 115, 232, .06); }
html[data-theme="light"] body.orbit-v27 .task-agent-state.is-done { color: #1e7c4a; border-color: rgba(30, 124, 74, .35); }
html[data-theme="light"] body.orbit-v27 .task-agent-state.is-failed { color: #b3261e; border-color: rgba(179, 38, 30, .35); }

/* Quick add and voice. */
html[data-theme="light"] body.orbit-v27 #captureDialog.quick-capture { background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .18); }
html[data-theme="light"] body.orbit-v27 #captureDialog.quick-capture::backdrop { background: rgba(0, 0, 0, .25); }
html[data-theme="light"] body.orbit-v27 .capture-chip:hover { border-color: #a1a1aa; }
html[data-theme="light"] body.orbit-v27 .capture-chip select { color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 .capture-chip select optgroup { background: #fff; color: var(--o-ink); }
html[data-theme="light"] body.orbit-v27 #captureDialog.quick-capture.is-listening .capture-mic,
html[data-theme="light"] .voice-sheet[data-state="listening-tap"] .voice-orb { color: #fff; }
html[data-theme="light"] .voice-sheet { background: rgba(0, 0, 0, .3); }
html[data-theme="light"] .voice-sheet-card { background: #fff; box-shadow: 0 -18px 60px rgba(0, 0, 0, .15); }

/* Sync status bar and the GPT hand-off box (bridge.css is dark-only). */
html[data-theme="light"] .bridge-status { background: #f6f6f7; border-color: #e0e0e4; color: #27272a; }
html[data-theme="light"] body.orbit-v26 .bridge-work-handoff { border-color: #b9d3f5; }
html[data-theme="light"] body.orbit-v26 .bridge-work-link { background: var(--o-accent, #1a73e8); color: #fff; }
html[data-theme="light"] body.orbit-v26 .bridge-work-link:focus-visible { outline-color: #0b57d0; }

/* Family page cards (the light rules in family.css miss the hover and the count colour). */
html[data-theme="light"] body .subject-page .family-member-card:hover { background: #f8f9fb; border-color: #c7cdd4; }
html[data-theme="light"] body .subject-page .family-member-card.active .family-member-count { color: #0b57d0; }
html[data-theme="light"] body .subject-page .family-member-hint { color: #5f5f67; }
html[data-theme="light"] body .subject-sticky-photo.family-identity { background: #eef1f4; border-color: #dfe3e8; }
html[data-theme="light"] body .subject-sticky-photo.family-identity svg { stroke: #3d444c; }

/* Category header mark: logos sit on a light tile. */
html[data-theme="light"] body.orbit-v27 .subject-page-toolbar .subject-sticky-photo { background: #f4f4f5; border-color: var(--o-line); }

/* Sidebar: a soft gray so it separates from the white task area. */
html[data-theme="light"] body.orbit-v27 .app-header,
html[data-theme="light"] body.orbit-v27[data-view="subject"] .app-header,
html[data-theme="light"] body.orbit-v27 .sidebar { background: #f0f0f2; border-right-color: #e1e1e5; }
html[data-theme="light"] body.orbit-v27 .tabs button.active,
html[data-theme="light"] body.orbit-v27 .sidebar-categories button.active { background: rgba(0, 0, 0, .07); }
