:root {
  --bg: #ffffff; --panel: #f5f6f8; --text: #1b1f24; --muted: #5d6673; --line: #dde1e7;
  --accent: #1f4e79; --today: #fff4ce; --past: #8a929e; --soon: #fde7e9; --link: #1f4e79;
}
:root[data-theme="dark"] {
  --bg: #1b1d21; --panel: #25282e; --text: #e8eaed; --muted: #a2a9b4; --line: #3a3f47;
  --accent: #7fb3e6; --today: #4a3f1c; --past: #7b838f; --soon: #4a2a2e; --link: #8fc1f0;
}
:root[data-theme="contrast"] {
  --bg: #000; --panel: #000; --text: #fff; --muted: #fff; --line: #fff;
  --accent: #ffff00; --today: #000; --past: #cfcfcf; --soon: #000; --link: #ffff00;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif; padding: 16px 20px 28px; }
header { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; }
h1 { font-size: 20px; margin: 0; }
.status { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.controls label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); gap: 3px; }
.controls label.check { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); padding-bottom: 6px; }
select, button { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
button { cursor: pointer; }
button:hover, select:hover { border-color: var(--accent); }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; min-width: 150px; }
.card .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card .v { font-size: 15px; font-weight: 600; margin-top: 2px; }
.card .s { font-size: 12px; color: var(--muted); }
.message { margin: 28px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); max-width: 640px; }
.message strong { display: block; margin-bottom: 4px; }
table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
     border-bottom: 2px solid var(--line); padding: 6px 8px; position: sticky; top: 0; background: var(--bg); }
td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.past td { color: var(--past); }
tr.today td { background: var(--today); }
tr.soon td.when { background: var(--soon); font-weight: 600; }
td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.when { white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; border: 1px solid var(--line); }
.tag.Deadline { border-color: var(--accent); color: var(--accent); font-weight: 600; }
a { color: var(--link); }
footer { margin-top: 20px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { th:nth-child(5), td:nth-child(5), th:nth-child(6), td:nth-child(6) { display: none; } }
