/* ---------------------------------------------------------------------------
   Dark mode (Manix 2026-10-14). theme.js sets <html data-theme="dark"> from
   the creator's choice on the Settings page. Most of styles.css runs on the
   variables below; the rest of this file covers rules there (and in push.css)
   that hard-code a light colour. Load after styles.css and push.css. A new
   rule with a hard-coded light colour needs a line here too.
--------------------------------------------------------------------------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --text: #e6edf3;
  --muted: #9198a1;
  --faint: #6e7681;
  --line: #30363d;
  --bg: #0d1117;
  --card: #161b22;
  --accent: #4493f8;
  --accent-hover: #6cb6ff;
  --accent-soft: rgba(56, 139, 253, .15);
  --danger: #f85149;
  --danger-soft: rgba(248, 81, 73, .12);
  --good: #238636;
  --good-soft: rgba(46, 160, 67, .15);
  --bar: #010409;
  --ring: 0 0 0 1px rgba(240, 246, 252, .08);
  --lift: 0 1px 2px rgba(0, 0, 0, .3);
  --lift-hover: 0 4px 14px rgba(0, 0, 0, .45);
  --focus: #4493f8;
}
/* Notion status colours, dark versions */
[data-theme="dark"] .c-default { --opt-bg: rgba(110, 118, 129, .3); --opt-fg: #d4d4d4; }
[data-theme="dark"] .c-gray    { --opt-bg: #3a3a3a; --opt-fg: #e3e2e0; }
[data-theme="dark"] .c-brown   { --opt-bg: #4a3328; --opt-fg: #f0e6e1; }
[data-theme="dark"] .c-orange  { --opt-bg: #5c3b1e; --opt-fg: #fbe4d3; }
[data-theme="dark"] .c-yellow  { --opt-bg: #59491f; --opt-fg: #fdf0d5; }
[data-theme="dark"] .c-green   { --opt-bg: #24402f; --opt-fg: #dcf0e3; }
[data-theme="dark"] .c-blue    { --opt-bg: #23384f; --opt-fg: #dbe8f5; }
[data-theme="dark"] .c-purple  { --opt-bg: #3b2a4f; --opt-fg: #ece3f3; }
[data-theme="dark"] .c-pink    { --opt-bg: #4f2a3c; --opt-fg: #f7e1ec; }
[data-theme="dark"] .c-red     { --opt-bg: #5a2a26; --opt-fg: #fde2df; }

[data-theme="dark"] .banner { background: #3b2e00; color: #f2cc60; }
[data-theme="dark"] .banner button { border-color: rgba(255, 255, 255, .25); color: inherit; }

[data-theme="dark"] .auth input { background: #0d1117; }
[data-theme="dark"] .auth input:focus { background: #0d1117; }
/* :where() keeps these at plain .btn / .chip strength, so .btn.primary etc. still win */
:where([data-theme="dark"]) .btn { background: #21262d; border-color: #30363d; }
:where([data-theme="dark"]) .chip { background: #21262d; }
[data-theme="dark"] .chip.on { background: var(--text); border-color: var(--text); color: #0d1117; }
[data-theme="dark"] .note { color: #a5d6ff; }
[data-theme="dark"] .note.soon { background: #3b2e00; color: #f2cc60; }

[data-theme="dark"] .card:active, [data-theme="dark"] a.stile:active { background: #1c2128; }
[data-theme="dark"] .csum { color: #b6bec8; }
[data-theme="dark"] .thumbs .th { background: #21262d; }
[data-theme="dark"] .thumbs .more-n,
[data-theme="dark"] .tag,
[data-theme="dark"] .qbar,
[data-theme="dark"] .tile { background: #21262d; }
[data-theme="dark"] .body blockquote { color: #b6bec8; }
[data-theme="dark"] .body .callout { background: #1c2128; }
[data-theme="dark"] .body pre { background: #0d1117; }
[data-theme="dark"] .sticky-cta { background: rgba(13, 17, 23, .92); }
[data-theme="dark"] .toast { background: #e6edf3; color: #0d1117; }

[data-theme="dark"] .overdue-strip { border-color: rgba(248, 81, 73, .4); }
[data-theme="dark"] .nothing { background: rgba(22, 27, 34, .6); }
[data-theme="dark"] .pill.b-todo { background: #2d333b; color: #d1d7e0; }
[data-theme="dark"] .pill.b-submitted { background: #23384f; color: #dbe8f5; }
[data-theme="dark"] .pill.b-done { background: #24402f; color: #dcf0e3; }
[data-theme="dark"] .pill.b-skipped { background: #2d333b; color: #9198a1; }
[data-theme="dark"] .warn, [data-theme="dark"] .needcount { color: #d29922; }
[data-theme="dark"] .tag.warn { background: #3b2e00; color: #f2cc60; }
[data-theme="dark"] .staffinfo { color: #a5d6ff; }
[data-theme="dark"] .staffinfo.bad { background: #3b2e00; color: #f2cc60; }
[data-theme="dark"] .stile.soon { background: #11161d; }
[data-theme="dark"] .ccounts .cn { background: #21262d; }
[data-theme="dark"] .ccounts .cn.bad { box-shadow: inset 0 0 0 1px rgba(248, 81, 73, .4); }

/* Request Edit + changes-requested box */
[data-theme="dark"] .pill.editreq { background: #4a2c0e; color: #ffb77c; }
[data-theme="dark"] .panel.editnote,
[data-theme="dark"] .edits-strip { background: #2b1d0e; border-color: #6b3f12; }
[data-theme="dark"] .editnote h2,
[data-theme="dark"] .edits-strip > summary,
[data-theme="dark"] .edits-strip .odate { color: #ffb77c; }
[data-theme="dark"] .panel.reqedit textarea { background: #0d1117; color: var(--text); }
[data-theme="dark"] .file .oldtag { background: #21262d; color: #9198a1; }

@media (hover: hover) {
  :where([data-theme="dark"]) .btn:not(:disabled):hover,
  :where([data-theme="dark"]) .chip:not(.on):hover { background: #30363d; border-color: #8b949e; }
  [data-theme="dark"] .linkcard:hover { background: #1c2128; }
}

/* push.css */
[data-theme="dark"] .pcard { box-shadow: none; }

/* Expand assignments switch + expanded card shadow (styles.css) */
[data-theme="dark"] .xswitch .track { background: #30363d; }
[data-theme="dark"] .bigcard { box-shadow: var(--ring), 0 2px 12px rgba(0, 0, 0, .55); }
/* Content Assignments options (2026-10-19) */
[data-theme="dark"] .pill.b-late { background: rgba(248, 81, 73, .15); color: #ff7b72; }
/* Content Assignments tab (2026-10-19) */
[data-theme="dark"] .asg-warn { background: rgba(187, 128, 9, .15); color: #e3b341; }
[data-theme="dark"] .asg-tl.short, [data-theme="dark"] .cd-count.hot { background: #4a2c0e; color: #ffb77c; border-color: #6b4318; }
[data-theme="dark"] .asg-tl.met { background: #1f3a2a; color: #b7e4c7; }
[data-theme="dark"] .asg-tl.over { background: #23384f; color: #dbe8f5; }

/* Needs Human Rating (2026-10-31) */
[data-theme="dark"] .rthumb { background: #21262d; }
[data-theme="dark"] .ratebtns .btn.on { background: var(--text); border-color: var(--text); color: #0d1117; }
[data-theme="dark"] .qbtn.on { background: var(--text); border-color: var(--text); color: #0d1117; }
[data-theme="dark"] .asg-ov.met { background: #1f3a2a; color: #b7e4c7; }
[data-theme="dark"] .asg-ov.short { background: #4a2c0e; color: #ffb77c; border-color: #6b4318; }
[data-theme="dark"] .asg-ov.none { background: #4a1d17; color: #ffb4a8; }
[data-theme="dark"] .acct .acct-flag { color: #d29922; }
[data-theme="dark"] .resetdot { background: #3b2e00; color: #f2cc60; }
[data-theme="dark"] .fbbox textarea.fbtext { background: #0d1117; color: var(--text); }
