:root {
  --bg: #f7f8f9; --panel: #ffffff; --line: #dfe1e6; --line-soft: #ebecf0;
  --text: #172b4d; --muted: #626f86; --faint: #8590a2;
  --accent: #0c66e4; --accent-soft: #e9f2ff; --accent-hover: #0055cc;
  --danger: #c9372c; --danger-soft: #ffeceb; --warn-soft: #fff7d6; --warn-line: #f5cd47;
  --ok: #1f845a; --ok-soft: #dcfff1;
  --st-todo: #dfe1e6; --st-todo-t: #44546f;
  --st-prog: #cce0ff; --st-prog-t: #0055cc;
  --st-rev: #dfd8fd; --st-rev-t: #5e4db2;
  --st-done: #baf3db; --st-done-t: #216e4e;
  --hover: #091e420f; --hover-strong: #091e4224; --hover-soft: #091e420a;
  --sunken: #f1f2f4; --input-bg: #fafbfc; --unread: #f4f8ff; --on-accent: #ffffff;
  --toast: #172b4d; --info-line: #85b8ff; --warn-text: #7f5f01; --backdrop: rgba(9,30,66,.54);
  --t-est: #579dff; --t-rem: #f38a3f; --t-log: #4bce97;
  color-scheme: light;
  --radius: 6px; --shadow: 0 1px 2px rgba(9,30,66,.12), 0 0 1px rgba(9,30,66,.2);
  --shadow-pop: 0 8px 24px rgba(9,30,66,.18), 0 0 1px rgba(9,30,66,.3);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 24px; margin: 0 0 16px; font-weight: 600; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 12px; margin: 0 0 8px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; border-radius: 4px; background: var(--hover); cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--hover-strong); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.subtle { background: transparent; }
.btn.subtle:hover { background: var(--hover); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 26px; padding: 0 8px; font-size: 13px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.input, select.input, textarea.input { width: 100%; height: 36px; padding: 0 10px; border: 2px solid var(--line); border-radius: 4px; background: var(--input-bg); }
textarea.input { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; }
.input:focus { outline: none; border-color: var(--accent); background: var(--panel); }
.input:disabled { background: var(--sunken); border-color: var(--line-soft); color: var(--muted); cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--text); margin-right: 12px; }
.logo i { width: 24px; height: 24px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; }
.nav a { display: inline-block; padding: 8px 10px; border-radius: 4px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--hover); text-decoration: none; }
.nav a.on { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.search { width: 220px; height: 32px; border: 2px solid var(--line); border-radius: 4px; padding: 0 10px; background: var(--panel); }
.iconbtn { position: relative; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 17px; }
.iconbtn:hover { background: var(--hover); }
.badge { position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - 56px); }
.side { width: 232px; flex: none; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 8px; }
.side .proj { display: flex; gap: 10px; align-items: center; padding: 4px 8px 16px; }
.side .proj b { display: block; }
.side a.item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 4px; color: var(--text); }
.side a.item:hover { background: var(--hover); text-decoration: none; }
.side a.item.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side .sep { height: 1px; background: var(--line-soft); margin: 12px 8px; }
.main { flex: 1; min-width: 0; padding: 24px 32px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }

/* ---------- atoms ---------- */
.pkey { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 700; flex: none; vertical-align: middle; }
.av.lg { width: 32px; height: 32px; font-size: 12px; }
.av.xl { width: 72px; height: 72px; font-size: 26px; }
.av.none { background: var(--panel); color: var(--faint); border: 1px dashed var(--faint); }
.who { display: inline-flex; gap: 8px; align-items: center; }
.lz { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.lz.todo { background: var(--st-todo); color: var(--st-todo-t); }
.lz.prog { background: var(--st-prog); color: var(--st-prog-t); }
.lz.rev { background: var(--st-rev); color: var(--st-rev-t); }
.lz.done { background: var(--st-done); color: var(--st-done-t); }
.lz.gray { background: var(--line-soft); color: var(--muted); }
.lz.red { background: var(--danger-soft); color: var(--danger); }
.lz.green { background: var(--ok-soft); color: var(--ok); }
.lz.yellow { background: var(--warn-soft); color: var(--warn-text); }
.prio { font-weight: 800; font-size: 13px; display: inline-block; width: 14px; text-align: center; }
.prio.highest { color: #ae2e24; } .prio.high { color: #e2483d; } .prio.medium { color: #e2b203; } .prio.low { color: #1d7afc; }
.type { width: 16px; height: 16px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; vertical-align: -3px; flex: none; }
.type.task { background: #4bade8; } .type.bug { background: #e5493a; }
.key { color: var(--muted); font-size: 13px; white-space: nowrap; }
.overdue { color: var(--danger); font-weight: 600; }
.bar { height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.bar.over > i { background: var(--danger); }
.tt { display: grid; grid-template-columns: 70px 1fr 64px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 6px; }
.tt b { text-align: right; font-weight: 600; white-space: nowrap; }
.tt .bar { height: 8px; }
.bar.stack { display: flex; }
.bar.stack > i { flex: none; }
.sum { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.sum .card { padding: 12px 14px; cursor: pointer; }
.sum .card:hover { box-shadow: var(--shadow-pop); }
.sum b { display: block; font-size: 22px; }
.sum span { font-size: 12px; color: var(--muted); }

/* ---------- tables ---------- */
table.t { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--line); white-space: nowrap; user-select: none; }
.t th.sort { cursor: pointer; } .t th.sort:hover { color: var(--text); }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: var(--sunken); }
.t td.summ { width: 40%; }
.tablewrap { overflow-x: auto; }

/* ---------- list + task pane ---------- */
.split.open { display: grid; grid-template-columns: minmax(340px, 40%) minmax(0, 1fr); gap: 16px; align-items: start; }
.split.open .wide { display: none; }
.split.open .t td.summ { width: auto; }
.split.open.full { grid-template-columns: minmax(0, 1fr); }
.split.open.full .listpane { display: none; }
.t tr.sel td { background: var(--accent-soft); }
.t tr.sel td.key a { font-weight: 700; }
.detailpane { position: sticky; top: 64px; height: calc(100vh - 80px); display: flex; flex-direction: column;
              background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panebar { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px; border-bottom: 1px solid var(--line-soft); }
.panebar .key { font-weight: 600; }
.detailpane iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }
html.embedded header.top { display: none; }
html.embedded .shell { min-height: 100vh; }
html.embedded .main { padding: 16px 20px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.chip { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.avstack { display: inline-flex; }
.avstack .av { border: 2px solid var(--bg); margin-left: -6px; cursor: pointer; width: 32px; height: 32px; font-size: 11px; }
.avstack .av:first-child { margin-left: 0; }
.avstack .av.on { border-color: var(--accent); transform: translateY(-2px); }

/* ---------- board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; }
.col { background: var(--sunken); border-radius: var(--radius); padding: 8px; min-height: 300px; }
.col.drop { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.col h3 { padding: 6px 6px 10px; margin: 0; }
.tcard { background: var(--panel); border-radius: 4px; box-shadow: var(--shadow); padding: 10px; margin-bottom: 8px; cursor: grab; }
.tcard:hover { background: var(--input-bg); }
.tcard .s { margin-bottom: 10px; }
.tcard .meta { display: flex; align-items: center; gap: 6px; font-size: 12px; }

/* ---------- task page ---------- */
.task { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; }
.title-edit { font-size: 24px; font-weight: 600; padding: 4px 6px; margin: 0 -6px 12px; border-radius: 4px; }
.title-edit:hover { background: var(--hover); cursor: text; }
.desc { padding: 8px; margin: 0 -8px 20px; border-radius: 4px; }
.desc:hover { background: var(--hover-soft); cursor: text; }
.desc p { margin: 0 0 8px; }
.atts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.att { width: 150px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--panel); font-size: 12px; }
.att .pv { height: 90px; display: grid; place-items: center; font-weight: 700; color: #fff; }
.att .nm { padding: 6px 8px; }
.att .nm b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone { border: 2px dashed var(--line); border-radius: 4px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.dropzone.hot { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line-soft); margin-bottom: 16px; }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 500; margin-bottom: -2px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom: 2px solid var(--accent); }
.ev { display: flex; gap: 12px; margin-bottom: 18px; }
.ev .body { flex: 1; min-width: 0; }
.ev .hd { font-size: 13px; margin-bottom: 4px; }
.ev .hd .when { color: var(--muted); margin-left: 6px; }
.ev .ch { color: var(--muted); font-size: 13px; }
.ev .ch s { color: var(--faint); }
.details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.details .hd { padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 12px 8px; padding: 16px; align-items: center; }
.dl > dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.dl > dd { margin: 0; min-width: 0; }
.dl select, .dl input { width: 100%; border: 2px solid transparent; background: transparent; border-radius: 4px; padding: 3px 4px; height: 32px; cursor: pointer; }
.dl select:hover, .dl input:hover { background: var(--hover); }
.dl select:focus, .dl input:focus { border-color: var(--accent); background: var(--panel); outline: none; }
.statsel { font-weight: 700; text-transform: uppercase; font-size: 12px !important; border-radius: 4px; }
.foot { font-size: 12px; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.banner.warn { background: var(--warn-soft); border: 1px solid var(--warn-line); }
.banner.info { background: var(--accent-soft); border: 1px solid var(--info-line); }
.banner .ic { font-size: 18px; line-height: 1; }

/* ---------- popups ---------- */
.pop { position: absolute; z-index: 40; top: 48px; right: 56px; width: 380px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow-pop); }
.pop .hd { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.nt { display: flex; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.nt:hover { background: var(--sunken); }
.nt.unread { background: var(--unread); }
.nt .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.nt .dot.read { background: transparent; }
.nt small { color: var(--muted); }
.veil { position: fixed; inset: 0; z-index: 50; background: var(--backdrop); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow: auto; }
.modal { width: 640px; max-width: 100%; background: var(--panel); border-radius: 8px; box-shadow: var(--shadow-pop); }
.modal.sm { width: 440px; }
.modal .hd { padding: 20px 24px 8px; font-size: 20px; font-weight: 600; }
.modal .bd { padding: 8px 24px; }
.modal .ft { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 16px 24px 20px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; font-family: Consolas, monospace; font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--toast); color: #fff; padding: 10px 16px; border-radius: 4px; box-shadow: var(--shadow-pop); }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 400px; max-width: 100%; padding: 32px 40px; }
.auth .logo { justify-content: center; margin: 0 0 24px; font-size: 20px; }
.auth .logo i { width: 32px; height: 32px; font-size: 16px; }

/* ---------- admin ---------- */
.stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat .card b { display: block; font-size: 24px; }
.stat .card span { color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { padding: 16px; }
  .task { grid-template-columns: 1fr; }
  .search, .nav { display: none; }
  .stat { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .mywrap { grid-template-columns: 1fr !important; }
  .sum { grid-template-columns: 1fr 1fr; }
}

/* ---------- additions for the real site ---------- */
/* stored status ids are in_progress / review; the mockup used prog / rev */
.lz.in_progress { background: var(--st-prog); color: var(--st-prog-t); }
.lz.review { background: var(--st-rev); color: var(--st-rev-t); }
.error { background: var(--danger-soft); color: var(--danger); border-radius: 4px; padding: 8px 12px; margin-bottom: 14px; font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }
.linkbtn:hover { text-decoration: underline; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu .pop { top: 40px; right: 0; width: 240px; }
.menu .pop .item { display: block; width: 100%; text-align: left; padding: 10px 16px; border: 0; background: none; cursor: pointer; color: var(--text); font: inherit; }
.menu .pop .item:hover { background: var(--sunken); text-decoration: none; }
.tabs a { text-decoration: none; }
.sum a.card { display: block; color: inherit; text-decoration: none; }

/* ---------- task page ---------- */
[hidden] { display: none !important; }
.inline-form { display: inline; margin: 0; }
.att { position: relative; }
.att a:hover { text-decoration: none; }
.att img.pv { width: 100%; height: 90px; object-fit: cover; display: block; background: var(--line-soft); }
.att .nm a b { color: var(--text); }
.att .del { font-size: 12px; margin-top: 2px; }
.radio { gap: 8px !important; margin-bottom: 6px; font-weight: 400; color: var(--text); }
dialog.modal { border: 0; padding: 0; color: var(--text); background: var(--panel); }
dialog.modal::backdrop { background: var(--backdrop); }
.statsel.lz { text-transform: uppercase; font-size: 12px; font-weight: 700; height: 32px; padding: 0 8px; cursor: pointer; }
.title-edit { overflow-wrap: anywhere; }

/* ---------- project pages ---------- */
.side .proj > div { min-width: 0; }
.navmenu { display: inline-block; }
.navmenu > summary { display: inline-block; padding: 8px 10px; border-radius: 4px; color: var(--muted); font-weight: 500; }
.navmenu > summary:hover { background: var(--hover); }
.navmenu > summary.on { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); border-radius: 0; }
.navmenu .pop { left: 0; right: auto; width: 280px; padding: 4px 0; }
.navmenu .pop .item { display: flex; gap: 8px; align-items: center; }
.filters label.chip input, .avstack label.av input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.filters label.chip:focus-within, .avstack label.av:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
select.chip { padding-right: 6px; }
.sortlink { color: inherit; } .sortlink:hover { color: var(--text); text-decoration: none; }
a.chip { color: var(--text); text-decoration: none; }
a.chip.on { color: var(--accent); }
.tcard.dragging { opacity: .4; }
.tcard .key { color: var(--muted); }
.board .col { min-height: 200px; }
@media (max-width: 900px) { .board { grid-template-columns: repeat(4, 240px); } }

/* ---------- dark theme ----------
   Follows the system unless the person picked one in the menu
   (html[data-theme="light" | "dark"], remembered in this browser). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d2125; --panel: #22272b; --line: #38414a; --line-soft: #2c333a;
    --text: #b6c2cf; --muted: #8c9bab; --faint: #738496;
    --accent: #579dff; --accent-soft: #1c2b41; --accent-hover: #85b8ff; --on-accent: #1d2125;
    --danger: #f87168; --danger-soft: #42221f; --warn-soft: #533f04; --warn-line: #7f5f01; --warn-text: #f5cd47;
    --ok: #4bce97; --ok-soft: #1c3329;
    --st-todo: #38414a; --st-todo-t: #b6c2cf;
    --st-prog: #09326c; --st-prog-t: #85b8ff;
    --st-rev: #352c63; --st-rev-t: #b8acf6;
    --st-done: #164b35; --st-done-t: #7ee2b8;
    --hover: #a1bdd914; --hover-strong: #a6c5e229; --hover-soft: #a1bdd90a;
    --sunken: #161a1d; --input-bg: #22272b; --unread: #1c2b41;
    --toast: #dee4ea; --info-line: #0055cc; --backdrop: rgba(3,4,4,.64);
    --shadow: 0 1px 1px #03040480, 0 0 1px #03040480;
    --shadow-pop: 0 8px 24px #03040499, 0 0 1px #bcd6f080;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d2125; --panel: #22272b; --line: #38414a; --line-soft: #2c333a;
  --text: #b6c2cf; --muted: #8c9bab; --faint: #738496;
  --accent: #579dff; --accent-soft: #1c2b41; --accent-hover: #85b8ff; --on-accent: #1d2125;
  --danger: #f87168; --danger-soft: #42221f; --warn-soft: #533f04; --warn-line: #7f5f01; --warn-text: #f5cd47;
  --ok: #4bce97; --ok-soft: #1c3329;
  --st-todo: #38414a; --st-todo-t: #b6c2cf;
  --st-prog: #09326c; --st-prog-t: #85b8ff;
  --st-rev: #352c63; --st-rev-t: #b8acf6;
  --st-done: #164b35; --st-done-t: #7ee2b8;
  --hover: #a1bdd914; --hover-strong: #a6c5e229; --hover-soft: #a1bdd90a;
  --sunken: #161a1d; --input-bg: #22272b; --unread: #1c2b41;
  --toast: #dee4ea; --info-line: #0055cc; --backdrop: rgba(3,4,4,.64);
  --shadow: 0 1px 1px #03040480, 0 0 1px #03040480;
  --shadow-pop: 0 8px 24px #03040499, 0 0 1px #bcd6f080;
  color-scheme: dark;
}
/* the toast is light on dark, so its text flips too */
:root[data-theme="dark"] .toast { color: #1d2125; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .toast { color: #1d2125; } }
.theme-pick { display: flex; gap: 4px; padding: 8px 16px 12px; }
.theme-pick button { flex: 1; height: 28px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); cursor: pointer; font-size: 12px; }
.theme-pick button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Type icons are small pictures, not text or CSS shapes: a fallback font placed the text glyph far off
   its box in Firefox, and a rotated ::after drifted out of the box in Chrome. */
.type.task { background: #4bade8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.5l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.type.bug { background: #e5493a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3' fill='white'/%3E%3C/svg%3E") center / 100% no-repeat; }

/* ---------- the bell ---------- */
.bell > summary { color: var(--muted); }
.bell > summary svg { width: 20px; height: 20px; display: block; }
.bell[open] > summary, .bell > summary:hover { background: var(--hover); color: var(--text); }
.bell .badge[hidden] { display: none; }
.bell .pop { width: 420px; max-width: calc(100vw - 24px); }
.bell .pop .ntlist { max-height: min(520px, calc(100vh - 160px)); overflow-y: auto; }
.bell .pop .foot { border-top: 1px solid var(--line); text-align: center; padding: 10px 16px; font-size: 13px; }
.bell .pop .loading { padding: 16px; }
a.nt { color: var(--text); text-decoration: none; align-items: flex-start; }
.nt .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 13px; }
.nt .subj { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.nt .quote { color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; margin: 2px 0;
             display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.nt .lz { font-size: 10px; }
.ntpage .ntlist .nt:last-child { border-bottom: 0; }
.toast.news { max-width: min(560px, calc(100vw - 32px)); }
.toast.news a { color: inherit; text-decoration: underline; }
@media (max-width: 520px) {
  .bell .pop { position: fixed; top: 56px; left: 8px; right: 8px; width: auto; max-width: none; }
}

/* ---------- About: a dark credits plate in both themes, light-blue links ---------- */
.about-wrap { display: grid; place-items: center; padding: 48px 16px; }
.card.about { width: 460px; max-width: 100%; padding: 32px 36px 24px; text-align: center; background: #1d2125; color: #dee4ea; box-shadow: var(--shadow-pop); }
.about .logo { justify-content: center; margin: 0 0 6px; font-size: 26px; color: #fff; }
.about .logo i { width: 34px; height: 34px; font-size: 18px; }
.about-ver { font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.about-what, .about-lic { margin: 0 0 6px; color: #9fadbc; font-size: 13px; }
.about-contacts { display: grid; grid-template-columns: max-content max-content; justify-content: center; gap: 4px 12px; margin: 20px 0; }
.about-contacts dt { text-align: right; color: #9fadbc; }
.about-contacts dd { margin: 0; text-align: left; }
.about a { color: #66b3ff; text-decoration: underline; text-underline-offset: 2px; }
.about a:hover { color: #99ccff; }
.about-back { margin: 0; font-size: 13px; }
