/* Tokens of the «Стратеги VK» design system (it defines a single light theme), font Onest. */
:root {
  --ink: #000000; --ink-muted: #6d7175; --paper: #ffffff;
  --vk-blue: #0077ff; --deep-blue: #0001ce; --blue-40: #99c8fe; --blue-20: #cce3ff; --blue-10: #e3eefc; --blue-05: #f1f7ff;
  --gray-box: #f2f3f5; --line: #e1e8f2; --gray-bar: #c9ced6; --axis: #bfc4cc; --rule: #d5d9de;
  --good: #3d8437; --bad: #d32f2f; --bad-05: #fdecec; --warn: #c27c0e; --warn-05: #fdf3dc;
  --gradient-dark: linear-gradient(225deg, #0001ce 0%, #000000 100%);
  --radius-box: 24px; --radius-row: 18px; --radius-bar: 8px; --radius-pill: 999px;
  --gap-box: 16px; --pad-box: 22px;
  --border-box: 1.5px solid #e1e8f2; --border-accent: 1.5px solid #0077ff;
  --t-10: 13px; --t-14: 15px; --t-20: 20px; --t-28: 28px;
  --f: Onest, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --tabbar: 68px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: linear-gradient(180deg, #f1f7ff 0px, #ffffff 560px) no-repeat, #ffffff; font: 300 var(--t-14)/1.4 var(--f); -webkit-font-smoothing: antialiased; }
a { color: var(--vk-blue); text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--vk-blue); outline-offset: 2px; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted, .meta-s { font-size: var(--t-10); color: var(--ink-muted); }
.accent { color: var(--vk-blue); }

/* ---------- login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-box { width: min(340px, 100%); text-align: center; display: grid; gap: 12px; justify-items: center; }
.login-box h1 { margin: 6px 0 0; font-size: var(--t-28); font-weight: 500; }
.login-box p { margin: 0 0 12px; color: var(--ink-muted); }
.login-box input, .login-box button { width: 100%; height: 52px; border-radius: var(--radius-row); font-size: 17px; }
.login-box input { border: var(--border-box); background: var(--paper); padding: 0 16px; }
.login-box input:focus { border: var(--border-accent); outline: none; }
.login-box button { border: 0; background: var(--vk-blue); color: var(--paper); font-weight: 500; cursor: pointer; }
.login-err { color: var(--bad); min-height: 22px; font-size: var(--t-10); }

/* ---------- shell */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); background: rgba(241, 247, 255, .96); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: var(--t-20); }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; background: var(--vk-blue); color: var(--paper); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 20px; height: 20px; stroke-width: 2; }
.logo-mark.big { width: 64px; height: 64px; }
.logo-mark.big svg { width: 34px; height: 34px; }
.topbar .end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ibtn { all: unset; cursor: pointer; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: var(--border-box); flex: none; }
.ibtn svg { width: 18px; height: 18px; }
.ibtn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.datechip { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: var(--radius-pill); background: var(--paper); border: var(--border-box); white-space: nowrap; font-weight: 400; }
.datechip button { all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.datechip button:hover { background: var(--gray-box); }
.datechip button:disabled { opacity: .3; cursor: default; background: none; }
.datechip svg { width: 16px; height: 16px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around; padding: 6px max(6px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: var(--border-box); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; color: var(--ink-muted); font-size: 11px; font-weight: 400; position: relative; }
.tabs a svg { width: 22px; height: 22px; }
.tabs a.active { color: var(--vk-blue); font-weight: 500; }
.cnt { position: absolute; top: 0; left: calc(50% + 5px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--vk-blue); color: var(--paper); font-size: 10px; font-weight: 500; line-height: 17px; text-align: center; }
.cnt:empty { display: none; }

.page { display: grid; gap: var(--gap-box); padding: 6px max(16px, env(safe-area-inset-right)) calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); min-width: 0; max-width: 1600px; margin: 0 auto; }
.title h1 { margin: 0; font-size: 24px; line-height: 1.15; font-weight: 500; text-wrap: balance; }
.title .meta { margin-top: 8px; font-size: var(--t-10); color: var(--ink-muted); }
.loading { padding: 60px 0; text-align: center; color: var(--ink-muted); }
.grid { display: grid; gap: var(--gap-box); grid-template-columns: minmax(0, 1fr); }

/* ---------- design-system pieces */
.box { position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--pad-box); border-radius: var(--radius-box); background: var(--paper); border: var(--border-box); }
.box--tint { background: linear-gradient(180deg, #eaf2fe 0%, #f7faff 100%); }
.box--gray { background: var(--gray-box); border-color: transparent; }
.box--accent { background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%); border: var(--border-accent); }
.box--dark { background: var(--gradient-dark); border: 0; color: var(--paper); }
.bh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bh .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.btitle { margin: 0 0 12px; font-size: var(--t-20); line-height: 1.2; font-weight: 500; text-wrap: balance; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--blue-10); color: var(--vk-blue); font-size: var(--t-10); font-weight: 500; white-space: nowrap; border: 0; }
.chip--solid { background: var(--vk-blue); color: var(--paper); }
.chip--glass { background: rgba(255, 255, 255, .14); color: var(--paper); }
.chip--gray { background: var(--gray-box); color: var(--ink); font-weight: 400; }
.chip--bad { background: var(--bad-05); color: var(--bad); }
.chip--good { background: #e9f3e8; color: var(--good); }
.chip--warn { background: var(--warn-05); color: #8a5800; }
button.chip:disabled { opacity: .6; cursor: default; }
.chip.sm { height: 22px; padding: 0 9px; font-size: 12px; }
button.chip { cursor: pointer; }
.more { font-size: var(--t-10); font-weight: 500; white-space: nowrap; }
.foot { margin-top: auto; padding-top: 12px; font-size: var(--t-10); color: var(--ink-muted); }
.empty { margin: 4px 0; color: var(--ink-muted); }
.err { margin: 0 0 10px; padding: 10px 14px; border-radius: 14px; background: var(--bad-05); color: var(--bad); font-size: var(--t-10); }
.num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; font-weight: 500; line-height: 1; }
.d { font-size: var(--t-10); font-weight: 500; white-space: nowrap; }
.d.good { color: var(--good); } .d.bad { color: var(--bad); } .d.flat { color: var(--ink-muted); }
.d.up::before { content: "▲ "; } .d.down::before { content: "▼ "; }
.lead-in { color: var(--vk-blue); font-weight: 500; }

/* KPI strip */
.kpis { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.kpis::-webkit-scrollbar { display: none; }
.kpi { scroll-snap-align: start; padding: 16px; color: inherit; }
.kpi .chip { align-self: flex-start; }
.kpi .num { font-size: var(--t-28); margin-top: 16px; }
.kpi .unit { font-size: var(--t-10); color: #3c4046; margin-top: 6px; }
.kpi .d { margin-top: 8px; display: block; }
button.kpi { text-align: left; cursor: pointer; font: inherit; }
.kpi.sel { border: var(--border-accent); }

/* Главное */
.lead { font-size: var(--t-20); line-height: 1.3; font-weight: 500; margin: 0; }
.lead-sub { font-size: var(--t-14); color: rgba(255, 255, 255, .78); margin: 10px 0 0; }
.facts { margin-top: auto; padding-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.facts > a { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 12px; color: inherit; }
.facts b { display: block; font-size: var(--t-20); font-weight: 500; font-variant-numeric: tabular-nums; }
.facts span { font-size: var(--t-10); color: rgba(255, 255, 255, .75); }

/* checklist */
.prog { height: 6px; border-radius: 3px; background: var(--gray-box); overflow: hidden; margin: -2px 0 6px; }
.prog i { display: block; height: 100%; border-radius: 3px; background: var(--vk-blue); transition: width .25s; }
.todo { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; cursor: pointer; }
.todo + .todo { border-top: 1px solid var(--rule); }
.cb { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--axis); display: grid; place-items: center; color: transparent; margin-top: 1px; }
.cb svg { width: 13px; height: 13px; stroke-width: 2.6; }
.todo.done .cb { background: var(--vk-blue); border-color: var(--vk-blue); color: var(--paper); }
.todo .tt { font-weight: 400; line-height: 1.3; }
.todo.done .tt { color: var(--ink-muted); text-decoration: line-through; }
.todo.on .cb { background: var(--vk-blue); border-color: var(--vk-blue); color: var(--paper); }
.todo .desc { margin-top: 4px; font-size: var(--t-10); color: var(--ink-muted); line-height: 1.35; }
.todo .ts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: var(--t-10); color: var(--ink-muted); }

/* schedule */
.allday { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sched { position: relative; margin: 6px 0 0 44px; }
.sched .hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.sched .hr span { position: absolute; left: -44px; top: -8px; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.sched .ev { position: absolute; left: 8px; right: 0; border-radius: 14px; padding: 6px 12px; overflow: hidden; background: var(--blue-05); border: var(--border-box); }
.sched .ev b { display: block; font-weight: 500; font-size: 14px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched .ev span { font-size: 12px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sched .ev.personal { background: var(--paper); border-style: dashed; border-color: var(--blue-40); }
.sched .ev.past { background: var(--gray-box); border-color: transparent; }
.sched .ev.past b { color: var(--ink-muted); font-weight: 400; }
.sched .ev.now { background: var(--vk-blue); border-color: var(--vk-blue); color: var(--paper); }
.sched .ev.now span { color: rgba(255, 255, 255, .85); }
.sched .now-line { position: absolute; left: -6px; right: 0; border-top: 2px solid var(--ink); z-index: 2; }
.sched .now-line::before { content: ""; position: absolute; left: -4px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }
.next-days { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.erow { display: flex; gap: 12px; font-size: 14px; padding: 2px 0; }
.erow .t { width: 92px; flex: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.erow .m { font-size: 12px; color: var(--ink-muted); }
.erow.now .t { color: var(--vk-blue); }
.day-h { margin: 16px 0 6px; font-size: var(--t-10); font-weight: 500; color: var(--ink-muted); }
.day-h:first-child { margin-top: 0; }

/* people and mail */
.person { display: flex; gap: 12px; padding: 11px 0; align-items: flex-start; }
.person + .person, .mitem { border-top: 1px solid var(--rule); }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-10); color: var(--vk-blue); display: grid; place-items: center; font-weight: 500; font-size: var(--t-10); flex: none; }
.av.quiet { background: var(--gray-box); color: var(--ink-muted); }
.person .main { min-width: 0; flex: 1; }
.nm { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.nm b { font-weight: 500; }
.person p, .mitem p { margin: 3px 0 0; font-size: 14px; line-height: 1.35; }
.mail { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.mail h3 { margin: 0 0 4px; font-size: var(--t-14); font-weight: 500; }
.mail .ov { margin: 0 0 6px; font-size: 14px; color: var(--ink-muted); }
.mitem { padding: 10px 0; }
.mitem .subj { font-size: var(--t-10); color: var(--ink-muted); margin-top: 2px; }
.filters { display: flex; gap: 8px; }
.filters .chip:not(.chip--solid) { background: var(--paper); border: var(--border-box); color: var(--ink); font-weight: 400; }

/* health */
.hgrid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.hlabel { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; font-size: var(--t-10); color: var(--ink-muted); }
.hlabel b { font-size: var(--t-14); color: var(--ink); font-weight: 500; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 150px; border-bottom: 1.5px solid var(--axis); }
.bars .col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.bars .bar { width: 100%; max-width: 30px; background: var(--gray-bar); border-radius: var(--radius-bar) var(--radius-bar) 0 0; min-height: 2px; }
.bars.dense .bar { border-radius: 4px 4px 0 0; }
.bars .col.met .bar { background: var(--blue-40); }
.bars .col.now .bar { background: var(--vk-blue); }
.bars .val { font-size: 12px; font-weight: 500; margin-bottom: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; position: relative; z-index: 2; background: var(--paper); padding: 0 3px; border-radius: 4px; }
.bars .col.now .val { color: var(--vk-blue); }
.bars .col:last-child .val { align-self: flex-end; }
.bars .col:first-child .val { align-self: flex-start; }
.bars .goal { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ink-muted); z-index: 1; pointer-events: none; }
.bars .goal span { position: absolute; left: 0; top: -18px; font-size: 12px; color: var(--ink-muted); background: var(--paper); padding-right: 4px; }
.bars .goal.avg { border-top-color: var(--deep-blue); z-index: 2; }
.bars .goal.avg span { color: var(--deep-blue); font-weight: 500; }
.bars .goal.avg.right span { left: auto; right: 0; padding: 0 0 0 4px; }
.legend i.dash.avg { border-top-color: var(--deep-blue); }
.blabels { display: flex; gap: 4px; margin-top: 6px; }
.blabels span { flex: 1 1 0; text-align: center; font-size: 11px; color: var(--ink-muted); min-width: 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.line svg { display: block; width: 100%; height: auto; max-height: 240px; overflow: visible; stroke-width: initial; }
.line .ax { font-size: 11px; fill: var(--ink-muted); stroke: none; font-family: var(--f); }
.vitals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.vital { background: var(--gray-box); border-radius: var(--radius-row); padding: 12px 14px; }
.vital .lbl { font-size: var(--t-10); color: var(--ink-muted); }
.vital .num { font-size: var(--t-20); margin: 6px 0 4px; display: block; }
.vital .num small, .kpi .num small { font-size: var(--t-10); color: var(--ink-muted); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.vhead { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.why { display: block; margin-top: 4px; font-size: 12px; line-height: 1.3; color: var(--ink-muted); }
.kpi .kst { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; }
.kpi > .chip.sm { margin-top: 8px; }
.ai-line { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 14px; line-height: 1.4; }
.ai-line .chip { margin-right: 6px; vertical-align: 1px; }
.ai-cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.ai-cols h3 { margin: 0 0 6px; font-size: var(--t-10); font-weight: 500; color: var(--ink-muted); }
.ai-list { margin: 0; padding: 0; list-style: none; }
.ai-list li { padding: 8px 0; font-size: 14px; line-height: 1.4; }
.ai-list li + li { border-top: 1px solid var(--rule); }
.ai-list b { font-weight: 500; }
.sleep-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; max-width: 560px; }
.sleep-sum b { display: block; font-size: var(--t-20); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sleep-sum b.bad { color: var(--bad); }
.sleep-sum.compact { grid-template-columns: repeat(2, auto); justify-content: start; column-gap: 20px; margin-bottom: 10px; }
.sleep-sum.compact b { font-size: 16px; white-space: nowrap; }
.sleep-sum.compact > div:nth-child(3) { display: none; }
@media (max-width: 719px) { .sleep-sum b { font-size: 17px; white-space: nowrap; } }
.sleep-sum span { font-size: 12px; color: var(--ink-muted); }
.tipwrap { position: relative; }
.sbars-wrap { padding-left: 22px; }
.sgrid { position: absolute; inset: 0 0 0 22px; pointer-events: none; }
.sgrid i { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); }
.sgrid i span { position: absolute; left: -22px; top: -8px; font-size: 11px; color: var(--ink-muted); font-style: normal; }
.sgrid i.norm { border-top: 1.5px dashed var(--ink-muted); z-index: 2; }
.sgrid i.norm span { color: var(--ink); font-weight: 500; }
.sbars { border-bottom: 1.5px solid var(--axis); }
.sbars .stack { width: 100%; max-width: 30px; display: flex; flex-direction: column; border-radius: 6px 6px 0 0; overflow: hidden; background: var(--blue-20); }
.sbars.dense .stack { border-radius: 3px 3px 0 0; }
.sbars .stack i { display: block; min-height: 0; }
.sbars .core { background: var(--blue-20); } .sbars .rem { background: var(--vk-blue); } .sbars .deep { background: var(--deep-blue); }
.sbars .val { color: var(--vk-blue); font-weight: 500; }
.tipwrap .col[data-night], .tipwrap .col[data-day] { cursor: pointer; }
.tipwrap .col.on .stack, .tipwrap .col.on .bar { filter: brightness(0.88); }
.stip { position: absolute; top: -8px; z-index: 5; min-width: 168px; padding: 10px 12px; border-radius: 14px; background: var(--paper); border: 1px solid var(--rule);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08); font-size: 12px; pointer-events: none; opacity: 0; transition: opacity .12s; }
.stip.show { opacity: 1; }
.stip-h { font-weight: 500; font-size: 13px; margin-bottom: 6px; white-space: nowrap; }
.stip div:not(.stip-h) { display: flex; align-items: center; gap: 6px; color: var(--ink-muted); line-height: 1.7; }
.stip div i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.stip div b { margin-left: auto; padding-left: 12px; color: var(--ink); font-weight: 500; white-space: nowrap; }
.blabels span.bad { color: var(--bad); font-weight: 500; }
.legend i.dash { background: none; border-top: 1.5px dashed var(--ink-muted); height: 0; width: 14px; border-radius: 0; vertical-align: 3px; }
.chart-sum { margin-top: 12px; font-size: var(--t-10); color: var(--ink-muted); }

/* table */
.ntable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ntable th { text-align: left; font-weight: 500; font-size: var(--t-10); padding: 0 6px 8px; border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.ntable td { padding: 10px 6px; border-bottom: 1px solid var(--rule); vertical-align: top; font-size: 14px; }
.ntable td a { color: var(--ink); }
.ntable td.r, .ntable th.r { text-align: right; white-space: nowrap; }
.ntable td .meta-s { display: block; margin-top: 2px; }
.ntable td.tc { display: flex; gap: 10px; align-items: flex-start; }
.ntable .tcb { all: unset; cursor: pointer; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--axis); display: grid; place-items: center; color: transparent; margin-top: 1px; }
.ntable .tcb svg { width: 12px; height: 12px; stroke-width: 2.6; }
.ntable tr.done .tcb { background: var(--vk-blue); border-color: var(--vk-blue); color: var(--paper); }
.ntable tr.done a { color: var(--ink-muted); text-decoration: line-through; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 20; max-width: min(520px, calc(100% - 32px)); padding: 12px 18px; border-radius: var(--radius-row); background: var(--ink); color: var(--paper); font-size: var(--t-10); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.ntable tr.sub td { padding-top: 14px; font-weight: 500; font-size: var(--t-10); color: var(--ink-muted); border-bottom: 0; padding-bottom: 2px; }

/* news, jobs */
.news-i { padding: 10px 0; }
.news-i + .news-i { border-top: 1px solid var(--rule); }
.news-i p { margin: 0; font-size: 14px; line-height: 1.38; }
.job { padding: 11px 0; }
.job + .job { border-top: 1px solid var(--rule); }
.job > a { color: var(--ink); font-weight: 500; }
.job .co { font-size: var(--t-10); color: var(--ink-muted); margin-top: 2px; }
.job p { margin: 6px 0 8px; font-size: 14px; }
.lower { margin: 8px 0 0; padding: 12px 0 0 18px; border-top: 1px solid var(--rule); font-size: 14px; }
.lower li + li { margin-top: 4px; }
.lower a { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .page.enter .box { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes rise { from { transform: translateY(6px); } }

/* ---------- Сегодня on a phone: what needs action first */
@media (max-width: 719px) {
  .g-main { order: 1; } .g-todo { order: 2; } .g-sugg { order: 3; } .g-people { order: 3; } .g-sched { order: 4; } .g-health { order: 5; } .g-tasks { order: 6; } .g-mail { order: 7; } .g-news { order: 8; } .g-jobs { order: 9; }
  .topbar .logo span:last-child { display: none; }
}

/* ---------- tablet: two parallel columns */
@media (min-width: 720px) {
  .page { padding-left: 24px; padding-right: 24px; }
  .title h1 { font-size: var(--t-28); }
  .kpis { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.today { grid-template-areas: "main sched" "todo sched" "people sugg" "health health" "tasks mail" "news jobs"; }
  .grid.today.nohealth { grid-template-areas: "main sched" "todo sched" "people sugg" "tasks mail" "news jobs"; }
  .g-sugg { grid-area: sugg; }
  .g-main { grid-area: main; } .g-todo { grid-area: todo; } .g-sched { grid-area: sched; } .g-people { grid-area: people; }
  .g-health { grid-area: health; } .g-tasks { grid-area: tasks; } .g-mail { grid-area: mail; } .g-news { grid-area: news; } .g-jobs { grid-area: jobs; }
  .grid .wide { grid-column: 1 / -1; }
  .hgrid { grid-template-columns: 3fr 2fr; }
  .hgrid .vitals { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- desktop: a real dashboard, parallel blocks across 12 columns */
@media (min-width: 1120px) {
  .topbar { padding: 16px 32px 10px; gap: 16px; background: rgba(241, 247, 255, .9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .tabs { position: static; flex: none; margin: 0 auto; background: var(--gray-box); border: 0; padding: 4px; border-radius: var(--radius-pill); gap: 2px; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .tabs a { flex: none; flex-direction: row; gap: 8px; min-height: 0; padding: 9px 18px; border-radius: var(--radius-pill); font-size: var(--t-14); color: var(--ink); }
  .tabs a svg { display: none; }
  .tabs a.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 20, 60, .1); }
  .tabs .cnt { position: static; height: 20px; min-width: 20px; line-height: 20px; border-radius: 10px; font-size: 11px; }
  .topbar .end { margin-left: 0; }
  .page { padding: 12px 32px 40px; gap: 20px; }
  .title { display: flex; align-items: flex-end; gap: 24px; }
  .title h1 { max-width: 920px; }
  .title .meta { margin: 0 0 4px auto; white-space: nowrap; }
  .kpis { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: var(--gap-box); }
  .kpi .num { font-size: 34px; }
  .grid.today { grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "main main main main sched sched sched sched people people people people"
      "todo todo todo todo sched sched sched sched sugg sugg sugg sugg"
      "health health health health health health health health tasks tasks tasks tasks"
      "mail mail mail mail mail mail news news news jobs jobs jobs"; }
  .grid.today.nohealth { grid-template-areas:
      "main main main main sched sched sched sched people people people people"
      "todo todo todo todo sched sched sched sched sugg sugg sugg sugg"
      "tasks tasks tasks tasks mail mail mail mail mail mail mail mail"
      "news news news news news news jobs jobs jobs jobs jobs jobs"; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.three > .span2 { grid-column: span 2; }
  .grid.three > .wide { grid-column: 1 / -1; }
  .hgrid { grid-template-columns: 5fr 4fr 3fr; align-items: stretch; }
  .hgrid .vitals { grid-column: auto; grid-template-columns: 1fr; }
  .bars { height: 200px; }
  .bars.tall { height: 260px; }
  .mail { grid-template-columns: 1fr 1fr; gap: 24px; }
  .ai-cols { grid-template-columns: 4fr 3fr 3fr; gap: 28px; }
}

/* ---------- Здоровье: blocks of metric cards */
.hblock { margin-top: 26px; }
.hblock h2 { font-size: var(--t-20); font-weight: 500; margin: 0 0 12px; }
.hcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hcard { display: flex; flex-direction: column; align-items: stretch; text-align: left; font: inherit; color: inherit; padding: 16px; background: var(--paper); border: 1px solid var(--line); min-width: 0; }
button.hcard { cursor: pointer; }
.hcard.sel { border-color: var(--vk-blue); box-shadow: 0 0 0 1px var(--vk-blue) inset; }
.hcard.primary { background: var(--paper); }
.hcard.na { background: var(--gray-box); border-color: transparent; }
.hcard.lvl-warn { border-left: 4px solid var(--warn); }
.hcard.lvl-severe { border-left: 4px solid var(--bad); }
.hc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hc-t { font-size: var(--t-10); color: var(--ink-muted); line-height: 1.3; }
.hc-top .chip.sm { flex: 0 1 auto; max-width: 60%; height: auto; min-height: 22px; padding: 3px 9px; white-space: normal; line-height: 1.25; text-align: center; justify-content: center; }
@media (max-width: 719px) { .hc-top { flex-direction: column; gap: 6px; } .hc-top .chip.sm { max-width: 100%; } .hcard { padding: 14px; } .hcard .num { font-size: 24px; } }
.hcard .num { font-size: var(--t-28); font-weight: 500; margin-top: 10px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.hcard .num small { font-size: var(--t-10); color: var(--ink-muted); font-weight: 400; margin-left: 3px; }
.hc-p { font-size: 12px; color: var(--ink-muted); margin-top: 4px; }
.hc-c { font-size: 13px; margin-top: 10px; line-height: 1.35; }
.hc-c .tr { color: var(--ink-muted); font-weight: 500; }
.hc-c2 { font-size: 12px; color: var(--ink-muted); margin-top: 2px; line-height: 1.35; }
.hc-why { font-size: 12px; color: var(--ink); margin-top: 8px; line-height: 1.35; }
.hcard.na .hc-why { color: var(--ink-muted); margin-top: 10px; }
.hc-act { align-self: flex-start; margin-top: 10px; text-decoration: none; }
.hc-src { font-size: 11px; color: var(--ink-muted); margin-top: auto; padding-top: 10px; }
.spark { display: block; width: 100%; height: 38px; margin-top: 10px; overflow: visible; stroke: none; fill: none; }
.spark-empty { font-size: 11px; color: var(--ink-muted); margin-top: 10px; }
.sp-line { fill: none; stroke: var(--vk-blue); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sp-dot { stroke: var(--vk-blue); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sp-last { stroke: var(--vk-blue); stroke-width: 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.sp-now { fill: var(--vk-blue); }
.sp-bar { fill: var(--blue-40); }
.sp-goal { stroke: var(--ink-muted); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.sp-band { fill: var(--blue-10); }
.hpair { display: grid; gap: 0 var(--gap-box); }
.hpair > .hblock { display: flex; flex-direction: column; }
.hpair > .hblock > .hcards { flex: 1; }
details.hblock.minor { background: var(--gray-box); border-radius: var(--radius-box); padding: 14px 18px; }
details.minor > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
details.minor > summary::-webkit-details-marker, details.hdetails > summary::-webkit-details-marker { display: none; }
details.minor > summary h2 { margin: 0; font-size: var(--t-14, 16px); color: var(--ink-muted); }
details.minor > summary h2::after { content: " ▾"; font-size: 12px; }
details.minor[open] > summary { margin-bottom: 12px; }
details.minor .hcard { background: var(--paper); }
.morning { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.morning li { display: flex; gap: 10px; align-items: baseline; font-size: var(--t-14, 16px); line-height: 1.4; }
.morning li i { flex: none; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-1px); }
.morning-box .morning li { font-size: 17px; }
.g-health .morning { margin-top: 14px; }
.g-health .morning li { font-size: 13px; }
.sync-warn { margin: 0 0 12px; font-size: 13px; color: #8a5800; background: var(--warn-05); border-radius: 12px; padding: 8px 12px; }
.box--sel { box-shadow: 0 0 0 2px var(--vk-blue) inset; }
details.hdetails { margin-top: var(--gap-box); }
details.hdetails > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
details.hdetails[open] > summary { margin-bottom: 14px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th { text-align: left; font-weight: 400; color: var(--ink-muted); font-size: 12px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule); }
.dtable td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.src { color: var(--ink-muted); font-size: 12px; }
.notes { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; line-height: 1.45; }
@media (min-width: 720px) {
  .hcards { grid-template-columns: repeat(var(--n3, 3), minmax(0, 1fr)); }
}
@media (min-width: 1120px) {
  .hcards { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
  .hpair { grid-template-columns: 3fr 2fr; }
}
