/* Work OS – phone control panel.
   Direction: a quiet working tool. Warm paper ground, ink type, one face (Onest), colour only on state & data.
   Flat surfaces separated by 1px lines; shadow only on what floats (nav, composer, sheets, toasts). */

:root {
  --ground: #f6f5f1; --surface: #ffffff; --sunk: #efeee9; --raised: #fbfaf7;
  --ink: #17160f; --ink-2: #57554c; --ink-3: #6b695f;
  --line: #e6e4dd; --line-2: #d6d3ca;
  --accent: #1f5f4a; --accent-ink: #ffffff; --accent-soft: #e3efe9;          /* agent / live / brand */
  --attn: #a8460a; --attn-soft: #fdf0e3; --attn-line: #efc9a4;              /* needs you */
  --ok: #2b7a3d; --ok-soft: #e6f2e7;
  --bad: #b42318; --bad-soft: #fbe9e7; --bad-line: #f1c0ba;
  --info: #175cd3; --info-soft: #e8effc; --info-line: #c4d6f8;
  --avo: #3f6b21; --avo-soft: #e7f3df; --free: #2f4f9a; --free-soft: #e6ecfb; --dev: #5b3cc4; --dev-soft: #ece6ff;
  --r: 12px; --r-s: 8px;
  --float: 0 8px 24px rgba(23, 22, 15, .10), 0 1px 3px rgba(23, 22, 15, .08);
  --sheet: 0 -12px 40px rgba(23, 22, 15, .18);
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 60px; --composer-h: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --warn: #c98a00;
  --on-attn: #fff; --on-ok: #fff; --on-bad: #fff;   /* text on solid state colours */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #11110f; --surface: #191916; --sunk: #0c0c0b; --raised: #1e1e1b;
    --ink: #eceae3; --ink-2: #b3b0a6; --ink-3: #9a978d;
    --line: #2a2925; --line-2: #3a3833;
    --accent: #5cc29b; --accent-ink: #0c1a14; --accent-soft: #15291f;
    --attn: #f4a259; --attn-soft: #2c1d0f; --attn-line: #5a3a18;
    --ok: #6ccf7f; --ok-soft: #142417;
    --bad: #f97066; --bad-soft: #2d1311; --bad-line: #5a2420;
    --info: #84adff; --info-soft: #121d33; --info-line: #24407a;
    --avo: #a6d17f; --avo-soft: #1f2c17; --free: #9db3f0; --free-soft: #18213a; --dev: #c3b2ff; --dev-soft: #2a2050;
    --float: 0 10px 30px rgba(0, 0, 0, .5);
    --sheet: 0 -12px 40px rgba(0, 0, 0, .6);
    --warn: #e8b33a;
    --on-attn: #1a1206; --on-ok: #0b1a0e; --on-bad: #1f0705;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body {
  font: 15px/1.5 "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; text-size-adjust: 100%;
  padding-bottom: calc(var(--nav-h) + 12px + var(--safe-b));
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
textarea, input { caret-color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ico.s { width: 16px; height: 16px; vertical-align: -3px; }
.ico.big { width: 34px; height: 34px; stroke-width: 1.5; color: var(--ink-3); }
.ico.muted { color: var(--ink-3); }
.ok-t { color: var(--ok); } .bad-t { color: var(--bad); }

/* ---------- shell ---------- */
header.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px;
  height: calc(56px + var(--safe-t)); padding: var(--safe-t) 12px 0 16px;   /* the installed app draws under the status bar */ background: color-mix(in srgb, var(--ground) 92%, transparent); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
header.top h1 { font-size: 18px; font-weight: 650; letter-spacing: -.01em; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* node mode: which machine does the work now (app.js nodeChipHtml) */
#nodechip:empty { display: none; }
.nodechip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; color: var(--ok); background: var(--ok-soft); }
.nodechip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.nodechip.warn { color: var(--attn); background: var(--attn-soft); }
.nodechip.bad { color: var(--bad); background: var(--bad-soft); }
button.nodechip { border: 0; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; min-height: 32px; }
.nodechip .via { font-weight: 500; opacity: .8; }
.nodemenu { position: fixed; z-index: 60; top: calc(env(safe-area-inset-top, 0px) + 58px); right: 12px; width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 140px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.28); padding: 14px 16px 10px; }
.nm-sec { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 8px; }
.nodemenu .nm-seg { margin: 0 0 6px; padding: 0; -webkit-mask-image: none; mask-image: none; }
.nodemenu .nm-seg button { flex: 1; height: 36px; padding: 0 8px; }
.nm-note { margin: 0 0 12px; }
.nm-card { border-top: 1px solid var(--line-2); padding: 10px 0; }
.nm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nm-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); }
.nm-tag.ok { background: var(--ok-soft); color: var(--ok); } .nm-tag.bad { background: var(--bad-soft); color: var(--bad); }
.nm-row { display: grid; grid-template-columns: 10px 104px 1fr; align-items: baseline; gap: 8px; font-size: 13.5px; padding: 3px 0; }
.nm-row .sub { overflow-wrap: anywhere; }
.nm-row .sdot { width: 8px; height: 8px; }
.nm-link { display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 8px 0 2px; font-size: 13.5px; border-top: 1px solid var(--line-2); }
.sg-tabs .n { opacity: .7; margin-left: 2px; }
/* the server's screen (app.js #/remote): the whole phone screen – desktop + one bar (bottom upright, right side in landscape) */
body.remote-on { overflow: hidden; }
body.remote-on header.top, body.remote-on nav.bottom, body.remote-on #banner, body.remote-on .ubar, body.remote-on .fab { display: none !important; }
.rm { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; color: #fff; }
.rm-view { position: relative; flex: 1; min-height: 0; min-width: 0; }
.rm-screen { position: absolute; inset: 0; overflow: hidden; touch-action: none; }
.rm-bar { display: flex; justify-content: space-around; gap: 2px; padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)); background: #161614; border-top: 1px solid #2a2a26; }
.rm-bar button { flex: 1; min-width: 0; min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; border-radius: 10px; color: #eee; font: inherit; cursor: pointer; padding: 4px 2px; }
.rm-bar button:active { background: #2a2a26; }
.rm-i { font-size: 17px; line-height: 1; display: flex; } .rm-i .ico { width: 20px; height: 20px; }
.rm-l { font-size: 10.5px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rm-st { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px);
  background: rgba(20, 20, 18, .88); color: #fff; font-size: 13px; padding: 6px 12px; border-radius: 999px; pointer-events: none; text-align: center; }
.rm-st.bad { background: rgba(140, 24, 16, .92); }
.rm-help { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.rm-help-card { background: #1d1d1a; border: 1px solid #333; border-radius: 14px; padding: 16px 18px; max-width: 360px; font-size: 14px; line-height: 1.45; }
.rm-help-card ul { margin: 8px 0 10px; padding-left: 18px; }
@media (orientation: landscape) {
  .rm { flex-direction: row; }
  .rm-bar { flex-direction: column; border-top: 0; border-left: 1px solid #2a2a26; width: 64px; padding: calc(4px + env(safe-area-inset-top, 0px)) calc(4px + env(safe-area-inset-right, 0px)) 4px 4px; }
  .rm-bar button { min-height: 0; }
}
.iconbtn { display: grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; border-radius: 10px; cursor: pointer; color: var(--ink-2); flex: none; }
.iconbtn:active { background: var(--sunk); }
.iconbtn.back { margin-left: -10px; color: var(--ink); }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--ground); display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: .02em; flex: none; }

main { padding: 12px 16px 28px; max-width: 720px; margin: 0 auto; }
h2 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 28px 2px 8px; display: flex; align-items: baseline; gap: 8px; }
h2 .n { color: var(--ink-3); font-weight: 500; }
h2 a { margin-left: auto; color: var(--accent); font-weight: 600; padding: 4px 0; }

nav.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
}
/* --vv-fix (app.js vvFix): iOS can leave the layout viewport short after the keyboard; push bottom-fixed things back down */
nav.bottom, .fab, .jump, .toast, .tcomposer { translate: 0 var(--vv-fix, 0px); }
/* keyboard open (app.js vvFix): the composer rides on its top edge, the tab bar is out of the way */
html.kb-open nav.bottom, html.kb-open .fab { display: none; }
html.kb-open .jump, html.kb-open .toast, html.kb-open .tcomposer { translate: 0 var(--vv-comp, 0px); }
nav.bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--ink-3); position: relative; }
nav.bottom a .ico { width: 22px; height: 22px; }
nav.bottom a.on { color: var(--ink); }
nav.bottom a.on .ico { stroke-width: 2.2; }
nav.bottom a.on::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--ink); }
nav.bottom .cnt { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--ink-3); color: var(--ground); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
nav.bottom .cnt.hot { background: var(--attn); color: var(--on-attn); }

.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 14px + var(--safe-b)); z-index: 11; width: 56px; height: 56px; border-radius: 16px; border: 0;
  background: var(--ink); color: var(--ground); display: grid; place-items: center; box-shadow: var(--float); cursor: pointer; transition: transform .15s var(--ease); }
.fab .ico { width: 24px; height: 24px; stroke-width: 2.2; }
.fab:active { transform: scale(.94); }

/* ---------- banners ---------- */
#banner:empty { display: none; }
#banner { padding: 10px 16px 0; max-width: 720px; margin: 0 auto; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.banner > .ico { flex: none; }
.banner .small { color: var(--ink-2); margin-top: 1px; }
.banner.bad { background: var(--bad-soft); border-color: var(--bad-line); } .banner.bad > .ico { color: var(--bad); }
.banner.warn { background: var(--attn-soft); border-color: var(--attn-line); } .banner.warn > .ico { color: var(--attn); }
.banner.info { background: var(--info-soft); border-color: var(--info-line); } .banner.info > .ico { color: var(--info); }
.banner .btn { flex: none; }

/* ---------- surfaces ---------- */
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 8px; }
.card.tap { transition: background .15s; }
.card.tap:active { background: var(--sunk); }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 8px; }
.row-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); min-height: 52px; }
.row-item:first-child { border-top: 0; }
.row-item.tap { cursor: pointer; transition: background .12s; }
.row-item.tap:active { background: var(--sunk); }
.row-item .chev { margin-top: 0; }
.row-item .ri-ico { align-self: flex-start; }
.ri-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--sunk); color: var(--ink-2); display: grid; place-items: center; flex: none; margin-top: 1px; }
.ri-ico.attn { background: var(--attn-soft); color: var(--attn); }
.ri-ico.bad { background: var(--bad-soft); color: var(--bad); }
.ri-ico.ok { background: var(--ok-soft); color: var(--ok); }
.row { display: flex; align-items: center; gap: 10px; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.title { font-weight: 600; overflow-wrap: anywhere; line-height: 1.35; }
.title.lg { font-size: 19px; letter-spacing: -.01em; }
.sub { color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
.meta { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.meta b { color: var(--ink-2); font-weight: 600; }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chev { color: var(--ink-3); }
.hint { color: var(--ink-2); font-size: 13px; margin: 10px 2px; line-height: 1.5; }
.hint.strong { color: var(--ink); font-size: 14px; }
.quiet { color: var(--ink-3); font-size: 13.5px; padding: 10px 2px; }
.link { color: var(--accent); font-weight: 600; display: inline-block; margin-top: 8px; }
.msg { background: var(--sunk); border-radius: 10px; padding: 12px; margin-top: 10px; font-size: 14px; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.sub-h { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 14px 0 4px; }

/* empty / all clear / skeleton */
.empty { text-align: center; color: var(--ink-2); padding: 34px 16px; font-size: 14px; }
.empty .empty-t { font-weight: 600; color: var(--ink); margin: 10px 0 4px; font-size: 15px; }
.empty .sub { max-width: 34ch; margin: 0 auto; }
.empty .btn { margin-top: 14px; }
.allclear { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--r); margin-top: 14px; }
.allclear > .ico { color: var(--ok); width: 26px; height: 26px; }
.daysum { font-size: 13px; color: var(--ink-2); margin: 4px 2px 0; text-transform: none; }
.daysum::first-letter { text-transform: uppercase; }
.daysum span { color: var(--ink-3); }
.foot-links { display: flex; justify-content: center; gap: 22px; margin: 26px 0 6px; font-size: 13.5px; }
.foot-links a { color: var(--accent); font-weight: 600; }
.skel { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.skel-row i, .skel-row b { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--sunk) 25%, var(--line) 50%, var(--sunk) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skel-row i { width: 32px; height: 32px; border-radius: 9px; flex: none; } .skel-row b { height: 14px; flex: 1; max-width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* KPIs: type, not tiles */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 12px 14px; border-left: 1px solid var(--line); display: block; }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
.stat span { display: block; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.hot b { color: var(--attn); }
.stats.c4 { grid-template-columns: repeat(4, 1fr); }

/* pills & badges */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--sunk); color: var(--ink-2); flex: none; vertical-align: 1px; }
.b-running, .b-executing, .b-approved, .b-preparing, .b-confirmed, .b-sending { background: var(--accent-soft); color: var(--accent); }
.b-needs_input, .b-needs_approval, .b-pending, .b-high, .b-ready { background: var(--attn-soft); color: var(--attn); }
.b-done, .b-executed, .b-task { background: var(--ok-soft); color: var(--ok); }
.b-failed, .b-rejected, .b-cancelled { background: var(--bad-soft); color: var(--bad); }
.b-gui, .b-src, .b-new { background: var(--info-soft); color: var(--info); }
.b-dismissed, .b-superseded { background: var(--sunk); color: var(--ink-3); }
.badge.cat-avokado { background: var(--avo-soft); color: var(--avo); }
.badge.cat-freelance { background: var(--free-soft); color: var(--free); }
.badge.devb { background: var(--dev-soft); color: var(--dev); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--ink-2); vertical-align: 1px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.bad { background: var(--bad-soft); color: var(--bad); }
.cnt-pill { background: var(--attn); color: var(--on-attn); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; align-self: center; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; font-size: 12.5px; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; flex: none; }
@keyframes pulse { 50% { opacity: .3; } }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; display: inline-block; align-self: center; }
.spinner.sm { width: 14px; height: 14px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* progress steps */
.steps { list-style: none; margin: 10px 0 0; padding: 0; }
.steps li { position: relative; padding: 3px 0 3px 22px; font-size: 13.5px; color: var(--ink-2); }
.steps li::before { content: ''; position: absolute; left: 3px; top: 10px; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-2); }
.steps li::after { content: ''; position: absolute; left: 7px; top: 20px; bottom: -6px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.steps li.active { color: var(--ink); font-weight: 600; }
.steps li.active::before { border-color: var(--accent); background: var(--accent); animation: pulse 1.2s infinite; }
.steps-ol { padding-left: 20px; margin: 8px 0; } .steps-ol li { margin: 4px 0; }
.card.work { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: transform .1s, background .15s; text-align: center; }
.btn:active { transform: scale(.98); background: var(--sunk); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn.primary:active { background: var(--ink-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--on-bad); }
.btn.danger-t, .danger-t { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.ghost.danger-t { color: var(--bad); }
.btn.block { width: 100%; }
.btn.lg { min-height: 52px; font-size: 15.5px; border-radius: 12px; }
.btn.sm { min-height: 40px; padding: 6px 12px; font-size: 13.5px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btns .btn { flex: 1 1 0; }
.btns.sm { margin-top: 10px; } .btns.sm .btn { flex: 0 0 auto; }
.btn.icon { width: 44px; min-width: 44px; padding: 0; flex: none; color: var(--ink-2); }
.btn.icon.sm { width: 36px; min-width: 36px; min-height: 36px; }
.btn.icon.rec { width: auto; padding: 0 12px; background: var(--bad); border-color: var(--bad); color: var(--on-bad); font-size: 14px; font-variant-numeric: tabular-nums; }
.chipbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-btns { position: sticky; bottom: calc(var(--nav-h) + 8px + var(--safe-b)); z-index: 4; margin-top: 14px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--float); }
.sticky-btns .btns { margin-top: 8px; }

/* forms */
label.f { display: block; font-size: 13px; color: var(--ink-2); margin: 16px 2px 6px; font-weight: 600; }
input.i, textarea.i, select.i { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 12px; font-size: 16px; line-height: 1.45; }
select.i.sm { padding: 9px 10px; margin-top: 10px; }
input.i:focus, textarea.i:focus, select.i:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.i { min-height: 130px; resize: vertical; }
textarea.mono { font: 13px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; }
::placeholder { color: var(--ink-3); opacity: 1; }
.chk { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14.5px; line-height: 1.4; }
.chk input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.row2 { display: grid; grid-template-columns: 1fr 132px; gap: 8px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.row3 label { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; }
.days button { height: 40px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.days button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.more-opts { margin-top: 18px; }
.more-opts summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; list-style: none; padding: 6px 2px; }
.more-opts summary::-webkit-details-marker { display: none; }
.more-opts summary::after { content: ' ›'; }
.more-opts[open] summary::after { content: ' ˅'; }
.guess { font-weight: 500; color: var(--ink-3); }
.guess b { color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 10px; padding: 0 12px; margin-bottom: 10px; color: var(--ink-3); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 0; font-size: 16px; outline: none; color: var(--ink); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .seg { flex: 1; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* events log */
.ev { font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; color: var(--ink-2); }
.ev:first-of-type { border-top: 0; }
.ev time { color: var(--ink-3); flex: none; width: 38px; }
.ev.error { color: var(--bad); } .ev.question { color: var(--attn); font-weight: 600; } .ev.result { color: var(--ink); font-weight: 500; }
.logbox { max-height: 380px; overflow: auto; }
details.card summary { cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }

/* evidence */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.shots a { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }
.shots img { width: 100%; height: 160px; object-fit: cover; object-position: top; display: block; }
.shots span { display: block; font-size: 12px; padding: 5px 8px; color: var(--ink-2); }
.ib-shots { margin: 10px 0 4px; }
.ib-shots img { object-position: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--composer-h) + 20px + var(--safe-b)); z-index: 60;
  background: var(--ink); color: var(--ground); padding: 11px 16px; border-radius: 10px; font-size: 14px; max-width: min(90vw, 460px); box-shadow: var(--float);
  animation: toast-in .25s var(--ease); transition: opacity .25s, transform .25s; }
.toast.bad { background: var(--bad); color: var(--on-bad); }
a.toast { text-decoration: none; display: flex; gap: 8px; align-items: center; }
.toast.out { opacity: 0; transform: translate(-50%, 6px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* segmented / chips */
.seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; height: 40px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 9px; padding: 0 12px; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }

/* ---------- bottom sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(12, 12, 10, .45); animation: fade .2s ease-out; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: var(--surface); border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(16px + var(--safe-b)); box-shadow: var(--sheet); animation: up .26s var(--ease); }
.sheet-wrap.out .sheet { transform: translateY(16px); opacity: 0; transition: .18s; } .sheet-wrap.out .sheet-bg { opacity: 0; transition: .18s; }
.sheet-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }
.sheet-text { color: var(--ink-2); margin: 0 0 12px; white-space: pre-wrap; }
.sheet-input textarea { min-height: 110px; }
.sheet-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sheet-form label.f:first-child { margin-top: 4px; }
.sheet .pick .row-item { cursor: pointer; align-items: center; }
.sheet .pick input { width: 20px; height: 20px; accent-color: var(--ink); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Claude transcript ---------- */
.tl { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.tl .m { font-size: 14.5px; overflow-wrap: anywhere; }
.tl .m time { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 3px; }
.tl .user { align-self: flex-end; max-width: 86%; }
.tl .user time { text-align: right; }
.tl .user .bubble { background: var(--ink); color: var(--ground); border-radius: 16px 16px 4px 16px; padding: 9px 13px; }
.tl .user details summary { list-style: none; cursor: pointer; }
.tl .user details summary::-webkit-details-marker { display: none; }
.tl .user details[open] summary { display: none; }
/* context chips: what the agent was given for this message */
.ctxrow { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 6px; }
.ctx-sum { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); margin-right: 2px; }
.ctx-sum .ico { width: 13px; height: 13px; }
.ctxchip { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 3px 9px 3px 7px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); cursor: pointer; transition: background .15s, border-color .15s; }
.ctxchip .ico { width: 14px; height: 14px; color: var(--ink-3); }
.ctxchip i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ctxchip:active { background: var(--sunk); }
@media (hover: hover) { .ctxchip:hover { border-color: var(--accent); } }
.ctxchip.k-owner .ico, .ctxchip.k-voice .ico { color: var(--accent); }
.ctxchip.k-client .ico, .ctxchip.k-notes .ico { color: var(--attn); }
.ctxview { max-height: 62vh; overflow: auto; background: var(--sunk); border-radius: var(--r-s); padding: 12px 14px; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.ctx-note { margin: -4px 0 10px; }
.tl .asst { padding: 2px 2px; max-width: 100%; line-height: 1.55; }
.tl .asst b.h { display: block; margin-top: 6px; }
.tl .asst a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tl .think { color: var(--ink-3); font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.tl .think.live-only:not(:last-child) { display: none; }      /* "thinking" only while it is the newest thing */
.tl .note { color: var(--ink-3); font-size: 12.5px; text-align: center; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
/* tool calls: one compact row each – icon, verb, object, time; consecutive ones join into one block */
.tl .toolwrap time { display: none; }
.tl .tool { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.tl .tool summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px 6px 6px; cursor: pointer; list-style: none; }
.tl .tool summary::-webkit-details-marker { display: none; }
.t-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--sunk); color: var(--ink-2); }
.tool.run .t-ico { background: var(--accent-soft); color: var(--accent); }
.tool.err .t-ico { background: var(--bad-soft); color: var(--bad); }
.t-verb { font-weight: 600; color: var(--ink); flex: none; }
.t-hint { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); font: 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.t-dur { flex: none; color: var(--ink-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.t-err { flex: none; color: var(--bad); display: grid; }
.t-body { padding: 0 10px 10px; }
.t-name { font-size: 11.5px; color: var(--ink-3); }
.tl .tool.err { border-color: var(--bad-line); }
.tl .toolwrap:has(+ .toolwrap) .tool { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.tl .toolwrap + .toolwrap { margin-top: -10px; }
.tl .toolwrap + .toolwrap .tool { border-top-color: transparent; border-top-left-radius: 0; border-top-right-radius: 0; box-shadow: inset 0 1px 0 var(--line); }
/* where am I: day separators and a time label while scrolling */
.tl-day { display: flex; justify-content: center; margin: 6px 0 2px; }
.tl-day span { font-size: 11.5px; font-weight: 600; color: var(--ink-3); background: var(--ground); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.tl-day span::first-letter { text-transform: uppercase; }
.tl-when { position: fixed; left: 50%; top: calc(56px + var(--safe-t) + 10px); transform: translate(-50%, -6px); z-index: 6; opacity: 0; pointer-events: none;
  font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; box-shadow: var(--float); transition: opacity .2s, transform .2s var(--ease); }
.tl-when::first-letter { text-transform: uppercase; }
.tl-when.on { opacity: 1; transform: translate(-50%, 0); }
.jump { position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--composer-h) + 14px + var(--safe-b)); z-index: 8; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: var(--float); cursor: pointer; animation: fade .2s; }
.jump-n { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.tl.compact .m { font-size: 13.5px; }
.tl-card { padding: 12px; }
pre.code { background: var(--sunk); border-radius: 8px; padding: 9px; font: 12px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; max-height: 320px; overflow: auto; }
pre.code.out { box-shadow: inset 2px 0 0 var(--ok); }
.tool.err pre.code.out { box-shadow: inset 2px 0 0 var(--bad); }
code { background: var(--sunk); border-radius: 5px; padding: 1px 5px; font: 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; }

.composer { position: sticky; bottom: calc(var(--nav-h) + 8px + var(--safe-b)); display: flex; gap: 6px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: var(--float); margin-top: 8px; }
.composer textarea { min-height: 44px; max-height: 160px; border: 0; padding: 10px 8px; resize: none; overflow-y: auto; line-height: 1.35; background: transparent; box-shadow: none !important; }
.composer .btn { flex: none; width: 44px; min-width: 44px; padding: 0; }
.composer .btn:disabled { opacity: .35; }
.nowbtn { color: var(--attn); }

.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.tl .m.user[data-pending] { opacity: .6; }
.typing { display: flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13px; padding: 4px 2px 8px; }
.typing[hidden] { display: none; }
.typing em { margin-left: 6px; font-style: normal; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.stopbtn { color: var(--bad); border-color: var(--bad-line); margin-left: auto; }

.chat-shots { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 6px; }
.chat-shots img { height: 190px; object-fit: cover; object-position: top; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: flex; flex-direction: column; overflow: auto; -webkit-overflow-scrolling: touch; }
.lightbox img { width: 100%; height: auto; margin: auto 0; display: block; }
.lightbox .lb-bar { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 10px 16px calc(10px + var(--safe-b)); background: rgba(0, 0, 0, .6); }
.lightbox .lb-bar .btn { flex: 1; }

/* voice & attachments */
.mbar { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; background: var(--sunk); color: var(--ink-2); border-radius: 8px; padding: 0 4px 0 10px; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.busy { animation: pulse 1.2s infinite; padding-right: 10px; }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip button { border: 0; background: none; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; color: var(--ink-3); border-radius: 6px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 6px; }
.file-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--accent); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--sunk); font-size: 13px; font-weight: 600; }
.file-chip i { font-style: normal; color: var(--ink-3); font-weight: 500; }

/* templates & prompt improve */
.tpls { display: flex; gap: 6px; overflow-x: auto; margin: 10px -16px 0; padding: 2px 16px 4px; scrollbar-width: none; }
.tpls::-webkit-scrollbar { display: none; }
.tpls button { flex: none; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px dashed var(--line-2); background: transparent; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.tpls button:active { background: var(--sunk); }
.improve { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.improved { border-color: var(--accent) !important; }

/* client header + timeline */
.cl-head { padding: 4px 2px 14px; }
.cl-head h3 { font-size: 22px; font-weight: 650; letter-spacing: -.015em; margin: 0 0 6px; }
.cl-head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--ink-2); font-size: 13.5px; }
.cl-head .meta a { color: var(--accent); }
.seg.tabs button { height: 34px; }
.ctx-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card.ctx { font-size: 13px; line-height: 1.55; max-height: 70vh; overflow: auto; }
.tline { position: relative; margin: 4px 0 0; padding: 0; list-style: none; }
.tline li { position: relative; padding: 0 0 18px 26px; }
.tline li::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.tline li:last-child::before { display: none; }
.tline .nd { position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.tline .nd.task { border-color: var(--ok); }
.tline .nd.open { border-color: var(--accent); background: var(--accent-soft); }
.tline .nd.approval { border-color: var(--info); }
.tline .nd.message { border-color: var(--attn); }
.tline .nd.fail { border-color: var(--bad); }
.tline .when { font-size: 12px; color: var(--ink-3); }
.tline .what { font-weight: 600; line-height: 1.35; margin-top: 1px; }
.tline .det { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.tline .day { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 6px 0 10px; padding-left: 26px; }
.tline .day::first-letter { text-transform: uppercase; }

/* client board */
.board-sum { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin: 2px 2px 12px; }
.board-sum span { display: inline-flex; align-items: center; gap: 6px; }
.sdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; background: var(--ink-3); }
.sdot.green { background: var(--ok); } .sdot.yellow { background: var(--warn); } .sdot.red { background: var(--bad); }
.sdot.busy { box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 1.4s infinite; }
.board { display: flex; flex-direction: column; gap: 8px; }
.crow { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.crow.st-yellow { border-color: var(--attn-line); } .crow.st-red { border-color: var(--bad-line); }
.crow-main { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 14px; }
.crow-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 2px 0; }
.rbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.ask { display: block; margin: 0 10px 10px; padding: 10px 12px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line); }
.ask.stuck { border-color: var(--bad-line); }
.ask-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 3px; font-weight: 600; }
.ask-text { font-size: 14.5px; }
.kind { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-radius: 8px; margin: 10px 0 6px; line-height: 1.35; }
.kind .ico { flex: none; }
.kind.comm { background: var(--attn-soft); color: var(--attn); }
.kind.work { background: var(--info-soft); color: var(--info); }
.devlink { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 14px; }
.devcard { border-color: color-mix(in srgb, var(--dev) 35%, var(--line)); }

/* inbox */
.inbox-card .body { margin: 10px 0 0; font-size: 14.5px; }
.quote { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--sunk); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.quote .q-head { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; white-space: normal; }
details.brief { margin-top: 10px; }
details.brief summary { cursor: pointer; color: var(--accent); font-size: 13.5px; font-weight: 600; list-style: none; padding: 4px 0; }
details.brief summary::-webkit-details-marker { display: none; }

/* approvals */
.appr .tile-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.appr .tile-flags:empty { display: none; }
.appr .excerpt { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; }
.appr .tile-cta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.appr.ready { border-color: var(--attn-line); background: linear-gradient(var(--attn-soft), var(--surface) 70px); }
.ap-head { margin-bottom: 12px; }
.ap-head .meta { margin-top: 4px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: st; }
.stepper li { counter-increment: st; font-size: 11.5px; color: var(--ink-3); font-weight: 600; padding-top: 8px; border-top: 3px solid var(--line); line-height: 1.25; }
.stepper li.done { border-color: var(--ok); color: var(--ink-2); }
.stepper li.cur { border-color: var(--attn); color: var(--ink); }
.mailprev, .waprev { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); overflow: hidden; margin-top: 10px; }
.mp-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mp-row > span:first-child { color: var(--ink-3); width: 56px; flex: none; font-size: 13px; }
.mp-body { padding: 14px; font-size: 15px; line-height: 1.55; }
.mp-att { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--line); }
.waprev { background: var(--sunk); }
.wa-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.waprev .mp-att { border-top: 0; padding-bottom: 0; }
.wa-bubble { margin: 12px 14px 14px auto; max-width: 88%; width: fit-content; padding: 9px 12px; border-radius: 12px 12px 4px 12px; background: var(--ok-soft); font-size: 15px; line-height: 1.45; }
.wa-recent { padding: 10px 14px 0; display: flex; flex-direction: column; gap: 4px; }
.wa-recent .q-head { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.wa-old { font-size: 13px; color: var(--ink-2); background: var(--surface); padding: 6px 10px; border-radius: 10px; max-width: 85%; width: fit-content; opacity: .85; }
.wa-old.me { margin-left: auto; background: color-mix(in srgb, var(--ok-soft) 60%, var(--surface)); }
.wa-bubble.file { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; margin-top: 0; }
.wa-bubble.file i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.qrcard { text-align: center; }
.paircode { font: 700 34px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .12em; text-align: center; padding: 14px 8px; border-radius: 12px; background: var(--sunk); user-select: all; }
.qrcard img { width: 256px; height: 256px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 12px; }
.qrcard ol { text-align: left; }
.status-card { display: flex; gap: 12px; align-items: center; }
.status-card.failed { border-color: var(--bad-line); }

/* focused task page: state bar → what needs you → result → facts → steps → Claude's work → more */
.tstate { display: inline-flex; align-items: center; gap: 6px; height: 26px; font-size: 12.5px; font-weight: 700; padding: 0 10px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; flex: none; }
.tstate.st-running { color: var(--accent); background: var(--accent-soft); } .tstate.st-needs_input, .tstate.st-needs_approval { color: var(--attn); background: var(--attn-soft); }
.tstate.st-done { color: var(--ok); background: var(--ok-soft); } .tstate.st-failed { color: var(--bad); background: var(--bad-soft); }
.tstate.st-queued { color: var(--info); background: var(--info-soft); } .tstate.st-cancelled { color: var(--ink-3); }
.tstate .live::before { width: 7px; height: 7px; }
.livebar:empty { display: none; }
.livebar { position: sticky; top: calc(56px + var(--safe-t)); z-index: 4; display: flex; align-items: center; gap: 10px; margin: -12px -16px 12px; padding: 9px 16px;
  background: color-mix(in srgb, var(--ground) 94%, transparent); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 14px; }
.livebar .lb-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.livebar .lb-time { flex: none; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.askcard { border: 1.5px solid var(--attn); background: var(--attn-soft); }
.askcard .ask-head { color: var(--attn); }
.askcard .ask-text { font-size: 15.5px; margin: 4px 0 6px; }
.thead { padding: 12px 14px; }
.thead .row { align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.thead .meta { margin: 0; }
.thead .tile-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.thead .tile-flags + .sub { margin-top: 6px; }
.tcomposer-space { height: calc(var(--composer-h, 96px) + 8px); }
.tcomposer { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 9; background: color-mix(in srgb, var(--ground) 96%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 12px 8px; }
.tcomposer > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.tcomposer .composer { position: static; box-shadow: none; margin-top: 0; }
.tcomposer .typing { padding: 2px 4px 6px; }
.tcomposer.attn .composer { border-color: var(--attn); box-shadow: 0 0 0 3px var(--attn-soft); }
.rescard { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--raised); display: flex; flex-direction: column; gap: 4px; }
.rescard.st-needs_approval, .rescard.st-needs_input { border-color: var(--attn-line); }
.rescard.st-failed { border-color: var(--bad-line); }
.rescard a { color: var(--accent); }
/* section heads inside cards: icon · name · count */
.res-h { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink); }
.res-h .n { color: var(--ink-3); font-weight: 500; }
.res-h .ico { color: var(--ink-2); }
.card.result { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.card.result .res-h .ico { color: var(--ok); }
.card.result.st-failed { border-color: var(--bad-line); } .card.result.st-failed .res-h .ico { color: var(--bad); }
.card.result.st-running, .card.result.st-queued { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); } .card.result.st-running .res-h .ico { color: var(--accent); }
.res-files { margin-top: 6px; }
.shotstrip { display: flex; gap: 8px; overflow-x: auto; margin: 10px -14px 0; padding: 0 14px 2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shotstrip::-webkit-scrollbar { display: none; }
.shotstrip a { flex: none; scroll-snap-align: start; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--sunk); }
.shotstrip img { display: block; height: 120px; width: 150px; object-fit: cover; object-position: top; }
.restext { font-size: 15px; line-height: 1.6; margin-top: 12px; }
.restext.clamped { max-height: 11.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.more-btn { margin-top: 4px; padding-left: 0; }
.dfile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.dfile:first-of-type { border-top: 0; }
.dfile .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dfile .btn.sm { width: 44px; min-height: 44px; padding: 0; }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; min-height: 28px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: ''; margin: -4px 4px 0 auto; width: 8px; height: 8px; border-right: 1.8px solid var(--ink-3); border-bottom: 1.8px solid var(--ink-3); transform: rotate(45deg); transition: transform .2s var(--ease); flex: none; }
details.card[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.tl.compact .chat-shots { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tl.compact .chat-shots img { height: 96px; }
.steps-card .steps { margin-top: 8px; }
.tl-card .tl { margin-top: 10px; }
.tl-card .link { display: inline-flex; align-items: center; gap: 4px; }
.more-card .instr { max-height: 260px; overflow: auto; background: var(--sunk); border-radius: 8px; padding: 10px; }
.more-card .logbox { max-height: 320px; }
.now-step { margin-top: 6px; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now-step .ico { color: var(--accent); }
/* chat page: header chips and the task strip */
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.chat-head .sub { display: inline-flex; align-items: center; gap: 4px; }
#s-files { margin-left: auto; }
.fchip { position: relative; }
.fchip > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.fchip > summary::-webkit-details-marker { display: none; }
.fchip .fpop { position: absolute; right: 0; top: 42px; z-index: 7; width: min(92vw, 420px); box-shadow: var(--float); max-height: 60vh; overflow: auto; }
.taskstrip { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 12px; font-size: 13.5px; min-height: 44px; }
.taskstrip .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.taskstrip .link-t { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 2px; flex: none; }

/* live screen */
.screen-wrap { margin: 0 -16px; background: #000; min-height: 200px; display: grid; place-items: center; }
.screen-wrap img { width: 100%; height: auto; display: block; }
.screen-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }

/* Claude limits strip */
.ubar { display: flex; gap: 12px; justify-content: center; align-items: center; white-space: nowrap; padding: 4px 16px 6px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.ubar:empty { display: none; }
.ubar .u { display: inline-flex; align-items: center; gap: 6px; }
.ubar .u { cursor: pointer; }
.ubar .ut { width: 40px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ubar .ut i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.ubar .ut i.mid { background: var(--warn); } .ubar .ut i.low { background: var(--bad); }
.ubar .un { font-variant-numeric: tabular-nums; min-width: 28px; }

.login { text-align: center; padding: calc(60px + var(--safe-t)) 8px 60px; } .login h1 { margin: 12px 0 8px; } .login p { color: var(--ink-2); max-width: 40ch; margin: 0 auto; }

@media (min-width: 760px) {
  main { padding-top: 20px; }
  .sheet { border-radius: 18px; margin-bottom: 24px; }
  .sheet-wrap { align-items: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
[hidden] { display: none !important; }

/* ---------- pass 2: layout fixes ---------- */
details.card > summary > .row { flex: 1; min-width: 0; }
/* the "new task" button never covers the last row */
body.has-fab main { padding-bottom: calc(84px + var(--safe-b)); }
/* a conversation gets the full height: no tab bar under the composer */
body.in-chat { --nav-h: 0px; }
body.in-chat nav.bottom { display: none; }
body.in-chat .tcomposer { padding-bottom: calc(8px + var(--safe-b)); }
.composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .btn.icon:not(.primary):not(.rec) { border-color: transparent; background: transparent; }
/* markdown bits in answers and results */
.li { display: block; position: relative; padding-left: 18px; margin: 2px 0; }
.li::before { content: '•'; position: absolute; left: 4px; color: var(--ink-3); }
.li.num::before { content: attr(data-n); left: 0; font-variant-numeric: tabular-nums; }
.pre .file-chip, .restext .file-chip { margin: 2px 0; vertical-align: middle; }
.md-p { margin: 0 0 10px; }
.md-p:last-child { margin-bottom: 0; }
.md-h { display: block; font-weight: 700; color: var(--ink); line-height: 1.3; margin: 14px 0 6px; text-wrap: balance; }
.md-h:first-child { margin-top: 0; }
.md-h1 { font-size: 1.18em; letter-spacing: -.01em; }
.md-h2 { font-size: 1.08em; }
.md-h3 { font-size: 1em; }
.md-h4 { font-size: .92em; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.md-hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.md-q { margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-s) var(--r-s) 0; color: var(--ink-2); }
.md-q > :last-child { margin-bottom: 0; }
.md-table { margin: 8px 0 12px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--surface); white-space: normal; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.md-table th, .md-table td { padding: 7px 10px; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: normal; min-width: 4.5em; max-width: 16em; }
.md-table th { background: var(--sunk); font-weight: 650; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.md-table td { border-top: 1px solid var(--line); }
.md-table tbody tr:nth-child(even) td { background: var(--raised); }
.md-table .r { text-align: right; white-space: nowrap; }
.md-table td:first-child { font-weight: 600; color: var(--ink); }
.md-box { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-right: 7px; border: 1.5px solid var(--line-2); border-radius: 4px; vertical-align: -2px; }
.md-box.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.md-box .ico { width: 11px; height: 11px; }
.li + .md-p, .stepline + .md-p, .li + .md-table, .stepline + .md-h, .li + .md-h { margin-top: 10px; }
.li.task { padding-left: 0; }
.li.task::before { content: none; }
.ctx.md { white-space: pre-wrap; }

/* ---------- pass 3: polish ---------- */
main { min-width: 0; overflow-x: clip; }
.steps-ol li, .card a, .card code, .hint, .sub { overflow-wrap: anywhere; }
.livebar { background: var(--ground); }
.tcomposer { background: var(--ground); }
details.card > summary { min-height: 44px; }
.tl-card { padding: 14px; }
.tl.compact .chat-shots { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; margin-top: 4px; }
.tl.compact .chat-shots img { height: 64px; }
.tl .toolwrap .chat-shots { margin: 4px 0 2px 42px; }
.stepline { display: flex; gap: 8px; align-items: baseline; color: var(--ink-2); font-size: 13.5px; margin: 2px 0; }
.stepline::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); }
.cl-head { padding-top: 0; }
.btns .btn, .sheet-btns .btn { white-space: nowrap; }
.more-btn { padding-left: 0; margin-left: 0; }

/* ---------- UX laws ---------- */
/* Fitts: every tappable control ≥ 44px */
.seg button { height: 44px; }
.tpls button { height: 40px; }
/* Von Restorff: the one block that needs you stands out from everything else on Today */
.needs .list { border-color: var(--attn-line); }
.needs h2 { color: var(--attn); }
/* Chunking: day groups in long lists */
h2.dayh { margin-top: 20px; }
h2.dayh::first-letter { text-transform: uppercase; }
/* Peak-End: a finished result arrives with a small, calm moment */
.card.result.st-done .res-h .ico { animation: pop .45s var(--ease) both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
/* Doherty: every tap answers instantly */
.row-item.tap:active, .card.tap:active, .crow-link:active { background: var(--sunk); transition: none; }
.btn:active { transition: none; }
/* Aesthetic-usability: calmer section rhythm (proximity: tight within, airy between) */
main > h2:first-child { margin-top: 12px; }
.list + h2, .card + h2, .board + h2 { margin-top: 26px; }

/* learned rules (Atmintis) */
.rulecard .title { font-weight: 600; }
.rulecard.warn { border-color: var(--attn-line); background: var(--attn-soft); }
.rule-src { margin-top: 8px; }
.rule-src summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.rule-q { margin-top: 6px; font-size: 13px; line-height: 1.45; padding-left: 10px; border-left: 2px solid var(--line-2); }
.rule-q.against { border-left-color: var(--bad); }
/* "maybe left unanswered" suggestions: one short line, a small × to dismiss */
.fu-t { font-size: 14px; color: var(--ink-2); }
.fu-row { min-height: 44px; padding-top: 8px; padding-bottom: 8px; }
.fu-x { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; flex: none; border: 0; border-radius: 8px; background: none; color: var(--ink-3); cursor: pointer; }
.fu-x:active { background: var(--sunk); }
.fu-card { padding-top: 10px; padding-bottom: 10px; }
.fu-card .brief { margin-top: 6px; }
.fu-s { font-size: 13px; color: var(--ink-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fu-row .fu-t, .fu-card .fu-t { color: var(--ink); font-weight: 600; }

/* 2026-10-27 UX audit: opened inbox item, your note on a decision, next decision, reject reasons, what went out, collapsible how-to */
.inbox-card { scroll-margin-top: calc(70px + var(--safe-t)); }
.inbox-card.focus { border-color: var(--attn-line); box-shadow: 0 0 0 3px var(--attn-soft); }
.mynote { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); background: var(--sunk); border-radius: var(--r-s); padding: 8px 10px; white-space: pre-wrap; }
.nextbtn { margin-top: 14px; justify-content: center; }
.chips.reasons { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chips.reasons .chip { padding: 0 12px; height: 36px; border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font: inherit; font-size: 13.5px; }
.chips.reasons .chip.on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.res-sent { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 2px; font-size: 13.5px; font-weight: 600; color: var(--ok); }
.res-sent .ico { flex: none; margin-top: 2px; }
details.howto { margin: 6px 0 4px; }
details.howto > summary { cursor: pointer; font-size: 13.5px; color: var(--ink-2); font-weight: 600; padding: 8px 2px; list-style: none; }
details.howto > summary::-webkit-details-marker { display: none; }
details.howto > summary::after { content: ' ›'; }
details.howto[open] > summary::after { content: ' ⌄'; }

/* deadlines and promises (Šiandien → Terminai) */
.cm-card .cm-due { color: var(--ink); }
.cm-card.attn { border-color: var(--attn-line); }
.cm-card.bad { border-color: var(--bad-line); }
.cm-quote { margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-2); font-style: italic; overflow-wrap: anywhere; }
.cm-quote .sub { font-style: normal; }
.cm-card .btns.sm { margin-top: 8px; }
.tstate.st-planned { color: var(--info); background: var(--info-soft); } .tstate.st-missed { color: var(--bad); background: var(--bad-soft); }

/* advisor suggestions (Šiandien → Siūlymai) */
.sg-card.attn { border-color: var(--attn-line); }
.sg-why { margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--ink); }
.sg-plan { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; gap: 4px; align-items: center; }
.sg-ev { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.sg-ev summary { cursor: pointer; color: var(--accent); }
.sg-ev ul { margin: 6px 0 0; padding-left: 18px; }
.sg-ev li { margin: 3px 0; overflow-wrap: anywhere; }

/* meetings */
.transcript { margin-top: 10px; font-size: 14px; line-height: 1.5; max-height: 60vh; overflow: auto; }
.transcript p { margin: 0 0 6px; overflow-wrap: anywhere; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 4px 0; }

/* ---------- Web kūrimas: full-screen site review (app.js webReview, public/web-review.js in the frame) ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.web-card .web-open { width: 100%; margin-top: 14px; min-height: 52px; }
body.in-web { overflow: hidden; }
body.in-web nav.bottom, body.in-web .fab { display: none; }
.wr { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto auto; background: var(--ground); z-index: 30; }
.wr-top { display: flex; align-items: center; gap: 4px; height: calc(52px + var(--safe-t)); padding: var(--safe-t) 6px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.wr-page { position: relative; flex: 1; min-width: 0; }
.wr-page select { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--ground); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; appearance: auto; }
.wr-stage { position: relative; min-height: 0; background: #fff; }
.wr-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.wr-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px;
  background: #ff5a1f; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; animation: wrIn .3s ease-out; }
@keyframes wrIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.wr-run { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.wr-run.attn { background: var(--attn-soft); } .wr-run.ok { background: var(--ok-soft); }
.wr-bar { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; padding: 8px 10px calc(8px + var(--safe-b)); background: var(--surface); border-top: 1px solid var(--line); }
.wr-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--ground); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: transform .15s, background-color .2s; }
.wr-btn:active { transform: scale(.96); }
.wr-btn:disabled { opacity: .45; cursor: default; }
.wr-btn b { position: absolute; top: 6px; right: 10px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #ff5a1f; color: #fff; font-size: 12px; line-height: 20px; }
.wr-mark { background: var(--ink); border-color: var(--ink); color: var(--ground); font-size: 13.5px; }
.wr-mark.on { background: #ff5a1f; border-color: #ff5a1f; color: #fff; }
.wr-send:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.wr-sheet .sheet h3 { margin-bottom: 10px; }
.wr-sheet textarea.i { width: 100%; min-height: 96px; }
.wr-where { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px; background: var(--sunk); font-size: 13.5px; line-height: 1.4; }
.wr-where b { display: block; } .wr-where span { display: block; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.wr-list { display: grid; gap: 6px; margin-bottom: 4px; }
.wr-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.wr-item .grow { display: grid; gap: 3px; min-width: 0; }
.wr-num { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--ground); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.wr-note { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 760px) { .wr-stage { background: var(--sunk); } .wr-stage iframe { left: 50%; width: 430px; transform: translateX(-50%); box-shadow: 0 0 0 1px var(--line-2); } }

.wr-spot { display: block; width: 100%; max-height: 300px; object-fit: contain; object-position: center; margin-bottom: 10px; border-radius: 10px; background: var(--sunk); }
.wr-spot--wait { display: flex; align-items: center; gap: 8px; padding: 12px; font-size: 13.5px; color: var(--ink-2); max-height: none; }
.wr-thumb { flex: none; width: 54px; height: 76px; object-fit: cover; object-position: center; border-radius: 8px; background: var(--sunk); }

/* ---------- Šiandien (app.js views['/']): filters on top, one short list under them ---------- */
.hhead { display: flex; flex-direction: column; gap: 1px; margin: 2px 2px 12px; }
.hh-d { font-size: 20px; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; }
.hh-d::first-letter { text-transform: uppercase; }
.hh-s { font-size: 13px; color: var(--ink-3); }
.hh-new { color: var(--info); font-weight: 600; }
.htiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 10px; }
.ht { display: flex; flex-direction: column; gap: 1px; min-height: 78px; padding: 9px 10px 8px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); transition: background .15s var(--ease), border-color .15s var(--ease); }
.ht:active { background: var(--sunk); }
.ht-l { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-l i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ink-3); }
.ht-tau .ht-l i { background: var(--attn); } .ht-msg .ht-l i { background: var(--accent); } .ht-term .ht-l i { background: var(--dev); }
.ht-n { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ht.zero .ht-n { color: var(--ink-3); font-weight: 500; }
.ht-s { font-size: 11.5px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 15px; }
.ht-s.new { color: var(--info); font-weight: 600; } .ht-s.attn { color: var(--attn); font-weight: 600; } .ht-s.bad { color: var(--bad); font-weight: 600; }
.ht.on { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.ht.on .ht-l, .ht.on .ht-s, .ht.on.zero .ht-n { color: color-mix(in srgb, var(--ground) 78%, transparent); }
.ht.on .ht-s.new, .ht.on .ht-s.attn, .ht.on .ht-s.bad { color: var(--ground); }
@media (min-width: 420px) { .ht { padding: 10px 12px 9px; } .ht-l { font-size: 12.5px; } }

.newdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--info); margin: 0 7px 1px 0; vertical-align: middle; }
.ri-ico.msg { background: var(--accent-soft); color: var(--accent); }
.attn-t { color: var(--attn); }
h2.dayh.bad-t, h2.dayh.attn-t { font-weight: 650; }
.duechip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--dev-soft); color: var(--dev); align-self: flex-start; }

/* deadline rows: a calendar leaf, opened in place for the quote and the actions */
.dblock { width: 44px; flex: none; align-self: flex-start; display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.dblock small { width: 100%; text-align: center; font-size: 9px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 2px 0 1px; background: var(--sunk); color: var(--ink-2); }
.dblock b { font-size: 16px; font-weight: 650; line-height: 1.3; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.dblock.attn { border-color: var(--attn-line); } .dblock.attn small { background: var(--attn); color: var(--on-attn); } .dblock.attn b { color: var(--attn); }
.dblock.bad { border-color: var(--bad-line); } .dblock.bad small { background: var(--bad); color: var(--on-bad); } .dblock.bad b { color: var(--bad); }
.xrow { border-top: 1px solid var(--line); }
.xrow:first-child { border-top: 0; }
.xrow > summary { list-style: none; }
.xrow > summary::-webkit-details-marker { display: none; }
.xrow .chev, .hwork .hlive .chev { transition: rotate .2s var(--ease); }
.xrow[open] > summary .chev, .hwork[open] .hlive .chev { rotate: 90deg; }
.xbody { padding: 0 14px 14px 70px; }
.xbody .cm-quote { margin-top: 0; }
.xbody .btns { margin-top: 10px; }

/* what is moving right now: one line, open it for the cards */
.hwork { margin: 0 0 4px; }
.hwork + h2, .hwork + .needs h2, .htiles + .needs h2, .htiles + h2 { margin-top: 18px; }
.hlive { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 12px 8px 14px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); border-radius: var(--r); background: var(--surface); font-size: 14px; }
.hlive::-webkit-details-marker { display: none; }
.hlive:active { background: var(--sunk); }
.hlive .live { font-size: 0; gap: 0; }
.ell { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-q { flex: none; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--sunk); border-radius: 6px; padding: 2px 7px; }
.hw-body { padding-top: 8px; }
.hw-body h2 { margin-top: 14px; }

.seeall { display: flex; align-items: center; gap: 6px; padding: 10px 2px; font-size: 14px; font-weight: 600; color: var(--accent); }
.seeall .ico:last-child { margin-left: auto; }
.sg-teaser { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font-weight: 500; }
.sg-teaser > .ico:first-child { color: var(--accent); }
.sg-teaser b { color: var(--info); }
.sg-teaser:active { background: var(--sunk); }
