/* The dark theme (owner 24 Nov 2026: "full black, really nice"). Switched on by the person (the moon button in the header and in the account menu, kept in this browser); nothing follows
   the system on its own. In this theme --ink is the TEXT colour, so the rules that used --ink as a surface are re-pointed by dark-gen.css (made by e2e/gen_dark.py from the stylesheets).
   Certificates, PDFs, mails and print stay light. No light surface is left on a page: the logo is the light PNG, the hero is black like the rest. */
html[data-kca-theme="dark"] {
  color-scheme: dark;
  --ink: #eceef9; --indigo: #3a38a6; --purple: #b78af0; --accent: #2fc4b0; --accent-h: #58d6c4; --earned: #e58ac6;
  --page: #050508; --surface: #0d0d14; --sunken: #14141e; --track: #1e1e2e; --line: #1e1e34; --line2: #34345c; --muted: #b9b8d6; --faint: #8d8cad;
  --on-ink: #f6f7fd; --on-ink-m: #b9b8d6; --ok: #58c79a; --danger: #ff8f84;
  --deep: #000; --chip: #3a38a6; --sky: #050508;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .5); --shadow-2: 0 2px 4px rgba(0, 0, 0, .6), 0 12px 32px rgba(0, 0, 0, .65); --shadow-3: 0 4px 12px rgba(0, 0, 0, .7), 0 28px 64px rgba(0, 0, 0, .75);
  --gold-text: #ecc766; --gold-tint: #1f1a0a; --gold-line: #a07c1f; --gold-gleam: rgba(255, 240, 190, .38);
}
html[data-kca-theme="dark"] body { background: var(--page); color: var(--ink); }
html[data-kca-theme="dark"] .btn:not(.btn--accent):not(.btn--gold):not(.btn--ghost):not(.btn--light):not(.btn--danger):not(.btn--gold-ghost) { background-color: var(--indigo); }
html[data-kca-theme="dark"] .btn--ghost { color: var(--ink); }
html[data-kca-theme="dark"] .btn--primary:hover { background: #4a48c0; }
html[data-kca-theme="dark"] input, html[data-kca-theme="dark"] select, html[data-kca-theme="dark"] textarea { color-scheme: dark; }
html[data-kca-theme="dark"] .input, html[data-kca-theme="dark"] input.input, html[data-kca-theme="dark"] textarea.input, html[data-kca-theme="dark"] select.input { background: var(--surface); color: var(--ink); border-color: var(--line2); }
html[data-kca-theme="dark"] .top { background: color-mix(in srgb, var(--page) 90%, transparent); }
html[data-kca-theme="dark"] .top__strip { background: var(--sunken); }
html[data-kca-theme="dark"] img.cert, html[data-kca-theme="dark"] .verify__sheet img { background: #fff; }
html[data-kca-theme="dark"] .foot { background: var(--deep); }
/* the logo: the light PNG on black, no white box anywhere */
html[data-kca-theme="dark"] .top .brand img, html[data-kca-theme="dark"] .drawer .brand img { content: url(/assets/kca_site/images/kca-logo-light.png); }
/* a member's logo is gold: the page header, the footer, the dashboard's mark (owner 24 Nov 2026) */
html[data-kca-member] .top .brand img, html[data-kca-member] .drawer .brand img { content: url(/assets/kca_site/images/kca-logo-gold.png); }
html[data-kca-member][data-kca-theme="dark"] .top .brand img, html[data-kca-member][data-kca-theme="dark"] .drawer .brand img, html[data-kca-member] .foot .brand img { content: url(/assets/kca_site/images/kca-logo-gold-light.png); }
html[data-kca-member] .rail__mark img { content: url(/assets/kca_site/images/kca-mark-gold-light.png); }
/* the theme button */
.theme-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--r-in, 4px); background: none; color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--ink); background: var(--sunken); }
.theme-btn svg { width: 20px; height: 20px; }
.popl.theme-btn { display: flex; width: 100%; height: auto; gap: 10px; justify-content: flex-start; text-align: start; }
html[data-kca-theme="dark"] .rtb-what__head .sub { color: #c9c8f0; }
@media print { html[data-kca-theme="dark"] { color-scheme: light; --ink: #1d1b3a; --page: #fff; --surface: #fff; } }
.hb__end .theme-btn { width: 32px; height: 36px; margin-inline: -6px; }
