/* Dark mode: follows the device's setting, like the app (app/src/styles.css). The same brand on a deep teal night:
   lighter ink, darker cards; teal text and lines get lighter, teal fills (white text on them) stay deep. Loaded after
   styles.css, only overrides, so the light page never changes. */
/* The logo and its dark copy (a picture): laid out as the img alone */
.nav picture, .iphone .ah picture { display: contents; }

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0B1D21; --surface: #1C353B; --ink: #ECE6DB; --dark: #0A3540; --error: #FF8A7D; --accent: #E8884F;
    --line: color-mix(in srgb, var(--ink) 14%, transparent); --muted: color-mix(in srgb, var(--ink) 72%, transparent);
    --primary: #6CC4D4; /* teal text, lines and icons */
    --fill: #1A7A8C;    /* teal fills under white text */
    --card: #12292E; --field: color-mix(in srgb, var(--ink) 45%, transparent); /* edges of fields: 3:1 (WCAG 1.4.11) */
  }
  /* Teal fills */
  .btn, .plan-badge, #pay-month:checked ~ .pay-switch label[for=pay-month], #pay-year:checked ~ .pay-switch label[for=pay-year],
  .pay-switch.thumb::before, .iphone .pill[aria-pressed="true"], .help-list .n, .help-step .n { background-color: var(--fill); }
  .btn:hover { background-color: #228DA1; }
  /* Cards */
  .steps li, .band, .share, .contact-form, .accordion details, .finder-ask, .price-card, .plan, .pay-switch, .included li, .friday, .ramadan, .help-list a { background-color: var(--card); }
  .share-form input[type="email"], .contact-form input:not(.hp), .contact-form textarea { background-color: var(--card); border-color: var(--field); }
  .lang-switch { border-color: var(--field); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23ECE6DB' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
  /* Pale tints */
  .captions-price, .plan-save, .pay-switch label span, .tick { background-color: #17393F; }
  footer.wrap .social a:hover, footer.wrap .social a:focus-visible { background-color: #6CC4D41F; }
  .ask-ai-links a { background-color: var(--card); }
  .friday li::before { box-shadow: 0 0 0 6px var(--card); } /* the ring around each number matches the dark card */
  .quran .rule i { background-color: color-mix(in srgb, var(--ink) 16%, transparent); }
  .iphone .pill:hover { background-color: #26434A; }
  .finder .chips button[aria-pressed="true"] { background-color: var(--fill); border-color: var(--fill); }
  .stepper button { background-color: #17393F; }
  .stepper button:disabled { background-color: transparent; }
  .iphone .status { color: var(--ink); }
  /* The dark bands keep their colours; an edge shows them on the dark page */
  .cta-band, .compare-list li.us { box-shadow: inset 0 0 0 1px #F7F3EC1F; }
  .todo { color: #0B2F37; }
  .rotator { background: #C85A22; } /* the title's changing word: white on a deeper orange, 5:1 */
}
