/* Полигон — стили. Токены на :root, тёмная тема через data-theme и prefers-color-scheme. */
:root {
  --paper: #F5F7FA;
  --surface: #FFFFFF;
  --sunken: #EEF1F6;
  --ink: #172033;
  --ink-2: #4A5670;
  --ink-3: #7B869C;
  --line: #DCE2EA;
  --brand: #2B59C3;
  --brand-ink: #FFFFFF;
  --brand-soft: #E6EDFB;
  --ok: #1F8A5B;      /* готово / resolved */
  --ok-soft: #E3F4EC;
  --warn: #C98A12;    /* в работе / pending */
  --warn-soft: #FBF1DC;
  --bad: #C2412D;     /* ошибка / firing */
  --bad-soft: #FBE7E3;
  --idle: #A3AEC0;
  --code-bg: #142038;
  --code-ink: #DCE6FF;
  --shadow: 0 1px 2px rgba(23,32,51,.06), 0 4px 16px rgba(23,32,51,.05);
  --r-s: 6px; --r-m: 10px; --r-l: 16px;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --side: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10151F; --surface: #171E2B; --sunken: #1D2534; --ink: #E4E9F2; --ink-2: #AAB4C6; --ink-3: #7C879B;
    --line: #2A3446; --brand: #6E95F2; --brand-ink: #0D1424; --brand-soft: #1E2B47; --ok: #3DBB86; --ok-soft: #173426;
    --warn: #E2A93A; --warn-soft: #3A2E15; --bad: #EE6A55; --bad-soft: #3D1D19; --idle: #4C586D;
    --code-bg: #0B1120; --code-ink: #D6E1FA; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10151F; --surface: #171E2B; --sunken: #1D2534; --ink: #E4E9F2; --ink-2: #AAB4C6; --ink-3: #7C879B;
  --line: #2A3446; --brand: #6E95F2; --brand-ink: #0D1424; --brand-soft: #1E2B47; --ok: #3DBB86; --ok-soft: #173426;
  --warn: #E2A93A; --warn-soft: #3A2E15; --bad: #EE6A55; --bad-soft: #3D1D19; --idle: #4C586D;
  --code-bg: #0B1120; --code-ink: #D6E1FA; --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 650; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .86em; background: var(--sunken); padding: .1em .35em; border-radius: 4px; }
pre { font-family: var(--mono); font-size: .82rem; line-height: 1.5; background: var(--code-bg); color: var(--code-ink);
      padding: 14px 16px; border-radius: var(--r-m); overflow-x: auto; margin: .6em 0 1.2em; }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
mark { background: var(--warn-soft); color: inherit; padding: 0 .15em; border-radius: 3px; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- каркас ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line);
        background: var(--surface); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; text-decoration: none; color: var(--ink); }
.brand svg { flex: none; }
.brand b { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.brand span { display: block; font-size: .75rem; color: var(--ink-3); margin-top: -2px; }
.side-search { margin: 0 4px 12px; }
.side-search input { width: 100%; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-s); color: var(--ink-2);
         text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--sunken); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: .875rem; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
          display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.side-foot .row { display: flex; gap: 8px; }
.main { min-width: 0; padding: 28px 40px 80px; }
.topbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; z-index: 30; box-shadow: var(--shadow); }
  body.menu-open .side { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; padding: 10px 16px;
            background: var(--surface); border-bottom: 1px solid var(--line); }
  .main { padding: 20px 16px 64px; }
}

/* ---------- элементы ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
       padding: 8px 14px; border-radius: var(--r-s); font: 500 .925rem var(--sans); cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink-3); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.07); border-color: var(--brand); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--sunken); border-color: transparent; }
.btn-s { padding: 5px 10px; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; flex: none; }
#menu-toggle svg { width: 22px; height: 22px; }
input[type=text], input[type=password], input[type=search], input[type=date], textarea, select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 10px; }
textarea { width: 100%; resize: vertical; min-height: 120px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--sunken); color: var(--ink-2); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-brand { background: var(--brand); color: var(--brand-ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 24px; }
.panel + .panel { margin-top: 18px; }
.panel h2 { font-size: 1.1rem; }
.bar { height: 8px; background: var(--sunken); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.bar.ok > i { background: var(--ok); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 64ch; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper);
         padding: 8px 16px; border-radius: 99px; font-size: .875rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }

/* ---------- обзор ---------- */
.today { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.today h1 { font-size: 1.9rem; margin-bottom: .3em; }
.today .day-meta { color: var(--ink-2); margin-bottom: 14px; }
.today .cta { display: grid; gap: 10px; justify-items: end; }
@media (max-width: 700px) { .today { grid-template-columns: 1fr; } .today .cta { justify-items: start; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--ink-2); font-size: .85rem; }
.heat { display: flex; gap: 3px; }
.heat .col { display: grid; grid-template-rows: repeat(7, 12px); gap: 3px; }
.heat i { width: 12px; height: 12px; border-radius: 3px; background: var(--sunken); }
.heat i.l1 { background: color-mix(in srgb, var(--ok) 30%, var(--sunken)); }
.heat i.l2 { background: color-mix(in srgb, var(--ok) 55%, var(--sunken)); }
.heat i.l3 { background: color-mix(in srgb, var(--ok) 80%, var(--sunken)); }
.heat i.l4 { background: var(--ok); }
.heat i.f { opacity: .35; }

/* ---------- карта курса: линии метро ---------- */
.metro { display: grid; gap: 6px; }
.line { --c: var(--brand); display: grid; grid-template-columns: 210px 1fr 54px; align-items: center; gap: 14px; padding: 8px 0; }
.line .lname { display: flex; gap: 10px; align-items: center; min-width: 0; text-decoration: none; color: var(--ink); }
.line .lcode { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700;
               display: grid; place-items: center; font-size: .82rem; }
.line .ltitle { font-size: .9rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track { position: relative; display: flex; justify-content: space-between; align-items: center; height: 26px; }
.track::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 4px; margin-top: -2px; background: var(--c); opacity: .25; border-radius: 4px; }
.track .fill { position: absolute; left: 6px; top: 50%; height: 4px; margin-top: -2px; background: var(--c); border-radius: 4px; }
.stn { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--c); z-index: 1; }
.stn.done { background: var(--c); }
.stn.doing { background: var(--warn); border-color: var(--warn); }
.stn:hover { transform: scale(1.3); }
.line .lpct { text-align: right; font-weight: 650; font-size: .9rem; color: var(--ink-2); }
.l-A { --c: #2B59C3; } .l-B { --c: #0E8C8C; } .l-C { --c: #7A4FD0; } .l-D { --c: #C25A1F; }
.l-E { --c: #B8326B; } .l-F { --c: #1F8A5B; } .l-G { --c: #5B6B86; } .l-H { --c: #9A7A12; }
@media (max-width: 700px) { .line { grid-template-columns: 1fr 44px; } .line .track { grid-column: 1 / -1; grid-row: 2; } }

/* Полная карта на странице курса */
.route { position: relative; padding-left: 34px; margin: 0 0 30px; --c: var(--brand); }
.route::before { content: ""; position: absolute; left: 12px; top: 14px; bottom: 14px; width: 6px; border-radius: 6px; background: var(--c); opacity: .9; }
.route-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px -34px; }
.route-head .lcode { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.route-head h2 { margin: 0; font-size: 1.25rem; }
.route-desc { color: var(--ink-2); font-size: .92rem; max-width: 72ch; margin: 0 0 10px; }
.station { position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
           padding: 10px 14px; margin-bottom: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
           text-decoration: none; color: var(--ink); }
.station::before { content: ""; position: absolute; left: -29px; top: 50%; width: 16px; height: 16px; margin-top: -8px; border-radius: 50%;
                   background: var(--surface); border: 4px solid var(--c); }
.station.done::before { background: var(--c); }
.station.doing::before { background: var(--warn); }
.station:hover { border-color: var(--c); }
.station .n { font-weight: 700; color: var(--c); font-size: 1.05rem; }
.station .t { font-weight: 600; }
.station .s { color: var(--ink-2); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.station .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; font-size: .85rem; color: var(--ink-2); }
@media (max-width: 700px) { .station { grid-template-columns: 38px 1fr; } .station .meta { grid-column: 2; justify-content: flex-start; } }

/* ---------- урок ---------- */
.lesson-wrap { display: grid; grid-template-columns: minmax(0, 760px) 240px; gap: 48px; }
@media (max-width: 1200px) { .lesson-wrap { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }
.crumbs { font-size: .875rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.lesson-head h1 { font-size: 2.2rem; letter-spacing: -0.02em; }
.lesson-head .kicknum { color: var(--ink-3); font-weight: 600; margin-right: .3em; }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 26px; }
.toc { position: sticky; top: 24px; align-self: start; font-size: .875rem; max-height: calc(100vh - 48px); overflow-y: auto; }
.toc h4 { font-size: .85rem; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; }
.toc a:hover, .toc a.on { border-left-color: var(--brand); color: var(--ink); }
.toc .tk { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Текст главы (HTML из книги) */
.prose { font-size: 1.02rem; overflow-wrap: anywhere; }
.prose pre, .prose code { overflow-wrap: normal; }
.prose h3 { margin-top: 2em; scroll-margin-top: 20px; font-size: 1.3rem; }
.prose h4 { margin-top: 1.4em; }
.prose p, .prose li { max-width: 72ch; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose .lead { font-size: 1.1rem; color: var(--ink); border-left: 4px solid var(--brand); padding: 4px 0 4px 18px; margin-bottom: 1.6em; }
.prose .note { background: var(--warn-soft); border-radius: var(--r-m); padding: 12px 16px; font-size: .95rem; }
.prose table { width: 100%; border-collapse: collapse; margin: .8em 0 1.4em; font-size: .9rem; display: block; overflow-x: auto; }
.prose table thead, .prose table tbody { display: table; width: 100%; table-layout: auto; }
.prose th { text-align: left; background: var(--sunken); padding: 9px 12px; font-weight: 650; border-bottom: 1px solid var(--line); }
.prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose table.err th { background: var(--bad-soft); color: var(--bad); }
.prose .num { display: none; }

/* Задания практики */
.prose .task { border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); padding: 20px 22px 12px; margin: 22px 0; scroll-margin-top: 16px; }
.prose .task.st-doing { border-color: var(--warn); box-shadow: inset 4px 0 0 var(--warn); }
.prose .task.st-done { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.prose .task h4 { margin-top: 0; font-size: 1.12rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.prose .lvl { font-size: .72rem; font-weight: 650; padding: 2px 9px; border-radius: 99px; color: #fff; }
.prose .lvl.l1 { background: var(--ok); } .prose .lvl.l2 { background: var(--brand); }
.prose .lvl.l3 { background: #7A4FD0; } .prose .lvl.l4 { background: var(--bad); }
.prose .verify { background: var(--ok-soft); border-radius: var(--r-m); padding: 10px 14px 4px; margin: 8px 0 12px; }
.prose .doc { color: var(--ink-2); font-size: .95rem; border-top: 1px dashed var(--line); padding-top: 10px; }
.prose li[data-item] { list-style: none; position: relative; margin-left: -1.3em; padding-left: 1.9em; }
.prose li[data-item] > .chk { position: absolute; left: 0; top: .2em; width: 18px; height: 18px; accent-color: var(--ok); cursor: pointer; }
.prose li[data-item].checked { color: var(--ink-3); }
.prose li[data-item].checked > .chk + * , .prose li[data-item].checked { text-decoration: none; }
.task-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 4px 0 12px;
            padding: 8px 10px; background: var(--sunken); border-radius: var(--r-m); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.seg button { border: 0; background: transparent; font: 500 .82rem var(--sans); color: var(--ink-2); padding: 4px 12px; border-radius: 99px; cursor: pointer; }
.seg button[aria-pressed="true"][data-v="todo"] { background: var(--sunken); color: var(--ink); }
.seg button[aria-pressed="true"][data-v="doing"] { background: var(--warn); color: #fff; }
.seg button[aria-pressed="true"][data-v="done"] { background: var(--ok); color: #fff; }
.task-count { font-size: .82rem; color: var(--ink-2); }
.doc-box { margin: 8px 0 10px; }
.doc-box label { font-size: .85rem; font-weight: 600; color: var(--ink-2); display: block; margin-bottom: 4px; }
.doc-box textarea { min-height: 90px; font-family: var(--mono); font-size: .85rem; }
.saved { font-size: .78rem; color: var(--ok); margin-left: 6px; opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }

.lesson-foot { margin-top: 40px; display: grid; gap: 18px; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pager a { flex: 1 1 240px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-m); text-decoration: none; color: var(--ink); background: var(--surface); }
.pager a:hover { border-color: var(--brand); }
.pager small { display: block; color: var(--ink-3); }
.pager .nx { text-align: right; }
.notes-tabs { display: flex; gap: 6px; margin-bottom: 8px; }

/* ---------- тесты ---------- */
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; margin-bottom: 14px; }
.q legend { font-weight: 600; margin-bottom: 12px; font-size: 1.02rem; padding: 0; }
.q fieldset { border: 0; padding: 0; margin: 0; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 8px; cursor: pointer; }
.opt:hover { border-color: var(--ink-3); }
.opt input { margin-top: .3em; accent-color: var(--brand); }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--bad); background: var(--bad-soft); }
.explain { margin-top: 10px; padding: 10px 14px; border-radius: var(--r-m); background: var(--sunken); font-size: .95rem; }
.score { display: flex; align-items: center; gap: 22px; }
.ring { --p: 0; --c: var(--brand); width: 108px; height: 108px; border-radius: 50%; flex: none;
        background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunken) 0); display: grid; place-items: center; }
.ring::before { content: attr(data-label); width: 82px; height: 82px; border-radius: 50%; background: var(--surface); display: grid; place-items: center;
                font-weight: 700; font-size: 1.35rem; }
.qtable { width: 100%; border-collapse: collapse; }
.qtable td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
.qtable td:last-child { text-align: right; white-space: nowrap; }

/* ---------- карточки ---------- */
.deck { max-width: 680px; margin: 0 auto; }
.flash { perspective: 1400px; height: 320px; cursor: pointer; margin-bottom: 18px; }
.flash .inner { position: relative; width: 100%; height: 100%; transition: transform .45s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flash.flip .inner { transform: rotateY(180deg); }
.flash .face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: var(--r-l); border: 1px solid var(--line);
               background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; padding: 28px 36px; text-align: center; overflow: auto; }
.flash .front { font-size: 1.45rem; font-weight: 650; }
.flash .back { transform: rotateY(180deg); font-size: 1.08rem; line-height: 1.55; }
.flash .tag { position: absolute; top: 14px; left: 18px; font-size: .78rem; color: var(--ink-3); }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.grades .btn { justify-content: center; flex-direction: column; gap: 2px; padding: 10px; }
.grades .btn small { color: var(--ink-3); font-size: .75rem; font-weight: 400; }
.g-again { border-color: var(--bad); } .g-hard { border-color: var(--warn); } .g-good { border-color: var(--ok); } .g-easy { border-color: var(--brand); }
.kbd { font-family: var(--mono); font-size: .75rem; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }
@media (prefers-reduced-motion: reduce) { .flash .inner { transition: none; } .side { transition: none; } }

/* ---------- план ---------- */
.days { list-style: none; padding: 0; margin: 0; counter-reset: d; }
.day { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.day .date { text-align: center; }
.day .date b { display: block; font-size: 1.6rem; line-height: 1; }
.day .date span { color: var(--ink-3); font-size: .82rem; }
.day.today .date b { color: var(--brand); }
.day.today { background: linear-gradient(90deg, var(--brand-soft), transparent 60%); border-radius: var(--r-m); padding-left: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: .82rem; text-decoration: none; padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-2); background: var(--surface); }
.chip.done { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.chip.doing { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }

/* ---------- таблицы, поиск, вход ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; padding: 10px 12px; background: var(--sunken); }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); }
.result { padding: 14px 0; border-bottom: 1px solid var(--line); }
.result a { font-weight: 600; font-size: 1.05rem; }
.result p { margin: 4px 0 0; color: var(--ink-2); font-size: .92rem; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .panel { width: min(420px, 100%); }
.login form { display: grid; gap: 12px; margin-top: 18px; }
.err-box { background: var(--bad-soft); color: var(--bad); border-radius: var(--r-s); padding: 8px 12px; font-size: .9rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
