/* Onest, self-hosted (@fontsource/onest 5.3.1): cyrillic + latin subsets, 400/500/600 */
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:400;src:url(fonts/onest-cyrillic-400-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:500;src:url(fonts/onest-cyrillic-500-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:600;src:url(fonts/onest-cyrillic-600-normal.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:400;src:url(fonts/onest-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:500;src:url(fonts/onest-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Onest;font-style:normal;font-display:swap;font-weight:600;src:url(fonts/onest-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* tokens: prototype v3 (docs/superpowers/specs/assets/2026-09-24-crm-ui-prototype.html) */
:root{
  --paper:#f5f6f4; --surface:#fff; --ink:#1a1c1f; --graphite:#60666e; --quiet:#686f76; --line:#e4e6e2; --line-soft:#eef0ec;
  --late:#c2361f; --soon:#9b610e; --ok:#2d7555; --accent:#2f4fcf; --accent-soft:#eef1fc; --hover:#f4f5f2;
  --shadow:0 10px 30px -12px rgba(40,44,38,.22);
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 Onest,system-ui,sans-serif;font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:0;padding:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.muted{color:var(--graphite)}
.nocl{font-weight:400}

/* login: quiet card, left-aligned content, sitting slightly above centre */
body.login{display:grid;place-items:center;padding:24px;min-height:100%}
.login-card{width:100%;max-width:380px;margin-bottom:8vh;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:32px 32px 28px}
.login-card h1{margin:0;font-size:20px;font-weight:600;letter-spacing:-.01em}
.login-lead{margin:6px 0 24px;color:var(--graphite)}
.login-error{margin:-8px 0 20px;padding:0 0 0 10px;border-left:2px solid var(--late);color:var(--late);font-size:13.5px}
.login-widget{min-height:40px}
.login-widget iframe{color-scheme:light;background:transparent;border-radius:20px}
.login-status{margin:16px 0 0;color:var(--graphite);font-size:13px}

/* ===== prototype v3, ported 1:1 (docs/superpowers/specs/assets/2026-09-24-crm-ui-prototype.html) ===== */
svg.i{width:16px;height:16px;flex:none}

.shell{display:grid;grid-template-columns:56px clamp(430px,27vw,580px) 1fr;height:100vh}
.rail{background:var(--ink);display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:4px}
.nav{width:40px;height:40px;border-radius:9px;color:#8b9097;display:grid;place-items:center}
.nav:hover{color:#fff}.nav.on{background:#2c2f33;color:#fff}
.nav svg{width:19px;height:19px}
.rail .grow{flex:1}

/* list */
.list{background:var(--surface);border-right:1px solid var(--line);display:flex;flex-direction:column;min-height:0}
.lhead{padding:18px 20px 0}
.lhead h1{margin:0;font-size:16px;font-weight:600;letter-spacing:-.01em}
.lhead h1 span{font-weight:400;color:var(--quiet);margin-left:6px}
.filters{display:flex;gap:clamp(12px,1vw,18px);padding:14px 20px 0;border-bottom:1px solid var(--line);position:relative;white-space:nowrap}
.fl{padding:0 0 10px;font-size:clamp(12.5px,.75vw,13.5px);color:var(--graphite);border-bottom:2px solid transparent;margin-bottom:-1px}
.fl:hover{color:var(--ink)}
.fl.on{color:var(--ink);border-color:var(--ink);font-weight:500}
.fl b{font-weight:500;margin-left:5px;color:var(--quiet)}
.fl.on b{color:var(--graphite)}
.fl.hot b{color:var(--late)}
.fl.more{margin-left:auto}
.menu{position:absolute;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);padding:5px;z-index:20;min-width:230px;display:none}
.menu.open{display:block}
.menu button{display:flex;justify-content:space-between;align-items:center;gap:16px;width:100%;padding:7px 10px;border-radius:7px;font-size:13px;text-align:left}
.menu button:hover{background:var(--hover)}
.menu button .k{color:var(--quiet);font-size:12px}
.menu button.cur{font-weight:500}
.menu button.cur::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--ink);margin-right:-8px}
.menu hr{border:0;border-top:1px solid var(--line-soft);margin:4px 0}
#moreMenu{right:12px;top:40px}
.rows{overflow:auto;flex:1}
.row{display:grid;grid-template-columns:84px 1fr;gap:14px;padding:13px 20px 13px 0;cursor:pointer;border-left:2px solid transparent;border-bottom:1px solid var(--line-soft)}
.row:hover{background:#fafbf9}
.row.sel{background:var(--accent-soft);border-left-color:var(--accent)}
.t{text-align:right;font-size:17px;font-weight:500;letter-spacing:-.02em;line-height:1.3;white-space:nowrap}
.row[data-u=late] .t{color:var(--late)}.row[data-u=soon] .t{color:var(--soon)}.row[data-u=wait] .t{color:var(--quiet)}
.t small{display:block;font-size:11px;font-weight:400;color:var(--quiet);letter-spacing:0}
.r1{display:flex;justify-content:space-between;gap:12px}
.r1 strong{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.r1 span{font-size:12px;color:var(--quiet);white-space:nowrap}
.r2{font-size:13px;color:var(--graphite);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sig{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--graphite);margin-top:3px}
.sig::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.sig.ret{color:var(--late)}.sig.miss{color:var(--soon)}.sig.appr{color:var(--ok)}
.empty{padding:70px 32px;text-align:center;color:var(--graphite)}
.empty b{display:block;color:var(--ink);font-weight:500;margin-bottom:4px}

/* card */
.card{overflow:auto;min-width:0}
.cw{padding:28px clamp(28px,3.2vw,72px) 60px}
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.kind{font-size:13px;color:var(--quiet)}
.name{font-size:23px;font-weight:600;letter-spacing:-.015em;margin:2px 0 4px;line-height:1.25}
.copyable{cursor:pointer;border-radius:5px;padding:0 3px;margin:0 -3px;transition:background .12s}
.copyable:hover{background:var(--hover)}
.copyable .ci{opacity:0;width:14px;height:14px;margin-left:6px;vertical-align:-1px;color:var(--quiet);transition:opacity .12s}
.copyable:hover .ci{opacity:1}
.copyable.done{background:#e8f3ec}
.phones{display:flex;flex-wrap:wrap;gap:4px 18px;font-size:15px;font-weight:500}
.phones .none{color:var(--soon);font-weight:400;font-size:13.5px}
.icons{display:flex;gap:4px}
.ib{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;color:var(--graphite);position:relative}
.ib:hover{background:var(--hover);color:var(--ink)}
.ib.tg{color:#2696cf}
.dl{margin-top:24px}
.dl1{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.dlt{font-size:15px;font-weight:600}
.dlt.late{color:var(--late)}.dlt.soon{color:var(--soon)}.dlt.ok{color:var(--ok)}
.dlm{font-size:13px;color:var(--quiet)}
.link{font-size:13px;color:var(--accent)}
.link:hover{text-decoration:underline}
.bar{height:3px;border-radius:999px;background:var(--line-soft);margin-top:10px;overflow:hidden;max-width:720px}
.bar i{display:block;height:100%;background:var(--ok)}.bar i.late{background:var(--late)}.bar i.soon{background:var(--soon)}
.act{display:flex;align-items:center;gap:8px;margin-top:20px;position:relative}
.stbtn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:6px 10px 6px 12px;font-size:13px;font-weight:500}
.stbtn:hover{border-color:#cdd0ca}
.stbtn .dot{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.stbtn .chev{color:var(--quiet)}
.st{font-size:13px;color:var(--graphite);margin-right:4px}
#stMenu{left:0;top:40px}
#dotMenu{left:150px;top:40px}
.cols{display:grid;gap:40px;margin-top:30px}
@media (min-width:1500px){.side{max-width:none}.cols{grid-template-columns:minmax(0,1fr) clamp(300px,21vw,400px);gap:clamp(40px,4vw,80px)}.side{order:2;position:sticky;top:0;align-self:start}}
.side{max-width:620px}.side dl{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:14px 20px}
.side dt{font-size:12px;color:var(--quiet)}
.side dd{margin:1px 0 0;font-weight:500;overflow-wrap:anywhere}
.lack{margin-top:16px;font-size:13px;color:var(--soon)}
.notebtn{margin-top:18px;font-size:13px;color:var(--graphite);display:inline-flex;gap:6px;align-items:center}
.notebtn:hover{color:var(--ink)}
.note{margin-top:18px;width:100%;min-height:64px;border:1px solid var(--line);border-radius:8px;padding:9px 11px;font:inherit;resize:vertical;background:var(--surface)}
.note:focus{outline:none;border-color:var(--accent)}
.feed{min-width:0}
.m{display:grid;grid-template-columns:28px 1fr;gap:12px;margin-bottom:18px}
.av{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:600;color:#fff}
.mh{font-size:12.5px;color:var(--quiet)}.mh b{color:var(--ink);font-weight:500;margin-right:8px}
.mb{margin-top:3px;max-width:76ch}
.fw{font-size:12px;color:var(--quiet);margin-bottom:2px}
.m.mine .mb{background:var(--accent-soft);border-radius:4px 10px 10px 10px;padding:8px 12px;display:inline-block}
.ph{color:var(--accent);cursor:pointer;border-bottom:1px dotted currentColor;white-space:nowrap}
.shots{display:flex;gap:8px;margin-top:8px}
.shot{width:132px;height:86px;border-radius:7px;border:1px solid var(--line);background:repeating-linear-gradient(0deg,#f7f8f6 0 9px,#eceee9 9px 10px);display:grid;place-items:center;font-size:11px;color:var(--quiet);cursor:zoom-in}
.ev{margin:-6px 0 18px 40px;font-size:12.5px;color:var(--quiet)}

/* search & stats */
.pane{grid-column:2 / 4;overflow:auto;display:none}
.pw{padding:30px clamp(28px,3.2vw,72px);max-width:1600px}
.q{display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--ink);padding:6px 0}
.q input{flex:1;border:0;outline:0;font:inherit;font-size:20px;background:transparent}
.fs{display:flex;gap:18px;margin:14px 0 26px;font-size:13px;color:var(--graphite)}
.fs button:hover{color:var(--ink)}
.fs .on{color:var(--ink);font-weight:500}
.cli{margin-bottom:18px;font-size:13.5px;color:var(--graphite)}.cli b{color:var(--ink);font-weight:500}
table{width:100%;border-collapse:collapse}
th{font-weight:400;font-size:12px;color:var(--quiet);text-align:left;padding:0 12px 8px 0;border-bottom:1px solid var(--line)}
td{padding:11px 12px 11px 0;border-bottom:1px solid var(--line-soft);font-size:13.5px;vertical-align:top}
tbody tr{cursor:pointer}tbody tr:hover td{background:#fafbf9}
mark{background:#fbeeb0;border-radius:2px}
.late{color:var(--late)}
.kp{display:flex;gap:clamp(28px,4vw,72px);margin-bottom:34px;flex-wrap:wrap}
.kp div small{display:block;font-size:12.5px;color:var(--quiet)}
.kp div b{font-size:28px;font-weight:600;letter-spacing:-.02em}
.kp div em{font-style:normal;font-size:12px;margin-left:6px}
.g{display:grid;grid-template-columns:3fr 2fr;gap:clamp(30px,4vw,72px);margin-bottom:36px}
.g h4{margin:0 0 16px;font-size:13.5px;font-weight:500}
.g h4 span{color:var(--quiet);font-weight:400;margin-left:6px}
.days{display:flex;align-items:flex-end;gap:7px;height:150px;border-bottom:1px solid var(--line)}
.day{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%}
.day i{display:block;background:#cfd5e6;border-radius:2px 2px 0 0}.day i.l{background:var(--late);border-radius:0}
.dlab{display:flex;gap:7px;margin-top:6px}.dlab span{flex:1;text-align:center;font-size:11px;color:var(--quiet)}
.ty div{display:grid;grid-template-columns:120px 1fr 36px 72px;gap:12px;align-items:center;font-size:13px;margin-bottom:10px}
.ty .b{height:4px;background:var(--line-soft);border-radius:999px}.ty .b i{display:block;height:100%;background:var(--ink);border-radius:999px}
.ty .n{text-align:right}.ty .md{text-align:right;color:var(--quiet)}
.heat{display:grid;grid-template-columns:22px repeat(12,1fr);gap:3px;font-size:10.5px;color:var(--quiet);align-items:center}
.heat i{height:18px;border-radius:3px;display:block}

.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,12px);background:var(--ink);color:#fff;border-radius:9px;padding:9px 14px;font-size:13px;display:flex;gap:14px;opacity:0;pointer-events:none;transition:.18s}
.toast.show{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast button{color:#b3c1ff;font-weight:500}
.help{position:fixed;inset:0;background:rgba(26,28,31,.35);display:none;place-items:center;z-index:30}
.help.open{display:grid}
.help div{background:var(--surface);border-radius:12px;padding:22px 26px;box-shadow:var(--shadow);min-width:380px}
.help h3{margin:0 0 12px;font-size:15px}
.help p{display:flex;justify-content:space-between;gap:30px;margin:6px 0;font-size:13.5px}
kbd{font:500 11.5px Onest,sans-serif;border:1px solid var(--line);border-bottom-width:2px;border-radius:5px;padding:0 6px;color:var(--graphite);margin-left:3px}
.hint{position:fixed;right:18px;bottom:14px;font-size:12px;color:var(--quiet)}

/* ===== live-data additions: things the prototype faked in JS ===== */
a{color:inherit}
a.nav,a.ib,a.doc{text-decoration:none}
.shell{overflow:hidden}
.row[data-u=off] .t{color:var(--quiet);font-size:14px;font-weight:400;padding-top:1px}
.tx{white-space:pre-wrap;overflow-wrap:anywhere}
.shots{flex-wrap:wrap}
.shot{overflow:hidden;padding:0}
.shot img{width:100%;height:100%;object-fit:cover;display:block}
.docs{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-top:8px;max-width:100%}
.doc{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--accent);max-width:100%}
.doc span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.doc:hover span{text-decoration:underline}
.m.mine .mb .docs{margin-bottom:2px}
.reo{margin-top:14px;font-size:13px;color:var(--graphite);display:flex;gap:12px;align-items:baseline}
.dupf{padding:5px 5px 6px}
.dupf input{width:100%;border:1px solid var(--line);border-radius:7px;padding:6px 9px;font:inherit;font-size:13px;background:var(--surface)}
.dupf input:focus{outline:none;border-color:var(--accent)}
.side dd.ed{cursor:text;border-radius:5px;padding:0 3px;margin-left:-3px;margin-right:-3px;transition:background .12s}
.side dd.ed:hover{background:var(--hover)}
input.edit{font:inherit;color:inherit;width:100%;border:1px solid var(--accent);border-radius:6px;padding:0 6px;margin:0 -7px;background:var(--surface);outline:none}
.name input.edit{max-width:640px}
.toast.err{background:var(--late)}
.toast.err button{display:none}
/* skeleton while a card loads; appears only if the request takes >150 ms */
.card{position:relative}
.card::before{content:"";position:absolute;left:0;right:0;top:0;height:420px;pointer-events:none;opacity:0;
  --p:clamp(28px,3.2vw,72px);--s:linear-gradient(var(--line-soft),var(--line-soft));
  background:var(--s) var(--p) 32px/90px 11px no-repeat,var(--s) var(--p) 56px/300px 20px no-repeat,
    var(--s) var(--p) 90px/170px 13px no-repeat,var(--s) var(--p) 134px/380px 13px no-repeat,
    var(--s) var(--p) 160px/min(720px,55%) 3px no-repeat,var(--s) var(--p) 188px/140px 30px no-repeat,
    var(--s) calc(var(--p) + 40px) 262px/min(560px,50%) 12px no-repeat,var(--s) calc(var(--p) + 40px) 286px/min(480px,44%) 12px no-repeat,
    var(--s) calc(var(--p) + 40px) 310px/min(300px,30%) 12px no-repeat,var(--s) var(--p) 256px/28px 28px no-repeat;}
.card.htmx-request::before{opacity:1;transition:opacity .1s .15s}
.card.htmx-request>.cw{opacity:0;transition:opacity .1s .15s}

/* very large screens: slightly larger type, list up to 620 px (spec §9) */
@media (min-width:2200px){
  body{font-size:15px}
  .shell{grid-template-columns:60px clamp(430px,24vw,620px) 1fr}
  .lhead h1{font-size:17px}
  .fl{font-size:14px}
  .t{font-size:18px}.t small{font-size:11.5px}
  .r1 span,.sig{font-size:12.5px}.r2{font-size:14px}
  .kind,.dlm,.link,.reo,.lack,.notebtn,.st{font-size:14px}
  .name{font-size:26px}.phones{font-size:16px}.dlt{font-size:16px}
  .mh,.ev{font-size:13.5px}.side dt{font-size:13px}.fw{font-size:12.5px}
  .mb{max-width:84ch}
  .shot{width:148px;height:96px}
}

/* real timers are wider than the prototype's samples ("−12 ч 19 м") */
.row{grid-template-columns:98px 1fr}
.cw{max-width:1680px}
@media (min-width:2200px){.row{grid-template-columns:108px 1fr}}
.filters{gap:clamp(10px,.8vw,18px)}
.fl{flex:none}

/* ===== search, stats, settings: panes of the prototype (#v-search, #v-stats) on real data ===== */
.pane.cur{display:block}
.shell:has(.pane.cur)~.hint{display:none} /* would sit on top of scrolling tables; the rail has the ? button */
.pw{padding-top:26px}
.q input::placeholder{color:var(--quiet)}
.fs{position:relative;flex-wrap:wrap;row-gap:6px}
.fs a{text-decoration:none}
.fs a:hover{color:var(--ink)}
.fs .menu{top:28px;min-width:200px}
.menu.scroll{max-height:min(380px,60vh);overflow:auto}
#results{transition:opacity .1s}
#results.htmx-request{opacity:.5;transition:opacity .1s .15s}
.cli .copyable{color:var(--ink)}
.res td a{text-decoration:none}
.res .nw{white-space:nowrap}
.res .nm{white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
.res .su{width:100%;min-width:240px;color:var(--ink)}
.res td,.res th{padding-right:20px}
.res th:last-child,.res td:last-child{padding-right:0}
th.r,td.r{text-align:right}
.res th{white-space:nowrap}
.ty div.und{color:var(--graphite);margin-top:14px}
.ty div.und .b{background:none}
.days{height:180px}
.res td.late,.res td.nw.late{color:var(--late)}
.tnote{margin:14px 0 0;font-size:12.5px;color:var(--quiet)}
.rnote{margin:-16px 0 20px;font-size:12.5px;color:var(--quiet)}
.good{color:var(--ok)}.flat{color:var(--quiet)}
.kp em.late{color:var(--late)}
/* per-day bars: long periods get hairline gaps so every day still fits */
.days.dense,.dlab.dense{gap:2px}.days.xdense,.dlab.xdense{gap:1px}
.dlab span{white-space:nowrap;min-width:0}
.dlab.dense span,.dlab.xdense span{text-align:left;overflow:visible}
.day:hover i{filter:brightness(.92)}
.ty div{grid-template-columns:minmax(96px,150px) 1fr 36px 72px}
.ty .tl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.heat{grid-template-columns:22px repeat(16,1fr)}
.heat .hh{text-align:center}
table.plain tbody tr{cursor:default}
table.plain tbody tr:hover td{background:none}
.exh{margin-top:30px!important}
.exl{margin:0;font-size:13.5px;color:var(--graphite)}
.exl b{color:var(--ink);font-weight:500}
.rangef{display:flex;flex-direction:column;gap:8px;padding:8px 8px 6px}
.rangef label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--graphite)}
.rangef input{border:1px solid var(--line);border-radius:7px;padding:4px 8px;font:inherit;font-size:13px;color:var(--ink);background:var(--surface)}
.rangef input:focus{outline:none;border-color:var(--accent)}
.rangef button{align-self:flex-end;margin-top:2px;padding:5px 12px;border-radius:7px;background:var(--ink);color:#fff;font-size:13px;font-weight:500}
/* settings: quiet definition lists, like the card's side panel */
.ptitle{margin:0 0 30px;font-size:16px;font-weight:600;letter-spacing:-.01em}
.ptitle span{font-weight:400;color:var(--quiet);margin-left:8px;font-size:14px}
.set{max-width:860px}
.set section{margin-bottom:34px}
.set h4{margin:0 0 14px;font-size:13.5px;font-weight:500}
.set h4 span{color:var(--quiet);font-weight:400;margin-left:6px}
.set dl{margin:0;display:grid;align-items:baseline;grid-template-columns:minmax(160px,240px) 1fr;gap:10px 24px;border-top:1px solid var(--line-soft);padding-top:12px}
.set dt{font-size:13px;color:var(--graphite)}
.set dd{margin:0;font-weight:500}
.set dd .sub{font-weight:400;color:var(--quiet);margin-left:10px;font-size:13px}
@media (min-width:2200px){
  .fs,.cli,td,.exl,.set dd{font-size:14.5px}
  th,.tnote,.dlab span{font-size:12.5px}
  .q input{font-size:22px}
  .kp div b{font-size:31px}.kp div small{font-size:13.5px}
  .g h4,.set h4{font-size:14.5px}
  .ty div{font-size:14px}
  .heat{font-size:11.5px}.heat i{height:21px}
  .days{height:180px}
  .pw{max-width:1900px}
}
/* filter menus: labels left-aligned, the current item marked by a dot in the gutter */
.fs .menu button{justify-content:flex-start;white-space:nowrap}
.fs .menu .rangef button{width:auto;align-self:flex-end;justify-content:center;padding:5px 14px;background:var(--ink);color:#fff}
.fs .menu .rangef button:hover{background:#2c2f33}

/* ===== accessibility (Task 14, WCAG 2.1 AA) ===== */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* inputs that drop the outline show focus by their border instead */
.q:focus-within{border-bottom-color:var(--accent)}
.help div:focus{outline:none}
/* small text-only controls: hit area grows to >= 24 px without moving the layout */
.link,.notebtn,.fs button,.fs a,.toast button,.doc,.phones .copyable,.reo .link{padding-top:3px;padding-bottom:3px;margin-top:-3px;margin-bottom:-3px}
.side dd.ed{padding-top:2px;padding-bottom:2px;margin-top:-1px;margin-bottom:-1px}
.fl.more{min-width:24px}
/* narrow screens (Telegram Mini App, 200-400 % zoom; WCAG 1.4.10 reflow): rail + one column,
   the list on top and the card under it, no horizontal page scroll */
@media (max-width:760px){
  .shell{grid-template-columns:48px minmax(0,1fr);grid-template-rows:minmax(0,42%) minmax(0,1fr);height:100vh;height:100dvh}
  .rail{grid-row:1 / 3;padding:8px 0}
  .nav{width:36px;height:36px}
  .list{border-right:0;border-bottom:1px solid var(--line)}
  .lhead{padding:14px 16px 0}
  .filters{flex-wrap:wrap;row-gap:4px;padding:10px 16px 0;gap:4px 14px}
  .fl.more{margin-left:0}
  #moreMenu{right:auto;left:16px;top:auto;margin-top:34px}
  .row{grid-template-columns:78px minmax(0,1fr);gap:12px;padding-right:16px}
  .t{font-size:15px}
  .cw{padding:20px 16px 40px}
  .name{font-size:20px}
  .side dl{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .pane{grid-column:2;grid-row:1 / 3}
  .pw{padding:20px 16px}
  .q input{font-size:17px}
  .res th:nth-child(2),.res td:nth-child(2),.res th:nth-child(5),.res td:nth-child(5),.res th:nth-child(7),.res td:nth-child(7){display:none}
  .res .su{min-width:0}
  .res td:nth-child(6){white-space:normal}
  .res .nm{max-width:110px}
  .res td,.res th{padding-right:12px}
  .g{grid-template-columns:minmax(0,1fr)}
  .kp{gap:14px 28px}.kp div b{font-size:22px}
  .ty div{grid-template-columns:minmax(72px,104px) 1fr 30px 72px;gap:8px}
  .dl1{row-gap:2px}
  .set dl{grid-template-columns:minmax(0,40%) minmax(0,1fr);gap:8px 16px}
  .help div{min-width:0;width:calc(100vw - 32px);max-width:420px;padding:18px 20px}
  .help p{gap:16px}
  .hint{display:none}
  .toast{max-width:calc(100vw - 32px)}
}
.res td a{display:inline-block;padding:3px 0;margin:-3px 0}

/* ===== polish (Task 14): alignment and rhythm fixes, nothing new ===== */
/* the enlarged hit area must not eat the note link's own spacing */
.notebtn{margin-top:15px}
/* every menu: labels start at one left edge, the current item is marked by a dot in the gutter
   (the queue menus used to centre the current label) */
.menu button{position:relative;padding-left:24px}
.menu button.cur::before{position:absolute;left:10px;top:50%;margin:-3px 0 0}
/* long chat text and titles: no single-word last lines */
.tx,.empty{text-wrap-style:pretty}
.name{text-wrap-style:balance}
/* search/stats/settings content is left-aligned, so their empty states are too */
.pane .empty{text-align:left;padding:40px 0}
/* missing values in tables are quiet, not ink */
.nil{color:var(--quiet)}
