[hidden] { display: none !important; }
:root {
  --bg: #0b0b0d; --panel: #121216; --card: #15151a; --line: #26262e;
  --ink: #ecebef; --dim: #8d8b96; --violet: #b49cff; --teal: #6fd6c3; --amber: #f1c27b; --rose: #ff8fa3;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Source Serif Pro", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; color: var(--teal); }
.eyebrow.violet { color: var(--violet); } .dim { color: var(--dim); } .small { font-size: 13px; }

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.orb { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--violet) 45%, transparent 75%); box-shadow: 0 0 14px var(--violet); }
.new { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; text-align: center; }
.new:hover { border-color: var(--violet); }
nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; scrollbar-color: #3a3450 transparent; scrollbar-width: thin; }
/* Rows keep their height and the list scrolls; without this, flex
   shrinks every row to a sliver to fit the list's max-height. */
nav > * { flex-shrink: 0; }
.conv { text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv:hover, .conv.on { background: #1d1d24; color: var(--ink); }
.out { margin-top: auto; }
.link { background: none; border: 0; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.link:hover { color: var(--ink); }

.main { display: flex; flex-direction: column; min-width: 0; padding: 36px clamp(16px, 5vw, 64px) 0;
  /* room under the last item for the floating search bar and the footer, on every page */
  padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); }
.hello h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 24px; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; }
.empty { font-size: 20px; margin-top: 8vh; }
.q { align-self: flex-end; max-width: 85%; text-align: right; }
.q .text { margin: 0; color: var(--ink); }
.text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.card { background: var(--card); border: 1px solid #2b2540; border-radius: 16px; padding: 16px 18px; }
.card .text { font-family: var(--serif); font-size: 17px; line-height: 1.5; }
.card.error { border-color: #4a2630; } .card.error .eyebrow { color: var(--rose); }
.thinking { color: var(--dim); animation: pulse 1.6s ease-in-out infinite; font-family: var(--sans); font-size: 15px; }
@keyframes pulse { 50% { opacity: .35; } }
.acts { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #ecebef; color: #111; border: 0; border-radius: 999px; padding: 9px 18px; font: 600 14px var(--sans); cursor: pointer; }
.pill.small { padding: 6px 13px; font-size: 13px; background: #24222e; color: var(--ink); border: 1px solid #3a3450; }
.pill:hover { filter: brightness(1.08); }
.spark { color: var(--violet); }
.pill:not(.small) .spark { color: #6b4fd8; }
.editor { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.editor input { flex: 1; min-width: 200px; }
.saved { font-size: 13px; color: var(--teal); }

.field, .editor input, .ptools input, .linkas input { background: #0f0f13; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: 14px var(--sans); }
.bar { position: fixed; left: calc(260px + clamp(16px, 5vw, 64px)); right: clamp(16px, 5vw, 64px); bottom: calc(44px + env(safe-area-inset-bottom, 0px)); max-width: 760px;
  display: flex; gap: 8px; align-items: flex-end; background: #141419; border: 1px solid #34304a; border-radius: 18px; padding: 10px 10px 10px 16px;
  box-shadow: 0 0 0 1px rgba(180,156,255,.08), 0 0 32px rgba(180,156,255,.18), 0 10px 40px rgba(0,0,0,.6); }
.bar textarea { flex: 1; resize: none; background: none; border: 0; color: var(--ink); font: 15px/1.5 var(--sans); max-height: 180px; padding: 6px 0; }
.bar textarea:focus { outline: none; }
.send { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ink); color: #111; font-size: 17px; cursor: pointer; flex: none; }
.send:disabled { opacity: .4; cursor: default; }

.foot { position: fixed; bottom: 0; left: 260px; right: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); font-size: 12px; color: var(--dim); text-align: center; background: linear-gradient(transparent, var(--bg) 40%); }
.foot .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); margin-right: 4px; vertical-align: middle; }

.login { max-width: 360px; margin: 18vh auto 0; padding: 0 16px; }
.login h1 { font-size: 34px; margin: 0 0 20px; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.error { color: var(--rose); margin: 0; }
body:has(.login) .foot { left: 0; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .side .sections { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .side-extra { display: none; }          /* the main panel lists them */
  .side .out { margin-top: 0; }
  .bar { left: 16px; right: 16px; }
  .foot { left: 0; }
}

/* sections, lists, review cards, people/groups panes */
.sections { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.sec { text-decoration: none; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
.sec:hover, .sec.on { background: #1d1d24; color: var(--ink); }
.badge { background: var(--violet); color: #111; border-radius: 999px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.new.wide { display: block; }
.list { max-height: 50vh; }
.flash { border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; max-width: 760px; font-size: 14px; border: 1px solid var(--line); background: var(--panel); }
.flash.ok { border-color: #244a40; color: var(--teal); } .flash.bad { border-color: #4a2630; color: var(--rose); }
.banner { max-width: 760px; border: 1px solid #4a3d20; background: #17140e; border-radius: 14px; padding: 12px 16px; margin: 0 0 18px; }
.eyebrow.amber, .amber { color: var(--amber); } .eyebrow.teal { color: var(--teal); }
.certain { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; max-width: 760px; margin: 0 0 18px; }
.cards { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.card.same_group { border-color: #234a44; }
.headline { font-size: 22px; margin: 2px 0 6px; line-height: 1.3; }
.acts form { display: inline; }
details.else summary { list-style: none; cursor: pointer; display: inline-block; }
details.else summary::-webkit-details-marker { display: none; }
details.else[open] summary { color: var(--ink); }
.editor select, select { background: #0f0f13; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 14px var(--sans); max-width: 100%; }
.editor.stack { flex-direction: column; align-items: stretch; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; max-width: 1100px; }
.block { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row:first-of-type { border-top: 0; }
.row a { color: var(--ink); text-decoration: none; } .row a:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: middle; }
.notes { white-space: pre-wrap; font: 14px/1.5 var(--sans); margin: 0; color: var(--ink); }
.panel { position: sticky; top: 24px; align-self: start; background: radial-gradient(circle at 50% 40%, #16141f, var(--bg) 70%); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.ring { width: 100%; height: auto; display: block; }
.bar input[type=search] { flex: 1; background: none; border: 0; color: var(--ink); font: 15px var(--sans); padding: 6px 0; }
.bar input[type=search]:focus { outline: none; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } .panel { position: static; } }

.crumb { display: inline-block; font-size: 13px; color: var(--dim); text-decoration: none; margin-bottom: 10px; }
.crumb:hover { color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; max-width: 1100px; }
.tile { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-width: 0; }
.tile:hover, .tile:focus-visible { border-color: #3a3450; background: #18171f; }
.tile-name { font-family: var(--serif); font-size: 18px; overflow-wrap: anywhere; }
.tile .tag { margin: 0 4px 0 0; }

/* topics */
.wide-block { max-width: 1100px; }
.tile.paused, .tile.done { opacity: .7; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip a { color: var(--ink); text-decoration: none; }
.chip.auto { border-style: dashed; }
.x { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.x:hover { color: var(--rose); }
.autolbl { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px dashed #4a3d20; border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.rowhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.area { width: 100%; background: #0f0f13; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.md { overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-family: var(--serif); font-weight: 400; margin: 14px 0 6px; }
.md h1 { font-size: 22px; } .md h2 { font-size: 18px; } .md h3 { font-size: 16px; }
.md p, .md ul, .md ol { margin: 6px 0; } .md ul, .md ol { padding-left: 20px; }
.md a { color: var(--violet); } .md code { background: #0f0f13; border-radius: 4px; padding: 1px 4px; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 4px 8px; font-size: 13px; }
details.note:not(.block) { border-top: 1px solid var(--line); padding: 8px 0; }
details.note:not(.block):first-of-type { border-top: 0; }
details.note summary { cursor: pointer; }
/* pinned pages */
.pin { font-weight: 500; }
.sideitem { display: block; padding: 7px 10px; border-radius: 8px; color: var(--dim); text-decoration: none; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sideitem:hover, .sideitem.on { background: #24222e; color: var(--ink); }
.pinhead { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.pinhead .crumb { margin-bottom: 6px; }
.pinhead a.small { color: var(--dim); }
.pinframe { display: block; width: 100%; height: calc(100vh - 110px); min-height: 70vh; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 24px; }
body:has(.pinframe) .bar, body:has(.pinframe) .foot { display: none; }   /* the page gets the whole height */

/* Topic notes: closed to an abstract and the latest status. */
details.note.block > summary { list-style: none; position: relative; padding-right: 22px; }
details.note.block > summary::-webkit-details-marker { display: none; }
details.note.block > summary::after { content: "›"; position: absolute; right: 0; top: 0; color: var(--dim); transition: transform .15s; }
details.note.block[open] > summary::after { transform: rotate(90deg); }
details.note.block > summary:hover .ntitle { color: var(--violet); }
.ntitle { font-family: var(--serif); font-size: 18px; margin: 0 0 4px; }
.abstract { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.status { margin: 6px 0 0; font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.status .lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); margin-right: 4px; }
details.note.block[open] .abstract, details.note.block[open] .status { display: none; }
details.note.block .body { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 6px; }
.rowfoot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; }
.rowfoot > details { flex: 1; }
.cols > * { min-width: 0; }

/* Topic page (Topics v2): header, modes, files, to-dos, notes log. */
.topichead h1 { margin: 0; }
.titlerow { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.syncform { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip .alias { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-left: 2px; }
.modes { display: inline-flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 4px 0 6px; }
.modes button { background: none; border: 0; color: var(--dim); font: 500 13px var(--sans); padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.modes button[aria-pressed="true"] { background: #231d38; color: var(--violet); }
.modes button:hover { color: var(--ink); }
.modehint { font-size: 13px; color: var(--dim); margin: 0 0 8px; max-width: 70ch; }
.block.stand { border-color: #2f2748; background: linear-gradient(180deg, #17141f, var(--card)); }
.standmeta { display: inline-flex; align-items: center; gap: 10px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.stand textarea.area { line-height: 1.5; font-family: var(--sans); font-size: 14px; }
.ffilter { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ffilter input[type=search] { flex: 1 1 220px; min-width: 0; background: #0f0f13; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 14px var(--sans); }
.fcount { margin: 4px 0; }
.files { display: flex; flex-direction: column; }
.file { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 0; border-top: 1px solid var(--line); }
.file:first-child { border-top: 0; }
.file a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; } .file a:hover { color: var(--violet); }
.file p { margin: 2px 0 0; font-size: 13px; color: var(--dim); overflow-wrap: anywhere; }
.ext { font: 10px/1 ui-monospace, Menlo, monospace; text-transform: uppercase; border: 1px solid var(--line); border-radius: 6px; padding: 6px 0; text-align: center; color: var(--amber); overflow: hidden; }
.when { font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.todos { list-style: none; margin: 0 0 8px; padding: 0; }
.todos li { padding: 7px 0; border-top: 1px solid var(--line); }
.todos li:first-child { border-top: 0; }
.tick { display: flex; gap: 10px; align-items: baseline; }
.tick span { overflow-wrap: anywhere; } .tick span.done { color: var(--dim); text-decoration: line-through; }
.box { flex: none; width: 18px; height: 18px; border: 1px solid #4a4560; border-radius: 5px; background: none; color: var(--violet); font-size: 12px; line-height: 1; cursor: pointer; padding: 0; position: relative; top: 3px; }
.box.on { background: #231d38; border-color: var(--violet); }
.qadd { display: flex; gap: 8px; }
.qadd input { flex: 1; min-width: 0; background: #0f0f13; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: 14px var(--sans); }
#notes .log { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; margin: 6px 0 10px; }
#notes .day { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 6px 0 0; }
#notes .entry { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
#notes .entry p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer.note { display: flex; gap: 8px; align-items: flex-end; border: 1px solid #3a3450; border-radius: 16px; padding: 6px 6px 6px 10px; background: #0f0f13; }
.composer.note:focus-within { border-color: var(--violet); }
.composer.note textarea { flex: 1; min-width: 0; background: none; border: 0; color: var(--ink); font: 14px/1.45 var(--sans); resize: vertical; padding: 4px 0; }
.composer.note textarea:focus { outline: none; }
#notes .cards { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
#notes .cards > .block { margin-bottom: 0; }
.file p.hit { color: var(--ink); font: 12px/1.5 ui-monospace, Menlo, monospace; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed p { margin: 2px 0 0; overflow-wrap: anywhere; }
.src { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px; color: var(--dim); }
.src-zalo { color: #6fb7ff; } .src-whatsapp { color: var(--teal); } .src-gmail { color: var(--rose); }
.src-file { color: var(--amber); } .src-imessage { color: var(--violet); } .src-web { color: var(--ink); }
.todos li.propose { display: flex; gap: 10px; align-items: flex-start; }
.todos li.propose > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todos li.propose p { margin: 2px 0 6px; }
.btns { display: flex; gap: 10px; align-items: center; }
.standp { margin: 4px 0 10px; max-width: 68ch; }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 14px; }
.kv dt { color: var(--dim); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding-top: 2px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; } .kv dt { padding-top: 6px; } }
#ask .turns { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; margin: 6px 0 10px; }
.turn { display: flex; flex-direction: column; gap: 2px; max-width: 62ch; }
.turn.me { align-self: flex-end; text-align: right; }
.turn p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.agent p { font-family: var(--serif); font-size: 16px; }
.turn .who { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.askform select { background: #231d38; color: var(--violet); border: 0; border-radius: 999px; padding: 6px 10px; font: 500 13px var(--sans); }
.task { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
#queue .task:first-of-type { border-top: 0; }
.tmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; overflow-wrap: anywhere; }
.tmain b { font-weight: 500; }
.flow { font: 12px ui-monospace, Menlo, monospace; color: var(--dim); }
.st { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; border: 1px solid var(--line); white-space: nowrap; color: var(--dim); }
.st-queued { color: var(--violet); border-color: #3a3060; } .st-review { color: var(--amber); border-color: #4a3d20; }
.st-done { color: var(--teal); border-color: #2c4d47; } .st-running { color: var(--ink); } .st-failed { color: var(--rose); }
#queue form.qadd { flex-wrap: wrap; }
#queue form.qadd select { max-width: 100%; }
.tasks-all { margin-bottom: 18px; }
.otable { overflow-x: auto; }
.otable table { border-collapse: collapse; width: 100%; font-size: 14px; }
.otable th { text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); padding: 6px 10px 6px 0; }
.otable td { border-top: 1px solid var(--line); padding: 8px 10px 8px 0; vertical-align: top; }
.area.mono { font: 13px/1.5 ui-monospace, Menlo, monospace; }

/* Topic page: one board of cards, as many columns as fit, balanced by height. */
.board { column-width: 400px; column-gap: 20px; max-width: 1640px; }
.board > .block { break-inside: avoid; page-break-inside: avoid; display: inline-block; width: 100%; margin: 0 0 16px; }
.board .abstract { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.board .status { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.board details.note[open] .abstract, .board details.note[open] .status { display: none; }
.todos li.propose p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.todos li.propose b { overflow-wrap: anywhere; }
details.more > summary { margin: 4px 0 8px; }
#ask .turns { max-height: 360px; }
/* Note cards inside the Notes card: compact rows (they open in full). */
#notes .cards > .block { padding: 10px 14px; }
#notes .cards .ntitle { font-size: 16px; margin: 0 0 2px; }
#notes .cards .abstract { -webkit-line-clamp: 2; font-size: 14px; }
#notes .cards .status { -webkit-line-clamp: 1; margin-top: 4px; }
#notes .cards .eyebrow { margin-bottom: 2px; }
#notes .cards { gap: 8px; }
.board { column-fill: balance; }
#notes .cards { padding-bottom: 0; }
/* People: the list, and editing a person */
.ptools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 12px; }
.ptools input[type=search] { flex: 1 1 220px; max-width: 360px; }
.pbar { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tablewrap { overflow-x: auto; }
table.plist { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plist th { text-align: left; font: 600 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--dim, #8a8796); padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.plist td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.plist td a { color: var(--ink); text-decoration: none; } table.plist td a:hover { text-decoration: underline; }
table.plist .num { text-align: right; font-variant-numeric: tabular-nums; }
table.plist tbody tr:hover { background: #ffffff08; }
.personacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.personacts details.edit[open] { flex-basis: 100%; }
.personacts .editor label { display: flex; flex-direction: column; gap: 4px; }
.linkas { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.linkas input[name=name] { min-width: 0; width: 14em; padding: 7px 12px; }
.pdel { display: inline-flex; align-items: center; gap: 8px; }
.pdel details[open] { display: inline-flex; align-items: center; gap: 8px; }
.pill.small.warn { background: #3a1c24; border-color: #6b2c3a; color: #ffc2cd; }
.projmem { display: block; padding: 4px 0; border-top: 1px solid var(--line); }
.projmem .row { padding-left: 14px; }
.stale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.tag.you { background: #2a2140; border-color: #4b3a7a; color: var(--violet); }
.entry { padding: 8px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; }
.entry .md.body > :first-child { margin-top: 2px; }
.md.body.clamp { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent); mask-image: linear-gradient(180deg, #000 75%, transparent); }
/* Tags: a narrow list beside the cloud */
.tagwrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; max-width: 1240px; align-items: start; }
.taglist .row { padding: 6px 0; }
.cloudbox { position: sticky; top: 20px; padding: 8px; }
svg.tagcloud { width: 100%; height: auto; display: block; touch-action: manipulation; }
.cloudbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px 4px; }
@media (max-width: 900px) { .tagwrap { grid-template-columns: 1fr; } .cloudbox { position: static; order: -1; } }
.row.todo > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.tickform { display: inline; }
.row.todo .ttext p, .row.todo .ttext { display: inline; margin: 0; }
/* Review: Active topics at a glance */
.topicsdigest { max-width: 760px; margin-bottom: 18px; }
.tdigest { padding: 10px 0; border-top: 1px solid var(--line); }
.tdigest:first-of-type { border-top: 0; }
.tdigest .tname { font-size: 20px; color: var(--ink); text-decoration: none; }
.newlist { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 4px; }
.tdigest .brief { margin: 4px 0 6px; line-height: 1.5; }
.tdigest .lbl, .newmark { font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.tdigest .lbl { color: var(--amber); margin-right: 4px; }
.newmark { color: #0b0b0d; background: var(--violet); border-radius: 6px; padding: 1px 6px; }

/* Topic wise to-do */
.taskcard .cardtitle { font-size: 22px; margin: 0 0 10px; }
.taskcard .tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.taskcard .tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--dim); font: 14px var(--sans); padding: 8px 12px; cursor: pointer; margin-bottom: -1px; }
.taskcard .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--violet); }
.taskcard .tab .n { font-size: 11px; color: var(--dim); background: #1d1d24; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tadd, .tedit { display: flex; flex-direction: column; gap: 10px; background: #0f0f13; border: 1px solid #34304a; border-radius: 14px; padding: 12px; }
.tadd { margin-bottom: 8px; }
.addrow { display: flex; gap: 8px; align-items: center; }
.addrow input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); font: 15px var(--sans); outline: none; }
.pill.small.ghost { background: #24222e; color: var(--ink); border: 1px solid #3a3450; }
fieldset.morebox { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 10px 0 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tpanel { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpanel label, .taskcard label.wide { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.tpanel label.off { opacity: .4; }
.tpanel label.check { flex-direction: row; align-items: center; gap: 8px; grid-column: span 2; }
.tpanel select, .tpanel input[type=date], .tpanel input[type=datetime-local] { background: #1a1a20; color: var(--ink); border: 1px solid #34304a; border-radius: 8px; padding: 5px 8px; font: 13px var(--sans); }
.taskcard textarea { background: #0b0b0f; color: var(--ink); border: 1px solid #34304a; border-radius: 8px; padding: 7px 10px; font: 14px var(--sans); resize: vertical; }
.tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 30px; gap: 10px; align-items: start; padding: 10px 8px 10px 10px; border-top: 1px solid var(--line); border-left: 3px solid transparent; border-radius: 10px; cursor: pointer; user-select: none; }
.trow:first-child { border-top-color: transparent; }
.trow:hover { background: rgba(255,255,255,.025); }
.trow.on { background: rgba(180,156,255,.09); border-left-color: var(--violet); }
.trow.editing { cursor: default; user-select: text; background: none; }
.trow.editing > .tbody > .ttext, .trow.editing > .tbody > .tmeta, .trow.editing > .tbody > .tgive { display: none; }
.trow.editing .tickf { display: none; }
.ttext { font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.tmeta { font-size: 11px; color: var(--dim); display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; align-items: center; }
.tmeta .chip { font-size: 10px; border-radius: 999px; padding: 1px 7px; border: 1px solid; white-space: nowrap; }
.tmeta .chip.agent { color: var(--violet); border-color: #3a3450; }
.tmeta .chip.c-queued, .chip.c-waiting { color: var(--dim); border-color: #34304a; }
.tmeta .chip.c-running { color: var(--teal); border-color: #2a4a45; }
.tmeta .chip.c-review { color: var(--amber); border-color: #4a3d26; background: rgba(241,194,123,.07); }
.tmeta .chip.c-failed { color: var(--rose); border-color: #4a2630; }
.tmeta .chip.apple { color: #ff9f8a; border-color: #4a2e2a; }
.tgive { font-size: 11px; color: var(--dim); margin-top: 3px; }
.tgive span { color: var(--teal); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-right: 4px; }
.treview { margin-top: 8px; background: rgba(241,194,123,.05); border: 1px solid #3d3322; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.treview p { margin: 0; }
.treview .tacts, .tedit .tacts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.treview .qadd { flex: 1; display: flex; gap: 8px; min-width: 200px; }
.treview .qadd input { flex: 1; min-width: 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #5d5b66; background: none; cursor: pointer; padding: 0; position: relative; }
.tick:hover, .tick:focus-visible { border-color: var(--teal); }
.tick:hover::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--teal); font-size: 13px; }
.link.danger { color: var(--rose); }
.taskcard .folded { margin: 8px 0 0; }
.taskcard .tempty { padding: 10px; list-style: none; }
.taskpage .route { color: var(--teal); min-height: 1.2em; margin: 0; }
.tfilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.tfilters input[type=search] { flex: 1 1 240px; background: #0f0f13; color: var(--ink); border: 1px solid #34304a; border-radius: 10px; padding: 8px 12px; font: 14px var(--sans); }
.tfilters .fbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.tfilters .f { background: transparent; color: var(--dim); border: 1px solid #34304a; border-radius: 999px; padding: 4px 11px; font: 12px var(--sans); cursor: pointer; }
.tfilters .f[aria-pressed="true"] { color: var(--ink); background: #24222e; border-color: var(--violet); }
.tfilters select { background: #1a1a20; color: var(--ink); border: 1px solid #34304a; border-radius: 8px; padding: 4px 8px; }
.tgroup { margin-top: 14px; }
.taskpage .trow { cursor: default; user-select: text; }
.trow.done .ttext { color: var(--dim); text-decoration: line-through; text-decoration-color: #4a4854; }

/* Topics: tabs and the Topic manager tree */
.ttabs { display: flex; flex-direction: row; gap: 4px; border-bottom: 1px solid var(--line); margin: -8px 0 20px; }
.ttabs a { color: var(--dim); text-decoration: none; padding: 8px 14px; border-bottom: 2px solid transparent; font-size: 14px; }
.ttabs a.on { color: var(--ink); border-bottom-color: var(--violet); }
.treelinks { margin: 4px 0 8px; } .treelinks a { color: var(--ink); }
.tmgr { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1100px; }
@media (max-width: 900px) { .tmgr { grid-template-columns: 1fr; } }
.tpanel { background: var(--card); border: 1px solid #2b2540; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tbar .pill:disabled { opacity: .4; cursor: default; }
.ttree { display: flex; flex-direction: column; gap: 2px; position: relative; user-select: none; }
.trow { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; min-width: 0; }
.trow:hover { background: #1b1a22; }
.trow.tsel { background: #1f1c2c; border-color: #3d3463; }
.trow.tlit { background: #16201f; } .trow.tside { background: #22201a; }
.trow.ghost { opacity: .35; } .trow.ts-archived .tname { color: var(--dim); }
.thandle { color: var(--dim); cursor: grab; font-size: 14px; padding: 0 2px; touch-action: none; }
.thash { font: 12px ui-monospace, Menlo, monospace; color: var(--violet); min-width: 2.6em; }
.tname { text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow.d0 .tname { font-weight: 600; }
.tchips { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.tchip { font: 11px ui-monospace, Menlo, monospace; padding: 1px 7px; border-radius: 999px; border: 1px solid #3a3450; color: var(--dim); white-space: nowrap; }
.tchip.link { color: var(--amber); border-color: #5a4a2a; }
.tdrop { position: absolute; height: 2px; right: 8px; background: var(--violet); border-radius: 2px; pointer-events: none; box-shadow: 0 0 8px var(--violet); }
.tlegend { display: flex; gap: 14px; flex-wrap: wrap; margin: 0; }
.tlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.k-sel { background: #1f1c2c; border: 1px solid #3d3463; } .k-lit { background: #16201f; } .k-side { background: #22201a; }
.treetext textarea { width: 100%; background: #0f0f13; color: var(--ink); border: 1px solid #3a3450; border-radius: 10px; padding: 12px; font: 13px/1.7 ui-monospace, Menlo, monospace; margin-top: 8px; }
.tins h2 { font: 400 24px/1.2 var(--serif); margin: 2px 0 0; }
.tins h2 a { text-decoration: none; }
.tsect { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.tsect ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.tsect li span { color: var(--dim); font-size: 12px; }
.tsect .eyebrow { margin: 0; }
.taddlink { display: flex; gap: 6px; }
.taddlink input { flex: 1; min-width: 0; background: #0f0f13; color: var(--ink); border: 1px solid #3a3450; border-radius: 999px; padding: 5px 12px; font: 13px ui-monospace, Menlo, monospace; }
.tx { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 12px; padding: 0 0 0 4px; }
.tx:hover { color: var(--rose); }
kbd { font: 11px ui-monospace, Menlo, monospace; border: 1px solid #3a3450; border-radius: 4px; padding: 0 4px; color: var(--dim); }
