/* Night mode — generated by tools from the theme stylesheets (see gen_dark.py), plus hand-tuned tokens. */
html[data-mode="dark"], 
/* ---- generated ---- */
html[data-mode="dark"] .alert--success { border-color: #303E50; }
html[data-mode="dark"] .alert--info { border-color: #363B53; }
html[data-mode="dark"] .badge { background: #282C42; }
html[data-mode="dark"] .badge--draft { background: #282C42; }
html[data-mode="dark"] .badge--changes_requested { background: #333445; }
html[data-mode="dark"] .badge--withdrawn { background: #282C42; }
html[data-mode="dark"] .hero__cta .btn:not(.btn--gold):hover { border-color: #414558; }
html[data-mode="dark"] .track li::before { background: #2F3349; }
html[data-mode="dark"] .progress { background: #2F3349; }
html[data-mode="dark"] .challenge { border: 1px solid #3F3E48; }
html[data-mode="dark"] .msg--me { border-color: #373C54; }
html[data-mode="dark"] .table th { background: #292D43; }
html[data-mode="dark"] .table td { border-block-end: 1px solid #3E4156; }
html[data-mode="dark"] .table tbody tr:hover { background: #292D43; }
html[data-mode="dark"] .qr { background: #1E2238; }
html[data-mode="dark"] .doc-page { background: #282B42; }
html[data-mode="dark"] .invoice-alert { border: 1px solid #3D3B41; }
html[data-mode="dark"] .inv-line { border-block-start: 1px solid #3E4156; }
html[data-mode="dark"] .wa__panel { background: #1E2238; border: 1px solid #3C4055; }
html[data-mode="dark"] .wa__bubble { background: #1E2238; color: #989AA1; }
html[data-mode="dark"] .share--x { color: #CBCBCB; }
html[data-mode="dark"] .admin { background: #282C42; }
html[data-mode="dark"] .bar__track { background: #282C42; }
html[data-mode="dark"] .flag { background: #282C42; }
html[data-mode="dark"] .set-row { border-block-end: 1px solid #3E4156; }
html[data-mode="dark"] .switch i::after { background: #1E2238; }
html[data-mode="dark"] .theme-card { background: #1E2238; }
html[data-mode="dark"] .theme-card__art--classic { background: #292C42; }
html[data-mode="dark"] .theme-card__art--classic i:nth-child(1) { background: #1E2238; border: 1px solid #3C4055; }
html[data-mode="dark"] .theme-card__art--classic i:nth-child(3) { background: #1E2238; border: 1px solid #3C4055; }
html[data-mode="dark"] .theme-card__art--golestan i:nth-child(3) { background: linear-gradient(135deg, #1E2238 55%, #2A2B41); }
html[data-mode="dark"] .slide-row { background: #1E2238; }
html[data-mode="dark"] .slide-row__img { background: #282C42; }
html[data-mode="dark"] .slide-form { background: #292D43; }
html[data-mode="dark"] .chip { background: #1E2238; }
html[data-mode="dark"] .delta--up { background: #2F3548; }
html[data-mode="dark"] .delta--down { background: #2A2B41; }
html[data-mode="dark"] .delta--flat { background: #282C42; }
html[data-mode="dark"] .rank li::before { background: #282C43; }
html[data-mode="dark"] .score--low { background: #282C42; }
html[data-mode="dark"] .score--mid { background: #333546; }
html[data-mode="dark"] .score--high { background: #2A2B41; }
html[data-mode="dark"] .ev { background: #282C42; }
html[data-mode="dark"] .ev--probe, html[data-mode="dark"] .ev--honeypot { background: #2A2B41; }
html[data-mode="dark"] .ev--login_failed, html[data-mode="dark"] .ev--rate_limited { background: #333546; }
html[data-mode="dark"] .ev--captcha_failed { background: #282B43; color: #B5A7E4; }
html[data-mode="dark"] .rule { border: 1px solid #3F394F; background: #2A2C42; }
html[data-mode="dark"] .rule.is-expired { background: #1E2238; }
html[data-mode="dark"] .theme-golestan .rank li::before { background: linear-gradient(90deg, #272B42, #2E354A); }
html[data-mode="dark"] .theme-card__art--simorgh i:nth-child(3) { background: #292C41; }
html[data-mode="dark"] .btn--warn { border-color: #3D3A40; }
html[data-mode="dark"] .act-danger__box { background: #1E2238; border: 1px solid #3F394F; }
html[data-mode="dark"] .status-tab { background: #1E2238; }
html[data-mode="dark"] .status-tab b { background: #282C42; }
html[data-mode="dark"] .status-tab--pending_review b { background: #333546; }
html[data-mode="dark"] .status-tab--rejected b { background: #2A2B41; }
html[data-mode="dark"] .status-tab--finalist b, html[data-mode="dark"] .status-tab--winner b { background: #323445; }
html[data-mode="dark"] .seg__opt span { background: #1E2238; }
html[data-mode="dark"] .stages__item { background: #1E2238; }
html[data-mode="dark"] .stages__item.is-done { background: #292D43; }
html[data-mode="dark"] .stages__item--fixed .stages__dot { background: #282C42; }
html[data-mode="dark"] .pill { background: #282C42; }
html[data-mode="dark"] .pill--open { background: #2F3548; }
html[data-mode="dark"] .pill--closed { background: #333546; }
html[data-mode="dark"] .pill--done { background: #282B43; color: #B5A7E4; }
html[data-mode="dark"] .pill--res-advanced, html[data-mode="dark"] .pill--res-wildcard { background: #2F3548; }
html[data-mode="dark"] .pill--res-eliminated { background: #282C42; }
html[data-mode="dark"] .pill--res-runner_up_1, html[data-mode="dark"] .pill--res-runner_up_2 { background: #323445; }
html[data-mode="dark"] .board__total { background: #282C42; }
html[data-mode="dark"] .board tr.res-advanced .board__total, html[data-mode="dark"] .board tr.res-wildcard .board__total, html[data-mode="dark"] .board tr.res-winner .board__total { background: #2F3548; }
html[data-mode="dark"] .finalize-box { background: linear-gradient(135deg, #2A2D40, #323445); border: 1px solid #3D3C44; }
html[data-mode="dark"] .stage-banner { background: #282C43; border: 1px solid #3B3C58; }
html[data-mode="dark"] .theme-golestan .btn--glass:hover { border-color: #414558; }
html[data-mode="dark"] .theme-golestan input[type=text], html[data-mode="dark"] .theme-golestan input[type=email], html[data-mode="dark"] .theme-golestan input[type=password], html[data-mode="dark"] .theme-golestan input[type=tel], html[data-mode="dark"] .theme-golestan input[type=date], html[data-mode="dark"] .theme-golestan input[type=number], html[data-mode="dark"] .theme-golestan input[type=url], html[data-mode="dark"] .theme-golestan select, html[data-mode="dark"] .theme-golestan textarea { background: #292D43; border-color: #3A3F55; }
html[data-mode="dark"] .theme-golestan input:focus, html[data-mode="dark"] .theme-golestan select:focus, html[data-mode="dark"] .theme-golestan textarea:focus { background: #1E2238; }
html[data-mode="dark"] .theme-golestan .choice input:checked + span { background: linear-gradient(135deg, #272B42, #2E354A); }
html[data-mode="dark"] .theme-golestan .nav a:hover, html[data-mode="dark"] .theme-golestan .nav a[aria-current="page"] { background: #282C42; }
html[data-mode="dark"] .g-sponsors { background: #1E2238; }
html[data-mode="dark"] .theme-golestan .acc-nav a:hover { background: #282C42; }
html[data-mode="dark"] .theme-golestan .acc-nav a[aria-current="page"] { background: linear-gradient(135deg, #282C43, #2F354A); }
html[data-mode="dark"] .theme-golestan .invoice-alert { background: linear-gradient(135deg, #333546, #2A2B41); border-color: #403D45; }
html[data-mode="dark"] .admin.theme-golestan { background: #282C42; }
html[data-mode="dark"] .theme-golestan .kpi--green { background: linear-gradient(135deg, #1E2238 60%, #2F3548); }
html[data-mode="dark"] .theme-golestan .kpi--yellow { background: linear-gradient(135deg, #1E2238 60%, #333546); }
html[data-mode="dark"] .theme-golestan .kpi--red { background: linear-gradient(135deg, #1E2238 60%, #2A2B41); }
html[data-mode="dark"] .theme-golestan .table th { background: #292D43; }
html[data-mode="dark"] .theme-simorgh input[type=text], html[data-mode="dark"] .theme-simorgh input[type=email], html[data-mode="dark"] .theme-simorgh input[type=password], html[data-mode="dark"] .theme-simorgh input[type=tel], html[data-mode="dark"] .theme-simorgh input[type=date], html[data-mode="dark"] .theme-simorgh input[type=number], html[data-mode="dark"] .theme-simorgh input[type=url], html[data-mode="dark"] .theme-simorgh select, html[data-mode="dark"] .theme-simorgh textarea { background: #2A2D42; border-color: #3C3C49; }
html[data-mode="dark"] .theme-simorgh .choice input:checked + span { background: #323445; }
html[data-mode="dark"] .theme-simorgh .panel { background: #2A2D42; }
html[data-mode="dark"] .theme-simorgh .nav a:hover, html[data-mode="dark"] .theme-simorgh .nav a[aria-current="page"] { background: #323445; }
html[data-mode="dark"] .iwan__lamp { background: #33333F; }
html[data-mode="dark"] .s-pillars { background: #2A2D42; }
html[data-mode="dark"]:not([dir="rtl"]) .theme-simorgh .s-prose { color: #D5D3DA; }
html[data-mode="dark"] .s-cat__age { background: #2A2D42; }
html[data-mode="dark"] .s-manuscript { background: #2A2D42; }
html[data-mode="dark"] .s-frame__in { background: #323446; }
html[data-mode="dark"] .theme-simorgh .g-qa, html[data-mode="dark"] .theme-simorgh .prose details { background: #2A2D42; }
html[data-mode="dark"] .s-sponsors { background: #2A2D42; }
html[data-mode="dark"] .theme-simorgh .prose .toc { background: #323446; }
html[data-mode="dark"] .theme-simorgh .prose .note { background: #323445; }
html[data-mode="dark"] .theme-simorgh .acc-nav { background: #2A2D42; }
html[data-mode="dark"] .theme-simorgh .acc-nav a[aria-current="page"] { background: #323445; }
html[data-mode="dark"] .theme-simorgh .invoice-alert { background: #323445; }
html[data-mode="dark"] .admin.theme-simorgh { background: #323547; }
html[data-mode="dark"] .theme-simorgh .kpi { background: #2A2D42; }
html[data-mode="dark"] .theme-simorgh .table th { background: #323446; }
html[data-mode="dark"] .theme-simorgh .table-wrap { background: #2A2D42; }
html[data-mode="dark"] .theme-simorgh .rank li::before { background: #323445; }
html[data-mode="dark"] .otp.is-done .otp__box { background: #282D42 !important; }
html[data-mode="dark"] .vote-card.is-open { border-color: #3D3C44; background: linear-gradient(160deg, var(--surface), #2A2D40); }
html[data-mode="dark"] .journey__step.is-out .journey__dot { background: #282C42; }

/* ---- hand-tuned (wins over generated) ---- */
html[data-mode="dark"] body { color-scheme: dark;
  --porcelain: #0E1226; --surface: #161B33; --ink: #ECEEF8; --ink-2: #B9BEDA; --ink-3: #8D93B3; --line: #2A3154;
  --lapis: #6C80EA; --lapis-soft: #232B55; --saffron-soft: #3A2F16; --pomegranate: #FF6B8E; --pomegranate-soft: #3B1823; --firuzeh-soft: #133533;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --g-bg: #0D1230; --g-card: #151B3A; --g-ink: #ECEEF8; --g-ink-2: #B9BEDA; --g-line: #283058; --g-night: #C9D2FF;
  --g-shadow: 0 1px 2px rgba(0,0,0,.5), 0 14px 34px rgba(0,0,0,.4);
  --s-paper: #0F1430; --s-paper-2: #171C3D; --s-ink: #F1ECDD; --s-ink-2: #C3BCD6; --s-line: #2E3358; --s-lapis: #A9B7FF;
  --lapis-deep: #0A0E22; --font-dummy: 0; }
html[data-mode="dark"] body { background-color: #0E1226; color: #ECEEF8; }
html[data-mode="dark"] .theme-golestan, html[data-mode="dark"] .theme-simorgh { background-color: #0D1230; background-blend-mode: normal; }
html[data-mode="dark"] .theme-golestan::before { background: linear-gradient(180deg, rgba(13,18,48,.94), rgba(13,18,48,.97)); }
html[data-mode="dark"] .theme-simorgh { background-image: none; }
html[data-mode="dark"] h1, html[data-mode="dark"] h2, html[data-mode="dark"] h3, html[data-mode="dark"] h4 { color: #F2F3FB; }
html[data-mode="dark"] .theme-simorgh h1, html[data-mode="dark"] .theme-simorgh h2, html[data-mode="dark"] .theme-simorgh h3 { color: #F1ECDD; }
html[data-mode="dark"] a { color: #A9B7FF; }
html[data-mode="dark"] .btn:not(.btn--gold):not(.btn--primary):not(.btn--ok):not(.btn--glass):not(.btn--ivory):not(.btn--danger):not(.btn--warn):not(.btn--wa):not(.btn--ghost) { background: #1D2342; color: #ECEEF8; border-color: #333B66; }
html[data-mode="dark"] .btn:not(.btn--gold):not(.btn--primary):not(.btn--ok):not(.btn--glass):not(.btn--ivory):not(.btn--danger):not(.btn--warn):not(.btn--wa):not(.btn--ghost):hover { background: #262D55; color: #fff; }
html[data-mode="dark"] .btn--primary { background: #4A5FD6; border-color: #4A5FD6; color: #fff; }
html[data-mode="dark"] .btn--gold { color: #2B1B05; }
html[data-mode="dark"] .btn--warn { background: transparent; color: #F6C46B; border-color: #6B5320; }
html[data-mode="dark"] .btn--ok { background: #1F8A5A; border-color: #1F8A5A; color: #fff; }
html[data-mode="dark"] .btn--danger { background: transparent; color: #FF8BA6; border-color: #6A2A3C; }
html[data-mode="dark"] .btn--danger:hover { background: #B0173F; color: #fff; }
html[data-mode="dark"] .btn--ghost { background: transparent; }
html[data-mode="dark"] input, html[data-mode="dark"] select, html[data-mode="dark"] textarea { background: #11152B !important; color: #ECEEF8; border-color: #333B66 !important; }
html[data-mode="dark"] input::placeholder, html[data-mode="dark"] textarea::placeholder { color: #7D84A6; }
html[data-mode="dark"] .site-header, html[data-mode="dark"] .theme-golestan .site-header, html[data-mode="dark"] .theme-simorgh .site-header { background: rgba(14, 18, 38, .92); border-color: #232A4C; box-shadow: none; }
html[data-mode="dark"] .brand { color: #F2F3FB; }
html[data-mode="dark"] .nav a { color: #D3D7EE; }
html[data-mode="dark"] .site-header .nav a:hover, html[data-mode="dark"] .site-header .nav a[aria-current="page"] { background: #1F2650; color: #fff; }
html[data-mode="dark"] .htool, html[data-mode="dark"] .umenu__btn, html[data-mode="dark"] .umenu__panel, html[data-mode="dark"] .totop, html[data-mode="dark"] .follow__card { background: #161B33; border-color: #2E3560; color: #ECEEF8; }
html[data-mode="dark"] .umenu__panel a:hover, html[data-mode="dark"] .umenu__out:hover { background: #1F2650; }
html[data-mode="dark"] .panel, html[data-mode="dark"] .theme-golestan .panel, html[data-mode="dark"] .theme-simorgh .panel { background: #151B3A; border-color: #283058; }
html[data-mode="dark"] .theme-simorgh .panel::after { border-color: rgba(201, 160, 78, .2); }
html[data-mode="dark"] .table th { background: #1A2044 !important; color: #D8DCF2; }
html[data-mode="dark"] .table td { border-color: #262D52; }
html[data-mode="dark"] .table tr:hover td { background: #1A2044; }
html[data-mode="dark"] .admin, html[data-mode="dark"] .admin.theme-golestan, html[data-mode="dark"] .admin.theme-simorgh { background: #0C1024; }
html[data-mode="dark"] .topbar, html[data-mode="dark"] .theme-golestan .topbar, html[data-mode="dark"] .theme-simorgh .topbar { background: rgba(14, 18, 38, .94); border-color: #232A4C; }
html[data-mode="dark"] .muted, html[data-mode="dark"] .small.muted { color: #9EA4C4; }
html[data-mode="dark"] .alert--info { background: #172042; border-color: #2B3870; color: #D7DCF6; }
html[data-mode="dark"] .alert--success { background: #12301F; border-color: #1E5A3A; color: #C9F0D9; }
html[data-mode="dark"] .alert--error { background: #3A1520; border-color: #6A2A3C; color: #FFD3DD; }
html[data-mode="dark"] .chip, html[data-mode="dark"] .status-tab, html[data-mode="dark"] .seg__opt span, html[data-mode="dark"] .pro-facts li, html[data-mode="dark"] .pro-social a { background: #161B33; border-color: #2E3560; color: #D3D7EE; }
html[data-mode="dark"] .chip.is-on, html[data-mode="dark"] .status-tab.is-on, html[data-mode="dark"] .seg__opt input:checked + span { background: #4A5FD6; border-color: #4A5FD6; color: #fff; }
html[data-mode="dark"] .kpi b, html[data-mode="dark"] .theme-golestan .kpi b, html[data-mode="dark"] .theme-simorgh .kpi b { color: #F2F3FB; }
html[data-mode="dark"] .vote-card.is-open { background: linear-gradient(160deg, #161B33, #2A2412); border-color: #5C4A1E; }
html[data-mode="dark"] .otp.is-done .otp__box { background: #12301F !important; }
html[data-mode="dark"] .site-footer { background-color: #080B1C; }
html[data-mode="dark"] .s-pillars, html[data-mode="dark"] .s-sponsors, html[data-mode="dark"] .g-sponsors { background: #11163A; border-color: #262D52; }
html[data-mode="dark"] .s-manuscript, html[data-mode="dark"] .s-cat__age, html[data-mode="dark"] .g-stat, html[data-mode="dark"] .g-cat, html[data-mode="dark"] .g-step, html[data-mode="dark"] .g-checks li { background: #151B3A; border-color: #2E3358; }
html[data-mode="dark"] .s-cats-wrap, html[data-mode="dark"] .g-section--tint { background: linear-gradient(180deg, transparent, rgba(30, 36, 80, .5)); }
html[data-mode="dark"] .s-frame__in { background: #1A1F42; }
html[data-mode="dark"] .s-prose, html[data-mode="dark"]:not([dir="rtl"]) .theme-simorgh .s-prose { color: #C9C3DC; }
html[data-mode="dark"] .pro-quote { background: #161B33; }
html[data-mode="dark"] .stages__item, html[data-mode="dark"] .theme-card, html[data-mode="dark"] .slide-row, html[data-mode="dark"] .banner, html[data-mode="dark"] .locked__img { background: #151B3A; border-color: #2A3154; }
html[data-mode="dark"] .finalize-box { background: linear-gradient(135deg, #2A2412, #231C0E); border-color: #5C4A1E; }
html[data-mode="dark"] img.thumb, html[data-mode="dark"] .person img { filter: brightness(.95); }
