:root {
  --bg: #f8f8fa; --surface: #ffffff; --line: #e6e6ec; --ink: #1b1e25; --muted: #4a505b; --faint: #7c818b;
  --accent: #3b82f6; --accent-ink: #2563eb; --track: #e6e6ec; --seg: #eceef2;
  --good: #d1f5e6; --good-dot: #10b981; --part: #ffe4cf; --part-dot: #f97316;
  --bad: #fde0e0; --bad-dot: #ef4444; --none: #f1f2f5; --none-ink: #7c818b;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --line: #2a2f3a; --ink: #e8eaf0; --muted: #aab0bc; --faint: #8a909c;
    --accent: #60a5fa; --accent-ink: #93c5fd; --track: #2a2f3a; --seg: #222630;
    --good: #123a2c; --good-dot: #34d399; --part: #46301b; --part-dot: #fb923c;
    --bad: #4a2226; --bad-dot: #f87171; --none: #20242c; --none-ink: #8a909c;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --line: #2a2f3a; --ink: #e8eaf0; --muted: #aab0bc; --faint: #8a909c;
  --accent: #60a5fa; --accent-ink: #93c5fd; --track: #2a2f3a; --seg: #222630;
  --good: #123a2c; --good-dot: #34d399; --part: #46301b; --part-dot: #fb923c;
  --bad: #4a2226; --bad-dot: #f87171; --none: #20242c; --none-ink: #8a909c;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent-ink); }
a:hover { color: var(--ink); }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; }
h1 { font-size: 34px; line-height: 1.08; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.cap { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 500; color: var(--muted); }

.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { max-width: 1200px; margin: 0 auto; padding: 10px 16px 0; display: flex; flex-wrap: wrap; gap: 4px 28px;
  align-items: flex-end; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.015em; }
.nav { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 10px 2px 12px; text-decoration: none; color: var(--muted); font-size: 15px; white-space: nowrap;
  border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.nav .soon { color: var(--faint); cursor: default; padding: 10px 2px 12px; font-size: 15px; white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 36px; }
.head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: flex-end; justify-content: space-between; }
.head-text { display: flex; flex-direction: column; gap: 8px; max-width: 720px; }
.lead { font-size: 16.5px; color: var(--muted); }
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: flex; gap: 2px; background: var(--seg); padding: 3px; border-radius: 12px; }
.seg button { border: 0; background: transparent; font-size: 14px; padding: 8px 13px; border-radius: 10px;
  color: var(--muted); cursor: pointer; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.arrows { display: flex; gap: 4px; }
.arrow { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 40px; height: 40px;
  cursor: pointer; font-size: 18px; color: var(--ink); }
.arrow:disabled { opacity: .35; cursor: default; }

.notice { background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; padding: 12px 16px;
  color: var(--muted); font-size: 14.5px; }

.sec { display: flex; flex-direction: column; gap: 14px; }
.sec-head { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; }
.big { font-size: 36px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: 17px; font-weight: 600; color: var(--muted); letter-spacing: -0.01em; }
.pair { display: flex; gap: 28px; }
.sub { font-size: 14px; color: var(--muted); }

.meter { display: flex; flex-direction: column; gap: 6px; }
.meter-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.meter-row b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { height: 6px; background: var(--track); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; min-width: 0; }
.bar > i.warn { background: var(--part-dot); }
.stack { display: flex; flex-direction: column; gap: 14px; }

.table-box { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; min-width: 760px; font-size: 14.5px; }
table.t th { text-align: left; padding: 0 12px 10px 0; font-weight: 500; vertical-align: bottom; }
table.t td { padding: 14px 12px 14px 0; border-top: 1px solid var(--line); vertical-align: top; }
table.t td .bar { margin-top: 8px; max-width: 140px; }
table.t td.num { white-space: nowrap; min-width: 84px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.ok-dot { background: var(--good-dot); } .warn-dot { background: var(--part-dot); }
.bad-dot { background: var(--bad-dot); } .none-dot { background: var(--faint); }

.grid { display: grid; gap: 8px 10px; align-items: center; }
.grid .day { font-size: 12.5px; color: var(--muted); text-align: center; white-space: nowrap; }
.cell { height: 42px; min-width: 46px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-good { background: var(--good); } .c-part { background: var(--part); } .c-bad { background: var(--bad); }
.c-none { background: var(--none); color: var(--none-ink); font-weight: 500; }
.c-empty { background: transparent; color: var(--faint); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--muted); }
.lbl { font-size: 14.5px; }
.tot { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.list { display: flex; flex-direction: column; }
.li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--line); font-size: 14.5px; align-items: baseline; }
.li:first-child { border-top: 0; }
.li b { font-weight: 600; font-variant-numeric: tabular-nums; }
details.li-d { border-top: 1px solid var(--line); }
details.li-d:first-child { border-top: 0; }
details.li-d > summary { cursor: pointer; list-style: none; border-top: 0; }
details.li-d > summary::-webkit-details-marker { display: none; }
details.li-d > summary > span:first-child::after { content: " ▾"; color: var(--faint); }
details.li-d[open] > summary > span:first-child::after { content: " ▴"; }
details.li-d .more { margin: 0 0 12px; }
details .more { padding: 0 0 0 18px; color: var(--muted); font-size: 14px; }
details .more li { margin: 3px 0; }

.feed .ev { display: grid; grid-template-columns: 112px 120px minmax(0, 1fr); gap: 12px; padding: 11px 0;
  border-top: 1px solid var(--line); font-size: 14.5px; align-items: baseline; }
.feed .ev:first-child { border-top: 0; }
.who { display: inline-block; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--none);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ev .fail { color: var(--bad-dot); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); font-size: 14px; padding: 8px 14px;
  border-radius: 999px; color: var(--muted); min-height: 38px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; }
.chip[aria-pressed="true"], .chip[aria-current="page"] { border-color: var(--accent); color: var(--ink); font-weight: 600; }

.access .member { display: flex; flex-direction: column; gap: 12px; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.switch span { display: flex; flex-direction: column; }

/* лента дня */
.week { display: flex; gap: 6px; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.week .arrow { display: flex; align-items: center; justify-content: center; text-decoration: none; flex: none; height: auto; min-height: 64px; }
.week .arrow.off { opacity: .35; pointer-events: none; }
.wday { flex: 1 0 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 8px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 64px; }
.wday .wd { font-size: 12px; color: var(--muted); }
.wday .wn { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wdot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.wdot.has { background: var(--faint); }
.wday.now .wn { color: var(--accent-ink); }
.wday.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.wday.on .wd, .wday.on .wn { color: var(--surface); }
.wday.on .wdot.has { background: var(--surface); }
.wday.future { opacity: .4; }
.date-jump { display: flex; flex-direction: column; gap: 4px; }
.date-jump input, .lenta-tools input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 9px 12px; min-height: 42px; }
.lenta-tools { display: flex; flex-direction: column; gap: 12px; margin-top: -16px; }
.lenta-tools input[type="search"] { width: 100%; }
.lenta { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.feed-col { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.side-b { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.part { display: flex; flex-direction: column; gap: 10px; }
.note { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 4px 0; font-size: 15px; }
.note .t { color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 1px; }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note.q > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ecard { background: var(--surface); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px; }
.ehead { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.ecard .inner { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sum { color: var(--muted); font-size: 14.5px; }
.ctasks { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.ctasks .li { padding: 8px 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--none); color: var(--muted); }
.t-meeting { background: #e3edff; color: #1e4fbf; } .t-call { background: #fde4f1; color: #a3195b; }
.t-note { background: var(--none); color: var(--muted); } .t-question { background: #efe7ff; color: #5b2bb5; }
.warn-t { color: #b4540a; }
mark { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { color: var(--muted); padding: 24px 0; }
.qgroup { border-top: 1px solid var(--line); }
.qgroup:last-of-type { margin-bottom: 6px; }
.qgroup > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer;
  list-style: none; padding: 10px 0; min-height: 44px; }
.qgroup > summary::-webkit-details-marker { display: none; }
.qgroup > summary .qname::before { content: "▸"; display: inline-block; width: 14px; color: var(--faint); transition: transform .15s; }
.qgroup[open] > summary .qname::before { transform: rotate(90deg); }
.qname { font-size: 14px; font-weight: 600; }
.sbadges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.sbadge { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sbadge b { font-weight: 600; }
.qgroup .list { padding: 0 0 6px 14px; }
.qgroup .li { padding: 8px 0; }
.trow { grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.trow .si { margin-top: 2px; }
.si { flex: none; vertical-align: -3px; }
.si-new { color: var(--faint); } .si-inProgress { color: var(--accent); } .si-paused { color: var(--part-dot); }
.si-done { color: var(--good-dot); } .si-cancelled { color: var(--faint); } .si-other { color: var(--faint); }
.slegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.slegend span { display: inline-flex; align-items: center; gap: 4px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-meeting { background: #1b2c4f; color: #a9c4ff; }
  :root:not([data-theme="light"]) .t-call { background: #4a1d34; color: #f6a8cf; }
  :root:not([data-theme="light"]) .t-question { background: #2e2350; color: #c9b5ff; }
  :root:not([data-theme="light"]) .warn-t { color: #fb923c; }
  :root:not([data-theme="light"]) mark { background: #5a4a10; }
}
:root[data-theme="dark"] .t-meeting { background: #1b2c4f; color: #a9c4ff; }
:root[data-theme="dark"] .t-call { background: #4a1d34; color: #f6a8cf; }
:root[data-theme="dark"] .t-question { background: #2e2350; color: #c9b5ff; }
:root[data-theme="dark"] .warn-t { color: #fb923c; }
:root[data-theme="dark"] mark { background: #5a4a10; }

.login { max-width: 460px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; gap: 18px;
  align-items: center; }
.err { color: var(--bad-dot); }
.foot { font-size: 12.5px; }

@media (max-width: 720px) {
  h1 { font-size: 28px; }
  .wrap { gap: 28px; padding-top: 20px; }
  .card { padding: 18px; border-radius: 16px; }
  .feed .ev { grid-template-columns: 64px minmax(0, 1fr); }
  .feed .ev .who-col { grid-column: 2; }
  .feed .ev .what { grid-column: 2; }
  .big { font-size: 32px; }
}
