:root { color-scheme: light; }
.top-actions { display:flex; align-items:center; gap:10px; margin-left:auto; min-width:0; }
.top .top-actions button { margin-left:0; }
#theme-toggle { width:41px; min-width:41px; height:41px; padding:0; font-size:22px; line-height:1; }
.group-teacher-block { margin-top:20px; padding:15px; border:1px solid var(--line); border-left:3px solid var(--green); border-radius:8px; background:#edf3e9; }
.group-teacher-block .group-report-head { justify-content:space-between; }
.group-teacher-block .group-report-head button { font-size:12px; }
.group-teacher-block .group-text { margin:10px 0 0; font-size:14px; }
.group-export-weekdays { display:flex; flex-wrap:wrap; gap:10px 18px; border:1px solid var(--line); border-radius:8px; margin:18px 0; padding:14px; }
.groups-section .group-export-weekdays label { display:flex; align-items:center; gap:7px; margin:0; cursor:pointer; }
.group-export-weekdays input[type=checkbox] { width:17px; height:17px; margin:0; accent-color:var(--green); }
html[data-theme=dark] {
    color-scheme:dark;
    --ink:#e5ede7; --paper:#121b18; --green:#9bdab4; --line:#34463c; --muted:#b0bfb4; --lime:#e9f49b;
    --dark-surface:#1b2822; --dark-soft:#22352a; --dark-raised:#283f31; --dark-primary:#285e41;
    --home-surface:#1b2822; --home-soft:#22352a;
}
html[data-theme=dark] button,
html[data-theme=dark] input,
html[data-theme=dark] select,
html[data-theme=dark] textarea { background:var(--dark-surface); color:var(--ink); border-color:var(--line); }
html[data-theme=dark] input::placeholder,
html[data-theme=dark] textarea::placeholder { color:#99aa9e; opacity:1; }
html[data-theme=dark] button:hover { background:var(--dark-raised); border-color:var(--green); }
html[data-theme=dark] .primary,
html[data-theme=dark] .packs button.active,
html[data-theme=dark] .community-tabs [aria-selected=true],
html[data-theme=dark] #solver-list li.mine { background:var(--dark-primary); color:#f3faf5; border-color:#52926a; }
html[data-theme=dark] .primary:hover { background:#32714e; color:#fff; }
html[data-theme=dark] .logo,
html[data-theme=dark] .thought { background:#204a34; color:#f5f8f1; }
html[data-theme=dark] .stats,
html[data-theme=dark] .community-section,
html[data-theme=dark] .admin-tools>section,
html[data-theme=dark] .admin-hints fieldset,
html[data-theme=dark] .tutorial-card,
html[data-theme=dark] .tutorial-content table,
html[data-theme=dark] .tutorial-related a,
html[data-theme=dark] .tutorial-prerequisite-links a,
html[data-theme=dark] .tutorial-lesson-navigation a,
html[data-theme=dark] .group-card,
html[data-theme=dark] .group-report-card,
html[data-theme=dark] .hint,
html[data-theme=dark] #solver-list li,
html[data-theme=dark] .segment-demo-node { background:var(--dark-surface); }
html[data-theme=dark] .method,
html[data-theme=dark] #reflection,
html[data-theme=dark] .solvers,
html[data-theme=dark] .profile-stats strong,
html[data-theme=dark] .admin-section,
html[data-theme=dark] .tutorial-toc,
html[data-theme=dark] .tutorial-math,
html[data-theme=dark] .tutorial-note,
html[data-theme=dark] .segment-demo,
html[data-theme=dark] .group-day-bar,
html[data-theme=dark] .group-teacher-block,
html[data-theme=dark] .group-date-chips button { background:var(--dark-soft); }
html[data-theme=dark] .group-card:hover,
html[data-theme=dark] .person:hover,
html[data-theme=dark] #solver-list li button:hover { background:var(--dark-raised); }
html[data-theme=dark] .groups-section .group-day-bar input { background:var(--dark-surface); }
html[data-theme=dark] .avatar { background:#304a37; color:#c5e6c6; }
html[data-theme=dark] .tutorial-content code,
html[data-theme=dark] .tutorial-content th,
html[data-theme=dark] .tag-chip { background:#2a3b2f; color:#d9e7d9; }
html[data-theme=dark] .rating { background:#2c402d; color:#c8e2ba; border-color:#597253; }
html[data-theme=dark] .rating-19,
html[data-theme=dark] .rating-20,
html[data-theme=dark] .rating-21 { background:#39304b; color:#dcc9f7; border-color:#716089; }
html[data-theme=dark] .rating-22,
html[data-theme=dark] .rating-23,
html[data-theme=dark] .rating-24,
html[data-theme=dark] .rating-25 { background:#4c3928; color:#f1d0a0; border-color:#8c6c45; }
html[data-theme=dark] .badge.solved,
html[data-theme=dark] .segment-demo-node.covered { background:#294531; color:#c3e9bd; border-color:#5b8758; }
html[data-theme=dark] .badge.trying,
html[data-theme=dark] .segment-demo-node.partial { background:#493e24; color:#f3dea5; border-color:#9e8849; }
html[data-theme=dark] .segment-demo-node.excluded { background:#2a312d; color:#b8c2ba; border-color:#4f5c52; }
html[data-theme=dark] .priority-star,
html[data-theme=dark] .problem.is-priority .number { color:#ebc56c; }
html[data-theme=dark] .danger { color:#ffb8ad; border-color:#95625b; }
html[data-theme=dark] .site-nav a:hover { color:#d2efdb; }
html[data-theme=dark] .dialog-head button,
html[data-theme=dark] .problem .open,
html[data-theme=dark] .subtle,
html[data-theme=dark] .person,
html[data-theme=dark] #solver-list li button { background:transparent; }
html[data-theme=dark] .tutorial-code { background:#171f2b; color:#d8dee9; }
html[data-theme=dark] .tutorial-code pre,
html[data-theme=dark] .tutorial-code pre code { background:transparent; color:inherit; }
html[data-theme=dark] .code-toolbar { background:#2b3545; color:#e3e9f2; }
html[data-theme=dark] .tutorial-code .code-toolbar button { background:transparent; color:#e3e9f2; }
html[data-theme=dark] .tutorial-sample { background:#202f27; color:#e5ede7; }
html[data-theme=dark] .tutorial-sample .code-toolbar { background:#2b4033; color:#e5ede7; }
html[data-theme=dark] .tutorial-sample .code-toolbar button,
html[data-theme=dark] .tutorial-sample pre code { color:#e5ede7; }
@media(max-width:700px) {
    .top { gap:10px; }
    .top-actions { gap:7px; }
    .top .top-actions #account { max-width:150px; }
}
@media(max-width:420px) {
    .top { padding-left:14px; padding-right:14px; }
    .top .brand { font-size:20px; }
    .top .logo { font-size:26px; padding-left:9px; padding-right:9px; margin-right:7px; }
    .top .top-actions #account { max-width:112px; padding:8px; font-size:12px; }
    #theme-toggle { width:34px; min-width:34px; height:37px; font-size:20px; }
}

html[data-theme=dark] .method.home-sections { background:transparent; }
html[data-theme=dark] .home-recent { background:transparent; }
html[data-theme=dark] .home-recent:hover { background:var(--home-soft); }
