:root {
  --bg: #f6f4ef; --panel: #ffffff; --panel-2: #fbfaf7; --ink: #191917; --ink-2: #5d5b55; --ink-3: #8f8c84;
  --line: #e7e3da; --line-2: #efece5; --accent: #e8452c; --accent-ink: #ffffff; --accent-soft: #fde9e4;
  --green: #2f9e5b; --green-soft: #e3f4ea; --amber: #d98b0b; --amber-soft: #fbf0d9; --red: #d93a2b; --red-soft: #fbe3df;
  --blue: #2f6fd9; --blue-soft: #e4edfb; --violet: #7a4fd6; --violet-soft: #eee7fb;
  --shadow: 0 1px 2px rgba(25,25,23,.06), 0 4px 16px rgba(25,25,23,.05);
  --radius: 14px; --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", Inter, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141413; --panel: #1d1d1b; --panel-2: #222220; --ink: #f2f0ea; --ink-2: #b4b1a8; --ink-3: #7d7a72;
    --line: #2e2d2a; --line-2: #262523; --accent: #ff5a3d; --accent-soft: #3a1f19;
    --green-soft: #17301f; --amber-soft: #33270f; --red-soft: #3a1b17; --blue-soft: #18243a; --violet-soft: #251d38;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }
}
:root[data-theme="dark"] {
    --bg: #141413; --panel: #1d1d1b; --panel-2: #222220; --ink: #f2f0ea; --ink-2: #b4b1a8; --ink-3: #7d7a72;
    --line: #2e2d2a; --line-2: #262523; --accent: #ff5a3d; --accent-soft: #3a1f19;
    --green-soft: #17301f; --amber-soft: #33270f; --red-soft: #3a1b17; --blue-soft: #18243a; --violet-soft: #251d38;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  }

* { box-sizing: border-box; }
:root[data-theme="dark"] { color-scheme: dark; } :root[data-theme="light"] { color-scheme: light; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 700 18px var(--display); letter-spacing: -.01em; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 12px var(--display); letter-spacing: .02em; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav-item:hover { background: var(--line-2); color: var(--ink); }
.nav-item.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item .count { margin-left: auto; background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.side .me { margin-top: auto; padding: 10px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
main { min-width: 0; padding: 26px 32px 120px; max-width: 1180px; width: 100%; }
.tabbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  main { padding: 16px 16px calc(96px + var(--safe-b)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + var(--safe-b)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); text-decoration: none; padding: 4px 0; position: relative; }
  .tabbar a.active { color: var(--accent); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .dot { position: absolute; top: 0; right: calc(50% - 18px); background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 0 5px; }
}

/* header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font: 700 28px/1.1 var(--display); letter-spacing: -.02em; margin: 0; }
.page-head .sub { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 900px) { .page-head h1 { font-size: 24px; } }

/* cards / sections */
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid.two { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 6px; }
.card-h h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 0; display: flex; align-items: center; gap: 8px; }
.card-h .n { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.card-b { padding: 4px 6px 10px; }
.card-pad { padding: 16px; }
.empty { color: var(--ink-3); padding: 10px 12px 14px; font-size: 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 5px 9px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: var(--panel-2); border-radius: 10px; padding: 9px 11px; outline: none; }
.input:focus { border-color: var(--ink-3); background: var(--panel); }
textarea.input { min-height: 110px; resize: vertical; }
label.f { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: .05em; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 160px; }

/* quick add */
.quick { display: flex; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.quick input { flex: 1; border: 0; background: transparent; outline: none; padding: 8px 0; min-width: 0; }
.quick .hint { font-size: 12px; color: var(--ink-3); margin: -12px 4px 16px; }

/* task rows */
.task { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.task:hover { background: var(--line-2); }
.check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink-3); margin-top: 1px; background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; }
.check:hover { border-color: var(--green); background: var(--green-soft); }
.check.done { background: var(--green); border-color: var(--green); }
.check.done::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.task .t { font-weight: 500; overflow-wrap: anywhere; }
.task.is-done .t { text-decoration: line-through; color: var(--ink-3); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; color: var(--ink-3); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 500; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.client::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--ink-3)); }
.chip.late { background: var(--red-soft); color: var(--red); font-weight: 600; }
.chip.today { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.chip.test { background: var(--violet-soft); color: var(--violet); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--a, #888); flex: none; }
.status { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 3px 8px; white-space: nowrap; }
.s-Backlog { background: var(--line-2); color: var(--ink-2); }
.s-By-the-end-of-day { background: var(--amber-soft); color: var(--amber); }
.s-In-progress { background: var(--blue-soft); color: var(--blue); }
.s-Needs-review { background: var(--violet-soft); color: var(--violet); }
.s-Waiting-on-client { background: var(--accent-soft); color: var(--accent); }
.s-Done { background: var(--green-soft); color: var(--green); }
.right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font: 700 30px/1.1 var(--display); margin-top: 6px; letter-spacing: -.02em; }
.stat .d { font-size: 12px; margin-top: 4px; color: var(--ink-3); }
.up { color: var(--green); } .down { color: var(--red); }

/* banners */
.banner { display: flex; gap: 12px; align-items: center; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.banner.green { background: var(--green-soft); color: var(--green); }
.banner.amber { background: var(--amber-soft); color: var(--amber); }
.banner.red { background: var(--red-soft); color: var(--red); }
.banner.info { background: var(--blue-soft); color: var(--blue); }
.banner .txt { color: var(--ink); }
.lamp { width: 10px; height: 10px; border-radius: 50%; flex: none; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }

/* clients */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.client-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: block; box-shadow: var(--shadow); border-left: 5px solid var(--h, var(--line)); }
.client-card:hover { border-color: var(--ink-3); border-left-color: var(--h); }
.client-card .nm { font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.client-card .why { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.h-green { --h: var(--green); } .h-amber { --h: var(--amber); } .h-red { --h: var(--red); }
.mini-health { display: flex; gap: 8px; flex-wrap: wrap; padding: 6px 10px 12px; }
.mini-health a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.mini-health a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--h); }
.seg { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }

/* board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 200px; scroll-snap-align: start; display: flex; flex-direction: column; }
.col h3 { margin: 0; padding: 12px 14px 6px; font-size: 13px; display: flex; justify-content: space-between; }
.col .drop { flex: 1; padding: 4px 6px 10px; }
.col.over { outline: 2px dashed var(--accent); }
.col .task { background: var(--panel); border: 1px solid var(--line); margin-bottom: 6px; }

/* onboarding */
.ob { padding: 16px; }
.ob + .ob { border-top: 1px solid var(--line); }
.ob-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.ob-top .nm { font-weight: 700; font-size: 17px; }
.bar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 10px 0; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.gates { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 8px; }
.gate { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.gate.done { color: var(--ink-3); }
.gate.done .check { background: var(--green); border-color: var(--green); }
.gate.done .check::after { content: ""; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.log { font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink-2); background: var(--panel-2); border-radius: 9px; padding: 8px 10px; margin-top: 10px; white-space: pre-wrap; }

/* table */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
table.t th { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

/* sheet (modal / bottom sheet) */
.backdrop { position: fixed; inset: 0; background: rgba(15,15,14,.38); z-index: 50; display: flex; justify-content: flex-end; animation: fade .15s ease; }
.sheet { width: min(520px, 100%); height: 100%; background: var(--bg); overflow-y: auto; padding: 20px 20px 40px; box-shadow: -10px 0 40px rgba(0,0,0,.15); animation: slide .18s ease; }
.sheet .x { float: right; }
.sheet h2 { font: 700 20px var(--display); margin: 4px 0 10px; }
@media (max-width: 700px) {
  .backdrop { align-items: flex-end; }
  .sheet { height: 92vh; border-radius: 18px 18px 0 0; padding-bottom: calc(40px + var(--safe-b)); animation: up .2s ease; }
}
@keyframes fade { from { opacity: 0 } }
@keyframes slide { from { transform: translateX(30px); opacity: .5 } }
@keyframes up { from { transform: translateY(40px); opacity: .5 } }
.status-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.status-picker button { border: 1px solid transparent; cursor: pointer; }
.status-picker button.on { outline: 2px solid currentColor; outline-offset: 1px; }

.feed { list-style: none; margin: 0; padding: 0 12px 10px; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); }
.feed li b { color: var(--ink); font-weight: 600; }
.feed .when { color: var(--ink-3); font-size: 12px; }

.sugg { padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin: 8px 10px; background: var(--panel-2); }
.sugg .q { font-size: 13px; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 8px; margin: 6px 0; font-style: italic; }

#toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-weight: 500; box-shadow: var(--shadow); animation: up .2s ease; max-width: 90vw; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 28px; }
.login h1 { font: 700 26px var(--display); margin: 14px 0 4px; }
iframe.embed { width: 100%; height: calc(100vh - 210px); min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
pre.report { white-space: pre-wrap; font: 13px/1.55 var(--font); margin: 0; color: var(--ink-2); }
.kbd { font: 12px ui-monospace, monospace; background: var(--line-2); border-radius: 5px; padding: 1px 5px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg) } }

/* efforts */
.banner.self-check { flex-direction: column; align-items: flex-start; gap: 6px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sc-q { font: 600 17px/1.35 var(--display); letter-spacing: -.01em; color: var(--ink); }
.sc-en { font-size: 13px; color: var(--ink-3); font-style: italic; }

.effort-items { display: flex; flex-direction: column; gap: 2px; }
.effort-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; user-select: none; }
.effort-item:hover { background: var(--line-2); }
.effort-item input[type="checkbox"] { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; flex: none; }
.effort-item.is-checked .ei-label { color: var(--ink-3); text-decoration: line-through; }
.ei-label { font-size: 14px; line-height: 1.4; flex: 1; }
.effort-item .chip { margin-top: 1px; }

.pct-bar { flex: 1; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; min-width: 60px; }
.pct-bar > div { height: 100%; border-radius: 99px; transition: width .3s ease; }
.pct-num { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 36px; text-align: right; }

.mrr-current { font-size: 15px; margin-bottom: 10px; padding: 10px 12px; background: var(--green-soft); border-radius: 10px; }
.goal-current { background: var(--amber-soft); }
.goal-current td { font-weight: 600; }

.wt-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.wt-row:last-child { border-bottom: none; }
.wt-label { flex: 1; font-size: 14px; min-width: 0; }
.wt-bar-wrap { width: 80px; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; flex: none; }
.wt-bar { height: 100%; border-radius: 99px; transition: width .3s ease; }
.wt-nums { display: flex; align-items: center; gap: 4px; flex: none; font-variant-numeric: tabular-nums; }
.wt-input { width: 52px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 4px 6px; font-size: 14px; text-align: center; outline: none; -moz-appearance: textfield; }
.wt-input::-webkit-outer-spin-button, .wt-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wt-input:focus { border-color: var(--ink-3); background: var(--panel); }
.wt-of { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.hist-chart { display: flex; gap: 6px; align-items: flex-end; height: 80px; }
.hist-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.hist-fill { width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; transition: height .3s ease; }
.hist-label { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.fab { display: none; }
@media (max-width: 900px) {
  .fab { display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(82px + var(--safe-b)); width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: #fff; border: 0; box-shadow: 0 6px 20px rgba(232,69,44,.4); z-index: 31; font-size: 28px; line-height: 1; }
}

/* ---------- personal today ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hero h1 { font: 700 34px/1.05 var(--display); letter-spacing: -.025em; margin: 0; }
.hero .sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
@media (max-width: 900px) { .hero h1 { font-size: 27px; } }
.askbar { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.askbar svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.askbar input { flex: 1; border: 0; background: transparent; outline: none; padding: 9px 0; min-width: 0; }
.askbar:focus-within { border-color: var(--accent); }
.chip.p1 { background: var(--red-soft); color: var(--red); font-weight: 700; }
.chip.p2 { background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.chip.p3 { background: var(--blue-soft); color: var(--blue); }
.chip.p4 { background: var(--line-2); color: var(--ink-3); }
.top3 { display: flex; flex-direction: column; gap: 8px; padding: 4px 10px 8px; }
.top-item { display: grid; grid-template-columns: 24px 26px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--line); cursor: pointer; }
.top-item:hover { border-color: var(--ink-3); }
.top-item.p1 { border-left-color: var(--red); } .top-item.p2 { border-left-color: var(--amber); } .top-item.p3 { border-left-color: var(--blue); }
.top-n { font: 700 18px/1 var(--display); color: var(--ink-3); padding-top: 2px; }
.top-item .t { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.top-item .check { margin-top: 2px; }
details.fold summary { list-style: none; cursor: pointer; padding-bottom: 12px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold[open] summary .small { visibility: hidden; }
.routines { padding: 2px 8px 8px; }
.routine { display: grid; grid-template-columns: 28px 46px 1fr auto; gap: 6px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.routine:hover { background: var(--line-2); }
.routine .rt { font: 600 12px ui-monospace, monospace; color: var(--ink-3); }
.routine.is-done .rl { text-decoration: line-through; color: var(--ink-3); }
.trk { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.trk:last-child { border-bottom: 0; }
.trk-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; margin-bottom: 6px; }
.trk-n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.trk .btn.sm { min-width: 34px; }
a.banner:hover { filter: brightness(.98); }

/* ---------- assistant ---------- */
.chat-wrap { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 80px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 6px 0 16px; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.msg .b { max-width: min(640px, 88%); padding: 11px 15px; border-radius: 16px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.msg.me .b { background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; }
.msg.ai .b { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.msg.ai .b p { margin: 0 0 6px; } .msg.ai .b p:last-child { margin-bottom: 0; }
.msg.ai .b ul { margin: 4px 0 6px; padding-left: 20px; } .msg.ai .b li { margin: 2px 0; }
.acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.act { font-size: 12px; font-weight: 600; background: var(--green-soft); color: var(--green); border-radius: 8px; padding: 3px 8px; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25 } 40% { opacity: 1 } }
.chat-empty { text-align: center; padding: 40px 16px 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.ce-mark { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.ce-mark svg { width: 28px; height: 28px; }
.starters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--ink); }
.chat-in { position: sticky; bottom: 12px; display: flex; gap: 8px; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px 8px 8px 14px; box-shadow: 0 8px 30px rgba(25,25,23,.12); }
.chat-in:focus-within { border-color: var(--accent); }
.chat-in textarea { flex: 1; border: 0; outline: none; background: transparent; resize: none; padding: 8px 0; max-height: 180px; line-height: 1.45; }
@media (max-width: 900px) { .chat-wrap { min-height: calc(100vh - 120px); } .chat-in { bottom: calc(74px + var(--safe-b)); } }

/* ---------- my workflow ---------- */
.rt-edit { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rt-edit.new { border-bottom: 0; }
.daypick { display: inline-flex; gap: 3px; background: var(--line-2); border-radius: 9px; padding: 3px; }
.daypick button { border: 0; background: transparent; width: 30px; height: 28px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.daypick button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.tog { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tog input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- klaviyo ---------- */
.perf .stats { margin-bottom: 12px; }
.perf .stat .v { font-size: 24px; }
.flags { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 12px; }
.flag { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.flag .txt { flex: 1; color: var(--ink); }
.flag.red { background: var(--red-soft); color: var(--red); } .flag.amber { background: var(--amber-soft); color: var(--amber); } .flag.info { background: var(--blue-soft); color: var(--blue); }

/* ---------- misc ---------- */
.launch { text-align: center; }
.launch .card-pad { padding: 40px 24px; max-width: 560px; margin: 0 auto; }
.launch h2 { font: 700 22px var(--display); margin: 10px 0 6px; }
.launch-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; }
.chip.src-mail { background: var(--blue-soft); color: var(--blue); }
.chip.src-wa { background: var(--green-soft); color: var(--green); }
details summary { cursor: pointer; }
.grid { align-content: start; }
.o > .quick { margin-bottom: 0; }
.o .quick.hint { margin: 6px 4px 0 !important; }
@media (max-width: 1000px) {
  .today-grid > .grid { display: contents; }
  .today-grid { display: flex; flex-direction: column; gap: 16px; }
  .today-grid .o { order: var(--o); }
}
.grid:not(.two) { grid-template-columns: minmax(0, 1fr); }
.perf table.t td:first-child { min-width: 180px; }
.perf .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 700px) { .perf .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .perf .stat .v { font-size: 20px; } }

/* design (Designer Workflow) */
.dstat { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 0; background: var(--line-2); color: var(--ink-2); }
.dstat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.d-brown { background: #f3e9df; color: #8a5a2b; } .d-gray { background: var(--line-2); color: var(--ink-2); } .d-blue { background: var(--blue-soft); color: var(--blue); }
.d-amber { background: var(--amber-soft); color: var(--amber); } .d-violet { background: var(--violet-soft); color: var(--violet); } .d-green { background: var(--green-soft); color: var(--green); }
.d-muted { background: transparent; color: var(--ink-3); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .d-brown { background: #33261a; color: #d9a46f; }
}
:root[data-theme="dark"] .d-brown { background: #33261a; color: #d9a46f; }

.status-picker .dstat { cursor: pointer; opacity: .55; padding: 5px 11px; }
.status-picker .dstat.on { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
.dboard .col { min-width: 250px; }
.dcard { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; margin-bottom: 7px; cursor: pointer; box-shadow: var(--shadow); }
.dcard:hover { border-color: var(--ink-3); }
.dcard .t { font-weight: 600; font-size: 14px; line-height: 1.3; }
.dcard .meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dcard .ppl { display: inline-flex; gap: 2px; }
.dtable tr[data-design] { cursor: pointer; }
.dtable tr[data-design]:hover td { background: var(--panel-2); }
.cal { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-h div { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.cal-d { min-height: 104px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; min-width: 0; }
.cal-d.off { background: var(--panel-2); }
.cal-d.today .cal-n { background: var(--accent); color: var(--accent-ink); border-radius: 99px; }
.cal-n { font-size: 12px; font-weight: 600; color: var(--ink-3); width: 22px; height: 22px; display: grid; place-items: center; }
.cal-i { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 5px; margin-top: 2px; border-radius: 6px; border-left: 3px solid var(--c); background: var(--panel-2); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-i .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; padding: 0; background: currentColor; }
@media (max-width: 700px) { .cal-d { min-height: 64px; } .cal-i { font-size: 10px; } }
.cform { display: grid; grid-template-columns: 150px 1fr; gap: 6px 10px; align-items: center; }
.cform .f { margin: 0; }
@media (max-width: 600px) { .cform { grid-template-columns: 1fr; } }
.gates label.gate { user-select: none; }

/* integrations */
.ic-group { margin: 22px 2px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ic .ic-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 19px; flex: none; }
.ic-conn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); margin-top: 6px; }
.ic-conn .lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.ic-conn.connected .lamp { background: var(--green); } .ic-conn.error .lamp { background: var(--red); } .ic-conn.pending .lamp { background: var(--amber); }
@media (max-width: 600px) { .ic-grid { grid-template-columns: 1fr; } .ic-conn { flex-wrap: wrap; } }

/* usage + status */
.ubars { display: flex; align-items: flex-end; gap: 4px; height: 160px; }
.ub { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 6px; }
.ub div { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.ub span { font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.st-list { padding: 4px 12px 10px; }
.st { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; border-bottom: 1px solid var(--line-2); }
.st:last-child { border-bottom: 0; }
.st .lamp { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--amber); }
.st.good .lamp { background: var(--green); } .st.bad .lamp { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.pv { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.pv-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--amber); background: var(--amber-soft); padding: 6px 10px; }
.pv pre { margin: 0; padding: 10px 12px; white-space: pre-wrap; font: 13px/1.5 var(--font); }
.brand .logo { height: 24px; width: auto; display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo { filter: brightness(1.6) saturate(.9); }
}
:root[data-theme="dark"] .brand .logo { filter: brightness(1.6) saturate(.9); }


/* Brain OS */
.msg.ai .b h4, .note-body h4 { font: 700 14px var(--display); margin: 12px 0 4px; } .msg.ai .b h4:first-child { margin-top: 0; }
.os-empty { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--ink-2); font-size: 14px; margin-bottom: 12px; }
.os-stat { padding: 12px 14px; border-radius: 12px; background: var(--green-soft); margin-bottom: 12px; }
.os-n { font-size: 15px; }
.os-tabs { margin: 4px 0 12px; flex-wrap: wrap; }
.os-steps { padding-left: 20px; margin: 0; font-size: 14px; } .os-steps > li { margin-bottom: 12px; }
.os-fields { margin-top: 8px; padding: 10px 12px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; }
.os-fields .input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.os-pick { cursor: pointer; display: inline-flex; }
.os-files { margin-top: 12px; } .os-files summary { font-weight: 600; font-size: 14px; }
.os-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; font-size: 13px; }
.os-list li { padding: 3px 0; border-bottom: 1px solid var(--line-2); }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--ink); }
.linkish:hover { color: var(--accent); text-decoration: underline; }
.os-learned { list-style: none; margin: 0; padding: 0; }
.os-learned li { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
ul.tight { margin: 0; padding-left: 18px; } ul.tight li { margin: 3px 0; }
.sheet.wide { width: min(760px, 100%); }
.note-body { font-size: 14px; line-height: 1.55; } .note-body p { margin: 0 0 8px; } .note-body ul { padding-left: 20px; }
.card-pad details.fold > summary { color: var(--ink); font-weight: 600; font-size: 14px; padding: 6px 0; }
.card-pad details.fold > summary::before { content: "▸"; display: inline-block; width: 14px; color: var(--ink-3); transition: transform .15s; }
.card-pad details.fold[open] > summary::before { transform: rotate(90deg); }

/* Klaviyo */
.kl-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.kl-tabs { margin-bottom: 16px; } .kl-tabs .n { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: 10px; padding: 0 6px; margin-left: 2px; }
.kl-tabs .n:empty { display: none; }
.kl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
a.kl-ov { text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
a.kl-ov:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(25,25,23,.08), 0 10px 26px rgba(25,25,23,.08); }
.kl-name { text-transform: none !important; letter-spacing: 0 !important; font-size: 17px !important; color: var(--ink) !important; }
.k-lbl, .kl-next .k, .reco-ab .k { font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kl-big { font: 700 28px/1.15 var(--display); letter-spacing: -.02em; margin: 2px 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kl-lines { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; }
.kl-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.kl-lines li span { color: var(--ink-3); flex: none; } .kl-lines li b { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.kl-next { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--violet-soft); color: var(--ink); font-size: 13px; font-weight: 600; }
.kl-next .k { display: block; color: var(--violet); margin-bottom: 2px; }
.dchip, .vchip { display: inline-block; border-radius: 99px; padding: 1px 8px; font: 600 12px/1.5 var(--font); background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.dchip.good, .vchip.good { background: var(--green-soft); color: var(--green); } .dchip.bad, .vchip.bad { background: var(--red-soft); color: var(--red); }
.vchip.muted { color: var(--ink-3); font-weight: 500; }
.kl-t td { vertical-align: middle; } .kl-t .num { white-space: nowrap; }
.kl-flow { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); } .kl-flow:last-child { border-bottom: 0; }
.kl-flow .rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 700 13px var(--display); flex: none; }
.kl-flow .grow { min-width: 0; } .kl-flow .num { text-align: right; flex: none; max-width: 45%; }
.reco h3 { font: 700 17px/1.3 var(--display); margin: 10px 0 6px; text-wrap: balance; } .reco p { margin: 0 0 10px; font-size: 14px; }
.reco-ab { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.reco-ab > div { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.reco-ab .k { display: block; margin-bottom: 3px; }
@media (max-width: 700px) { .reco-ab { grid-template-columns: 1fr; } }
h3.sec { font: 700 15px var(--display); margin: 0; display: flex; gap: 6px; align-items: center; } h3.sec .n { color: var(--ink-3); font-weight: 600; }
.ab-list { display: grid; gap: 12px; }
.ab { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.ab.running { border-left: 4px solid var(--blue); } .ab.planned { border-left: 4px solid var(--violet); }
.ab-h { display: flex; gap: 10px; align-items: flex-start; } .ab-h .grow { min-width: 0; }
.ab-h h3 { font: 700 16px/1.3 var(--display); margin: 6px 0 2px; overflow-wrap: anywhere; }
.ab-v { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; padding: 9px 12px; border-radius: 10px; background: var(--line-2); font-size: 14px; font-weight: 500; }
.ab-v .lamp { margin-top: 6px; flex: none; } .ab-v.good { background: var(--green-soft); } .ab-v.warn { background: var(--amber-soft); }
.ab-t tr.win td { font-weight: 700; } .ab-t tr.win td:first-child::after { content: " ✓"; color: var(--green); }
.ab-notes textarea { font-size: 13px; }
.chip.st-running { background: var(--blue-soft); color: var(--blue); } .chip.st-planned { background: var(--violet-soft); color: var(--violet); }
.chip.st-done { background: var(--green-soft); color: var(--green); } .chip.st-stopped { background: var(--line-2); color: var(--ink-3); }
.vtext { font-size: 13px; } .vtext.good { color: var(--green); font-weight: 600; } .vtext.warn { color: var(--amber); }
.ab-log tr[data-abrow] { cursor: pointer; } .ab-log tr[data-abrow]:hover td { background: var(--panel-2); }
.ab-vrow .input { min-width: 0; }

/* side panel that can be closed to a slim icon rail */
.shell { transition: grid-template-columns .18s ease; }
.side-tog { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.side-tog:hover { background: var(--line-2); color: var(--ink); } .side-tog svg { width: 18px; height: 18px; }
.shell.side-closed { grid-template-columns: 64px 1fr; }
.shell.side-closed .side { padding: 20px 8px; align-items: center; }
.shell.side-closed .brand { flex-direction: column; padding: 4px 0 14px; gap: 8px; }
.shell.side-closed .brand-t, .shell.side-closed .nav-item span, .shell.side-closed .side .me { display: none; }
.shell.side-closed .side-tog { margin-left: 0; }
.shell.side-closed .nav-item { justify-content: center; padding: 10px; position: relative; }
.shell.side-closed .nav-item .count { display: block !important; position: absolute; top: 2px; right: 2px; font-size: 9px; padding: 0 5px; }
.shell.side-closed .nav-sep { width: 32px; }
.shell.side-closed main { max-width: 1340px; }
/* context library */
#ctx-open .n { background: var(--ink); color: var(--bg); border-radius: 99px; font-size: 11px; padding: 0 6px; margin-left: 4px; } #ctx-open .n:empty { display: none; }
.cx-list { display: grid; gap: 2px; } .cx-folder { font-weight: 600; font-size: 13px; margin: 10px 0 2px; color: var(--ink-2); }
.cx-item { display: flex; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); } .cx-item .grow { min-width: 0; overflow-wrap: anywhere; }
/* priority */
.task.is-high { box-shadow: inset 3px 0 0 var(--red); }
.hi-tog { border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); border-radius: 99px; padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; margin: 8px 0 2px; }
.hi-tog.on { background: var(--red-soft); color: var(--red); border-color: transparent; }
.qf { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 14px; }
.qf-b { border: 1px solid var(--line); background: var(--panel); border-radius: 99px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.qf-b b { margin-left: 4px; color: var(--ink); } .qf-b:disabled { opacity: .45; cursor: default; }
.qf-b.on { background: var(--ink); color: var(--bg); border-color: var(--ink); } .qf-b.on b { color: var(--bg); }
.qf-b.high:not(.on) b, .qf-b.overdue:not(.on) b { color: var(--red); } .qf-b.clear { border-style: dashed; }
.ab-h .grow { flex: 1; }
.ab-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 8px; } .ab-notes label { grid-row: 1; } .ab-notes textarea { grid-row: 2; min-height: 54px; height: 54px; resize: vertical; }
@media (max-width: 700px) { .ab-notes { grid-template-columns: 1fr; } .ab-notes label, .ab-notes textarea { grid-row: auto; } }
.ab-t .pct-bar > div, .kl-t .pct-bar > div { background: var(--blue); } .ab-t tr.win .pct-bar > div { background: var(--green); }
@media (max-width: 700px) { .kl-t td:first-child { min-width: 190px; } }

/* budget (bar colours: categorical slots 1–3, validated for colour-blind separation in light and dark) */
:root { --b-c1: #2a78d6; --b-c2: #eb6834; --b-c3: #1baf7a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --b-c1: #3987e5; --b-c2: #d95926; --b-c3: #199e70; }
}
:root[data-theme="dark"] { --b-c1: #3987e5; --b-c2: #d95926; --b-c3: #199e70; }

.bnav b { min-width: 110px; text-align: center; font-size: 14px; }
.bstats .v.down { color: var(--red); }
.bbar { display: flex; gap: 2px; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line-2); }
.bseg { min-width: 3px; } .bseg.c1, .blegend i.c1 { background: var(--b-c1); } .bseg.c2, .blegend i.c2 { background: var(--b-c2); } .bseg.c3, .blegend i.c3 { background: var(--b-c3); }
.blegend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.blegend span { display: inline-flex; align-items: center; gap: 6px; } .blegend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.blegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.btab tr[data-bi] { cursor: pointer; } .btab tr[data-bi]:hover td { background: var(--panel-2); } .btab tr.inactive td { color: var(--ink-3); }
.btab tr.tot td { border-top: 1px solid var(--line); font-weight: 600; } .btab .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bcat { display: grid; grid-template-columns: minmax(0, 1.2fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.bcat b { font-variant-numeric: tabular-nums; } .bcat .pct-bar > div { background: var(--b-c1); }
@media (max-width: 700px) { .btab td:first-child { min-width: 150px; } }
.chat-in .clip { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; position: relative; align-self: flex-end; }
.chat-in .clip:hover { color: var(--ink); border-color: var(--ink-3); } .chat-in .clip svg { width: 19px; height: 19px; }
.chat-in .clip .n { position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; font: 700 10px/1.6 var(--font); padding: 0 5px; } .chat-in .clip .n:empty { display: none; }
#ctx-page .x { display: none; }
.chat-in { padding-left: 8px; }
.owner { display: inline-block; border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.owner.o-kristoffer { background: var(--blue-soft); color: var(--blue); } .owner.o-thomas { background: var(--amber-soft); color: var(--amber); }
/* budget: client groups, take-home highlight, quiet travel */
.btab tr.bgrp td { background: var(--panel-2); border-top: 1px solid var(--line); padding-top: 9px; padding-bottom: 9px; }
.btab tr.bgrp + tr td:first-child, .btab tr.bgrp ~ tr[data-bi] td:first-child { padding-left: 22px; }
.bstats .stat.bhero { border-color: var(--b-c3); box-shadow: inset 0 0 0 1px var(--b-c3); }
.bstats .stat.bhero .v { color: var(--ink); }
.btravel { margin: 10px 2px 0; } .btravel b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.card.bquiet { background: transparent; box-shadow: none; } .card.bquiet h2 { color: var(--ink-2); }
.card.bquiet .btab td, .card.bquiet .btab th { color: var(--ink-2); }
.bpreview { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 14px; } .bpreview:empty { display: none; }
.bneck { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
/* foldable cards (Today, Tasks, client page) */
details.fold2 > summary { list-style: none; cursor: pointer; user-select: none; padding-bottom: 14px; -webkit-tap-highlight-color: transparent; }
details.fold2 > summary::-webkit-details-marker { display: none; }
details.fold2[open] > summary { padding-bottom: 6px; }
details.fold2 .fold-r { display: inline-flex; align-items: center; gap: 8px; }
details.fold2 .chev { width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
details.fold2[open] .chev { transform: rotate(225deg) translate(-2px, -2px); }
.fold-group { display: grid; gap: 10px; }
details.fold2:not([open]):hover { border-color: var(--ink-3); }
/* fold headers: same space above and below so the title sits in the middle, open or shut, on every page */
.card details.fold2 > summary.card-h, details.fold2 > summary.card-h, .today-grid details.fold2 > summary.card-h {
  padding: 0 16px; min-height: 52px; display: flex; align-items: center; flex-wrap: nowrap; }
details.fold2 > summary.card-h h2 { line-height: 1.2; min-width: 0; }
details.fold2[open] > summary.card-h { border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
/* My routines stands out on Today */
details.fold2.fold-hl { border: 1.5px solid var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--panel) 72px); }
details.fold2.fold-hl > summary.card-h h2 { color: var(--ink); font-size: 14px; }
details.fold2.fold-hl .hl-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--accent); color: var(--accent-ink, #fff); font-size: 14px; text-transform: none; }
details.fold2.fold-hl > summary .n { color: var(--accent); }
details.fold2.fold-hl[open] > summary.card-h { border-bottom-color: transparent; }
/* task sheet: the main save button */
.btn.savebig { display: block; width: 100%; margin-top: 18px; padding: 14px 16px; font-size: 16px; font-weight: 600; border-radius: 12px; }
@media (max-width: 900px) { .btn.savebig { position: sticky; bottom: 8px; z-index: 2; box-shadow: 0 6px 18px rgba(0,0,0,.18); } }
/* shortcut tabs on Today (phone) */
.qnav { display: none; }
@media (max-width: 900px) {
  .qnav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 2px 0 14px; }
  .qnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 4px; border-radius: 12px;
    background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 12px; font-weight: 500; box-shadow: var(--shadow); }
  .qnav a:active { transform: scale(.97); }
  .qnav svg { width: 20px; height: 20px; color: var(--ink); }
  .qnav .dot { position: absolute; top: 6px; right: 10px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 0 5px; }
  .today-grid .card-h { padding: 12px 14px 4px; }
}
/* More: log out in plain black */
.logout-row { color: var(--ink); font-weight: 600; }
/* budget: month by month + phone layout */
.bmeta { display: none; margin-top: 2px; font-weight: 400; }
.bmonths tr[data-bm] { cursor: pointer; } .bmonths tr[data-bm]:hover td { background: var(--panel-2); }
.bmonths tr.cur td:first-child { font-weight: 600; } .bmonths tr.sel td { background: var(--panel-2); }
.bmonths tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--b-c3); }
@media (max-width: 900px) {
  .bstats .v { font-size: 22px; }
  .bstats .stat { padding: 12px 14px; }
  .btab tr:first-child th:nth-child(n+2):not(:last-child), .btab tr[data-bi] td:nth-child(n+2):not(:last-child) { display: none; }
  .btab tr.bgrp td:first-child, .btab tr.tot td:first-child { width: auto; }
  .btab td:first-child { min-width: 0; }
  .bmeta { display: block; }
  .bmonths .bm-travel { display: none; }
  .btravel { line-height: 1.5; }
  .card-h { flex-wrap: wrap; }
  /* any table on a phone scrolls inside its card instead of pushing the page sideways */
  .card table.t { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card table.t > tbody { display: table; width: 100%; }
  .kbd, code { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
  #main .small, #main .muted { overflow-wrap: anywhere; }
}
/* outreach replies */
.card.reply.unread { border-left: 4px solid var(--accent); }
.card.reply.auto { opacity: .7; }
.rp-co { font-size: 16px; }
.rp-inbox { margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); display: inline-block; }
.rp-subj { margin-top: 8px; font-weight: 600; }
.rp-prev { margin-top: 4px; }
.page-head .actions { flex-wrap: wrap; justify-content: flex-end; }
/* earlier chats */
.pc-list { display: grid; gap: 8px; }
.pc-item { text-align: left; display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.pc-item:hover { border-color: var(--ink-3); }
.pc-sum { color: var(--ink-2); white-space: pre-line; margin-top: 2px; }
.pc-log { max-height: none; overflow: visible; }
/* login greeting */
.greet { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); animation: greet-bg .35s ease both; cursor: pointer; }
.greet.out { animation: greet-out .4s ease forwards; }
.greet-in { display: grid; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.greet-logo { width: 92px; height: auto; animation: greet-logo .7s cubic-bezier(.2,.8,.2,1) both; }
.greet-t { font: 700 clamp(26px, 6vw, 40px)/1.15 "Space Grotesk", var(--font); letter-spacing: -.01em; color: var(--ink); animation: greet-t .6s .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes greet-bg { from { opacity: 0; } to { opacity: 1; } }
@keyframes greet-logo { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes greet-t { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes greet-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .greet, .greet-logo, .greet-t { animation: none; } .greet.out { animation: greet-out .2s ease forwards; } }
:root[data-theme="dark"] .greet-logo { filter: brightness(1.6) saturate(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .greet-logo { filter: brightness(1.6) saturate(.9); } }
/* back arrow on phone pages opened from More */
.backbtn { display: none; }
@media (max-width: 900px) {
  .backbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: 0 6px 0 -8px; border-radius: 10px; color: var(--ink); text-decoration: none; vertical-align: middle; }
  .backbtn:active { background: var(--panel-2); }
  .page-head h1 { display: flex; align-items: center; }
}
/* people */
.ppl { display: grid; }
.ppl-row { display: grid; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ppl-row:first-child { border-top: 0; }
.ppl-ro { padding: 9px 0; color: var(--ink-2); }
.ppl-f .f { margin-top: 0; }
@media (min-width: 901px) { .ppl-row { grid-template-columns: 1.3fr 1fr 1fr auto; align-items: end; } }
/* brand file drafting progress */
.bf-prog { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.pbar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; background: var(--b-c3); border-radius: 99px; transition: width .6s ease; }
/* log out: a black button */
.logout-row { background: var(--ink) !important; color: var(--bg) !important; border-color: var(--ink) !important; justify-content: center; font-weight: 600; }
details.fold2.bmfold { margin-top: 14px; }

/* desktop: Windows and Mac */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.side::-webkit-scrollbar { display: none; }
@media (min-width: 901px) and (max-height: 960px) {
  .side { padding: 14px 12px; }
  .brand { padding-bottom: 10px; }
  .nav-item { padding: 6px 10px; font-size: 14px; }
  .nav-sep { margin: 6px 8px; }
}
@media (min-width: 901px) and (max-height: 820px) { .side { gap: 0; padding: 10px 12px; } .nav-item { padding: 5px 10px; font-size: 13.5px; } .nav-sep { margin: 4px 8px; } .side .me { padding: 6px 10px; } }
@media (min-width: 1600px) { main { max-width: 1360px; } .shell.side-closed main { max-width: 1480px; } }
/* thin, quiet scrollbars (Windows shows thick grey ones by default) */
html { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }
/* very short windows (laptop at 150% scaling): everything in the sidebar still fits */
@media (min-width: 901px) and (max-height: 700px) {
  .side { padding: 8px 10px; gap: 0; scrollbar-width: thin; }
  .side::-webkit-scrollbar { display: block; width: 6px; }
  .brand { padding: 2px 10px 6px; font-size: 16px; }
  .nav-item { padding: 3px 10px; font-size: 13px; line-height: 1.35; }
  .nav-item svg { width: 16px; height: 16px; }
  .nav-sep { margin: 3px 8px; }
  .side .me { padding: 4px 10px; }
}
