/* Protected pages remain hidden until their authoritative session check succeeds. */
html[data-auth-pending] body, html[data-auth-pending] body * { visibility: hidden !important; }
/* Shared colour system. Layout stays in each page's stylesheet. */
:root {
  color-scheme: dark;
  --at-canvas: #141517;
  --at-surface: #1e2023;
  --at-surface-soft: #25282d;
  --at-surface-hover: #2d3239;
  --at-input: #181b20;
  --at-sidebar: #0d0e10;
  --at-rail: #090a0b;
  --at-topbar: #131416;
  --at-text: #f0f0f2;
  --at-secondary: #c5ccd6;
  --at-muted: #a5afbd;
  --at-border: #687485;
  --at-line: #30363e;
  --at-focus: #b6cfff;
  --at-link: #b6cde9;
  --at-success: #9bd1b4;
  --at-success-bg: #20362b;
  --at-success-border: #466854;
  --at-warning: #edc98e;
  --at-warning-bg: #362e21;
  --at-warning-border: #645235;
  --at-danger: #f1b2a6;
  --at-danger-bg: #3b2828;
  --at-danger-border: #81534d;
  --at-info: #b3cef5;
  --at-info-bg: #27354c;
  --at-primary-bg: #cfddd4;
  --at-primary-text: #17261d;
  --at-primary-hover: #e8f1eb;
  --at-shadow: 0 20px 70px #0007;
}

:root[data-theme="light"] {
  color-scheme: light;
  --at-canvas: #f4f5f7;
  --at-surface: #ffffff;
  --at-surface-soft: #edf0f4;
  --at-surface-hover: #e5eaf0;
  --at-input: #ffffff;
  --at-sidebar: #eef1f5;
  --at-rail: #e5e9ef;
  --at-topbar: #f4f5f7;
  --at-text: #202631;
  --at-secondary: #465265;
  --at-muted: #59677a;
  --at-border: #7f8da2;
  --at-line: #d7dde6;
  --at-focus: #2156b0;
  --at-link: #285b91;
  --at-success: #256042;
  --at-success-bg: #e7f3ec;
  --at-success-border: #97bba6;
  --at-warning: #77531b;
  --at-warning-bg: #fff3dd;
  --at-warning-border: #c6a46c;
  --at-danger: #9b352c;
  --at-danger-bg: #fff0ed;
  --at-danger-border: #d9a19b;
  --at-info: #315a91;
  --at-info-bg: #e8effa;
  --at-primary-bg: #244c39;
  --at-primary-text: #ffffff;
  --at-primary-hover: #183e2c;
  --at-shadow: 0 20px 70px #25354b29;
  --forest: #244c39;
  --green: #256042;
  --mint: #e7f3ec;
  --ink: var(--at-text);
  --muted: var(--at-muted);
  --line: var(--at-line);
  --paper: var(--at-surface);
  --canvas: var(--at-canvas);
  --control: var(--at-surface-soft);
  --focus: var(--at-focus);
}

html[data-theme] { background: var(--at-canvas); }
html[data-theme] body { background: var(--at-canvas); color: var(--at-text); }
/* Flat, softly layered fills can interpolate without retaining page snapshots. */
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .desktop-card { background: #202225; }
html[data-theme="dark"] .stat-card:hover { background: #292c30; }
html[data-theme="dark"] .stat-card[aria-pressed="true"] { background: #27312b; }
html[data-theme="dark"] .desktop-card.selected { background: #232b26; }
html[data-theme="dark"] .batch-stats { background: #222830; }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea { background: var(--at-input); color: var(--at-text); border-color: var(--at-border); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 8px;
  min-width: 40px;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--at-line);
  border-radius: 11px;
  background: var(--at-surface-soft);
  color: var(--at-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
}
.theme-toggle:hover { background: var(--at-surface-hover); color: var(--at-text); }
.theme-toggle:focus-visible { outline: 2px solid var(--at-focus); outline-offset: 4px; }
.theme-toggle svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-icon-dark { display: none; }
html[data-theme="light"] .theme-icon-dark { display: block; }
html[data-theme="light"] .theme-icon-light { display: none; }
html[data-theme="light"] .rail-logo img,
html[data-theme="light"] img.brand-mark { filter: invert(1); }

/* Light workspace: the same information hierarchy with daylight surfaces. */
html[data-theme="light"] .icon-rail { background: var(--at-rail); }
html[data-theme="light"] .rail-button { color: var(--at-muted); }
html[data-theme="light"] .rail-button:hover,
html[data-theme="light"] .rail-button.active { background: #d5dce6; color: var(--at-text); }
html[data-theme="light"] .rail-bottom { color: var(--at-muted); border-color: var(--at-line); }
html[data-theme="light"] .sidebar { background: var(--at-sidebar); color: var(--at-secondary); scrollbar-color: #b2bcc9 transparent; }
html[data-theme="light"] .sidebar .brand { color: var(--at-text); }
html[data-theme="light"] .brand-sub,
html[data-theme="light"] .workspace-label,
html[data-theme="light"] .sidebar-note p,
html[data-theme="light"] .identity span:not(.avatar) { color: var(--at-muted); }
html[data-theme="light"] .nav-link,
html[data-theme="light"] .nav-link .ui-icon,
html[data-theme="light"] .sidebar-states button,
html[data-theme="light"] .sidebar-states button span { color: var(--at-muted); }
html[data-theme="light"] .sidebar .nav-link.selected,
html[data-theme="light"] .sidebar .nav-link:hover,
html[data-theme="light"] .sidebar .nav-link:focus-visible,
html[data-theme="light"] .nav-link.selected .ui-icon,
html[data-theme="light"] .sidebar-states button:hover,
html[data-theme="light"] .sidebar-states button:focus-visible,
html[data-theme="light"] .sidebar-states button[aria-pressed="true"],
html[data-theme="light"] .sidebar-states button[aria-pressed="true"] span { background: transparent; color: var(--at-text); box-shadow: none; }
html[data-theme="light"] .sidebar-note,
html[data-theme="light"] .identity { border-color: var(--at-line); }
html[data-theme="light"] .sidebar-note strong,
html[data-theme="light"] .identity strong { color: var(--at-secondary); }
html[data-theme="light"] .small-circle { background: var(--at-success); }
html[data-theme="light"] .avatar { background: #dce4ed; color: #33445a; }
html[data-theme="light"] .page-shell { background: var(--at-canvas); }
html[data-theme="light"] .topbar { background: var(--at-topbar); }
html[data-theme="light"] .breadcrumb,
html[data-theme="light"] .breadcrumb span { color: var(--at-muted); }
html[data-theme="light"] .breadcrumb strong { color: var(--at-text); }
html[data-theme="light"] .environment-badge,
html[data-theme="light"] .count-label { background: #e6ebf1; border-color: var(--at-line); color: #48586c; }
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .section-heading .eyebrow,
html[data-theme="light"] .page-heading p,
html[data-theme="light"] .date-controls label,
html[data-theme="light"] .day-context,
html[data-theme="light"] .day-context strong { color: var(--at-muted); }
html[data-theme="light"] .report-phase { background: var(--at-surface); border-color: var(--at-line); color: var(--at-secondary); }
html[data-theme="light"] .report-phase-dot,
html[data-theme="light"] .report-beam[data-loading="true"] .report-phase-dot { background: #587566; }
html[data-theme="light"] .demo-notice { background: var(--at-warning-bg); border-color: #e5d4b1; color: var(--at-warning); }
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .search-field input,
html[data-theme="light"] .compact-filter select,
html[data-theme="light"] .detail-filters select { background: var(--at-input); border-color: var(--at-border); color: var(--at-text); }
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder { color: #647185; opacity: 1; }
html[data-theme="light"] .search-field input:hover,
html[data-theme="light"] .compact-filter select:hover,
html[data-theme="light"] .detail-filters select:hover { border-color: #63758d; }
html[data-theme="light"] .search-field > .search-icon,
html[data-theme="light"] .compact-filter,
html[data-theme="light"] .detail-filters label { color: var(--at-muted); }
html[data-theme="light"] #refresh { background: var(--at-surface); color: var(--at-secondary); border-color: var(--at-border); box-shadow: none; }
html[data-theme="light"] #refresh:hover { background: var(--at-surface-hover); color: var(--at-text); }
html[data-theme="light"] .stat-card { background: var(--at-surface); border-color: var(--at-line); box-shadow: 0 2px 6px #25354b04; color: var(--at-text); }
html[data-theme="light"] .stat-card:hover { background: #f9fafc; border-color: #aab8c9; }
html[data-theme="light"] .stat-card[aria-pressed="true"] { background: #eaf3ee; border-color: #9eb5a7; box-shadow: none; }
html[data-theme="light"] .stat-label,
html[data-theme="light"] .stat-label > .ui-icon,
html[data-theme="light"] .stat-icon { color: var(--at-secondary); }
html[data-theme="light"] .stat-icon.green { color: var(--at-success); }
html[data-theme="light"] .stat-icon.amber { color: var(--at-warning); }
html[data-theme="light"] .stat-icon.blue { color: var(--at-info); }
html[data-theme="light"] .stat-card > strong { color: var(--at-text); }
html[data-theme="light"] .stat-caption,
html[data-theme="light"] .stat-card > p { color: var(--at-muted); }
html[data-theme="light"] .panel { background: var(--at-surface); border-color: var(--at-line); box-shadow: 0 2px 6px #25354b03; }
html[data-theme="light"] .reporting-panel { background: transparent; box-shadow: none; }
html[data-theme="light"] .panel-heading p,
html[data-theme="light"] .secondary-line { color: var(--at-muted); }
html[data-theme="light"] .display-switch { background: #e6eaf0; border-color: var(--at-line); }
html[data-theme="light"] .display-switch button { color: var(--at-muted); }
html[data-theme="light"] .display-switch button:hover { background: #dce3ec; color: var(--at-text); }
html[data-theme="light"] .display-switch button[aria-pressed="true"] { background: var(--at-surface); color: var(--at-text); box-shadow: 0 1px 3px #25354b16; }
html[data-theme="light"] .text-button { color: #3b5f83; }
html[data-theme="light"] .text-button:hover { color: #163f68; }
html[data-theme="light"] .desktop-card { background: var(--at-surface); border-color: var(--at-line); box-shadow: 0 2px 7px #25354b04; }
html[data-theme="light"] .desktop-card:hover { border-color: #aab8c9; }
html[data-theme="light"] .desktop-card.selected { background: #f0f6f2; border-color: #98b5a3; box-shadow: none; }
html[data-theme="light"] .desktop-icon { background: #e9eef4; border-color: #d0d8e3; color: #50647e; }
html[data-theme="light"] .device-cell strong,
html[data-theme="light"] .desktop-card-metrics strong { color: var(--at-text); }
html[data-theme="light"] .desktop-card-metrics span,
html[data-theme="light"] .desktop-card-note,
html[data-theme="light"] .desktop-card-footer { color: var(--at-muted); border-color: var(--at-line); }
html[data-theme="light"] .card-attention { color: var(--at-warning); }
html[data-theme="light"] .status-pill { background: #e9edf2; color: #526176; box-shadow: none; }
html[data-theme="light"] .status-completed { background: var(--at-success-bg); color: var(--at-success); }
html[data-theme="light"] .status-partial { background: var(--at-warning-bg); color: var(--at-warning); }
html[data-theme="light"] .status-upload_failed,
html[data-theme="light"] .status-processing_failed { background: var(--at-danger-bg); color: var(--at-danger); }
html[data-theme="light"] .status-processing { background: var(--at-info-bg); color: var(--at-info); }
html[data-theme="light"] .status-awaiting_upload,
html[data-theme="light"] .status-awaiting_cutoff,
html[data-theme="light"] .status-not_expected { background: #edf0f4; color: #556276; }
html[data-theme="light"] .review-button { background: var(--at-surface); border-color: #9fb8a9; color: var(--at-success); }
html[data-theme="light"] .review-button:hover,
html[data-theme="light"] .review-button.selected { background: #dceee3; color: #204e34; border-color: #7da28b; }
html[data-theme="light"] .review-badge { background: #f4e2be; color: #6b4a15; }
html[data-theme="light"] .reporting-panel > .panel-footer { background: transparent; color: var(--at-muted); }
html[data-theme="light"] .panel-footer { background: #f8f9fb; border-color: var(--at-line); color: var(--at-muted); }
html[data-theme="light"] .legend-dot { background: #557460; }
html[data-theme="light"] #desktop-table { background: var(--at-surface); border-color: var(--at-line); }
html[data-theme="light"] th { background: #edf0f5; border-color: var(--at-line); color: #4f5d71; }
html[data-theme="light"] td { color: var(--at-secondary); border-color: var(--at-line); }
html[data-theme="light"] tbody tr:hover { background: #f2f5f8; }
html[data-theme="light"] .empty-state { color: var(--at-muted) !important; }
html[data-theme="light"] .review-section { border-color: var(--at-line); }
html[data-theme="light"] .secondary-button { background: var(--at-surface); color: var(--at-secondary); border-color: var(--at-border); }
html[data-theme="light"] .secondary-button:hover { background: var(--at-surface-hover); color: var(--at-text); }
html[data-theme="light"] .no-batch { background: #f9fafc; }
html[data-theme="light"] .empty-illustration { background: #e7edf4; color: #496782; }
html[data-theme="light"] .no-batch p { color: var(--at-muted); }
html[data-theme="light"] .review-jumps { background: #e7ecf2; border-color: var(--at-line); }
html[data-theme="light"] .review-jumps a { color: #4d5f76; }
html[data-theme="light"] .review-jumps a:hover,
html[data-theme="light"] .review-jumps a[aria-current="true"],
html[data-theme="light"] .review-jumps a[aria-current="location"] { background: var(--at-surface); color: #233c5b; }
html[data-theme="light"] .batch-heading > div > span { color: var(--at-muted); }
html[data-theme="light"] .batch-stats { background: #eaf0f6; border-color: #d0dbe7; }
html[data-theme="light"] .batch-stats > div > span,
html[data-theme="light"] .batch-stats > p { color: #4f6178; }
html[data-theme="light"] .batch-stats > div > strong { color: #24384f; }
html[data-theme="light"] .timeline { background: #edf1f6; border-color: #b9c5d5; }
html[data-theme="light"] .timeline-segment.active,
html[data-theme="light"] .timeline-legend .active { background: #377653; }
html[data-theme="light"] .timeline-segment.idle,
html[data-theme="light"] .timeline-legend .idle { background: #76859b; }
html[data-theme="light"] .timeline-segment.locked,
html[data-theme="light"] .timeline-legend .locked { background: #416e95; }
html[data-theme="light"] .timeline-segment.disconnected,
html[data-theme="light"] .timeline-legend .disconnected { background: #7a628d; }
html[data-theme="light"] .timeline-segment.gap,
html[data-theme="light"] .timeline-legend .gap { background: #a2742e; }
html[data-theme="light"] .timeline-segment:hover { box-shadow: 0 0 0 2px #172f4a; }
html[data-theme="light"] .timeline-axis,
html[data-theme="light"] .timeline-legend,
html[data-theme="light"] .muted-note,
html[data-theme="light"] .timeline-body > .muted-note { color: var(--at-muted); }
html[data-theme="light"] .application-row { border-color: var(--at-line); }
html[data-theme="light"] .application-name,
html[data-theme="light"] .application-time { color: var(--at-secondary); }
html[data-theme="light"] .application-meta { color: var(--at-muted); }
html[data-theme="light"] .application-bar { background: #e4eaf1; }
html[data-theme="light"] .application-bar > span { background: #487e5d; }
html[data-theme="light"] .review-item { background: #fffbf3; border-color: #dec9a4; }
html[data-theme="light"] .review-item-heading,
html[data-theme="light"] .review-item-heading strong { color: #75511d; }
html[data-theme="light"] .review-item-heading > span { background: #f6e8cc; color: #74501a; }
html[data-theme="light"] .review-item p { color: #665d4c; }
html[data-theme="light"] .review-item.reviewed { background: #f0f7f3; border-color: #b1cbbb; }
html[data-theme="light"] .review-item.reviewed .review-item-heading span { background: #dfede4; color: #2b6142; }
html[data-theme="light"] .reviewed-note { color: #2f6647 !important; }
html[data-theme="light"] .review-item-controls input { background: var(--at-input); border-color: var(--at-border); color: var(--at-text); }
html[data-theme="light"] .review-item-controls button { background: var(--at-primary-bg); color: var(--at-primary-text); }
html[data-theme="light"] .review-item-controls button:hover { background: var(--at-primary-hover); }
html[data-theme="light"] .source-link { color: var(--at-link); }
html[data-theme="light"] .source-link:hover { color: #143b70; }
html[data-theme="light"] .event-app { color: var(--at-secondary); }
html[data-theme="light"] .event-title { color: var(--at-muted); }
html[data-theme="light"] .recorded-url { color: #375b85; }
html[data-theme="light"] .screenshot-card { background: #f9fafc; border-color: var(--at-line); }
html[data-theme="light"] .screenshot-card-heading { background: #edf1f6; }
html[data-theme="light"] .screenshot-card-heading span,
html[data-theme="light"] .screenshot-controls,
html[data-theme="light"] .screenshot-metadata { color: var(--at-muted); }
html[data-theme="light"] .screenshot-preview { background: #e7edf4; color: #4b607b; }
html[data-theme="light"] .evidence-image { border-color: #aab9cd; }
html[data-theme="light"] .page-footer { color: var(--at-muted); border-color: var(--at-line); }
html[data-theme="light"] .message { background: var(--at-success-bg); border-color: var(--at-success-border); color: var(--at-success); }
html[data-theme="light"] .message.error { background: var(--at-danger-bg); border-color: var(--at-danger-border); color: var(--at-danger); }
html[data-theme="light"] dialog { background: var(--at-surface); color: var(--at-text); border-color: var(--at-border); box-shadow: var(--at-shadow); }
html[data-theme="light"] dialog::backdrop { background: #1723388c; }
html[data-theme="light"] dialog p,
html[data-theme="light"] .dialog-eyebrow,
html[data-theme="light"] dialog dt,
html[data-theme="light"] dialog summary,
html[data-theme="light"] .advanced-auth > summary { color: var(--at-muted); }
html[data-theme="light"] dialog pre { background: #eef2f7; color: #3e516a; border-color: var(--at-line); }
html[data-theme="light"] .dialog-top .icon-button { background: #edf1f6; color: #475c76; border-color: var(--at-border); }
html[data-theme="light"] .dialog-top .icon-button:hover { background: #dde6f0; }
html[data-theme="light"] .primary-button { background: var(--at-primary-bg); color: var(--at-primary-text); }
html[data-theme="light"] .primary-button:hover { background: var(--at-primary-hover); color: var(--at-primary-text); }
html[data-theme="light"] .error-text { color: var(--at-danger) !important; }
html[data-theme="light"] .skip-link { background: var(--at-surface); border-color: var(--at-focus); color: var(--at-text); }
html[data-theme="light"] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: var(--at-focus); }

/* Sign-in shares the workspace's surfaces, including the complete MFA flow. */
html[data-theme] .signin-shell { color: var(--at-text); background: var(--at-canvas); max-width: none; }
html[data-theme] .signin-shell .brand-panel { background: var(--at-sidebar); color: var(--at-text); }
html[data-theme] .signin-shell .brand { color: var(--at-text); }
html[data-theme] .signin-shell .brand span { color: var(--at-muted); }
html[data-theme] .signin-shell .brand-copy > p,
html[data-theme] .signin-shell .security-note { color: var(--at-muted); }
html[data-theme] .signin-shell .security-note > span { color: var(--at-success); border-color: var(--at-success-border); }
html[data-theme] .signin-shell .eyebrow,
html[data-theme] .signin-shell .brand-copy .eyebrow,
html[data-theme] .signin-shell .intro,
html[data-theme] .signin-shell .flow-panel > p,
html[data-theme] .signin-shell .flow-panel details,
html[data-theme] .signin-shell .access-note,
html[data-theme] .signin-shell label { color: var(--at-muted); }
html[data-theme] .signin-shell .access-note { border-color: var(--at-line); }
html[data-theme] .signin-shell .back-link,
html[data-theme] .signin-shell .text-button { color: var(--at-link); }
html[data-theme] .signin-shell .back-link:hover,
html[data-theme] .signin-shell .text-button:hover { color: var(--at-text); }
html[data-theme] .signin-shell .status { color: var(--at-success); }
html[data-theme] .signin-shell .error { background: var(--at-danger-bg); border-color: var(--at-danger-border); color: var(--at-danger); }
html[data-theme] .signin-shell input,
html[data-theme] .signin-shell select,
html[data-theme] .signin-shell .flow-panel code { background: var(--at-input); color: var(--at-text); border-color: var(--at-border); }
html[data-theme] .signin-shell input::placeholder { color: var(--at-muted); opacity: 1; }
html[data-theme] .signin-shell .primary { background: var(--at-primary-bg); color: var(--at-primary-text); border-color: var(--at-primary-bg); }
html[data-theme] .signin-shell .primary:hover { background: var(--at-primary-hover); border-color: var(--at-primary-hover); }
html[data-theme] .signin-shell .secondary,
html[data-theme] .signin-shell .google-button { background: var(--at-surface); color: var(--at-secondary); border-color: var(--at-border); }
html[data-theme] .signin-shell .secondary:hover,
html[data-theme] .signin-shell .google-button:hover { background: var(--at-surface-hover); color: var(--at-text); }
html[data-theme] .signin-shell .divider { color: var(--at-muted); }
html[data-theme] .signin-shell .divider::before,
html[data-theme] .signin-shell .divider::after { background: var(--at-line); }
html[data-theme] .signin-shell :is(button, a, input, select, summary):focus-visible { outline: 2px solid var(--at-focus); outline-offset: 4px; }
.signin-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 42px; }
.signin-tools .back-link { margin: 0; }

/* Pilot setup uses the same palette without changing registration or install UI. */
html[data-theme] .pilot-page { --ink: var(--at-text); --muted: var(--at-muted); --line: var(--at-line); --canvas: var(--at-canvas); --paper: var(--at-surface); }
html[data-theme] .pilot-page .pilot-header { background: var(--at-topbar); border-color: var(--at-line); }
html[data-theme] .pilot-page .pilot-brand { color: var(--at-text); }
html[data-theme] .pilot-page .pilot-brand span { color: var(--at-muted); }
html[data-theme] .pilot-page .panel { background: var(--at-surface); border-color: var(--at-line); box-shadow: none; border-radius: 16px; }
html[data-theme] .pilot-page .eyebrow,
html[data-theme] .pilot-page .pilot-context,
html[data-theme] .pilot-page .step-heading p,
html[data-theme] .pilot-page .download-panel > p,
html[data-theme] .pilot-page .scope-panel p,
html[data-theme] .pilot-page .scope-panel ul,
html[data-theme] .pilot-page label,
html[data-theme] .pilot-page label small,
html[data-theme] .pilot-page .check-row,
html[data-theme] .pilot-page .credentials-panel > p,
html[data-theme] .pilot-page .access-panel p,
html[data-theme] .pilot-page .muted-note,
html[data-theme] .pilot-page .page-footer { color: var(--at-muted); }
html[data-theme] .pilot-page .pilot-context strong { color: var(--at-success); }
html[data-theme] .pilot-page .pilot-context i { background: var(--at-success); }
html[data-theme] .pilot-page .step-heading > span { background: var(--at-success-bg); color: var(--at-success); border-color: var(--at-success-border); }
html[data-theme] .pilot-page input:not([type="checkbox"]),
html[data-theme] .pilot-page textarea { background: var(--at-input); color: var(--at-text); border-color: var(--at-border); }
html[data-theme] .pilot-page input::placeholder,
html[data-theme] .pilot-page textarea::placeholder { color: var(--at-muted); opacity: 1; }
html[data-theme] .pilot-page .check-row input { accent-color: var(--at-success); }
html[data-theme] .pilot-page code { background: var(--at-success-bg); color: var(--at-success); }
html[data-theme] .pilot-page .primary-button { background: var(--at-primary-bg); color: var(--at-primary-text); }
html[data-theme] .pilot-page .primary-button:hover { background: var(--at-primary-hover); }
html[data-theme] .pilot-page .secondary-button { background: var(--at-surface); color: var(--at-secondary); border-color: var(--at-border); border-radius: 9px; }
html[data-theme] .pilot-page .secondary-button:hover { background: var(--at-surface-hover); color: var(--at-text); }
html[data-theme] .pilot-page .text-button { color: var(--at-link); }
html[data-theme] .pilot-page .message { background: var(--at-success-bg); border-color: var(--at-success-border); color: var(--at-success); }
html[data-theme] .pilot-page .message.error,
html[data-theme] .pilot-page .error { background: var(--at-danger-bg); border-color: var(--at-danger-border); color: var(--at-danger); }
html[data-theme] .pilot-page :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--at-focus); outline-offset: 4px; }

@media (prefers-reduced-motion: no-preference) {
  html[data-theme-changing],
  html[data-theme-changing] :where(
    body, .page-shell, .topbar, .sidebar, .icon-rail, .stat-card, .desktop-card,
    .panel, .panel-footer, .batch-stats, .review-item, .review-jumps, .display-switch,
    .desktop-icon, .environment-badge, .count-label, .demo-notice, .message, .avatar,
    .brand-panel, .signin-shell, .pilot-header, .screenshot-preview, .screenshot-card,
    .screenshot-card-heading, .timeline, .application-bar, .application-bar > span,
    .timeline-segment, .report-phase, .report-phase-dot, .empty-illustration,
    p, span, strong, h1, h2, h3, label, a, button, input, select, textarea,
    td, th, dialog, pre, code, .ui-icon, .theme-toggle svg, .rail-logo img, img.brand-mark
  ) {
    transition: background-color 360ms ease, color 360ms ease,
      border-color 360ms ease, box-shadow 360ms ease, fill 360ms ease,
      stroke 360ms ease, filter 360ms ease, transform 440ms cubic-bezier(.18,.88,.24,1);
  }
  .theme-toggle { transition: background-color .15s, color .15s, border-color .15s; }
  .theme-toggle .theme-icon-light,
  .theme-toggle .theme-icon-dark { animation: aerotrack-theme-icon-in .2s ease-out; }
  @keyframes aerotrack-theme-icon-in {
    from { opacity: .3; transform: rotate(-25deg) scale(.85); }
    to { opacity: 1; transform: rotate(0) scale(1); }
  }
}
/* `none` removes transition-property as well as duration, cancelling an in-flight
   colour interpolation when the preference or document availability changes. */
html[data-motion-state="paused"],
html[data-motion-state="paused"] * { transition: none !important; }
html[data-motion-state="paused"] .theme-toggle svg { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html, html * { transition: none !important; }
  .theme-toggle, .theme-toggle svg { animation: none !important; transition: none !important; }
}
@media (max-width: 650px) {
  .theme-toggle { padding: 9px; }
  .theme-toggle [data-theme-label] { display: none; }
  .signin-tools { margin-bottom: 28px; }
}
