:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1d1f22; --dim: #5d6168; --line: #d9d5cc;
  --accent: #0f6b5c; --accent-ink: #ffffff; --err: #b3261e; --err-bg: #fdecea;
  --open: #17643a; --open-bg: #e3f3e8; --done: #6639ba; --done-bg: #efe8fb; --np-bg: #ecebe7;
  --focus: #1a73e8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #15171a; --card: #1f2226; --ink: #eceae6; --dim: #a7abb2; --line: #363a40;
    --accent: #5fc3ad; --accent-ink: #0b1f1b; --err: #ffb4ab; --err-bg: #3b1e1c;
    --open: #7ee2a0; --open-bg: #183323; --done: #cdb5ff; --done-bg: #2c2442; --np-bg: #2a2d32;
    --focus: #8ab4f8;
  }
}
:root[data-theme=dark] {
  --bg: #15171a; --card: #1f2226; --ink: #eceae6; --dim: #a7abb2; --line: #363a40;
  --accent: #5fc3ad; --accent-ink: #0b1f1b; --err: #ffb4ab; --err-bg: #3b1e1c;
  --open: #7ee2a0; --open-bg: #183323; --done: #cdb5ff; --done-bg: #2c2442; --np-bg: #2a2d32;
  --focus: #8ab4f8;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Vazirmatn", Tahoma, "Noto Sans", sans-serif;
}
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
h1 { font-size: 1.4rem; margin: 0; line-height: 1.3; }
.tools { display: flex; align-items: center; gap: 8px; }
.tools form { display: flex; gap: 6px; margin: 0; }
.tbtn { width: 40px; min-height: 40px; padding: 0; font: inherit; font-size: 1.2rem; line-height: 1; border-radius: 10px; background: transparent; color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.tbtn.go { width: auto; padding: 0 12px; font-size: .95rem; }
select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; min-height: 40px; padding: 6px 10px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.lead { color: var(--dim); font-size: .95rem; margin: 0 0 14px; }
.btn { display: block; text-align: center; text-decoration: none; font-weight: 700; border-radius: 12px; padding: 12px 22px; min-height: 48px; background: var(--accent); color: var(--accent-ink); margin: 0 0 16px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; margin: 0 0 12px; padding: 0; }
.tabs a { display: flex; align-items: center; min-height: 40px; padding: 4px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.tabs a[aria-current] { border-color: var(--accent); outline: 1px solid var(--accent); font-weight: 600; }
.note { border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-weight: 600; background: var(--err-bg); color: var(--err); }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.issue { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--dim); font-size: .85rem; }
.num { color: var(--dim); font-weight: 600; }
.st { font-weight: 700; font-size: .78rem; border-radius: 999px; padding: 1px 10px; }
.st-open { background: var(--open-bg); color: var(--open); }
.st-done { background: var(--done-bg); color: var(--done); }
.st-np { background: var(--np-bg); color: var(--dim); }
.issue h2 { font-size: 1.05rem; line-height: 1.45; margin: 6px 0 4px; overflow-wrap: anywhere; }
.issue h2 a { color: var(--ink); text-decoration: none; }
.issue h2 a:hover { text-decoration: underline; }
.ex { margin: 0; color: var(--dim); font-size: .9rem; white-space: pre-line; overflow-wrap: anywhere; }
.labels { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.labels li { border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; font-size: .78rem; color: var(--dim); overflow-wrap: anywhere; }
.empty { color: var(--dim); text-align: center; padding: 24px 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 0; }
.pager a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 16px; border: 1px solid var(--accent); border-radius: 12px; color: var(--accent); text-decoration: none; font-weight: 600; }
.pager .here { color: var(--dim); font-size: .9rem; }
.foot { color: var(--dim); font-size: .85rem; margin-top: 20px; }
.foot a { color: var(--accent); }
[hidden] { display: none !important; }
