/* Ekip Takip Paneli: palette from the TwinUp logo (lime #a4cc35 / #87b33a, black / white). Poppins (OFL, the CityTwin
   app font, self-hosted in fonts/) and Material Icons paths inline. No external assets except GitHub profile pictures. */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Poppins-Regular.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/Poppins-Medium.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/Poppins-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/Poppins-Bold.woff2") format("woff2"); }
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 8px; --r2: 12px; --r3: 16px;
  --font: Poppins, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", SFMono-Regular, Consolas, monospace;
  --sidebar: 248px; --sidebar-mini: 72px; --top: 64px;

  --bg: #f5f7f2; --surface: #ffffff; --surface-2: #f0f3ec; --surface-3: #e7ebe1; --border: #e1e6d9;
  --text: #13160f; --text-2: #3f4637; --muted: #646c5a;
  --brand: #88b43a; --brand-lime: #a4cc35; --brand-strong: #4a7012; --brand-soft: #eef6dc;
  --btn-bg: #4a7012; --btn-bg-hover: #3b5a0d; --btn-text: #ffffff;
  --focus: #6c9a1f;
  --c-push: #2f64d0; --c-pr: #7343c9; --c-ok: #2f7d1a; --c-bad: #c2362f; --c-upd: #0d7f86; --c-warn: #a96a06; --c-neutral: #5d6655;
  --shadow-1: 0 1px 2px rgba(19, 22, 15, .05), 0 1px 3px rgba(19, 22, 15, .07);
  --shadow-2: 0 8px 24px rgba(19, 22, 15, .10), 0 2px 6px rgba(19, 22, 15, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d100a; --surface: #151911; --surface-2: #1b2016; --surface-3: #232a1c; --border: #2a3123;
    --text: #eef1e8; --text-2: #c7cdbc; --muted: #98a08b;
    --brand-strong: #b4d957; --brand-soft: #222c14;
    --btn-bg: #a4cc35; --btn-bg-hover: #b7dc4f; --btn-text: #13160f; --focus: #b4d957;
    --c-push: #7ea6ff; --c-pr: #b394ff; --c-ok: #8fd46a; --c-bad: #ff8a80; --c-upd: #4fd1d9; --c-warn: #f2c063; --c-neutral: #aab29f;
    --shadow-1: none; --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d100a; --surface: #151911; --surface-2: #1b2016; --surface-3: #232a1c; --border: #2a3123;
  --text: #eef1e8; --text-2: #c7cdbc; --muted: #98a08b;
  --brand-strong: #b4d957; --brand-soft: #222c14;
  --btn-bg: #a4cc35; --btn-bg-hover: #b7dc4f; --btn-text: #13160f; --focus: #b4d957;
  --c-push: #7ea6ff; --c-pr: #b394ff; --c-ok: #8fd46a; --c-bad: #ff8a80; --c-upd: #4fd1d9; --c-warn: #f2c063; --c-neutral: #aab29f;
  --shadow-1: none; --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
.num, time, .kpi b, .pstats b, .mc-stats b, .mono, .up-time, .count, .n { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
code { font: 12.5px var(--mono); }
h1 { font-size: 22px; line-height: 1.3; margin: 0; letter-spacing: -.01em; font-weight: 600; }
h2 { font-size: 15px; margin: 0 0 var(--s3); letter-spacing: 0; font-weight: 600; display: flex; align-items: center; }
h3 { font-size: 14px; margin: var(--s5) 0 var(--s3); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; fill: currentColor; }
h2 svg.i { width: 18px; height: 18px; color: var(--brand-strong); margin-right: 8px; vertical-align: -3px; }

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s; }
body.mini .shell { grid-template-columns: var(--sidebar-mini) minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s3);
  background: var(--surface); border-right: 1px solid var(--border); overflow: hidden auto; z-index: 30; }
.logo { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) var(--s2) var(--s4); min-height: 48px; }
.logo img { height: 26px; width: auto; display: block; }
.logo .mark { display: none; width: 30px; height: 30px; }
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r1); color: var(--text-2);
  font-weight: 500; white-space: nowrap; min-height: 42px; position: relative; }
.side nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side nav a.on { background: var(--brand-soft); color: var(--text); font-weight: 600; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side nav a.on svg { color: var(--brand-strong); }
.side .count { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--c-warn); color: var(--surface); border-radius: 999px; padding: 0 7px; line-height: 20px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-btn { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 10px var(--s3); border: 0; background: none; color: var(--muted);
  border-radius: var(--r1); font: inherit; cursor: pointer; min-height: 42px; white-space: nowrap; }
.side-btn:hover { background: var(--surface-2); color: var(--text); }
body.mini .side nav a span, body.mini .side-btn span, body.mini .side .count { display: none; }
body.mini .side nav a, body.mini .side-btn { justify-content: center; padding: 10px 0; }
body.mini .logo { justify-content: center; padding-left: 0; padding-right: 0; }
body.mini .logo img.full { display: none !important; }
body.mini .logo .mark { display: block; }
body.mini .collapse svg { transform: rotate(180deg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5);
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .grow { flex: 1; }
.icon-btn.hamb { display: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r1); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.search { display: flex; align-items: center; gap: var(--s2); }
.search .field { position: relative; }
.search .field svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type=search] { width: 260px; padding-left: 34px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; border-radius: 999px; }
.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); box-shadow: var(--shadow-2); padding: var(--s2); z-index: 40; }
.menu-pop .who-line { padding: var(--s2) var(--s3) var(--s3); border-bottom: 1px solid var(--border); margin-bottom: var(--s2); }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: var(--s2); width: 100%; padding: 10px var(--s3); border-radius: var(--r1); color: var(--text);
  background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--surface-2); text-decoration: none; }
.menu-pop form { margin: 0; }
.content { padding: var(--s5); max-width: 1320px; width: 100%; margin: 0 auto; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head p { margin: var(--s1) 0 0; color: var(--muted); }
footer { color: var(--muted); font-size: 12.5px; text-align: center; padding: var(--s5) var(--s4) var(--s6); }
.scrim { display: none; }

.banner { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: var(--s4) var(--s5) 0; padding: var(--s3) var(--s4); border-radius: var(--r2);
  background: color-mix(in srgb, var(--c-warn) 14%, var(--surface)); color: var(--text); border: 1px solid color-mix(in srgb, var(--c-warn) 35%, transparent); }
.banner svg { color: var(--c-warn); }
.banner a { font-weight: 600; }

/* ------------------------------------------------------------------ controls */
input, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r1); padding: 0 var(--s3); height: 40px; min-width: 0; }
input:hover, select:hover { border-color: color-mix(in srgb, var(--muted) 60%, var(--border)); }
input:focus, select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 40px; padding: 0 var(--s4); border-radius: var(--r1); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: 600 14px var(--font); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.btn.primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn.danger { color: var(--c-bad); }
.btn.danger:hover { border-color: var(--c-bad); }
.btn.sm { height: 34px; padding: 0 var(--s3); font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.form-grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.stack { display: flex; flex-direction: column; gap: var(--s4); max-width: 420px; }
.alert { padding: var(--s3) var(--s4); border-radius: var(--r1); margin-bottom: var(--s4); display: flex; gap: var(--s2); align-items: flex-start; }
.alert.err { background: color-mix(in srgb, var(--c-bad) 12%, var(--surface)); color: var(--c-bad); }
.alert.ok { background: color-mix(in srgb, var(--c-ok) 12%, var(--surface)); color: var(--text); }
.secret { font: 600 15px var(--mono); background: var(--surface); border: 1px dashed var(--border); padding: 2px 8px; border-radius: 6px; user-select: all; }

/* ------------------------------------------------------------------ cards & badges */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r3); padding: var(--s5); box-shadow: var(--shadow-1); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.card-head h2 { margin: 0; }
.card-head a { font-size: 13px; font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; line-height: 20px;
  color: var(--c, var(--c-neutral)); background: color-mix(in srgb, var(--c, var(--c-neutral)) 13%, transparent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.k-push { --c: var(--c-push); } .k-pr { --c: var(--c-pr); } .k-ok { --c: var(--c-ok); } .k-bad { --c: var(--c-bad); }
.k-upd { --c: var(--c-upd); } .k-warn { --c: var(--c-warn); } .k-neutral { --c: var(--c-neutral); }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; padding: 1px 8px; border-radius: 6px; background: var(--surface-2);
  color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
a.chip:hover { border-color: var(--brand); text-decoration: none; color: var(--text); }
.chip.mono { font-family: var(--mono); font-size: 12px; }
.chip svg.i { width: 13px; height: 13px; }
.av { --h: 90; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; flex: none; font-weight: 700; font-size: 13px;
  letter-spacing: .02em; color: hsl(var(--h) 55% 28%); background: hsl(var(--h) 60% 88%); }
:root[data-theme="dark"] .av { color: hsl(var(--h) 70% 82%); background: hsl(var(--h) 35% 24%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av { color: hsl(var(--h) 70% 82%); background: hsl(var(--h) 35% 24%); } }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.av.sm { width: 28px; height: 28px; font-size: 11px; }
time { white-space: nowrap; }

/* ------------------------------------------------------------------ overview */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.kpi { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); }
.kpi .kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13.5px; font-weight: 500; }
.kpi .kpi-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.kpi b { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.kpi .kpi-sub { font-size: 12.5px; color: var(--muted); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s4); margin-bottom: var(--s4); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid line { stroke: var(--border); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font: 11px var(--font); }
.chart rect.bar:hover { opacity: .8; }
.s-push { fill: var(--c-push); } .s-pr { fill: var(--c-pr); } .s-upd { fill: var(--c-upd); } .s-warn { fill: var(--c-warn); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s4); font-size: 13px; color: var(--text-2); margin-top: var(--s3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.toplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.toplist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px var(--s3); align-items: center; }
.toplist .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.toplist .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-lime)); }
.toplist .n { font-weight: 600; font-size: 13px; color: var(--text-2); }
.attn { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.attn li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3); border-radius: var(--r2); background: var(--surface-2); }
.attn li .ic { color: var(--c); margin-top: 2px; }
.attn li div { min-width: 0; }
.attn li strong { display: block; font-size: 14px; }
.attn li span { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ feed */
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-end; padding: var(--s4); margin-bottom: var(--s4); }
.filters label { flex: 1 1 160px; }
.filters .acts { display: flex; gap: var(--s2); }
.feed { display: flex; flex-direction: column; gap: var(--s3); }
.ev { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); padding: var(--s4) var(--s5); }
.ev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s2); }
.ev-head .name { font-weight: 600; color: var(--text); }
.ev-head .time { margin-left: auto; color: var(--muted); font-size: 13px; }
.ev-title { margin-top: 6px; font-weight: 500; overflow-wrap: anywhere; }
.ev-title code { font-size: 13px; }
.ev-extra { margin-top: 4px; font-size: 13.5px; color: var(--text-2); }
.ev-more { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s2); }
.ev-src { display: flex; gap: 6px; margin-top: var(--s2); }
.src { font-size: 11.5px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; }
details.x { border: 1px solid var(--border); border-radius: var(--r1); background: var(--surface-2); }
details.x > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s2); padding: 7px var(--s3); font-size: 13.5px; color: var(--text-2); font-weight: 500; }
details.x > summary::-webkit-details-marker { display: none; }
details.x > summary .chev { margin-left: auto; transition: transform .15s; color: var(--muted); }
details.x[open] > summary .chev { transform: rotate(180deg); }
details.x[open] > summary { border-bottom: 1px solid var(--border); }
.cl { padding: var(--s3); display: grid; gap: var(--s2); }
.cl .row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: var(--s3); }
.cl .lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: var(--brand-strong); padding-top: 2px; }
.cl .txt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
pre.raw { margin: 0; padding: var(--s3); white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 var(--mono); max-height: 420px; overflow: auto; }
ul.files, ul.commits { list-style: none; margin: 0; padding: var(--s2) var(--s3); max-height: 360px; overflow: auto; display: flex; flex-direction: column; gap: 3px; }
ul.files li, ul.commits li { display: flex; gap: var(--s2); align-items: baseline; overflow-wrap: anywhere; font-size: 13.5px; }
.fi { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 5px; font: 700 12px var(--mono); flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); transform: translateY(3px); }
.fsum { display: inline-flex; gap: var(--s2); }
.fsum b { font-weight: 600; color: var(--c); }

/* ------------------------------------------------------------------ people */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
a.pcard { display: flex; flex-direction: column; gap: var(--s3); color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
a.pcard:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.pcard-top { display: flex; gap: var(--s3); align-items: center; min-width: 0; }
.pcard-top div { min-width: 0; }
.pcard-top strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.pstats div { background: var(--surface-2); border-radius: var(--r1); padding: var(--s2) var(--s3); }
.pstats b { display: block; font-size: 18px; }
.pstats span { font-size: 12px; color: var(--muted); }
.unsent-line { font-size: 13.5px; display: flex; gap: var(--s2); align-items: flex-start; }
.unsent-line svg { color: var(--c); margin-top: 2px; }
.profile { display: flex; gap: var(--s4); align-items: center; margin-bottom: var(--s5); flex-wrap: wrap; }
.profile h1 { font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s4); align-items: start; }
.ws-repo { border-top: 1px solid var(--border); padding: var(--s3) 0; display: flex; flex-direction: column; gap: var(--s2); }
.ws-repo:first-of-type { border-top: 0; padding-top: 0; }
.ws-repo .line { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* ------------------------------------------------------------------ modules */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
a.mcard { display: flex; flex-direction: column; gap: var(--s3); color: var(--text); }
a.mcard:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-2); }
.mcard .mname { display: flex; align-items: center; gap: var(--s3); font-size: 16px; font-weight: 700; }
.mcard .mic { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); }
.people-row { display: flex; }
.people-row .av { margin-left: -8px; border: 2px solid var(--surface); }
.people-row .av:first-child { margin-left: 0; }

/* ------------------------------------------------------------------ tables */
.tablewrap { overflow: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: var(--r2); background: var(--surface); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
th button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
th button.sort:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }
th button.sort::after { content: "↕"; opacity: .4; font-size: 11px; }
th[aria-sort="ascending"] button.sort::after { content: "↑"; opacity: 1; }
th[aria-sort="descending"] button.sort::after { content: "↓"; opacity: 1; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
tr.stale td { background: color-mix(in srgb, var(--c-warn) 9%, transparent); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-who { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.acts-cell { display: flex; gap: var(--s2); justify-content: flex-end; }
.acts-cell form { margin: 0; }

/* ------------------------------------------------------------------ tabs, empty, skeleton, toast */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r2); margin-bottom: var(--s4); flex-wrap: wrap; }
.tab { padding: 6px var(--s3); border-radius: var(--r1); color: var(--text-2); font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); font-weight: 600; }
.tab .n { font-size: 12px; color: var(--muted); }
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s2); text-align: center; padding: var(--s7) var(--s5); color: var(--muted);
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--r3); }
.empty .eic { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-strong); margin-bottom: var(--s2); }
.empty .eic svg { width: 24px; height: 24px; }
.empty strong { color: var(--text); font-size: 15px; }
.empty.compact { padding: var(--s5); border: 0; background: var(--surface-2); }
.more { display: flex; justify-content: center; margin: var(--s5) 0; }
.skel { display: none; }
body.loading .content > :not(.skel) { display: none; }
body.loading .skel { display: flex; flex-direction: column; gap: var(--s4); }
.skel .b { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sh 1.2s infinite linear; border-radius: var(--r2); }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.toasts { position: fixed; right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); z-index: 60; }
.toast { display: flex; align-items: center; gap: var(--s2); background: var(--text); color: var(--surface); padding: var(--s3) var(--s4); border-radius: var(--r2);
  box-shadow: var(--shadow-2); font-weight: 500; font-size: 14px; animation: tin .2s ease-out; max-width: min(420px, calc(100vw - 32px)); }
.toast svg { color: var(--brand-lime); }
.toast.err svg { color: var(--c-bad); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------------------------ login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background: radial-gradient(1200px 600px at 10% 10%, #2d3a16, #0d100a 60%); color: #eef1e8; padding: var(--s7); display: flex; flex-direction: column; justify-content: space-between; }
.login-art img { height: 30px; width: auto; align-self: flex-start; }
.login-art h2 { font-size: 30px; line-height: 1.25; margin: 0 0 var(--s3); letter-spacing: -.02em; max-width: 420px; }
.login-art p { color: #c7cdbc; max-width: 420px; margin: 0; }
.login-art .glow { width: 90px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #87b33a, #a4cc35); margin-bottom: var(--s5); }
.login-form { display: flex; align-items: center; justify-content: center; padding: var(--s6) var(--s4); }
.login-form .card { width: 100%; max-width: 400px; padding: var(--s6); }
.login-form h1 { margin-bottom: var(--s2); }
.login-form .mobile-logo { display: none; margin-bottom: var(--s5); }
.login-form .mobile-logo img { height: 26px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-grid, .two { grid-template-columns: minmax(0, 1fr); }
  .search input[type=search] { width: 200px; }
}
@media (max-width: 900px) {
  .shell, body.mini .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-2); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 25; }
  body.mini .side nav a span, body.mini .side-btn span { display: inline; }
  body.mini .side nav a, body.mini .side-btn { justify-content: flex-start; padding: 10px var(--s3); }
  body.mini .logo img.full { display: block !important; }
  body.mini .logo .mark, .collapse { display: none !important; }
  .icon-btn.hamb { display: inline-flex; }
  .top { padding: 0 var(--s4); }
  .content { padding: var(--s4); }
  .banner { margin: var(--s3) var(--s4) 0; }
  .search .field { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-wrap { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .login-form .mobile-logo { display: block; }
}
@media (max-width: 640px) {
  .kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); }
  .kpi { padding: var(--s4); }
  .kpi b { font-size: 24px; }
  .card { padding: var(--s4); }
  .ev { padding: var(--s3) var(--s4); grid-template-columns: minmax(0, 1fr); }
  .ev > .av { display: none; }
  .ev-head .time { margin-left: 0; flex-basis: 100%; }
  .search select { max-width: 120px; }
  .top h1 { font-size: 16px; }
  .toasts { left: var(--s4); right: var(--s4); bottom: var(--s4); }
  .cl .row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  /* tables become card lists */
  .tablewrap { max-height: none; border: 0; background: transparent; overflow: visible; }
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); margin-bottom: var(--s3); padding: var(--s2) 0; }
  .people-table { display: none; }
  table.resp td { flex-wrap: wrap; border: 0; padding: 6px var(--s4); display: flex; justify-content: space-between; gap: var(--s3); text-align: right; }
  table.resp td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: left; flex: none; }
  table.resp td.first { text-align: left; font-size: 15px; }
  table.resp td.first::before { display: none; }
  table.resp .acts-cell { justify-content: flex-end; }
  tbody tr:hover td { background: transparent; }
  tr.stale { border-color: color-mix(in srgb, var(--c-warn) 50%, transparent) !important; }
}
@media (max-width: 400px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pgrid, .mgrid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ dashboard (2026-11 redesign) */
.av { position: relative; overflow: visible; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--surface); }
.av .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--muted);
  border: 2px solid var(--surface); }
.av.lg .dot { width: 16px; height: 16px; border-width: 3px; }
.av .dot.on { background: #34b233; box-shadow: 0 0 0 0 rgba(52, 178, 51, .5); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52, 178, 51, .45); } 70% { box-shadow: 0 0 0 7px rgba(52, 178, 51, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 178, 51, 0); } }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.dash-head p { margin: 0; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.live-tag svg.i { width: 10px; height: 10px; color: #34b233; animation: blink 2s infinite; }
.live-tag.stale svg.i { color: var(--c-warn); animation: none; }
@keyframes blink { 50% { opacity: .35; } }
a.kpi { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.kpi:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 45%, var(--border)); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.kpi.zero b { color: var(--muted); }
.kpis.n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.n4, .kpis.n5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpis.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis .kpi { padding: var(--s4) var(--s4) var(--s4) var(--s5); border-left: 3px solid var(--c); }
.kpi .kpi-top span:first-child { font-size: 13px; line-height: 1.3; }
.ov-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mini-filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: flex-end; margin-bottom: var(--s3); }
.mini-filters label { flex: 1 1 130px; font-size: 12px; }
.mini-filters select { height: 34px; font-size: 13px; }
.ups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ups li.up { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.ups li.up:first-child { border-top: 0; }
.up-ic { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent); }
.up-ic svg.i { width: 18px; height: 18px; }
.up-main { min-width: 0; }
.up-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--s2); }
.up-line .name { font-weight: 600; color: var(--text); }
.up-verb { color: var(--c); font-weight: 500; }
.up-sub { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-time { font-size: 12.5px; color: var(--muted); padding-top: 2px; }
.team { margin-bottom: var(--s4); }
.team-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
a.mc { display: flex; flex-direction: column; gap: var(--s3); color: var(--text); padding: var(--s4) var(--s5); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.mc:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.mc-top { display: flex; gap: var(--s3); align-items: center; min-width: 0; }
.mc-top .av { width: 44px; height: 44px; font-size: 15px; }
.mc-who { min-width: 0; display: flex; flex-direction: column; }
.mc-who strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-who .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-net { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.pill svg.i { width: 12px; height: 12px; }
.pill.on { color: #2a8f29; background: color-mix(in srgb, #34b233 12%, var(--surface)); border-color: color-mix(in srgb, #34b233 30%, transparent); }
.pill.app { color: var(--c-push); background: color-mix(in srgb, var(--c-push) 10%, var(--surface)); border-color: color-mix(in srgb, var(--c-push) 25%, transparent); }
:root[data-theme="dark"] .pill.on { color: #8fd46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.on { color: #8fd46a; } }
.mc-dl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s2) var(--s3); margin: 0; }
.mc-dl div { min-width: 0; }
.mc-dl dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.mc-dl dd { margin: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-stats { display: flex; gap: var(--s4); font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: var(--s3); }
.mc-stats b { color: var(--text); font-size: 15px; font-weight: 600; margin-right: 2px; }
.mc-unsent { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c); }
.mc-unsent svg.i { width: 16px; height: 16px; }
.mc-unsent.muted { color: var(--muted); }
.s-p0 { fill: #6c9a1f; background: #6c9a1f; } .s-p1 { fill: #2f64d0; background: #2f64d0; } .s-p2 { fill: #c2662f; background: #c2662f; }
.s-p3 { fill: #7343c9; background: #7343c9; } .s-p4 { fill: #0d7f86; background: #0d7f86; } .s-p5 { fill: #c2362f; background: #c2362f; }
.s-p6 { fill: #a96a06; background: #a96a06; } .s-p7 { fill: #5d6655; background: #5d6655; }
.legend i[class^="s-p"] { border-radius: 3px; }
.card-head h2 { display: flex; align-items: center; }
.ov-grid > section#attn { align-self: start; }
.two aside th, .two aside td { padding: 8px 10px; font-size: 13px; }
.two aside thead th { font-size: 11px; }
@media (max-width: 1380px) { .kpis.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .kpis.n5, .kpis.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-grid.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  .kpis.n4, .kpis.n5, .kpis.n6 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpis .kpi { padding: var(--s3) var(--s3) var(--s3) var(--s4); }
  .ups li.up { grid-template-columns: 30px minmax(0, 1fr); }
  .up-ic { width: 30px; height: 30px; }
  .up-time { grid-column: 2; padding-top: 0; }
  .team-grid { grid-template-columns: minmax(0, 1fr); }
  a.mc { padding: var(--s4); }
}

/* member page: anchor nav + sections */
.pnav { position: sticky; top: var(--top); z-index: 10; display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: thin;
  margin: var(--s4) 0; padding: var(--s2); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); }
.pnav a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 6px 10px; border-radius: var(--r1);
  color: var(--text-2); text-decoration: none; font-size: 13px; font-weight: 500; }
.pnav a:hover, .pnav a:focus-visible { background: var(--brand-soft); color: var(--brand-strong); }
.pnav .i { width: 16px; height: 16px; }
.psecs { display: flex; flex-direction: column; gap: var(--s4); }
.psec { scroll-margin-top: calc(var(--top) + 72px); }
.psec h3 { font-size: 14px; margin: var(--s4) 0 var(--s2); }
.psec .feed { display: flex; flex-direction: column; gap: var(--s3); }
.psec .pstats { margin-top: var(--s3); }
.sumdl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3) var(--s4); margin: 0; }
.sumdl div { min-width: 0; }
.sumdl dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.sumdl dd { margin: 0; overflow-wrap: anywhere; }
.sumdl .chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.share { display: inline-flex; flex-direction: column; gap: 4px; min-width: 160px; }
.share-t { font-size: 13px; }
.share-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.share-bar i { display: block; height: 100%; background: var(--c-push); border-radius: 3px; }
.ushare { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: var(--s3) 0; }
.umach { margin-top: var(--s3); padding: var(--s3); background: var(--surface-2); border-radius: var(--r1); }
.umach .line { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.ubars { display: block; width: 100%; height: 64px; margin-top: var(--s2); }
.ubars .bar.zero { fill: var(--surface-3); }
.ubars .axis-t { font-size: 10px; fill: var(--muted); }
tr.new td { background: color-mix(in srgb, var(--c-warn) 10%, transparent); }
.wsl { display: flex; flex-direction: column; gap: var(--s3); }
.wsl > .card { box-shadow: none; background: var(--surface-2); }
@media (max-width: 640px) { .pnav { margin: var(--s3) calc(-1 * var(--s1)); } .sumdl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 640px) { .psec .pstats b { font-size: 15px; } .psec .pstats div { padding: var(--s2); } }

/* robots: task form, live event stream, evidence gallery */
textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r1); padding: var(--s2) var(--s3); min-width: 0; resize: vertical; }
textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.rgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s3); }
.rgal a { display: flex; flex-direction: column; gap: 4px; color: var(--text-2); font-size: 12px; min-width: 0; }
.rgal a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rgal img, .rgal video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r1); border: 1px solid var(--border); background: var(--surface-2); }
.rgal a:hover img { border-color: var(--brand); }

/* ------------------------------------------------------------------ robot task: terminal-style live stream */
/* JetBrains Mono (OFL, fonts/OFL-JetBrainsMono.txt), variable weight, Latin + Latin Extended (Turkish) subsets */
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-style: normal; font-display: swap;
  src: url("fonts/JetBrainsMono-Latin.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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-style: normal; font-display: swap;
  src: url("fonts/JetBrainsMono-LatinExt.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.rt-main { min-width: 0; position: relative; }

/* terminal palette: dark in both themes */
.term {
  --t-bg: #0b0e09; --t-bar: #12160f; --t-meta: #0e120c; --t-edge: #20271c; --t-rule: #1a2017; --t-code: #11160e;
  --t-text: #dde3d3; --t-dim: #8a9480; --t-faint: #566050;
  --t-claude: #f2a77c; --t-codex: #82c4ff; --t-robot: #a7b199; --t-owner: #c9a8ff;
  --t-ok: #a3dd72; --t-warn: #f5c56b; --t-bad: #ff8278; --t-run: #b4dc4a; --t-info: #67d5de;
  --tmono: "JetBrains Mono", "Cascadia Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, monospace;
  position: relative; display: flex; flex-direction: column; height: calc(100vh - var(--top) - 2 * var(--s5)); min-height: 480px;
  background: var(--t-bg); color: var(--t-text); border: 1px solid var(--t-edge); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -28px rgba(10, 14, 8, .65), 0 2px 8px rgba(10, 14, 8, .18); color-scheme: dark; }

.term-bar { display: flex; align-items: center; gap: var(--s3); min-height: 46px; padding: 6px var(--s4); background: linear-gradient(180deg, #161c13, var(--t-bar));
  border-bottom: 1px solid var(--t-edge); font-size: 13px; }
.term-dots { display: inline-flex; gap: 7px; flex: none; }
/* window buttons like macOS: × normal view, – collapse the stream, ⤢ cover the whole window; glyphs show on hover */
.term-dots .td { position: relative; display: inline-grid; place-items: center; width: 12px; height: 12px; padding: 0; border: 0; border-radius: 50%;
  background: #3a4234; color: rgba(0, 0, 0, .62); font: 700 9px/1 var(--font); cursor: pointer; }
.term-dots .td::after { content: ""; position: absolute; inset: -6px; }          /* bigger touch target */
.term-dots .td span { opacity: 0; transition: opacity .12s; pointer-events: none; }
.term-dots:hover .td span, .term-dots .td:focus-visible span { opacity: 1; }
.term-dots .td:focus-visible { outline: 2px solid var(--t-run); outline-offset: 2px; }
.term-dots .td-close { background: #d8605a; } .term-dots .td-min { background: #d9ad45; } .term-dots .td-max { background: #6fb34a; }
.term-dots .td-max span { font-size: 10px; }

/* yellow: only the title bar stays */
.term.is-min { height: auto !important; min-height: 0; }
.term.is-min .term-meta, .term.is-min .term-body, .term.is-min .term-new { display: none; }
/* green: the terminal covers the browser window (or the screen with the Fullscreen API) */
.term.is-max { position: fixed; inset: 0; z-index: 200; height: auto !important; min-height: 0; border-radius: 0; border: 0; box-shadow: none; }
.term:fullscreen { height: 100%; border-radius: 0; border: 0; }
html.term-max-on, html.term-max-on body { overflow: hidden; }
html.term-max-on .rt-main { z-index: 200; }          /* sticky parent = own stacking context: lift it over side/top bars */
.term-robot { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--t-run); flex: none; white-space: nowrap; }
.term-robot svg.i { width: 17px; height: 17px; }
.term-sep { color: var(--t-faint); flex: none; }
.term-task { flex: 1; color: var(--t-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.rt-pill { --pc: var(--c-neutral); display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 2px 10px 2px 9px; border-radius: 999px;
  font: 600 12px/20px var(--font); color: var(--pc); background: color-mix(in srgb, var(--pc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent); white-space: nowrap; }
.rt-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.rt-pill.s-running { --pc: var(--c-ok); } .rt-pill.s-needs_owner { --pc: var(--c-warn); } .rt-pill.s-done { --pc: var(--c-ok); }
.rt-pill.s-failed { --pc: var(--c-bad); } .rt-pill.s-queued, .rt-pill.s-cancelled { --pc: var(--c-neutral); }
.term .rt-pill.s-running { --pc: var(--t-run); } .term .rt-pill.s-needs_owner { --pc: var(--t-warn); } .term .rt-pill.s-done { --pc: var(--t-ok); }
.term .rt-pill.s-failed { --pc: var(--t-bad); } .term .rt-pill.s-queued, .term .rt-pill.s-cancelled { --pc: var(--t-dim); }
.rt-pill.s-running i, .rt-pill.s-needs_owner i, .rt-pill.s-queued i { animation: rtPulse 1.6s ease-out infinite; }
@keyframes rtPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 6px transparent; } }

.term-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--s4); padding: 7px var(--s4); background: var(--t-meta);
  border-bottom: 1px solid var(--t-rule); font-size: 12.5px; color: var(--t-dim); }
.term-meta .grow { flex: 1; }
.term-stat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.term-stat svg.i { width: 15px; height: 15px; }
.term-stat b { font: 600 12.5px var(--tmono); color: var(--t-text); font-variant-numeric: tabular-nums; }
.term-stat .dim { font: 12.5px var(--tmono); color: var(--t-faint); }
.term-stat.warn { color: var(--t-warn); }
.term-stat.tight { gap: 0; }
.rt-chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.rt-chips::-webkit-scrollbar { display: none; }
.rt-chip, .term-btn { height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid #283022; background: transparent; color: var(--t-dim);
  font: 500 12px var(--font); cursor: pointer; white-space: nowrap; flex: none; transition: color .15s, background .15s, border-color .15s; }
.rt-chip:hover, .term-btn:hover { color: var(--t-text); border-color: #3a4532; }
.rt-chip.on { color: #d4ef8a; background: rgba(164, 204, 53, .14); border-color: rgba(164, 204, 53, .45); }
.term-btn { border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; }
.term-btn svg.i { width: 14px; height: 14px; }
.term-btn.done { color: var(--t-ok); border-color: color-mix(in srgb, var(--t-ok) 45%, transparent); }
.rt-chip:focus-visible, .term-btn:focus-visible, .term-body:focus-visible, .term-new:focus-visible { outline: 2px solid var(--t-run); outline-offset: -2px; }

.term-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: var(--s3) 0 var(--s4);
  font: 13px/1.62 var(--tmono); font-variant-ligatures: none; scrollbar-width: thin; scrollbar-color: #2c3527 transparent; }
.term-body::-webkit-scrollbar { width: 10px; }
.term-body::-webkit-scrollbar-thumb { background: #2a3225; border-radius: 10px; border: 3px solid var(--t-bg); }

/* one CLI line: time · speaker · glyph · text (mobile: speaker + time on a header row) */
.tl { display: grid; grid-template-columns: 8ch 6.5ch 1.6ch minmax(0, 1fr); column-gap: 10px; padding: 1px var(--s4); align-items: baseline; }
.tl:hover { background: rgba(255, 255, 255, .025); }
.tl-hd { display: contents; }
.tl-ts { color: var(--t-faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl:hover .tl-ts { color: var(--t-dim); }
.tl-tag { color: var(--wc, var(--t-dim)); font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; }
.tl.cont .tl-tag { visibility: hidden; }
.tl.same-t .tl-ts { visibility: hidden; }
.tl:hover .tl-ts { visibility: visible; }
.tl-g { color: var(--gc, var(--wc, var(--t-dim))); text-align: center; font-family: "Segoe UI Symbol", var(--tmono); }
.tl-body { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl.w-claude { --wc: var(--t-claude); } .tl.w-codex { --wc: var(--t-codex); } .tl.w-robot { --wc: var(--t-robot); }
.tl.w-owner { --wc: var(--t-owner); } .tl.w-gate, .tl.w-status { --wc: var(--t-info); } .tl.w-ref { --wc: var(--t-codex); }
.tl.g-ok { --gc: var(--t-ok); } .tl.g-bad { --gc: var(--t-bad); } .tl.g-warn { --gc: var(--t-warn); } .tl.g-dim { --gc: var(--t-faint); }
.tl.g-run { --gc: var(--t-run); } .tl.g-info { --gc: var(--t-info); }
.tl.dim .tl-body { color: var(--t-dim); }
.tl.gap { margin-top: 6px; }
.tl.in { animation: tlIn .32s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes tlIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.tl-plain { grid-template-columns: 8ch 12ch minmax(0, 1fr); }
.tl-plain .tl-tag { text-align: left; }

.tl-body code { font: inherit; font-size: .94em; background: rgba(255, 255, 255, .065); color: #eef2e6; padding: 0 4px; border-radius: 4px; }
.tl-body strong { color: #f3f6ee; font-weight: 700; }
.tl-body a { color: var(--t-run); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--t-run) 40%, transparent); text-underline-offset: 2px; }
.tl-li { display: block; padding-left: 1.6ch; text-indent: -1.6ch; }
.tl-li::before { content: "• "; color: var(--wc, var(--t-dim)); }
.tl-tool { color: var(--wc); font-weight: 650; }
.tl-arg { color: var(--t-text); }
.tl-m { display: inline-block; margin-left: 8px; padding: 0 6px; border-radius: 4px; border: 1px solid #2a3325; color: var(--t-dim);
  font-size: 11.5px; line-height: 18px; vertical-align: 1px; white-space: nowrap; }
.tl-m.ok { color: var(--t-ok); border-color: color-mix(in srgb, var(--t-ok) 35%, transparent); }
.tl-m.bad { color: var(--t-bad); border-color: color-mix(in srgb, var(--t-bad) 40%, transparent); }
.tl-head { color: var(--t-text); font-weight: 650; }
.tl-sub { color: var(--t-dim); }
pre.tl-code { margin: 5px 0 3px; padding: 8px 12px; background: var(--t-code); border: 1px solid var(--t-rule); border-left: 2px solid color-mix(in srgb, var(--wc, var(--t-dim)) 55%, transparent);
  border-radius: 6px; font: 12.5px/1.58 var(--tmono); color: #cfd7c4; white-space: pre-wrap; overflow-wrap: anywhere; }
pre.tl-code .pr { color: var(--t-faint); user-select: none; }
.tl-clamp.clamped { max-height: calc(var(--lines, 8) * 1.62em + 16px); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.tl-more { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 2px; padding: 0; border: 0; background: none; color: #bfe06e;
  font: 500 12px var(--font); cursor: pointer; }
.tl-more:hover { text-decoration: underline; }
.tl-more:focus-visible { outline: 2px solid var(--t-run); outline-offset: 2px; border-radius: 3px; }

/* tool calls like Claude Code: ⏺ Name(arg…) ›  then ⎿ result; click opens the full input / output */
.tl-call, .tl-res-btn { display: flex; align-items: baseline; max-width: 100%; min-width: 0; margin: 0 0 0 -4px; padding: 0 4px; border: 0; border-radius: 4px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.tl-call:hover, .tl-res-btn:hover { background: rgba(255, 255, 255, .045); }
.tl-call:focus-visible, .tl-res-btn:focus-visible, .tl-copy:focus-visible { outline: 2px solid var(--t-run); outline-offset: 0; }
.tl-call .tl-tool { color: #f1f4ec; font-weight: 700; flex: none; }
.tl-args { color: var(--t-dim); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.tl-call .tl-m { flex: none; }
.tl-args.sp { margin-left: 1ch; color: #d3dac8; }
.tl-chev { flex: none; margin-left: 8px; color: var(--t-faint); display: inline-block; transition: transform .15s; }
.tl-call[aria-expanded="true"] .tl-chev, .tl-res-btn[aria-expanded="true"] .tl-chev { transform: rotate(90deg); color: var(--t-dim); }
.tl-call:hover .tl-chev, .tl-res-btn:hover .tl-chev { color: var(--t-text); }
.tl-results { display: block; }
.tl-res-btn { color: var(--t-dim); }
.tl-elbow { flex: none; color: var(--t-faint); margin-right: 1ch; padding-left: .2ch; }
.tl-res-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }
.tl-res-n { flex: none; margin-left: 1ch; color: var(--t-faint); }
.tl-res.bad .tl-res-t { color: var(--t-bad); }
.tl-exp { margin: 4px 0 6px; }
.tl-exp[hidden] { display: none; }
.tl-res .tl-exp { margin-left: 2.2ch; }
.tl-blk { border: 1px solid var(--t-rule); border-radius: 7px; background: var(--t-code); overflow: hidden; }
.tl-blk + .tl-blk { margin-top: 6px; }
.tl-blk.bad { border-color: color-mix(in srgb, var(--t-bad) 40%, transparent); }
.tl-blk-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 6px 3px 12px; border-bottom: 1px solid var(--t-rule);
  font: 600 10.5px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--t-faint); }
.tl-blk pre.tl-code { margin: 0; border: 0; border-radius: 0; max-height: 440px; overflow: auto; scrollbar-width: thin; scrollbar-color: #2c3527 transparent; }
.tl-copy { padding: 1px 8px; border: 1px solid #2a3325; border-radius: 5px; background: none; color: var(--t-dim); font: 500 11px var(--font);
  letter-spacing: 0; text-transform: none; cursor: pointer; }
.tl-copy:hover { color: var(--t-text); border-color: #3a4532; }
.tl.g-wait .tl-g { animation: tlWait 1.2s ease-in-out infinite; }
@keyframes tlWait { 50% { opacity: .25; } }
.tl.tl-callrow.cont { margin-top: 2px; }

/* narration (what Claude / Codex say): no dot, proportional reading font, bright; tool lines stay mono and quieter */
.term { --t-say-claude: #f7f2ec; --t-say-codex: #c2ddfc; }
.tl.tl-say { margin: 7px 0 7px; }
.tl.tl-say + .tl.tl-say { margin-top: 2px; }
.tl.tl-say .tl-body { font: 400 14.5px/1.65 var(--font); letter-spacing: .005em; color: var(--t-say-claude); }
.tl.tl-say.w-codex .tl-body { color: var(--t-say-codex); }
.tl.tl-say .tl-body code { font-family: var(--tmono); font-size: .86em; }
.tl.tl-say .tl-body strong { color: #fff; font-weight: 600; }
.tl.tl-say .tl-li { padding-left: 1.3em; text-indent: -1.3em; }
.tl.tl-say .tl-clamp.clamped { max-height: calc(var(--lines, 8) * 1.65em + 16px); }
.tl.tl-callrow .tl-call .tl-tool { color: #d5dccb; font-weight: 650; }

/* boxed lines: verdict, owner question, owner answer */
.tl-box { --bc: var(--t-dim); margin: 6px 0 8px; padding: 10px 14px 11px; border-radius: 9px; border: 1px solid color-mix(in srgb, var(--bc) 38%, transparent);
  background: color-mix(in srgb, var(--bc) 8%, transparent); white-space: normal; }
.tl-box.ok { --bc: var(--t-ok); } .tl-box.warn { --bc: var(--t-warn); } .tl-box.bad { --bc: var(--t-bad); } .tl-box.owner { --bc: var(--t-owner); }
.tl-box.owner { border-left: 3px solid var(--t-owner); }
.tl-box.ask { box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-warn) 12%, transparent); }
.tl-box-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tl-dec { font: 700 10.5px/18px var(--font); letter-spacing: .08em; padding: 0 7px; border-radius: 4px; background: var(--bc); color: #0b0e09; flex: none; }
.tl-box-h .tl-head { white-space: pre-wrap; }
.tl-box h4 { margin: 10px 0 3px; font: 600 10.5px var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--t-dim); }
.tl-box ul, .tl-box ol { margin: 0; padding-left: 2.6ch; white-space: pre-wrap; }
.tl-box li { margin: 2px 0; }
.tl-box li::marker { color: color-mix(in srgb, var(--bc) 80%, transparent); }
.tl-box .tl-text { white-space: pre-wrap; margin-top: 4px; }
.tl-by { color: var(--t-faint); font-size: 11.5px; margin-top: 4px; }
.tl-ev { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.tl-ev a { display: inline-flex; flex-direction: column; gap: 6px; }
.tl-ev img { display: block; width: min(240px, 100%); height: 140px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--t-edge); }
.tl-ev a:hover img { border-color: var(--t-run); }

/* round divider ── Tur 2 ── */
.tl-round { display: flex; align-items: center; gap: 12px; margin: 16px var(--s4) 8px; color: var(--t-dim); font: 600 11.5px var(--tmono); letter-spacing: .06em; }
.tl-round::before, .tl-round::after { content: ""; flex: 1; border-top: 1px dashed #2c3527; }
.tl-round::before { flex: 0 0 calc(8ch + 6.5ch + 1.6ch + 20px); }
.tl-round b { color: var(--t-text); font-weight: 650; }

/* end of the stream: prompt with a blinking cursor while the robot works */
.term-tail .tl { padding-top: 6px; }
.term-tail .tl-g { color: var(--t-run); }
.term-tail.ask .tl-g, .term-tail.ask .tl-body { color: var(--t-warn); }
.term-tail .tl-body { color: var(--t-dim); }
.cur { display: inline-block; width: .62em; height: 1.15em; margin-left: 2px; vertical-align: -.2em; background: var(--t-run); animation: curBlink 1.05s steps(1) infinite; }
.term-tail.ask .cur { background: var(--t-warn); }
@keyframes curBlink { 50% { opacity: 0; } }
.term-end { display: flex; align-items: center; gap: 12px; margin: 14px var(--s4) 0; color: var(--t-dim); font-size: 12px; }
.term-end::before, .term-end::after { content: ""; flex: 1; border-top: 1px solid var(--t-rule); }
.term-end b { color: var(--pc, var(--t-text)); font-weight: 650; }

/* filters: hide lines outside the chosen group (round dividers stay) */
.term-lines.f-claude .tl:not([data-f~="claude"]), .term-lines.f-codex .tl:not([data-f~="codex"]),
.term-lines.f-check .tl:not([data-f~="check"]), .term-lines.f-state .tl:not([data-f~="state"]) { display: none; }
.term-lines:not(.f-all) .tl.cont .tl-tag { visibility: visible; }

.term-new { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 999px; border: 0; background: #b4dc4a; color: #10140c; font: 600 12.5px var(--font); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); animation: tlIn .25s ease-out both; }
.term-new[hidden] { display: none; }
.term-new b:empty { display: none; }

/* owner question (in the composer) */
.rt-ask-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--c-warn); color: var(--surface);
  font: 700 18px var(--font); animation: rtPulse 1.8s ease-out infinite; }
.rt-q { margin: 0 0 var(--s3); padding: var(--s3) var(--s4); white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--font);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); max-height: 260px; overflow: auto; }
.rt-ask-hint { margin: 0; font-size: 13px; color: var(--text-2); }
.rt-ask-hint b { color: var(--text); font-weight: 600; }

/* budget / time limit and live spend (summary card) */
.rt-limits { display: block; }
.rt-spend { display: grid; gap: 4px; margin-top: 6px; max-width: 220px; }
.rt-spend[hidden] { display: none; }
.rt-bar { --bar: var(--c-ok); position: relative; display: block; height: 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--muted) 22%, transparent); overflow: hidden; }
.rt-bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--bar); transition: width .4s ease; }
.rt-spend.warn .rt-bar { --bar: var(--c-warn); } .rt-spend.bad .rt-bar { --bar: var(--c-bad); }
.rt-spend-t { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rt-spend.warn .rt-spend-t { color: var(--c-warn); font-weight: 600; } .rt-spend.bad .rt-spend-t { color: var(--c-bad); font-weight: 600; }
td.nowrap { white-space: nowrap; }
@media (min-width: 720px) { .form-grid .fg-wide { grid-column: span 2; } }

/* summary parts */
.rt-dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 7px var(--s3); margin: 0; font-size: 13px; }
.rt-dl dt { color: var(--muted); }
.rt-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rt-dl dd a { overflow-wrap: anywhere; }
.rt-branch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.rt-branch .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.rt-branch .chip svg { vertical-align: -2px; margin-right: 3px; }
.rt-arrow { color: var(--muted); }
.rt-h3 { margin: var(--s4) 0 var(--s2); padding-top: var(--s3); border-top: 1px solid var(--border); font-size: 13px; display: flex; align-items: baseline; gap: var(--s2); }
.rt-gates, .rt-verdicts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.rt-gates li { display: flex; align-items: baseline; gap: var(--s2); font: 12.5px/1.5 var(--mono); min-width: 0; }
.rt-gates li .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rt-gates .ok { color: var(--c-ok); font-weight: 700; } .rt-gates .bad { color: var(--c-bad); font-weight: 700; }
.rt-verdicts li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--s2); font-size: 13px; align-items: baseline; }
.rt-verdicts .rd { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rt-verdicts .sm { grid-column: 1 / -1; color: var(--text-2); font-size: 12.5px; line-height: 1.5; }
.rt-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 var(--mono); max-height: 340px; overflow: auto; color: var(--text-2); }
.rt-res-head { margin: 0 0 var(--s2); font-size: 13.5px; font-weight: 500; }
.rt-result .rt-pre { white-space: pre; overflow-wrap: normal; overflow-x: auto; font-size: 11.5px; line-height: 1.6; padding: var(--s2) var(--s3);
  background: var(--surface-2); border-radius: var(--r1); }
@media (max-width: 640px) {
  .term { border-radius: 12px; }
  .term-bar { padding: 6px var(--s3); gap: var(--s2); }
  .term-dots, .term-sep { display: none; }
  .term-bar { flex-wrap: wrap; row-gap: 2px; padding: 8px var(--s3) 6px; }
  .term-robot { margin-right: auto; }
  .term-btn [data-copy-label] { display: none; }
  .term-btn { padding: 0 8px; }
  .term-btn.done [data-copy-label] { display: inline; }
  .term-task { order: 9; flex-basis: 100%; font-size: 13px; }
  .term-meta { padding: 7px var(--s3); gap: 6px var(--s3); }
  .term-meta .grow { flex-basis: 100%; height: 0; }
  .rt-chips { flex: 1; }
  .term-body { font-size: 12.5px; }
  .tl { grid-template-columns: 1.6ch minmax(0, 1fr); grid-template-areas: "hd hd" "g body"; column-gap: 8px; padding: 1px var(--s3); }
  .tl-hd { display: flex; grid-area: hd; gap: var(--s2); align-items: baseline; margin-top: 8px; }
  .tl.cont .tl-hd { display: none; }
  .tl-tag { text-align: left; font-weight: 650; }
  .tl.cont .tl-tag, .tl.same-t .tl-ts { visibility: visible; }
  .tl-g { grid-area: g; } .tl-body { grid-area: body; }
  .tl-plain { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .tl-round { margin: 16px var(--s3) 4px; }
  .tl-round::before { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .tl.in, .term-new { animation: none; }
  .rt-pill i, .rt-ask-ic { animation: none; }
  .cur { animation: none; }
  .tl.g-wait .tl-g { animation: none; }
}
/* ------------------------------------------------------------------ robot workspace (2026-11-13)
   left: task history grouped by robot and date · middle: live stream + composer · right: summary */
body.ws-page .content { max-width: none; padding: 0; }
body.ws-page footer, body.ws-page .content > .skel { display: none !important; }
body.ws-page .top .search { display: none; }            /* the list has its own search (Ctrl+K) */
body.ws-page.loading .content > .ws { display: grid; }
kbd { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--border); border-bottom-width: 2px;
  background: var(--surface-2); color: var(--muted); font: 600 10.5px/1 var(--font); white-space: nowrap; }

.ws { --ws-side: 292px; --ws-sum: 340px; display: grid; grid-template-columns: var(--ws-side) minmax(0, 1fr) var(--ws-sum);
  height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); min-height: 480px; }
.ws.no-sum, html.rt-sum-off .ws { grid-template-columns: var(--ws-side) minmax(0, 1fr); }
html.rt-sum-off .ws .ws-sum { display: none; }
.ws-scrim { display: none; }

/* ---- left */
.ws-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border-right: 1px solid var(--border); }
.sb-top { display: grid; gap: var(--s2); padding: var(--s3); }
.sb-new { display: flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s3); border-radius: var(--r2); background: var(--btn-bg);
  color: var(--btn-text); font-weight: 600; }
.sb-new:hover { background: var(--btn-bg-hover); text-decoration: none; }
.sb-new[hidden] { display: none; }
.sb-none.first { margin-left: var(--s2); }
.sb-new span { flex: 1; }
.sb-new kbd { background: transparent; border-color: color-mix(in srgb, var(--btn-text) 35%, transparent); color: inherit; opacity: .8; }
.sb-search { position: relative; }
.sb-search svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.sb-search input { width: 100%; height: 36px; padding: 0 60px 0 34px; border-radius: var(--r2); background: var(--surface-2); border-color: transparent; }
.sb-search input:focus { background: var(--surface); }
.sb-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.sb-search input:focus + kbd, .sb-search input:not(:placeholder-shown) + kbd { display: none; }
.sb-scroll { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--s2) var(--s3); scrollbar-width: thin; }
.sb-title { display: flex; align-items: center; gap: 6px; margin: var(--s3) var(--s2) var(--s1); font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.sb-title svg.i { width: 14px; height: 14px; }
.sb-pins[hidden] { display: none; }
.sb-pins { padding-bottom: var(--s2); border-bottom: 1px solid var(--border); margin-bottom: var(--s1); }
.sb-robot { margin-top: var(--s1); }
.sb-robot > summary { list-style: none; display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s2); border-radius: var(--r1); cursor: pointer;
  position: sticky; top: 0; z-index: 1; background: var(--surface); }
.sb-robot > summary::-webkit-details-marker { display: none; }
.sb-robot > summary:hover { background: var(--surface-2); }
.sb-robot > summary .chev { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.sb-robot[open] > summary .chev { transform: none; }
.sb-rav { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: var(--brand-soft); color: var(--brand-strong); }
.sb-rav svg.i { width: 18px; height: 18px; }
.sb-rav .dot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); border: 2px solid var(--surface); }
.sb-rav .dot.on { background: var(--c-ok); }
.sb-rname { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-rname b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-rname small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-act { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: color-mix(in srgb, var(--c-push) 16%, transparent);
  color: var(--c-push); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.sb-act + .chev { margin-left: 0 !important; }
.sb-rnew { display: flex; align-items: center; gap: 6px; margin: 2px 0 0 calc(30px + var(--s2)); padding: 4px var(--s2); border-radius: var(--r1); font-size: 12.5px;
  color: var(--muted); font-weight: 500; }
.sb-rnew svg.i { width: 15px; height: 15px; }
.sb-rnew:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sb-g h4 { margin: var(--s2) var(--s2) 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tk-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; }
.tk { position: relative; }
.tk-a { display: block; padding: 6px 36px 7px 10px; border-radius: var(--r1); color: var(--text); min-width: 0; }
.tk-a:hover { background: var(--surface-2); text-decoration: none; }
.tk.on .tk-a { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.tk-t { display: block; font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk.on .tk-t { font-weight: 600; }
.tk-m { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 11.5px; color: var(--muted); min-width: 0; white-space: nowrap; }
.tk-m .badge { font-size: 11px; line-height: 17px; padding: 0 7px; gap: 4px; }
.tk-m .badge::before { width: 5px; height: 5px; }
.tk.s-running .tk-m .badge::before, .tk.s-needs_owner .tk-m .badge::before { animation: rtPulse 1.6s ease-out infinite; }
.tk-robot { display: none; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.sb-pins .tk-robot { display: inline; }
.tk-when { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
.tk-pin { position: absolute; right: 6px; top: 8px; display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .12s; }
.tk-pin svg.i { width: 15px; height: 15px; transform: rotate(35deg); }
.tk:hover .tk-pin, .tk-pin:focus-visible, .tk.pinned .tk-pin { opacity: 1; }
.tk-pin:hover { background: var(--surface-3); color: var(--text); }
.tk.pinned .tk-pin { color: var(--brand-strong); }
.tk.pinned .tk-pin svg.i { transform: none; }
.tk.pinned .tk-when { display: none; }
.sb-none { margin: 2px 0 var(--s2) calc(30px + var(--s3)); font-size: 12.5px; color: var(--muted); }
.sb-nomatch { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s6) var(--s4); text-align: center; color: var(--muted); font-size: 12.5px; }
.sb-nomatch[hidden] { display: none; }
.sb-nomatch b { color: var(--text); font-size: 13.5px; }
.sb-nomatch svg.i { width: 28px; height: 28px; opacity: .5; }
.ws-side.searching .sb-rnew, .ws-side.searching .sb-none { display: none; }
.sb-foot { position: relative; padding: var(--s2) var(--s3) var(--s3); border-top: 1px solid var(--border); }
.sb-add > summary { list-style: none; display: flex; align-items: center; gap: var(--s2); padding: 7px var(--s2); border-radius: var(--r1); color: var(--text-2);
  font-weight: 500; font-size: 13px; cursor: pointer; }
.sb-add > summary::-webkit-details-marker { display: none; }
.sb-add > summary svg.i { width: 18px; height: 18px; }
.sb-add > summary:hover, .sb-add[open] > summary { background: var(--surface-2); color: var(--text); }
.sb-add-pop { position: absolute; left: var(--s3); right: var(--s3); bottom: calc(100% - 4px); padding: var(--s4); background: var(--surface); z-index: 50;
  border: 1px solid var(--border); border-radius: var(--r2); box-shadow: var(--shadow-2); max-height: 70vh; overflow: auto; }
.add-robot { display: grid; gap: var(--s3); }
.add-robot .alert { margin: 0; }
.add-robot p { margin: 0; }
/* robot PC usage (bottom-left; machine_monitor.py every 20 s) */
.sb-pc { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin: 0 0 var(--s2); }
.pc-title { margin: 0 var(--s1); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pc { padding: var(--s2) 10px; border: 1px solid var(--border); border-radius: var(--r1); background: var(--surface-2); font-size: 12px; }
.pc-h { display: flex; align-items: center; gap: 6px; min-width: 0; margin-bottom: 4px; }
.pc-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-ok) 20%, transparent); }
.pc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.pc-name b { color: var(--text); font-weight: 600; }
.pc-age { flex: none; color: var(--muted); font-size: 11px; white-space: nowrap; }
.pc-rows { display: grid; gap: 3px; }
.pc-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 32px 74px; grid-template-areas: "k bar v d"; align-items: center; column-gap: 6px; min-height: 17px; }
.pc-k { grid-area: k; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.pc-bar { grid-area: bar; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.pc-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c-ok); transition: width .4s ease; }
.pc-row.mid .pc-bar i { background: var(--c-warn); }
.pc-row.hi .pc-bar i { background: var(--c-bad); }
.pc-v { grid-area: v; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.pc-row:not(.lo):not(.mid):not(.hi) .pc-v { color: var(--muted); font-weight: 500; }
.pc-d { grid-area: d; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.pc-line { display: none; margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-hint { margin: 2px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.pc.stale { background: transparent; }
.pc.stale .pc-dot { background: var(--muted); box-shadow: none; }
.pc.stale .pc-bar i { background: var(--muted) !important; opacity: .55; }
.pc.stale .pc-v, .pc.stale .pc-name b { color: var(--muted); }
.pc.stale .pc-h .pc-age { color: var(--c-warn); }
.pc.none .pc-h .pc-age { color: var(--muted); }
@media (max-width: 900px), (max-height: 640px) {
  .pc { padding: 6px 10px; }
  .pc-h, .pc-rows, .pc-title { display: none; }
  .pc.none .pc-h { display: flex; margin: 0; }
  .pc.none .pc-hint { display: none; }
  .pc-line { display: block; color: var(--text-2); }
  .pc-line::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--c-ok); }
  .pc.stale .pc-line::before { background: var(--muted); }
  .pc.stale .pc-line .pc-age { color: var(--c-warn); }
}
.sb-keys { margin: var(--s1) var(--s2) 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 5px; font-size: 11.5px; color: var(--muted); }
.sb-keys kbd { margin-left: 4px; }
.sb-keys kbd:first-child { margin-left: 0; }

/* ---- middle */
.ws-center { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ws-head { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 6px var(--s4); }
.ws-head .grow { flex: 1; }
.ws-head form { margin: 0; }
.ws-crumb { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ws-crumb a { color: var(--muted); font-weight: 500; }
.ws-crumb a:hover { color: var(--text); }
.ws-crumb [aria-current] { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ws-tool { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 var(--s3); border-radius: var(--r1); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: 500 13px var(--font); cursor: pointer; flex: none; }
.ws-tool:hover { color: var(--text); border-color: var(--muted); }
.ws-tool svg.i { width: 18px; height: 18px; }
.ws-tool[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.ws-list { display: none; }
.btn.sm.danger svg.i { width: 16px; height: 16px; }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm svg.i { width: 18px; height: 18px; }
.ws-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ws-term { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 var(--s4); }
.ws .term { flex: 1; height: auto; min-height: 260px; border-radius: 12px; }
.ws .term.is-min { flex: none; }
.ws .term.is-max { border-radius: 0; }
html.term-max-on .ws-center { z-index: 200; }

/* loading: a skeleton of the stream while the next task opens (the list stays) */
.ws-skel { display: none; }
body.loading .ws-skel { display: flex; flex-direction: column; gap: 10px; flex: 1; margin: 0 var(--s4) var(--s4); padding: var(--s4); border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); }
body.loading .ws-body, body.loading .cmp-wrap { display: none; }
.ws-skel .b { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%;
  animation: sh 1.2s infinite linear; }
.ws-skel .b.bar { height: 30px; width: 100%; margin-bottom: 8px; }
.ws-skel .b.box { height: 90px; width: 100%; margin-top: auto; }

/* empty / robot views */
.ws-hello { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: var(--s6) var(--s4) var(--s4); gap: var(--s5); }
.hello-head { text-align: center; max-width: 560px; margin-top: auto; }
.hello-head h2, .hello-card h2 { display: block; font-size: 22px; letter-spacing: -.01em; margin: var(--s3) 0 var(--s2); }
.hello-head p, .hello-card p { margin: 0; }
.hello-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-strong); }
.hello-ic svg.i { width: 30px; height: 30px; }
.hello-card { margin: auto; width: min(460px, 100%); padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r3);
  box-shadow: var(--shadow-1); text-align: center; }
.hello-card .add-robot { text-align: left; margin-top: var(--s4); }
.rcards { width: min(880px, 100%); display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); margin-bottom: auto; }
.rcards.one { width: min(460px, 100%); grid-template-columns: minmax(0, 1fr); margin-bottom: 0; }
.rcard { padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r3); box-shadow: var(--shadow-1); min-width: 0; }
.rcard-h { display: flex; align-items: center; gap: var(--s3); color: var(--text); margin-bottom: var(--s3); }
.rcard-h:hover { text-decoration: none; }
.rcard-h:hover b { text-decoration: underline; }
.rcard-h > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.rcard-h small { color: var(--muted); font-size: 12px; }
.rcard dl { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 5px var(--s3); margin: 0; font-size: 12.5px; }
.rcard dt { color: var(--muted); }
.rcard dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.hello-cur { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--text); }
.hello-cur span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hello-sec { width: min(560px, 100%); margin-bottom: auto; }
.hello-sec h3 { margin: 0 0 var(--s2); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sess { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.sess li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r2); }
.ss-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ss-t b { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-t small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- composer */
.cmp-wrap { padding: var(--s3) var(--s4) 10px; }
.cmp-wrap > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.cmp { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 8px 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 6px 24px -12px rgba(19, 22, 15, .25), var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.cmp:focus-within { border-color: color-mix(in srgb, var(--focus) 70%, var(--border)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 16%, transparent), 0 6px 24px -12px rgba(19, 22, 15, .25); }
.cmp[hidden] { display: none; }
.cmp > .alert { margin: 4px 0; }
.cmp textarea[data-cmp-text] { width: 100%; min-height: 44px; max-height: 38vh; padding: 8px 4px 4px; border: 0; background: transparent; resize: none; box-shadow: none;
  font: 14.5px/1.55 var(--font); color: var(--text); overflow-y: auto; }
.cmp textarea[data-cmp-text]:focus { box-shadow: none; }
.cmp textarea::placeholder { color: var(--muted); }
.cmp-bar { display: flex; align-items: center; gap: 6px; }
.cmp-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.cm-bare .cm-k { display: none; }
.cmp-bar .grow { flex: 1; }
.cmp-foot { margin-top: 6px; text-align: center; font-size: 11.5px; color: var(--muted); }
.cmp-foot kbd { height: 16px; font-size: 10px; }
.cmp-send { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--btn-bg); color: var(--btn-text);
  cursor: pointer; flex: none; transition: background .15s, opacity .15s, transform .1s; }
.cmp-send:hover { background: var(--btn-bg-hover); }
.cmp-send:active { transform: scale(.94); }
.cmp-send:disabled { opacity: .35; cursor: default; }
.cmp-send svg.i { width: 20px; height: 20px; }
.cmp.sending .cmp-send svg { animation: sendPulse .9s ease-in-out infinite; }
@keyframes sendPulse { 50% { transform: translateY(-3px); } }
.cm { position: relative; }
.cm > summary { list-style: none; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 8px 0 9px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); font: 500 12.5px var(--font); cursor: pointer; white-space: nowrap; max-width: 220px; }
.cm > summary::-webkit-details-marker { display: none; }
.cm > summary:hover { color: var(--text); border-color: color-mix(in srgb, var(--muted) 60%, var(--border)); }
.cm[open] > summary { background: var(--surface-2); color: var(--text); border-color: var(--muted); }
.cm > summary svg.i { width: 15px; height: 15px; }
.cm > summary .chev { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.cm[open] > summary .chev { transform: rotate(180deg); }
.cm-k { color: var(--muted); }
.cm-v { overflow: hidden; text-overflow: ellipsis; }
.cm.set > summary { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); color: var(--text); }
.cm-adv .cm-k { display: none; }
.cm-pop { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 60; width: max-content; min-width: 250px; max-width: min(380px, calc(100vw - 32px));
  max-height: min(62vh, 520px); overflow: auto; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); box-shadow: var(--shadow-2); animation: cmIn .14s ease-out; }
@keyframes cmIn { from { opacity: 0; transform: translateY(4px); } }
.cm-h { padding: 6px 10px 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cm-pop > label:not(.cm-opt) { padding: 4px 10px 6px; }
.cm-pop > label:not(.cm-opt) input, .cm-pop > label:not(.cm-opt) textarea { width: 100%; }
.cm-opt { flex-direction: row; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: var(--r1); color: var(--text); font-weight: 500; cursor: pointer; }
.cm-opt[hidden] { display: none; }
.cm-opt:hover { background: var(--surface-2); }
.cm-opt input { margin: 3px 0 0; accent-color: var(--brand-strong); flex: none; }
.cm-opt span { min-width: 0; overflow-wrap: anywhere; }
.cm-opt small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.cm-opt:has(input:checked) { background: var(--brand-soft); }
.cm-note { margin: 2px 10px 6px; font-size: 12px; color: var(--muted); max-width: 320px; }
.cm-presets { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 6px; }
.cm-chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font: 500 12.5px var(--font); cursor: pointer; white-space: nowrap; }
.cm-chip:hover { color: var(--text); border-color: var(--muted); }
.cm-chip.on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); color: var(--text); }
.cm-chip.strong { background: color-mix(in srgb, var(--c-ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--c-ok) 40%, var(--border)); color: var(--text); }
.cm-chip svg.i { width: 15px; height: 15px; }

.cmp-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.cmp-tabs button { height: 30px; padding: 0 var(--s3); border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--muted);
  font: 600 12.5px var(--font); cursor: pointer; }
.cmp-tabs button:hover { color: var(--text); }
.cmp-tabs button.on { background: var(--surface); border-color: var(--border); color: var(--text); box-shadow: var(--shadow-1); }
.cmp-tabs button[data-mode="reply"].on { color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 45%, var(--border)); }
.cmp-reply { border-color: color-mix(in srgb, var(--c-warn) 50%, var(--border)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-warn) 10%, transparent), var(--shadow-1); }
.cmp-q { padding: 4px 2px 6px; border-bottom: 1px dashed var(--border); }
.cmp-q-h { display: flex; align-items: center; gap: var(--s3); margin-bottom: 6px; }
.cmp-q-h > div { display: flex; flex-direction: column; line-height: 1.35; }
.cmp-q-h strong { font-size: 14.5px; }
.cmp-q-h span:not(.rt-ask-ic) { font-size: 12.5px; color: var(--text-2); }
.cmp-q .rt-ask-ic { width: 28px; height: 28px; font-size: 15px; }
.cmp-q .rt-q { margin: 0; max-height: 22vh; font-size: 13px; background: var(--surface-2); }
.cmp-reply .rt-ask-hint { margin: 0 4px; font-size: 12.5px; }

/* ---- right */
.ws-sum { display: flex; flex-direction: column; min-height: 0; overflow: auto; background: var(--surface); border-left: 1px solid var(--border); scrollbar-width: thin; }
.sum-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s3) var(--s3) var(--s4); background: var(--surface);
  border-bottom: 1px solid var(--border); }
.sum-head h2 { margin: 0; flex: 1; min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-sec { padding: var(--s4); border-bottom: 1px solid var(--border); }
.sum-sec:last-child { border-bottom: 0; }
.sum-sec h3 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s3); font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.sum-sec h3 svg.i { width: 16px; height: 16px; align-self: center; }
.sum-sec h3 .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sum-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.sum-limits { flex-basis: 100%; font-size: 13px; color: var(--text-2); }
.sum-limits .rt-spend { max-width: none; }
.sum-sec.rt-result { background: color-mix(in srgb, var(--c-ok) 6%, var(--surface)); }
.sum-sec.rt-result h3 { color: var(--c-ok); }
.sum-sec.rt-result.bad { background: color-mix(in srgb, var(--c-bad) 6%, var(--surface)); }
.sum-sec.rt-result.bad h3 { color: var(--c-bad); }
.sum-empty { margin: 0; font-size: 12.5px; color: var(--muted); }
.ws-sum .rgal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
.ws-sum .rt-dl { grid-template-columns: 84px minmax(0, 1fr); }
details.sum-text + details.sum-text { margin-top: var(--s3); }
details.sum-text > summary { list-style: none; display: flex; align-items: center; cursor: pointer; font-size: 13px; font-weight: 600; }
details.sum-text > summary::-webkit-details-marker { display: none; }
details.sum-text > summary .chev { margin-left: auto; width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
details.sum-text[open] > summary .chev { transform: rotate(180deg); }
details.sum-text[open] > summary { margin-bottom: var(--s2); }
.sum-counts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sum-counts li { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }

/* ---- medium: the summary slides over from the right */
@media (max-width: 1279px) {
  .ws, html.rt-sum-off .ws { grid-template-columns: var(--ws-side) minmax(0, 1fr); }
  html.rt-sum-off .ws .ws-sum { display: flex; }
  .ws-sum { position: fixed; top: var(--top); right: 0; bottom: 0; width: min(380px, 92vw); z-index: 46; transform: translateX(104%); transition: transform .22s ease;
    box-shadow: var(--shadow-2); visibility: hidden; }
  .ws.sum-open .ws-sum { transform: none; visibility: visible; }
  .ws.sum-open .ws-scrim, .ws.side-open .ws-scrim { display: block; position: fixed; inset: 0; z-index: 44; background: rgba(0, 0, 0, .32); }
}
@media (max-width: 1100px) { .ws { --ws-side: 260px; } }
/* ---- phone / tablet: the list is a drawer, the summary a bottom sheet */
@media (max-width: 900px) {
  .ws, html.rt-sum-off .ws { grid-template-columns: minmax(0, 1fr); }
  .ws-side { position: fixed; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); z-index: 46; transform: translateX(-104%); transition: transform .22s ease;
    box-shadow: var(--shadow-2); visibility: hidden; }
  .ws.side-open .ws-side { transform: none; visibility: visible; }
  .ws-list { display: inline-flex; }
  .ws-crumb > a, .ws-crumb > span[aria-hidden] { display: none; }
  .ws-sum { top: auto; left: 0; width: auto; max-height: 84dvh; border-left: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0;
    transform: translateY(104%); }
  .ws-sum .sum-head::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--border); }
  .ws-sum .sum-head { padding-top: var(--s4); }
  .ws-head { padding: 6px var(--s3); }
  .ws-head .ws-tool span, .ws-head .btn.sm span { display: none; }
  .ws-head .ws-tool, .ws-head .btn.sm { width: 36px; padding: 0; justify-content: center; }
  .ws-term { padding: 0 var(--s2); }
  .cmp-wrap { padding: var(--s2) var(--s2) var(--s2); }
  .cmp-foot { display: none; }
  .cmp { border-radius: 16px; }
  .rcards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cm-k { display: none; }
  .cmp-opts { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: 2px; }
  .cmp-opts::-webkit-scrollbar { display: none; }
  .cm > summary { max-width: 150px; padding: 0 6px 0 8px; }
  .cm > summary .chev { display: none; }
  .cm-chip { flex: none; }
  .cm-pop { position: fixed; left: 8px; right: 8px; bottom: 76px; width: auto; max-width: none; min-width: 0; }
  .ws .term { min-height: 200px; }
  .ws-hello { padding: var(--s4) var(--s3); }
}
@media (prefers-reduced-motion: reduce) { .tk.s-running .tk-m .badge::before, .tk.s-needs_owner .tk-m .badge::before { animation: none; } }

/* ---- robot filter at the top of the task list (2026-11-13) */
.sb-filter { position: relative; display: flex; align-items: center; }
.sb-filter select { width: 100%; height: 40px; padding: 0 34px 0 44px; border-radius: var(--r2); background: var(--surface-2); border-color: transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; appearance: none; -webkit-appearance: none; text-overflow: ellipsis; }
.sb-filter select:hover { background: var(--surface-3); }
.sb-filter select:focus { background: var(--surface); }
.sb-filter.set select { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.sb-filter-ic { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand-strong); pointer-events: none; }
.sb-filter.set .sb-filter-ic { background: var(--brand); color: var(--btn-text); }
.sb-filter-ic svg.i { width: 17px; height: 17px; }
.sb-filter > svg.chev { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.sb-filter noscript .btn { margin-left: var(--s2); }
.sb-filter select option { font-weight: 500; background: var(--surface); color: var(--text); }

/* ---- the owner's questions about a task: "Soru" / "Yanıt" in the stream */
.tl-qa { margin: 10px var(--s2) 8px; padding: 4px 0 2px; border-radius: 10px; background: color-mix(in srgb, var(--t-info) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--t-info) 16%, transparent); }
.tl-qa.in { animation: tlIn .25s ease-out; }
.tl-qa .tl { padding-left: calc(var(--s4) - var(--s2) - 1px); padding-right: calc(var(--s4) - var(--s2) - 1px); }
.tl.w-ask { --wc: var(--t-owner); } .tl.w-answer { --wc: var(--t-info); }
.tl-qa .tl-box { margin: 4px 0 6px; }
.tl-box.ask-q { --bc: var(--t-owner); border-left: 3px solid var(--t-owner); }
.tl-box.ans { --bc: var(--t-info); border-left: 3px solid var(--t-info); }
.tl-box.ans.bad { --bc: var(--t-bad); border-left-color: var(--t-bad); }
.tl-box.ans.wait { --bc: var(--t-dim); border-style: dashed; border-left-style: solid; }
.tl-box.ans .tl-text { font: 400 14px/1.6 var(--font); color: var(--t-say-codex); }
.tl-box.ask-q .tl-text { font: 500 14px/1.55 var(--font); }
.tl-wait { color: var(--t-dim); }
.tl-wait .cur { background: var(--t-info); }
.tl-box .tl-by .tl-m:first-child { margin-left: 8px; }
.tl.w-answer.g-wait .tl-g { animation: qaBlink 1.4s ease-in-out infinite; }
@keyframes qaBlink { 50% { opacity: .3; } }

/* composer: "Soru sor" tab */
.cmp-tabs button[data-mode="ask"].on { color: var(--c-upd); border-color: color-mix(in srgb, var(--c-upd) 45%, var(--border)); }
.cmp-ask { border-color: color-mix(in srgb, var(--c-upd) 40%, var(--border)); }
.cmp-ask .cm-chip { height: 26px; font-size: 12px; }
@media (max-width: 640px) {
  .tl-qa { margin: 8px 0; border-radius: 8px; }
  .tl-qa .tl { padding-left: var(--s3); padding-right: var(--s3); }
}
@media (prefers-reduced-motion: reduce) { .tl-qa.in, .tl.w-answer.g-wait .tl-g { animation: none; } }

/* evidence album (lightbox) */
.term-gal { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--t-edge); background: transparent; color: inherit; font: inherit; font-size: 12px; cursor: pointer; flex: none; }
.term-gal:hover, .term-gal:focus-visible { border-color: var(--t-run); color: var(--t-run); }
.term-gal svg { width: 14px; height: 14px; }
.lb { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; background: rgba(6, 8, 5, .92); }
.lb[hidden] { display: none; }
body.lb-open { overflow: hidden; }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: min(1400px, 100%); min-width: 0; }
.lb-img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; background: #000; }
.lb-fig figcaption { display: flex; gap: 14px; align-items: baseline; justify-content: center; flex-wrap: wrap; color: #e8ecdf; font-size: 14px; text-align: center; }
.lb-cnt { color: #a7b09a; font-variant-numeric: tabular-nums; }
.lb-nav, .lb-x { flex: none; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 999px; cursor: pointer; font: 28px/1 system-ui, sans-serif; }
.lb-nav { width: 48px; height: 48px; }
.lb-x { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; font-size: 24px; }
.lb-nav:hover, .lb-x:hover, .lb-nav:focus-visible, .lb-x:focus-visible { background: rgba(255, 255, 255, .2); outline: none; }
@media (max-width: 640px) {
  .lb { padding: 56px 8px 16px; }
  .lb-nav { position: absolute; bottom: 18px; width: 44px; height: 44px; }
  .lb-prev { left: 16px; } .lb-next { right: 16px; }
  .lb-img { max-height: calc(100vh - 170px); }
}
