/* Talk: one stylesheet. Tokens, then base, shell, shared components, charts, and each view.
   Rules: text is 15px or larger (13px only for chart ticks); the data is the only colour;
   status colours (good/bad) always come with a ✓/✗ glyph. */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --page: #f4f4f2;
  --panel: #ffffff;
  --sidebar: #ebebe8;
  --hover: rgba(29, 29, 31, 0.05);
  --ink: #1d1d1f;
  --ink-2: #56575b;
  --ink-3: #85868a;
  --line: #e2e2de;
  --focus: #2a78d6;

  /* data: validated categorical slots 1-3 (all-pairs safe) + a neutral for the rest */
  --work: #2a78d6;
  --distraction: #eb6834;
  --comms: #1baf7a;
  --other: #cfcfca;
  --track: #cde2fb; /* meter track: a lighter step of the work blue */

  /* status: fixed, only ever with a glyph */
  --good: #0ca30c;
  --bad: #d03b3b;

  /* sequential blue for the streak grid; heat-0 = no data */
  --heat-0: #e6e6e2;
  --heat-1: #b7d3f6;
  --heat-2: #6da7ec;
  --heat-3: #2a78d6;
  --heat-4: #184f95;

  --sans: -apple-system, system-ui, "SF Pro Text", "Helvetica Neue", sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --serif: ui-serif, "New York", Georgia, serif;
  --r-l: 18px;
  --r-m: 12px;
  --r-s: 8px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #171718; --panel: #212123; --sidebar: #1c1c1e; --hover: rgba(255, 255, 255, 0.06);
    --ink: #f2f2f0; --ink-2: #c3c2b7; --ink-3: #8e8d88; --line: #303032; --focus: #3987e5;
    --work: #3987e5; --distraction: #d95926; --comms: #199e70; --other: #4a4a48; --track: #1d3557;
    --heat-0: #2a2a2c; --heat-1: #184f95; --heat-2: #256abf; --heat-3: #3987e5; --heat-4: #86b6ef;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #171718; --panel: #212123; --sidebar: #1c1c1e; --hover: rgba(255, 255, 255, 0.06);
  --ink: #f2f2f0; --ink-2: #c3c2b7; --ink-3: #8e8d88; --line: #303032; --focus: #3987e5;
  --work: #3987e5; --distraction: #d95926; --comms: #199e70; --other: #4a4a48; --track: #1d3557;
  --heat-0: #2a2a2c; --heat-1: #184f95; --heat-2: #256abf; --heat-3: #3987e5; --heat-4: #86b6ef;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--page); color: var(--ink); font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 30px/1.15 var(--sans); letter-spacing: -0.02em; text-wrap: balance; }
h2 { font: 650 21px/1.25 var(--sans); letter-spacing: -0.01em; }
h3 { font: 600 17px/1.3 var(--sans); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sub { color: var(--ink-2); font-size: 17px; }
.quiet { color: var(--ink-3); font-size: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); height: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.sidebar { background: var(--sidebar); padding: 22px 12px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; font: 650 17px var(--sans); }
.brand img { width: 26px; height: 26px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 16px;
  text-decoration: none; color: var(--ink-2); }
.nav-link svg { width: 20px; height: 20px; flex: none; }
.nav-link:hover { background: var(--hover); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.view { overflow-y: auto; height: 100%; }
.page { max-width: 940px; padding: 40px 48px 72px; display: flex; flex-direction: column; gap: 40px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 6px; }
section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) {
  /* Phone: the sections become a tab bar along the bottom, above the home indicator. */
  .shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding-bottom: 0; }
  .view { order: 1; }
  .sidebar { order: 2; flex-direction: row; align-items: center; gap: 0; overflow-x: auto;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  #nav, .nav-foot { display: flex; flex-direction: row; gap: 0; }
  #nav { flex: 1; justify-content: space-around; }
  .brand { display: none; }
  .nav-link { padding: 11px; }
  .nav-link svg { width: 22px; height: 22px; }
  .nav-link span { display: none; }
  .nav-link[aria-current="page"] { box-shadow: none; background: transparent; color: var(--ink); }
  .page { padding: 28px 20px 56px; }
  .two { grid-template-columns: 1fr; }
}
body.quick .shell { grid-template-columns: 1fr; }
body.quick .sidebar { display: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--hover); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; }
.btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--ink); color: var(--page); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--page)); }
.btn:disabled { opacity: 0.45; cursor: default; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper span { min-width: 12ch; text-align: center; font-size: 16px; font-weight: 500; }
.select { height: 38px; border-radius: 999px; border: 0; background: var(--hover); padding: 0 14px; font-size: 15px; }
.status-line { font-size: 15px; color: var(--ink-3); min-height: 1.5em; }

/* status glyph: ✓ / ✗ in a circle, or an open ring for "not yet" */
.status { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.status svg { width: 15px; height: 15px; }
.status.pass { background: var(--good); }
.status.fail { background: var(--bad); }
.status.open, .status.pending { box-shadow: inset 0 0 0 2px var(--line); }

/* ---------- composer (writing + voice + video) ---------- */
.composer { background: var(--panel); border-radius: var(--r-l); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 1px var(--line); }
.composer textarea { width: 100%; min-height: 96px; border: 0; outline: none; resize: vertical; background: transparent;
  font: 18px/1.6 var(--serif); color: var(--ink); }
.composer textarea::placeholder { color: var(--ink-3); }
.composer .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.composer .grow { flex: 1; }
.recording { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-m); background: var(--ink); color: var(--page); }
.recording video { width: 128px; height: 72px; object-fit: cover; border-radius: var(--r-s); background: #000; }
.recording .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
.recording .time { font: 500 16px var(--rounded); font-variant-numeric: tabular-nums; margin-right: auto; }
.recording .btn { background: color-mix(in srgb, var(--page) 16%, transparent); color: var(--page); height: 34px; }
.recording .btn.primary { background: var(--page); color: var(--ink); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- entries (journal days, project streams) ---------- */
.entries { display: flex; flex-direction: column; }
.entry { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 16px; padding: 22px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry .when { color: var(--ink-3); font-size: 15px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.entry .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.entry .kind { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 15px; }
.entry .kind svg { width: 16px; height: 16px; }
.entry h3 { font-size: 18px; }
.entry video { width: 100%; max-height: 360px; border-radius: var(--r-m); background: #000; }
.entry audio { width: 100%; max-width: 440px; }
.entry .text { white-space: pre-wrap; font-size: 16px; line-height: 1.6; }
.entry.written .text { font: 18px/1.65 var(--serif); }
.entry .text.clamped { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.entry .more { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--focus); font-size: 15px; }
.empty { color: var(--ink-3); font-size: 17px; padding: 24px 0; }

/* ---------- charts ---------- */
.tooltip { position: fixed; z-index: 10; pointer-events: none; background: var(--ink); color: var(--page); padding: 8px 12px;
  border-radius: var(--r-s); font-size: 14px; line-height: 1.4; max-width: 280px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18); }
.tooltip b { font-weight: 600; }
.chart-ticks { font: 13px var(--sans); fill: var(--ink-3); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend b { color: var(--ink); font-weight: 600; }

.dayband { position: relative; }
.dayband svg { display: block; width: 100%; height: auto; overflow: visible; }

.meters { display: flex; flex-direction: column; gap: 22px; }
.meters.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 860px) { .meters.row { grid-template-columns: 1fr; } }
.meter { display: flex; flex-direction: column; gap: 8px; }
.meter .figure { display: flex; align-items: baseline; gap: 8px; }
.meter .value { font: 600 30px/1 var(--rounded); letter-spacing: -0.01em; }
.meter .of { color: var(--ink-2); font-size: 16px; }
.meter .track { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 3px; background: var(--work); }

.heatmap svg { display: block; overflow: visible; max-width: 100%; height: auto; }
.heatmap .key { display: flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-3); }
.heatmap .key i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

/* ---------- home ---------- */
.hello h1 { font-size: 34px; }
.summary { font-size: 20px; line-height: 1.45; color: var(--ink); max-width: 36ch; text-wrap: pretty; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.checklist li { display: flex; align-items: center; gap: 14px; min-height: 52px; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .label { flex: 1; font-size: 17px; }
.checklist .note { color: var(--ink-3); font-size: 15px; font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.habits { display: flex; flex-wrap: wrap; gap: 8px; }
.habit { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 9px; border: 0; border-radius: 999px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line); color: var(--ink); font-size: 16px; }
.habit:hover { box-shadow: 0 0 0 1px var(--ink-3); }
.habit .status { width: 24px; height: 24px; }
.habit .status svg { width: 14px; height: 14px; }
.habit.done { box-shadow: 0 0 0 1px color-mix(in srgb, var(--good) 45%, var(--line)); }
.habit:disabled { opacity: 0.6; }
.habit.missed { color: var(--ink-2); }
.habit:has(.auto):disabled { opacity: 0.85; cursor: default; }
.habits.is-untracked { opacity: 0.45; }
.habit-numbers { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.habit-number { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.habit-number-input { width: 90px; height: 40px; border: 0; border-radius: 10px; background: var(--hover); padding: 0 10px; font-size: 16px; }
.day-nav { display: flex; align-items: center; gap: 4px; }
.day-nav h2 { min-width: 7ch; text-align: center; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink-2); cursor: pointer; }

.reading { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.reading li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.reading li:first-child { border-top: 0; }
.reading .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reading .title { font-size: 17px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.reading .title:hover { text-decoration: underline; text-underline-offset: 3px; }
.reading .meta { font-size: 15px; color: var(--ink-3); }
.reading-quiz { font-size: 16px; padding: 10px 14px; border-radius: var(--r-m); background: var(--hover); }
.reading-quiz a { font-weight: 600; }

/* ---------- today (the day's note) ---------- */
.strip { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 7px 14px; border-radius: 999px; background: var(--hover);
  color: var(--ink-2); font-size: 15px; text-decoration: none; }
.chip b { color: var(--ink); font: 600 16px var(--rounded); }
.chip:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.row-actions .task-add { flex: 1; min-width: 240px; }
.quiet-btn { background: transparent; color: var(--ink-3); }
.note-md { font-size: 17px; line-height: 1.55; overflow-wrap: anywhere; }
.note-md p { margin: 0 0 10px; } .note-md ul { margin: 0 0 10px; padding-left: 22px; }
.reading-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 16px; }
.reading-line a { color: var(--ink); }

/* ---------- habits ---------- */
.habit .auto { font-size: 13px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.hgrid { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
.hrow { display: grid; grid-template-columns: 160px minmax(0, 1fr) 220px; align-items: center; gap: 6px 14px; }
.hname { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcells { display: grid; grid-template-columns: repeat(var(--days), minmax(3px, 1fr)); gap: 2px; }
.hcells button { height: 14px; padding: 0; border: 0; border-radius: 3px; background: var(--heat-0); }
.hcells button.on { background: var(--heat-3); }
.hcells button.skip { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.hcells button:hover { outline: 2px solid var(--ink-3); outline-offset: 1px; }
.hstat { display: grid; grid-template-columns: 58px 40px 1fr; align-items: center; gap: 8px; font-size: 15px; color: var(--ink-2);
  font-variant-numeric: tabular-nums; }
.hstat b { font: 600 15px var(--rounded); color: var(--ink); }
.pill { justify-self: start; padding: 1px 9px; border-radius: 999px; font-size: 14px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.pill.on-track, .pill.done-today { background: color-mix(in srgb, var(--work) 14%, transparent); color: var(--ink); }
.pill.focus { box-shadow: inset 0 0 0 1px var(--ink-3); color: var(--ink); }

/* ---------- talk ---------- */
.talk { display: grid; grid-template-rows: auto 1fr auto; height: 100%; max-width: 760px; margin: 0 auto; }
.talk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 28px 12px; }
.thread { overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 12px 28px 24px; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 84%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg .meta { color: var(--ink-3); font-size: 14px; }
.bubble { padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--ink); color: var(--page); border-bottom-right-radius: 6px; }
.msg.assistant .bubble { background: var(--panel); box-shadow: 0 0 0 1px var(--line); border-bottom-left-radius: 6px; }
.bubble p { margin: 0 0 10px; } .bubble p:last-child { margin: 0; }
.bubble ul, .bubble ol { margin: 0 0 10px; padding-left: 22px; }
.bubble hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.bubble code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--hover); padding: 1px 5px; border-radius: 5px; }
.bubble table { border-collapse: collapse; font-size: 15px; margin: 4px 0 10px; display: block; overflow-x: auto; }
.bubble th, .bubble td { text-align: left; padding: 6px 12px 6px 0; border-top: 1px solid var(--line); }
.bubble th { color: var(--ink-3); font-weight: 500; border-top: 0; }
.bubble.working { color: var(--ink-3); font-style: italic; }
.bubble.error { background: color-mix(in srgb, var(--bad) 12%, var(--panel)); box-shadow: none; }
.talk-foot { padding: 12px 28px 22px; display: flex; flex-direction: column; gap: 10px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; }
.suggestions .btn { height: 34px; font-size: 14px; }
.inputbar { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 18px; border-radius: 26px; background: var(--panel);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--line); }
.inputbar textarea { flex: 1; border: 0; outline: none; resize: none; background: transparent; padding: 9px 0; max-height: 200px;
  font-size: 16px; line-height: 1.45; }
.inputbar .send { background: var(--ink); color: var(--page); }
.inputbar .send:hover { background: var(--ink); opacity: 0.85; color: var(--page); }
body.quick .talk-head { padding: 16px 20px 6px; }
body.quick .talk-head h1 { font-size: 20px; }
body.quick .thread, body.quick .talk-foot { padding-left: 20px; padding-right: 20px; }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .projects { grid-template-columns: 1fr; } }
.plist { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; }
.plist .area { display: flex; flex-direction: column; gap: 2px; }
.plist .area-name { color: var(--ink-3); font-size: 14px; padding: 0 12px 4px; }
.pitem { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 12px;
  border: 0; border-radius: 10px; background: transparent; font-size: 16px; text-decoration: none; color: var(--ink); }
.pitem:hover { background: var(--hover); }
.pitem[aria-current="true"] { background: var(--panel); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.pitem .count { color: var(--ink-3); font-size: 14px; font-weight: 400; }
.new-project { display: flex; flex-direction: column; gap: 8px; padding: 0 4px; }
.new-project input { height: 38px; border-radius: 10px; border: 0; background: var(--hover); padding: 0 12px; font-size: 15px; }
.pdetail { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--hover); color: var(--ink-2); font-size: 14px; }
.now-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 17px; }

/* ---------- tasks ---------- */
.task-add { display: flex; gap: 8px; }
.task-add input { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 999px; padding: 0 18px; font-size: 16px;
  background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.task-add input::placeholder { color: var(--ink-3); }
.task-add .btn { height: 44px; }
.pending { list-style: none; margin: 0; padding: 0 18px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-3); font-size: 15px; }
.pending:empty { display: none; }
.pending li { animation: pulse 1.6s ease-in-out infinite; }
.head-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--hover); }
.toggle button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; }
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.task-sections { display: flex; flex-direction: column; gap: 36px; }
.task-section h2 .count { color: var(--ink-3); font-weight: 400; }
.done-list summary { cursor: pointer; list-style: none; }
.done-list summary::-webkit-details-marker { display: none; }
.done-list summary h2::after { content: " ›"; color: var(--ink-3); }
.done-list[open] summary h2::after { content: " ⌄"; }
.more-link { font-size: 15px; color: var(--ink-2); }

.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.task { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 4px 14px;
  padding: 12px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .tick { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--ink-3); }
.task .tick:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.task .tick.done { background: var(--good); box-shadow: none; }
.task .tick svg { width: 15px; height: 15px; }
.task .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task .title { font-size: 17px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.task .title:hover { text-decoration: underline; text-underline-offset: 3px; }
.task .meta { display: flex; flex-wrap: wrap; gap: 0 14px; font-size: 15px; color: var(--ink-3); }
.task .meta:empty { display: none; }
.task .meta .late { color: var(--ink); font-weight: 600; }
.task .meta .error { color: var(--ink); }
.task.is-done .title { color: var(--ink-3); text-decoration: line-through; }
/* The plan buttons float over the row's end on hover, so they never squeeze the title. */
.task .plan { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 6px;
  padding-left: 40px; background: linear-gradient(to right, transparent, var(--page) 32px); opacity: 0; pointer-events: none;
  transition: opacity 0.12s; }
.task:hover .plan, .task:focus-within .plan { opacity: 1; pointer-events: auto; }
.task .plan .btn, .task .plan .select { height: 32px; padding: 0 12px; font-size: 15px; }
.task .plan .select { max-width: 180px; }
.task.busy { opacity: 0.5; pointer-events: none; }
@media (hover: none), (max-width: 860px) {
  .task .plan { position: static; transform: none; grid-column: 2; flex-wrap: wrap; padding: 0; background: none;
    opacity: 1; pointer-events: auto; }
}

/* ---------- task board + timeline ---------- */
.page.wide { max-width: 1320px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.bcol { background: var(--hover); border-radius: var(--r-l); padding: 14px 10px 10px; gap: 10px; min-height: 180px; transition: box-shadow 0.12s; }
.bcol header { padding: 0 6px; display: flex; flex-direction: column; gap: 2px; }
.bcol h2 { font-size: 17px; }
.bcol h2 .count { color: var(--ink-3); font-weight: 400; }
.bcol.over { box-shadow: inset 0 0 0 2px var(--focus); }
.bcol.busy { opacity: 0.6; }
.bcards { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.bcard { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px; border-radius: var(--r-m);
  background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px var(--line); cursor: grab; }
.bcard.dragging { opacity: 0.4; }
.bcard .tick { width: 22px; height: 22px; margin-top: 1px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--ink-3); }
.bcard .tick.done { background: var(--good); box-shadow: none; }
.bcard .tick svg { width: 13px; height: 13px; }
.bcard .what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bcard .title { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.bcard .meta { display: flex; flex-direction: column; gap: 0; font-size: 15px; color: var(--ink-3); }
.bcard .meta .late { color: var(--ink); font-weight: 600; }
.bcard.is-done .title { color: var(--ink-3); text-decoration: line-through; }

.timeline-wrap { display: flex; flex-direction: column; gap: 14px; }
.timeline-scroll { overflow-x: auto; padding-bottom: 6px; }
.timeline { position: relative; display: grid; grid-template-columns: minmax(200px, 260px) repeat(var(--days), minmax(13px, 1fr));
  align-items: center; row-gap: 6px; min-width: 980px; }
.tl-week { font-size: 15px; color: var(--ink-3); padding: 0 0 8px 6px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.tl-group { font: 600 16px var(--sans); padding: 12px 0 2px; border-top: 1px solid var(--line); }
.tl-label { grid-column: 1; display: flex; flex-direction: column; min-width: 0; padding-right: 12px; }
.tl-label .title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-label .meta { font-size: 15px; color: var(--ink-3); }
.tl-bar { position: relative; height: 12px; border-radius: 6px; background: color-mix(in srgb, var(--comms) 45%, transparent); }
.tl-bar.work { background: color-mix(in srgb, var(--work) 45%, transparent); }
.tl-bar.point { width: 12px; justify-self: center; background: var(--comms); }
.tl-bar.work.point { background: var(--work); }
.tl-bar.beyond { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar .due { position: absolute; right: -2px; top: 50%; width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg);
  background: var(--ink); border-radius: 2px; }
.tl-bar.late { outline: 2px solid var(--ink); outline-offset: 1px; }
.tl-today { align-self: stretch; justify-self: start; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; pointer-events: none; }
.legend-due { width: 10px; height: 10px; background: var(--ink); transform: rotate(45deg); border-radius: 2px !important; }

/* ---------- screen time ---------- */
.screen-page { gap: 20px; }
.embed { width: 100%; height: calc(100vh - 190px); min-height: 560px; border: 0; border-radius: var(--r-l); background: var(--panel);
  box-shadow: 0 0 0 1px var(--line); }

/* ---------- devices + sign-in ---------- */
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 16px; }
@media (max-width: 860px) { .nav-foot { margin-top: 0; padding-top: 0; } }
.devices { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.device:first-child { border-top: 0; }
.device .what { display: flex; flex-direction: column; gap: 2px; }
.device .title { font-size: 17px; }
.device .meta { color: var(--ink-3); font-size: 15px; }
.pair-code { font: 600 34px/1.2 var(--rounded); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.pair { max-width: 420px; margin: 0 auto; padding: 72px 24px; display: flex; flex-direction: column; gap: 14px; }
.pair-icon { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 0 0 1px var(--line); }
.pair-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pair-form input { height: 48px; border: 0; border-radius: 12px; padding: 0 16px; font-size: 17px; background: var(--panel);
  box-shadow: 0 0 0 1px var(--line); }
.pair-form #code { font: 600 22px var(--rounded); letter-spacing: 0.08em; text-transform: uppercase; }
.pair-form .btn { height: 48px; justify-content: center; font-size: 17px; }

/* ---------- week + goals ---------- */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.matrix th { font: 500 15px var(--sans); color: var(--ink-3); text-align: center; padding-bottom: 4px; }
.matrix th.label, .matrix td.label { text-align: left; font-size: 17px; color: var(--ink); font-weight: 400; padding-right: 16px; }
.matrix td { text-align: center; height: 40px; }
.matrix td .status { margin: 0 auto; }
.matrix td.total { color: var(--ink-3); font-size: 15px; text-align: right; white-space: nowrap; }
.matrix .none { width: 26px; height: 26px; margin: 0 auto; border-radius: 50%; background: var(--heat-0); opacity: 0.6; }
.mission { font: 600 30px/1.2 var(--rounded); letter-spacing: -0.01em; max-width: 24ch; text-wrap: balance; }
.area-block { display: flex; flex-direction: column; gap: 14px; padding-top: 28px; border-top: 1px solid var(--line); }
.area-block .ideal { color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.criteria { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.criteria li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.criteria li:first-child { border-top: 0; }
.criteria .what { font-size: 17px; }
.criteria .how { color: var(--ink-3); font-size: 15px; }
.criteria .result { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 15px; color: var(--ink-2); text-align: right; }

/* ---------- chart pieces (built in lib/charts.js) ---------- */
.band-wrap { position: relative; }
.band { position: relative; height: 48px; border-radius: 12px; background: var(--heat-0); overflow: hidden; }
.band .seg { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.seg.work { background: var(--work); }
.seg.comms { background: var(--comms); }
.seg.distraction { background: var(--distraction); }
.seg.other { background: var(--other); }
.band-wrap .now { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.dayband .ticks { position: relative; height: 22px; margin-top: 8px; }
.dayband .ticks span { position: absolute; transform: translateX(-50%); font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dayband .ticks span:first-child { transform: none; }
.dayband .ticks span:last-child { transform: translateX(-100%); }

.columns { position: relative; padding-left: 40px; }
.columns .grid { position: absolute; left: 0; right: 0; top: 24px; height: var(--plot-h); }
.columns .gridline { position: absolute; left: 40px; right: 0; border-top: 1px solid var(--line); }
.columns .gridline span { position: absolute; left: -40px; top: -9px; font-size: 13px; color: var(--ink-3); }
.columns .cols { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); }
.columns .col { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.columns .plot { height: calc(var(--plot-h) + 24px); display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.columns .stack { width: 24px; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.columns .cap { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.columns .day { font-size: 15px; color: var(--ink-3); }

/* ---------- goals ---------- */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.goal-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 16px; border: 0; border-radius: var(--r-l);
  background: var(--panel); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-align: left; }
.goal-card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 28%, transparent); }
.goal-card.is-upcoming .goal-chart { opacity: 0.5; }
.goal-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.goal-card-title { font: 600 17px/1.3 var(--sans); }
.goal-figure { color: var(--ink-2); font-size: 15px; }
.goal-figure b { font: 650 30px/1 var(--rounded); color: var(--ink); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.goal-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--ink-3); font-size: 15px; }
.goal-chart { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.goal-chart .target { stroke: var(--line); stroke-width: 1.5; }
.goal-chart .pace { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.goal-chart .fill { fill: color-mix(in srgb, var(--work) 13%, transparent); }
.goal-chart .actual { fill: none; stroke: var(--work); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.goal-chart .now { fill: var(--work); stroke: var(--panel); stroke-width: 2; }
.goal-chart .guide { stroke: var(--ink-3); stroke-width: 1; }
.chart-wrap { position: relative; }
.chart-tip { position: absolute; top: -6px; transform: translate(-50%, -100%); padding: 5px 10px; border-radius: var(--r-s);
  background: var(--ink); color: var(--page); font-size: 15px; white-space: nowrap; pointer-events: none; }
.history { display: flex; align-items: flex-end; gap: 12px; color: var(--ink-3); font-size: 15px; }
.history .bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.history.big .bars { height: 48px; gap: 4px; }
.history .bars::after { content: ""; position: absolute; left: -3px; right: -3px; bottom: var(--target); border-top: 1.5px dashed var(--ink-3); }
.history i { width: 9px; border-radius: 3px 3px 0 0; background: var(--other); }
.history.big i { width: 16px; }
.history i.pass { background: var(--work); }
.starters { gap: 10px; }
.starter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fold > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2::after { content: " ›"; color: var(--ink-3); }
.fold[open] > summary h2::after { content: " ⌄"; }
.finished-list { list-style: none; margin: 14px 0 0; padding: 0; }
.finished-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border: 0; border-top: 1px solid var(--line);
  background: none; text-align: left; font-size: 16px; }
.finished-list button:hover { background: var(--hover); }
.finished-list .title { flex: 1; }
.telos-body { display: flex; flex-direction: column; gap: 28px; margin-top: 20px; }

/* dialogs: goal details and the goal form */
dialog.sheet { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; border: 0; border-radius: var(--r-l);
  padding: 24px 28px 28px; background: var(--panel); color: var(--ink); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28); }
dialog.sheet[open] { display: flex; flex-direction: column; gap: 20px; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.35); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.sheet-head > div { display: flex; flex-direction: column; gap: 4px; }
.sheet-head .icon-btn { margin: -6px -10px 0 0; }
.goal-numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.goal-numbers div { display: flex; flex-direction: column; gap: 2px; }
.goal-numbers span { color: var(--ink-3); font-size: 15px; }
.goal-numbers b { font: 650 24px/1.2 var(--rounded); font-variant-numeric: tabular-nums; }
.measured { color: var(--ink-2); }
.goal-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.goal-details div { display: contents; }
.goal-details dt { color: var(--ink-3); }
.goal-details dd { margin: 0; }
.goal-form { display: flex; flex-direction: column; gap: 16px; }
.goal-form .field { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 15px; }
.goal-form .field small { color: var(--ink-3); font-size: 15px; }
.goal-form input, .goal-form textarea { height: 42px; border: 0; border-radius: 10px; background: var(--hover); padding: 0 12px; font-size: 16px; color: var(--ink); }
.goal-form textarea { height: auto; padding: 10px 12px; resize: vertical; }
.goal-form .select { height: 42px; border-radius: 10px; font-size: 16px; }
.goal-form .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.goal-form .inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 16px; }
.goal-form input.short { width: 120px; }
.goal-form details summary { cursor: pointer; font-weight: 600; }
.goal-form .details-body { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.presets .btn { height: 32px; padding: 0 12px; }
.starters-in-form { display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
@media (max-width: 600px) {
  .goal-numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog.sheet { padding: 20px 18px 24px; }
}

/* ---------- manage habits ---------- */
dialog.manage-sheet { width: min(860px, calc(100vw - 32px)); }
.manage { display: flex; flex-direction: column; gap: 16px; }
.manage-list { list-style: none; margin: 0; padding: 0; }
.manage-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.manage-row.inactive .manage-main b { color: var(--ink-3); text-decoration: line-through; }
.manage-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.manage-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.manage-controls .btn, .manage-controls .select { height: 32px; padding: 0 12px; font-size: 15px; }
.manage-controls .icon-btn { width: 32px; height: 32px; font-size: 16px; }
.auto-form { display: flex; flex-direction: column; gap: 12px; }
.auto-form input, .auto-form .select { height: 40px; border-radius: 10px; }
.auto-form input { border: 0; background: var(--hover); padding: 0 12px; font-size: 16px; }
.auto-form .inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.auto-form input.short { width: 110px; }
@media (max-width: 1180px) {
  /* Narrower: name and stats on one line, the squares under them. */
  .hgrid { gap: 12px; }
  .hrow { grid-template-columns: minmax(0, 1fr) auto; }
  .hcells { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- health ---------- */
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented .btn { height: 34px; padding: 0 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--r-m); background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.tile-label { color: var(--ink-3); font-size: 15px; }
.tile b { font: 650 24px/1.25 var(--rounded); font-variant-numeric: tabular-nums; }
.chart-title { font: 600 16px var(--sans); color: var(--ink-2); margin: 8px 0 4px; }
.plot { display: block; width: 100%; height: auto; overflow: visible; }
.plot .grid { stroke: var(--line); stroke-width: 1; }
.plot .tick { font: 13px var(--sans); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.plot .bar { fill: var(--work); }
.plot .hit { fill: transparent; }
.plot .bar-group:hover .hit { fill: var(--hover); }
.plot .pickable { cursor: pointer; }
.plot .target-line { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.plot .deep, .legend .deep { fill: var(--heat-4); background: var(--heat-4); }
.plot .core, .legend .core { fill: var(--heat-3); background: var(--heat-3); }
.plot .rem, .legend .rem { fill: var(--heat-2); background: var(--heat-2); }
.plot .asleep, .legend .asleep { fill: var(--heat-1); background: var(--heat-1); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; }
.activities { list-style: none; margin: 0; padding: 0; }
.activities li { border-top: 1px solid var(--line); }
.activities summary { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 2px 14px; padding: 10px 2px; cursor: pointer; list-style: none; }
.activities summary::-webkit-details-marker { display: none; }
.activities summary .quiet { grid-column: 2; }
.activities details > p { padding: 0 2px 12px 126px; }
.act-day { color: var(--ink-3); font-size: 15px; }
.act-name { font-weight: 600; }
@media (max-width: 600px) { .activities details > p { padding-left: 2px; } }

/* ---------- today ---------- */
.today-page { max-width: 1180px; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 32px; align-items: start; }
.today-side { display: flex; flex-direction: column; gap: 32px; }
.note-card { gap: 10px; padding: 18px 22px 22px; border-radius: var(--r-l); background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.note-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.note-card-head h2 { font-size: 17px; color: var(--ink-2); }
.save-state { font-size: 15px; color: var(--ink-3); }
.note-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: var(--r-m);
  background: color-mix(in srgb, var(--distraction) 12%, transparent); font-size: 15px; }
@media (max-width: 1000px) { .today-grid { grid-template-columns: 1fr; } }

/* the note editor: Obsidian-style live preview (lib/editor.js) */
.note-editor .cm-editor { font: 17px/1.6 var(--sans); color: var(--ink); background: transparent; min-height: 360px; }
.note-editor .cm-editor.cm-focused { outline: none; }
.note-editor .cm-scroller { font-family: inherit; line-height: inherit; }
.note-editor .cm-content { padding: 4px 0 40px; caret-color: var(--ink); }
.note-editor .cm-line { padding: 1px 2px; }
.note-editor .cm-cursor { border-left: 2px solid var(--focus); }
.note-editor .cm-selectionBackground, .note-editor .cm-focused .cm-selectionBackground { background: color-mix(in srgb, var(--focus) 22%, transparent) !important; }
.note-editor .cm-placeholder { color: var(--ink-3); }
.note-editor .cm-h { font-weight: 700; letter-spacing: -0.01em; }
.note-editor .cm-h1 { font-size: 26px; padding-top: 6px; }
.note-editor .cm-h2 { font-size: 21px; padding-top: 14px; }
.note-editor .cm-h3 { font-size: 18px; padding-top: 8px; }
.note-editor .cm-t-h1, .note-editor .cm-t-h2, .note-editor .cm-t-h3, .note-editor .cm-t-h4 { font-weight: 700; }
.note-editor .cm-t-mark { color: var(--ink-3); }
.note-editor .cm-t-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; background: var(--hover); border-radius: 4px; padding: 0 3px; }
.note-editor .cm-md-link { color: var(--focus); text-decoration: none; }
.note-editor .cm-task-box { width: 17px; height: 17px; margin: 0 8px 0 0; vertical-align: -3px; accent-color: var(--good); cursor: pointer; }
.note-editor .cm-task-done { color: var(--ink-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-3) 60%, transparent); }
.note-editor .cm-bullet { color: var(--ink-3); padding-right: 2px; }

/* your day, from Dayflow: newest first, a coloured edge per category */
.dayline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 560px; overflow-y: auto; }
.dayline-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 8px 10px 8px 12px; border-radius: var(--r-s);
  background: var(--panel); box-shadow: inset 3px 0 0 var(--other), 0 0 0 1px var(--line); }
.dayline-card.work { box-shadow: inset 3px 0 0 var(--work), 0 0 0 1px var(--line); }
.dayline-card.comms { box-shadow: inset 3px 0 0 var(--comms), 0 0 0 1px var(--line); }
.dayline-card.distraction { box-shadow: inset 3px 0 0 var(--distraction), 0 0 0 1px var(--line); }
.dayline-time { font: 500 15px var(--rounded); color: var(--ink-2); font-variant-numeric: tabular-nums; padding-top: 1px; }
.dayline-card summary { display: flex; flex-direction: column; cursor: pointer; list-style: none; }
.dayline-card summary::-webkit-details-marker { display: none; }
.dayline-card summary b { font-weight: 600; font-size: 15px; line-height: 1.35; }
.dayline-card summary .quiet { font-size: 15px; }
.dayline-card details p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
