/* huddle — "Minutes, tamed". Light only.
   One readable family: Pretendard (400/500/600). Geist Mono only for code, paths and SHAs.
   Warm paper and ink. Colour appears only as meaning: amber = waiting on you, green = done/live, red = blocked, blue = link/mention.
   Two grounds carry hierarchy: the paper note (the record's milestones) and the amber note (waiting on you). Everything else is space and weight. */
:root {
  --paper: #F7F6F3; --sheet: #FFFFFF; --fill: #F3F1EC; --fill-2: #ECE9E3;
  --line: #E7E4DE; --line-2: #D8D4CC;
  --ink: #1D1C1A; --ink-2: #57534C; --ink-3: #75706A; --ink-4: #A9A49B;
  --accent: #3149C2; --accent-soft: #EEF0FA;
  --attn: #9C4F06; --attn-dot: #C8700F; --attn-soft: #FCF4E8; --attn-line: #F1DDC0;
  --ok: #2D7A4E; --ok-soft: #E9F3EC; --danger: #B3362B; --danger-soft: #FBEDEA;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, "Pretendard Variable", monospace;
  --shadow: 0 1px 2px rgba(29,28,26,.05), 0 6px 20px rgba(29,28,26,.06);
  --shadow-lg: 0 2px 8px rgba(29,28,26,.06), 0 24px 56px rgba(29,28,26,.16);
  --ease: cubic-bezier(.2,0,0,1); --ease-io: cubic-bezier(.4,0,.2,1);
  --gutter: 32px; --panel-w: 296px; --col: 720px; --av: 28px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 400 14px/1.6 var(--sans); letter-spacing: -.006em; color: var(--ink); background: var(--sheet); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; word-break: keep-all; overflow-wrap: anywhere; }
#app { display: flex; flex-direction: column; height: 100%; min-height: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, p { margin: 0; }
code, pre, .mono { font-family: var(--mono); letter-spacing: 0; }
code { font-size: .87em; background: var(--fill); padding: 1px 5px; border-radius: 4px; color: #3A3732; }
pre { font-size: 13px; background: var(--fill); padding: 10px 12px; border-radius: 6px; overflow-x: auto; margin: 8px 0; white-space: pre-wrap; }
pre code { background: none; padding: 0; font-size: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { display: inline-flex; line-height: 0; flex: none; }
.ic svg { stroke-width: 1.5; }
.faint { color: var(--ink-3); }
.hidden { display: none !important; }
.spacer { flex: 1; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- controls ---------- */
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button.primary, button.secondary, button.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; transition: background-color 120ms, border-color 120ms, color 120ms, transform 80ms; }
button.primary { background: var(--ink); color: #fff; }
button.primary:hover { background: #34322E; }
button.primary.danger { background: var(--danger); } button.primary.danger:hover { background: #9A2D24; }
button.primary:disabled { background: var(--fill-2); color: var(--ink-4); opacity: 1; }
button.secondary { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); }
button.secondary:hover { background: var(--paper); }
button.secondary.danger { color: var(--danger); }
button.ghost { color: var(--ink-2); }
button.ghost:hover { background: var(--fill); color: var(--ink); }
button.ghost.danger { color: var(--danger); } button.ghost.danger:hover { background: var(--danger-soft); }
button.icon { width: 32px; padding: 0; }
button.compact { height: 28px; padding: 0 10px; font-size: 12.5px; }
button.compact.icon { width: 28px; padding: 0; }
button.tall { height: 34px; padding: 0 14px; }
button:active:not(:disabled) { transform: translateY(.5px); }
button:disabled { cursor: default; }
button.copy.done { color: var(--ok); box-shadow: inset 0 0 0 1px #BFDCC9; }
input, textarea, select { font: inherit; letter-spacing: inherit; color: var(--ink); background: #fff; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 6px; padding: 7px 10px; width: 100%; transition: box-shadow 120ms; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; line-height: 1.6; }
select { appearance: none; padding-right: 28px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%2375706A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 9px center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .lbl { font-size: 13px; font-weight: 600; }
.field > .hint { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--fill); border-radius: 8px; }
.segmented button { height: 28px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background-color 160ms, color 160ms, box-shadow 160ms; }
.segmented button .n { color: var(--ink-3); margin-left: 6px; font-variant-numeric: tabular-nums; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(29,28,26,.08); }
/* status pill: one pill, the state of the project including "needs you" */
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; flex: none; transition: background-color 240ms, color 240ms, box-shadow 240ms; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex: none; }
.status.open i { background: var(--ok); }
.status.needs, .status.finished { color: var(--attn); background: var(--attn-soft); box-shadow: inset 0 0 0 1px var(--attn-line); }
.status.needs i, .status.finished i, .status.paused i { background: var(--attn-dot); }
.status.paused { color: var(--attn); }
button.status { cursor: pointer; } button.status:hover { background: #FAEDDA; }
.status.swap { animation: swap 260ms var(--ease); }
@keyframes swap { from { opacity: .25; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 3px 0 8px; border-radius: 6px; background: var(--fill); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.chip.mono { font-family: var(--mono); letter-spacing: 0; }
.chip.plain { padding: 0 8px; }
.chip button.ghost.icon { width: 22px; height: 22px; border-radius: 4px; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 11.5px; font-weight: 500; color: var(--ink-2); flex: none; }
.wants { font-size: 12px; color: var(--ink-3); flex: none; }
/* kind markers: 6px shapes, never pills */
.mk { display: inline-block; width: 6px; height: 6px; flex: none; background: currentColor; }
.mk.dot { border-radius: 50%; } .mk.square { border-radius: 1.5px; } .mk.diamond { border-radius: 1px; transform: rotate(45deg) scale(.92); }
.mk.ring { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

/* ---------- avatars: role initial on a quiet tint ---------- */
.av { width: var(--av); height: var(--av); border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 12px; font-weight: 600; letter-spacing: 0; user-select: none; line-height: 1; }
.av.sm { width: 24px; height: 24px; font-size: 11px; }
.av.t0 { background: #E6EAF2; color: #3C4E73; } .av.t1 { background: #E3EDE6; color: #3B6150; } .av.t2 { background: #ECE4EE; color: #6A4A72; }
.av.t3 { background: #F1E6DE; color: #8A4F2E; } .av.t4 { background: #F1EAD7; color: #7A5F1E; }
.av.human { background: var(--ink); color: #fff; font-size: 11.5px; }
.av.empty { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-4); }
.av.left { filter: grayscale(1); opacity: .5; }
.av.more { background: var(--fill-2); color: var(--ink-2); font-size: 10.5px; }
.stack { display: inline-flex; align-items: center; }
.stack .av { box-shadow: 0 0 0 2px #fff; }
.stack .av + .av { margin-left: -4px; }

/* ---------- top bar ---------- */
header.top { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 20px 0 24px; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { width: 24px; height: 24px; border-radius: 7px; background: var(--ink); display: grid; place-items: center; color: #fff; }
.crumb { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.crumb:hover { color: var(--ink); text-decoration: none; }
.crumb .ic { display: none; }
.slash { color: var(--ink-4); margin: 0 4px; }
header.top h1 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: 4px; }
header.top .actions { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------- home ---------- */
main.home { flex: 1; overflow-y: auto; }
.home-inner { max-width: 820px; margin: 0 auto; padding: 48px var(--gutter) 96px; }
.home-intro h1 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -.028em; }
.home-intro p { margin-top: 6px; color: var(--ink-2); font-size: 15px; max-width: 560px; }
.sec-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
section.needs { margin-top: 32px; }
section.needs .sec-title { margin-bottom: 10px; }
.need-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; background: var(--attn-soft); color: var(--ink); margin-bottom: 8px; transition: background-color 120ms; }
.need-row:hover { text-decoration: none; background: #FAEDDA; }
.need-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.need-row .sub { font-size: 12.5px; font-weight: 500; color: var(--attn); white-space: nowrap; }
.need-row .ic { color: var(--attn); }
.list-head { display: flex; align-items: center; margin: 36px 0 6px; }
.proj-list { }
.proj-row { position: relative; display: grid; grid-template-columns: 64px minmax(0,1fr) auto 84px; align-items: center; gap: 16px; padding: 14px 12px; margin: 0 -12px; border-radius: 8px; color: inherit; transition: background-color 120ms; }
.proj-row + .proj-row::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--line); transition: opacity 120ms; }
.proj-row:hover::before, .proj-row:hover + .proj-row::before { opacity: 0; }
.proj-row:hover { background: var(--paper); text-decoration: none; }
.proj-row .title { font-size: 15px; line-height: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-row .meta { font-size: 13px; color: var(--ink-3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-row .when { font-size: 12.5px; color: var(--ink-3); text-align: right; white-space: nowrap; }
.proj-row.closed .title { color: var(--ink-2); font-weight: 500; }
.proj-row .status { justify-self: end; }
.proj-row .nobody { width: 24px; height: 24px; border-radius: 50%; border: 1px dashed var(--line-2); }
.empty-state { max-width: 540px; margin: 72px auto; }
.empty-state h2 { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -.028em; margin-bottom: 10px; }
.empty-state p { color: var(--ink-2); font-size: 15px; margin-bottom: 24px; }
.empty-state ol { list-style: none; counter-reset: step; padding: 0; margin: 0 0 28px; }
.empty-state li { counter-increment: step; display: flex; gap: 14px; align-items: baseline; padding: 12px 0; box-shadow: 0 -1px 0 var(--line); font-size: 15px; }
.empty-state li:last-child { box-shadow: 0 -1px 0 var(--line), 0 1px 0 var(--line); }
.empty-state li::before { content: counter(step); font-weight: 600; color: var(--ink-3); width: 14px; font-variant-numeric: tabular-nums; }
.empty-state .ctas { display: flex; gap: 18px; align-items: center; }
.empty { color: var(--ink-3); font-size: 13px; }

/* ---------- overlays ---------- */
#layer, #toasts { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
#toasts { inset: auto 0 22px 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.overlay { position: absolute; inset: 0; pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(29,28,26,.28); opacity: 0; transition: opacity 240ms var(--ease); }
.overlay.in .scrim { opacity: 1; }
.dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -48%) scale(.985); width: min(420px, calc(100vw - 32px)); max-height: 88vh; overflow: auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: 22px 24px 18px; opacity: 0; transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
.dialog.lg { width: min(680px, calc(100vw - 32px)); padding: 24px 26px 20px; }
.overlay.in .dialog { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dialog h2 { font-size: 18px; line-height: 26px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 4px; }
.dialog-body { color: var(--ink-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.dialog-actions button { height: 34px; padding: 0 14px; }
.dialog > form > input { margin-top: 12px; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--w), 100vw); background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(28px); opacity: 0; transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
.overlay.in .drawer { transform: none; opacity: 1; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 14px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 17px; line-height: 24px; font-weight: 600; letter-spacing: -.02em; }
.drawer-body { padding: 18px 24px 36px; overflow-y: auto; flex: 1; }
.menu { position: absolute; z-index: 60; min-width: 210px; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); padding: 6px; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity 140ms var(--ease), transform 140ms var(--ease); }
.menu.in { opacity: 1; transform: none; }
.menu-item { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; font-size: 13px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 16px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
.toast.in { opacity: 1; transform: none; }
.toast.error { box-shadow: inset 3px 0 0 #F2766B, var(--shadow); }
.toast button { color: #fff; }

/* ---------- project ---------- */
.proj { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); grid-template-rows: minmax(0, 1fr); flex: 1; min-height: 0; }
.proj main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--sheet); }
.feed-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 28px var(--gutter) 28px; }
.feed-inner { max-width: var(--col); margin: 0 auto; }
.notice { display: flex; align-items: center; gap: 10px; max-width: var(--col); margin: 0 auto 16px; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--attn-soft); color: var(--attn); font-size: 13.5px; }
.notice .actions { margin-left: auto; display: flex; gap: 8px; }
.notice.in { animation: drop 240ms var(--ease); }
@keyframes drop { from { opacity: .3; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.brief-card { margin: 0 0 20px; padding: 14px 16px 12px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.brief-card .card-head { display: flex; align-items: center; gap: 4px; margin-bottom: 2px; }
.brief-card .card-head h3 { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-right: auto; }
.brief-body { position: relative; overflow: hidden; max-height: 140px; transition: max-height 300ms var(--ease); }
.brief-card.open .brief-body { max-height: 4000px; }
.brief-card:not(.open) .brief-body.clipped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.brief { font-size: 14.5px; line-height: 23px; }
.brief h4 { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin: 10px 0 1px; }
.brief h4:first-child { margin-top: 2px; }
.brief p { margin: 1px 0; white-space: pre-wrap; }
.brief ul, .brief ol { margin: 2px 0 4px 18px; padding: 0; }
.brief li { margin: 1px 0; } .brief li::marker { color: var(--ink-4); }
.ghost-line { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; padding: 6px 0 6px 11px; }
.ghost-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--attn-dot); animation: blink 1.4s var(--ease-io) infinite; flex: none; margin-right: 13px; }
/* entries */
.entry { display: grid; grid-template-columns: var(--av) minmax(0, 1fr); column-gap: 12px; position: relative; }
.msg { padding: 10px 0; }
.msg.cont { padding-top: 0; margin-top: -6px; }
.msg > .av { margin-top: 2px; }
.msg .head { display: flex; align-items: center; gap: 8px; min-height: 22px; min-width: 0; }
.msg .head > * { flex: none; }
.msg .name { font-size: 14px; font-weight: 600; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .meta { font-size: 13px; color: var(--ink-3); flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.kind .mk { color: var(--ink-3); }
.k-decision .kind { color: var(--ink); font-weight: 600; } .k-decision .kind .mk { color: var(--ink); }
.k-done .kind { color: var(--ok); font-weight: 600; } .k-done .kind .mk { color: var(--ok); }
.k-question .kind .mk { color: var(--accent); }
.ask .kind { color: var(--attn); font-weight: 600; } .ask .kind .mk { color: var(--attn-dot); }
.k-blocked .kind { color: var(--danger); font-weight: 600; } .k-blocked .kind .mk { color: var(--danger); }
.replylink { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-3); }
.replylink:hover { color: var(--accent); text-decoration: none; }
.msg .time { margin-left: auto; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; cursor: pointer; }
.msg .time:hover { color: var(--accent); }
.msg .text { margin-top: 2px; font-size: 15px; line-height: 24px; color: var(--ink); white-space: pre-wrap; }
.msg .tools { margin-top: 8px; display: flex; gap: 6px; }
.msg.note > .content { background: var(--paper); border-radius: 10px; padding: 10px 14px 12px; }
.msg.ask > .content { background: var(--attn-soft); border-radius: 10px; padding: 10px 14px 12px; }
.msg.note code, .msg.ask code { background: #fff; }
.mention { color: var(--accent); font-weight: 500; }
.mention.me { color: var(--attn); background: var(--attn-soft); border-radius: 4px; padding: 0 3px; }
.msg.ask .mention.me { background: #fff; }
.ev { padding: 4px 0; align-items: start; }
.ev .node { height: 20px; display: grid; place-items: center; }
.ev .node i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.ev-join .node i, .ev-rejoin .node i { box-shadow: inset 0 0 0 1.5px var(--ok); }
.ev .evt { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-size: 13px; line-height: 20px; color: var(--ink-3); min-width: 0; }
.ev .evt .line { flex: 1; min-width: 0; }
.ev .evt b { font-weight: 500; color: var(--ink-2); }
.ev .evt code { font-size: 12px; }
.ev .time { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-left: auto; }
.ev .where { font-size: 12px; color: var(--ink-4); margin-left: 6px; }
.ev .intro { flex-basis: 100%; color: var(--ink-3); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev .intro.open { display: block; }
.ev .intro-more { font-size: 12px; font-weight: 500; color: var(--accent); }
.moment { display: flex; align-items: center; gap: 14px; margin: 22px 0 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.moment::before, .moment::after { content: ""; flex: 1; height: 1px; background: var(--line); transform-origin: center; }
.moment .time { font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 8px; font-variant-numeric: tabular-nums; }
.moment.finished { color: var(--attn); }
.moment.in::before, .moment.in::after { animation: draw 360ms var(--ease); }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.entry.in { animation: rise 220ms var(--ease); }
@keyframes rise { from { opacity: .3; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.entry.flash > .content { animation: flash 1600ms var(--ease-io); }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 4px var(--attn-line); } 100% { box-shadow: 0 0 0 4px rgba(241,221,192,0); } }
.entry.target > .content, .entry.target > .evt { border-radius: 10px; animation: target 1600ms var(--ease-io); }
@keyframes target { 0%, 50% { box-shadow: 0 0 0 3px rgba(49,73,194,.28); } 100% { box-shadow: 0 0 0 3px rgba(49,73,194,0); } }
.jump { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow); transition: opacity 180ms var(--ease), transform 180ms var(--ease); z-index: 3; }
.jump.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
/* dock: the composer, or the review card while the result waits for the human */
.dock { position: relative; padding: 0 var(--gutter) 20px; background: var(--sheet); flex: none; }
.dock::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(rgba(255,255,255,0), #fff); pointer-events: none; }
.box, .review, .closed-note { max-width: var(--col); margin: 0 auto; }
.box { position: relative; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); transition: box-shadow 140ms; }
.box:focus-within { box-shadow: inset 0 0 0 1px #A9B4E4, 0 0 0 3px var(--accent-soft), var(--shadow); }
.band { display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 14px; background: var(--attn-soft); border-radius: 10px 10px 0 0; box-shadow: inset 0 -1px 0 var(--attn-line); font-size: 13.5px; color: var(--ink-2); }
.band .mk { color: var(--attn-dot); }
.band .q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band .q b { color: var(--ink); font-weight: 600; }
.band .pager { font-size: 12px; color: var(--attn); font-variant-numeric: tabular-nums; }
.band.in { animation: band-in 260ms var(--ease); }
@keyframes band-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.box .inner { padding: 10px 10px 8px 14px; }
.box textarea { box-shadow: none !important; border-radius: 0; padding: 0; resize: none; min-height: 48px; max-height: 240px; background: transparent; font-size: 15px; line-height: 24px; }
.bar { display: flex; align-items: center; gap: 2px; margin-top: 6px; }
.tool { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 8px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background-color 120ms, color 120ms; }
.tool:first-child { margin-left: -6px; }
.tool:hover, .tool.on { background: var(--fill); color: var(--ink); }
.tool.set { color: var(--ink); }
.replychip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 3px 0 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; margin-bottom: 6px; }
.replychip button { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; }
.replychip button:hover { background: rgba(49,73,194,.12); }
.live { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px 0 auto; font-size: 12px; color: var(--ink-3); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); transition: background-color 240ms; }
.live.on i { background: var(--ok); } .live.wait i { background: var(--attn-dot); }
.send { height: 30px; padding: 0 12px; }
.closed-note { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 13.5px; padding: 10px 10px 10px 14px; border-radius: 10px; background: var(--paper); }
.closed-note button { margin-left: auto; }
.review { border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); padding: 14px 16px; }
.review .kicker { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--attn); }
.review .kicker .mk { color: var(--attn-dot); }
.review h3 { font-size: 17px; line-height: 25px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.review .text { margin-top: 6px; font-size: 15px; line-height: 24px; white-space: pre-wrap; }
.review .text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.review .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.review .rv-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.review.in { animation: rise 280ms var(--ease); }
.pop-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 10; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); padding: 6px; animation: menu-in 140ms var(--ease); }
@keyframes menu-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.at-menu { min-width: 230px; padding: 4px; }
.at-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 5px 8px; border-radius: 6px; font-size: 13px; font-weight: 500; }
.at-menu button.on, .at-menu button:hover { background: var(--fill); }
.at-menu .av { width: 22px; height: 22px; font-size: 10px; }
.at-menu .role { margin-left: auto; font-size: 12px; color: var(--ink-3); font-weight: 400; }
/* side panel */
.proj aside { background: var(--paper); border-left: 1px solid var(--line); overflow-y: auto; min-height: 0; padding: 20px; }
.psec + .psec { margin-top: 26px; }
.psec-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.psec-head h3 { font-size: 13px; font-weight: 600; }
.psec-head .n { margin-left: auto; font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.member { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 8px; margin: 0 -8px; border-radius: 6px; transition: background-color 120ms; }
.member:hover { background: var(--fill-2); }
.member .who { min-width: 0; flex: 1; }
.member .nm { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; min-width: 0; }
.member .nm > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .presence { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; transition: background-color 240ms, box-shadow 240ms; }
.member .presence.idle { background: var(--attn-dot); } .member .presence.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.member .rm { opacity: 0; transition: opacity 120ms; }
.member:hover .rm, .member:focus-within .rm { opacity: 1; }
.member.unfilled .nm { color: var(--ink-2); font-weight: 500; }
.member.gone .who { opacity: .75; }
.member.filled-now { animation: fill-in 520ms var(--ease); }
@keyframes fill-in { from { background-color: var(--ok-soft); } to { background-color: transparent; } }
.also { margin: 10px 0 2px; font-size: 12.5px; font-weight: 500; color: var(--ink-3); }
.board-item { display: block; padding: 7px 8px; margin: 0 -8px; border-radius: 6px; color: inherit; transition: background-color 120ms; }
.board-item:hover { background: var(--fill-2); text-decoration: none; }
.bi-head { display: flex; align-items: center; gap: 7px; }
.bi-head .mk { color: var(--ink-3); }
.bi-head .nm { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.bi-head .when { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.bi-text { font-size: 13px; line-height: 20px; color: var(--ink-2); margin-top: 1px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.board-item.you .mk { color: var(--attn-dot); } .board-item.blocked .mk { color: var(--danger); } .board-item.decision .mk { color: var(--ink); } .board-item.claim .mk { color: var(--ink-3); }
.empty-team { color: var(--ink-3); font-size: 13px; margin: 2px 0 6px; }
/* invite drawer */
.invite-intro { color: var(--ink-2); margin-bottom: 16px; }
.role-card { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px 16px; margin-bottom: 12px; transition: box-shadow 320ms, background-color 320ms; }
.role-card .rc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.role-card .rc-head .nm { font-weight: 600; }
.role-card .about { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.snippet { background: var(--paper); border-radius: 6px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; letter-spacing: 0; white-space: pre-wrap; word-break: break-word; user-select: all; color: #3A3732; }
.rc-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.waiting { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.waiting i { width: 6px; height: 6px; border-radius: 50%; background: var(--attn-dot); animation: blink 1.6s var(--ease-io) infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.role-card.joined { box-shadow: inset 0 0 0 1px #BFDCC9; background: var(--ok-soft); color: var(--ok); }
.role-card.joined .joined-line { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.drawer .sep { height: 1px; background: var(--line); margin: 18px 0; }
.drawer h3 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.drawer .note { font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.drawer dl { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; margin: 0; }
.drawer dt { color: var(--ink-3); } .drawer dd { margin: 0; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-editor { font-family: var(--mono); font-size: 13px; letter-spacing: 0; min-height: 320px; }
.brief-drawer .brief h4 { font-size: 13.5px; color: var(--ink); margin-top: 16px; }
/* create dialog */
.create { display: flex; flex-direction: column; gap: 16px; }
.create .step { display: flex; flex-direction: column; gap: 16px; }
.create .step.out { animation: slide-out 220ms var(--ease-io) both; } .create .step.enter { animation: slide-in 240ms var(--ease-io) both; }
@keyframes slide-out { to { opacity: 0; transform: translateX(-20px); } } @keyframes slide-in { from { opacity: 0; transform: translateX(20px); } }
.radio { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-4); display: inline-grid; place-items: center; transition: box-shadow 120ms; }
.radio.on { box-shadow: inset 0 0 0 1.5px var(--ink); } .radio.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.create .foot { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.create .foot button { height: 34px; padding: 0 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* skeleton */
.sk-bar { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--fill) 25%, #FAF9F7 50%, var(--fill) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-lines { display: flex; flex-direction: column; gap: 14px; padding: 28px 32px 0; max-width: 720px; margin: 0 auto; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- top nav ---------- */
.nav { display: flex; gap: 2px; margin-left: 14px; }
.nav a { height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 6px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); }
.nav a:hover { color: var(--ink); background: var(--fill); text-decoration: none; }
.nav a.on { color: var(--ink); background: var(--fill-2); }
.menu-item { display: flex; align-items: center; gap: 8px; }
.dialog.md { width: min(520px, calc(100vw - 32px)); }
.dialog-body.intro { margin-bottom: 18px; }
.shake { animation: shake 360ms var(--ease-io); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; padding: 0; box-shadow: none; accent-color: var(--ink); }
.field .hint.bad { color: var(--danger); }
.id { font-family: var(--mono); font-size: 12px; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.agent { font-size: 12px; color: var(--ink-3); white-space: nowrap; flex: none; }
.from { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
/* team editor (create dialog) */
 .add-member { align-self: flex-start; margin: 4px 0 0 -8px; }
.add-member { margin-top: 6px; }
/* where the work happens */
.where-box { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 10px; background: var(--paper); }
.repo-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); margin: 0 0 6px; min-width: 0; }
.repo-line a, .repo-line .mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo-line .mono { font-size: 12px; }
.repo-line .to { color: var(--ink-4); }
/* role editor */
.role-editor { display: flex; flex-direction: column; gap: 14px; }
.role-editor textarea { min-height: 72px; }
/* preset picker */
.picker .dialog-body { margin-bottom: 12px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px var(--accent-soft); }
.search input, .dialog .search input { box-shadow: none !important; padding: 8px 0; margin: 0; }
.pick-list { margin: 10px -6px 0; max-height: min(52vh, 460px); overflow-y: auto; padding: 0 6px; }
.pick-group { font-size: 12px; font-weight: 600; color: var(--ink-3); margin: 12px 0 4px 8px; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 8px; transition: background-color 100ms; }
.pick-row:hover, .pick-row:focus-visible { background: var(--fill); outline: none; }
.pr-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pr-line { display: flex; align-items: baseline; gap: 7px; }
.pick-row .nm { font-weight: 600; font-size: 13.5px; }
.pick-row .about { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-empty { font-size: 12.5px; color: var(--ink-3); margin: 2px 8px 6px; }
/* role sheet (drawer) */
.role-sheet .rs-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rs-about { font-size: 15px; line-height: 23px; margin-bottom: 8px; }
.role-sheet .from { margin-bottom: 4px; }
.rs-secs { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.rs-sec h4 { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 2px; }
.rs-hint { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.rs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.p-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.p-line .who { flex: 1; min-width: 0; }
.p-line .nm { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.p-line .sub { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-line .presence { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.p-line .presence.idle { background: var(--attn-dot); } .p-line .presence.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.member.clickable { cursor: pointer; }
.role-card .rc-head .id { margin-right: auto; }
/* brief drawer */
.bd-tools { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.bd-form { display: flex; flex-direction: column; gap: 16px; }
.bd-foot { display: flex; justify-content: flex-end; gap: 8px; }
/* presets page */
/* settings */
.settings { display: flex; flex-direction: column; gap: 22px; margin-top: 10px; }
.settings h3 { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.settings .hint { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; line-height: 18px; }
.settings .inline { display: flex; gap: 8px; }
.settings .inline input { margin: 0; }
.settings input { margin-top: 0; }

/* ---------- responsive ---------- */
.mobile-only { display: none !important; }
.sheet-scrim { position: fixed; inset: 0; background: rgba(29,28,26,.28); z-index: 39; }
@media (max-width: 1100px) { :root { --panel-w: 270px; --gutter: 24px; } }
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  header.top { padding: 0 12px 0 10px; gap: 8px; }
  header.top h1 { font-size: 16px; }
  .crumb .label, .slash { display: none; }
  .crumb .ic { display: inline-flex; padding: 6px; }
  .proj { grid-template-columns: 1fr; }
  .proj aside { position: fixed; left: 0; right: 0; bottom: 0; height: 64vh; border-left: 0; border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg); transform: translateY(102%); transition: transform 260ms var(--ease); z-index: 40; padding-top: 10px; }
  .proj aside.open { transform: none; }
  .proj aside::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 14px; }
  .mobile-only { display: inline-flex !important; }
  .desktop-only { display: none !important; }
  header.top .actions { gap: 4px; }
  .feed { padding: 18px var(--gutter) 20px; }
  .dock { padding: 0 var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
  .review .rv-foot { flex-wrap: wrap; } .review .rv-foot button { flex: 1; }
  .band .q { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .proj-row { grid-template-columns: 52px minmax(0,1fr) auto; } .proj-row .when { display: none; }
  .need-row { grid-template-columns: auto minmax(0,1fr) auto; } .need-row .sub { display: none; }
  .home-inner { padding: 28px var(--gutter) 96px; }
  .dialog, .dialog.lg { width: 100vw; height: 100%; max-height: none; border-radius: 0; top: 0; left: 0; transform: none; }
  .overlay.in .dialog { transform: none; }
  .drawer { width: 100vw; }
  button.compact { height: 36px; }
  .nav { margin-left: 4px; } .nav a { padding: 0 8px; }
  header.top .actions .primary .label, .brand-name { display: none; }
  header.top .actions .primary { width: 32px; padding: 0; }
  .role-editor .two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
/* quick start + runner */
.quick { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.quick-ta { font-size: 15.5px; line-height: 25px; min-height: 120px; padding: 12px 14px; resize: none; }
.quick-row { display: flex; }
.repo-toggle { margin-left: -8px; }
.quick-hint { font-size: 12.5px; color: var(--ink-3); line-height: 18px; }
.quick .foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.quick .foot .ghost { margin-left: -12px; }
.starting { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; flex: none; }
.starting i { width: 6px; height: 6px; border-radius: 50%; background: var(--attn-dot); animation: blink 1.4s var(--ease-io) infinite; }
.member.failed .sub { color: var(--danger); }
.agents-grid { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.agents-grid .lbl { color: var(--ink-2); }
.agents-grid .segmented { justify-self: start; }
/* result files */
.board-item.file .bi-head .ic { color: var(--ink-3); }
.board-item.file .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-files { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.rv-files .lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-right: 2px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 500; transition: background-color 120ms; }
.file-chip:hover { background: var(--fill); }
.file-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.file-tools { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.file-view img { max-width: 100%; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--line); }
.file-view pre { margin: 0; max-height: none; }
.rv-repo { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* markdown extras in briefs, role cards and result files */
.brief .tbl { overflow-x: auto; margin: 8px 0 10px; }
.brief table { border-collapse: collapse; font-size: 13.5px; line-height: 20px; min-width: 60%; }
.brief th, .brief td { text-align: left; vertical-align: top; padding: 6px 10px; box-shadow: inset 0 -1px 0 var(--line); }
.brief th { font-weight: 600; color: var(--ink-2); background: var(--paper); }
.brief blockquote { margin: 4px 0; padding: 2px 0 2px 12px; box-shadow: inset 2px 0 0 var(--line-2); color: var(--ink-2); white-space: pre-wrap; }
.brief hr { border: 0; height: 1px; background: var(--line); margin: 14px 0; }
.file-view .brief h4.h1 { font-size: 20px; line-height: 28px; color: var(--ink); margin: 4px 0 8px; }
.file-view .brief h4.h2 { font-size: 16px; line-height: 24px; color: var(--ink); margin: 18px 0 6px; }
.file-view .brief h4.h3, .file-view .brief h4.h4 { font-size: 14px; color: var(--ink); margin: 14px 0 4px; }
.file-view .brief { font-size: 15px; line-height: 25px; }
.proj-row .meta.last b { font-weight: 500; color: var(--ink-2); }
.html-preview { width: 100%; height: 70vh; border: 0; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); background: #fff; margin-top: 10px; }
.file-view .segmented { margin-bottom: 2px; }

/* ---------- hosted: links that look like buttons, the account menu ---------- */
a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 500; line-height: 1; color: var(--ink-2); text-decoration: none; transition: background-color 120ms, color 120ms; }
a.btn:hover { background: var(--fill); color: var(--ink); text-decoration: none; }
a.btn.icon { width: 32px; padding: 0; } a.btn.on { background: var(--fill); color: var(--ink); }
a.btn.secondary { background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); } a.btn.secondary:hover { background: var(--paper); }
a.btn.tall { height: 34px; padding: 0 14px; }
button.account .av { width: 24px; height: 24px; font-size: 11px; }
.menu-info { padding: 6px 10px 4px; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; }
.menu-info span { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.ghost-link { font-size: 13px; }

/* ---------- where agents run ---------- */
.placement { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 2px; }
.pl-note { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; background: var(--attn-soft); box-shadow: inset 0 0 0 1px var(--attn-line); font-size: 13px; color: var(--attn); }
.pl-note span { flex: 1; }

/* ---------- connecting a computer ---------- */
.pair .steps { list-style: none; counter-reset: step; padding: 0; margin: 4px 0 14px; }
.pair .steps li { counter-increment: step; position: relative; padding: 0 0 14px 30px; font-size: 14px; color: var(--ink); }
.pair .steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--fill); color: var(--ink-2); font-size: 12px; font-weight: 600; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.pair .snippet.big { margin-top: 8px; font-size: 13px; padding: 12px 14px; }
.pair .rc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.pair-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; background: var(--paper); font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.pair-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--attn-dot); animation: blink 1.4s var(--ease-io) infinite; }
.pair-status.done { background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.pair .hint { font-size: 12.5px; color: var(--ink-3); }

/* ---------- settings page ---------- */
.settings-page .card { margin-top: 22px; padding: 20px 22px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.settings-page .card .list-head { margin: 0 0 4px; }
.settings-page .card h3 { font-size: 13.5px; font-weight: 600; margin: 18px 0 2px; }
.settings-page .hint { font-size: 12.5px; color: var(--ink-3); line-height: 18px; margin: 2px 0 10px; }
.settings-page .inline { display: flex; gap: 8px; }
.settings-page .card-foot { display: flex; justify-content: flex-end; margin-top: 16px; }
.machine-list { display: flex; flex-direction: column; }
.machine { display: flex; align-items: center; gap: 12px; padding: 10px 0; box-shadow: 0 -1px 0 var(--line); }
.machine:first-child { box-shadow: none; }
.machine .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.machine.on .dot { background: var(--ok); }
.machine .who { flex: 1; min-width: 0; }
.machine .nm { font-weight: 600; font-size: 13.5px; display: flex; gap: 8px; align-items: baseline; }
.machine .nm .faint { font-weight: 400; font-size: 12px; }
.machine .sub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.agent-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.agent-chips .chip { height: 20px; font-size: 11.5px; }
.chip.warn { background: var(--attn-soft); color: var(--attn); }

/* ---------- login / connect ---------- */
.auth { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 96px; background: var(--paper); }
.auth-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 20px; }
.auth-brand .brand-name { display: inline !important; }
.auth-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); padding: 28px 26px; }
.auth-card h1 { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.024em; }
.auth-card .sub { color: var(--ink-2); font-size: 14px; margin: 6px 0 18px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input { height: 40px; }
.auth-form button { width: 100%; height: 40px; }
.auth-card .google { width: 100%; height: 40px; }
.gmark { display: inline-flex; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-4); font-size: 12px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
input.otp { font-family: var(--mono); font-size: 20px; letter-spacing: .35em; text-align: center; height: 48px !important; }
input.otp.code { letter-spacing: .2em; }
.auth-err { color: var(--danger); font-size: 13px; margin-top: 10px; }
.auth-card .hint { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.auth-links { display: flex; justify-content: space-between; margin: 10px -10px 0; }
.auth-done { width: 44px; height: 44px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 14px; }
.auth-card a.btn { margin-top: 16px; }

/* ---------- run states, attachments ---------- */
.starting.wait i { background: var(--ink-4); animation: none; }
.starting.warn { color: var(--attn); } .starting.warn i { animation: none; }
.run-note { margin: 12px 0 4px; padding: 10px 12px; border-radius: 8px; background: var(--paper); font-size: 13px; color: var(--ink-2); }
.run-note .rn-head { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.run-note .rn-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--attn-dot); }
.run-note.fail .rn-head i { background: var(--danger); } .run-note.wait .rn-head i { background: var(--ink-4); }
.run-note.login { background: var(--attn-soft); }
.run-note p { margin-top: 6px; line-height: 19px; }
.run-note details { margin-top: 6px; } .run-note summary { cursor: pointer; color: var(--ink-3); font-size: 12.5px; }
.run-note pre { max-height: 220px; overflow: auto; font-size: 11.5px; background: #fff; }
.dock.drop .box { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-soft); }
input.otp::placeholder { font-family: var(--sans); font-size: 15px; letter-spacing: 0; }
.member.needs .sub { color: var(--attn); }
.machine .role-sel { width: auto; height: 28px; padding: 0 8px; font-size: 12.5px; }
.machine .av { flex: none; }
.auth-card .join-org { width: 100%; height: 40px; margin-bottom: 8px; }
.machine .share { margin: 0; font-size: 12.5px; white-space: nowrap; }
.member .place { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* where a project runs (create dialog, move dialog) */
.pl-note:empty { display: none; }
.placement .field { margin-bottom: 8px; }
/* preset picker: the organization's presets can be edited and deleted in place */
.pick-line { display: flex; align-items: center; gap: 2px; }
.pick-line .pick-row { flex: 1; min-width: 0; }
/* settings: what most people never need */
details.advanced { margin-top: 18px; }
details.advanced summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
details.advanced[open] summary { margin-bottom: 8px; }
/* a result file named in a message opens it */
code.file-ref { cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
code.file-ref:hover { text-decoration-color: currentColor; }
