* { box-sizing: border-box; }
:root {
  --base-bg: #ffffff; --base-text: #0d0d0d; --accent: #2F72C4; --on-accent: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--base-bg)); --accent-ink: color-mix(in srgb, var(--accent) 78%, var(--base-text));
  --alpha: 100%; --link: #2964aa; --shadow-a: .12;
  --bg: color-mix(in srgb, var(--base-bg) var(--alpha), transparent);
  --solid: var(--base-bg);
  --surface: color-mix(in srgb, var(--base-text) 3.5%, transparent);
  --hover: color-mix(in srgb, var(--base-text) 6%, transparent);
  --hover-solid: color-mix(in srgb, var(--base-text) 6%, var(--base-bg));
  --pill: color-mix(in srgb, var(--base-text) 6.5%, transparent);
  --line: color-mix(in srgb, var(--base-text) 11%, transparent);
  --ink: var(--base-text);
  --muted: color-mix(in srgb, var(--base-text) 70%, transparent);
  --faint: color-mix(in srgb, var(--base-text) 52%, transparent);
  --cb-border: color-mix(in srgb, var(--base-text) 42%, transparent);
  --focus: color-mix(in srgb, var(--base-text) 30%, transparent);
  --ease: cubic-bezier(.2,.8,.2,1);
}
html, body { height: 100%; }
body {
  margin: 0; min-width: 280px; background: var(--bg); color: var(--ink);
  font: 14px/1.5 Geist, ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: 6px 14px 0; }
button { border: 0; background: none; cursor: pointer; font: inherit; color: inherit; padding: 0; }
input, textarea { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.section-title { font-size: 13px; font-weight: 500; color: var(--muted); }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  color: var(--faint); flex-shrink: 0; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.ok { color: #10a37f; }

/* Header */
.app-head { display: flex; align-items: center; gap: 2px; height: 36px; margin-bottom: 6px; }
.head-fill { flex: 1; align-self: stretch; min-width: 0; }
.float-only, .min-only, .head-time { display: none; }
body.float .float-only { display: grid; }
body.float-min .min-only { display: grid; }
body.float-min .head-time { display: block; }
.head-time { font-size: 18px; font-weight: 600; letter-spacing: -.3px; font-variant-numeric: tabular-nums; padding-left: 6px; line-height: 36px; }
#headPlay { color: var(--ink); }
#archiveBtn { position: relative; }
#archiveBtn.has-items::after { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Checkboxes */
input[type=checkbox]:not(.switch) {
  appearance: none; -webkit-appearance: none; flex-shrink: 0; cursor: pointer;
  width: 18px; height: 18px; margin: 1.5px 0 0; border-radius: 6px;
  border: 1.5px solid var(--cb-border); background: transparent center / 12px no-repeat;
  transition: background-color .15s, border-color .15s, transform .1s;
}
input[type=checkbox]:not(.switch):hover { border-color: var(--muted); }
input[type=checkbox]:not(.switch):active { transform: scale(.9); }
input[type=checkbox]:not(.switch):checked { background-color: var(--accent); border-color: var(--accent); background-image: var(--checkmark); }
.task.colored > .row input[type=checkbox]:checked { background-color: var(--c); border-color: var(--c); background-image: var(--checkmark-white); }
.sub input[type=checkbox]:not(.switch) { width: 16px; height: 16px; border-radius: 5px; background-size: 11px; margin-top: 2px; }

/* Timer */
.timer { position: relative; background: var(--surface); border: 0; border-radius: 24px; transition: border-radius .24s var(--ease); }
.timer-full { padding: 16px 14px 14px; text-align: center; }
.timer-collapse { position: absolute; top: 8px; right: 8px; }
.time {
  display: inline-block; font-size: 42px; font-weight: 600; letter-spacing: -1.6px; line-height: 1.1;
  font-variant-numeric: tabular-nums; cursor: pointer; border-radius: 12px; padding: 0 6px;
}
.progress { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 11px 8px 14px; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .4s linear; }
.timer-controls { display: flex; align-items: center; justify-content: center; gap: 22px; }
.round-btn {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pill); color: var(--muted); transition: background-color .15s, color .15s, transform .12s;
}
.round-btn:hover, .round-btn.on { color: var(--ink); background: var(--hover); }
.round-btn.on { box-shadow: inset 0 0 0 1.5px var(--focus); }
.round-btn svg { width: 18px; height: 18px; }
.play-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); transition: transform .12s, opacity .15s;
  box-shadow: 0 4px 14px rgba(0,0,0,calc(var(--shadow-a) + .02));
}
.play-btn svg { width: 22px; height: 22px; }
.round-btn:active, .play-btn:active { transform: scale(.92); }
.picker { padding-top: 16px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chip { padding: 5px 11px; border-radius: 999px; background: var(--pill); color: var(--muted); font-size: 13px; transition: background-color .15s, color .15s; }
.chip:hover { color: var(--ink); background: var(--hover); }
.chip.active { background: var(--accent); color: var(--on-accent); }
.chips.small .chip { padding: 3px 9px; font-size: 12px; }
.time-inputs { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.time-inputs label { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 13px; }
.time-inputs input, .custom-min input {
  width: 54px; height: 30px; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  text-align: center; outline: none; font-variant-numeric: tabular-nums;
}
.time-inputs input:focus, .custom-min input:focus { border-color: var(--focus); }
.timer-mini { display: none; align-items: center; gap: 8px; padding: 6px 8px; }
.timer-mini .mini-time { flex: 1; font-size: 18px; font-weight: 600; letter-spacing: -.3px; font-variant-numeric: tabular-nums; cursor: pointer; }
.mini-play { background: var(--accent); color: var(--on-accent); border-radius: 50%; width: 30px; height: 30px; }
.mini-play:hover { background: var(--accent); color: var(--on-accent); opacity: .85; }
.mini-play svg { width: 13px; height: 13px; }
.timer.collapsed { border-radius: 999px; }
.timer.collapsed .timer-full { display: none; }
.timer.collapsed .timer-mini { display: flex; }

/* Checklist */
.checklist { flex: 1; display: flex; flex-direction: column; margin-top: 18px; position: relative; }
.checklist-head { display: flex; align-items: center; gap: 4px; padding: 0 2px 6px 4px; position: relative; }
.project-btn {
  flex: none; width: auto; max-width: calc(100% - 148px); margin: -4px auto -4px -6px;
  text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border-radius: 8px; padding: 4px 6px;
}
.project-btn:hover { background: var(--hover); color: var(--ink); }
.checklist-head .seg { flex: none; flex-shrink: 0; }
.checklist-head .seg button { padding: 3px 8px; font-size: 11px; }
.project-menu {
  position: absolute; left: 4px; top: 34px; z-index: 8; width: max-content; max-width: min(280px, calc(100% - 8px)); padding: 6px;
  background: var(--solid); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,var(--shadow-a)); animation: drop .16s var(--ease);
}
.project-menu .menu-item { display: flex; width: 100%; max-width: 100%; border-radius: 12px; transition: background .12s; }
.project-menu .menu-item.on { background: transparent; color: var(--ink); font-weight: 600; }
.project-menu .menu-item.on::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); margin-left: auto; flex-shrink: 0; }
.project-menu .menu-item:hover { background: var(--hover); }
.project-menu .menu-item.on:hover { background: var(--hover); }
.project-menu .menu-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-menu .menu-ico { display: grid; place-items: center; color: var(--faint); }
.project-menu .pm-list { max-height: min(60vh, 420px); overflow-y: auto; }
.project-menu.ts-pin .pm-list { max-height: none; }
.project-menu .menu-chev { margin-left: auto; display: grid; place-items: center; width: 22px; height: 22px; margin-right: -4px; border-radius: 999px; color: var(--faint); transition: transform .15s ease; }
.project-menu .menu-chev:hover { background: var(--hover); color: var(--ink); }
.project-menu .menu-chev.open { transform: rotate(90deg); }
.project-menu .menu-chev svg { width: 14px; height: 14px; }
.project-menu .pm-folder svg { fill: #8cc4fa; stroke: #3d8ef0; }
.project-menu .menu-item.folder .menu-label { color: var(--ink); }
.project-menu .menu-item.on .menu-chev { margin-left: 6px; }
.project-sub { top: 0; width: 200px; z-index: 9; max-height: 60vh; overflow-y: auto; }
.project-menu .menu-ico svg { width: 15px; height: 15px; }
.project-brief {
  display: block; width: 100%; min-height: 64px; margin: 0 0 10px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: var(--surface); resize: none; outline: none; font-size: 13px; color: var(--ink);
}
.project-brief:focus { background: var(--hover); }
.tl-day { font: 600 11px/1 var(--mono, ui-monospace, Menlo, monospace); color: var(--faint); padding: 14px 8px 4px; list-style: none; }
.tl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 2px 10px; }
.tl-bar .seg button { padding: 3px 8px; font-size: 11px; }
.vline {
  list-style: none; position: relative; padding: 0 0 8px 18px; margin: 0;
}
.vline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.vline .tl-day { padding-left: 0; }
.vline .task { position: relative; }
.vline .task::before {
  content: ""; position: absolute; left: -16px; top: 16px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--pill); box-shadow: 0 0 0 2px var(--solid);
}
.vline .task.done::before { background: var(--accent); }
.vline .task.hl::before { background: #ec4899; }
.menu-row input[type=date], .menu-row input[type=number] {
  height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--pill); outline: none; max-width: 160px;
}
.proj-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(132px, calc(50% - 4px)), 1fr)); gap: 8px; padding: 4px 2px 16px; }
.proj-board:not(.list) .proj-card, .proj-board:not(.list) .proj-new { aspect-ratio: 5 / 4; border-radius: 18px; container-type: inline-size; }
.proj-board:not(.list) .proj-top { padding: 10px 10px 0; }
.proj-board:not(.list) .proj-name { font-size: clamp(12px, 10cqi, 15px); -webkit-line-clamp: 2; }
.proj-board:not(.list) .proj-meta { font-size: 10.5px; margin-top: 2px; }
.proj-board:not(.list) .proj-foot { padding: 0 8px 8px; }
.proj-board:not(.list) .proj-av { width: 16px; height: 16px; font-size: 8px; }
.proj-board:not(.list) .proj-when { font-size: 10px; }
.proj-board:not(.list) .proj-img-btn { top: 6px; right: 6px; width: 22px; height: 22px; }
.proj-board:not(.list) .proj-ren-btn { right: 32px; }
.proj-board:not(.list) .proj-del-btn { right: 58px; }
.proj-board.list { grid-template-columns: 1fr; gap: 6px; }
.proj-card {
  position: relative; aspect-ratio: 3 / 4; border-radius: 28px; overflow: hidden; cursor: pointer;
  color: #fff; text-align: center; isolation: isolate; outline: none;
  box-shadow: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.proj-card:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -20px rgba(13,13,13,.35); }
.proj-card:focus-visible { box-shadow: 0 0 0 2px var(--solid), 0 0 0 4px var(--ink); }
.proj-card.fresh { animation: cardIn .5s var(--ease); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
.proj-cover { position: absolute; inset: 0; z-index: -1; }
.proj-cover::before {
  content: ""; position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.proj-cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,.14) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 58%, rgba(20,30,10,.42) 100%);
}
.proj-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-top { position: absolute; left: 0; right: 0; top: 0; padding: 22px 16px 0; }
.proj-name {
  font-size: 20px; font-weight: 400; letter-spacing: -.03em; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  text-shadow: 0 1px 14px rgba(0,0,0,.18);
}
.proj-meta { font-size: 12px; margin-top: 6px; color: rgba(255,255,255,.86); text-shadow: 0 1px 10px rgba(0,0,0,.2); }
.proj-foot {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.proj-who { display: flex; align-items: center; gap: 6px; min-width: 0; text-align: left; }
.proj-av {
  position: relative; width: 22px; height: 22px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: grid; place-items: center; font-size: 10px; font-weight: 600; color: #fff;
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.7);
}
.proj-av img { width: 100%; height: 100%; object-fit: cover; }
.proj-when { font-size: 11px; color: rgba(255,255,255,.86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-img-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 28px; height: 28px; border-radius: 999px; opacity: 0;
  background: rgba(255,255,255,.9); color: #1d1d1f; display: grid; place-items: center; transition: opacity .15s;
}
.proj-card:hover .proj-img-btn, .proj-img-btn:focus-visible { opacity: 1; }
.proj-img-btn svg { width: 14px; height: 14px; }
.proj-ren-btn { right: 44px; }
.proj-del-btn { right: 76px; }
.proj-new {
  aspect-ratio: 3 / 4; border-radius: 28px; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; color: var(--muted); font-size: 13px; font-weight: 600;
  background: var(--surface); box-shadow: none;
}
.proj-new svg { width: 20px; height: 20px; }
.proj-new:hover { background: var(--hover); color: var(--ink); }
.proj-board.list .proj-card {
  aspect-ratio: auto; height: 64px; border-radius: 18px; text-align: left; box-shadow: none; color: inherit;
  display: flex; align-items: center; gap: 12px; padding: 0 12px 0 8px; background: var(--surface);
}
.proj-board.list .proj-card:hover { transform: none; background: var(--hover); }
.proj-board.list .proj-cover { position: relative; inset: auto; z-index: 0; width: 48px; height: 48px; border-radius: 14px; overflow: hidden; flex-shrink: 0; }
.proj-board.list .proj-cover::after { display: none; }
.proj-board.list .proj-top { position: static; padding: 0; flex: 1; min-width: 0; }
.proj-board.list .proj-name { font-size: 14px; -webkit-line-clamp: 1; text-shadow: none; }
.proj-board.list .proj-meta { color: var(--faint); margin-top: 1px; text-shadow: none; }
.proj-board.list .proj-foot { position: static; padding: 0; }
.proj-board.list .proj-who { display: none; }
.proj-board.list .proj-img-btn { display: none; }
.proj-board.list .proj-new { aspect-ratio: auto; height: 52px; flex-direction: row; border-radius: 18px; }
.cover-grid .avatar-opt { border-radius: 14px; aspect-ratio: 3 / 4; }
.task-meta-line { display: flex; gap: 8px; font-size: 11px; color: var(--faint); margin-top: 2px; }
.an-dates { display: flex; align-items: center; gap: 6px; }
.an-dates input[type=date] {
  height: 26px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink);
  font: 11px/1 var(--mono, ui-monospace, Menlo, monospace); outline: none; min-width: 0; max-width: 118px;
}
.an-dates input[type=date]:focus { background: var(--hover); }
.count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; margin-right: 4px; }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks.vline { padding: 0 0 8px 18px; }
.tasks.gantt { padding: 2px 0 14px; overflow-x: auto; scrollbar-width: thin; }
.task, .sub { position: relative; }
.task { border-radius: 12px; padding: 2px 0; transition: background-color .2s; }
.row { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 6px 4px 6px 8px; border-radius: 10px; transition: background-color .12s; }
.row:hover, .row.menu-open { background: var(--row-hover, var(--hover)); }
.main { flex: 1; min-width: 0; }
.text { display: block; overflow-wrap: anywhere; cursor: text; transition: color .2s; }
.done > .row .text, .sub.done .text { color: var(--faint); text-decoration: line-through; }
.done > .row:hover .text, .sub.done > .row:hover .text { color: var(--muted); text-decoration: none; }
.text a, .note-view a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.text a:hover, .note-view a:hover { text-decoration-thickness: 2px; }
.actions {
  position: absolute; right: 4px; top: 3px; display: none; padding-left: 18px;
  background: linear-gradient(to right, transparent, var(--row-hover-solid, var(--hover-solid)) 18px);
}
.sub .actions { top: 1px; }
.actions { top: auto; bottom: 4px; align-items: center; }
.actions .icon-btn { width: 24px; height: 24px; border-radius: 7px; }
.actions .icon-btn svg { width: 14px; height: 14px; }
.actions .ide-split .ide-chev { width: 14px; }
.sub .actions { top: auto; bottom: 2px; }
.task-menu { width: 232px; padding: 8px; }
.task-menu .menu-swatches { gap: 5px; padding: 2px 2px 8px; }
.task-menu .swatch { width: 16px; height: 16px; }
.task-menu .menu-row { flex-wrap: nowrap; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 2px; }
.task-menu .menu-label { flex: none; font-size: 12px; }
.task-menu .chips.small { justify-content: flex-end; gap: 3px; }
.task-menu .chips.small .chip { padding: 2px 7px; font-size: 11px; }
.task-menu .menu-row input[type=date], .task-menu .menu-row input[type=number] { height: 24px; font-size: 11.5px; }
.task-menu .menu-row input[type=number] { width: 64px; }
.task-menu .menu-gap { height: 6px; }
.task-menu .menu-row.tall { flex-direction: column; align-items: flex-start; gap: 5px; padding-bottom: 6px; }
.task-menu .menu-row.tall .chips.small { justify-content: flex-start; }
.task-menu .menu-item { padding: 6px 6px; font-size: 13px; }
.task-menu .menu-item svg { width: 14px; height: 14px; }
.row:hover .actions, .row:has(:focus-visible) .actions, .row.menu-open .actions, .actions:has(.ok), .actions:has(.ide-open) { display: flex; }
.ide-go .ide-logo { width: 16px; height: 16px; border-radius: 4px; }
.actions .ide-go .ide-logo, .note-btns .ide-go .ide-logo { width: 14px; height: 14px; }
.row:has(.edit-input) .actions { display: none !important; }
@media (hover: none) and (pointer: coarse) { .actions { position: static; display: flex; background: none; padding: 0; margin: -4px 0; } }
.edit-input {
  width: 100%; border: 1px solid var(--focus); border-radius: 8px; background: transparent;
  padding: 0 6px; margin: -2px 0; height: 26px; outline: none;
}

/* meta chips under a task */
.meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px 0 6px; border-radius: 999px;
  background: var(--pill); color: var(--muted); font-size: 12px; line-height: 1; white-space: nowrap;
}
.meta-chip svg { width: 12px; height: 12px; }
.meta-chip.clickable:hover, .meta-chip.tt:hover { color: var(--ink); background: var(--hover); }
.tt { font-variant-numeric: tabular-nums; font-weight: 500; transition: background-color .2s, color .2s; }
.tt .tt-icon svg { width: 10px; height: 10px; }
.tt.running { background: var(--accent); color: var(--on-accent); }
.tt.running:hover { background: var(--accent); color: var(--on-accent); opacity: .85; }
.tt.finished { background: color-mix(in srgb, #ef4444 15%, transparent); color: #ef4444; }

.children { margin-left: 26px; }
.sub .row { padding: 4px 4px 4px 8px; font-size: 13.5px; }
.sub-add { display: flex; align-items: center; gap: 10px; padding: 3px 4px 3px 8px; }
.sub-add .plus { width: 16px; color: var(--faint); text-align: center; }
.sub-add input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; padding: 3px 0; font-size: 13.5px; }
.sub-add input:focus { border-bottom-color: var(--focus); }

/* Notes */
.note { position: relative; margin: 4px 4px 6px 8px; background: var(--surface); border: 0; border-radius: 12px; transition: background-color .15s; }
.note .icon-btn.rec { color: #ec4899; animation: recPulse 1.2s ease-in-out infinite; }
.note.listening { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #ec4899 45%, transparent); }
@keyframes recPulse { 50% { background: color-mix(in srgb, #ec4899 14%, transparent); } }
.set-select {
  appearance: none; -webkit-appearance: none;
  height: 34px; padding: 0 36px 0 14px; border: 0; border-radius: 999px; color: var(--ink);
  background: var(--pill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8ea0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 12px no-repeat;
  font: inherit; font-size: 13px; outline: none; max-width: 100%; cursor: pointer;
}
.mic-page { display: grid; place-items: center; min-height: 100vh; }
.mic-box { width: 320px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.note-view { padding: 9px 12px 2px; font-size: 13px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; min-height: 24px; }
.note-view.placeholder { color: var(--faint); }
.note-btns { display: flex; justify-content: flex-end; gap: 0; padding: 0 4px 4px; }
.note-btns .icon-btn { width: 28px; height: 28px; }
.note-btns .icon-btn svg { width: 15px; height: 15px; }
.note textarea {
  display: block; width: 100%; box-sizing: border-box; border: 0; background: none; resize: none; outline: none;
  padding: 9px 12px 2px; font-size: 13px; color: var(--ink); min-height: 44px; max-height: min(55vh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
.note-view { max-height: min(55vh, 420px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.note:focus-within, .note.drop-files { background: var(--hover); }
.note-stack { display: flex; flex-direction: column; gap: 4px; margin: 4px 4px 6px 8px; }
.note-stack > .note { margin: 0; }
.note-stack > .thumbs { padding: 2px 2px 0; }
.note-bar, .note-head { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; border-radius: 12px; padding: 8px 10px 8px 12px; }
.note-head { background: none; padding: 9px 10px 0 12px; border-radius: 12px 12px 0 0; }
.note-bar:hover { background: var(--hover); }
.note-bar b, .note-head b { flex: none; max-width: 60%; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-head b { flex: 1; max-width: none; }
.note-bar-peek { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-bar .chev, .note-head .chev { flex: none; display: grid; place-items: center; width: 18px; height: 18px; color: var(--muted); }
.note-bar .chev svg, .note-head .chev svg { width: 14px; height: 14px; }
.note-add { align-self: flex-end; width: 28px; height: 28px; }
.note-add svg { width: 15px; height: 15px; }
.note .note-title { display: block; width: 100%; box-sizing: border-box; border: 0; background: none; outline: none; padding: 9px 12px 0; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); }
.note .note-title::placeholder { color: var(--faint); font-weight: 400; }
.note-head + .note-view { padding-top: 4px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px; }
.thumb { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: var(--line); animation: pop .22s var(--ease); }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s var(--ease); }
.thumb:hover img { transform: scale(1.05); }
.thumb .icon-btn { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; opacity: 0; transition: opacity .15s; }
.thumb .icon-btn svg { width: 12px; height: 12px; }
.thumb:hover .icon-btn { opacity: 1; }

/* Drag handle */
.grip { position: absolute; left: -11px; top: 7px; width: 14px; height: 20px; color: var(--faint); display: none; place-items: center; cursor: grab; border-radius: 4px; }
.grip svg { width: 14px; height: 14px; }
.sub .grip { top: 5px; }
.row:hover > .grip { display: grid; }
.grip:hover { color: var(--ink); }
.dragging { opacity: .35; }
.drop-before::before, .drop-after::after { content: ""; position: absolute; left: 6px; right: 6px; height: 4px; border-radius: 999px; background: rgba(13,13,13,.05); box-shadow: 0 2px 8px rgba(13,13,13,.12); z-index: 2; pointer-events: none; }
.drop-before::before { top: -1px; }
.drop-after::after { bottom: -1px; }

/* Task colors */
.task.colored {
  background: color-mix(in srgb, var(--c) 10%, var(--bg));
  --row-hover: color-mix(in srgb, var(--c) 18%, var(--bg));
  --row-hover-solid: color-mix(in srgb, var(--c) 18%, var(--base-bg));
  margin-bottom: 2px;
}
.task.colored .note { background: color-mix(in srgb, var(--c) 5%, transparent); }

/* Menus */
.menu {
  position: absolute; right: 4px; top: 34px; z-index: 6; width: 248px; padding: 6px;
  background: var(--solid); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,var(--shadow-a)); animation: drop .16s var(--ease);
}
.menu.up, .ide-menu.up { top: auto; bottom: calc(100% + 4px); }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu > .chips { justify-content: flex-start; padding: 4px; }
.menu-swatches { display: flex; gap: 6px; padding: 6px 6px 8px; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 4px 6px; flex-wrap: wrap; }
.menu-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.menu-label svg { width: 14px; height: 14px; }
.menu-row .chips { justify-content: flex-start; }
.menu-row.stack { flex-direction: column; align-items: flex-start; gap: 6px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 2px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; text-align: left; }
.menu-item:hover { background: var(--hover); }
.menu-item svg { width: 16px; height: 16px; color: var(--faint); }
.menu-item.danger, .menu-item.danger svg { color: #ef4444; }
.custom-min { display: inline-flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.custom-min label { display: inline-flex; align-items: center; gap: 4px; }
.menu-row .custom-min input[type=number] { width: 48px; padding: 0 6px; text-align: center; }
.custom-min .mini-play { width: 28px; height: 28px; display: grid; place-items: center; }
.custom-min .mini-play svg { width: 12px; height: 12px; }
.swatch { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform .12s; }
.swatch:hover { transform: scale(1.12); }
.swatch.active { box-shadow: 0 0 0 2px var(--solid), 0 0 0 4px var(--ink); }
.swatch.none { background: var(--solid); box-shadow: inset 0 0 0 1.5px var(--line); position: relative; overflow: hidden; }
.swatch.none::after { content: ""; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1.5px; background: var(--faint); transform: rotate(45deg); }
.swatch.none.active { box-shadow: inset 0 0 0 1.5px var(--line), 0 0 0 2px var(--solid), 0 0 0 4px var(--ink); }

.empty { padding: 28px 0; text-align: center; color: var(--faint); font-size: 13px; }
.link-btn { font-size: 12px; color: var(--faint); }
.link-btn:hover { color: var(--ink); text-decoration: underline; }

/* Composer */
.composer { position: sticky; bottom: 0; margin-top: auto; padding: 12px 0 14px; background: var(--bg); display: flex; align-items: center; gap: 8px; z-index: 3; }
.composer-field { position: relative; flex: 1; display: flex; min-width: 0; }
.composer textarea#newTask { height: auto; min-height: 46px; max-height: 160px; padding: 12px 52px 12px 18px; line-height: 20px; border-radius: 23px; resize: none; font: inherit; color: var(--ink); overflow-y: auto; }
.composer-field .send { top: auto; bottom: 7px; transform: none; }
textarea.edit-input { display: block; height: auto; min-height: 26px; padding: 2px 6px; resize: none; font: inherit; color: inherit; line-height: 20px; overflow: hidden; }
.text { white-space: pre-wrap; }
#newDue {
  height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink);
  font-size: 12px; outline: none; width: 128px; flex-shrink: 0;
}
.composer input, .composer textarea {
  flex: 1; min-width: 0; height: 46px; padding: 0 52px 0 18px; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--base-bg) max(var(--alpha), 60%), transparent); outline: none; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.composer input::placeholder { color: var(--faint); }
.composer input:focus { border-color: var(--focus); }
.send { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: opacity .15s; }
.send:disabled { opacity: .25; cursor: default; }
.send svg { width: 16px; height: 16px; }

/* Archive drawer */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.18); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 20; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(88vw, 380px); z-index: 21; overflow-y: auto;
  background: var(--solid); box-shadow: -12px 0 32px rgba(0,0,0,var(--shadow-a)); padding: 8px 12px 16px;
  transform: translateX(104%); transition: transform .3s var(--ease); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer:not(.open) { transition: transform .3s var(--ease), visibility 0s .3s; }
.drawer-head { display: flex; align-items: center; gap: 10px; height: 40px; margin-bottom: 4px; padding-left: 4px; }
.drawer-title { flex: 1; font-size: 16px; font-weight: 400; letter-spacing: -.01em; }
.drawer-list .row { padding: 7px 4px 7px 8px; }
.drawer-list .text { color: var(--muted); }
.archived-date { font-size: 12px; color: var(--faint); margin-top: 1px; }
.drawer-actions { display: flex; gap: 0; margin: -3px 0; }
.drawer-actions .icon-btn { color: var(--muted); }

/* Settings */
.settings { padding: 4px 2px 16px; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
body.settings-open .timer, body.settings-open .checklist, body.settings-open .composer { display: none !important; }
.set-group { padding: 10px 0 14px; border-bottom: 1px solid var(--line); }
.set-group:last-child { border-bottom: 0; }
.set-title { font-size: 13px; font-weight: 500; color: var(--muted); padding: 0 4px 6px; }
.switch-row, .color-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 4px; cursor: pointer; border-radius: 10px; }
.switch-row:hover, .color-row:hover { background: var(--hover); }
.switch { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 999px; margin: 0; background: var(--line); position: relative; cursor: pointer; transition: background-color .2s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(14px); background: var(--on-accent); }
.color-rows { transition: opacity .2s; }
.color-rows.disabled { opacity: .35; pointer-events: none; }
.color-row input[type=color] { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); }
.range-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; }
.range-row > span:first-child { flex: 1; }
.range-row input[type=range] { width: 110px; accent-color: var(--accent); }
.range-val { width: 38px; text-align: right; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.set-group > .link-btn { display: block; margin: 4px 4px 0 auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px 0; transition: opacity .2s; }
.swatches.disabled { opacity: .35; pointer-events: none; }
.set-buttons { display: flex; gap: 8px; padding: 4px 4px 0; }
.btn-secondary { flex: 1; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 500; transition: background-color .15s; }
.btn-secondary:hover { background: var(--hover); }

/* Floating window */
html:has(body.float) { background: transparent; }
body.float { min-width: 0; overflow-x: hidden; }
body.float .app { min-height: 0; padding: 4px 12px 0; }
body.float .app-head { cursor: grab; margin-bottom: 4px; }
body.float .app-head.grabbing { cursor: grabbing; }
body.float .checklist { flex: none; margin-top: 14px; padding-bottom: 10px; }
body.float .composer { display: none; padding: 4px 0 12px; }
body.float.composer-open .composer { display: flex; }
body.float.composer-open .checklist { padding-bottom: 0; }
body.float.hide-timer .timer, body.float.hide-checklist .checklist, body.float.hide-checklist .composer,
body.float.hide-archive #archiveBtn { display: none !important; }
body.float.float-min .app { padding: 4px 8px 4px 12px; }
body.float.float-min .app-head { margin: 0; }
body.float.float-min #statsBtn { display: none; }
body.float.float-min .apps-nav { flex-shrink: 0; }
body.float.float-min .head-time { flex-shrink: 0; min-width: 0; }
body.float-min.subview .head-time, body.float-min.subview #headPlay { display: none !important; }
body.float-min:not(.subview) .app-head > .head-fill { flex: 0 1 auto; }
body.float-min:not(.subview) #headPlay { margin-right: auto; }
.app-head > * { flex-shrink: 0; }
.app-head > .head-fill { flex-shrink: 1; }
.apps-pop {
  position: fixed; z-index: 40; width: min(240px, calc(100vw - 12px)); max-height: calc(100vh - 12px); overflow: auto; padding: 6px;
  display: flex; flex-direction: column; gap: 2px; background: var(--solid); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16), 0 0 0 1px var(--line); animation: appsSlide .24s var(--ease);
  overscroll-behavior: contain; align-content: start;
}
.apps-pop.two { width: min(440px, calc(100vw - 12px)); display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: row; }
.apps-pop.two .apps-pop-add { grid-column: 1 / -1; }
@keyframes appsSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.apps-pop-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--ink); text-align: left; }
.apps-pop-item:hover { background: var(--hover); }
.apps-pop-item span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-pop-plus { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--ink); }
.apps-pop-plus svg { width: 16px; height: 16px; }
.apps-pop-item { cursor: pointer; }
.apps-pop-item input.apps-pop-check { width: 16px; height: 16px; margin: 0 -2px 0 0; border-radius: 5px; }
.apps-pop-check-gap { width: 16px; flex: none; margin-right: -2px; }
.apps-pop-item .apps-pop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apps-pop-acts { display: flex; gap: 2px; margin: -4px -6px -4px 0; opacity: 0; transition: opacity .15s; }
.apps-pop-item:hover .apps-pop-acts, .apps-pop-acts:focus-within { opacity: 1; }
.apps-pop-acts .icon-btn { width: 24px; height: 24px; }
.apps-pop-acts .icon-btn svg { width: 14px; height: 14px; }
.apps-pop-arch { color: var(--faint); }
.apps-pop-item.archived .apps-pop-name { color: var(--faint); }
.apps-pop.two .apps-pop-arch { grid-column: 1 / -1; }
.add-app .ai-app-search, .ob-body .ai-app-search { max-width: none; }
.modal.add-app { padding: 12px 12px 14px; }
.add-app-head { display: flex; align-items: center; gap: 4px; padding: 0 0 12px 6px; }
.add-app-head .icon-btn:first-child { margin-left: -6px; }
.add-app-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-app .set-input:focus { box-shadow: none; background: var(--hover); }
.add-app .ai-app-list:not(:empty) { margin-top: 4px; }
.add-app-own { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; color: var(--muted); text-align: left; transition: color .15s, background-color .15s; }
.add-app-own:hover { color: var(--ink); background: var(--hover); }
.add-app-own svg { width: 18px; height: 18px; stroke-width: 1.6; flex: none; }
.add-app-actions { display: flex; flex-direction: column; gap: 6px; }
.add-app-soft { width: 100%; height: 40px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 500; transition: background-color .15s; }
.add-app-soft:hover { background: var(--hover); }
.add-app-list { display: flex; flex-direction: column; gap: 2px; }
.ob-build { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ob-build .ai-app-badge { flex: none; }
.ob-build span:not(.ai-app-badge) { margin-right: auto; font-size: 14px; font-weight: 500; }
.pill-chips { justify-content: flex-start; padding: 2px 4px; }
.pill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 5px; }
.pill-chip .app-badge { width: 18px; height: 18px; }
body.float::-webkit-scrollbar { width: 6px; }
body.float::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Segmented control ---------- */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--pill); gap: 2px; }
.seg button { padding: 4px 12px; border-radius: 999px; font-size: 12px; color: var(--muted); transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--solid); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg.wide { display: flex; margin: 2px 4px 0; }
.seg.wide button { flex: 1; padding: 6px 8px; font-size: 13px; }
.icon-btn.on { background: var(--hover); color: var(--ink); }

/* ---------- Analytics ---------- */
:root { --hl: #f26b1d; --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace; }
body.analytics-open { background: color-mix(in srgb, var(--base-text) 4.5%, var(--bg)); }
body.subview.analytics-open .app-head { background: color-mix(in srgb, var(--base-text) 4.5%, var(--bg)); }
.analytics { --hl0: var(--hl); }
.an-right { display: flex; align-items: center; gap: 4px; }
.an-style-btn { width: 24px; height: 24px; border-radius: 999px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.an-card:hover .an-style-btn, .an-style-btn:focus-visible { opacity: 1; }
.an-style-btn svg { width: 14px; height: 14px; }
.an-style { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.an-style .seg button { font-size: 11.5px; }
.an-swatches { display: flex; gap: 5px; }
.an-swatch { width: 18px; height: 18px; border-radius: 999px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.an-swatch.on { box-shadow: 0 0 0 2px var(--solid), 0 0 0 3.5px var(--c); }
.an-card .an-chart.solid { display: grid; gap: 4px; align-items: end; height: 72px; }
.an-bar-col { height: 100%; display: flex; align-items: flex-end; cursor: default; }
.an-chart.solid .an-bar-col i { display: block; width: 100%; max-width: 26px; margin: 0 auto; border-radius: 6px; background: color-mix(in srgb, var(--hl) 32%, transparent); transition: background-color .15s; }
.an-chart.solid .an-bar-col.hl i, .an-chart.solid .an-bar-col:hover i { background: var(--hl); }
.an-card .an-chart.has-vals { margin-top: 16px; }
.an-bar-col, .an-card .an-col { position: relative; }
.an-val { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 10px; line-height: 1; font-weight: 600; color: var(--faint); white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.an-bar-col.hl .an-val, .an-col.hl .an-val { color: var(--hl); }
.an-card .an-chart.linechart { position: relative; height: 72px; }
.an-chart.linechart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.an-chart.linechart .stroke { fill: none; stroke: var(--hl); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.an-chart.linechart .area { fill: color-mix(in srgb, var(--hl) 12%, transparent); stroke: none; }
.an-hits { position: absolute; inset: 0; display: grid; }
.an-hits span { cursor: default; border-radius: 6px; }
.an-hits span:hover { background: color-mix(in srgb, var(--hl) 8%, transparent); }
.an-card .an-chart.ring { display: flex; align-items: center; gap: 16px; }
.an-chart.ring svg { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.an-chart.ring circle { fill: none; stroke-width: 5.5; }
.an-chart.ring .track { stroke: color-mix(in srgb, var(--base-text) 8%, transparent); }
.an-chart.ring .seg { stroke: var(--hl); cursor: default; }
.an-legend { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.an-legend > div { display: flex; align-items: center; gap: 7px; }
.an-chart .an-legend i { width: 8px; height: 8px; border-radius: 999px; background: var(--hl); flex: none; }
.an-legend b { margin-left: auto; padding-left: 10px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
body.analytics-open .timer, body.analytics-open .checklist, body.analytics-open .composer { display: none !important; }
.analytics { padding: 2px 0 18px; animation: fade .2s var(--ease); }
.an-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.menu-row input[type=date] {
  height: 26px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink);
  font-size: 12px; outline: none;
}
.an-bar .seg button { font-family: var(--mono); letter-spacing: .06em; font-size: 11px; }
.an-cards { display: flex; flex-direction: column; gap: 12px; }
.an-card {
  background: var(--solid); border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04); animation: pop .25s var(--ease);
}
.an-label { font: 600 10px/1 var(--mono); color: var(--hl); }
.an-value { font: 400 40px/1.05 var(--mono); letter-spacing: -.03em; margin-top: 16px; font-variant-numeric: tabular-nums; }
.an-value small { font-size: 15px; letter-spacing: 0; margin-left: 6px; color: var(--muted); }
.an-cap { font: 10px/1.65 var(--mono); color: var(--faint); margin-top: 12px; max-width: 260px; }
.an-chart { margin-top: 26px; --dot: 7px; --gap: 5px; }
.an-chart i { display: block; width: var(--dot); height: var(--dot); border-radius: 50%; background: color-mix(in srgb, var(--base-text) 14%, transparent); }
.an-chart.bars { display: flex; justify-content: space-between; align-items: flex-end; height: calc(10 * 7px + 9 * 5px); }
.an-chart.bars.dense { --dot: 5px; --gap: 3px; height: calc(10 * 5px + 9 * 3px); }
.an-col { display: grid; gap: var(--gap); align-content: end; height: 100%; cursor: default; }
.an-col i.zero { opacity: .45; }
.an-col.hl i { background: var(--hl); }
.an-chart.grid { display: grid; gap: 6px 5px; justify-content: start; }
.an-chart.grid i.hl { background: var(--hl); }
.an-foot { display: flex; gap: 18px; margin-top: 24px; }
.an-link { font: 600 10px/1 var(--mono); text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.an-link.muted { color: var(--faint); }
.an-link:hover { color: var(--hl); }
.an-customize { background: var(--solid); border-radius: 18px; padding: 12px 10px; margin-bottom: 12px; }
.an-mono-title { font: 600 10px/1 var(--mono); color: var(--faint); padding: 8px 4px 6px; }
.custom-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 4px 4px; font-size: 14px; }
.an-add { display: flex; gap: 6px; padding: 6px 2px 2px 4px; }
.an-add input { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 10px; background: transparent; padding: 0 10px; outline: none; font-size: 13px; }
.an-add input:focus { border-color: var(--focus); }

/* ---------- Clock faces ---------- */
.time.face-flip, .time.face-led { display: inline-flex; align-items: center; gap: 4px; padding: 0; letter-spacing: 0; }
.led-tag { display: none; }

/* Flip clock */
.flip { position: relative; width: 36px; height: 54px; perspective: 220px; border-radius: 7px; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.flip .half { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: linear-gradient(#2b2b2b, #1d1d1d); color: #f4f1ea; }
.flip .half .num { display: block; height: 54px; line-height: 54px; text-align: center; font: 600 40px/54px ui-sans-serif, -apple-system, "Helvetica Neue", Arial, sans-serif; font-variant-numeric: tabular-nums; }
.flip .top, .flip .ftop { top: 0; border-radius: 7px 7px 0 0; }
.flip .bottom, .flip .fbottom { bottom: 0; border-radius: 0 0 7px 7px; background: linear-gradient(#1f1f1f, #262626); }
.flip .bottom .num, .flip .fbottom .num { margin-top: -27px; }
.flip .top::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgba(0,0,0,.6); }
.flip .ftop, .flip .fbottom { display: none; backface-visibility: hidden; }
.flip .ftop { transform-origin: bottom; z-index: 2; }
.flip .fbottom { transform-origin: top; z-index: 2; }
.flip.go .ftop { display: block; animation: flipTop .28s ease-in forwards; }
.flip.go .fbottom { display: block; transform: rotateX(90deg); animation: flipBottom .28s ease-out .28s forwards; }
@keyframes flipTop { from { transform: rotateX(0); } to { transform: rotateX(-90deg); } }
@keyframes flipBottom { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
.colon.c-flip { width: auto; height: auto; perspective: none; box-shadow: none; font: 600 30px/1 ui-sans-serif, system-ui, sans-serif; color: var(--faint); margin: 0 1px; background: none; }
.timer[data-style="flip"] .progress { margin-top: 18px; }

/* LED clock radio */
.timer[data-style="led"] { background: linear-gradient(#2a211c, #1a1411); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 18px rgba(0,0,0,.18); color-scheme: dark; }
.timer[data-style="led"] .timer-full { padding-top: 26px; }
.timer[data-style="led"] .time.face-led {
  background: #0c0605; border-radius: 10px; padding: 12px 14px; box-shadow: inset 0 2px 10px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.06);
}
.seg7 { display: block; width: 28px; height: 50px; }
.seg7 svg { width: 100%; height: 100%; transform: skewX(-6deg); overflow: visible; }
.seg7 polygon { fill: #ff2d1a; opacity: .08; transition: opacity .08s; }
.seg7 polygon.on { opacity: 1; filter: drop-shadow(0 0 3px rgba(255,45,26,.85)); }
.colon.c-led { color: #ff2d1a; font: 700 30px/1 ui-sans-serif, system-ui, sans-serif; text-shadow: 0 0 6px rgba(255,45,26,.8); margin: 0 1px; transform: translateY(-2px); }
.time.face-led.running .colon.c-led { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.timer[data-style="led"] .led-tag { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; font: 600 9px/1 var(--mono); letter-spacing: .2em; color: #b98a73; }
.led-dot { width: 6px; height: 6px; border-radius: 50%; background: #4a2a22; }
.timer[data-style="led"].running .led-dot { background: #ff2d1a; box-shadow: 0 0 6px #ff2d1a; }
.timer[data-style="led"] .progress { background: rgba(255,255,255,.08); margin-top: 16px; }
.timer[data-style="led"] .progress-fill { background: #ff2d1a; box-shadow: 0 0 6px rgba(255,45,26,.7); }
.timer[data-style="led"] .round-btn { background: rgba(255,255,255,.07); color: #d7c3b8; }
.timer[data-style="led"] .round-btn:hover, .timer[data-style="led"] .round-btn.on { background: rgba(255,255,255,.13); color: #fff; }
.timer[data-style="led"] .play-btn { background: #e8dfd6; color: #1a1411; }
.timer[data-style="led"] .timer-collapse, .timer[data-style="led"] .timer-mini .icon-btn:not(.mini-play) { color: #b98a73; }
.timer[data-style="led"] .timer-mini .mini-time { color: #ff2d1a; font-family: var(--mono); text-shadow: 0 0 6px rgba(255,45,26,.6); }
.timer[data-style="led"] .mini-play { background: #e8dfd6; color: #1a1411; }
.timer[data-style="led"] .chip { background: rgba(255,255,255,.07); color: #d7c3b8; }
.timer[data-style="led"] .chip.active { background: #ff2d1a; color: #fff; }
.timer[data-style="led"] .time-inputs input { border-color: rgba(255,255,255,.12); color: #f0e6df; }
.timer[data-style="led"] .time-inputs label { color: #b98a73; }

/* ---------- Sub-view header (Settings / Analytics) ---------- */
.back-btn { display: none; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 4px; margin-top: 2px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); }
.back-btn:hover { background: var(--hover); }
.back-ico svg { width: 18px; height: 18px; }
body.subview .back-btn { display: inline-flex; }
body.subview #statsBtn, body.subview #archiveBtn, body.subview #settingsBtn, body.subview #modeBtn, body.subview #minBtn { display: none !important; }

/* note icon reflects a hidden note */
.icon-btn.has-note { color: var(--ink); position: relative; }
.icon-btn.has-note::after { content: ""; position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.icon-btn.note-open { color: var(--ink); }

/* ---------- Cmd/Ctrl+' task picker ---------- */
.pick-hint { margin: 0 4px 8px; padding: 8px 12px; border-radius: 12px; background: var(--pill); font: 11px/1.5 var(--mono); letter-spacing: .04em; color: var(--muted); animation: fade .2s var(--ease); }
.pick-num {
  flex-shrink: 0; width: 20px; height: 20px; margin: 0.5px -2px 0 -4px; border-radius: 6px; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font: 600 11px/1 var(--mono); animation: pop .18s var(--ease);
}
.row.pickable { cursor: pointer; }

/* ---------- Keyboard shortcut list ---------- */
.kbd-list { display: flex; flex-direction: column; }
.kbd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 4px; }
.kbd-label { font-size: 13.5px; color: var(--ink); }
.kbd-keys { display: inline-flex; gap: 4px; flex-shrink: 0; }
kbd {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; display: inline-grid; place-items: center;
  font: 600 11px/1 var(--mono); color: var(--ink); background: var(--pill); box-shadow: inset 0 -1px 0 var(--line);
}

/* ---------- First-run pop-up ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px 12px; background: rgba(0,0,0,.28); animation: fade .2s var(--ease); overflow-y: auto; }
.modal { width: 100%; max-width: 380px; background: var(--solid); border-radius: 20px; padding: 18px 16px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: pop .25s var(--ease); }
.modal-title { font-size: 17px; font-weight: 400; letter-spacing: -.01em; padding: 0 4px 8px; }
.modal-foot { font-size: 12px; color: var(--faint); padding: 8px 4px 12px; }
.modal-btn { width: 100%; height: 40px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 500; }
.modal-btn:hover { opacity: .88; }
.modal-actions { display: flex; gap: 8px; margin-top: 14px; }
.risk-text { margin: 0; padding: 0 4px 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.risk-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.risk-strict { color: var(--ink); }
.risk-check { display: flex; align-items: center; gap: 9px; padding: 2px 4px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.risk-check input { appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 0; border: 0; border-radius: 5px; background: var(--pill); cursor: pointer; transition: background-color .15s; }
.risk-check input:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat; }
.modal-actions .btn-secondary, .modal-actions .modal-btn { flex: 1; height: 40px; }
#popForm { display: flex; flex-direction: column; gap: 12px; }
#popName {
  width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 999px; outline: none;
  background: var(--surface); font-size: 15px;
}
#popName:focus { background: var(--hover); }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 45; display: flex; flex-direction: column; align-items: center; gap: 6px; width: calc(100% - 32px); pointer-events: none; }
.toast {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; box-sizing: border-box;
  padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--base-bg); font-size: 13px;
  opacity: 0; transform: translateY(8px); pointer-events: auto; transition: opacity .2s, transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast.rich { padding: 6px 6px 6px 10px; border-radius: 18px; }
.toast-text { min-width: 0; white-space: normal; line-height: 1.35; }
.toast-ico { width: 18px; height: 18px; border-radius: 5px; object-fit: contain; flex-shrink: 0; }
.toast-btn { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); color: inherit; font-size: 12px; font-weight: 600; }
.toast-btn:hover { background: rgba(255,255,255,.26); }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.set-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; border-radius: 10px; padding: 6px 4px; margin: -2px 0 0; text-align: left; }
.set-toggle:hover { background: var(--hover); color: var(--ink); }
.set-toggle .chev svg { width: 16px; height: 16px; color: var(--faint); }
.set-ico { display: grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; flex-shrink: 0; color: var(--faint); }
.set-ico svg { width: 16px; height: 16px; }
.set-toggle:hover .set-ico { color: var(--ink); }
.set-toggle .set-toggle-label, .set-toggle > span:not(.chev):not(.set-ico) { flex: 1; min-width: 0; }
.set-group:has(.set-toggle) { padding-bottom: 8px; }
.custom-swatch { position: relative; overflow: hidden; cursor: pointer; background: conic-gradient(#ef4444, #eab308, #10a37f, #3b82f6, #8b5cf6, #ec4899, #ef4444); }
.custom-swatch.active { background: var(--c); }
.custom-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; padding: 0; }

/* collapsible subtasks */
.title-line { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.title-line .text { flex: 0 1 auto; min-width: 0; }
.title-line .edit-input { flex: 1; }
.sub-count { flex-shrink: 0; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; line-height: 21px; }
.disclose { display: none; }
body.has-subs #tasks > .task > .row > .disclose, .ts-body .tasks:has(> .task > .row .sub-toggle) > .task > .row > .disclose { display: block; width: 16px; height: 21px; margin: 0 -6px 0 -4px; flex-shrink: 0; }
.sub-toggle { width: 18px; height: 20px; margin: 0.5px 0 0 -1px; border-radius: 5px; display: grid; place-items: center; color: var(--faint); transition: background-color .15s, color .15s; }
.sub-toggle:hover { background: var(--hover); color: var(--ink); }
.sub-toggle svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.sub-toggle.collapsed svg { transform: rotate(-90deg); }
body.has-subs #tasks > .task > .children { margin-left: 32px; }
.sub-peek { max-height: 0; overflow: hidden; opacity: 0; pointer-events: none; transition: max-height .32s var(--ease), opacity .2s ease; -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
.task.peek > .children > .sub-peek { max-height: 30px; opacity: .7; pointer-events: auto; }
.task.peek-open > .children > .sub-peek { max-height: var(--h, 600px); opacity: 1; -webkit-mask-image: none; mask-image: none; }

/* ---------- Log in / sign up ---------- */
body.auth-open .app, body.auth-open .drawer, body.auth-open .backdrop { visibility: hidden; }
.auth {
  --a-ink: #fff; --a-soft: rgba(255,255,255,.62); --a-faint: rgba(255,255,255,.42); --a-line: rgba(255,255,255,.14);
  --a-ease: cubic-bezier(.22,1,.36,1);
  position: fixed; inset: 0; z-index: 60; overflow-y: auto; color: var(--a-ink); background: #0b0a0a; color-scheme: dark;
  display: flex; flex-direction: column; align-items: center;
}
.auth.leaving { animation: authOut .5s var(--a-ease) forwards; }
@keyframes authOut { to { opacity: 0; filter: blur(6px); transform: scale(1.015); } }
.auth-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: #0b0a0a url("auth-bg.webp") center top / cover no-repeat; animation: bgIn 1.6s var(--a-ease) both; }
/* darkens the lower half so the form stays readable on any panel height */
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,10,0) 8%, rgba(11,10,10,.4) 30%, rgba(11,10,10,.72) 52%, rgba(11,10,10,.9) 100%); }
@keyframes bgIn { from { opacity: 0; transform: scale(1.06); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }

.auth-brand {
  position: fixed; top: 16px; left: 18px; z-index: 2; display: flex; align-items: center; gap: 8px; color: #111113;
  transform-origin: 13px 13px; pointer-events: none;
}
.auth-brand .tijd-logo { width: 26px; height: 26px; }
.auth-word { font-size: 16px; font-weight: 600; letter-spacing: -.3px; line-height: 1; }
.tijd-logo { width: 96px; height: 96px; overflow: visible; }

.auth-inner { position: relative; width: 100%; max-width: 340px; margin: auto 0; padding: 64px 24px 40px; display: flex; flex-direction: column; align-items: stretch; }
.auth-title { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -1.1px; line-height: 1.1; text-align: left; align-self: flex-start; text-shadow: 0 1px 24px rgba(0,0,0,.18); }
.auth-sub { margin: 8px 0 24px; font-size: 14px; color: var(--a-soft); text-align: left; }
.auth-seg { position: relative; display: flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--a-line); backdrop-filter: blur(14px); margin-bottom: 12px; }
.auth-seg button { position: relative; z-index: 1; flex: 1; height: 32px; border-radius: 999px; font-size: 13.5px; color: var(--a-soft); transition: background-color .25s var(--a-ease), color .25s, box-shadow .25s; }
.auth-seg button.active { background: #fff; color: #111113; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.auth-form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.auth-form.shake { animation: shake .36s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth-field input {
  width: 100%; height: 46px; padding: 0 18px; border: 0; border-radius: 14px; outline: none; font-size: 14.5px; color: var(--a-ink);
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--a-line); backdrop-filter: blur(14px);
  transition: box-shadow .2s, background-color .2s;
}
.auth-field input::placeholder { color: var(--a-faint); }
.auth-field input:focus { background: rgba(255,255,255,.11); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.auth-pass { position: relative; }
.auth-pass input { padding-right: 84px; }
.auth-pass input[type=text] { font-family: "Geist Mono", ui-monospace, monospace; letter-spacing: .02em; }
.auth-ib { position: absolute; top: 7px; right: 7px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--a-soft); transition: background-color .15s, color .15s; }
#authGen { right: 41px; }
.auth-ib:hover { background: rgba(255,255,255,.1); color: var(--a-ink); }
.auth-ib svg { width: 17px; height: 17px; stroke-width: 1.6; }
.auth-ib.nudge { color: var(--a-ink); animation: authNudge 1.2s var(--a-ease) 2; }
@keyframes authNudge { 50% { background: rgba(255,255,255,.18); } }
.auth button, .auth a, .auth input { outline: none; }
.auth button:focus-visible, .auth a:focus-visible { box-shadow: 0 0 0 1px rgba(255,255,255,.55); }
.auth-legal { margin: 14px 2px 0; font-size: 11px; line-height: 1.5; color: var(--a-faint); text-align: center; }
.auth-legal a { color: inherit; text-underline-offset: 2px; }
.auth-checks { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 0; }
.auth-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; color: var(--a-soft); cursor: pointer; }
.auth-check input[type=checkbox] { border: 0; }
.auth-check input { appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 1px 0 0; border-radius: 5px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); cursor: pointer; transition: background-color .15s, box-shadow .15s; }
.auth-check input:checked { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center/11px no-repeat; box-shadow: none; }
.auth-check a { color: var(--a-ink); text-decoration: underline; text-underline-offset: 2px; }
.auth-error { min-height: 16px; font-size: 12.5px; color: #ff9b8a; padding: 0 6px; }
.auth-btn { height: 48px; border-radius: 999px; background: #fff; color: #111113; font-size: 14.5px; font-weight: 500; transition: opacity .15s, transform .12s; }
.auth-btn:hover { opacity: .9; }
.auth-btn:active { transform: scale(.985); }
.auth-btn:disabled { opacity: .55; cursor: default; }
.auth-link { align-self: center; margin-top: 4px; font-size: 12.5px; color: var(--a-soft); }
.auth-link:hover { color: var(--a-ink); }

/* intro: everything except the brand waits until the intro reveals it */
.auth.intro .auth-inner > :not(.auth-title), .auth.intro .powered { opacity: 0; }
.auth.intro .auth-title { opacity: 0; }
.auth.intro .auth-word { opacity: 0; }

/* ---------- Stage: the login background carries over into onboarding ---------- */
body.stage-open .app, body.stage-open .drawer, body.stage-open .backdrop { visibility: hidden; }
.stage {
  --st-ease: cubic-bezier(.22,1,.36,1);
  position: fixed; inset: 0; z-index: 59; overflow: hidden; background: #0b0a0a; color: #111113;
  transition: color 1.8s var(--st-ease);
}
.stage-drift { position: absolute; inset: 0; }
.stage-bg {
  position: absolute; inset: 0; background: #0b0a0a url("auth-bg.webp") center top / cover no-repeat;
  --ob-y: 0%; --ob-hue: 0deg;
  transition: transform 2.8s var(--st-ease), filter 2.8s var(--st-ease);
}
/* same shade as the login, so the hand-off is invisible */
.stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(11,10,10,0) 14%, rgba(11,10,10,.32) 36%, rgba(11,10,10,.7) 60%, rgba(11,10,10,.9) 100%); }
/* onboarding shade: deeper and even, fades in slowly */
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 2.4s var(--st-ease);
  background: radial-gradient(120% 70% at 50% 35%, rgba(11,10,10,.25) 0%, rgba(11,10,10,.72) 100%);
}
.stage .stage-brand { z-index: 2; color: inherit; }
.stage.ob { color: #fff; }
.stage.ob::after { opacity: 1; }
.stage.ob .stage-bg { transform: translateY(var(--ob-y)) scale(1.22); filter: blur(22px) saturate(1.15) hue-rotate(var(--ob-hue)); }
.stage.ob .stage-drift { animation: stageDrift 26s ease-in-out infinite alternate; }
@keyframes stageDrift { from { transform: none; } to { transform: translate(-2%, 1.5%) scale(1.04); } }
.stage.leaving { animation: stageOut 1.1s var(--st-ease) forwards; pointer-events: none; }
.stage.leaving .stage-drift { animation: none; }
.stage.leaving .stage-brand { opacity: 0; transform: translateY(-4px); transition: opacity .45s ease, transform .45s ease; }
@keyframes stageOut { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(1.08); } }

/* onboarding card on the stage: dark glass, same quiet look as the login */
body.stage-open #onboard.on-stage {
  z-index: 61; background: transparent; animation: none; color-scheme: dark;
  --base-bg: #171616; --base-text: #ffffff; --accent: #ffffff; --on-accent: #111113; --link: #9cc2ff; --shadow-a: .4;
  --bg: #171616; --solid: #1d1c1c; --surface: rgba(255,255,255,.07); --hover: rgba(255,255,255,.11); --hover-solid: #2a2828;
  --pill: rgba(255,255,255,.09); --line: rgba(255,255,255,.12); --ink: #fff; --muted: rgba(255,255,255,.7);
  --faint: rgba(255,255,255,.48); --cb-border: rgba(255,255,255,.42); --focus: rgba(255,255,255,.3);
  color: var(--ink);
}
body.stage-open #onboard.on-stage .modal {
  animation: none; color: var(--ink); border-radius: 24px;
  background: rgba(24,23,23,.5); backdrop-filter: blur(28px) saturate(1.2); -webkit-backdrop-filter: blur(28px) saturate(1.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.35);
}
body.stage-open #onboard.on-stage .ob-anim { border-radius: 24px 24px 0 0; background: rgba(255,255,255,.04); }
/* our own illustrations stay; they melt softly into the dark card */
body.stage-open #onboard.on-stage .ob-anim img { -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
body.stage-open #onboard.on-stage .modal-title { font-size: 20px; font-weight: 500; letter-spacing: -.4px; }
body.stage-open #onboard.on-stage .ide-menu { background: rgba(29,28,28,.92); backdrop-filter: blur(20px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 16px 40px rgba(0,0,0,.4); }
body.stage-open #onboard.on-stage .ob-menu { z-index: 62; }
#onboard > .ob-menu { z-index: 62; }

/* account row in settings */
.account-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.account-avatar {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0;
  overflow: hidden; letter-spacing: -.02em;
}
.account-avatar.grain::after, .avatar-opt.grain::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar:hover { opacity: .88; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 4px 0 8px; }
.avatar-opt {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}
.avatar-opt.on { box-shadow: 0 0 0 2px var(--solid), 0 0 0 4px var(--ink); }
.avatar-opt img { width: 100%; height: 100%; object-fit: cover; }
.account-info { flex: 1; min-width: 0; font-size: 14px; }
.account-mail { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-secondary.small { flex: none; height: 32px; padding: 0 14px; font-size: 13px; }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 8px 0 2px; font-size: 11.5px; color: var(--a-faint); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--a-line); }
.auth-google {
  height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255,255,255,.07); color: var(--a-ink); font-size: 14.5px; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--a-line); backdrop-filter: blur(14px); transition: background-color .15s, box-shadow .15s;
}
.auth-google:hover { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.26); }
.auth-google img { width: 17px; height: 17px; }

/* ---------- Powered by adhocq ---------- */
.powered { position: fixed; left: 0; right: 0; bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; color: rgba(17,17,19,.38); z-index: 1; }
.powered img { height: 11px; width: auto; opacity: .7; }
.auth .powered { color: rgba(255,255,255,.4); }
.auth .powered img { filter: brightness(0) invert(1); opacity: .6; }

/* ---------- Apps ---------- */
.apps-nav { display: flex; align-items: center; gap: 2px; }
.app-nav { position: relative; }
.app-nav img { -webkit-user-drag: none; }
.nav-sorting { cursor: grabbing; }
.nav-sorting .app-nav { pointer-events: none; }
.app-nav.nav-dragging { background: var(--hover); transform: scale(1.08); z-index: 2; }
.nav-sorting [data-tip]::after, .nav-sorting [data-tip]::before { display: none; }
.app-badge {
  display: inline-grid; place-items: center; border-radius: 6px; background: var(--app); color: #fff;
  font: 700 10px/1 ui-sans-serif, system-ui, sans-serif; overflow: hidden; flex-shrink: 0;
}
.app-badge.logo { background: none; }
.app-glyph { display: inline-grid; place-items: center; flex-shrink: 0; color: currentColor; }
.icon-btn .app-glyph svg { width: 16px; height: 16px; }
.app-badge img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.app-count { position: absolute; top: 1px; right: 0; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 600 9px/14px ui-sans-serif, system-ui, sans-serif; text-align: center; }
body.subview .apps-nav { display: none; }
body.app-open .timer, body.app-open .checklist, body.app-open .composer, body.app-open .analytics, body.app-open .settings,
body.widget-open .timer, body.widget-open .checklist, body.widget-open .composer, body.widget-open .analytics, body.widget-open .settings { display: none !important; }
body.widget-open .widget-main { display: none !important; }
.widget-main { padding: 0 0 10px; display: flex; flex-direction: column; gap: 8px; }
.wd-main { background: var(--surface); border-radius: 18px; padding: 8px 10px 10px; }
.wd-main-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 4px; font-size: 13px; font-weight: 500; color: var(--ink); }
.wd-root { display: flex; flex-direction: column; gap: 14px; padding: 2px 0 12px; animation: fade .2s var(--ease); }
.wd-header { display: flex; align-items: center; gap: 10px; padding: 6px 2px 0; }
.wd-header-main { flex: 1; min-width: 0; }
.wd-header .wd-av { width: 36px; height: 36px; font-size: 14px; background: var(--surface); }
.wd-sub.strong { font-size: 13px; color: var(--ink); font-weight: 500; margin-top: 0; }
.wd-html-wait { height: 140px; border-radius: 16px; background: var(--surface); animation: wdpulse 1.2s ease-in-out infinite; }
@keyframes wdpulse { 50% { opacity: .5; } }
.wd-html { display: block; width: 100%; color-scheme: light; }
.wd-title { font-size: 17px; font-weight: 400; letter-spacing: -.02em; }
.wd-sub { font-size: 12px; color: var(--faint); margin-top: 2px; }
.wd-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 22px; text-align: center; flex-shrink: 0; }
.wd-text { font-size: 14px; color: var(--ink); line-height: 1.55; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wd-text.muted { color: var(--muted); }
.wd-text.accent { color: var(--hl); }
.wd-text.sm { font-size: 12px; }
.wd-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.wd-actions .chip.primary { background: var(--accent); color: var(--on-accent); }
.wd-divider { height: 6px; }
.wd-hint, .wd-source { font-size: 11px; color: var(--faint); padding: 0 2px; }
.wd-metric { padding: 16px 18px; }
.wd-delta { font: 600 12px/1.4 var(--mono); color: var(--hl); margin-top: 6px; }
.wd-progress .progress { margin-top: 8px; }
.wd-grid { display: grid; gap: 8px; }
.wd-tile { padding: 10px 4px 6px; }
.wd-tile-label { font: 600 10px/1.2 var(--mono); color: var(--faint); }
.wd-tile-val { font-size: 28px; line-height: 32px; font-weight: 300; letter-spacing: -.035em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.wd-img { width: 100%; object-fit: cover; border-radius: 16px; }
.wd-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.wd-list { display: flex; flex-direction: column; gap: 4px; }
.wd-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px; border-radius: 14px; }
.wd-row.link { cursor: pointer; transition: background-color .15s; }
.wd-row.link:hover { background: var(--hover); }
.wd-row-main { flex: 1; min-width: 0; }
.wd-row-top { display: flex; align-items: baseline; gap: 8px; }
.wd-row-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-row-meta { font-size: 11px; color: var(--faint); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.wd-row-sub { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-row-preview { font-size: 12px; color: var(--faint); margin-top: 4px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wd-row .wd-actions { flex-shrink: 0; align-self: center; }
.wd-av { width: 28px; height: 28px; border-radius: 999px; flex-shrink: 0; display: grid; place-items: center; overflow: hidden; background: var(--bg); color: var(--ink); font: 600 12px/1 ui-sans-serif, system-ui, sans-serif; }
.wd-av img { width: 100%; height: 100%; object-fit: cover; }
.wd-tag { display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 999px; background: var(--bg); font-size: 11px; color: var(--muted); }
.wd-section { display: flex; flex-direction: column; gap: 8px; }
.wd-section-title { font: 600 10px/1.2 var(--mono); color: var(--faint); padding: 4px 2px 0; }
.wd-tabs { display: flex; flex-direction: column; gap: 12px; }
.wd-seg { align-self: flex-start; }
/* In a subview the navbar and the tab bar stay put; lists scroll under them. */
body.subview .app-head { position: sticky; top: 0; z-index: 6; margin: 0 -14px; padding: 0 14px 6px; height: 42px; background: var(--bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.wd-seg-bar { position: sticky; top: 42px; z-index: 5; margin: -6px -14px 0; padding: 6px 14px 8px; background: var(--bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.float .wd-seg-bar, body.float.subview .app-head { top: 0; }
body.float .wd-seg-bar { position: static; }
.wd-seg-badge { margin-left: 6px; font: 600 10px/1 var(--mono); color: var(--faint); }
.wd-tab-body { display: flex; flex-direction: column; gap: 12px; }
.wd-field { display: flex; flex-direction: column; gap: 6px; }
.wd-field-label { font-size: 12px; color: var(--muted); padding: 0 4px; }
.wd-input { width: 100%; box-sizing: border-box; border: 0; outline: none; resize: vertical; font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); border-radius: 16px; padding: 12px 14px; line-height: 1.45; }

.wd-file-wrap { display: flex; }
.wd-chips { justify-content: flex-start; }
.wd-app { display: block; width: 100%; height: 360px; border: 0; border-radius: 16px; background: transparent; color-scheme: light; }
.wd-app.fill { height: max(360px, calc(100vh - 72px)); }
body.float .wd-app.fill { height: 520px; }
.wd-select { appearance: none; -webkit-appearance: none; width: 100%; height: 38px; border: 0; outline: none; border-radius: 999px; padding: 0 34px 0 14px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8ea0' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; }

.wd-check-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 16px; background: var(--surface); text-align: left; font-size: 13.5px; color: var(--ink); }
.wd-check-row:hover { background: var(--hover); }
.wd-check-label { flex: 1; min-width: 0; }
.wd-check-row.toggle .wd-switch { order: 2; }
.wd-switch { position: relative; width: 34px; height: 20px; border-radius: 999px; background: var(--line); flex-shrink: 0; transition: background-color .2s; }
.wd-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.wd-check-row.on .wd-switch { background: var(--accent); }
.wd-check-row.on .wd-switch::after { transform: translateX(14px); background: var(--on-accent); }
.wd-box { width: 18px; height: 18px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--cb-border); flex-shrink: 0; background: transparent center / 12px no-repeat; transition: background-color .15s; }
.wd-check-row.on .wd-box, .wd-row-check.on .wd-box { background-color: var(--accent); box-shadow: none; background-image: var(--checkmark); }
.wd-row-check { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0; border-radius: 8px; }
.wd-row.done .wd-row-title { color: var(--faint); text-decoration: line-through; }
.wd-date { display: flex; flex-direction: column; gap: 8px; }
.wd-date-row { display: flex; align-items: center; gap: 6px; }
.wd-date-input { height: 38px; padding: 0 14px; border-radius: 999px; font-size: 13px; min-width: 0; color-scheme: light; }
.wd-date-sep { font-size: 12px; color: var(--faint); flex-shrink: 0; }
.wd-list-tools { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.wd-list-find { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.wd-list-find .wd-list-search { width: 0; padding: 0; opacity: 0; transition: width .22s var(--ease), opacity .18s, padding .22s; }
.wd-list-find.on .wd-list-search { width: 100%; padding: 0 14px; opacity: 1; }
.wd-list-search { height: 34px; border-radius: 999px; font-size: 13px; resize: none; }
.wd-list-rows { display: flex; flex-direction: column; gap: 4px; }
.wd-chart { display: flex; flex-direction: column; gap: 8px; padding: 8px 4px 6px; }
.wd-chart-box { position: relative; }
.wd-chart-svg { display: block; width: 100%; overflow: visible; }
.wd-chart-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.wd-chart-guide { position: absolute; top: 0; bottom: 18px; width: 1px; background: var(--line); display: none; pointer-events: none; }
.wd-chart-tip { position: absolute; bottom: calc(100% + 6px); left: 0; min-width: 110px; padding: 8px 10px; border-radius: 12px; background: var(--solid); box-shadow: 0 8px 24px rgba(0,0,0,var(--shadow-a)); font-size: 12px; display: none; pointer-events: none; z-index: 3; }
.wd-chart-box.hover .wd-chart-guide, .wd-chart-box.hover .wd-chart-tip { display: block; }
.wd-chart-tip-x { color: var(--faint); margin-bottom: 4px; }
.wd-chart-tip-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.wd-chart-tip-row span { flex: 1; color: var(--muted); }
.wd-chart-tip-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-chart-tip-row i, .wd-chart-legend i { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; display: inline-block; }
.wd-chart-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wd-chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.wd-chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wd-table-wrap { overflow-x: auto; border-radius: 16px; background: var(--surface); scrollbar-width: thin; }
.wd-table { border-collapse: separate; border-spacing: 0; min-width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.wd-table th, .wd-table td { padding: 9px 12px; text-align: left; white-space: nowrap; }
.wd-table th { font-weight: 600; font-size: 11.5px; color: var(--faint); }
.wd-table th.sortable { cursor: pointer; }
.wd-table th.sortable:hover { color: var(--ink); }
.wd-table th:first-child, .wd-table td:first-child { position: sticky; left: 0; z-index: 1; background: color-mix(in srgb, var(--base-text) 3.5%, var(--base-bg)); max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.wd-table .a-right { text-align: right; }
.wd-table .a-center { text-align: center; }
.wd-table tr.link { cursor: pointer; }
.wd-table tr.link:hover td { background: var(--hover); }
.wd-table tr.link:hover td:first-child { background: var(--hover-solid); }
.wd-board { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.wd-col { flex: 0 0 220px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 18px; background: var(--surface); scroll-snap-align: start; transition: background-color .15s; }
.wd-col.over { background: var(--hover); }
.wd-col-head { display: flex; align-items: center; gap: 6px; padding: 2px 4px 4px; font-size: 12.5px; font-weight: 500; }
.wd-col-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-col-count { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wd-col-list { display: flex; flex-direction: column; gap: 6px; min-height: 48px; }
.wd-col-empty { font-size: 12px; color: var(--faint); padding: 14px 6px; text-align: center; }
.wd-card { padding: 10px 12px; border-radius: 14px; background: var(--solid); cursor: grab; touch-action: none; user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.wd-card.dragging { opacity: .35; }
.wd-card-top { display: flex; align-items: flex-start; gap: 8px; }
.wd-card-top .wd-av { width: 22px; height: 22px; font-size: 10px; background: var(--surface); }
.wd-card-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.wd-card .wd-tag { background: var(--surface); }
.wd-ghost { position: fixed; z-index: 2147483000; pointer-events: none; cursor: grabbing; box-shadow: 0 12px 32px rgba(0,0,0,.18); transform: rotate(1.5deg); }
.wd-file { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-detail .wd-text { font-size: 14px; }
.wd-requests { display: flex; flex-direction: column; gap: 4px; padding-bottom: 12px; }
.wd-req { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.wd-req-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--faint); flex-shrink: 0; }
.wd-req.open .wd-req-dot { background: var(--faint); animation: blink 1.4s ease-in-out infinite; }
.wd-req.done .wd-req-dot { background: #10a37f; }
.wd-req.failed .wd-req-dot { background: #ef4444; }
.app-nav.on { background: var(--hover); }
.app-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 999px; background: #f59e0b; }
body.widget-open .apps-nav { display: flex; }
.wd-set-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 10px 34px; align-items: center; }
.app-view { padding: 2px 0 16px; animation: fade .2s var(--ease); }
.app-items { display: flex; flex-direction: column; gap: 6px; }
.app-item { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; border-radius: 14px; background: var(--surface); }
.app-item.link { cursor: pointer; }
.app-item.link:hover { background: var(--hover); }
.app-item-main { flex: 1; min-width: 0; }
.app-item-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-item-sub { font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-item-side { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.app-item-time { font-size: 11px; color: var(--faint); margin-right: 2px; }
.app-row { display: inline-flex; align-items: center; gap: 10px; }
.set-note { font-size: 12.5px; color: var(--faint); padding: 2px 4px 10px; line-height: 1.5; }
#appsSettings > .btn-secondary.small { margin: 0 4px; }
#appsSettings > .link-btn { display: block; margin: 6px 4px 0 auto; }
.link-btn.danger { color: #e5484d; display: block; margin: 6px 4px 0 auto; }
.link-btn.danger:hover { color: #e5484d; }

/* edge (hover strip) panel: always a full-height sidebar */
body.edge .app { min-height: 100vh; }

/* ---------- Layout (per view: sidebar, floating, strip) ---------- */
.lay-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: 13.5px; }
.lay-row .seg button { padding: 4px 10px; font-size: 12px; }
#laySurface { margin-bottom: 6px; }
body.lay-timer-off .timer, body.lay-tasks-off .checklist, body.lay-tasks-off .composer,
body.lay-no-analytics #statsBtn, body.lay-no-archive #archiveBtn { display: none !important; }
body.lay-tasks-first .app-head { order: -3; }
body.lay-tasks-first .checklist { order: -2; margin-top: 4px; }
body.lay-tasks-first .timer { order: -1; margin-top: 14px; }
body.lay-dense .app { padding-top: 2px; }
body.lay-dense .checklist { margin-top: 10px; }
body.lay-dense .row { padding-top: 3px; padding-bottom: 3px; }
body.lay-dense .task { padding: 0; }
body.lay-dense .proj-board { grid-template-columns: repeat(auto-fill, minmax(min(112px, calc(50% - 4px)), 1fr)); gap: 6px; }
body.lay-dense .wd-root { gap: 10px; }
body.lay-dense .wd-row { padding: 9px 10px; }

@media (min-width: 720px) {
  .app { max-width: 1280px; padding: 8px 22px 0; }
  .settings, .analytics, .app-view { width: 100%; max-width: 760px; margin-inline: auto; }
  body.two-col .app {
    display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto; column-gap: 28px; align-items: start;
  }
  body.two-col .app > * { grid-column: 1 / -1; }
  body.two-col .app-head { grid-row: 1; }
  body.two-col .timer { grid-column: 1; grid-row: 2 / span 2; position: sticky; top: 8px; margin-top: 0; }
  body.two-col .checklist { grid-column: 2; grid-row: 2; margin-top: 0; align-self: stretch; }
  body.two-col .composer { grid-column: 2; grid-row: 3; }
  body.two-col.lay-tasks-first .app { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  body.two-col.lay-tasks-first .timer { grid-column: 2; }
  body.two-col.lay-tasks-first .checklist, body.two-col.lay-tasks-first .composer { grid-column: 1; }
  .wd-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }
}
@media (min-width: 1100px) {
  body.two-col .app { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
}

/* ---------- Horizontal timeline ---------- */
.gt { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.gt-head { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px; }
.gt-tick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; border-radius: 14px; color: var(--faint); }
.gt-tick.now { background: var(--ink); color: var(--bg); }
.gt-wd { font: 600 10px/1 var(--mono); }
.gt-num { font: 500 15px/1 var(--mono); font-variant-numeric: tabular-nums; }
.gt-tick:not(.now) .gt-num { color: var(--muted); }
.gt-body { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 6px 0 10px; }
.gt-bands { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 4px; pointer-events: none; }
.gt-bands i { border-radius: 14px; background: var(--surface); }
.gt-bands i.now { background: color-mix(in srgb, #ec4899 7%, transparent); }
.gt-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 2px; background: #ec4899; z-index: 2; pointer-events: none; }
.gt-now::before { content: ""; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ec4899; }
.gt-lane { position: relative; z-index: 1; padding: 4px 4px 2px; }
.gt-lane-name { position: sticky; left: 4px; display: block; field-sizing: content; min-width: 60px; max-width: 220px; border-radius: 999px; background: var(--bg); border: 0; outline: none; padding: 4px 10px; margin-bottom: 4px; font: 600 10px/1.2 var(--mono); color: var(--faint); }
.gt-lane-name:focus { color: var(--ink); }
.gt-track { position: relative; min-height: 36px; }
.gt-pill {
  position: absolute; height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 10px 0 9px; box-sizing: border-box;
  border-radius: 999px; background: var(--solid, #fff); color: var(--ink); font-size: 12px; font-weight: 500; text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06); overflow: hidden; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s;
}
.gt-pill:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.08); }
.gt-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--c, var(--accent)); }
.gt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gt-time { flex-shrink: 0; font: 500 10.5px/1 var(--mono); color: var(--faint); }
.gt-pill.done { opacity: .5; }
.gt-pill.done .gt-text { text-decoration: line-through; }
.gt-empty { position: absolute; left: 8px; top: 9px; font-size: 12px; color: var(--faint); }
.gt-foot { display: flex; align-items: center; gap: 10px; padding: 0 2px; }
.gt-out { font-size: 12px; color: var(--faint); }

/* Claude routine */
.routine-title { display: flex; align-items: center; gap: 8px; }
.rt-status { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--pill); color: var(--muted); }
.rt-status.ok { background: color-mix(in srgb, #16a34a 14%, transparent); color: #15803d; }
.rt-status.wait { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #b45309; }
.rt-status.bad { background: color-mix(in srgb, #ef4444 14%, transparent); color: #b91c1c; }
.rt-steps { margin: 0 0 10px; padding: 0 4px 0 22px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.rt-steps a { color: var(--ink); }
.rt-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 10px; }
.rt-form { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 10px; }
.rt-input { height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pill); color: var(--ink); font: inherit; font-size: 12.5px; outline: none; min-width: 0; }
.rt-go { align-self: flex-start; }
.rt-card { background: var(--surface); border-radius: 16px; padding: 12px 14px; margin: 0 4px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rt-card b { color: var(--ink); font-weight: 600; }
.rt-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px 12px; }
.rt-stat { display: flex; flex-direction: column; gap: 1px; }
.rt-stat span { font-size: 11px; color: var(--faint); }
.rt-bar { height: 5px; border-radius: 999px; background: var(--pill); overflow: hidden; }
.rt-bar i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.rt-bar.warn i { background: #f59e0b; }
.rt-runs summary { cursor: pointer; color: var(--ink); font-weight: 500; list-style: none; padding: 2px 0; }
.rt-runs summary::-webkit-details-marker { display: none; }
.rt-run { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.rt-run .main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-run a { color: var(--ink); font-size: 12px; }
.rt-warn { color: #b45309; }
.wd-refresh { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 6px 34px; }
.wd-refresh-note { font-size: 12px; color: var(--faint); padding: 0 4px 8px 34px; }
.wd-usage { margin-left: 34px; }
.wd-foot { display: flex; align-items: center; gap: 6px; padding: 14px 2px 4px; font-size: 12px; color: var(--faint); }
.wd-foot span { flex: 1; min-width: 0; }
.wd-foot .icon-btn { width: 26px; height: 26px; }
.wd-foot .icon-btn svg { width: 14px; height: 14px; }
.wd-connect { background: var(--surface); border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.wd-connect b { color: var(--ink); }
.wd-connect .rt-tools { padding: 0; }
.wd-limit { font-size: 12.5px; color: #b45309; padding: 0 2px 10px; }
.wd-limit.live-paused, .wd-limit.pay-problem { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); padding: 0 2px 12px; line-height: 1.45; }
.wd-limit.live-paused span, .wd-limit.pay-problem > span { flex: 1 1 200px; }
.pay-problem-btns { display: flex; gap: 6px; }
.wd-req.open.busy .wd-req-dot { background: #f59e0b; }
.wd-route { display: inline-flex; margin: 0 4px 6px 34px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--pill); color: var(--muted); }
.wd-route.live { background: color-mix(in srgb, #16a34a 14%, transparent); color: #15803d; }
.wd-connect-big { align-items: center; text-align: center; padding: 28px 16px; gap: 14px; }
.wd-intro-list { margin: 0; padding-left: 18px; line-height: 1.6; }
.chip.busy { opacity: .6; pointer-events: none; }
.chip.busy::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; vertical-align: -1px; animation: wdspin .7s linear infinite; }
@keyframes wdspin { to { transform: rotate(360deg); } }

/* Settings: collapsible groups, widget rows and the add-a-widget search */
.set-toggle-label { display: inline-flex; align-items: center; gap: 8px; }
.set-body { padding-top: 4px; }
.wd-set-head { flex: 1; min-width: 0; text-align: left; padding: 0; background: none; }
.wd-set-head .chev { margin-left: auto; display: inline-flex; }
.wd-set-head .chev svg { width: 16px; height: 16px; color: var(--faint); }
.wd-search { display: flex; flex-direction: column; gap: 6px; padding: 2px 4px 10px; }
.wd-search .set-input { width: 100%; box-sizing: border-box; border: 0; outline: none; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 999px; padding: 9px 14px; }

.wd-search-list { display: flex; flex-direction: column; gap: 2px; }
.wd-search-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; text-align: left; font-size: 13px; color: var(--ink); }
.wd-search-row:hover { background: var(--hover); }
.wd-search-logo { width: 20px; height: 20px; border-radius: 6px; object-fit: contain; }
.wd-search-pick { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; background: var(--surface); }
.wd-search-pick .wd-set-tools { padding: 0; }
.wd-search-pick .chip.primary { background: var(--accent); color: var(--on-accent); }

/* Hover menu (edge): project cards scale down with the panel, at least two per row */
body.edge .proj-board:not(.list) { grid-template-columns: repeat(auto-fill, minmax(min(132px, calc(50% - 4px)), 1fr)); gap: 8px; }
body.edge .proj-board:not(.list) .proj-card, body.edge .proj-board:not(.list) .proj-new { aspect-ratio: 5 / 4; border-radius: 18px; container-type: inline-size; }
body.edge .proj-board:not(.list) .proj-top { padding: 10px 10px 0; }
body.edge .proj-board:not(.list) .proj-name { font-size: clamp(12px, 10cqi, 15px); -webkit-line-clamp: 2; }
body.edge .proj-board:not(.list) .proj-meta { font-size: 10.5px; margin-top: 2px; }
body.edge .proj-board:not(.list) .proj-foot { padding: 0 8px 8px; }
body.edge .proj-board:not(.list) .proj-av { width: 16px; height: 16px; font-size: 8px; }
body.edge .proj-board:not(.list) .proj-when { font-size: 10px; }
body.edge .proj-board:not(.list) .proj-img-btn { top: 6px; right: 6px; width: 22px; height: 22px; }
body.edge .proj-new { font-size: 12px; }

/* Analytics: a value, what it means, and the days under it */
.an-cards { gap: 8px; }
.an-cards.quiet .an-card { animation: none; }
.an-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 20px; }
.an-delta { font: 600 10px/1 var(--mono); letter-spacing: .06em; padding: 5px 8px; border-radius: 999px; background: color-mix(in srgb, var(--hl) 12%, transparent); color: var(--hl); cursor: default; font-variant-numeric: tabular-nums; }
.an-delta.down { background: color-mix(in srgb, var(--base-text) 7%, transparent); color: var(--muted); }
.an-card .an-value { font-size: 26px; margin-top: 6px; cursor: default; }
.an-card .an-value small { font-size: 12px; }
.an-sub { margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.an-card .an-chart { margin-top: 14px; --dot: 5px; --gap: 3px; }
.an-card .an-chart.bars { display: grid; justify-items: center; align-items: end; height: calc(10 * 5px + 9 * 3px); }
.an-card .an-chart.bars.dense { --dot: 4px; --gap: 2px; height: calc(10 * 4px + 9 * 2px); }
.an-card .an-col { padding: 0 2px; }
.an-card .an-col:hover i { background: var(--hl); }
.an-card .an-chart.line { display: grid; justify-items: center; gap: 2px; --dot: 7px; }
.an-card .an-chart.line.days { --dot: 9px; }
.an-chart.line i.hl { background: var(--hl); }
.an-axis { display: grid; justify-items: center; margin-top: 8px; font: 500 9.5px/1 var(--mono); color: var(--faint); }
.an-axis.spread { display: flex; justify-content: space-between; }
.an-axis .on { color: var(--hl); }
.an-card .an-foot { margin-top: 12px; }
.tip { position: fixed; z-index: 100; max-width: 240px; white-space: pre-line; padding: 6px 10px; border-radius: 10px; background: #0d0d0d; color: #fff; font-size: 11.5px; line-height: 1.4; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

/* Pomodoro */
.pomo-tag { display: block; margin: -2px auto 4px; padding: 3px 10px; border-radius: 999px; background: var(--pill); color: var(--muted); font-size: 12px; font-weight: 500; }
.pomo-tag:hover { background: var(--hover); color: var(--ink); }

/* Account extras */
.acc-rows { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 6px; }
.acc-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px; font-size: 13.5px; }
.acc-form { display: flex; gap: 6px; padding: 2px 4px 6px; }
.acc-form .set-input, .acc-mfa .set-input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 13px; background: var(--surface); border-radius: 999px; padding: 8px 14px; }
.acc-form .btn-secondary { flex: 0 0 auto; padding: 0 14px; height: 34px; }
.acc-mfa { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 4px 8px; }
.acc-mfa .acc-form { width: 100%; padding: 0; box-sizing: border-box; }
.mfa-qr img { width: 150px; height: 150px; border-radius: 12px; background: #fff; }
.mfa-secret { font: 12px ui-monospace, Menlo, monospace; word-break: break-all; background: var(--surface); border-radius: 10px; padding: 6px 10px; user-select: all; }
.chip.active { background: var(--accent); color: var(--on-accent); }

/* Plans */
.ts-archived .text { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.ts-archived .text::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--set); flex: none; }
.biz-check { padding: 2px 4px 8px; color: var(--muted); }
.biz-check input { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.biz-form { display: flex; flex-direction: column; gap: 6px; padding: 0 4px 6px; }
.biz-form .set-input { border: 0; outline: none; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 999px; padding: 9px 14px; }
.biz-form .set-input:focus { box-shadow: 0 0 0 2px var(--hover); }
.biz-form .btn-secondary { align-self: flex-end; padding: 0 16px; height: 32px; }
.inv-list { display: flex; flex-direction: column; gap: 2px; padding: 0 0 10px; }
.inv-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: 12.5px; color: var(--ink); text-align: left; width: 100%; }
.inv-row:hover { background: var(--hover); }
.inv-row .inv-when { flex: 1; min-width: 0; }
.inv-row .inv-state { color: var(--faint); }
.inv-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-usage { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 4px 10px; }
.plan-usage span { padding: 4px 10px; border-radius: 999px; background: var(--pill); font-size: 12px; color: var(--muted); }
.plan-usage span:first-child { background: var(--accent); color: var(--on-accent); }
.plan-cards { display: flex; flex-direction: column; gap: 8px; }
.plan-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--surface); transition: background-color .35s var(--ease), color .35s var(--ease); }
.plan-card { overflow: hidden; isolation: isolate; }
.plan-card::before, .plan-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.plan-card::before { background: linear-gradient(135deg, #8fd0a8 0%, #6bb3c4 45%, #4f8fd0 100%); }
.plan-card::after { mix-blend-mode: overlay; background-size: 180px 180px; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.plan-card.current { color: #fff; }
.plan-card.current::before { opacity: 1; }
.plan-card.current::after { opacity: .32; }
.plan-card.current .plan-price { opacity: .85; }
.plan-name { font-size: 13px; font-weight: 500; }
.plan-price { margin-top: 6px; font-size: 12px; opacity: .7; }
.plan-price b { font-size: 28px; font-weight: 300; line-height: 1; letter-spacing: -.02em; opacity: 1; }
.plan-card .plan-price b { color: inherit; }
.plan-points { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.plan-points li:first-child { font-weight: 500; }
.plan-note { align-self: stretch; margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.plan-card.current .plan-note { color: rgba(255,255,255,.85); }
.plan-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 4px 0; font-size: 12.5px; color: var(--muted); }
.plan-btn { align-self: stretch; margin-top: 12px; height: 36px; border-radius: 999px; background: var(--pill); font-size: 13px; font-weight: 500; }
.plan-btn:hover:not(:disabled) { background: var(--hover); }
.plan-btn:disabled { cursor: default; }
.plan-card.current .plan-btn { background: rgba(255,255,255,.14); color: #fff; }

/* Onboarding */
#kbdModal { z-index: 46; }
.onboard { max-width: 400px; padding: 0; overflow: visible; }
.ob-anim { position: relative; height: 190px; background: var(--surface); overflow: hidden; border-radius: 20px 20px 0 0; }
.ob-anim img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.ob-pick { position: relative; }
.ob-pick-btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 14px 0 16px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink); transition: background-color .15s; }
.ob-pick-btn:hover { background: var(--hover); }
.ob-input { width: 100%; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 0; outline: none; font: inherit; font-size: 14px; color: var(--ink); box-sizing: border-box; transition: background-color .15s, box-shadow .15s; }
.ob-input::placeholder { color: var(--faint); }
.ob-input:focus { background: var(--hover); box-shadow: 0 0 0 1px var(--focus); }
.onboard .modal-btn:disabled { opacity: .45; cursor: default; }
.ob-pick-btn img { width: 20px; height: 20px; object-fit: contain; }
.ob-pick-btn span:not(.chev) { margin-right: auto; }
.ob-pick-btn .chev svg { width: 16px; height: 16px; color: var(--faint); }
.ide-menu.ob-menu { position: fixed; right: auto; z-index: 60; min-width: 0; overflow-y: auto; scrollbar-width: none; animation: ob-drop .2s var(--ease); }
@keyframes ob-drop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.ide-pre.ob-pre { margin-top: 12px; max-height: 120px; overflow: auto; scrollbar-width: none; }
.ob-more { margin-top: 10px; }
.ob-more .ob-text { padding: 6px 4px 0; font-size: 12.5px; color: var(--faint); }
.ob-ai-chip { display: inline-flex; align-items: center; gap: 6px; }
.ob-ai-chip img { width: 16px; height: 16px; object-fit: contain; }
.ob-ai-chip.on { background: var(--hover); }
.ob-btns .chip.ob-ai-chip.primary { background: var(--accent); color: var(--on-accent); }
.ob-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ob-btns .chip.primary { background: var(--accent); color: var(--on-accent); }
.ob-body { padding: 16px 16px 14px; }
.ob-text { font-size: 13.5px; color: var(--muted); padding: 0 4px 12px; }
.ob-ai { display: flex; gap: 8px; }
.ob-ai-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; transition: background-color .15s; }
.ob-ai-btn:hover { background: var(--hover); }
.ob-ai-btn.on { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ob-ai-btn img { width: 20px; height: 20px; object-fit: contain; }
.ob-url { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface); font: 12.5px ui-monospace, Menlo, monospace; text-align: left; }
.ob-url b { font: 600 12px ui-sans-serif, -apple-system, system-ui, sans-serif; }
.ob-how { display: flex; align-items: center; gap: 4px; margin-top: 10px; padding: 0 4px; font-size: 13px; color: var(--muted); }
.ob-how .chev svg { width: 14px; height: 14px; }
.ob-steps { margin: 6px 0 0; padding: 0 4px 0 24px; font-size: 13px; color: var(--muted); }
.ob-steps li { padding: 2px 0; }
.ob-wide { width: 100%; flex: none; }
.ob-kbd { max-height: 280px; overflow-y: auto; margin-bottom: 8px; scrollbar-width: none; }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.ob-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background-color .2s, width .2s; }
.ob-dots span.on { width: 18px; border-radius: 999px; background: var(--ink); }
.onboard .plan-cards { gap: 6px; }
.onboard .plan-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 10px; row-gap: 1px; padding: 10px 10px 10px 14px; border-radius: 14px; }
.onboard .plan-name { grid-column: 1; font-size: 12.5px; }
.onboard .plan-price { grid-column: 1; margin-top: 0; }
.onboard .plan-price b { font-size: 18px; }
.onboard .plan-points { grid-column: 1; margin-top: 2px; font-size: 12px; opacity: .8; }
.onboard .plan-btn { grid-column: 3; grid-row: 1 / span 3; align-self: center; margin: 0; height: 30px; padding: 0 16px; }
.onboard .plan-note { grid-column: 1 / -1; margin-top: 6px; text-align: left; }
.ob-route { flex: none; font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: var(--pill); }
.ob-route.live { background: var(--accent); color: var(--on-accent); }
.modal-btn.ob-cta { width: 100%; margin-top: 12px; }

/* Usage meter and app search */
.ai-usage { padding: 4px 4px 12px; }
.ai-usage-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.ai-usage-head b { color: var(--ink); font-weight: 600; }
.ai-usage-bar { height: 6px; border-radius: 999px; background: var(--pill); overflow: hidden; }
.ai-usage-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .3s var(--ease); }
.ai-usage-bar.full i { background: #c2410c; }
.ai-app-search { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.ai-app-search .set-input { width: 100%; box-sizing: border-box; border: 0; outline: none; font: inherit; font-size: 13.5px; color: var(--ink); background: var(--surface); border-radius: 999px; padding: 10px 14px; }
.ai-app-search .set-input:focus { box-shadow: 0 0 0 2px var(--hover); }
.ai-app-search .set-input::placeholder { color: var(--muted); }
.ai-app-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.ai-app-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-align: left; font-size: 13.5px; color: var(--ink); }
.ai-app-row:hover { background: var(--hover); }
.ai-app-badge { display: inline-grid; place-items: center; border-radius: 6px; overflow: hidden; flex-shrink: 0; font: 700 10px/1 ui-sans-serif, system-ui, sans-serif; color: var(--ink); }
.ai-app-badge img { width: 100%; height: 100%; object-fit: contain; }
.ide-split { position: relative; display: flex; align-items: center; }
.ide-split .ide-chev { width: 18px; }
.ide-split .ide-chev svg { width: 12px; height: 12px; }
.ide-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 8; min-width: 148px; padding: 6px;
  background: var(--solid); border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,var(--shadow-a)); animation: drop .16s var(--ease);
}
.ide-item { display: flex; align-items: center; gap: 8px; width: 100%; white-space: nowrap; text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 13px; color: var(--ink); }
.ide-item:hover { background: var(--hover); }
.ide-item.on { font-weight: 600; }
.ide-snip { padding: 0; }
.ide-logo { width: 18px; height: 18px; object-fit: contain; flex: none; }
.ide-snip-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border-radius: 12px; background: none; font-size: 13.5px; font-weight: 500; color: var(--ink); text-align: left; cursor: pointer; }
.ide-snip-head:hover { background: var(--hover); }
.ide-snip-head > span:not(.chev) { margin-right: auto; }
.ide-snip-head .chev { display: inline-flex; transition: transform .2s var(--ease); }
.ide-snip-head .chev svg { width: 16px; height: 16px; color: var(--faint); }
.ide-snip.open .chev { transform: rotate(180deg); }
.ide-snip-body { padding: 2px 4px 10px; }
.switch-row > span { flex: 1; }
.ide-snip-btns { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 4px 0; }
.ide-pre { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface); font: 11px/1.45 ui-monospace, Menlo, monospace; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Video player that apps start with tijd.video(); it stays while you move around Tijd. */
.video-dock {
  position: fixed; z-index: 60;
  border-radius: 16px; overflow: hidden; background: #0d0d0d; box-shadow: 0 18px 40px -16px rgba(0,0,0,.45);
  animation: cardIn .3s var(--ease); transition: width .25s var(--ease), height .25s var(--ease), left .25s var(--ease);
}
body.video-on .app-head { margin-bottom: calc(var(--vd-h, 0px) + 16px); }
.video-frame { width: 100%; height: 100%; border: 0; display: block; }
.video-bar { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.video-dock:hover .video-bar, .video-bar:focus-within { opacity: 1; }
.video-btn { width: 26px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0d0d0d; display: grid; place-items: center; }
.video-btn svg { width: 13px; height: 13px; }
.video-dock.anchored { border-radius: 12px; box-shadow: none; animation: none; transition: none; }
.wd-video { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0d0d0d; }
.wd-video iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Sets: a pastel block of tasks with a title and an editor or AI to send it to */
.ts-wrap { display: flex; flex-direction: column; gap: 8px; padding: 2px 0 8px; }
.ts-wrap.ts-row { flex-direction: row; align-items: flex-start; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 10px; }
.ts-wrap.ts-row > .ts-card { flex: none; width: fit-content; min-width: min(200px, 70%); max-width: min(300px, 86%); scroll-snap-align: start; }
.ts-card .ts-body { overflow: visible; }
.ts-card {
  --set-bg: color-mix(in srgb, var(--set) 62%, #fff);
  --row-hover: rgba(255,255,255,.55); --row-hover-solid: color-mix(in srgb, var(--set-bg) 55%, #fff);
  --ink: #0d0d0d; --muted: rgba(13,13,13,.7); --faint: rgba(13,13,13,.5); --hover: rgba(255,255,255,.55);
  --cb-border: rgba(13,13,13,.4); --accent: #4b4b55; --on-accent: #fff; --checkmark: var(--checkmark-white); --line: rgba(13,13,13,.12); --link: #0d0d0d;
  background: var(--set-bg); color: #0d0d0d; border-radius: 18px; padding: 6px; transition: box-shadow .15s;
}
.ts-card.drop-in { box-shadow: 0 6px 18px rgba(13,13,13,.12); }
.ts-wrap.ts-sub { padding: 6px 0 2px; gap: 6px; }
.ts-sub > .ts-card { border-radius: 14px; box-shadow: 0 1px 4px rgba(13,13,13,.06); }
.ts-head .ts-grip { touch-action: none; position: relative; left: auto; top: auto; height: 20px; flex: none; width: 0; margin-right: -4px; overflow: hidden; display: grid; place-items: center; cursor: grab; color: rgba(13,13,13,.4); opacity: 0; transition: width .2s var(--ease), margin .2s var(--ease), opacity .15s; }
.ts-head .ts-grip svg { width: 12px; height: 12px; }
.ts-card:hover > .ts-head .ts-grip, body.ts-dragging .ts-lifted > .ts-head .ts-grip { width: 14px; margin-right: -2px; opacity: 1; }
.ts-card { position: relative; }
.ts-card.ts-lifted { opacity: .35; }
.ts-ghost { position: fixed; z-index: 9999; pointer-events: none; margin: 0; opacity: .92; box-shadow: 0 14px 34px rgba(13,13,13,.14), 0 2px 6px rgba(13,13,13,.06); transition: none; overflow: hidden; }
body.ts-dragging, body.ts-dragging * { cursor: grabbing !important; user-select: none; }
.ts-card.ts-drop-before::before, .ts-card.ts-drop-after::after { content: ""; position: absolute; pointer-events: none; border-radius: 999px; background: rgba(13,13,13,.05); box-shadow: 0 3px 10px rgba(13,13,13,.10); }
.ts-wrap:not(.ts-row) > .ts-card.ts-drop-before::before { left: 10px; right: 10px; top: -7px; height: 6px; }
.ts-wrap:not(.ts-row) > .ts-card.ts-drop-after::after { left: 10px; right: 10px; bottom: -7px; height: 6px; }
.ts-row > .ts-card.ts-drop-before::before { top: 10px; bottom: 10px; left: -7px; width: 6px; }
.ts-row > .ts-card.ts-drop-after::after { top: 10px; bottom: 10px; right: -7px; width: 6px; }
.ts-head { display: flex; align-items: center; gap: 4px; min-height: 32px; }
.ts-head .icon-btn { width: 26px; height: 26px; border-radius: 999px; color: #0d0d0d; }
.ts-head .icon-btn:hover { background: rgba(255,255,255,.6); }
.ts-head .icon-btn svg { width: 14px; height: 14px; }
.ts-card .ts-toggle svg { transition: transform .2s var(--ease); }
.ts-card:not(.open) > .ts-head .ts-toggle svg { transform: rotate(-90deg); }
.ts-card .ts-title { flex: 1; min-width: 0; border: 0; background: none; outline: none; font: 600 13.5px/1.3 inherit; color: #0d0d0d; padding: 4px 6px; border-radius: 10px; }
.ts-count { flex: none; font-size: 12px; color: rgba(13,13,13,.5); font-variant-numeric: tabular-nums; padding: 0 2px; }
.ts-card .ts-title::placeholder { color: rgba(13,13,13,.45); }
.ts-card .ts-title:focus { background: rgba(255,255,255,.6); }
.ts-head .ide-go .ide-logo { width: 16px; height: 16px; }
.ts-menu { min-width: 190px; }
.ts-menu .menu-swatches { flex-wrap: wrap; padding: 4px 6px 8px; }
.ts-card .ts-body { padding: 2px 0 2px; }
.ts-card .ts-body .tasks { margin: 0 -2px; }
/* Sets scroll sideways and clip, so the drag handle stays inside the card next to the checkbox. */
.ts-card .row > .grip { left: -3px; width: 11px; }
.ts-add { display: flex; align-items: center; gap: 10px; margin-top: 2px; padding: 6px 8px; border-radius: 12px; cursor: text; color: rgba(13,13,13,.5); transition: background-color .15s; }
.ts-add:hover, .ts-add:focus-within { background: rgba(255,255,255,.55); }
.ts-add-plus { display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.ts-add-plus svg { width: 15px; height: 15px; }
.ts-add input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: #0d0d0d; padding: 0; font: 13.5px/1.4 inherit; }
.ts-add input::placeholder { color: rgba(13,13,13,.5); }
.ts-tools { display: flex; align-items: center; gap: 2px; flex: none; transition: opacity .15s; }
@media (hover: hover) {
  .ts-head { position: relative; }
  .ts-count { margin-left: auto; padding-right: 8px; }
  .ts-tools { position: absolute; right: 0; top: 0; bottom: 0; padding-left: 6px; background: var(--set-bg); border-radius: 999px; }
  .ts-card:not(:hover):not(:focus-within) .ts-tools:not(:has(.ide-open)):not(.float-open) { opacity: 0; pointer-events: none; }
}
.ide-prompt { display: block; width: 100%; box-sizing: border-box; min-width: 200px; border: 0; outline: none; resize: none; margin: 0 0 4px; padding: 8px 10px; border-radius: 12px; background: var(--hover); color: var(--ink); font: 13px/1.4 inherit; }
.ide-prompt::placeholder { color: var(--faint); }

/* Choosing several tasks */
.row.selectable { cursor: pointer; }
.row.selectable .grip, .row.selectable .disclose, .row.selectable > input[type=checkbox], .row.selectable .actions { display: none !important; }
.sel-dot { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--faint); display: grid; place-items: center; color: var(--solid); }
.sel-dot.on { background: var(--ink); box-shadow: none; }
.sel-dot svg { width: 12px; height: 12px; }
.task.selected > .row { background: var(--hover); }
.select-bar {
  position: sticky; bottom: 76px; z-index: 4; margin: 8px auto 0; width: fit-content; max-width: 100%;
  display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 999px;
  background: var(--solid); box-shadow: 0 10px 28px -10px rgba(0,0,0,.35); animation: drop .16s var(--ease);
}
.select-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; margin-right: 2px; }
.select-go, .select-btn { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.select-go { background: var(--accent); color: var(--on-accent); }
.select-go .ide-logo { width: 14px; height: 14px; border-radius: 3px; }
.select-btn { background: var(--pill); color: var(--ink); }
.select-go:disabled, .select-btn:disabled { opacity: .4; pointer-events: none; }
.select-bar .icon-btn { width: 30px; height: 30px; border-radius: 999px; }
.ide-menu.ts-pin, .menu.ts-pin, .project-menu.ts-pin { position: fixed; left: auto; z-index: 70; overflow-y: auto; }
.set-float { min-width: 220px; max-width: 280px; padding: 6px; }
.set-pick-list { max-height: 240px; overflow-y: auto; }
.set-pick { gap: 10px; white-space: normal; }
.set-pick .sel-dot { margin-top: 0; }
.set-pick-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-pick-go { width: 100%; justify-content: center; margin-top: 4px; }
.set-pick-none { padding: 8px 12px; font-size: 13px; color: var(--muted); }
.set-layout { margin: 6px 0 0; }
.set-layout button { white-space: nowrap; }

/* Apps that work through the user's own AI */
.via-ai-search { margin: 2px 4px 8px; width: calc(100% - 8px); }
.via-ai-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; max-height: 260px; overflow-y: auto; }
.via-ai-app { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--pill); font-size: 12.5px; color: var(--ink); }
.via-ai-app img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.via-ai-none { font-size: 12.5px; color: var(--faint); padding: 4px; }
.ob-via { margin-top: 10px; font-size: 12.5px; line-height: 1.5; color: var(--faint); text-align: left; }
.ob-via .link-btn { font-size: 12.5px; }
.ob-via .via-ai { margin-top: 8px; }
.ob-via .via-ai-list { max-height: 160px; }
.ts-card .ide-menu, .ts-card .menu {
  --ink: var(--base-text); --muted: color-mix(in srgb, var(--base-text) 70%, transparent); --faint: color-mix(in srgb, var(--base-text) 52%, transparent);
  --hover: color-mix(in srgb, var(--base-text) 6%, transparent); --accent: var(--base-accent, #4b4b55); color: var(--ink);
}

/* Home: header, timer and composer stay put; only the list scrolls. */
body:not(.subview):not(.float-min) { overflow: hidden; }
body:not(.subview):not(.float-min) .app { height: 100vh; box-sizing: border-box; }
body:not(.subview):not(.float-min) .checklist { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
body:not(.subview):not(.float-min) .checklist-head { position: sticky; top: 0; z-index: 5; background: var(--bg); }
body.float:not(.subview):not(.float-min) .app { height: auto; max-height: 100vh; }
body.float:not(.subview):not(.float-min) .checklist { flex: 0 1 auto; }

.withdraw { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.withdraw:empty { display: none; }
.withdraw-form { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface); }
.withdraw-form input { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--solid); font: inherit; color: inherit; }
.withdraw-row { display: flex; gap: 8px; align-items: center; }

.ide-default { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 8px; }
.ide-chip { display: inline-flex; align-items: center; gap: 6px; }
.ide-chip .ide-logo { width: 14px; height: 14px; border-radius: 3px; }

.handoff-chip { display: inline-flex; align-items: center; gap: 5px; }
.handoff-chip .ide-logo { width: 12px; height: 12px; border-radius: 3px; }
.handoff-chip.picked { color: var(--ink); }

/* Rich text input in block widgets */
.wd-rte { display: flex; flex-direction: column; gap: 4px; }
.wd-rte-tools { display: flex; gap: 2px; padding: 0; overflow-x: auto; scrollbar-width: none; }
.wd-rte-tools::-webkit-scrollbar { display: none; }
.wd-rte-btn { flex: none; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--muted); }
.wd-rte-btn:hover { background: var(--hover); color: var(--ink); }
.wd-rte-link { display: flex; gap: 6px; padding: 0 6px 6px; }
.wd-rte-link .wd-input { flex: 1; min-width: 0; }
.wd-rte-body { min-height: 140px; padding: 14px 16px; border-radius: 16px; background: #fff; color: #0d0d0d; font-size: 14px; line-height: 1.6; outline: none; overflow-wrap: anywhere; }
.wd-rte-body:empty::before { content: attr(data-ph); color: #8e8ea0; }
.wd-rte-body ul, .wd-rte-body ol { padding-left: 20px; margin: .3em 0; }
.wd-rte-body a { color: var(--link, #2964aa); }

/* Email reminders */
.rem-menu { width: 260px; display: flex; flex-direction: column; gap: 6px; }
.rem-row { display: flex; flex-direction: column; gap: 4px; }
.rem-input { width: 100%; box-sizing: border-box; height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); outline: 0; }
.rem-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 32px; padding: 4px; box-sizing: border-box; border-radius: 16px; background: var(--surface); cursor: text; }
.rem-chips .rem-input { flex: 1; min-width: 90px; height: 24px; padding: 0 8px; background: none; }
.rem-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--solid); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-chip-x { width: 18px; height: 18px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer; }
.rem-chip-x:hover { background: var(--hover); color: var(--ink); }
.rem-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 2px 2px 8px; font-size: 12px; color: var(--muted); }
.rem-item .icon-btn { width: 22px; height: 22px; }
.rem-acts { display: flex; justify-content: flex-end; gap: 6px; padding-top: 4px; }
.rem-pick { display: flex; flex-direction: column; gap: 6px; }
.rem-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.rem-q { height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface); font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; }
.rem-q:hover { background: var(--hover); }
.rem-q.on { background: var(--accent); color: var(--on-accent); }
.rem-cal-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 500; }
.rem-cal-head .icon-btn { width: 24px; height: 24px; }
.rem-cal-head .icon-btn:disabled { opacity: .3; pointer-events: none; }
.rem-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rem-dow { display: grid; place-items: center; height: 20px; font-size: 10.5px; color: var(--muted); }
.rem-day { height: 28px; border: 0; border-radius: 999px; background: none; font: inherit; font-size: 12px; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.rem-day:hover { background: var(--hover); }
.rem-day.today { font-weight: 600; }
.rem-day.on { background: var(--accent); color: var(--on-accent); }
.rem-day:disabled { color: var(--faint); cursor: default; background: none; }
.rem-time::-webkit-calendar-picker-indicator { display: none; }
#remDefaults .rem-chips { background: var(--pill); }
#remDefaults .rem-chip { background: var(--solid); }

/* Site tools */
.site-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 12px; }
.site-row:hover { background: var(--hover); }
.site-row.off .site-name { color: var(--faint); }
.act-state { flex: none; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.site-main { flex: 1; min-width: 0; }
.site-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--ink); }
.site-row .icon-btn { width: 26px; height: 26px; opacity: 0; }
.site-row:hover .icon-btn { opacity: 1; }

.checklist-head > .icon-btn.on { background: none; color: var(--ink); }
body.board-view .checklist-head #ideHeadBtn, body.board-view .checklist-head #boardBtn, body.board-view .checklist-head #taskSetBtn,
body.board-view .checklist-head #taskSetRowBtn, body.board-view .checklist-head #archiveDone, body.board-view .checklist-head #copyAll,
body.board-view .checklist-head #viewBtn { display: none !important; }
body.board-view .checklist-head #addBtn { display: grid; }
.rem-acts .chip.primary { background: var(--accent); color: var(--on-accent); }

/* Analytics: soft gradient cards. The number sits in the middle, the chart glows, the caption explains. */
.an-card { --g1: #8fd19a; --g2: #f2b35f; --g3: #e46a7e; padding: 14px 16px 16px; }
.an-card.tinted { --g1: color-mix(in oklab, var(--hl) 35%, #fff); --g2: color-mix(in oklab, var(--hl) 70%, #fff); --g3: var(--hl); }
.an-card .an-label { color: var(--faint); }
.an-card .an-value { margin-top: 2px; text-align: center; font: 300 34px/1.1 var(--sans, ui-sans-serif, system-ui, sans-serif); letter-spacing: -.03em; }
.an-card .an-value small { font-size: 14px; margin-left: 3px; font-weight: 400; }
.an-card .an-sub { margin-top: 12px; text-align: center; font-size: 11.5px; line-height: 1.45; text-wrap: balance; }
.an-card .an-axis { margin-top: 6px; }
.an-card .an-chart.flow { position: relative; height: 84px; margin-top: 12px; }
.an-chart.flow svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.an-chart.flow .glow { filter: blur(7px) saturate(1.15); opacity: .9; -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
.an-chart.flow .hair line { stroke-width: 1; vector-effect: non-scaling-stroke; }
.an-mark { position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none; }
.an-mark::before { content: ""; position: absolute; left: -.5px; top: var(--top); bottom: 0; border-left: 1px dashed var(--g3); }
.an-mark::after { content: ""; position: absolute; left: -3.5px; top: calc(var(--top) - 3.5px); width: 7px; height: 7px; border-radius: 999px; background: var(--g3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g3) 22%, transparent); }
.an-card .an-chart.hairbars { display: grid; gap: 2px; align-items: end; height: 84px; margin-top: 18px; }
.an-chart.hairbars .an-bar-col i { display: block; width: 2px; margin: 0 auto; border-radius: 999px; opacity: .55; transition: opacity .15s, width .15s; }
.an-chart.hairbars .an-bar-col.hl i, .an-chart.hairbars .an-bar-col:hover i { opacity: 1; width: 3px; }
.an-chart.hairbars .an-val { font-weight: 500; }
.an-card .an-chart.band { position: relative; height: 26px; margin-top: 14px; }
.an-band-fill { position: absolute; left: 0; top: 7px; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--g1), var(--g2) 60%, var(--g3)); filter: blur(3px); opacity: .95; }
.an-band-mark { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--g3); }
.an-band-ticks { position: absolute; right: 0; top: 4px; bottom: 4px; display: flex; justify-content: space-between; }
.an-band-ticks i { width: 1px; height: 100%; border-radius: 0; background: color-mix(in srgb, var(--base-text) 16%, transparent); }
.an-card .an-chart.ring circle.seg { stroke-linecap: round; }
.an-card .an-chart.ring svg { filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--g2) 35%, transparent)); }
.an-chart.line.days i.hl { box-shadow: 0 0 8px color-mix(in srgb, var(--g2) 55%, transparent); }

/* Code blocks in widgets, notes and Tijd AI answers */
:root { --code-bg: #f7f7f8; --code-ink: #0d0d0d; --code-dim: #8e8ea0; --code-hover: #ececec; --tk-kw: #a626a4; --tk-str: #2f7d32; --tk-num: #b76b01; --tk-fn: #2563eb; --tk-com: #8e8ea0; --tk-tag: #c2410c; --tk-attr: #7c3aed; }
:root[data-code="white"] { --code-bg: #ffffff; --code-hover: #f7f7f8; }
:root[data-code="dark"] { --code-bg: #0d0d0d; --code-ink: #ececec; --code-dim: #8e8ea0; --code-hover: #2a2a2e; --tk-kw: #d58bf0; --tk-str: #9ad48a; --tk-num: #f2b36b; --tk-fn: #7fb2ff; --tk-com: #8e8ea0; --tk-tag: #ff9a6b; --tk-attr: #c3a6ff; }
.code-block { margin: 6px 0; border-radius: 14px; background: var(--code-bg); overflow: hidden; text-align: left; cursor: auto; }
.tk-kw { color: var(--tk-kw); } .tk-str { color: var(--tk-str); } .tk-num { color: var(--tk-num); } .tk-fn { color: var(--tk-fn); }
.tk-com { color: var(--tk-com); font-style: italic; } .tk-tag { color: var(--tk-tag); } .tk-attr { color: var(--tk-attr); }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 0 12px; }
.code-lang { font: 500 11px/1 var(--mono); color: var(--code-dim); text-transform: lowercase; }
.code-copy { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; color: var(--code-dim); transition: background-color .15s, color .15s; }
.code-copy:hover { background: var(--code-hover); color: var(--code-ink); }
.code-copy svg { width: 12px; height: 12px; }
.code-body { margin: 0; padding: 8px 12px 12px; max-height: 360px; overflow: auto; font: 12px/1.55 var(--mono); color: var(--code-ink); white-space: pre; tab-size: 2; scrollbar-width: thin; }
.code-body code { font: inherit; background: none; padding: 0; }
/* Black logos turn white on a dark background; set cards stay light, their menus follow the theme. */
:root[data-dark] img:is(.ink-logo, [src*="chatgpt.png"], [src*="cursor.png"], [src*="grok-bot.png"], [src*="windsurf.png"], [src*="stdio.png"]) { filter: invert(1); }
:root[data-dark] .ts-card img:not(:is(.ide-menu, .menu) img) { filter: none; }
.sup-top { display: flex; justify-content: flex-end; padding: 0 4px; }
.sup-top:has(#supportMail[hidden]) { display: none; }
.sup-chat { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px; }
.sup-chat[hidden], .sup-form[hidden] { display: none; }
.sup-log { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sup-log:empty { display: none; }
.sup-msg { max-width: 88%; padding: 8px 12px; border-radius: 16px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-msg.bot { align-self: flex-start; background: var(--surface); color: var(--ink); }
.sup-msg.me { align-self: flex-end; background: var(--ink); color: var(--bg, #fff); }
.sup-msg.wait { color: var(--faint); }
.sup-ask, .sup-hand { display: flex; gap: 6px; align-items: flex-end; }
.sup-ask .set-input, .sup-hand .set-input { flex: 1; min-width: 0; box-sizing: border-box; border: 0; outline: none; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 18px; padding: 9px 14px; }
.sup-ask textarea.set-input { resize: none; min-height: 36px; max-height: 120px; overflow-y: auto; scrollbar-width: thin; }
.sup-hand .set-input { border-radius: 999px; }
.sup-send { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--ink); color: var(--bg, #fff); display: grid; place-items: center; }
.sup-send svg { width: 15px; height: 15px; }
.sup-send:disabled { opacity: .35; }
.sup-btns { display: flex; gap: 6px; }
.btn-secondary.soft { border-color: transparent; background: var(--surface); }
.sup-form { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 2px 4px 6px; }
.sup-form .set-input { width: 100%; box-sizing: border-box; border: 0; outline: none; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border-radius: 18px; padding: 9px 14px; }
.sup-form .set-input:not(textarea) { border-radius: 999px; }
.sup-form textarea.set-input { resize: none; min-height: 84px; max-height: 240px; overflow-y: auto; scrollbar-width: thin; }
.sup-form .set-input:focus { box-shadow: 0 0 0 2px var(--hover); }

/* Arc menu from the right edge */
.arc-edge { position: fixed; top: 25%; bottom: 25%; right: 0; width: 3px; z-index: 40; pointer-events: none; }
.arc-edge i { position: absolute; right: 2px; top: 50%; width: 3px; height: 40px; margin-top: -20px; border-radius: 9px; background: var(--line); transition: height .3s var(--ease), margin .3s var(--ease), background-color .2s; }
.arc-edge.near i { height: 64px; margin-top: -32px; background: var(--faint); }
body.arc-open .arc-edge { pointer-events: none; }
.arc-wheel { position: fixed; inset: 0; z-index: 45; pointer-events: none; overflow: hidden; display: none; user-select: none; touch-action: none; }
.arc-wheel.on { display: block; }
body.arc-open .arc-wheel { pointer-events: auto; cursor: grab; }
.arc-wheel.drag { cursor: grabbing; }
.app { transition: opacity .55s var(--ease), transform .7s cubic-bezier(.22,1,.36,1), filter .55s ease; }
body.arc-open .app { opacity: 0; transform: translateX(-36px) scale(.97); filter: blur(8px); pointer-events: none; }
.arc-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.arc-line circle { fill: none; stroke: var(--line); stroke-width: 1.5; }
.arc-knob { position: absolute; left: 0; top: 0; width: 38px; height: 13px; color: var(--ink); will-change: transform, opacity; }
.arc-veil { position: absolute; left: 0; right: 0; height: 24%; z-index: 2; pointer-events: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.arc-veil.top { top: 0; background: linear-gradient(var(--solid), transparent); -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent); }
.arc-veil.bot { bottom: 0; background: linear-gradient(transparent, var(--solid)); -webkit-mask: linear-gradient(transparent, #000 70%); mask: linear-gradient(transparent, #000 70%); }
.arc-it { position: absolute; left: 0; top: 0; width: 250px; height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 14px; transform-origin: 218px 29px; will-change: transform, opacity; cursor: pointer; }
.arc-lb { max-width: 160px; overflow: hidden; text-overflow: ellipsis; font-size: 17px; font-weight: 500; color: var(--faint); letter-spacing: -.2px; white-space: nowrap; padding: 5px 13px; border-radius: 999px; transition: color .25s, background-color .25s, box-shadow .25s; }
.arc-ic { width: 60px; height: 52px; flex: none; border-radius: 18px; background: var(--hover-solid); display: grid; place-items: center; color: var(--ink); transition: background-color .25s, box-shadow .25s; }
.arc-ic .app-badge, .arc-ic .app-glyph { width: 28px !important; height: 28px !important; border-radius: 8px; font-size: 13px; }
.arc-ic .app-glyph svg { width: 24px; height: 24px; }
.arc-it.on .arc-lb { color: var(--ink); background: var(--solid); box-shadow: inset 0 0 0 1px var(--line); }
.arc-it.on .arc-ic { background: var(--solid); box-shadow: inset 0 0 0 1.5px var(--ink); animation: arc-pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes arc-pop { 0% { transform: scale(.92); } 100% { transform: scale(1); } }
.arc-q { position: absolute; top: 18px; left: 0; right: 0; z-index: 3; text-align: center; font-size: 13px; color: var(--faint); letter-spacing: .5px; min-height: 18px; }
@media (prefers-reduced-motion: reduce) { .app { transition: opacity .2s; } .arc-it.on .arc-ic { animation: none; } }

/* Steps */
.steps-only { display: none !important; }
body.steps-open .checklist-head > .steps-only { display: grid !important; }
body.steps-open .checklist-head > :not(#projectBtn):not(#stepsBtn):not(.steps-only) { display: none !important; }
body.steps-open #tasks, body.steps-open #empty, body.steps-open #projBoard, body.steps-open #tlBar, body.steps-open #pickHint, body.steps-open #projectBrief, body.steps-open .composer { display: none !important; }
body.steps-open #stepsBtn { color: var(--ink); }
.steps { padding: 2px 2px 24px; animation: fade .2s var(--ease); }
.steps-list, .step-subs, .sd-subs { list-style: none; margin: 0; padding: 0; }
.step-subs { padding-left: 30px; }
.step-row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px 0 6px; border-radius: 12px; }
.step-row:hover { background: var(--hover); }
.step-row.colored { background: color-mix(in srgb, var(--c) 10%, var(--bg)); margin-bottom: 2px; }
.step-row.colored:hover { background: color-mix(in srgb, var(--c) 16%, var(--bg)); }
.step-num { width: 24px; height: 24px; margin: 0 2px; flex: none; display: grid; place-items: center; border-radius: 999px; background: var(--surface); font: 500 11px/1 var(--mono, ui-monospace, Menlo, monospace); color: var(--muted); font-variant-numeric: tabular-nums; transition: color .15s, background-color .15s; }
.step-num svg { width: 13px; height: 13px; stroke-width: 2.2; }
.step-num > span { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .15s; }
.step-num .sn-c { opacity: 0; }
.step-num:hover { background: var(--hover); color: var(--ink); }
.step-num:hover .sn-n { opacity: 0; }
.step-num:hover .sn-c { opacity: 1; }
.step-row.now > .step-num, .sb-block.now .step-num { color: var(--ink); }
.step-row.done > .step-num, .sb-block.done .step-num { background: var(--ink); color: var(--solid); }
.colored > .step-num, .colored .sb-head .step-num { color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.step-row.colored.done > .step-num, .sb-block.colored.done .step-num { background: var(--c); color: #fff; }
.step-text { flex: 1; min-width: 0; height: 34px; border: 0; outline: 0; background: none; font-size: 14px; color: var(--ink); padding: 0; }
.step-subs .step-text { font-size: 13.5px; }
.step-row.done > .step-text { color: var(--faint); text-decoration: line-through; }
.step-row.now > .step-text { font-weight: 500; }
.step-acts { display: flex; gap: 0; opacity: 0; transition: opacity .15s; }
.step-row:hover .step-acts, .step-row:focus-within .step-acts { opacity: 1; }
.step-acts .icon-btn { width: 26px; height: 26px; }
.step-acts .icon-btn svg, .sb-color svg { width: 14px; height: 14px; }
.steps-empty { color: var(--faint); font-size: 13px; padding: 6px 8px 10px; }
.steps-add { margin-top: 10px; }
.steps-add input { width: 100%; box-sizing: border-box; height: 40px; border: 0; outline: 0; border-radius: 999px; background: var(--surface); padding: 0 16px; font-size: 14px; color: var(--ink); }
.steps-add input::placeholder { color: var(--faint); }
.step-color-menu { z-index: 60; }

/* Steps as a flow diagram */
.steps-diagram { display: flex; flex-direction: column; align-items: center; padding: 6px 4px 0; }
.sd-step { display: flex; flex-direction: column; align-items: center; width: 100%; }
.sd-node { display: flex; align-items: center; gap: 10px; width: min(100%, 300px); min-height: 44px; padding: 8px 14px; border-radius: 16px; background: var(--surface); color: var(--ink); text-align: left; font-size: 14px; transition: background-color .15s, opacity .15s; animation: sd-in .3s var(--ease) both; }
.sd-node:hover { background: var(--hover); }
.sd-node.colored { background: color-mix(in srgb, var(--c) 16%, var(--bg)); }
.sd-node.colored:hover { background: color-mix(in srgb, var(--c) 24%, var(--bg)); }
.sd-node.now { font-weight: 500; }
.sd-node.done { color: var(--faint); }
.sd-node.done .sd-t { text-decoration: line-through; }
.sd-n { flex: none; min-width: 18px; font: 500 11px/1 var(--mono, ui-monospace, Menlo, monospace); color: var(--faint); font-variant-numeric: tabular-nums; }
.sd-n svg { width: 13px; height: 13px; display: block; }
.colored .sd-n { color: var(--c); }
.sd-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sd-subs { display: flex; flex-direction: column; gap: 4px; width: min(100%, 300px); padding: 6px 0 0 22px; box-sizing: border-box; position: relative; }
.sd-subs::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 20px; width: 1.5px; background: var(--line); border-radius: 1px; }
.sd-subs > li { position: relative; }
.sd-subs > li::before { content: ""; position: absolute; left: -12px; top: 50%; width: 10px; height: 1.5px; background: var(--line); }
.sd-sub { width: 100%; min-height: 36px; padding: 6px 12px; border-radius: 12px; font-size: 13px; }
.sd-arrow { color: var(--faint); height: 30px; display: grid; place-items: center; }
.sd-arrow svg { width: 12px; height: 28px; }
@keyframes sd-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* Steps as blocks */
.steps-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 2px; }
.sb-block { display: flex; flex-direction: column; gap: 4px; min-height: 96px; padding: 8px 10px 12px; border-radius: 16px; background: var(--surface); animation: sd-in .3s var(--ease) both; }
.sb-block.colored { background: color-mix(in srgb, var(--c) 14%, var(--bg)); }
.sb-block.done .sb-text { color: var(--faint); text-decoration: line-through; }
.sb-block.now .sb-text { font-weight: 500; }
.sb-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -4px 0 -6px; }
.sb-color { width: 26px; height: 26px; opacity: 0; transition: opacity .15s; }
.sb-block:hover .sb-color { opacity: 1; }
.sb-text { font-size: 14px; color: var(--ink); overflow-wrap: anywhere; padding: 0 2px 2px; }
.sb-sub { display: flex; gap: 8px; align-items: baseline; text-align: left; font-size: 12.5px; color: var(--muted); padding: 2px; border-radius: 8px; }
.sb-sub:hover { color: var(--ink); }
.sb-sub.done { color: var(--faint); text-decoration: line-through; }

/* Arc menu: project list on the left */
.arc-projects { position: fixed; left: 14px; top: 50%; z-index: 46; width: min(200px, 46vw); max-height: 70vh; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translate(-10px, -50%); filter: blur(6px); pointer-events: none; transition: opacity .3s var(--ease), transform .4s cubic-bezier(.22,1,.36,1), filter .3s ease; }
.arc-projects.on { opacity: 1; transform: translate(0, -50%); filter: none; pointer-events: auto; }
.arc-projects-head { font: 500 11px/16px var(--mono, ui-monospace, Menlo, monospace); color: var(--faint); padding: 0 10px 6px; }
.arc-projects button { text-align: left; padding: 7px 10px; border-radius: 10px; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s, background-color .15s; }
.arc-projects button:hover, .arc-projects button:focus-visible { color: var(--ink); background: var(--hover); outline: 0; }
.arc-projects button.on { color: var(--ink); }
.arc-projects .arc-new { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--faint); }
.arc-projects .arc-new svg { width: 15px; height: 15px; stroke-width: 1.6; flex: none; }
body.arc-proj .arc-it.on .arc-lb { opacity: 0; }
.arc-lb { transition: color .25s, background-color .25s, box-shadow .25s, opacity .2s; }

/* Files on a task */
.files { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 2px; }
.file-row { display: flex; align-items: center; gap: 2px; border-radius: 10px; transition: background-color .15s; }
.file-row:hover { background: var(--hover); }
.file-row > .icon-btn { width: 26px; height: 26px; opacity: 0; transition: opacity .15s; }
.file-row:hover > .icon-btn { opacity: 1; }
.file-row.busy { opacity: .55; }
.file-open, .tree-row { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; text-align: left; color: var(--ink); }
.file-ic { width: 16px; height: 16px; flex: none; color: var(--faint); display: grid; place-items: center; }
.file-ic svg, .fv svg, .files svg { stroke-width: 1.6; }
.file-ic svg { width: 16px; height: 16px; }
.file-ic.big, .file-ic.big svg { width: 28px; height: 28px; }
.file-name { flex: 1; min-width: 0; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { flex: none; font: 400 11px/16px var(--mono, ui-monospace, Menlo, monospace); color: var(--faint); font-variant-numeric: tabular-nums; }
.file-row.busy .file-size::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 6px; border-radius: 50%; border: 1.6px solid currentColor; border-right-color: transparent; vertical-align: -1px; animation: wdspin .7s linear infinite; }

/* File viewer */
.fv { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: var(--solid); animation: fv-in .28s var(--ease) both; }
@keyframes fv-in { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.fv-head { display: flex; align-items: center; gap: 2px; padding: 10px 10px 8px; }
.fv-title { flex: 1; min-width: 0; padding: 0 6px; }
.fv-name { font-size: 16px; line-height: 22px; font-weight: 400; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-meta { font: 400 11px/16px var(--mono, ui-monospace, Menlo, monospace); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-meta:empty { display: none; }
.fv-body { flex: 1; min-height: 0; overflow: auto; padding: 6px 18px 48px; scrollbar-width: thin; }
.fv-doc { animation: fv-in .28s var(--ease) both; }
.fv-wait { display: grid; place-items: center; padding: 60px 0; }
.fv-spin { width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid var(--faint); border-right-color: transparent; animation: wdspin .7s linear infinite; }
.fv-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 12px; color: var(--muted); font-size: 14px; text-align: center; }
.fv-tree { display: flex; flex-direction: column; gap: 1px; margin: 0 -8px; }
.tree-row { padding-left: calc(8px + var(--d, 0) * 18px); border-radius: 10px; transition: background-color .15s; }
.tree-row:hover { background: var(--hover); }
.tree-chev { width: 12px; height: 12px; flex: none; color: var(--faint); transition: transform .2s var(--ease); }
.tree-chev svg { width: 12px; height: 12px; display: block; }
.tree-row.dir.on .tree-chev { transform: rotate(90deg); }
.fv-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 12.5px/20px var(--mono, ui-monospace, Menlo, monospace); color: var(--ink); }
.fv-img { display: block; max-width: 100%; margin: 8px auto; border-radius: 12px; }
.fv-frame { display: block; width: 100%; height: calc(100vh - 120px); border: 0; border-radius: 12px; background: #fff; }
.fv-media { display: block; width: 100%; margin-top: 12px; border-radius: 12px; }
.fv-doc > .code-block { margin: 0; }
.fv-table { overflow-x: auto; margin: 4px 0 16px; }
.fv-table table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.fv-table th { text-align: left; font-weight: 500; color: var(--faint); padding: 6px 14px 8px 0; white-space: nowrap; }
.fv-table td { padding: 6px 14px 6px 0; color: var(--ink); vertical-align: top; }
.fv-table tbody tr:hover td { color: var(--ink); background: var(--hover); }

/* Markdown, set like a page: thin titles, calm body, code in the code block */
.md { font-size: 14px; line-height: 22px; color: var(--ink); max-width: 680px; overflow-wrap: anywhere; }
.md h1 { font-size: 26px; line-height: 30px; font-weight: 400; letter-spacing: -.03em; margin: 14px 0 12px; }
.md h2 { font-size: 20px; line-height: 26px; font-weight: 400; letter-spacing: -.02em; margin: 26px 0 8px; }
.md h3 { font-size: 16px; line-height: 22px; font-weight: 500; margin: 20px 0 6px; }
.md h4, .md h5, .md h6 { font-size: 14px; line-height: 22px; font-weight: 500; color: var(--muted); margin: 16px 0 4px; }
.md > :first-child { margin-top: 4px; }
.md p { margin: 0 0 12px; }
.md a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--ink); }
.md strong { font-weight: 600; }
.md code { font: 400 12.5px/1 var(--mono, ui-monospace, Menlo, monospace); background: var(--surface); padding: 2px 5px; border-radius: 6px; }
.md .code-block { margin: 6px 0 16px; }
.md .code-block code { background: none; padding: 0; border-radius: 0; font: inherit; }
.md-list { margin: 0 0 12px; padding-left: 22px; }
.md-list .md-list { margin: 2px 0 2px; }
.md-list li { margin: 3px 0; }
.md-list li::marker { color: var(--faint); }
.md-task { list-style: none; display: grid; grid-template-columns: 16px 1fr; column-gap: 8px; margin-left: -22px !important; }
.md-task > .md-list { grid-column: 2; }
.md-check { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--faint); }
.md-check svg { width: 16px; height: 16px; display: block; }
.md-task.done > .md-li { color: var(--faint); text-decoration: line-through; }
.md blockquote { margin: 0 0 12px; padding: 0 0 0 16px; color: var(--muted); }
.md-gap { height: 14px; }
.md-img { max-width: 100%; border-radius: 12px; display: block; margin: 10px 0; }
.md-front { display: flex; flex-direction: column; gap: 2px; margin: 0 0 16px; font: 400 12px/18px var(--mono, ui-monospace, Menlo, monospace); color: var(--muted); }
.md-front .k { color: var(--faint); margin-right: 10px; }

/* Steps: several flows per project */
.flow-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; padding: 0 2px 10px; }
.flow-tab { padding: 5px 11px; border-radius: 999px; font-size: 13px; color: var(--faint); transition: color .15s, background-color .15s; }
.flow-tab:hover { color: var(--ink); background: var(--hover); }
.flow-tab.on { color: var(--ink); background: var(--surface); font-weight: 500; }
.flow-name { width: 150px; height: 28px; padding: 0 11px; border: 0; outline: 0; border-radius: 999px; background: var(--surface); font-size: 13px; color: var(--ink); }
.flow-add, .flow-del { width: 26px; height: 26px; }
.flow-add svg, .flow-del svg { width: 14px; height: 14px; stroke-width: 1.6; }
.flow-del { margin-left: auto; opacity: 0; transition: opacity .15s; }
.flow-bar:hover .flow-del { opacity: 1; }

/* Log time you forgot to start */
.log-time { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.log-time input { width: 62px; height: 30px; padding: 0 4px; border: 0; outline: 0; border-radius: 999px; background: var(--surface); color: var(--ink); font: 400 13px/30px var(--mono, ui-monospace, Menlo, monospace); text-align: center; font-variant-numeric: tabular-nums; }
.log-time input:focus { background: var(--hover); }
.log-time input::-webkit-calendar-picker-indicator { display: none; }
.log-to { color: var(--faint); font-size: 13px; }
.log-time #logAdd[disabled] { opacity: .4; pointer-events: none; }

/* Quiet add row in settings */
.set-add { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; font-size: 14px; color: var(--muted); text-align: left; transition: color .15s, background-color .15s; }
.set-add:hover { color: var(--ink); background: var(--hover); }
.set-add svg { width: 16px; height: 16px; stroke-width: 1.6; flex: none; }

/* Calmer gradients for covers and avatars; photos keep their own colours */
.proj-cover:not(:has(img)) { filter: saturate(.6); }
.account-avatar.grain, .avatar-opt.grain, .proj-av.grain, .cover-grid .avatar-opt:not(:has(img)) { filter: saturate(.6); }
.account-avatar.grain::after, .avatar-opt.grain::after { opacity: .1; }
