/* Follow the device appearance without saving a separate theme preference. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ink: #f3f6f4;
    --paper: #0d1012;
    --muted: #a9b3ad;
    --line: #2b3235;
    --green: #32d674;
    --orange: #ff9f0a;
    --orbit-surface: #161a1d;
    --orbit-raised: #202629;
    --orbit-hover: #272f32;
    --orbit-caption: #a2ada6;
  }
  body,.orbit-screen,.orbit-main,.orbit-hero {background:var(--paper);color:var(--ink)}
  .sidebar {background:#111517;border-color:var(--line);color:var(--ink)}
  .sidebar .brand-light img {filter:brightness(0) invert(.96)}
  .sidebar-caption,.people-heading,.account-label,.sidebar-legal,.person-nav-count,
  .person-nav-status,#account-email,.dashboard-header .card-kicker,.card-kicker,.eyebrow,
  .hero-top .eyebrow,.section-heading>p,.family-person .family-device-count,
  .hero-metrics span,#device-filter-count,.dashboard-footer,.app-note .card-kicker {color:var(--orbit-caption)}
  .overview-nav,.person-nav {color:#bdc7c1}
  .overview-nav[aria-pressed=true],.person-nav[aria-pressed=true] {
    color:var(--ink);background:var(--orbit-raised);border-color:#35403a;box-shadow:0 3px 14px #0002;
  }
  .overview-nav:hover,.person-nav:hover {background:var(--orbit-hover)}
  .sidebar-bottom {border-color:var(--line)}
  .sign-out,.dashboard-header .button,.app-note .button {
    background:var(--orbit-surface);border-color:var(--line);color:var(--ink);
  }
  .sign-out:hover,.dashboard-header .button:hover,.app-note .button:hover {background:var(--orbit-hover)}
  .dashboard-header h1,.hero-composition h2,.hero-metrics strong {color:var(--ink)}
  #orbit-summary {color:#b2bdb5}
  .constellation-field {background:radial-gradient(ellipse at center,#93bd9c0a,transparent 70%)}
  .constellation-field:before {background-image:radial-gradient(#b7d9c02b .7px,transparent .8px)}
  .constellation-orbit {border-color:#c1d9c545}
  .constellation-orbit:nth-child(2) {border-color:#c1d9c533}
  .constellation-orbit:nth-child(3) {border-color:#c1d9c524}
  .constellation-orbit:first-child:before,.constellation-orbit:first-child:after {background:#c6ddca70}
  .constellation-focus {filter:drop-shadow(0 9px 22px #0005)}
  .constellation-focus .avatar {border-color:var(--paper);background:#232c26;color:#f2f6f3}
  .person-nav .avatar,.orbit-satellite .avatar,.family-person .avatar {border-color:var(--orbit-surface);background:#263129;color:#eff6f1}
  .protection-ring {stroke:#59645d}.protection-ring.safe {stroke:var(--green)}.protection-ring.attention {stroke:var(--orange)}
  .hero-orbit {stroke:#c1d9c545}
  .orbit-satellite {background:var(--orbit-surface);border-color:#3a443d;box-shadow:0 5px 16px #0004}
  .orbit-satellite:hover,.orbit-satellite:focus-visible {box-shadow:0 6px 24px #0006}
  .satellite-state {background:var(--orbit-surface);border-color:var(--orbit-surface);color:#b6c0b9}
  .satellite-state.safe {color:var(--green)}.satellite-state.attention {color:var(--orange)}
  .hero-metrics {background:var(--orbit-surface)}.hero-metrics>div+div {border-color:var(--line)}
  .protection-card,.family-person,.device-item,.device-empty,.signal-item {
    background:var(--orbit-surface);border-color:var(--line);color:var(--ink);box-shadow:0 4px 20px #0001;
  }
  .connection-card,.sharing-card {background:var(--orbit-surface)}
  .protection-icon {background:var(--orbit-raised);color:#b5c1b9}
  .protection-indicator {color:#a7b3ab}
  .protection-card.safe .protection-icon {color:var(--green);background:#32d67414}
  .protection-card.attention .protection-icon {color:var(--orange);background:#ff9f0a17}
  .protection-card.attention {border-color:#ff9f0a70}
  .protection-card .protection-caption,.device-info>p,.app-note p:last-child,
  .signal-intro>p:last-child,.signal-copy>span,.more-signals {color:var(--orbit-caption)}
  .family-person:hover,.device-item:hover {background:var(--orbit-raised);border-color:#4a6051}
  .family-person .avatar {outline-color:#48564b}
  .status,.status.unknown,.status.stale {background:var(--orbit-raised);color:#bcc6bf}
  .status.safe {background:#32d67412;color:#5de393}.status.attention {background:#ff9f0a14;color:#ffb747}
  .status.safe:before,.status.attention:before,.status.unknown:before,.status.stale:before {background:currentColor}
  .signal-section,.app-note {background:#121719;border-color:var(--line);color:var(--ink)}
  .signal-intro .card-kicker {color:var(--orbit-caption)}
  .signal-mark {color:#b3c0b7;background:var(--orbit-raised)}
  .signal-mark.attention {background:#ff9f0a14;color:var(--orange)}
  .signal-item>span:last-child,.device-open {color:#a6b5ac}
  .signal-clear {color:#a5d1b5}
  .device-filters {background:var(--orbit-surface)}
  .device-filters button {color:#b2bdb6}
  .device-filters button[aria-pressed=true] {background:#303b34;color:#f3f8f5;box-shadow:0 1px 8px #0002}
  .device-artwork svg {stroke:#abb9af}
  .dashboard-footer {border-color:var(--line)}
  .limited-note {background:#30271a;color:#f2cd96;border:1px solid #624a2b}
  .empty-card,.loading-card,.error-card {background:var(--orbit-surface);border-color:var(--line);color:var(--ink)}
  .empty-card p,.loading-card p,.error-card p {color:var(--muted)}
  .loader {border-color:#35453b;border-top-color:var(--green)}
  .button-dark {background:#edf4ef;color:#132119}
  .button-dark:hover:not(:disabled) {background:#ccebd7;color:#132119}
  .button-outline {border-color:#48594c;color:var(--ink)}
  .button-outline:hover {background:var(--orbit-hover)}
  button:focus-visible,a:focus-visible,input:focus-visible {outline-color:#6ce7a0}
  .skip-link {background:#ccebd7;color:#132119}
  dialog {background:var(--orbit-surface);color:var(--ink);border-color:#39443d;box-shadow:0 24px 100px #0009}
  dialog::backdrop {background:#030706ad;backdrop-filter:blur(10px)}
  .dialog-header .card-kicker,.device-facts dt,.detail-next .card-kicker,.dialog-note {color:var(--orbit-caption)}
  .close-button {background:var(--orbit-raised);border-color:#38443c;color:#edf4ef;box-shadow:none}
  .close-button:hover {background:var(--orbit-hover)}
  .detail-device-art {background:radial-gradient(ellipse,#32d6740a,transparent 68%)}
  .detail-device-art .device-icon {background:transparent}
  .device-facts {background:#121719;border-color:var(--line)}
  .device-facts dd {color:#d5dfd8}
  .detail-explanation,.detail-next>p:last-child {color:#b7c2ba}
  .subscription-intro .card-kicker,.subscription-intro>p,.subscription-bottom p {color:var(--muted)}
  .subscription-plan {background:var(--orbit-surface);border-color:#34443a}
  .subscription-plan-body li strong {color:#eff5f1}
  .subscription-plan-body li div>span,.plan-section-label {color:#b3c2b7}
  .subscription-bottom .button-dark {background:#edf4ef;color:#132119}
  /* Keep the authentication panel readable as users enter or leave Orbit. */
  .login-screen {background:#0d1410;color:#f2f6f3}
  .login-card {background:var(--orbit-surface);border:1px solid #354139;color:var(--ink);box-shadow:0 18px 65px #0003}
  .login-card h2,.login-card label {color:var(--ink)}
  .login-card .muted,.login-card .card-kicker,.login-card .session-note {color:#b1beb5}
  .login-card input {background:#101613;border-color:#405046;color:#f0f6f2}
  .login-card input::placeholder {color:#9aaa9f}
  .login-card .text-button {color:#9ee9b8}
  .login-card .form-message.error {color:#ffb5a7}
  .login-card .form-message.success {color:#85dda4}
  @media(max-width:760px) {
    .sidebar {background:var(--paper)}
    .sidebar .overview-nav {background:var(--orbit-surface);border-color:var(--line);color:#bdc7c1}
    .sidebar .overview-nav[aria-pressed=true] {background:var(--orbit-raised);color:var(--ink);border-color:#435048}
  }
}

@media(prefers-color-scheme:dark){.subscription-public .plans-header .brand img{filter:brightness(0) invert(.96)}.subscription-public .plans-free{background:var(--orbit-surface);border-color:var(--line)}}

@media(prefers-color-scheme:dark){.event-row,.orbit-empty-state{background:var(--orbit-surface);border-color:var(--line);color:var(--ink)}.event-copy span,.event-row time{color:var(--orbit-caption)}.family-person[aria-pressed=true]{border-color:var(--green);background:#26c76512}}
