/* Box — modeled on the Claude mobile app */
:root {
  --bg: #151515;
  --bg-side: #111111;
  --bg-input: #0f0f0f;
  --bg-pop: #0d0d0d;
  --surface: #20201f;
  --surface-2: #2a2a29;
  --surface-3: #333331;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f9f9f7;
  --text-2: #a3a29c;
  --text-3: #75746f;
  --accent: #d97757;
  --accent-press: #c4673f;
  --blue: #5b9bff;
  --red: #ef6461;
  --green: #5fb98a;
  --user-bubble: #2b2a28;
  --scrim: rgba(0, 0, 0, 0.55);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --sab: env(safe-area-inset-bottom, 0px);
  --sat: env(safe-area-inset-top, 0px);
  --side-w: min(84vw, 330px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf9f5;
  --bg-side: #f2f0e9;
  --bg-input: #ffffff;
  --bg-pop: #ffffff;
  --surface: #efede6;
  --surface-2: #e6e3da;
  --surface-3: #dcd9cf;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --text: #141413;
  --text-2: #6b6a65;
  --text-3: #9a9890;
  --user-bubble: #efece4;
  --scrim: rgba(0, 0, 0, 0.3);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; touch-action: manipulation; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
svg { display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
svg { width: 22px; height: 22px; flex: none; }

/* ---------- Buttons ---------- */
.circle-btn {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); background: transparent; color: var(--text);
  transition: background 0.15s, transform 0.1s;
}
.circle-btn:active { background: var(--surface-2); transform: scale(0.96); }
.circle-btn.ghost { width: 38px; height: 38px; }
.circle-btn.ghost svg { width: 20px; height: 20px; }
.circle-btn.filled { background: var(--surface-2); border-color: transparent; width: 40px; height: 40px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text); transition: background 0.15s;
}
.icon-btn:active { background: var(--surface-2); }
.send-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; transition: transform 0.1s, background 0.15s;
}
.send-btn:active { background: var(--accent-press); transform: scale(0.94); }
.send-btn svg { width: 20px; height: 20px; stroke-width: 2.4; }
.stop-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--text); color: var(--bg);
}
.stop-btn:active { transform: scale(0.94); }
.pill-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: var(--surface-2); font-weight: 600; font-size: 16px;
}
.pill-btn svg { width: 20px; height: 20px; }
.pill-btn:active { background: var(--surface-3); }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 13.5px; color: var(--text-2); white-space: nowrap;
}
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn:active { background: var(--surface-2); }

/* ---------- Sidebar ---------- */
#sidebar {
  position: fixed; top: 0; left: 0; height: var(--app-h, 100%); width: var(--side-w); z-index: 1;
  background: var(--bg-side); display: flex; flex-direction: column;
  padding-top: calc(10px + var(--sat));
}
.sb-top { padding: 12px 22px 10px; }
.sb-brand {
  font-family: var(--serif); font-size: 27px; font-weight: 500; letter-spacing: -0.3px;
  display: flex; align-items: center; gap: 9px; color: var(--text);
}
.sb-mark { color: var(--accent); }
.sb-mark svg { width: 24px; height: 24px; }
.sb-nav { padding: 6px 10px 4px; display: flex; flex-direction: column; }
.sb-link {
  display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 14px;
  font-size: 17.5px; text-align: left;
}
.sb-link svg { width: 24px; height: 24px; stroke-width: 1.6; }
.sb-link:active { background: var(--surface-2); }
.sb-label { padding: 18px 24px 6px; font-size: 15px; color: var(--text-2); }
.sb-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; -webkit-overflow-scrolling: touch; }
.sb-item {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px;
  font-size: 17px; text-align: left;
}
.sb-item:active { background: var(--surface-2); }
.sb-item.active { background: var(--surface-2); }
.sb-item .sb-ico { color: var(--text-2); flex: none; }
.sb-item .sb-ico svg { width: 22px; height: 22px; stroke-width: 1.6; }
.sb-item .sb-ico.running { color: var(--accent); }
.sb-item .sb-ico.running svg { animation: brew 2.4s ease-in-out infinite; }
.sb-item .sb-ico.error { color: var(--red); }
.sb-item-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-empty { padding: 8px 24px; color: var(--text-3); font-size: 14.5px; }
.sb-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px calc(14px + var(--sab));
}
.avatar-btn {
  width: 46px; height: 46px; border-radius: 50%; background: var(--text); color: var(--bg);
  font-weight: 700; font-size: 18px; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Main panel (slides aside for the sidebar on phones) ---------- */
#main {
  position: fixed; top: 0; left: 0; right: 0; height: var(--app-h, 100%); z-index: 2; background: var(--bg);
  display: flex; flex-direction: column;
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.34s;
  will-change: transform;
}
body.drawer-open #main {
  transform: translateX(var(--side-w)); border-radius: 30px; overflow: hidden;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
}
#scrim {
  position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
body.drawer-open #scrim { opacity: 1; pointer-events: auto; }

/* ---------- Top bar ---------- */
#topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--sat)) 14px 8px;
  background: linear-gradient(var(--bg) 70%, transparent);
  position: relative; z-index: 5;
}
#menu-btn { position: relative; }
#menu-dot {
  position: absolute; top: 9px; right: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}
.top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 2px 4px; }
#title-text {
  max-width: 100%; font-weight: 650; font-size: 16.5px; letter-spacing: -0.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#subtitle-text {
  max-width: 100%; font-size: 13px; color: var(--text-2); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#subtitle-text:empty { display: none; }

/* ---------- Thread ---------- */
#thread {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 6px 0 24px;
}
#messages, #welcome { max-width: 760px; margin: 0 auto; padding: 0 18px; }
#welcome { min-height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-bottom: 40px; }
.welcome-mark { color: var(--accent); margin-bottom: 18px; }
.welcome-mark svg { width: 46px; height: 46px; animation: brew 6s ease-in-out infinite; }
#greeting { font-family: var(--serif); font-weight: 400; font-size: 34px; letter-spacing: -0.4px; line-height: 1.15; }
.welcome-sub { color: var(--text-2); font-size: 15.5px; line-height: 1.5; margin: 12px auto 22px; max-width: 330px; }
.suggestions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; }
.suggestion {
  text-align: left; padding: 13px 16px; border-radius: 16px; border: 1px solid var(--line);
  color: var(--text-2); font-size: 15px; line-height: 1.4; background: transparent;
}
.suggestion:active { background: var(--surface); }

/* User message */
.u-msg { display: flex; flex-direction: column; align-items: flex-end; margin: 18px 0 22px; }
.u-bubble {
  max-width: 86%; background: var(--user-bubble); border-radius: 22px; padding: 11px 16px;
  font-size: 16.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
.u-label { font-size: 12.5px; color: var(--text-3); margin: 0 6px 5px; }

/* Attachments (in messages and in the composer) */
.att-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 8px; max-width: 86%; }
.att-img {
  width: 112px; height: 112px; border-radius: 16px; object-fit: cover; background: var(--surface);
  border: 1px solid var(--line); cursor: zoom-in;
}
.att-file {
  color: inherit; text-decoration: none;
  display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 9px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); max-width: 240px; text-align: left;
}
.att-file .att-ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.att-file .att-ico svg { width: 20px; height: 20px; }
.att-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-meta { font-size: 12px; color: var(--text-2); }

/* Agent message */
.a-msg { margin: 6px 0 26px; }
.a-head { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.a-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--agent-color, var(--line-strong));
}
.a-name { font-weight: 650; font-size: 15px; color: var(--agent-color, var(--text)); }
.a-kind { font-size: 13px; color: var(--text-3); }
.a-body { font-size: 16.5px; line-height: 1.62; overflow-wrap: anywhere; }
.a-more {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--text-2); font-size: 15px;
}
.a-more svg { width: 17px; height: 17px; transition: transform 0.2s; }
.a-more.open svg { transform: rotate(90deg); }
.a-full { margin-top: 12px; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.a-actions { display: flex; gap: 2px; margin-top: 10px; margin-left: -9px; color: var(--text-2); align-items: center; }
.a-actions .icon-btn { width: 36px; height: 36px; color: var(--text-2); }
.a-actions .icon-btn svg { width: 19px; height: 19px; }
.a-meta { font-size: 12.5px; color: var(--text-3); margin-left: 4px; }

.round-mark {
  text-align: center; color: var(--text-3); font-size: 12.5px; letter-spacing: 0.6px;
  text-transform: uppercase; margin: 26px 0 16px;
}

/* "Brewing" indicator while an agent thinks */
.brewing { display: flex; align-items: center; gap: 12px; margin: 6px 0 26px; }
.brew-mark { color: var(--accent); flex: none; }
.brew-mark svg { width: 26px; height: 26px; animation: brew 2.4s ease-in-out infinite; }
.shimmer {
  font-size: 15.5px; font-weight: 500;
  background: linear-gradient(90deg, var(--text-3) 0%, var(--text) 45%, var(--text-3) 90%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 2.2s linear infinite;
}
.brew-time { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Brief card (like a Claude artifact) */
.brief-card {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px; margin: 4px 0 26px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: left;
}
.brief-card:active { background: var(--surface-2); }
.brief-ico {
  width: 48px; height: 56px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex: none;
}
.brief-title { font-weight: 650; font-size: 16px; }
.brief-sub { font-size: 13.5px; color: var(--text-2); margin-top: 2px; }

.error-card {
  margin: 4px 0 26px; padding: 14px 16px; border-radius: 18px;
  background: rgba(239, 100, 97, 0.1); border: 1px solid rgba(239, 100, 97, 0.45);
  font-size: 15px; line-height: 1.5; overflow-wrap: anywhere;
}
.error-card strong { display: block; color: var(--red); margin-bottom: 4px; }

#jump-btn {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 12px; transform: translateX(-50%);
  background: var(--bg); z-index: 6; box-shadow: var(--shadow);
}

/* ---------- Dock / composer ---------- */
/* Sit low like the Claude app: the home indicator overlaps the composer's
   bottom padding instead of leaving a band of empty screen under it. */
#dock { padding: 0 12px max(10px, calc(var(--sab) - 12px)); position: relative; z-index: 5; }
#state-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#state-actions:empty { display: none; }
.state-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px;
  background: var(--surface-2); font-size: 14.5px; font-weight: 600;
}
.state-pill.primary { background: var(--accent); color: #fff; }
.state-pill svg { width: 17px; height: 17px; }
.state-pill:active { opacity: 0.85; }
#composer {
  max-width: 760px; margin: 0 auto; background: var(--bg-input);
  border: 1px solid var(--line-strong); border-radius: 28px; padding: 10px 10px 8px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.25);
}
#input {
  width: 100%; border: none; outline: none; background: transparent; resize: none;
  font-size: 17px; line-height: 1.45; padding: 6px 8px 4px; max-height: 190px; min-height: 34px;
}
#input::placeholder { color: var(--text-3); }
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.spacer { flex: 1; }
#wave { flex: 1; min-width: 0; height: 36px; }
#attach-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 4px 8px; scrollbar-width: none; }
#attach-strip::-webkit-scrollbar { display: none; }
.pending { position: relative; flex: none; }
.pending .att-img { width: 72px; height: 72px; border-radius: 14px; cursor: default; }
.pending .att-file { height: 72px; max-width: 200px; }
.pending-x {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--text); color: var(--bg); display: inline-flex; align-items: center; justify-content: center;
}
.pending-x svg { width: 13px; height: 13px; stroke-width: 3; }
.pending.uploading::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px; background: rgba(0,0,0,0.45);
}
.pending.uploading::before {
  content: ""; position: absolute; z-index: 1; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px;
  border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: spin 0.8s linear infinite;
}

/* ---------- Layers: sheets, popovers, dialogs ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 50; background: var(--scrim);
  display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s;
}
.backdrop.clear { background: transparent; animation: none; }
.sheet {
  width: 100%; max-height: 92dvh; background: var(--bg); border-radius: 30px 30px 0 0;
  display: flex; flex-direction: column; animation: up 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow); border: 1px solid var(--line); border-bottom: none;
}
.sheet.tall { height: 92dvh; }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: 0.6; margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; flex: none; }
.sheet-head .circle-btn { width: 42px; height: 42px; }
.sheet-title { flex: 1; text-align: center; font-weight: 650; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .head-spacer { width: 42px; flex: none; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 18px calc(22px + var(--sab)); }
.sheet-intro { color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin: 2px 2px 14px; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 14px; }
.tile {
  height: 104px; border-radius: 22px; background: var(--surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-size: 16.5px; font-weight: 550;
}
.tile svg { width: 26px; height: 26px; stroke-width: 1.6; }
.tile:active { background: var(--surface-2); }
.row {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px;
  background: var(--surface); margin-bottom: 10px; font-size: 16.5px; text-align: left;
}
.row:active { background: var(--surface-2); }
.row svg { width: 22px; height: 22px; stroke-width: 1.7; }
.row-label { flex: 1; min-width: 0; font-weight: 550; }
.row-value { color: var(--text-2); font-size: 15.5px; white-space: nowrap; }
.row-chev { color: var(--text-2); }
.row.check .row-value { color: var(--accent); }
.row-sub { display: block; font-size: 13.5px; color: var(--text-2); font-weight: 400; margin-top: 2px; line-height: 1.4; }
.row.danger { color: var(--red); }

.popover {
  position: fixed; z-index: 60; min-width: 250px; background: var(--bg-pop);
  border: 1px solid var(--line-strong); border-radius: 28px; padding: 8px; box-shadow: var(--shadow);
  animation: pop 0.18s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: top right;
}
.pop-item {
  width: 100%; display: flex; align-items: center; gap: 16px; padding: 13px 16px; border-radius: 18px;
  font-size: 17.5px; text-align: left;
}
.pop-item svg { width: 24px; height: 24px; stroke-width: 1.6; }
.pop-item:active { background: var(--surface-2); }
.pop-item.danger { color: var(--red); }
.pop-sep { height: 1px; background: var(--line); margin: 6px 12px; }

.dialog-wrap { align-items: center; padding: 20px; }
.dialog {
  width: 100%; max-width: 380px; background: var(--bg-pop); border: 1px solid var(--line-strong);
  border-radius: 26px; padding: 22px 20px 16px; box-shadow: var(--shadow); animation: pop 0.18s;
}
.dialog h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
.dialog p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
.dialog input {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: var(--bg-input); outline: none; font-size: 16.5px; margin-bottom: 16px;
}
.dialog input:focus { border-color: var(--accent); }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions button { flex: 1; height: 46px; border-radius: 999px; background: var(--surface-2); font-weight: 600; font-size: 16px; }
.dialog-actions .primary { background: var(--text); color: var(--bg); }
.dialog-actions .danger { background: var(--red); color: #fff; }

.lightbox {
  position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,0.92); display: flex;
  align-items: center; justify-content: center; padding: 20px; animation: fade 0.2s;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

#toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(120px + var(--sab)); z-index: 80;
  background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 550; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
  text-align: center; animation: fade 0.2s;
}

/* Agents sheet */
.ag-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 20px; background: var(--surface); margin-bottom: 10px; width: 100%; text-align: left; }
.ag-row.tap:active { background: var(--surface-2); }
.ag-main { flex: 1; min-width: 0; }
.ag-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-tag { font-size: 12px; color: var(--text-2); background: var(--bg); border-radius: 999px; padding: 2px 9px; }
.ag-desc { font-size: 14px; color: var(--text-2); line-height: 1.45; margin-top: 4px; }
.ag-count { color: var(--text-2); font-size: 14px; align-self: center; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; color: var(--text-2); margin: 0 4px 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 18px; border: 1px solid var(--line-strong);
  background: var(--bg-input); outline: none; font-size: 16.5px; line-height: 1.45; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field-row { display: flex; gap: 10px; }
.field-row .field.icon { flex: 0 0 86px; }
.field-row .field.icon input { text-align: center; font-size: 22px; padding: 9px; }
.field-row .field { flex: 1; }
.hint { font-size: 12.5px; color: var(--text-3); margin: -6px 4px 14px; line-height: 1.45; }
.form-error {
  border: 1px solid rgba(239,100,97,0.5); background: rgba(239,100,97,0.1);
  border-radius: 16px; padding: 11px 14px; font-size: 14.5px; margin-bottom: 12px; line-height: 1.45;
}
.wide-btn {
  width: 100%; height: 52px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 650; font-size: 16.5px; margin-top: 4px;
}
.wide-btn.accent { background: var(--accent); color: #fff; }
.wide-btn.soft { background: var(--surface-2); color: var(--text); }
.wide-btn:disabled { opacity: 0.5; }
.btn-pair { display: flex; gap: 10px; }
.btn-pair .wide-btn { flex: 1; }
.preview-card { border: 1px solid var(--accent); border-radius: 22px; padding: 16px; margin-bottom: 14px; background: var(--surface); }
.preview-card .pv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.preview-card .pv-emoji { font-size: 24px; }
.preview-card .pv-name { font-weight: 650; font-size: 17px; }
.preview-card .pv-model { font-size: 13.5px; color: var(--text-2); margin-bottom: 12px; }
.preview-card .pv-label { font-size: 12px; letter-spacing: 0.7px; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.preview-card .pv-text { white-space: pre-wrap; font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.notes { font-size: 14px; color: var(--text-2); line-height: 1.6; margin: 0 4px 16px; }
.notes li { margin-left: 18px; }

/* ---------- Markdown ---------- */
.md > :first-child { margin-top: 0; }
.md h1 { font-size: 22px; margin: 20px 0 10px; line-height: 1.3; letter-spacing: -0.2px; }
.md h2 { font-size: 18.5px; margin: 20px 0 8px; line-height: 1.35; }
.md h3 { font-size: 16.5px; margin: 16px 0 6px; }
.md p { margin: 10px 0; }
.md ul, .md ol { margin: 10px 0 10px 22px; }
.md li { margin: 6px 0; padding-left: 2px; }
.md code { background: var(--surface); padding: 1.5px 6px; border-radius: 6px; font-size: 0.9em; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.md pre { background: var(--surface); padding: 12px 14px; border-radius: 14px; overflow-x: auto; margin: 12px 0; }
.md pre code { background: none; padding: 0; }
.md strong { font-weight: 650; }
.md blockquote { border-left: 3px solid var(--accent); padding-left: 12px; color: var(--text-2); margin: 10px 0; }
.md hr { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.md a { color: var(--blue); }
.md table { border-collapse: collapse; margin: 12px 0; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; font-size: 14.5px; }

/* ---------- Animations ---------- */
@keyframes brew {
  0% { transform: rotate(0deg) scale(0.82); }
  50% { transform: rotate(90deg) scale(1.08); }
  100% { transform: rotate(180deg) scale(0.82); }
}
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { transform: translateY(60px); opacity: 0.4; } to { transform: none; opacity: 1; } }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ================= Desktop ================= */
@media (min-width: 900px) {
  :root { --side-w: 280px; }
  #main { left: var(--side-w); }
  body.drawer-open #main { transform: none; border-radius: 0; box-shadow: none; }
  #menu-btn, #scrim { display: none; }
  .sb-link:hover, .sb-item:hover, .row:hover, .tile:hover, .pop-item:hover, .suggestion:hover { background: var(--surface-2); }
  .circle-btn:hover, .icon-btn:hover { background: var(--surface-2); }
  .backdrop { align-items: center; }
  .sheet { width: min(600px, 94vw); border-radius: 26px; border-bottom: 1px solid var(--line); max-height: 86vh; }
  .sheet.tall { height: 86vh; }
  .sheet-handle { display: none; }
}
.brief-ico svg { width: 24px; height: 24px; }

/* ---------- Phase 2: ideas vs projects ---------- */
:root { --proj: #6aa4ff; --proj-soft: rgba(106, 164, 255, 0.12); --needs: var(--accent); }
:root[data-theme="light"] { --proj: #2f6fd6; --proj-soft: rgba(47, 111, 214, 0.1); }

.sb-count {
  display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 12.5px; text-align: center; line-height: 20px;
}
.sb-item { align-items: flex-start; }
.sb-item .sb-ico { margin-top: 1px; }
.sb-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sb-item-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-item-sub.needs { color: var(--accent); }
.sb-item-sub.project { color: var(--proj); }
.sb-item-sub.running { color: var(--accent); }
.sb-item .sb-ico.needs { color: var(--accent); }
.sb-item .sb-ico.project { color: var(--proj); }

#stage-bar {
  display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none;
  padding: 2px 16px 10px; max-width: 760px; width: 100%; margin: 0 auto; flex: none;
}
#stage-bar::-webkit-scrollbar { display: none; }
.stage { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; flex: none; }
.stage i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--text-3); }
.stage svg { width: 13px; height: 13px; stroke-width: 2.6; color: var(--proj); }
.stage.done { color: var(--text-2); }
.stage.now { color: var(--proj); font-weight: 650; }
.stage.now i { background: var(--proj); border-color: var(--proj); box-shadow: 0 0 0 3px var(--proj-soft); }
.stage-sep { flex: 1 0 12px; height: 1px; background: var(--line-strong); margin: 0 7px; }
body.mode-project #subtitle-text { color: var(--proj); }

.proj-card {
  margin: 10px 0 14px; padding: 16px; border-radius: 20px;
  background: linear-gradient(160deg, var(--proj-soft), transparent 70%), var(--surface);
  border: 1px solid var(--line);
}
.proj-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.proj-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--proj); font-weight: 650; font-size: 13.5px; }
.proj-badge svg { width: 17px; height: 17px; }
.proj-stage { font-size: 12.5px; color: var(--proj); background: var(--proj-soft); padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.proj-title { font-size: 19px; font-weight: 650; line-height: 1.3; letter-spacing: -0.2px; }
.proj-meta { font-size: 13.5px; color: var(--text-2); margin-top: 6px; line-height: 1.45; }
.proj-meta strong { color: var(--text); font-weight: 600; }
.proj-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; color: var(--proj); font-weight: 600; font-size: 14.5px; }
.proj-link svg { width: 18px; height: 18px; }
.debate-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--line); color: var(--text-2); font-size: 14.5px; margin-bottom: 14px; text-align: left;
}
.debate-toggle span { flex: 1; }
.debate-toggle svg { width: 18px; height: 18px; }
.debate-toggle svg:last-child { transition: transform 0.2s; }
.debate-toggle.open svg:last-child { transform: rotate(90deg); }
.debate-box { border-left: 2px solid var(--line-strong); padding-left: 12px; margin: -4px 0 18px; }
.next-card, .review-card {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 18px; margin: 6px 0 24px;
  border: 1px dashed var(--line-strong); font-size: 14.5px; line-height: 1.5; color: var(--text-2);
}
.next-card strong, .review-card strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 3px; }
.next-ico { color: var(--proj); flex: none; margin-top: 1px; }
.review-card { border: 1px solid rgba(217, 119, 87, 0.45); background: rgba(217, 119, 87, 0.07); }
.review-card .next-ico { color: var(--accent); }

#login {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-box { width: 100%; max-width: 360px; text-align: center; }
.login-box h1 { font-family: var(--serif); font-weight: 400; font-size: 32px; margin-bottom: 8px; }
.login-box p { color: var(--text-2); font-size: 15px; line-height: 1.5; margin-bottom: 22px; }
.login-box input {
  width: 100%; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line-strong);
  background: var(--bg-input); outline: none; font-size: 17px; margin-bottom: 12px;
}
.login-box input:focus { border-color: var(--accent); }
.login-box .form-error { text-align: left; }

.login-box .welcome-mark { display: flex; justify-content: center; }
.login-box .field { text-align: left; margin-bottom: 10px; }
.login-box .field > span { margin: 0 4px 5px; }
.login-box .field input { margin-bottom: 0; }
.login-box .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-links { display: flex; justify-content: space-between; margin-top: 16px; }
.login-links button { color: var(--text-2); font-size: 14.5px; padding: 6px 2px; }
.login-links button:active { color: var(--accent); }
.account-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: var(--surface); margin-bottom: 12px; }
.account-card .avatar-btn { flex: none; }
.sb-list .sb-label { padding: 16px 14px 6px; }

/* ---------- Roster (who the Orchestrator picked) ---------- */
.roster-card {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 26px;
}
.roster-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); margin-right: 2px; }
.roster-label svg { width: 16px; height: 16px; }
.roster-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--agent-color, var(--line-strong)); font-size: 13.5px; color: var(--text);
  background: color-mix(in srgb, var(--agent-color, #888) 10%, transparent);
}
.roster-chip:active { background: color-mix(in srgb, var(--agent-color, #888) 24%, transparent); }
/* ---------- Project documents & prototype ---------- */
.sb-item .sb-ico.project.running svg { animation: brew 2.4s ease-in-out infinite; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 18px; }
.doc-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  padding: 14px 14px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  border-top: 3px solid var(--agent-color, var(--proj));
}
.doc-tile:active { background: var(--surface-2); }
.doc-tile.proto { border-top-color: var(--proj); }
.doc-tile-emoji { font-size: 22px; line-height: 1; margin-bottom: 8px; }
.doc-tile-emoji svg { width: 22px; height: 22px; color: var(--proj); }
.doc-tile-title { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.doc-tile-sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.doc-card, .proto-card { margin-top: 10px; }
.doc-by { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--text-2); margin: 4px 0 14px; }
.doc-by .a-avatar { background: color-mix(in srgb, var(--agent-color, #888) 18%, transparent); }
.system-mark {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 22px;
  font-size: 13.5px; color: var(--proj); font-weight: 600;
}
.system-mark svg { width: 16px; height: 16px; stroke-width: 2.4; }
.proto-body { display: flex; flex-direction: column; padding-bottom: var(--sab) !important; }
.proto-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--text-3); padding: 2px 0 10px; }
.proto-open { display: inline-flex; align-items: center; gap: 2px; color: var(--proj); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.proto-open svg { width: 15px; height: 15px; }
.proto-frame { flex: 1; width: 100%; min-height: 60vh; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
/* ---------- Sidebar search, tags, archive ---------- */
.sb-search { display: flex; align-items: center; gap: 8px; margin: 4px 16px 2px; padding: 8px 12px; border-radius: 14px; background: var(--surface); color: var(--text-3); }
.sb-search svg { width: 17px; height: 17px; flex: none; }
.sb-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; font-size: 15px; color: var(--text); }
.sb-search input::placeholder { color: var(--text-3); }
.sb-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.sb-tag { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.sb-toggle { display: inline-flex; align-items: center; gap: 6px; margin: 14px 14px 4px; font-size: 13.5px; color: var(--text-3); }
.sb-toggle svg { width: 16px; height: 16px; }
.sb-inline { color: var(--accent); font-weight: 600; }
.up-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 5px; vertical-align: middle; }
.up-dot.down { background: var(--red); }

/* ---------- Home: status strip and idea templates ---------- */
.strip { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: -6px 0 18px; }
.strip-item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--surface); font-size: 13.5px; color: var(--text-2); }
.strip-item b { font-size: 15px; color: var(--text); }
.strip-item.needs { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.strip-item.needs b { color: var(--accent); }
.strip-item.live { color: var(--green); }
.templates { width: 100%; max-width: 420px; margin: 0 auto 14px; }
.tpl-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.tpl-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.tpl { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); background: transparent; }
.tpl.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

/* ---------- Scorecard, versions, diff, domains ---------- */
.score-card { margin: 4px 0 24px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.score-big { display: flex; align-items: baseline; gap: 6px; margin-bottom: 12px; }
.score-num { font-family: var(--serif); font-size: 40px; line-height: 1; }
.score-of { color: var(--text-3); font-size: 15px; }
.score-label { margin-left: auto; font-size: 13px; color: var(--text-2); }
.score-row { display: grid; grid-template-columns: 120px 1fr 28px; align-items: center; gap: 10px; font-size: 13.5px; padding: 4px 0; }
.score-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.score-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.score-bar i { display: block; height: 100%; border-radius: 999px; }
.score-val { text-align: right; font-weight: 650; }
.score-card .a-more { margin-top: 8px; }
.version-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-btn.on { border-color: var(--accent); color: var(--accent); }
.diff { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.diff-line { padding: 1px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-line.add { background: color-mix(in srgb, var(--green) 16%, transparent); }
.diff-line.del { background: color-mix(in srgb, var(--red) 14%, transparent); text-decoration: line-through; color: var(--text-2); }
.diff-line.skip { color: var(--text-3); text-align: center; font-style: italic; background: var(--surface); }
.domain-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.domain { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); }
.domain em { font-style: normal; font-size: 11.5px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.domain.free em { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.domain.taken em { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }

/* ---------- Activity feed, task actions, code, board ---------- */
.activity { margin: -14px 0 24px; }
.act-line { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; font-size: 13px; color: var(--text-2); padding: 6px 0 6px 36px; }
.act-line svg { width: 14px; height: 14px; margin-left: auto; flex: none; transition: transform 0.2s; }
.activity.open .act-line svg { transform: rotate(90deg); }
.act-tool { flex: none; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); text-transform: lowercase; }
.act-tool.write, .act-tool.edit { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.act-tool.run { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.act-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.act-list { padding: 4px 0 0 36px; }
.act-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 3px 0; }
.task-row { width: 100%; text-align: left; }
.task-row:active { background: var(--surface); }
.task-hold { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); margin-left: 4px; }
.ag-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ag-actions .chip-btn { height: 30px; font-size: 13px; }
.field-row.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.field-row.three .field { margin-bottom: 8px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.board-col { flex: 0 0 82%; scroll-snap-align: start; }
.board-head { font-size: 14px; color: var(--text-2); margin: 4px 4px 8px; }
.board-card { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 8px; }
.board-card:active { background: var(--surface-2); }
.board-title { display: block; font-weight: 600; font-size: 15px; }
.board-sub { display: block; font-size: 13px; color: var(--text-2); margin: 3px 0 8px; }
.board-card .tb-bar { display: block; height: 5px; }
.a-msg[data-kind="answer"] { border-left: 2px solid var(--line-strong); padding-left: 12px; }
@media (min-width: 900px) { .board-col { flex-basis: 48%; } }

/* ---------- Confidence tags, screenshots, replay, design choice ---------- */
.conf { display: inline-block; font-size: 10.5px; line-height: 1; padding: 3px 6px; border-radius: 999px; margin: 0 2px; vertical-align: 2px; letter-spacing: 0.3px; text-transform: uppercase; background: var(--surface-2); color: var(--text-3); }
.conf.fact { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.conf.estimate { background: color-mix(in srgb, var(--blue) 18%, transparent); color: var(--blue); }
.conf.guess { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.shots { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 4px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shot { height: 180px; width: auto; border-radius: 12px; border: 1px solid var(--line); flex: none; background: #fff; }
.replay-bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; font-size: 13.5px; color: var(--text-2); }
.replay-bar input[type="range"] { flex: 1; accent-color: var(--accent); }
.doc-tile.chosen { outline: 2px solid var(--proj); outline-offset: -2px; }
.site-card.down { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
a.row, a.row:visited { color: inherit; text-decoration: none; }
.site-card.down .brief-ico { color: var(--red); }

/* ---------- Notifications banner ---------- */
.notify-banner {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: start; text-align: left;
  width: 100%; max-width: 420px; margin: 0 auto 18px; padding: 14px 16px; border-radius: 18px;
  border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; color: var(--text-2); line-height: 1.45;
}
.notify-banner .next-ico { color: var(--accent); }
.notify-banner strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }
.notify-banner .nb-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.notify-banner .nb-actions .wide-btn { flex: 1; height: 42px; font-size: 14.5px; margin: 0; }
#push-row .row-sub { white-space: normal; }

/* ---------- Build crew: tasks, notes, site ---------- */
.task-board {
  width: 100%; text-align: left; padding: 14px 16px; border-radius: 18px; margin: 0 0 18px;
  border: 1px solid var(--line); background: var(--surface);
}
.task-board:active { background: var(--surface-2); }
.tb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tb-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; }
.tb-title svg { width: 18px; height: 18px; color: var(--proj); }
.tb-count { font-size: 13px; color: var(--text-2); }
.tb-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.tb-bar i { display: block; height: 100%; background: var(--proj); border-radius: 999px; transition: width 0.4s; }
.tb-now { margin-top: 10px; font-size: 13.5px; color: var(--text-2); }
.task-line {
  display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 2px; padding: 5px 11px 5px 8px; border-radius: 999px;
  font-size: 13px; background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); max-width: 100%;
}
.task-line span { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-line em { font-style: normal; font-weight: 650; }
.task-line svg { width: 15px; height: 15px; stroke-width: 2.4; flex: none; }
.task-line.blocked { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.task-row { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.task-row .task-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); color: var(--text-3); }
.task-row .task-ico svg { width: 15px; height: 15px; stroke-width: 2.3; }
.task-row.done .task-ico { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.task-row.doing .task-ico { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.task-row.doing .task-ico svg { animation: brew 2.4s ease-in-out infinite; }
.task-row.blocked .task-ico { background: color-mix(in srgb, var(--red) 18%, transparent); color: var(--red); }
.task-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.task-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.task-row.done .task-title { color: var(--text-2); }
.task-sub { font-size: 12.5px; color: var(--text-3); }
.task-report { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.system-note {
  margin: 4px 0 22px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line);
  font-size: 14px; color: var(--text-2); line-height: 1.5;
}
.system-note strong { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 14.5px; }
.system-note strong svg { width: 17px; height: 17px; color: var(--green); }
.system-note .md { margin-top: 4px; }
.system-note .md p { margin: 0; }
.system-note.live { border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 7%, transparent); }
.site-card {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 18px; margin: 0 0 18px;
  border: 1px solid color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent);
  color: var(--text); text-decoration: none;
}
.site-card .brief-ico { color: var(--green); }
.a-msg[data-kind="research"] .a-body a { color: var(--blue); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); }
