/* 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: a rail of sections + the picked section's pages (nav.js), then one app */
.os { display: grid; grid-template-columns: auto 1fr; height: 100vh; }
.side { display: flex; background: var(--side); overflow: hidden; }
.side .rail { display: flex; flex-direction: column; gap: 4px; width: 84px; padding: 12px 6px; border-right: 1px solid var(--line); overflow-y: auto; }
.side .rail-list, .side .nav-list, .side .kids { display: flex; flex-direction: column; gap: 2px; }
.side .rail-list { gap: 4px; }
.side .rail-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 7px; border: 0; border-radius: 12px; background: none; color: var(--muted); font-size: 11.5px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.side .rail-btn:hover { background: var(--hover); color: var(--fg); }
.side .rail-btn.on { background: var(--active); color: var(--fg); font-weight: 500; }
.side .panel { display: flex; flex-direction: column; width: 220px; padding: 12px 10px; border-right: 1px solid var(--line); overflow-y: auto; }
.side.solo .panel { display: none; }
.side .panel-title { padding: 6px 8px 12px; font-weight: 600; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 14px; font-weight: 600; letter-spacing: -.01em; }
.brand img { width: 22px; height: 22px; }
.side .rail .brand { justify-content: center; padding: 6px 0 12px; }
.side .rail .brand span { display: none; }
.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 .fold { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 8px; border: 0; border-radius: var(--r); background: none; color: var(--muted); text-align: left; cursor: pointer; }
.side .fold:hover { background: var(--hover); color: var(--fg); }
.side .fold.shut.has-on { background: var(--active); color: var(--fg); font-weight: 500; }  /* folded, with the open page inside */
.side .fold span { flex: 1; }
.side .fold em { padding: 0 7px; border-radius: 999px; background: var(--hover); font-style: normal; font-size: 11px; line-height: 18px; }
.side .fold > svg.i:last-child { width: 14px; height: 14px; transition: transform .15s; }
.side .fold.shut > svg.i:last-child { transform: rotate(-90deg); }
.side .kids { margin-left: 16px; padding-left: 8px; border-left: 1px solid var(--line); }
.side .spacer { flex: 1; }
.me { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.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) {  /* phone: top bar, the section's pages in a row, sections as a tab bar along the bottom */
  .os { grid-template-columns: 1fr; grid-template-rows: auto 1fr; padding-bottom: 58px; }
  .side { flex-direction: column; border-bottom: 1px solid var(--line); }
  .side .rail { flex-direction: row; align-items: center; width: auto; padding: 6px 8px; border-right: 0; }
  .side .rail .brand { padding: 0 6px; }
  .side .rail-list { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; flex-direction: row; gap: 0; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--side); }
  .side .rail-btn, .side .rail-btn.on { flex: 1 1 0; min-width: 0; padding: 6px 0; font-size: 10px; font-weight: 400; letter-spacing: -.01em; }
  .me { flex-direction: row; }
  .side .panel { flex-direction: row; width: auto; padding: 6px 8px; border: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .side .panel .nav-list, .side .panel .kids { display: contents; }
  .side .panel-title { display: none; }
  .nav, .side .fold { flex: none; width: auto; }
  .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(260px, 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-q { width: 240px; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); outline: none; }
.wb-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.wb-tag { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 12px; cursor: pointer; }
.wb-tag:hover { border-color: var(--line-strong); }
.wb-tag.on { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.wb-found { margin: 0 0 12px; color: var(--muted); }
.wb-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.wb-tags i { padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 11px; font-style: normal; }
.sh-pop { position: fixed; z-index: 50; width: 360px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 12px 32px rgba(0,0,0,.16); }
.sh-top { display: flex; align-items: center; gap: 8px; margin: -4px -6px 12px 0; }
.sh-top h3 { flex: 1; min-width: 0; }
.sh-pop h3 { margin: 0; font-size: 15px; font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sh-add { position: relative; }
.sh-add input { width: 100%; padding-right: 36px; }
.sh-all { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); }
.sh-found { max-height: 300px; overflow: auto; }
.sh-row select { width: auto; padding: 3px 6px; font-size: 13px; }
.sh-found { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1; padding: 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.sh-found .sh-row { padding: 2px 8px; border-radius: 6px; }
.sh-found .sh-row:hover { background: var(--hover); }
.sh-found p { margin: 6px 8px; color: var(--faint); }
.sh-h { margin: 16px 0 6px; font-size: 12px; color: var(--faint); }
.sh-list { max-height: 260px; overflow: auto; }
.sh-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.sh-row .sh-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sh-row > small, .sh-name small { color: var(--faint); }
.sh-face { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 600; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sh-foot small { color: var(--faint); }
.sh-foot .btn { display: inline-flex; align-items: center; gap: 6px; }
.sh-foot .btn svg { width: 15px; height: 15px; }

.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 p.fn-warn { color: var(--bad); }
.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; }
.sb-icon { color: var(--ink, #fff); }
.sb-icon .i { width: 20px; height: 20px; }
.sb-preview { display: grid; place-items: center; padding: 16px; margin-bottom: 4px; border-radius: var(--r); background: var(--side); }
.sb-preview .sb-card { width: 280px; }
.bar .sb-search { width: 220px; }
.sb-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px 0; }
.sb-filters select { width: auto; }
.sb-group { margin: 22px 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sb-group:first-child { margin-top: 0; }
.sb-group span { color: var(--faint); font-weight: 400; margin-left: 4px; }
.sb-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sb-pill { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--side); color: var(--muted); font-size: 11.5px; font-weight: 400; line-height: 18px; }
.sb-pill.op { box-shadow: inset 0 0 0 1px var(--line); background: none; }
.sb-list { width: 100%; table-layout: fixed; }
.sb-list th:nth-child(1) { width: 30%; } .sb-list th:nth-child(2) { width: 13%; } .sb-list th:nth-child(3), .sb-list th:nth-child(4) { width: 18%; } .sb-list th:nth-child(5) { width: 70px; } .sb-list th:nth-child(7) { width: 44px; }
.sb-list td { overflow: hidden; text-overflow: ellipsis; }
.sb-list td, .sb-list th { vertical-align: middle; text-align: left; }
.sb-list td:last-child { width: 40px; }
.sb-list tr[data-open] { cursor: pointer; }
.sb-list tr[data-open]:hover td { background: var(--side); }
.sb-cell { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.sb-cell .sb-icon { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
.sb-cell .sb-icon .i { width: 16px; height: 16px; }
.sb-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-sw { width: 26px; height: 26px; border-radius: 50%; background: var(--c); cursor: pointer; position: relative; }
.sb-sw input, .sb-ic input { position: absolute; opacity: 0; pointer-events: none; }
.sb-sw:has(input:checked) { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.sb-icons { display: grid; grid-template-columns: repeat(auto-fill, 38px); gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.sb-icsec { grid-column: 1 / -1; margin-top: 6px; font-size: 11.5px; color: var(--faint); }
.sb-ic { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); color: var(--fg); cursor: pointer; font-weight: 600; }
.sb-ic:hover { border-color: var(--line-strong); }
.sb-ic:has(input:checked) { background: var(--fg); color: var(--panel); border-color: var(--fg); }
.sb-ic .i { width: 20px; height: 20px; }
.sb-ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; max-height: 180px; overflow: auto; }
.dlg-grid.sb-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) { .bar .sb-search { width: 140px; } .sb-filters { padding: 0 16px 4px; } }
.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; }
.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-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 */

/* X Farming: ink line, ink progress bar, picked row */
.xf-ink .lk-line { stroke: var(--fg); }
.xf-ink .lk-dot { fill: var(--fg); }
.xf-bar { display: flex; align-items: center; gap: 8px; }
.xf-bar .pj-bar { width: 90px; }
.xf-bar .pj-bar i { min-width: 2px; background: var(--fg); }
.xf-table tbody tr[data-id] { cursor: pointer; }
.xf-table tr.on td { background: var(--hover); }
.xf-one { margin: 6px 0 10px; }
.xf-one b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* X F/UF: the "not started" note */
.xu-ours p { margin: 0; padding: 12px 16px 14px; line-height: 1.55; }
.xu-table a { color: inherit; text-decoration: none; }
.xu-table a:hover { text-decoration: underline; }
.rd-subtabs { padding: 12px 20px 0; }
/* Reddit Organic → Queue: filters · one post · subreddit info */
.q-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.q-side { position: sticky; top: 0; display: grid; gap: 6px; }
.q-side h4 { margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.q-side h4:first-child { margin-top: 0; }
.q-chip { display: flex; justify-content: space-between; align-items: center; height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.q-chip span { color: var(--faint); font-size: 12px; }
.q-chip:hover { background: var(--side); }
.q-chip.on { background: var(--panel); border-color: var(--line); font-weight: 500; }
.q-prev { margin-top: 14px; }
.q-stage { display: grid; min-width: 0; }
.q-card { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); transition: transform .18s ease, opacity .18s ease; }
.q-card header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.q-media { display: flex; gap: 6px; justify-content: center; background: var(--side); border-radius: 8px; height: calc(100vh - 290px); min-height: 320px; overflow-x: auto; }
.q-media img { height: 100%; max-width: 100%; object-fit: contain; border-radius: 8px; }
.q-media img + img, .q-media img:first-child:not(:only-child) { max-width: 33%; }
.q-card textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg, var(--panel)); color: inherit; font: inherit; font-size: 15px; resize: vertical; }
.q-actions { display: flex; align-items: center; gap: 10px; }
.q-actions .btn { flex: 1; height: 44px; font-size: 15px; }
.q-actions small { opacity: .55; margin-left: 4px; }
.q-info p { margin: 0 0 6px; }
.q-rule { padding: 8px 10px; border-radius: 8px; background: var(--side); font-size: 13px; }
.q-titles { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.q-titles li span { cursor: pointer; }
.q-titles li span:hover { text-decoration: underline; }
.q-media video, .q-media iframe { height: 100%; width: 100%; border: 0; border-radius: 8px; background: #000; }
.q-cap { position: relative; }
.q-cap textarea { padding-right: 40px; }
.q-cap [data-revert] { position: absolute; top: 6px; right: 6px; }
.q-cap [data-revert][hidden] { display: none; }
.q-round { border-radius: 50%; }
.q-round svg.i { width: 15px; height: 15px; }
.q-titles button { display: inline-grid; vertical-align: middle; width: 24px; height: 24px; margin-left: 4px; opacity: .55; }
.q-titles li:hover button { opacity: 1; }
.q-out-r { transform: translateX(40px) rotate(2deg); opacity: 0; }
.q-out-l { transform: translateX(-40px) rotate(-2deg); opacity: 0; }
@media (max-width: 1100px) { .q-wrap { grid-template-columns: 1fr; } .q-side { position: static; } .q-filters { display: flex; flex-wrap: wrap; } .q-media { height: 60vh; } }
/* X Organic: two cards a row on Today, model board, flat inline inputs on Accounts */
.xo-cards { grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr)); align-items: start; }
.xo-short { color: var(--warn); }
.xo-cap { border: 0; cursor: pointer; font: inherit; font-size: 12px; }
.xo-cap:hover { color: var(--fg); }
.xo-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.xo-model { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.xo-mhead { display: flex; justify-content: space-between; align-items: baseline; }
.xo-in { width: 110px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; }
.xo-in:hover, .xo-in:focus { border-color: var(--line-strong); background: var(--panel); }
.xo-act { display: flex; align-items: center; gap: 12px; }
.xo-body > .rd-h:first-child { margin-top: 0; }
.xo-body > * { flex-shrink: 0; }  /* long tables scroll the page, not themselves */
.xo-body .rd-h { margin: 6px 0 -6px; }
/* Redgifs Organic: one status line, 14-day strip (ink = uploaded, red = failed) */
.rg-state { display: grid; gap: 6px; margin-bottom: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.rg-state p { margin: 0; font-size: 13px; }
.rg-state .rd-pill { margin: 0 6px 0 0; }
.rg-state.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.rg-strip { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 6px; padding: 14px 16px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rg-day { display: grid; justify-items: center; gap: 2px; font-variant-numeric: tabular-nums; }
.rg-day b { font-size: 12px; font-weight: 500; }
.rg-day small { color: var(--faint); font-size: 11px; }
.rg-day.on small { color: var(--fg); font-weight: 600; }
.rg-col { width: 100%; max-width: 34px; height: 72px; display: flex; flex-direction: column; justify-content: flex-end; }
.rg-col i { display: block; min-height: 2px; }
.rg-col i:first-child { border-radius: 3px 3px 0 0; }
.rg-up, .rg-key.rg-up { background: var(--fg); opacity: .8; }
.rg-fail, .rg-key.rg-fail { background: var(--bad); }
.rg-none { height: 2px; background: var(--line-strong); }
.rg-key { display: inline-block; width: 9px; height: 9px; margin: 0 3px 0 8px; border-radius: 2px; vertical-align: -1px; }
.rg-foot, .pa-foot { margin: 10px 0 0; font-size: 12px; line-height: 1.5; }
.db-stat b small { font-size: 14px; font-weight: 400; }
.dlg input[type=number] { height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }  /* Paid Ads cost / subs (and any dialog number) */
/* Analytics → OnlyFans: four type colours (validated for colour-blind separation, light + dark), tile changes, sparkline, heatmap */
:root { --of-0: #2a78d6; --of-1: #d95f35; --of-2: #1baf7a; --of-3: #eda100; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --of-0: #3987e5; --of-1: #e0703f; --of-2: #199e70; --of-3: #c98500; } }
:root[data-theme="dark"] { --of-0: #3987e5; --of-1: #e0703f; --of-2: #199e70; --of-3: #c98500; }
.of-s0 { fill: var(--of-0); background: var(--of-0); } .of-s1 { fill: var(--of-1); background: var(--of-1); }
.of-s2 { fill: var(--of-2); background: var(--of-2); } .of-s3 { fill: var(--of-3); background: var(--of-3); }
.of-bars svg { height: 190px; }
.of-hit { fill: transparent; }
.of-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: -4px; color: var(--muted); font-size: 12px; }
.of-legend span { display: inline-flex; align-items: center; gap: 6px; }
.of-legend i { width: 10px; height: 10px; border-radius: 3px; }
.of-chg { font-style: normal; font-size: 12px; margin-left: 4px; white-space: nowrap; }
.of-chg.up { color: var(--good); } .of-chg.down { color: var(--bad); }
.of-stale { color: var(--warn); }
.of-spark { display: block; width: 100px; height: 24px; }
.of-spark path { fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linejoin: round; }
.of-share { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.of-share .pj-bar { width: 60px; }
.of-share .pj-bar i { background: var(--fg); min-width: 2px; }
.of-total td { font-weight: 600; background: var(--side); }
.of-heat { display: grid; grid-template-columns: 34px repeat(24, minmax(10px, 1fr)); gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); font-size: 11px; color: var(--muted); }
.of-heat i { height: 22px; border-radius: 3px; }
.of-heat small { font-size: 11px; align-self: center; }
.of-ret td.num { min-width: 46px; }
.bar #of-status { margin-right: 8px; font-size: 13px; }
@media (max-width: 760px) { .bar #of-status { display: none; } .of-heat { grid-template-columns: 30px repeat(24, 1fr); gap: 1px; padding: 8px; } .of-heat i { height: 16px; } }
.lk-tip[hidden] { display: none; }
.of-range { max-width: 100%; overflow-x: auto; }
.of-cell { cursor: pointer; } .of-cell:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.of-map td.of-self { background: var(--side); }
.of-fanfind { margin-top: 18px; } .of-fanfind input { flex: 1; min-width: 0; }
.lk-spend { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .lk-spend { grid-template-columns: 1fr; } }
.of-range button { white-space: nowrap; }

/* Analytics → Accounts (public/accounts.js): model × operation grid, then accounts grouped by operation */
.bar #ac-q { height: 32px; width: 220px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.ac-body > * { flex: none; }  /* the body scrolls, not the tables */
.ac-body .rd-h { margin: 6px 0 -6px; }
.ac-grid { width: auto; min-width: 100%; }
.ac-grid thead th { position: static; }
.ac-grid .ac-plat th { padding: 8px 6px 2px; background: var(--panel); border-bottom: 0; font-size: 12px; text-align: center; color: var(--faint); }
.ac-grid .ac-plat th svg.i { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }
.ac-grid .ac-plat th[colspan] { box-shadow: inset 0 -1px 0 var(--line-strong); }
.ac-grid .ac-op { min-width: 56px; max-width: 92px; padding: 7px 4px; white-space: normal; text-align: center; font-size: 12px; line-height: 1.25; cursor: pointer; vertical-align: bottom; }
.ac-grid .ac-op:last-child { cursor: default; }
.ac-grid .ac-who-h { vertical-align: bottom; }
.ac-grid th.ac-who { min-width: 150px; text-align: left; font-weight: 400; cursor: pointer; border-bottom: 0; }
.ac-who > div { display: flex; align-items: center; gap: 10px; }
.ac-grid tbody tr, .ac-grid tfoot tr { border-bottom: 1px solid var(--line); }
.ac-who span:last-child { display: grid; line-height: 1.25; }
.ac-who small { color: var(--faint); font-size: 12px; }
.ac-av { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--hover); color: var(--muted); font-size: 11px; font-weight: 600; }
.ac-av svg.i { width: 15px; height: 15px; }
.ac-grid .ac-c { padding: 7px 4px; text-align: center; vertical-align: middle; cursor: pointer; line-height: 1.2; }
.ac-grid tr > :last-child { min-width: 84px; }
.ac-c b { display: block; font-size: 17px; font-weight: 600; }
.ac-c small { display: block; color: var(--muted); font-size: 11px; }
.ac-c.zero b { color: var(--faint); font-weight: 500; }
.ac-c.none { color: var(--line-strong); cursor: default; }
.ac-c.ac-tot { background: color-mix(in srgb, var(--side) 55%, transparent); }
.ac-grid tfoot td, .ac-grid tfoot th { border-top: 1px solid var(--line-strong); }
.ac-grid .ac-c:not(.none):hover, .ac-grid th[data-m]:hover, .ac-grid th.ac-op[data-o]:hover { background: var(--hover); }
.ac-grid .on, .ac-grid .on:hover { background: var(--active); box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 6px; }
.ac-grid tr.ac-old { opacity: .6; }
.ac-grid .ac-past td { padding: 6px 10px; }
.ac-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.ac-bar .rd-h { margin: 0; }
.ac-bar select { height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.ac-groups { display: flex; flex-direction: column; gap: 8px; }
.ac-grp { display: flex; flex-direction: column; gap: 10px; }
.ac-grp:has(.ac-gh.open) { margin: 8px 0; }
.ac-gh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); text-align: left; cursor: pointer; }
.ac-gh:hover { background: var(--hover); }
.ac-gh.open { border-color: transparent; background: none; padding-left: 0; }
.ac-chev { display: grid; color: var(--faint); transform: rotate(180deg); transition: transform .15s; }
.ac-gh.open .ac-chev { transform: rotate(-90deg); }
.ac-chev svg.i { width: 16px; height: 16px; }
.ac-gh b { margin-right: 4px; font-weight: 600; }
.ac-gh .rd-pill { margin-left: 0; }
.ac-gi { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--hover); color: var(--muted); }
.ac-gi svg.i { width: 14px; height: 14px; }
.ac-list { table-layout: fixed; }
.ac-list td { overflow: hidden; text-overflow: ellipsis; }
.ac-list .w-model { width: 110px; } .ac-list .w-status { width: 150px; } .ac-list .w-num { width: 100px; } .ac-list .w-chg { width: 80px; }
.ac-list .w-staff { width: 150px; } .ac-list .w-when { width: 110px; } .ac-list .w-link { width: 70px; }
.ac-acc { display: grid; line-height: 1.3; }
.ac-acc a { color: var(--fg); font-weight: 500; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.ac-acc a:hover { color: var(--accent); text-decoration: underline; }
.ac-acc small { color: var(--faint); font-size: 12px; }
.ac-list .rd-pill { margin-left: 0; }
.ac-sheet { font-size: 12px; }
.ac-more { align-self: flex-start; }
.ac-none { margin: 0; }
.ac-note { margin: 0; }
@media (max-width: 760px) { .bar #ac-q { width: 140px; } .ac-list .w-staff, .ac-list .w-model { width: 90px; } }
/* X Retweet: trend arrows, rooms note, per-day table */
.xr-up { color: var(--good); } .xr-down { color: var(--bad); }
.xr-first { margin-top: 0; }
.xr-table td:last-child { white-space: nowrap; }
.xr-table tr.xr-nolink { cursor: default; }
.xr-days th, .xr-days td { padding-left: 6px; padding-right: 6px; font-size: 13px; }
.xr-total td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.xr-where { margin: 16px 0 6px; line-height: 1.5; }
.xr-table .lk-name a { color: inherit; text-decoration: none; }
.xr-table .lk-name a:hover { text-decoration: underline; }

/* People: list + one person (About, Access, Manages) */
.pp-list { display: grid; max-width: 1100px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.pp-row { display: grid; grid-template-columns: 40px minmax(180px, 2fr) 1.2fr 1fr 0.8fr 1fr 20px; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.pp-row:first-child { border-top: 0; }
a.pp-row:hover { background: var(--hover); }
.pp-head { padding-block: 8px; font-size: 12px; color: var(--faint); }
.pp-name { min-width: 0; }
.pp-name b, .pp-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pp-name b { font-weight: 500; }
.pp-name small, .pp-row > span { color: var(--muted); }
.pp-go svg { transform: rotate(180deg); color: var(--faint); }
.pp-face { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: #fff; font-size: 13px; font-weight: 600; }
.pp-face.big { width: 64px; height: 64px; font-size: 22px; }
.pp-pill { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--hover); font-size: 11px; font-style: normal; }
.pp-page { max-width: 1100px; }
.pp-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.pp-hero h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.pp-hero p { margin: 0; color: var(--muted); }
.pp-hero .pp-warn { margin-top: 4px; font-size: 13px; color: var(--accent); }
.pp-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pp-side { display: grid; gap: 16px; }
.pp-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.pp-card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.pp-f { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 12px; padding: 5px 0; }
.pp-f > span { color: var(--muted); font-size: 13px; }
.pp-f input, .pp-f select, .pp-f textarea { width: 100%; }
.pp-f input[type=date] { height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); }
.pp-f textarea { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); resize: vertical; outline: none; }
.pp-tick input { accent-color: var(--accent); width: 15px; height: 15px; }
.pp-row > .pp-face { color: #fff; }
.dlg input[type=email] { width: 100%; }
.pp-f:has(textarea) { align-items: start; }
.pp-with { display: flex; align-items: center; gap: 10px; }
.pp-with input { flex: 1; }
.pp-with small { flex: none; min-width: 90px; color: var(--faint); }
.pp-muted { margin: 8px 0 0; font-size: 13px; color: var(--faint); }
.pp-group { border-top: 1px solid var(--line); }
.pp-group:first-of-type { border-top: 0; }
.pp-group summary { display: flex; justify-content: space-between; padding: 9px 0; font-weight: 500; cursor: pointer; list-style: none; }
.pp-group summary::-webkit-details-marker { display: none; }
.pp-group summary small { font-weight: 400; color: var(--faint); }
.pp-group > div { display: grid; gap: 2px; padding: 0 0 10px; }
.pp-left { max-width: 1100px; margin-top: 16px; }
.pp-left summary { padding: 8px 4px; color: var(--muted); cursor: pointer; }
.pp-tick { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.pp-tick.sub { padding-left: 24px; font-size: 13px; color: var(--muted); }
.pp-tick.off { opacity: .5; }
.pp-sel { justify-content: space-between; }
.pp-sel select { width: auto; }
.pp-team { display: grid; gap: 6px; }
.pp-team a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.pp-team small { color: var(--faint); }
@media (max-width: 900px) { .pp-cols { grid-template-columns: 1fr; } .pp-row { grid-template-columns: 40px 1fr 20px; } .pp-row > span:nth-child(n+3):not(.pp-go) { display: none; } }
/* Dashboard → Needs attention: one red dot per broken automation (colour on the data only) */
.db-alert { grid-template-columns: 10px 1fr; }
.db-alert .db-dot { background: var(--bad); }
.db-alert small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Redgifs Organic, phase 1 (23 Nov): soft cards, round icon buttons, one pill button; colour only on data and status */
.rg-bar h1 { margin-right: 0; }
.rg-round { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); }
.rg-round:disabled { opacity: .45; cursor: default; }
.rg-pillbtn { border-radius: 999px; padding: 0 16px; }
.rg-pillbtn:disabled { opacity: .5; cursor: default; }
.rg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; align-items: start; margin-top: 16px; }
.rg-stack { display: grid; gap: 16px; }
.rg-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.rg-card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.rg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.rg-head h3 { margin: 0; }
.rg-head .link, .rg-card > .link { font-size: 13px; text-decoration: none; }
.rg-note { margin: 10px 0 0; font-size: 12px; }
.rg-flag { display: grid; grid-template-columns: 10px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.rg-flag:first-of-type { border-top: 0; padding-top: 0; }
.rg-flag > i { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--bad); }
.rg-flag.amber > i { background: var(--warn); }
.rg-flag p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.rg-steps { margin: 6px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.rg-steps code, .rg-dl code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--hover); }
.rg-acc { display: grid; grid-template-columns: 1fr auto 110px 120px; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; color: inherit; text-decoration: none; }
.rg-acc:hover { background: var(--hover); }
.rg-acc .num, .rg-links .num { text-align: right; font-variant-numeric: tabular-nums; }
.rg-acc small { color: var(--muted); }
.rg-links { width: 100%; border-collapse: collapse; font-size: 14px; }
.rg-links th { padding: 4px 0 6px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; }
.rg-links td { padding: 7px 0; border-top: 1px solid var(--line); }
.rg-links td small { display: block; color: var(--faint); font-size: 12px; }
.rg-links tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); }
.rg-dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.rg-dl dt { color: var(--muted); }
.rg-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rg-dl .rd-pill { margin-left: 0; }
.rg-posts { margin-top: 16px; }
.rg-posts a { display: grid; grid-template-columns: 130px 1fr 18px; align-items: center; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 14px; }
.rg-posts a:first-of-type { border-top: 0; }
.rg-posts a:hover { color: var(--accent); }
.rg-posts a .i { width: 15px; height: 15px; color: var(--faint); }
@media (max-width: 600px) { .rg-cols { grid-template-columns: 1fr; } .rg-acc { grid-template-columns: 1fr auto; } .rg-acc .num { display: none; } }
/* Redgifs Organic phase 2: test-mode line, Changes, link picker, check-and-start list, settings form */
.rg-test { margin: -8px 0 14px; font-size: 12px; }
.rg-again { margin-top: 10px; border-radius: 999px; }
.rg-chg { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.rg-chg:first-of-type { border-top: 0; padding-top: 0; }
.rg-chg small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.rg-chg .rd-pill { margin: 0; }
.dlg .rg-field { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.dlg .rg-field small { color: var(--faint); }
.dlg .rg-find { width: 100%; }
.rg-pick-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.rg-pick { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.rg-pick:first-child { border-top: 0; }
.rg-pick[hidden] { display: none; }
.rg-pick small { display: block; color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.rg-prof { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.rg-check { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.rg-check li::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--good); }
.rg-check li.no::before { background: var(--bad); }
.rg-check li.soft { color: var(--muted); }
.rg-check li.soft::before { background: var(--line-strong); }
.rg-live { font-size: 14px; }
.dlg .dlg-btns .btn:disabled { opacity: .45; cursor: default; }

/* Tools → Vault & Posting (public/ofposting.js): vault picker, two composers, dry-run result */
.op-mode { margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: var(--side); color: var(--warn); font-size: 12px; white-space: nowrap; }
.op-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); margin-top: 14px; }
.op-thumb { aspect-ratio: 1; }
.op-pickbar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.op-pickbar[hidden] { display: none; }
.op-pickbar b { margin-right: auto; }
.op-form { display: grid; gap: 16px; max-width: 760px; margin-top: 16px; }
.op-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.op-row > .op-lbl { flex: 0 0 110px; padding-top: 6px; color: var(--muted); font-size: 13px; }
.op-row > textarea, .op-row > div { flex: 1 1 360px; min-width: 0; }
.op-row textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); color: inherit; font: inherit; resize: vertical; }
.op-row input[type=search], .op-row input[type=number], .op-row input[type=datetime-local] { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); color: inherit; }
.op-row input[type=search] { width: 100%; max-width: 360px; }
.op-row input[type=number] { width: 90px; }
.op-row > .db-muted { align-self: center; font-size: 12px; }
.op-media { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.op-mini { position: relative; width: 56px; height: 56px; }
.op-mini img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; background: var(--hover); }
.op-mini button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--fg); cursor: pointer; line-height: 1; }
.op-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.op-chip { height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--fg); cursor: pointer; font-size: 13px; }
.op-chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.op-chip.off { border-color: var(--bad); color: var(--bad); }
.op-dry { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--side); font-size: 13px; }
.op-dry pre { margin: 8px 0 0; white-space: pre-wrap; word-break: break-all; font-size: 12px; }
.op-sum { display: flex; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.op-sum span { flex: 0 0 90px; color: var(--muted); }
.op-sum b { font-weight: 500; white-space: pre-wrap; word-break: break-word; }
.op-clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-mini i { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 8px; background: var(--hover); color: var(--muted); font-size: 11px; font-style: normal; }
.lk-trial[hidden] { display: none; }  /* Links → New link: free-trial options only for free trials (.dlg-grid would show it) */

/* Operations → Twit-Fleet (public/twitfleet*.js): its own pieces (tf-*) on the shared shell classes. Colour is only on
   data: one blue for lines and meters, three steps of it for how close an account is to its target, red only for
   something that needs a person. */
:root { --tf-line: #2a78d6; --tf-s1: #86b6ef; --tf-s2: #3987e5; --tf-s3: #1c5cab; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tf-line: #3987e5; --tf-s1: #1c5cab; --tf-s2: #3987e5; --tf-s3: #86b6ef; } }
:root[data-theme="dark"] { --tf-line: #3987e5; --tf-s1: #1c5cab; --tf-s2: #3987e5; --tf-s3: #86b6ef; }

.tf-seg { flex: none; }
.tf-seg button, .tf-seg a { white-space: nowrap; }
.tf-seg a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.tf-seg a.on { background: var(--panel); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.main:has(> .tf-bulk) { position: relative; }
.tf-down { color: var(--bad); }
.tf-quiet { margin: 0; padding: 14px 16px 18px; border-top: 1px solid var(--line); color: var(--muted); }
.tf-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.tf-kind .tf-note { margin: 12px 0 0; }
.dlg .tf-full { width: 100%; }
.tf-table input[type=checkbox], .tf-checks input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.tf-tools input[type=search], .tf-pick input[type=search] { padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); outline: none; }
.tf-table .link, .tf-tools .link, .tf-pickbar .link, .tf-card .link, .tf-copy .link { font-size: inherit; text-decoration: none; }
.tf-card a.link:hover, .tf-table a.link:hover { text-decoration: underline; }

/* cards and their rows */
.tf-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); position: relative; }
.tf-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 10px 16px; }
.tf-card h2 { margin: 0; font-size: 15px; font-weight: 600; }
.tf-card h2 .db-muted, .tf-card > header > .db-muted { font-weight: 400; font-size: 13px; }
.tf-card > header > .link { font-size: 13px; }
.tf-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
a.tf-row:hover { background: var(--hover); }
a.tf-row:last-child { border-radius: 0 0 var(--r) var(--r); }
.tf-who { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.tf-who b { display: block; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.tf-who small, .tf-val small { display: block; overflow: hidden; color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
.tf-val { flex: none; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

/* Dashboard: numbers, then the line and the targets (they take the spare height), then three short lists */
.tf-dash { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: auto minmax(230px, 1fr) auto; gap: 16px; height: 100%; }
.tf-dash > * { grid-column: span 2; }
.tf-dash > .tf-stats { grid-column: 1 / -1; }
.tf-dash > .tf-main { grid-column: span 4; }
.tf-stats .db-stat { color: inherit; text-decoration: none; padding: 16px 18px; }
.tf-stats a.db-stat:hover { background: var(--hover); }
.tf-stats .db-stat:first-child { border-radius: var(--r) 0 0 var(--r); }
.tf-stats .db-stat:last-child { border-radius: 0 var(--r) var(--r) 0; }
.tf-stats .db-stat b { font-size: 26px; letter-spacing: -.01em; }
.tf-stats .db-stat b small { color: var(--muted); letter-spacing: 0; }

.tf-chart { position: relative; flex: 1; min-height: 140px; margin: 0 6px 8px; }
.tf-chart svg { position: absolute; inset: 0; display: block; }
.tf-chart text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tf-grid { stroke: var(--line); }
.tf-line { fill: none; stroke: var(--tf-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tf-cross { stroke: var(--line-strong); }
.tf-dot { fill: var(--tf-line); stroke: var(--panel); stroke-width: 2; }
.tf-chart-none { margin: 0; padding: 48px 16px; color: var(--muted); text-align: center; }

.tf-legend a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; align-items: center; gap: 10px; padding: 5px 16px; color: inherit; text-decoration: none; }
.tf-legend a:hover { background: var(--hover); }
.tf-legend span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tf-legend b { font-weight: 500; font-variant-numeric: tabular-nums; }
.tf-legend em { color: var(--muted); font-style: normal; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.tf-sq { width: 12px; height: 12px; border-radius: 3px; background: var(--active); }
.tf-sq.hit, .tf-waffle .hit { background: var(--tf-s3); }
.tf-sq.close, .tf-waffle .close { background: var(--tf-s2); }
.tf-sq.way, .tf-waffle .way { background: var(--tf-s1); }
.tf-sq.out { border: 1px solid var(--line-strong); background: none; }
.tf-waffle { flex: 1; min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(auto-fill, var(--cell, 10px)); grid-auto-rows: var(--cell, 10px); gap: 2px; align-content: start; padding: 12px 16px 16px; }
.tf-waffle a { border-radius: 2px; background: var(--active); }
.tf-waffle a:hover { outline: 2px solid var(--fg); outline-offset: 1px; }

/* Accounts: filters above, the table scrolls under its own header, the bar for ticked rows floats */
.tf-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 53px; padding: 10px 20px; border-bottom: 1px solid var(--line); flex: none; }
.tf-tools select, .tf-tools input { height: 32px; }
.tf-tools input[type=search] { flex: 1 1 130px; max-width: 220px; min-width: 0; }
.tf-tools select { max-width: 160px; }
.tf-tools #tf-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tf-tools label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); white-space: nowrap; }
.tf-sp { flex: 1; }
.tf-body { padding-top: 16px; }

.tf-wrap { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.tf-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.tf-table .num { text-align: right; font-variant-numeric: tabular-nums; }
/* number and date columns keep one readable width; the columns with words share what is left, and Account takes the rest */
.tf-table col.k-c { width: 44px; }
.tf-table col.k-creator, .tf-table col.k-client, .tf-table col.k-tags { width: 9%; }
.tf-table col.k-status { width: 10.5%; }
.tf-table col.k-followers { width: 6.6em; }
.tf-table col.k-gain { width: 6.2em; }
.tf-table col.k-perday { width: 5.6em; }
.tf-table col.k-pct { width: 17%; }
.tf-table col.k-expected { width: 8em; }
.tf-table col.k-content { width: 5.4em; }
.tf-table th { position: sticky; top: -16px; z-index: 2; height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 500; text-align: left; white-space: nowrap; user-select: none; }
.tf-table th:first-child { border-top-left-radius: var(--r); }
.tf-table th:last-child { border-top-right-radius: var(--r); }
.tf-table th[data-s] { cursor: pointer; }
.tf-table th[data-s]:hover, .tf-table th.sorted { color: var(--fg); }
.tf-table th.sorted.up::after { content: " ↑"; }
.tf-table th.sorted.dn::after { content: " ↓"; }
.tf-table td { height: 46px; padding: 0 10px; border-top: 1px solid var(--line); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tf-table td b { font-weight: 500; }
.tf-table tbody tr:first-child td { border-top: 0; }
.tf-table tbody tr[data-id]:hover { background: color-mix(in srgb, var(--hover) 55%, transparent); }
.tf-table tbody tr.on { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.tf-table .tf-c { padding: 0 0 0 14px; text-overflow: clip; }
.tf-table .tf-c svg { display: block; color: var(--muted); }
.tf-acct { display: block; overflow: hidden; color: inherit; text-decoration: none; text-overflow: ellipsis; }
.tf-acct small { margin-left: 8px; color: var(--faint); font-size: 13px; }
.tf-acct:hover b { text-decoration: underline; }
/* the name, then a small Open (the profile on X, in a new tab) at the end of the cell */
.tf-name { display: flex; align-items: center; gap: 8px; }
.tf-name .tf-acct { flex: 1; min-width: 0; }
.tf-x { flex: none; height: 26px; padding: 0 9px; color: var(--muted); font-size: 13px; }
.tf-x:hover { color: var(--fg); }
/* things you can change in a row read as plain text until you point at them */
.tf-table select, .tf-goal input, .tf-tagcell { width: calc(100% + 8px); height: 30px; margin-left: -8px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; -webkit-appearance: none; appearance: none; outline: none; text-overflow: ellipsis; cursor: pointer; }
.tf-tagcell { display: block; overflow: hidden; color: var(--muted); text-align: left; white-space: nowrap; }
.tf-table select:hover, .tf-table select:focus, .tf-goal input:hover, .tf-goal input:focus, .tf-tagcell:hover { border-color: var(--line-strong); background: var(--panel); }
.tf-table select.tf-bad { color: var(--bad); }
.tf-table select.tf-off { color: var(--muted); }
.tf-goal { display: flex; align-items: center; gap: 10px; }
.tf-goal span { flex: none; width: 54px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.tf-goal span.tf-of { width: auto; }
.tf-of i { font-style: normal; }
.tf-goal input { flex: none; width: 88px; margin: 0; text-align: right; cursor: text; font-variant-numeric: tabular-nums; }
.tf-goal input::placeholder { color: var(--faint); }
.tf-meter { flex: 1; min-width: 24px; height: 6px; border-radius: 3px; background: var(--active); overflow: hidden; }
.tf-meter i { display: block; height: 100%; border-radius: 3px; background: var(--tf-s2); }
.tf-meter.hit i { background: var(--tf-s3); }
.tf-g { background: var(--side); cursor: pointer; }
.tf-g:hover { background: var(--hover); }
.tf-g td.tf-gname { overflow: visible; }
.tf-g b { font-weight: 600; margin-right: 6px; }
.tf-more td { height: 44px; overflow: visible; }  /* one cell, so it adds no column of its own; its words run on over the empty rest of the row */

.tf-bulk { position: absolute; z-index: 20; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 24px); padding: 8px 8px 8px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); overflow-x: auto; }
.tf-bulk[hidden] { display: none; }
.tf-bulk b { margin-right: 8px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* one account */
.tf-one { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
/* its four numbers: one row when they fit, otherwise two and two, hairlines between them */
.tf-nums { display: flex; flex-wrap: wrap; gap: 1px; overflow: hidden; background: var(--line); }
.tf-nums .db-stat { flex: 1 1 150px; align-content: start; border: 0; background: var(--panel); }
.tf-nums .tf-when { flex-basis: 180px; }
.tf-nums .db-stat b { white-space: nowrap; }
@container (max-width: 640px) { .tf-nums .db-stat { flex-basis: 40%; } }
.tf-col { display: grid; gap: 16px; min-width: 0; container-type: inline-size; }
.tf-one .tf-chart { flex: none; height: 320px; }
.tf-form label, .tf-field { display: grid; gap: 4px; padding: 0 16px 12px; color: var(--muted); font-size: 13px; }
.tf-form input, .tf-form select, .tf-form textarea { width: 100%; color: var(--fg); font-size: 14px; }
.tf-form textarea { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--panel); resize: vertical; outline: none; }
.tf-field .btn { justify-content: flex-start; overflow: hidden; font-size: 14px; }
.tf-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; color: var(--fg); font-size: 14px; }
.tf-copy span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tf-form p { margin: 0; padding: 0 16px 14px; font-size: 13px; }

/* Creators and Content: one list each */
.tf-kind { max-width: 900px; }
.tf-kinds col.k-n, .tf-kinds col.k-kday { width: 6.4em; }
.tf-kinds col.k-kf, .tf-kinds col.k-hit { width: 7.4em; }
.tf-pieces col.k-link { width: 9.5em; }
.tf-pieces col.k-on { width: 11em; }
.tf-pieces col.k-more { width: 52px; }
.tf-pieces .tf-m { padding: 0 10px 0 0; text-overflow: clip; }
.tf-pieces .tf-m .icon-btn { margin-left: auto; }

/* windows: a list to tick */
.tf-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-pick > * { flex: 1 1 130px; min-width: 0; height: 34px; }
.tf-pickbar { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.tf-pickbar span { margin-right: auto; font-variant-numeric: tabular-nums; }
.tf-checks { max-height: min(46vh, 420px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.tf-checks label { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 12px; border-top: 1px solid var(--line); cursor: pointer; }
.tf-checks label:first-child { border-top: 0; }
.tf-checks label[hidden] { display: none; }
.tf-checks label:hover { background: var(--hover); }
.tf-checks b { flex: 1; min-width: 0; overflow: hidden; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.tf-checks span { color: var(--muted); font-size: 13px; }
.tf-checks em { width: 56px; color: var(--muted); font-style: normal; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.tf-checks p { margin: 0; padding: 16px; }

/* narrower windows: drop the columns that matter least, never scroll sideways. In the order they go: Content, Client,
   Tags, Status and the period's gain, Creator and the box to type a target, A day, and last (a phone) Expected. */
@media (max-width: 1700px) { .tf-table .c-content { display: none; } }
@media (max-width: 1500px) { .tf-table .c-client { display: none; } .tf-table col.k-pct { width: 19%; } .tf-table col.k-status { width: 11.5%; } }
@media (max-width: 1360px) { .tf-table .c-tags { display: none; } .tf-table col.k-pct { width: 21%; } }
@media (max-width: 1280px) { .tf-one { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 1240px) { .tf-table .c-status, .tf-table .c-gain { display: none; } .tf-table col.k-creator { width: 11%; } .tf-table col.k-pct { width: 25%; } }
/* a narrow or a short window: the dashboard stops fitting itself to the window and simply scrolls, so nothing is squeezed */
@media (max-width: 1100px), (max-height: 840px) {
  .tf-dash { grid-template-rows: none; height: auto; }
  .tf-dash .tf-chart { flex: none; height: 260px; }
  .tf-waffle { flex: none; overflow: visible; }
}
@media (max-width: 1100px) {
  .tf-table .c-creator, .tf-goal input { display: none; }
  .tf-table col.k-pct { width: 22%; }
  .tf-dash > *, .tf-dash > .tf-main { grid-column: 1 / -1; }
  .tf-one { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) { .tf-table .c-day, .tf-kinds .c-hit { display: none; } }
@media (max-width: 760px) {
  .tf-tools { padding: 10px 16px; }
  .tf-tools input[type=search] { flex: 1 1 100%; max-width: none; }
  .tf-tools select { flex: 1 1 40%; max-width: none; }
  .tf-sp { display: none; }
  .tf-stats { grid-template-columns: 1fr 1fr; }
  .tf-stats .db-stat { border-top: 0; border-left: 1px solid var(--line); border-radius: 0; }
  .tf-stats .db-stat:nth-child(odd) { border-left: 0; }
  .tf-stats .db-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tf-stats .db-stat b small { display: block; line-height: 1.5; }
  .bar .tf-seg button, .bar .tf-seg a { padding: 0 7px; }
  #tf-csv { display: none; }
  .tf-goal span { width: auto; }
  .tf-bulk { left: 8px; right: 8px; transform: none; }
}
@media (max-width: 560px) { .tf-table .c-exp, .tf-kinds .c-kday, .tf-acct small, .tf-of i { display: none; } .tf-g td.tf-gname { overflow: hidden; } .tf-table col.k-pct { width: 25%; } .tf-table col.k-followers { width: 6.3em; } .tf-table col.k-c { width: 38px; }
  .tf-table td, .tf-table th { padding: 0 8px; } .tf-table .tf-c { padding: 0 0 0 12px; } .tf-name { gap: 6px; } .tf-x { padding: 0 7px; font-size: 12px; } .tf-pieces col.k-link { width: 6.8em; } .tf-pieces col.k-on { width: 7.8em; } .tf-pieces col.k-more { width: 44px; } }
