/* CML OS: Claude app colours (warm paper + clay), light and dark. System font, like a real OS. */
:root {
  --bg: #FAF9F5; --side: #F0EEE6; --panel: #FFFFFF; --hover: #E8E6DC; --active: #E3E0D4;
  --line: #E5E3DA; --line-strong: #D1CFC5; --fg: #141413; --muted: #6F6E69; --faint: #9C9A92;
  --accent: #C96442; --accent-hover: #B5573A; --on-accent: #FFFFFF; --bad: #B53333;
  --r: 8px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262624; --side: #1F1E1D; --panel: #30302E; --hover: #2E2D2B; --active: #3A3936;
    --line: #3A3936; --line-strong: #4A4945; --fg: #F5F4EE; --muted: #A6A39A; --faint: #75736C;
    --accent: #D97757; --accent-hover: #E08A6D; --on-accent: #FFFFFF; --bad: #E5776B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #262624; --side: #1F1E1D; --panel: #30302E; --hover: #2E2D2B; --active: #3A3936;
  --line: #3A3936; --line-strong: #4A4945; --fg: #F5F4EE; --muted: #A6A39A; --faint: #75736C;
  --accent: #D97757; --accent-hover: #E08A6D; --on-accent: #FFFFFF; --bad: #E5776B;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* shell: sidebar + one app */
.os { display: grid; grid-template-columns: 220px 1fr; height: 100vh; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 22px; height: 22px; }
.group { padding: 14px 8px 4px; font-size: 12px; color: var(--faint); }
.nav { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: var(--r); color: var(--muted); text-decoration: none; }
.nav:hover { background: var(--hover); color: var(--fg); }
.nav.on { background: var(--active); color: var(--fg); font-weight: 500; }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 6px; padding: 8px 4px 0 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.me span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

/* one bar per app: its name, then its buttons. No subtitles. */
.bar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.bar h1 { margin: 0 auto 0 0; font-size: 15px; font-weight: 600; }
.bar .crumb { color: var(--muted); text-decoration: none; }
.bar .crumb:hover { color: var(--fg); }
.body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }

.btn { color: var(--fg); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.bad { color: var(--bad); }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--r); background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--fg); }
input[type=text], input[type=email], input[type=password], select { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); outline: none; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.empty { display: grid; place-items: center; gap: 10px; padding: 80px 20px; color: var(--muted); text-align: center; }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* login */
.login { display: grid; place-items: center; height: 100vh; padding: 16px; }
.login form { display: grid; gap: 10px; width: 100%; max-width: 320px; }
.login .brand { justify-content: center; padding-bottom: 18px; font-size: 18px; }
.login .brand img { width: 28px; height: 28px; }

/* lists (People) */
.list { max-width: 820px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .who { flex: 1; min-width: 0; }
.row .who small { display: block; color: var(--muted); }
.row label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
.row input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }
.add { display: flex; flex-wrap: wrap; gap: 8px; max-width: 820px; margin-bottom: 16px; }
.add input { flex: 1 1 160px; }

.menu { position: fixed; z-index: 50; min-width: 180px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.menu button { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--hover); }
.menu button.bad { color: var(--bad); }
.menu hr { margin: 4px 0; border: 0; border-top: 1px solid var(--line); }
.menu p { margin: 6px 10px 2px; font-size: 12px; color: var(--faint); }
.toast { position: fixed; z-index: 60; left: 50%; top: 14px; padding: 8px 14px; border-radius: var(--r); background: var(--fg); color: var(--bg); transform: translate(-50%, -70px); transition: transform .2s; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .os { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { flex-direction: row; align-items: center; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand span, .group, .side .spacer, .me span { display: none; }
  .brand { padding: 0 6px; }
  .me { border: 0; margin: 0 0 0 auto; padding: 0; }
  .nav { flex: none; }
  .bar, .body { padding-left: 16px; padding-right: 16px; }
}

/* Screenshots: controls left, live picture right */
.shots, .wb-board { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sp-dim { color: var(--faint); font-size: 13px; font-variant-numeric: tabular-nums; margin-right: 4px; }
.sp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 290px 1fr; }
.sp-side { overflow-y: auto; padding: 16px 16px 28px; border-right: 1px solid var(--line); }
.flabel { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 8px; font-size: 12px; color: var(--faint); }
.flabel:first-child { margin-top: 0; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12px; cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.sw { position: relative; display: grid; place-items: center; aspect-ratio: 1; padding: 0; overflow: hidden; border: 0; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--line); background: var(--active); color: var(--muted); font-size: 18px; cursor: pointer; }
.sw canvas { display: block; width: 100%; height: 100%; }
.sw input[type=color] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chk { background: repeating-conic-gradient(#888 0 25%, #555 0 50%) 0 0 / 10px 10px; }
.sw.on, .preset.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); text-align: left; cursor: pointer; }
.preset canvas { display: block; width: 100%; height: 74px; object-fit: contain; background: var(--active); }
.preset span { display: block; padding: 4px 8px; overflow: hidden; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.preset i { position: absolute; top: 4px; right: 4px; display: none; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-style: normal; line-height: 17px; text-align: center; }
.preset:hover i { display: block; }
.ctl { margin-bottom: 12px; }
.ctl-row { display: flex; justify-content: space-between; margin-bottom: 2px; font-size: 13px; color: var(--muted); }
.ctl b { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.ctl input[type=range] { width: 100%; accent-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.two select { height: 32px; }
.sp-stage { position: relative; min-width: 0; min-height: 0; padding: 32px; cursor: pointer; }
.sp-stage canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.sp-stage.drag { outline: 2px dashed var(--accent); outline-offset: -10px; }
.sp-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 6px 12px; border-radius: var(--r); background: rgba(0,0,0,.6); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; }
@media (max-width: 900px) { .sp-dim { display: none; } .sp-body { grid-template-columns: 1fr; overflow-y: auto; } .sp-side { border-right: 0; } .sp-stage { min-height: 360px; } }

/* Whiteboards */
.wb-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 16px; }
.wb-folder { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; }
.wb-folder span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wb-folder small { color: var(--faint); }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wb-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: pointer; }
.wb-card:hover, .wb-folder:hover { border-color: var(--line-strong); }
.wb-thumb { display: grid; place-items: center; height: 130px; background: var(--side); color: var(--faint); }
.wb-thumb svg:not(.i) { width: 100%; height: 100%; padding: 10px; }
.wb-meta { display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 12px; border-top: 1px solid var(--line); }
.wb-meta div { flex: 1; min-width: 0; }
.wb-meta b { display: block; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.wb-meta small { color: var(--faint); }

.wb-frame { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* Tasks */
.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--side); }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.bar select { height: 32px; }
.tk-body { max-width: 980px; }
.tk-add input { width: 100%; height: 40px; margin-bottom: 18px; }
.tk-group { margin-bottom: 18px; }
.tk-ghead { padding: 0 4px 6px; font-size: 12px; color: var(--faint); }
.tk-row { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 6px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tk-row:hover { background: var(--hover); }
.tk-row.done .tk-title { color: var(--faint); text-decoration: line-through; }
.tk-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tk-check { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--line-strong); cursor: pointer; }
.tk-check svg.i { width: 22px; height: 22px; }
.tk-check:hover { color: var(--accent); }
.tk-check.done { color: #3B8A5C; }
.tk-tag { padding: 1px 8px; border-radius: 6px; font-size: 12px; background: var(--active); color: var(--muted); }
.tk-tag.blocked { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.tk-meta { display: inline-flex; align-items: center; gap: 3px; color: var(--faint); font-size: 12px; }
.tk-meta svg.i { width: 14px; height: 14px; }
.tk-who { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tk-due { min-width: 80px; color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.tk-due.late { color: var(--bad); }
.tk-donebtn { margin: 4px 0 12px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.tk-donebtn:hover { color: var(--fg); }
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; min-width: 900px; }
.tk-body:has(.tk-board) { max-width: none; }
.tk-col { min-height: 200px; padding: 8px; border-radius: var(--r); background: var(--side); }
.tk-col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.tk-colhead { display: flex; justify-content: space-between; padding: 4px 6px 10px; font-weight: 500; }
.tk-colhead small { color: var(--faint); font-weight: 400; }
.tk-card { display: grid; gap: 8px; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); cursor: grab; }
.tk-card:hover { border-color: var(--line-strong); }
.tk-cardmeta { display: flex; align-items: center; gap: 8px; }
.tk-cardmeta .tk-due { min-width: 0; text-align: left; margin-right: auto; }
.tk-panel .tk-shade { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.18); }
.tk-panel aside { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(540px, 100vw); background: var(--bg); border-left: 1px solid var(--line); box-shadow: -8px 0 30px rgba(0,0,0,.12); }
.tk-phead { display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 12px 0 20px; border-bottom: 1px solid var(--line); flex: none; }
.tk-phead span { flex: 1; }
.tk-pbody { flex: 1; overflow-y: auto; padding: 18px 20px; }
.tk-ptitle { width: 100%; padding: 4px 6px; margin: 0 -6px 14px; border: 1px solid transparent; border-radius: var(--r); background: none; font-size: 20px; font-weight: 600; resize: none; overflow: hidden; outline: none; }
.tk-ptitle:hover, .tk-ptitle:focus { border-color: var(--line-strong); }
.tk-fields { display: grid; grid-template-columns: 90px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 22px; }
.tk-fields label { color: var(--muted); }
.tk-fields select, .tk-fields input { max-width: 260px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.tk-fields select.st-blocked { color: var(--bad); }
.tk-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.tk-notes { width: 100%; min-height: 90px; margin-bottom: 22px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); resize: vertical; outline: none; }
.tk-feed { display: grid; gap: 12px; }
.tk-event { color: var(--faint); font-size: 13px; }
.tk-comment b { font-weight: 600; margin-right: 8px; }
.tk-comment small { color: var(--faint); }
.tk-comment p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tk-comment img { display: block; max-width: 100%; max-height: 260px; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r); }
.tk-compose { flex: none; padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.tk-compose textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); resize: none; outline: none; }
.tk-compose > div:last-of-type { display: flex; align-items: center; margin-top: 8px; }
.tk-compose > div:last-of-type span { flex: 1; }
.tk-pic { position: relative; display: inline-block; margin-bottom: 8px; }
.tk-pic img { display: block; max-height: 90px; border-radius: var(--r); border: 1px solid var(--line); }
.tk-pic button { position: absolute; top: 2px; right: 2px; background: var(--panel); }
@media (max-width: 760px) { .tk-who, .tk-meta { display: none; } .bar { flex-wrap: wrap; height: auto; min-height: 52px; padding-top: 8px; padding-bottom: 8px; } }

/* in-app window */
.dlg { width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--fg); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(20,20,19,.35); }
.dlg form { display: grid; gap: 12px; padding: 20px; }
.dlg h2 { margin: 0; font-size: 16px; font-weight: 600; }
.dlg p { margin: 0; color: var(--muted); }
.dlg input[type=text], .dlg textarea { width: 100%; }
.dlg textarea { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); resize: vertical; outline: none; }
.dlg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dlg-grid label { display: grid; gap: 4px; min-width: 0; color: var(--muted); font-size: 13px; }
.dlg-grid select, .dlg-grid input { width: 100%; min-width: 0; }
.dlg input[type=date] { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (max-width: 500px) { .dlg-grid { grid-template-columns: 1fr; } }

/* wider windows + bits used by Sheets */
.dlg.wide { width: min(560px, calc(100vw - 32px)); }
.dlg-check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.dlg-col { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.dlg select { height: 34px; }
.acc-list { display: grid; gap: 8px; }
.acc-list label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Sheets */
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.sb-card { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: inherit; text-decoration: none; }
.sb-card:hover { border-color: var(--line-strong); }
.sb-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--c); color: #fff; font-weight: 600; flex: none; }
.sb-name { flex: 1; min-width: 0; font-weight: 500; }
.sb-name small { display: block; color: var(--faint); font-weight: 400; }
.sg-page { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sg-tabs { display: flex; gap: 2px; padding: 8px 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; }
.sg-tab { padding: 7px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--r) var(--r) 0 0; background: none; color: var(--muted); text-decoration: none; white-space: nowrap; cursor: pointer; }
.sg-tab:hover { color: var(--fg); }
.sg-tab.on { margin-bottom: -1px; border-color: var(--line); background: var(--bg); color: var(--fg); font-weight: 500; }
.sg-tabadd { font-size: 16px; line-height: 1; }
.sg-toolbar { display: flex; align-items: center; gap: 4px; min-height: 46px; padding: 6px 12px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.sg-tool { height: 30px; padding: 0 10px; border: 0; border-radius: var(--r); background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.sg-tool:hover { background: var(--hover); color: var(--fg); }
.sg-tool.on { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.sg-tool.on b { font-weight: 600; }
.sg-view { color: var(--fg); font-weight: 500; }
.sg-sep { width: 1px; height: 18px; margin: 0 6px; background: var(--line); }
.sg-grow { flex: 1; }
.sg-muted { color: var(--faint); font-size: 13px; }
#sg-search { width: 180px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); outline: none; }
.sg-gridbox { position: relative; flex: 1; min-height: 0; }
.sg-scroll { position: absolute; inset: 0; overflow: auto; outline: none; }
.sg-inner { position: relative; }
.sg-head { position: sticky; top: 0; z-index: 4; display: flex; height: 34px; background: var(--side); border-bottom: 1px solid var(--line-strong); }
.sg-head > .sg-num { position: sticky; left: 0; z-index: 2; background: var(--side); }
.sg-hcell { position: relative; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-right: 1px solid var(--line); font-size: 13px; font-weight: 500; cursor: pointer; flex: none; overflow: hidden; }
.sg-hcell:hover { background: var(--hover); }
.sg-head .sg-prim { position: sticky; left: 64px; z-index: 2; background: var(--side); }
.sg-hname { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sg-hadd { width: 52px; justify-content: center; border: 0; border-right: 1px solid var(--line); background: none; color: var(--muted); font-size: 18px; }
.sg-glyph { display: inline-grid; place-items: center; width: 16px; color: var(--faint); font-size: 12px; font-weight: 600; flex: none; }
.sg-rs { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 1; }
.sg-rs:hover { background: var(--accent); }
.sg-row, .sg-grp, .sg-addrow { position: absolute; left: 0; height: 34px; }
.sg-row { display: flex; }
.sg-num { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; width: 64px; padding: 0 6px 0 12px; flex: none; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.sg-cell { display: flex; align-items: center; gap: 4px; height: 34px; padding: 0 10px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); overflow: hidden; white-space: nowrap; flex: none; font-size: 13.5px; cursor: default; }
.sg-cell.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.sg-cell.sg-prim { position: sticky; left: 64px; z-index: 1; font-weight: 500; border-right: 1px solid var(--line-strong); }
.sg-row:hover .sg-cell, .sg-row:hover .sg-num { background: color-mix(in srgb, var(--hover) 60%, var(--bg)); }
.sg-row.on .sg-cell, .sg-row.on .sg-num { background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.sg-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.sg-cell a { color: var(--accent); overflow: hidden; text-overflow: ellipsis; }
.sg-chip { display: inline-block; max-width: 100%; padding: 1px 8px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--faint)) 16%, transparent); color: color-mix(in srgb, var(--c, var(--fg)) 80%, var(--fg)); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; }
.sg-check { display: grid; color: #3B8A5C; }
.sg-check svg.i { width: 18px; height: 18px; }
.sg-files { display: flex; gap: 4px; }
.sg-files img { height: 24px; width: auto; max-width: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.sg-file { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 4px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; text-decoration: none; }
.sg-file.big { height: auto; padding: 8px 12px; text-transform: none; font-size: 13px; }
.sg-err { color: var(--bad); font-size: 12px; }
.sg-grp { display: flex; align-items: center; background: var(--side); border-bottom: 1px solid var(--line); cursor: pointer; }
.sg-grp span { position: sticky; left: 0; padding: 0 14px; }
.sg-grp small { margin-left: 6px; color: var(--faint); }
.sg-addrow { display: flex; align-items: center; color: var(--muted); cursor: pointer; border-bottom: 1px solid var(--line); }
.sg-addrow span { position: sticky; left: 0; padding: 0 16px; }
.sg-addrow:hover { background: var(--hover); color: var(--fg); }
.sg-editor { position: absolute; z-index: 5; padding: 6px 10px; border: 2px solid var(--accent); border-radius: 0; background: var(--panel); outline: none; font-size: 13.5px; box-shadow: 0 6px 18px rgba(0,0,0,.15); resize: none; }
.sg-pop { position: fixed; z-index: 45; width: 280px; max-height: 320px; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.sg-pop > input { height: 32px; margin-bottom: 4px; }
.sg-plist { overflow-y: auto; }
.sg-plist button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; }
.sg-plist button:hover { background: var(--hover); }
.sg-plist i { width: 14px; color: var(--accent); font-style: normal; }
.sg-plist p { margin: 8px; color: var(--faint); }
.sg-pop.wide { width: min(560px, calc(100vw - 16px)); max-height: 70vh; overflow-y: auto; padding: 12px; gap: 8px; }
.sg-ptitle2 { color: var(--muted); font-size: 13px; }
.sg-cond { display: flex; align-items: center; gap: 6px; }
.sg-cond select, .sg-cond input { height: 32px; min-width: 0; flex: 1; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.sg-conj { width: 64px; flex: none !important; color: var(--muted); font-size: 13px; }
.sg-prow { display: flex; gap: 8px; }
.sg-tog { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.sg-tog input { accent-color: var(--accent); }
.sg-pop.wide > select { height: 34px; }
.sg-choices { display: grid; gap: 6px; }
.sg-choice { display: flex; align-items: center; gap: 8px; }
.sg-choice input { flex: 1; }
.sg-dot { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; flex: none; }
.sg-opts { display: grid; gap: 8px; }
.sg-opts textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; font-size: 13px; }
.sg-fhelp { display: flex; flex-wrap: wrap; gap: 4px; }
.sg-fhelp button { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--muted); font-size: 12px; cursor: pointer; }
.sg-fhelp button:hover { color: var(--fg); border-color: var(--line-strong); }
@media (max-width: 760px) { #sg-search { width: 120px; } }

.sg-filespop .sg-flist { display: grid; gap: 4px; margin-bottom: 8px; overflow-y: auto; }
.sg-frow { display: flex; align-items: center; gap: 6px; }
.sg-frow a { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 4px; border-radius: 6px; color: inherit; text-decoration: none; }
.sg-frow a:hover { background: var(--hover); }
.sg-frow img { width: 40px; height: 40px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); flex: none; }
.sg-frow span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }
.sg-filespop p { margin: 6px; color: var(--faint); }

/* Dashboard */
.db { display: grid; gap: 20px; }
.db-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px; align-items: start; }  /* Today and Team side by side on wide screens */
.db-cols > :only-child { grid-column: 1 / -1; }
.db-hello h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.db-hello p { margin: 4px 0 0; color: var(--muted); }
.db-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--panel); }
.db-note p { flex: 1; margin: 0; white-space: pre-wrap; }
.db-muted { color: var(--faint); }
.db-shift { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.db-shift > div { flex: 1; display: grid; }
.db-shift small { color: var(--muted); }
.db-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); flex: none; }
.db-shift.on .db-dot { background: #3B8A5C; box-shadow: 0 0 0 4px color-mix(in srgb, #3B8A5C 20%, transparent); }
.db-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.db-stat { display: grid; gap: 2px; padding: 14px 16px; border-left: 1px solid var(--line); }
.db-stat:first-child { border-left: 0; }
.db-stat b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-stat b.warn { color: var(--bad); }
.db-stat span { color: var(--muted); font-size: 13px; }
.db-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.db-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.db-head .link { font-size: 13px; text-decoration: none; }
.db-team { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.db-trow { display: grid; grid-template-columns: 1.4fr 1.4fr .8fr .6fr .6fr; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.db-trow:first-child { border-top: 0; }
.db-thead { color: var(--faint); font-size: 12px; }
.db-in { color: #3B8A5C; }
@media (max-width: 600px) { .db-cols { grid-template-columns: 1fr; } .db-stat { border-left: 0; border-top: 1px solid var(--line); } .db-trow { grid-template-columns: 1fr 1fr .7fr; } .db-trow span:nth-child(4), .db-trow span:nth-child(5) { display: none; } }

/* Sheets: row height, thumbnails, drop target, buttons, viewer, gallery */
.sg-row, .sg-grp, .sg-addrow, .sg-cell { height: var(--rh, 34px); }
.sg-files img, .sg-vid video { display: block; height: calc(var(--rh, 34px) - 10px); width: auto; max-width: calc((var(--rh, 34px) - 10px) * 1.8); object-fit: cover; border-radius: 4px; border: 1px solid var(--line); cursor: zoom-in; background: var(--side); }
.sg-vid { position: relative; display: block; cursor: zoom-in; }
.sg-vid::after { content: "▶"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-size: 10px; text-shadow: 0 0 4px rgba(0,0,0,.8); pointer-events: none; }
.sg-files .sg-file { cursor: zoom-in; }
.sg-drop { box-shadow: inset 0 0 0 2px var(--accent) !important; background: color-mix(in srgb, var(--accent) 8%, var(--bg)) !important; }
.sg-btn { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 6px; background: var(--c); color: #fff !important; font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.sg-btn:hover { filter: brightness(1.08); }
.sg-btn[aria-disabled] { opacity: .45; cursor: not-allowed; }
.sg-viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: rgba(15,15,14,.92); color: #fff; }
.sg-vbar { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; flex: none; }
.sg-vbar small { color: rgba(255,255,255,.6); }
.sg-vbar .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.sg-vbar .icon-btn { color: #fff; }
.sg-vstage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 24px; }
.sg-vstage img, .sg-vstage video { max-width: calc(100% - 120px); max-height: 100%; object-fit: contain; border-radius: 6px; }
.sg-varrow { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; flex: none; }
.sg-varrow:hover { background: rgba(255,255,255,.22); }
.sg-gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 16px; }
.sg-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.sg-cover { position: relative; display: grid; place-items: center; height: 200px; background: var(--side); color: var(--faint); font-size: 13px; }
.sg-cover { overflow: hidden; }
.sg-cover > img, .sg-cover > .sg-vid { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border: 0; border-radius: 0; }
.sg-cover .sg-vid video { width: 100%; height: 100%; max-width: none; object-fit: cover; border: 0; border-radius: 0; }
.sg-cover > .sg-file { position: static; }
.sg-cover > small { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 10px; background: rgba(0,0,0,.6); color: #fff; }
.sg-cbody { display: grid; gap: 8px; padding: 12px 14px 14px; }
.sg-cbody > b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-cf small { display: block; color: var(--faint); font-size: 11.5px; }
.sg-cf > div { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-height: 20px; font-size: 13.5px; overflow: hidden; }
.sg-cf .sg-files img { height: 40px; }
.sg-more { display: flex; justify-content: center; padding: 0 0 24px; }

/* Tasks: project label */
.tk-proj { padding: 1px 8px; border-radius: 6px; background: color-mix(in srgb, #B8862E 14%, transparent); color: color-mix(in srgb, #B8862E 85%, var(--fg)); font-size: 12px; white-space: nowrap; }
.tk-projlink { display: inline-block; margin: -6px 0 14px; color: var(--accent); font-size: 13px; text-decoration: none; }

/* Projects */
.pj-boardwrap { overflow-x: auto; }
.pj-board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; align-items: start; min-width: 1140px; }
.pj-col { min-height: 240px; padding: 8px; border-radius: var(--r); background: var(--side); }
.pj-col.over { outline: 2px dashed var(--accent); outline-offset: -2px; }
.pj-colhead { display: flex; justify-content: space-between; padding: 4px 6px 10px; font-weight: 500; }
.pj-colhead small { color: var(--faint); font-weight: 400; }
.pj-card { display: grid; gap: 7px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: inherit; text-decoration: none; }
.pj-card:hover { border-color: var(--line-strong); }
.pj-meta { color: var(--muted); font-size: 12.5px; }
.pj-meta .late, input.late { color: var(--bad); }
.pj-bar { height: 6px; border-radius: 3px; background: var(--active); overflow: hidden; }
.pj-bar i { display: block; height: 100%; background: #3B8A5C; border-radius: 3px; }
.pj-people { display: flex; gap: 4px; }
.pj-people i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--active); color: var(--muted); font-size: 10.5px; font-style: normal; font-weight: 600; }
.pj-page { display: grid; gap: 18px; }
.pj-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.pj-fields label, .pj-goal { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.pj-fields select, .pj-fields input, .pj-prow select, .pj-prow input { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.pj-prog { display: grid; gap: 6px; min-width: 220px; flex: 1; padding-bottom: 6px; color: var(--muted); font-size: 13px; }
.pj-goal textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); color: var(--fg); resize: vertical; }
.pj-goal p { margin: 0; color: var(--fg); font-size: 14px; white-space: pre-wrap; }
.pj-parts { display: grid; gap: 10px; }
.pj-part { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.pj-part.done { opacity: .75; }
.pj-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; }
.pj-prow b { flex: 1; min-width: 160px; font-weight: 600; }
.pj-pstatus.st-done { color: #3B8A5C; } .pj-pstatus.st-blocked { color: var(--bad); } .pj-pstatus.st-doing { color: var(--accent); }
.pj-tasks { padding: 0 12px 10px 12px; }
.pj-tasks .tk-row { min-height: 36px; border-bottom: 1px solid var(--line); }
.pj-tasks .tk-title { cursor: pointer; }
.pj-addtask input { width: 100%; height: 34px; margin-top: 8px; }

/* Calendar */
.cal-title { margin-left: 6px; font-weight: 600; }
.cal-body { display: flex; flex-direction: column; gap: 10px; }
.cal-body:has(.cal-week) { overflow: hidden; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-dow { padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--faint); font-size: 12px; background: var(--side); }
.cal-dow b { margin-left: 4px; color: var(--fg); }
.cal-dow b.today { color: var(--accent); }
.cal-day { display: flex; flex-direction: column; gap: 3px; min-height: 110px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; }
.cal-day:hover { background: color-mix(in srgb, var(--hover) 50%, transparent); }
.cal-day.other { background: color-mix(in srgb, var(--side) 60%, transparent); }
.cal-day.other .cal-num { color: var(--faint); }
.cal-num { font-size: 12.5px; color: var(--muted); }
.cal-day.today .cal-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; }
.cal-item { --c: #7A7770; display: block; width: 100%; padding: 2px 6px; border: 0; border-left: 3px solid var(--c); border-radius: 4px; background: color-mix(in srgb, var(--c) 14%, var(--panel)); color: var(--fg); font-size: 12px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.cal-item small { color: var(--muted); }
.cal-item.done { opacity: .5; text-decoration: line-through; }
.k-meeting { --c: #3B82C4; } .k-deadline { --c: #C96442; } .k-goal { --c: #3B8A5C; } .k-off { --c: #9C9A92; } .k-other { --c: #8A5CC9; } .k-task { --c: #6F6E69; } .k-project { --c: #B8862E; }
.cal-more { padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: 12px; text-align: left; cursor: pointer; }
.cal-key { display: flex; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; }
.cal-key span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 3px; background: var(--c); vertical-align: -1px; }
.cal-week { display: flex; flex-direction: column; flex: 1; min-height: 360px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-whead, .cal-allday { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-whead .cal-dow { border-right: 1px solid var(--line); }
.cal-allday { border-bottom: 1px solid var(--line-strong); }
.cal-gut { padding: 6px; color: var(--faint); font-size: 11px; }
.cal-adcell { display: flex; flex-direction: column; gap: 3px; min-height: 34px; padding: 4px; border-left: 1px solid var(--line); cursor: pointer; min-width: 0; }
.cal-grid { position: relative; display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); flex: 1; min-height: 0; overflow-y: auto; }
.cal-hours div { height: var(--hour); padding: 2px 6px; color: var(--faint); font-size: 11px; text-align: right; }
.cal-col { position: relative; border-left: 1px solid var(--line); min-width: 0; }
.cal-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cal-slot { height: var(--hour); border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-slot:hover { background: var(--hover); }
.cal-tev { position: absolute; left: 3px; right: 3px; }
.cal-tev .cal-item { height: 100%; white-space: normal; }
.cal-people { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--muted); font-size: 13px; }
.cal-people > span { width: 100%; }
.cal-people label { display: inline-flex; gap: 6px; align-items: center; color: var(--fg); }
.cal-allbox { align-self: end; padding-bottom: 8px; }
.dlg input[type=time] { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.btn.bad { justify-self: start; }
@media (max-width: 760px) { .cal-day { min-height: 70px; } .cal-item { font-size: 11px; } }

/* Dashboard: my project parts */
.db-part { display: grid; grid-template-columns: 100px 1fr auto 70px; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.db-part:hover { background: var(--hover); }
.db-pname { display: grid; min-width: 0; }
.db-pname b { font-weight: 500; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.db-pname small { color: var(--muted); }
.db-pst { justify-self: start; padding: 1px 8px; border-radius: 6px; background: var(--active); color: var(--muted); font-size: 12px; white-space: nowrap; }
.db-pst.st-doing { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.db-pst.st-blocked { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }

/* Finance */
.fn-body { display: flex; flex-direction: column; gap: 16px; }
.fn-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.fn-top label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
.fn-top select, .fn-top input[type=month], .fn-top input[type=search] { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.fn-warn { color: var(--bad); font-size: 13px; }
.fn-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.fn-pnl, .fn-lines { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fn-pnl th, .fn-pnl td, .fn-lines th, .fn-lines td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fn-pnl thead th, .fn-lines thead th { position: sticky; top: 0; background: var(--side); color: var(--muted); font-weight: 500; text-align: left; }
.fn-pnl td { text-align: right; cursor: pointer; }
.fn-pnl td:hover { background: var(--hover); }
.fn-pnl tbody th { text-align: left; font-weight: 400; }
.fn-pnl thead th:not(:first-child) { text-align: right; }
.fn-sec th { padding-top: 14px; color: var(--faint); font-size: 12px; font-weight: 500 !important; }
.fn-total th, .fn-total td { font-weight: 600 !important; border-top: 1px solid var(--line-strong); }
.fn-share th, .fn-share td { color: var(--muted); }
.fn-profit th, .fn-profit td { font-weight: 700 !important; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.fn-dim th { color: var(--faint); }
.fn-note { margin: 0; font-size: 12.5px; }
.fn-lines .num { text-align: right; }
.fn-lines td.income { color: #3B8A5C; }
.fn-lines .fn-desc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.fn-lines select { max-width: 160px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; }
.fn-lines select:hover, .fn-lines select:focus { border-color: var(--line-strong); background: var(--panel); }
.fn-lines .icon-btn svg.i { width: 16px; height: 16px; }
.fn-src { padding: 0 5px; border-radius: 4px; background: var(--active); color: var(--muted); font-size: 10.5px; }
.fn-norcpt { color: var(--faint) !important; font-size: 12px; }
.fn-split { width: 56px; height: 28px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); text-align: right; }
.fn-lines .warn, .db-stat b.warn { color: var(--bad); }
.fn-accts { display: grid; gap: 8px; }
.fn-acct { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.fn-acct > div:first-child { flex: 1; display: grid; }
.fn-acct small, .fn-bal small { color: var(--muted); }
.fn-bal { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.fn-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.fn-card { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-width: 0; }
.fn-card h3 { margin: 0; font-size: 15px; } .fn-card p { margin: 0; }
.fn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fn-row select { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.fn-mapgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.fn-mapgrid label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; }
.fn-mapgrid select { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
#fi-map { display: grid; gap: 10px; } #fi-map h4 { margin: 4px 0 0; }
.fn-chip { display: inline-block; margin: 1px 3px 1px 0; padding: 0 7px; border-radius: 8px; background: var(--active); color: var(--muted); font-size: 12px; }
.fn-tags { max-width: 240px; white-space: normal !important; }
.fn-files { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; }
.fn-files svg.i { width: 14px; height: 14px; }
.fn-pick { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 150px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--fg); font-size: 13px; }
.fn-pick label { display: inline-flex; align-items: center; gap: 5px; }
.fn-pick input { accent-color: var(--accent); }
.fn-splitnote { margin: 0; min-height: 18px; }
.fn-mapbox { display: grid; gap: 8px; }
.fn-ops .fo-row { cursor: pointer; }
.fn-ops .fo-row:hover { background: var(--hover); }
.fo-caret { display: inline-block; width: 12px; color: var(--faint); }
.fo-sub td { color: var(--muted); font-size: 12.5px; }
.fo-sub td:first-child { padding-left: 34px; }

/* swaps */
.sw-page { color: var(--accent); text-decoration: none; }
.sw-page:hover { text-decoration: underline; }
.sg-types { display: grid; gap: 6px; }
.sg-types p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.sg-types > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sg-type { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-type:hover { background: var(--hover); }
.sg-type input { position: absolute; opacity: 0; pointer-events: none; }
.sg-type i { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--hover); font-style: normal; color: var(--muted); }
.sg-type:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sg-type:has(input:checked) i { background: var(--accent); color: var(--on-accent); }
.sg-type:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 560px) { .sg-types > div { grid-template-columns: repeat(2, 1fr); } }
svg.i .logo { fill: currentColor; stroke: none; }  /* platform logos are filled, the rest are line icons */
/* links */
.lk-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.lk-tabs button { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); cursor: pointer; }
.lk-tabs button:hover { background: var(--hover); color: var(--fg); }
.lk-tabs button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.lk-table tbody tr { cursor: pointer; }
.lk-table tbody tr:hover { background: var(--hover); }
.lk-sort { cursor: pointer; user-select: none; }
.lk-sort.on { color: var(--fg); }
.lk-sort.on::after { content: ' ↓'; }
.lk-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lk-name i { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--hover); color: var(--muted); }
.lk-name span { display: grid; min-width: 0; }
.lk-name small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.lk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.lk-head p { margin: 4px 0 0; }
.lk-head label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.lk-charts { position: relative; display: grid; gap: 12px; margin: 14px 0; }
.lk-chart { padding: 12px 14px 6px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.lk-chart h4 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lk-chart svg { display: block; width: 100%; height: 150px; overflow: visible; }
.lk-chart text { font-size: 11px; fill: var(--muted); }
.lk-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lk-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.lk-cross { stroke: var(--line-strong); stroke-width: 1; }
.lk-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.lk-tip { position: absolute; z-index: 5; display: grid; gap: 4px; min-width: 170px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 13px; pointer-events: none; }
.lk-tip span { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.lk-tip em { font-style: normal; color: var(--fg); font-variant-numeric: tabular-nums; }
.lk-days summary { cursor: pointer; color: var(--muted); margin: 8px 0; }
.lk-tabs .lk-oldbtn { border-style: dashed; }
/* models gallery */
.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.md-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; cursor: pointer; transition: transform .12s; }
.md-card:hover { transform: translateY(-2px); }
.md-card.old { opacity: .6; }
.md-photo { position: relative; aspect-ratio: 4 / 5; background: var(--hover); display: grid; place-items: center; }
.md-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.md-photo > span { font-size: 40px; font-weight: 600; color: var(--faint); }
.md-photo em { position: absolute; left: 10px; top: 10px; padding: 2px 8px; border-radius: 999px; background: var(--bg); font-style: normal; font-size: 12px; color: var(--muted); }
.md-more { position: absolute; right: 8px; top: 8px; background: var(--bg); border-radius: 999px; }
.md-info { display: grid; gap: 3px; padding: 12px 14px 14px; }
.md-info b { font-size: 15px; }
.md-info .db-muted { font-size: 12px; }
.me-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-name:hover { text-decoration: underline; }
.dlg input[type=password] { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
/* reddit organic */
.rd-cards { display: grid; gap: 14px; }
.rd-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.rd-card.finished { opacity: .7; }
.rd-card > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rd-tools { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.rd-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--hover); font-size: 12px; color: var(--fg); margin-left: 4px; }
.rd-pill.soft { color: var(--muted); }
.rd-pill.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.rd-task { padding: 10px 16px; border-top: 1px solid var(--line); }
.rd-card > header + .rd-task { border-top: 0; }
.rd-task.done .rd-head b { color: var(--muted); text-decoration: line-through; }
.rd-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-check { width: 26px; height: 26px; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 999px; background: none; color: transparent; cursor: pointer; }
.rd-check.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rd-check.err { border-color: var(--bad); }
.rd-check:disabled { opacity: .4; cursor: default; }
.rd-check svg.i { width: 16px; height: 16px; }
.rd-post { display: flex; gap: 14px; margin: 10px 0 0 34px; flex-wrap: wrap; }
.rd-media { flex: none; width: 140px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--hover); }
.rd-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-postinfo { flex: 1; min-width: 240px; display: grid; gap: 6px; font-size: 14px; }
.rd-postinfo p { margin: 0; }
.rd-postinfo b { display: inline-block; min-width: 76px; color: var(--muted); font-weight: 500; }
.rd-caption { font-weight: 500; }
.rd-postid { display: flex; gap: 8px; }
.rd-postid input { flex: 1; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); }
.rd-actions { display: flex; gap: 8px; margin: 8px 0 0 34px; }
.rd-postinfo .rd-actions { margin-left: 0; }
.rd-postinfo textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); resize: vertical; }
@media (max-width: 640px) { .rd-post, .rd-actions { margin-left: 0; } .rd-media { width: 100%; } }
.rd-media.none { display: none; }
.rd-stat { cursor: pointer; text-align: left; font: inherit; color: inherit; border: 0; background: none; }
.rd-stat.on b { color: var(--accent); }
.ra-hist td { background: var(--bg); }
.ra-mini { width: 100%; font-size: 13px; border-collapse: collapse; }
.ra-mini td { padding: 4px 8px; border: 0; }
.lk-table select { max-width: 150px; }
.rd-body .db-stats { margin-bottom: 14px; }
.rd-reply { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.rd-form { padding: 16px; display: grid; gap: 12px; }
.rd-form textarea, .rd-form input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); resize: vertical; }
.rd-form .rd-actions { margin-left: 0; }
.rd-drafts { display: grid; gap: 8px; }
.rd-draft { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 15px; }
@media (max-width: 860px) { .rd-reply { grid-template-columns: 1fr; } }
.rd-form .seg { justify-self: start; }
.rd-h { margin: 22px 0 10px; font-size: 15px; font-weight: 600; }
.rd-h .db-muted { font-weight: 400; font-size: 13px; }
.rd-bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; }
.rd-bars i { flex: 1; min-width: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.rd-gold { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rd-goldcard { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.rd-goldcard > div { display: grid; gap: 3px; align-content: start; font-size: 13px; min-width: 0; }
.rd-goldcard .btn { justify-self: start; margin-top: 4px; }
.rd-thumb { flex: none; width: 72px; height: 90px; border-radius: 8px; object-fit: cover; background: var(--hover); display: block; }
.rd-flat { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.rd-up { width: 80px; height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); text-align: right; }
.rd-pick { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rd-pick input[type=search] { width: 100%; height: 34px; padding: 0 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.rd-pick > div { max-height: 170px; overflow-y: auto; padding: 6px 8px; display: grid; gap: 2px; font-size: 13px; }
.rd-pick label { display: flex; gap: 8px; align-items: center; }
.rd-pick label[hidden] { display: none; }
.rd-bars { overflow: hidden; }
.rd-bars i { min-width: 1px; }
/* sops */
.sop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.sop-sec { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 8px; }
.sop-sec h3 { margin: 6px 8px 8px; font-size: 15px; }
.sop-sec h3 small { color: var(--muted); font-weight: 400; }
.sop-row { display: flex; align-items: center; border-radius: 8px; }
.sop-row:hover { background: var(--hover); }
.sop-row a { flex: 1; display: flex; align-items: center; gap: 10px; padding: 8px; color: var(--fg); text-decoration: none; min-width: 0; }
.sop-row a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sop-row a svg.i { color: var(--muted); }
.bar #sop-q { height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); width: 200px; }
/* test builder */
.tb-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.tb-step { padding: 14px; display: grid; gap: 10px; }
.tb-step h4 { margin: 0; font-size: 14px; }
.tb-step select, .tb-step input[type=search], .tb-step input[type=text] { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); }
.tb-wide { grid-column: 1 / -1; }
.tb-list { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; }
.tb-item { display: grid; text-align: left; padding: 7px 9px; border: 0; border-radius: 8px; background: none; color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; }
.tb-item:hover { background: var(--hover); }
.tb-item.on { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tb-info { border-top: 1px solid var(--line); padding-top: 10px; font-size: 13px; display: grid; gap: 6px; }
.tb-info p { margin: 0; }
.tb-titles { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tb-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.tb-card { display: flex; gap: 10px; text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); font: inherit; cursor: pointer; }
.tb-card span { display: grid; gap: 2px; align-content: start; min-width: 0; font-size: 13px; }
.tb-card small { color: var(--muted); font-size: 12px; }
.tb-card.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tb-card:disabled { opacity: .45; cursor: not-allowed; }
.tb-cap { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.tb-cap > div { flex: 1; display: grid; gap: 6px; font-size: 13px; }
.rd-review { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.rd-verdict { font-weight: 600; }
.rd-verdict.add, .rd-verdict.swap { color: #3B8A5C; }
@media (max-width: 860px) { .tb-steps { grid-template-columns: 1fr; } }
/* Reddit Organic: one line per task (Jack 15 Nov: staff have the SOPs, no explanations); status colours */
:root { --good: #3B8A5C; --warn: #B7791F; --info: #3B6FB5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --good: #6BBF8A; --warn: #E0A84E; --info: #7FA6E0; } }
:root[data-theme="dark"] { --good: #6BBF8A; --warn: #E0A84E; --info: #7FA6E0; }
.rd-pill.good { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.rd-pill.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.rd-pill.info { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.rd-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.rd-card > header + .rd-row { border-top: 0; }
.rd-row.done > b, .rd-row.done > a:first-of-type { color: var(--muted); text-decoration: line-through; }
.rd-row .rd-pill { margin-left: 0; }
.rd-faint { color: var(--faint); font-size: 13px; }
.rd-err { flex-basis: 100%; margin: 0 0 0 36px; }
.rd-mini { width: 44px; height: 55px; object-fit: cover; border-radius: 6px; background: var(--hover); flex: none; }
.rd-pi { flex: 1; min-width: 220px; display: grid; gap: 3px; }
.rd-pi > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-cap { all: unset; cursor: copy; font-weight: 500; line-height: 1.35; }
.rd-cap:hover { color: var(--accent); }
.rd-pa { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-pa .rd-postid input { width: 170px; }
.rd-rules p { white-space: pre-wrap; margin: 0 0 10px; max-height: 50vh; overflow: auto; }
.rd-golddet { margin: 0 0 16px; }
.rd-golddet > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
@media (max-width: 640px) { .rd-pa { flex-basis: 100%; } .rd-pa .rd-postid { flex: 1; } .rd-pa .rd-postid input { width: auto; flex: 1; } }
/* Reddit Analytics: one-hue sparklines (single series, hover for values), best/worst side by side */
.an-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 28px; width: 140px; vertical-align: middle; }
.an-spark i { flex: 1; min-width: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.an-spark i:hover { background: var(--accent-hover); }
.an-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.sop-todo { color: var(--warn, #B7791F); font-size: 12px; white-space: nowrap; }
/* Spoofer (Tools) */
.sf-body { max-width: 760px; display: grid; gap: 16px; }
.sf-drop { display: grid; place-items: center; gap: 4px; padding: 36px 16px; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: var(--panel); cursor: pointer; text-align: center; }
.sf-drop.drag, .sf-drop:hover { border-color: var(--accent); }
.sf-list { border: 1px solid var(--line); border-radius: 12px; max-height: 280px; overflow: auto; }
.sf-row { display: grid; grid-template-columns: 1fr auto 90px auto; gap: 12px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.sf-row:first-child { border-top: 0; }
.sf-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-opts { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; }
.sf-opts > label, .sf-custom > label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.sf-custom { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.sf-custom b { color: var(--fg); font-weight: 600; }
.sf-custom input[type=range] { accent-color: var(--accent); width: 100%; }
/* Content (Work): tag one item at a time, library grid, tag manager */
.ct-tag { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 24px; align-items: start; }
.ct-media { display: grid; gap: 8px; }
.ct-big { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: var(--hover); }
.ct-form { display: grid; gap: 16px; }
.ct-form > label { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.ct-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-chip { padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--fg); font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ct-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ct-chip:disabled { opacity: .4; cursor: default; }
.ct-chip.off { opacity: .5; text-decoration: line-through; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ct-card { all: unset; cursor: pointer; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); font-size: 13px; }
.ct-card:hover { border-color: var(--accent); }
.ct-card .rd-pill { justify-self: start; margin-left: 0; }
.ct-thumb { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; background: var(--hover); }
.ct-thumb.none, .ct-big.none { visibility: hidden; }
.ct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ct-tags { display: grid; gap: 12px; max-width: 900px; }
@media (max-width: 760px) { .ct-tag { grid-template-columns: 1fr; } }
.ct-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.ct-strip button { all: unset; cursor: pointer; flex: none; width: 64px; height: 80px; border-radius: 8px; overflow: hidden; outline: 2px solid transparent; }
.ct-strip button.on { outline-color: var(--accent); }
.ct-strip img { width: 100%; height: 100%; object-fit: cover; }
video.ct-big { background: #000; }
.ct-pickbar { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--panel); }
.ct-card { position: relative; }
.ct-card.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.ct-num { position: absolute; top: 14px; left: 14px; z-index: 1; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; }
.ct-edit .rd-row { border-top: 0; }
/* Automations */
.au-table tr[data-id] { cursor: pointer; }
.au-table tr.on td { background: var(--hover); }
.au-open td { background: var(--panel); }
.au-detail { display: grid; gap: 8px; padding: 6px 4px; }
.au-detail p { margin: 0; }
.au-detail h4 { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.au-err { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.au-err pre { margin: 0; max-height: 160px; overflow: auto; white-space: pre-wrap; font-size: 12px; color: var(--muted); }
.au-ok { color: var(--good); } .au-late { color: var(--warn); } .au-broken { color: var(--bad); }
/* Reddit v2: warm-up plan grid */
.pl-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.pl-num { width: 56px; height: 30px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--fg); text-align: right; }
.pl-note { width: 100%; min-width: 220px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); }
.pl-table select { height: 30px; }

.rd-tabs { flex-wrap: wrap; }  /* 8 manager tabs wrap on phones instead of widening the page */
