/* Ian web UI. Design tokens first; light and dark share every rule. */
:root {
  --bg: #f7f7f5; --surface: #ffffff; --surface-2: #f1f1ee; --line: #e6e5e0;
  /* what the person said stands out from Ian's replies: a deeper bubble, slightly heavier text */
  --me-bubble: #e2e6f3; --me-text: #15171f;
  --fg: #1c1c1a; --fg-2: #5b5b56; --fg-3: #8c8c86;
  --accent: #3b5bdb; --accent-2: #4c6ef5; --accent-soft: #eef2ff;
  /* the undo snackbar: a dark bar in both themes, its button readable on it */
  --snack-bg: #1f2230; --snack-fg: #f3f4f8; --snack-accent: #9fb0ff;
  --ok: #2f9e44; --ok-soft: #ebfbee; --warn: #e67700; --warn-soft: #fff4e6;
  --bad: #e03131; --bad-soft: #fff5f5;
  --shadow: 0 1px 2px rgba(20,20,15,.04), 0 8px 24px rgba(20,20,15,.06);
  --r: 16px; --r-sm: 10px;
  --col: 760px;
  --ff: "Inter", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111112; --surface: #19191b; --surface-2: #222225; --line: #2c2c30;
  --me-bubble: #2d3350; --me-text: #f4f5fa;
  --fg: #ededee; --fg-2: #a7a7ad; --fg-3: #75757c;
  --accent: #7c95ff; --accent-2: #93a7ff; --accent-soft: #1c2240;
  --snack-bg: #2c3042; --snack-fg: #f3f4f8; --snack-accent: #a9b8ff;
  --ok: #51cf66; --ok-soft: #13261a; --warn: #ffa94d; --warn-soft: #2b2012;
  --bad: #ff6b6b; --bad-soft: #2d1616;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--ff); font-size: 15px;
  line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
.version-value { max-width: 100%; overflow-wrap: anywhere; user-select: text; }
.android-update { flex: none; margin: 8px 0; }
.android-notes summary { cursor: pointer; color: var(--fg-2); font-size: 13px; }
.android-notes .prose { margin-top: 10px; max-height: 240px; overflow-y: auto; }
.muted { color: var(--fg-2); }

/* Registered routines use the same secondary-page typography and flat lists. */
.routine-row { overflow-wrap: anywhere; }
.routine-row > svg { color: var(--fg-3); flex-shrink: 0; }
.routine-count { font-size: 13.5px; }
.routine-chat { margin-top: 20px; }
.routine-empty .empty-s { color: var(--fg-2); }
.routine-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--fg);
  color: color-mix(in srgb, var(--bad) 85%, var(--fg)); }
.routine-loading { display: grid; gap: 12px; margin-top: 16px; }
.routine-loading i { display: block; height: 52px; border-radius: var(--r-sm); background: var(--surface-2); }

/* shell */
.shell { height: var(--app-h, 100dvh); display: flex; flex-direction: column; max-width: var(--col);
  margin: 0 auto; padding: 0 16px; }
.top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: start;
  padding: 14px 0 8px; flex: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--fg-2); position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
.who-btn { display: flex; flex-direction: column; align-items: center; gap: 2px;
  justify-self: center; min-width: 0; max-width: 100%; padding: 2px 10px; border-radius: 14px; }
/* the animated companion in the header; its drawing has room around it, pulled in here,
   leaving a little air above the line under it */
.mascot-slot { display: block; width: 88px; height: 88px; margin: -16px 0 -6px; }
.mascot { display: block; width: 88px; height: 88px; }
.who-status { font-size: 14px; color: var(--fg-2); max-width: min(420px, 100%); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* too long for its place: scrolls through slowly and back, resting at each end (rollStatus) */
.who-status.rolling { text-overflow: clip;
  mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 10px), transparent); }
.who-status.rolling .who-text { display: inline-block; animation: roll var(--roll-s, 8s) ease-in-out infinite alternate; }
@keyframes roll { 0%, 18% { transform: translateX(0); } 82%, 100% { transform: translateX(var(--roll)); } }
@media (prefers-reduced-motion: reduce) {
  .who-status.rolling { text-overflow: ellipsis; mask-image: none; }
  .who-status.rolling .who-text { animation: none; display: inline; }
}

/* chat */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.thread { flex: 1; overflow-y: auto; padding: 12px 2px 8px; overflow-anchor: none; }
.thread-in { display: flex; flex-direction: column; gap: 18px; }
/* the day the messages below it are from, where the day changes */
.day-line { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 12px; font-weight: 600;
  color: var(--fg-2); }
.day-line::before, .day-line::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.msg.me { align-items: flex-end; }
.msg.me .bubble { background: var(--me-bubble); color: var(--me-text); font-weight: 500; padding: 10px 14px; border-radius: 18px 18px 6px 18px;
  max-width: 85%; white-space: pre-wrap; word-break: break-word; }
.msg.ai .bubble { max-width: 100%; word-break: break-word; }
.branch-source { display: flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--fg-2); padding: 8px 2px; flex: none; }
.edit-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 12px; color: var(--fg-2); background: var(--surface); }
.edit-banner strong { display: block; color: var(--fg); font-size: 13px; margin-bottom: 3px; }
.edit-banner .icon-btn { flex: none; }
.bubble p { margin: 0 0 10px; } .bubble p:last-child { margin: 0; }
.bubble ul, .bubble ol, .prose ul, .prose ol { margin: 4px 0 10px 20px; }
.bubble li { margin: 2px 0; }
.bubble code, .prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px;
  font-family: ui-monospace, monospace; font-size: .88em; }
.bubble pre, .prose pre { background: var(--surface-2); padding: 12px 14px; border-radius: 12px;
  overflow-x: auto; margin: 6px 0 10px; }
.bubble pre code { background: none; padding: 0; }
:is(.bubble, .prose) :is(h1, h2, h3, h4, h5, h6) { font-size: 1.1em; font-weight: 650;
  line-height: 1.4; margin: 16px 0 8px; }
:is(.bubble, .prose) h1 { font-size: 1.35em; }
:is(.bubble, .prose) h2 { font-size: 1.2em; }
:is(.bubble, .prose) > :first-child { margin-top: 0; }
:is(.bubble, .prose) blockquote { border-left: 1px solid var(--line); padding-left: 12px;
  margin: 10px 0; color: var(--fg-2); }
:is(.bubble, .prose) hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.md-table { max-width: 100%; overflow-x: auto; margin: 10px 0; }
.md-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-table :is(th, td) { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: start;
  min-width: 110px; vertical-align: top; }
.md-table th { font-weight: 650; background: var(--surface-2); }
.working { display: flex; align-items: center; gap: 8px; color: var(--fg-3); font-size: 13.5px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3);
  animation: blink 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.hello { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column;
  align-items: center; text-align: center; padding: 20px 8px 40px; }
/* Center when there is room; overflow starts at the top, inside the chat, not the page. */
.hello > * { flex-shrink: 0; }
.hello > :first-child { margin-top: auto; }
.hello::after { content: ''; margin-top: auto; }
.hello h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.hello p { color: var(--fg-2); max-width: 470px; margin-bottom: 24px; }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 560px; }
.starter { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--fg-2); font-size: 13.5px;
  transition: border-color .15s, color .15s, transform .1s; }
.starter:hover { border-color: var(--accent); color: var(--fg); }
.starter:active { transform: scale(.99); }
.starter { display: flex; flex-direction: column; gap: 6px; }
.starter-kind { font-size: 11px; color: var(--fg-3); letter-spacing: .02em; }
.starter-more { margin-top: 4px; color: var(--fg-2); gap: 6px; }

.composer { flex: none; padding: 8px 0 14px; }
.composer-in { display: flex; align-items: flex-end; gap: 8px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 22px; padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow); transition: border-color .15s; }
.composer-in:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; background: none;
  line-height: 1.55; padding: 7px 0; max-height: 220px; }
.composer textarea::placeholder { color: var(--fg-3); }
.send { width: 38px; height: 38px; border-radius: 50%; background: var(--fg); color: var(--bg);
  display: grid; place-items: center; flex: none; transition: opacity .15s; }
.send:hover { opacity: .85; }
.send.stop { background: var(--surface-2); color: var(--fg); }
.composer-hint { text-align: center; font-size: 11.5px; color: var(--fg-3); margin-top: 6px; }

/* cards inside chat */
.cards { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 520px; }
.card { display: block; width: 100%; text-align: left; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--fg);
  transition: border-color .15s, box-shadow .15s; }
button.card:hover, a.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  text-decoration: none; }
.card-top { display: flex; align-items: center; gap: 6px; color: var(--fg-3); margin-bottom: 4px; }
.card-kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; flex: 1; }
.card-title { font-weight: 600; font-size: 14.5px; }
.card-sub { color: var(--fg-2); font-size: 13px; margin-top: 3px; display: flex; align-items: center; gap: 5px; }
.card.shot { padding: 6px; }
/* the picture in its own shape (a 16:10 box shrank a phone's screen to a strip) */
.card.shot img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain;
  border-radius: 10px; background: var(--surface-2); }
.card.approval { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background:
  linear-gradient(var(--surface), var(--surface)) padding-box; }
/* what the approval would send: recipients and subject, then the text (folded when long) */
.msg-preview { margin: 8px 0 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pv-row { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; }
.pv-k { flex: none; min-width: 64px; color: var(--fg-3); }
.pv-v { min-width: 0; overflow-wrap: anywhere; }
.pv-body { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13.5px;
  line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pv-body.folded { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.pv-more { align-self: flex-start; color: var(--accent); background: none; padding: 0; font-size: 13px; margin-top: 2px; }
.card.approval.danger { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
/* an offered next step (add the booking to the calendar) is a suggestion, not a warning */
.card.approval.offer { border-color: var(--line); }
.card .row { margin-top: 10px; }

/* pills & buttons */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--fg-2);
  white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.run { background: var(--accent-soft); color: var(--accent); }
.pill.wait { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pulse { width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: blink 1.3s ease-in-out infinite; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 12px; font-weight: 600; font-size: 14px;
  transition: opacity .15s, background .15s; white-space: nowrap; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover:not(:disabled) { opacity: .88; }
.btn.ghost { background: var(--surface-2); }
.btn.ghost:hover { background: var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 12px 16px; font-size: 15px; }
.btn.block { width: 100%; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.input { width: 100%; flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid transparent;
  border-radius: 12px; padding: 10px 12px; outline: none; transition: border-color .15s, background .15s; }
.input:focus { border-color: var(--accent); background: var(--surface); }

/* drawer, sheets, scrim */
.scrim { position: fixed; inset: 0; background: rgba(10,10,12,.35); backdrop-filter: blur(2px);
  z-index: 40; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); z-index: 41;
  background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 10px; animation: slideL .2s cubic-bezier(.2,.8,.3,1); }
@keyframes slideL { from { transform: translateX(-16px); opacity: .5; } }
.navs { display: flex; flex-direction: column; gap: 1px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--fg-2); font-size: 14px; text-align: left; }
.nav:hover { background: var(--surface-2); color: var(--fg); }
.nav.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav span:first-of-type { flex: 1; }
.badge { font-size: 11px; font-weight: 700; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 0 7px; min-width: 20px; text-align: center; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--fg-3); padding: 12px 12px 4px; }
.convs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; gap: 1px; }
/* rows keep their height and the list scrolls; flex must not squash them */
.convs > * { flex-shrink: 0; }
.convs .sub { font-size: 11.5px; color: var(--fg-3); padding: 8px 12px 2px; }
/* chat search (#119): a box above the list; results show the line that matched */
.conv-search { display: flex; align-items: center; gap: 6px; margin: -2px 0 2px; padding: 0 4px 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--fg-3); }
.conv-search:focus-within { border-color: var(--accent); }
.conv-search-input { flex: 1; min-width: 0; border: 0; background: none; padding: 8px 0; font-size: 13.5px; color: var(--fg); outline: none; }
.conv-search-input::-webkit-search-cancel-button { display: none; }
.conv-search-clear { visibility: hidden; }
.conv-search.has-text .conv-search-clear { visibility: visible; }
.conv.found { display: flex; flex-direction: column; gap: 2px; }
.found-title { font-weight: 600; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.found-line { font-size: 12.5px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; }
.conv.found mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.conv-none { font-size: 12.5px; color: var(--fg-3); padding: 10px 12px; }
.conv { text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* a long press opens the delete menu, not text selection */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: pan-y; transition: transform .15s; }
@media (prefers-reduced-motion: reduce) { .conv { transition: none; } }
.conv:hover { background: var(--surface-2); color: var(--fg); }
.conv-row { display: flex; align-items: center; position: relative; }
.conv-row .conv { flex: 1; min-width: 0; }
.conv-more { position: absolute; right: 4px; opacity: 0; color: var(--fg-3); }
.conv-row:hover .conv-more, .conv-more:focus-visible { opacity: 1; }
@media (hover: none) { .conv-more { display: none; } }
.conv.on { background: var(--surface-2); color: var(--fg); font-weight: 600; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--fg-2); flex: none; }
.me-text { min-width: 0; } .me-name { font-weight: 600; font-size: 13.5px; }
.me-mail { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; }

.sheet { position: fixed; z-index: 41; background: var(--surface); display: flex; flex-direction: column;
  left: 50%; bottom: 0; transform: translateX(-50%); width: min(640px, 100vw); max-height: 88dvh;
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow); animation: up .22s cubic-bezier(.2,.8,.3,1); }
.sheet.right { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: min(400px, 92vw);
  max-height: none; border-radius: 0; animation: slideR .2s cubic-bezier(.2,.8,.3,1); }
@keyframes up { from { transform: translate(-50%, 24px); opacity: .5; } }
@keyframes slideR { from { transform: translateX(16px); opacity: .5; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px 20px;
  border-bottom: 1px solid var(--line); }
.sheet-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sheet-title { font-weight: 650; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
/* a title straight in the header (the bell) pushes its actions to the right */
.sheet-head > .sheet-title { flex: 1; }
.sheet-status { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--fg-2); min-width: 0; }
.sheet-status > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-sum { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.goal-sum .ring { width: 20px; height: 20px; flex: none; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 44px; z-index: 5; min-width: 190px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; }
.menu-item { text-align: left; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--fg); }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); }
.sheet-section { display: flex; flex-direction: column; gap: 8px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li { padding: 7px 8px; border-radius: 10px; font-size: 14px; }
.step-row { display: flex; align-items: center; gap: 10px; }
.steps li i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none;
  display: grid; place-items: center; }
/* finished: checked and struck through */
.steps li.done { color: var(--fg-3); }
.steps li.done > .step-row .step-t { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--fg-3) 70%, transparent); }
.steps li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
.steps li.now i { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); background: var(--accent); }
/* being worked on: the mark breathes */
.steps li.live > .step-row i { animation: step-live 1.6s ease-in-out infinite; }
@keyframes step-live { 0%, 100% { box-shadow: inset 0 0 0 4px var(--surface), 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: inset 0 0 0 4px var(--surface), 0 0 0 6px transparent; } }
.steps li.waiting { background: var(--surface-2); }
.steps li.waiting i { border-color: var(--warn); background: none; box-shadow: none; }
.steps li.waiting .now-tag { color: var(--warn); }
.steps li.stopped { background: color-mix(in srgb, var(--bad) 8%, transparent); }
.steps li.stopped i { border-color: var(--bad); background: none; box-shadow: none; }
.steps li.stopped .now-tag { color: var(--bad); }
.steps li.skipped { color: var(--fg-3); }
.steps li.skipped i { border-style: dashed; }
.steps li.skipped .now-tag { color: var(--fg-3); font-weight: 600; }
/* what a step did, folded under it: its result and its log records */
.steps li.has-log > .step-row { cursor: pointer; }
/* "1/3 done" beside the plan's label: progress at a glance */
.label .label-count { margin-left: 6px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--fg-3); }
.step-fold { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  font-size: 11.5px; font-weight: 600; color: var(--fg-3); white-space: nowrap; }
.now-tag + .step-fold { margin-left: 8px; }
.step-fold svg { transform: rotate(-90deg); transition: transform .15s; }
.step-fold.open svg { transform: rotate(90deg); }
.step-latest { margin: 4px 0 0 28px; font-size: 12.5px; font-weight: 400; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-log { margin: 8px 0 2px 28px; font-weight: 400; }
.step-result { font-size: 13px; color: var(--fg-2); margin: 0 0 8px; white-space: pre-wrap; text-decoration: none; }
.steps li.done .step-log { color: var(--fg-2); }
/* a specialist's own steps, under the step it works on */
.steps .steps { margin: 6px 0 0 28px; font-weight: 400; }
.steps .steps li { padding: 3px 6px; font-size: 13px; background: none; }
.steps .steps li i { width: 14px; height: 14px; }
.now-tag { margin-left: auto; flex-shrink: 0; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .steps li.live > .step-row i { animation: none; } }
/* answer buttons under a question; the slot they sit in takes no room once answered */
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.btn.choice { background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-align: left; }
.btn.choice:hover:not(:disabled) { border-color: var(--accent); }
.choice-slot:empty, .screen-slot:empty, .form-slot:empty { display: none; }
.screen-slot { margin-top: 8px; }
.prose.result { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--fg); }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-chip:hover { border-color: var(--accent); }
.details { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--fg-2); list-style: none; }
.details > summary::-webkit-details-marker { display: none; }
.details > summary::before { content: "▸"; display: inline-block; margin-right: 6px; transition: transform .15s; }
.details[open] > summary::before { transform: rotate(90deg); }
.trace-links { display: block; flex: none; min-width: 0; padding-top: 0; }
.trace-links > summary { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.trace-links > summary::before { margin-right: 0; flex: none; }
.trace-links > summary > svg { flex: none; }
.trace-refresh { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--fg-2); }
.trace-refresh:hover:not(:disabled) { background: var(--surface-2); }
/* the issue button sits first on the right; the refresh follows it */
.trace-report + .trace-refresh { margin-left: 2px; }
/* developer mode: the issue form over the page, above any sheet */
.issue-report .scrim { z-index: 60; }
.issue-form { position: fixed; z-index: 61; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(560px, 100vw); max-height: 88dvh; overflow-y: auto; background: var(--surface);
  border-radius: 20px 20px 0 0; box-shadow: var(--shadow); padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 12px; animation: up .22s cubic-bezier(.2,.8,.3,1); }
.issue-head { display: flex; align-items: center; gap: 8px; }
.issue-head .icon-btn { margin-left: auto; }
.issue-shot { max-height: 220px; width: auto; max-width: 100%; align-self: flex-start;
  border-radius: 10px; border: 1px solid var(--line); }
/* operators: the reported issues */
.issue-row .row-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.issue-detail-shot { width: 100%; max-height: 60dvh; object-fit: contain; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); }
.issue-meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 14px 0; font-size: 14px; }
.issue-meta dt { color: var(--fg-3); }
.issue-meta dd { margin: 0; overflow-wrap: anywhere; }
.issue-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.trace-refresh:disabled { opacity: .5; cursor: wait; }
.trace-links:not([open]) .trace-refresh { display: none; }
.trace-links:not([open]) > summary { min-height: 28px; }
.trace-content { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.trace-status { margin: 0; color: var(--fg-2); font-size: 12px; }
.trace-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; }
.trace-label { grid-column: 1 / -1; color: var(--fg-2); font-size: 12px; font-weight: 500; }
.trace-entry code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; user-select: all; }
.trace-actions { display: flex; gap: 4px; }
.trace-help { border-top: 1px solid var(--line); padding-top: 8px; color: var(--fg-2); font-size: 12px; }
.trace-help > summary { cursor: pointer; }
.trace-help-content { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.trace-help-content > p { margin: 0; }
.chat > .trace-links { margin: 6px 0; padding: 6px 12px; border: 1px solid var(--line);
  border-radius: 12px; max-height: 36%; overflow-y: auto; }
@media (max-width: 600px) {
  .trace-links > summary { min-height: 40px; }
  .trace-links:not([open]) > summary { min-height: 32px; }
  .trace-refresh { min-height: 40px; }
  .trace-actions .icon-btn.sm { width: 40px; height: 40px; }
}
.goal-desc { margin: 0; }
@media (prefers-reduced-motion: reduce) { .details > summary::before { transition: none; } }
.sheet-body { overflow-y: auto; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 12px; }

/* Calls use the task's conversation and composer; the transcript is secondary. */
.call-section { min-width: 0; }
.call-progress { display: flex; align-items: center; gap: 10px; }
.call-progress > svg { flex: none; color: var(--fg-2); }
.call-progress-text { flex: 1; min-width: 0; }
.call-status { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.call-destination, .call-note { color: var(--fg-2); font-size: 14px; overflow-wrap: anywhere; }
.call-destination { font-variant-numeric: tabular-nums; }
.call-progress .btn { flex: none; }
.call-outcome { overflow-wrap: anywhere; }
.call-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--bad); font-size: 14px; overflow-wrap: anywhere; }
.call-details > summary { min-height: 36px; display: flex; align-items: center; }
.call-details > summary:hover { color: var(--fg); }
.call-transcript { list-style: none; display: flex; flex-direction: column; gap: 14px; max-height: 240px; overflow-y: auto; padding-block: 6px; }
.call-transcript li { min-width: 0; }
.call-transcript p { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.call-speaker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--fg-2); font-size: 14px; font-weight: 600; }
.call-speaker span { font-weight: 400; }
@media (max-width: 480px) { .call-progress { flex-wrap: wrap; } .call-progress .btn { margin-inline-start: 27px; } }

/* secondary pages */
.page { flex: 1; overflow-y: auto; padding: 4px 2px 40px; display: flex; flex-direction: column; gap: 10px;
  scrollbar-width: none; -ms-overflow-style: none; }
.page::-webkit-scrollbar { display: none; }
.page h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 8px; }
.page-back { display: inline-flex; align-items: center; gap: 4px; width: fit-content; background: none; border: 0;
  margin: 2px 0 -2px -4px; padding: 4px 8px 4px 4px;
  border-radius: 8px; color: var(--fg-2); font-size: 13.5px; font-weight: 600; }
.page-back:hover { background: var(--surface-2); color: var(--fg); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-link { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 6px 12px;
  border-radius: 999px; background: var(--surface-2); color: var(--fg-2); font-size: 13px; font-weight: 600; }
.page-link:hover { color: var(--fg); }
.group { display: flex; flex-direction: column; gap: 8px; }
.group > .label { padding-left: 2px; }
.row-card { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  color: var(--fg); }
.row-card.col { flex-direction: column; align-items: stretch; gap: 8px; }
.row-card.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
button.row-card:hover, a.row-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  text-decoration: none; }
.row-main { flex: 1; min-width: 0; }
.row-main.link { text-align: left; color: inherit; background: none; padding: 0; }
.row-title .tag { margin-left: 8px; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); vertical-align: 1px; }
.row-title .tag.muted { background: var(--surface-2); color: var(--fg-3); }
.group > .hint { color: var(--fg-3); font-size: 12.5px; padding: 0 2px 2px; }
/* an idea says up front whether it is one piece of work or a goal over days */
.idea-kind { align-self: flex-start; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--fg-2); }
.idea-kind.goal { background: var(--accent-soft); color: var(--accent); }
.idea-kind.routine { background: var(--warn-soft); color: var(--warn); }
.row-sub.idea-when { display: flex; align-items: center; gap: 5px; color: var(--fg-2); }
.row-sub.clamp2 { -webkit-line-clamp: 2; }
.row-sub.fact-src { font-size: 12px; color: var(--fg-3); }
.row-title { font-weight: 600; font-size: 14.5px; }
.row-sub { color: var(--fg-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.seg { display: flex; gap: 4px; background: var(--surface-2); border-radius: 12px; padding: 3px; flex-wrap: wrap; }
.seg button { flex: 1; padding: 7px 10px; border-radius: 9px; font-size: 13px; color: var(--fg-2); }
.seg button.on { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg.small { margin-top: 16px; justify-content: center; }
.callout { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.callout.wait { background: var(--warn-soft); } .callout.bad { background: var(--bad-soft); color: var(--bad); }
.callout.ask { background: var(--warn-soft); display: flex; flex-direction: column; gap: 4px; }
.ask-q { white-space: pre-wrap; color: var(--fg); }
.callout.ask .row { margin-top: 6px; }
.callout .row { margin-top: 10px; }
.empty { text-align: center; padding: 48px 20px; color: var(--fg-3); }
.empty-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--surface-2);
  display: grid; place-items: center; margin: 0 auto 14px; color: var(--fg-2); }
.empty-t { font-weight: 600; color: var(--fg); margin-bottom: 4px; }
.empty-s { font-size: 13.5px; max-width: 360px; margin: 0 auto; }
/* empty Brief: making a card is the way in; the dev sample sits quietly under it */
.timeline { border-left: 2px solid var(--line); margin-left: 6px; padding-left: 14px;
  display: flex; flex-direction: column; gap: 12px; }
.tl { position: relative; }
.tl::before { content: ""; position: absolute; left: -20px; top: 7px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--line); border: 2px solid var(--surface); }
.tl.result::before { background: var(--ok); } .tl.error::before { background: var(--bad); }
.tl.approval::before { background: var(--warn); }
/* lasting lines: done once something followed, else going on, waiting or stopped (lineState) */
.tl.done .tl-t { color: var(--fg-3); font-weight: 500; text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--fg-3) 70%, transparent); }
.tl.done::before { background: var(--ok); }
.tl.live::before { background: var(--accent); animation: tl-live 1.6s ease-in-out infinite; }
@keyframes tl-live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; } }
.tl.waiting::before { background: var(--warn); }
.tl.stopped::before { background: var(--bad); }
.tl-tag { margin-left: 8px; }
.tl-tag.waiting { color: var(--warn); } .tl-tag.stopped { color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .tl.live::before { animation: none; } }
.tl-t { font-size: 13.5px; font-weight: 600; }
.tl-times { color: var(--fg-3); font-weight: 500; }
.tl-d { font-size: 12.5px; color: var(--fg-2); white-space: pre-wrap; word-break: break-word; }
.tl-at { font-size: 11.5px; color: var(--fg-3); }
.surf { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.surf .st { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.surf-n { display: flex; flex-direction: column; min-width: 0; }
.surf-d { font-size: 12px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.st.off { background: var(--fg-3); opacity: .5; }
.st.no { border: 1.5px dashed var(--fg-3); }
.surf-r { margin-left: auto; font-size: 12.5px; color: var(--fg-3); text-align: right; max-width: 60%; }
.notif-group { min-width: 0; }
.notif-group > summary { cursor: pointer; list-style: none; }
.notif-group > summary::-webkit-details-marker { display: none; }
.notif-group > summary:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.notif-count { flex: none; min-width: 24px; padding: 0 6px; border-radius: 8px;
  background: var(--surface-2); color: var(--fg-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.notif-chevron { flex: none; display: flex; color: var(--fg-2); transform: rotate(-90deg); }
.notif-group[open] > summary .notif-chevron { transform: rotate(90deg); }
.notif-items { display: flex; flex-direction: column; gap: 6px; padding: 8px 0 0 12px; }
.notif-items .row-card { border: 0; border-radius: 0; background: none; padding: 8px 0; }
.notif-items button.row-card:hover { background: var(--surface-2); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.file-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; color: var(--fg); }
.file-card:hover { border-color: var(--accent); text-decoration: none; }
.file-wrap { position: relative; display: flex; flex-direction: column; }
.file-wrap .file-card { flex: 1; }
.file-del { position: absolute; top: 6px; right: 6px; background: var(--surface); color: var(--fg-3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.file-ask { gap: 8px; }
.file-ask .row { gap: 6px; flex-wrap: wrap; }
.file-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 9px; background: var(--surface-2); }
.file-ic { height: 110px; display: grid; place-items: center; background: var(--surface-2);
  border-radius: 9px; color: var(--fg-3); }
.file-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11.5px; color: var(--fg-3); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.82);
  display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade .15s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }

/* auth: brand story on the left, the form on the right; one column on phones */
.auth { min-height: var(--app-h, 100dvh); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  position: relative; background: var(--bg); }
.auth-lang { position: absolute; top: 18px; right: 20px; z-index: 2; width: auto; }
.auth-brand { position: relative; overflow: hidden; color: #eef0ff; padding: 56px clamp(28px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  background:
    radial-gradient(620px 420px at 12% 8%, rgba(47,180,200,.42), transparent 62%),
    radial-gradient(700px 520px at 92% 96%, rgba(124,92,255,.55), transparent 60%),
    linear-gradient(160deg, #0d1030 0%, #1d1a4d 52%, #14133a 100%); }
.auth-brand::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 75%); }
.auth-brand > * { position: relative; z-index: 1; max-width: 520px; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.companion.welcome { width: 120px; height: 120px; margin: -22px -16px -22px -24px; }
.auth-hero { font-size: clamp(30px, 3.3vw, 44px); line-height: 1.15; font-weight: 750; letter-spacing: -.035em;
  white-space: pre-line; text-wrap: balance;
  background: linear-gradient(92deg, #ffffff 30%, #b9c4ff 70%, #8fe3ee); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
/* I·A·N: what the name stands for, its first letters lit */
.auth-concept { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; font-size: 14px; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(225,229,255,.7); }
.auth-concept span:not(:last-child)::after { content: "·"; margin-left: 14px; color: rgba(225,229,255,.4); }
.auth-concept b { color: #8fe3ee; font-weight: 800; }
.auth-lede { font-size: 16.5px; line-height: 1.65; color: rgba(232,235,255,.78); max-width: 46ch; }
.auth-feats { list-style: none; display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 4px; }
.auth-feats li { display: flex; gap: 12px; align-items: flex-start; }
.auth-feats .feat-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #a9e8f1; }
.auth-feats b { display: block; font-size: 14.5px; font-weight: 650; color: #fff; }
.auth-feats li span:not(.feat-ic) { display: block; font-size: 13px; line-height: 1.5; color: rgba(225,229,255,.66); }
.auth-preview { margin-top: 8px; padding: 16px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(6px); box-shadow: 0 24px 60px rgba(4,6,30,.45); }
.pv-msg { font-size: 13.5px; line-height: 1.5; padding: 9px 13px; border-radius: 14px; max-width: 86%; }
.pv-msg.me { align-self: flex-end; background: rgba(255,255,255,.14); border-radius: 14px 14px 4px 14px; }
.pv-msg.ai { align-self: flex-start; color: rgba(236,239,255,.9); padding-left: 2px; }
.pv-card { background: #fff; color: #1c1c1a; border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 7px; }
.pv-card-top { display: flex; justify-content: space-between; align-items: center; }
.pv-time { font-size: 12px; color: #8c8c86; }
.pv-title { font-weight: 650; font-size: 14px; }
.pv-bar { height: 6px; border-radius: 3px; background: #eceef6; overflow: hidden; }
.pv-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #2fb4c8, #7c5cff); }
.pv-steps { font-size: 12.5px; color: #5b5b56; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 72px clamp(20px, 5vw, 64px) 32px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-card-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.auth-card h2 { font-size: 28px; font-weight: 720; letter-spacing: -.025em; }
.auth-card .callout { display: flex; gap: 8px; align-items: flex-start; }
.field { display: flex; flex-direction: column; gap: 7px; text-align: left; font-size: 13px;
  color: var(--fg-2); font-weight: 550; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 14px; color: var(--fg-3); pointer-events: none; }
.input-wrap .input { padding-left: 42px; height: 48px; border-radius: 12px; font-size: 15px;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.input-wrap .input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input-wrap:focus-within > svg { color: var(--accent); }
.input-eye { position: absolute; right: 6px; width: 36px; height: 36px; border-radius: 10px; display: grid;
  place-items: center; color: var(--fg-3); }
.input-eye:hover { background: var(--surface-2); color: var(--fg); }
.input-wrap .input[name="password"] { padding-right: 46px; }
.auth-card .btn.lg { height: 50px; border-radius: 12px; font-size: 15.5px; font-weight: 650; margin-top: 4px;
  background: linear-gradient(135deg, #3b5bdb, #6a4cf5); color: #fff; box-shadow: 0 10px 24px rgba(74,84,230,.28); }
.auth-card .btn.lg:hover:not(:disabled) { filter: brightness(1.06); }
.auth-switch { font-size: 14px; color: var(--fg-2); text-align: center; }
.auth-switch a { font-weight: 600; }
.auth-trust { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--fg-3);
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.auth-trust svg { flex: none; margin-top: 2px; color: var(--ok); }
.auth-foot { font-size: 11.5px; letter-spacing: .04em; color: var(--fg-3); text-align: center; }
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 64px 24px 30px; gap: 14px; }
  .auth-feats, .auth-preview { display: none; }
  .auth-hero { font-size: 32px; }
  .auth-lede { font-size: 15px; }
  .auth-panel { justify-content: flex-start; padding: 28px 20px 28px; }
  .auth-lang .on { background: rgba(255,255,255,.9); color: #1c1c1a; }
  .auth-lang { background: rgba(255,255,255,.14); }
  .auth-lang button:not(.on) { color: rgba(255,255,255,.85); }
}

/* centred by its own width: placed at left 50% it could only use half the screen, and
   "Chat and 1 piece of work deleted · Undo" broke onto two lines on a phone */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 70;
  width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 13.5px;
  line-height: 1.4; box-shadow: var(--shadow); animation: up .2s; }
.toast.bad { background: var(--bad); color: #fff; }
/* with an action (Undo): a snackbar. Icon, the notice on one line (cut short, never
   wrapped), the button, and a bar that runs out while it can still be undone */
.toast.has-action { display: flex; align-items: center; gap: 10px; min-height: 48px; overflow: hidden;
  padding: 6px 6px 6px 14px; border-radius: 14px; font-weight: 500;
  background: var(--snack-bg); color: var(--snack-fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12); }
.toast-icon { flex-shrink: 0; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--snack-fg) 12%, transparent); opacity: .9; }
.toast-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast-action { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  margin-left: 4px; padding: 8px 12px; border-radius: 10px; font-weight: 700; color: var(--snack-accent);
  background: color-mix(in srgb, var(--snack-accent) 16%, transparent); }
.toast-action:hover { background: color-mix(in srgb, var(--snack-accent) 24%, transparent); }
.toast-time { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: left;
  background: var(--snack-accent); opacity: .7; animation: toast-time var(--toast-ms, 6s) linear forwards; }
@keyframes toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .toast-time { animation: none; } }
.toast-action:active { transform: scale(.97); }

@media (max-width: 600px) {
  .shell { padding: 0 12px; }
  .starters { grid-template-columns: 1fr; }
  .composer-hint { display: none; }
  .who-status { max-width: 62vw; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* switches and the mobile tools list */
.switch { flex: none; width: 42px; height: 24px; border-radius: 12px; background: var(--surface-3, var(--line));
  position: relative; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(18px); }
/* a tap being saved: the switch already shows where it goes, locked */
.switch[aria-busy="true"] { opacity: .6; cursor: progress; }
.tool-groups { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.tool-group { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.row-title.sm { font-size: 14px; }
.tool-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface-2); }
.tool-item.dim { opacity: .6; }
.tool-ex { font-size: 12.5px; color: var(--fg-3); margin-top: 3px; }

/* plugin settings: a plugin's server-wide form at the bottom of Settings, edited in a sheet */
.plugset-error { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--bad); font-size: 14px; }
.plugset-group { gap: 14px; }
.plugset-group > .label { padding: 4px 0 0; }
.plugset-group + .plugset-group { border-top: 1px solid var(--line); padding-top: 4px; }
.plugset-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.plugset-field .row-sub { -webkit-line-clamp: unset; }
.plugset-unit { display: flex; align-items: center; gap: 8px; }
.plugset-unit .input { flex: 0 1 140px; }
.plugset-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; font-size: 12.5px; color: var(--fg-3); }
.plugset-link { font-size: 12.5px; font-weight: 600; color: var(--accent); padding: 2px 0; }
.plugset-link.danger-text { color: var(--bad); }
.plugset-err { font-size: 12.5px; color: var(--bad); overflow-wrap: anywhere; }
.input[aria-invalid="true"] { border-color: var(--bad); }
/* Save stays in reach while a long form scrolls (and above the phone's keyboard) */
.plugset-actions { position: sticky; bottom: -28px; margin-bottom: -28px; padding: 10px 0 28px; flex-wrap: nowrap;
  background: var(--surface); border-top: 1px solid var(--line); }
.plugset-actions .btn { flex: 1; }

/* brand tagline under the name: L·I·A·N initials stand out */
.tagline { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; margin: -4px 0 6px;
  font-size: 12.5px; letter-spacing: .02em; color: var(--fg-3); }
.tagline b { color: var(--accent); font-weight: 700; }

/* goals look different from delegated work: violet tint, stripe, progress ring */
:root { --goal: #7C5CFF; }
.card.goal { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--goal) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--goal) 10%, var(--surface)), var(--surface) 70%); padding-left: 18px; }
.card.goal::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--goal); }
.card.goal .card-kind { color: var(--goal); }
.ring { width: 38px; height: 38px; flex: none; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: color-mix(in srgb, var(--goal) 18%, transparent); stroke-width: 4; }
.ring-fg { fill: none; stroke: var(--goal); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset .4s; }
.card.task { border-left: 1px solid var(--line); }
/* work and goals in the chat: one line each, details open in their panel */
.card.line { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.card.line .card-title { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* running work: its title, and under it the step it is on, both one line */
.card.line .card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.card.line .card-main .card-title { flex: none; }
.card-now { font-size: 12.5px; color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.line .card-sub { margin: 0; flex: none; font-size: 12.5px; }
.card.line > svg:first-child { flex: none; color: var(--fg-3); }
.card.line.goal { padding-left: 16px; }
.card.line .ring { width: 22px; height: 22px; }
/* a card whose work, goal or schedule was deleted: it stays in the conversation, quiet, and opens nothing */
.card.line.gone { background: transparent; border-style: dashed; color: var(--fg-3); cursor: default; }
.card.line.gone .card-title { color: var(--fg-2); }
.busy-line { display: flex; align-items: center; gap: 6px; color: var(--accent); }
.goal-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; padding: 3px 8px; border-radius: 999px;
  font-size: 12px; color: var(--goal); background: color-mix(in srgb, var(--goal) 10%, transparent); cursor: pointer; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-group { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 10px;
  color: var(--goal); background: color-mix(in srgb, var(--goal) 8%, transparent); }
.goal-group-t { font-weight: 650; font-size: 14px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal-group-s { font-size: 12px; color: var(--fg-3); }

/* service connections */
.conn-badge { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -.02em; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.conn-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); }
.conn-card .btn { align-self: flex-start; }
.conn-tools { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.conn-tool { display: flex; align-items: flex-start; gap: 10px; }
.btn.danger { color: var(--bad); }
.input::placeholder, textarea::placeholder { color: var(--fg-3); font-weight: 400; opacity: 1; }
.pv-card .pill { background: #ebfbee; color: #2f9e44; }

/* wide screens: persistent sidebar + centred content column */
.frame { height: var(--app-h, 100dvh); display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px 14px;
  display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
/* the menu's top: the companion and its greeting beside it, centred on the figure */
.side-brand { display: flex; align-items: center; gap: 6px; min-width: 0; margin: -6px 0 2px; }
.side-me { width: 72px; height: 72px; display: grid; place-items: center; flex: none; }
/* its drawing has room around the figure, pulled in here */
.companion.side { display: block; width: 88px; height: 88px; margin: -8px; }
.side-hello { min-width: 0; font-weight: 650; font-size: 16px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Chat's row with a small + where other rows show their count */
.nav-row { position: relative; }
.nav-row > .nav { width: 100%; padding-right: 40px; }
.nav-add { position: absolute; right: 8px; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  border-radius: 8px; display: grid; place-items: center; color: var(--fg-2); transition: background .15s, color .15s; }
.nav-add:hover { background: var(--surface-2); color: var(--fg); }
.nav-add:active { background: var(--surface-3, var(--line)); }
.nav-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.frame-main { min-width: 0; min-height: 0; display: flex; }
.frame-main .shell { flex: 1; max-width: 880px; width: 100%; }
.frame .top { grid-template-columns: 44px 1fr 44px; }

/* one primary colour across sign-in and the app: the brand indigo→violet */
:root { --brand: linear-gradient(135deg, #3b5bdb, #6a4cf5); }
.btn.primary, .send:not(.stop) { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(74,84,230,.22); }
.btn.primary:hover:not(:disabled), .send:not(.stop):hover { opacity: 1; filter: brightness(1.07); }
.btn.primary:disabled { box-shadow: none; }

/* VM live view */
.vm-frame { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: #0e0f14; aspect-ratio: 16 / 10; max-width: 100%; box-shadow: var(--shadow); }
.vm-frame img { display: block; width: 100%; height: 100%; object-fit: contain; cursor: crosshair; user-select: none; }
.vm-live { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); padding: 4px 9px; border-radius: 999px; }
.vm-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d5e; animation: blink 1.4s ease-in-out infinite; }
.vm-live.off i { background: #8c8c86; animation: none; }
.vm-tap { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  border: 2px solid #7c95ff; background: rgba(124,149,255,.25); pointer-events: none; animation: vmtap .6s ease-out forwards; }
@keyframes vmtap { to { transform: scale(1.8); opacity: 0; } }
.vm-type { display: flex; gap: 8px; }
.vm-type .input { flex: 1; min-width: 0; }
.vm-keys { display: flex; flex-wrap: wrap; gap: 6px; }
.small { font-size: 12.5px; }
.vm-fs { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 17px; display: grid; place-items: center; }
.vm-stage { display: flex; flex-direction: column; gap: 10px; }
/* tap the picture directly, or move a pointer like a touchpad (#433) */
.vm-mode { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vm-mode .seg button { white-space: nowrap; }
.vm-frame.pad img { cursor: default; }
/* two fingers zoom the picture, so the page must not take the gesture */
.vm-frame img { touch-action: none; }
.vm-zoom-reset { position: absolute; left: 8px; bottom: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 600; }
.vm-cursor { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.55); pointer-events: none; }
.vm-cursor::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.vm-stage.full .vm-mode .muted { color: #aaa; }
.vm-stage.full { position: fixed; inset: 0; z-index: 80; background: #0b0c10; padding: calc(8px + env(safe-area-inset-top, 0px)) 8px calc(10px + env(safe-area-inset-bottom, 0px)); }
.vm-stage.full .vm-frame { flex: 1; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 10px; }
.vm-stage.full .vm-keys .btn { background: rgba(255,255,255,.1); color: #fff; }
.vm-stage.full .input { background: #16171d; border-color: #2a2b33; color: #eee; }

/* settings: account first, sign out in reach */
.row-card.account { display: flex; align-items: center; gap: 14px; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; flex: none; }
.link-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.link-row .row-title { flex: 1; }
.link-row svg:last-child, .page-card > svg:last-child { transform: rotate(180deg); color: var(--fg-3); flex: none; }
/* Knowledge: what the latest organizing pass did, and the pages it just changed */
.know-pass { margin: 6px 2px 0; }
.know-fresh { margin-left: 6px; vertical-align: middle; }
.know-portrait { text-align: left; gap: 8px; }
.know-told { gap: 6px; margin-bottom: 10px; }
.know-told-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.know-portrait .prose h2, .know-portrait .prose h3 { font-size: 15px; margin: 10px 0 4px; }
.me-card { cursor: pointer; border-radius: 12px; padding: 10px 8px 4px; }
.me-card:hover { background: var(--surface-2); }
.me-card .me-text { flex: 1; min-width: 0; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }

/* instructions queued on a running task */
.instruct .msgs { display: flex; flex-direction: column; gap: 6px; }
.imsg { display: flex; justify-content: space-between; gap: 10px; background: var(--accent-soft);
  border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.imsg.read { background: var(--surface-2); color: var(--fg-2); }
.imsg-st { font-size: 12px; color: var(--fg-3); white-space: nowrap; }
.instruct textarea { flex: 1; min-width: 0; resize: vertical; }
.danger-text { color: var(--bad); }
.card.approval.done { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px;
  color: var(--fg-2); background: var(--surface-2); border-color: transparent; }
/* the Work page: what needs the person, goals with their running work, the rest */
.group.needs .row-card.need { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); text-align: left; }
.row-card.need .btn { flex: none; pointer-events: none; }
.goal-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.goal-card.paused { opacity: .7; }
.goal-card-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px;
  text-align: left; color: var(--fg); }
.goal-card:hover .goal-card-head { background: var(--surface-2); }
.goal-card { cursor: pointer; }
.goal-card-head .ring { width: 30px; height: 30px; }
.goal-card-head > svg:last-child { transform: rotate(180deg); color: var(--fg-3); flex: none; }
/* Work page: in progress | finished */
.work-tabs { margin-bottom: 14px; flex-wrap: nowrap; }
.work-tabs .count { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--line);
  font-size: 11px; font-variant-numeric: tabular-nums; }
.work-tabs button.on .count { background: var(--accent-soft); color: var(--accent); }
.done-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.keep-line { display: flex; align-items: center; gap: 8px; color: var(--fg-3); font-size: 13px; }
.keep-line .link { color: var(--accent); background: none; padding: 0; font-size: 13px; }
.done-head > .btn { margin-left: auto; }
.done-row { display: flex; align-items: center; gap: 10px; }
.done-row .row-main { flex: 1; min-width: 0; }
/* finished since the person last looked */
.done-row .new-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  margin-right: 6px; vertical-align: middle; }

/* files attached to the next message, and in sent messages */
.composer .attach { flex: none; align-self: flex-end; margin-bottom: 1px; color: var(--fg-2); }
.att-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 4px 8px; }
.att-chip { display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 4px 4px 4px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 12.5px; color: var(--fg-2); }
.att-chip.up { opacity: .55; }
.att-chip img { width: 32px; height: 32px; object-fit: cover; border-radius: 8px; flex: none; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.att-x { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-3); }
.att-x:hover { background: var(--surface-2); color: var(--fg); }
.msg.me .cards { align-items: flex-end; }
.att-img { display: block; max-width: min(260px, 70vw); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2); padding: 0; }
.att-img img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.send:disabled { opacity: .45; }

/* the work a chat was opened for: its place is marked for a moment */
.msg.flash { border-radius: 16px; animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .msg.flash { animation: none; box-shadow: 0 0 0 2px var(--accent); } }
/* work for a goal: the goal rides on top of its card, one joined block */
.card-for-goal { display: flex; flex-direction: column; }
.card-goal { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 6px 12px; text-align: left;
  font-size: 12px; color: var(--goal); background: color-mix(in srgb, var(--goal) 8%, var(--surface));
  border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
.card-goal-t { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-goal-n { flex: none; color: var(--fg-3); }
.card-for-goal > .card { border-radius: 0 0 14px 14px; }

/* a file the work made, read in place (markdown rendered, other text as is) */
.file-view { font-size: 14.5px; line-height: 1.65; overflow-wrap: anywhere; }
.file-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55;
  background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; }
button.card.file { width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; }

/* deleting a piece of work from a list: swipe or long-press, then the row asks in place */
/* swipe to delete (Swipeable): the row moves over a red Delete layer, arms past a point,
   slides out and the list closes over it */
.swipe { position: relative; border-radius: 14px; flex-shrink: 0; }
.convs .swipe { border-radius: 10px; }
.swipe > :not(.swipe-under) { position: relative; touch-action: pan-y; }
.convs .swipe > .conv-row { background: var(--surface); border-radius: 10px; }
.swipe-under { position: absolute; inset: 1px; border-radius: inherit; background: var(--bad);
  display: flex; align-items: stretch; justify-content: flex-end; opacity: 0; transition: background .18s; }
.swipe[data-side="right"] .swipe-under { justify-content: flex-start; }
.swipe.moving .swipe-under, .swipe.open .swipe-under { opacity: 1; }
.swipe.armed .swipe-under { background: color-mix(in srgb, var(--bad) 82%, #000); }
/* the icon alone: a word under it was cut off in short rows (the chat list) */
.swipe-del { width: 72px; display: flex; align-items: center; justify-content: center; color: #fff; }
.swipe-del svg { transform: scale(calc(.72 + .28 * var(--p, 0))); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.swipe.armed .swipe-del svg { transform: scale(1.22); }
.swipe.moving > .row-card, .swipe.moving > .goal-card { box-shadow: var(--shadow); }
.swipe > .settling { transition: transform .32s cubic-bezier(.2, .9, .25, 1.12); }
.swipe.leaving > :not(.swipe-under) { transition: transform .18s cubic-bezier(.4, 0, 1, 1); }
.group { --gap: 8px; }
.convs { --gap: 1px; }
.swipe.folding { overflow: hidden; opacity: 0; margin-bottom: calc(-1 * var(--gap, 0px));
  transition: height .22s cubic-bezier(.3, 0, .2, 1), margin .22s, opacity .22s; }
@media (prefers-reduced-motion: reduce) {
  .swipe > .settling, .swipe.leaving > :not(.swipe-under), .swipe.folding, .swipe-del svg { transition: none; }
}

/* brief page */
/* Now is a slot, not a third kind: the top-priority item per source is promoted to
   the hero and removed from its row. A single tint gradient flows across the whole
   page (brief.svg), light at the top and richest at the bottom, colored by the Now
   item's source; the hero sits transparent on it. */
/* Whole-screen tint per brief.svg: one vertical gradient, light at the top and
   richest at the bottom, colored by the Now item's source. Applied to the page
   so it covers hero + rows alike, not just the hero box. */
.brief-tint { background: linear-gradient(180deg,
  color-mix(in srgb, var(--tint, var(--accent)) 3%, transparent) 0%,
  color-mix(in srgb, var(--tint, var(--accent)) 11%, transparent) 52%,
  color-mix(in srgb, var(--tint, var(--accent)) 26%, transparent) 100%); }
.brief-tint--discretion { --tint: var(--accent); }
.brief-tint--cognition { --tint: var(--goal); }
/* Card text (titles, stats, model-written bodies) breaks between words, not inside a
   Korean word; a single word longer than the line may still break. */
.brief-hero, .brief-card { word-break: keep-all; overflow-wrap: anywhere; }
/* a stat (a price, a date) never breaks inside: it moves to the next row instead */
.brief-hero-stats, .brief-card-stats { overflow-wrap: normal; }
/* The hero sits transparent on the page tint. flex-shrink:0 stops the page's flex
   column (overflow-y:auto) from squishing it: overflow:hidden would otherwise turn
   min-height:auto into 0 and clip stats/actions/dots below the body. */
.brief-hero { position: relative; overflow: hidden; border-radius: var(--r); padding: 20px 20px 18px;
  margin: 0 0 20px; display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
.brief-hero-watermark { position: absolute; top: 4px; right: -8px; opacity: .15; pointer-events: none; }
.brief-hero--discretion .brief-hero-watermark { color: var(--accent); }
.brief-hero--cognition .brief-hero-watermark { color: var(--goal); }
/* Fixed dark chip in both themes, like the 21.png reference's black "Now" pill;
   var(--fg) would invert to a light chip in dark mode and read wrong. */
/* "Now" and where the card came from share one line above the title */
.brief-hero-meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brief-hero-meta .brief-hero-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-hero-badge { display: inline-flex; align-items: center; gap: 6px; flex: none;
  background: #1c1c1a; color: #fff; border-radius: 999px; padding: 4px 12px 4px 10px;
  font-size: 11.5px; font-weight: 600; }
.brief-hero-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--ok); }
.brief-hero-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.brief-hero-body { font-size: 14px; color: var(--fg-2); line-height: 1.55; }
.brief-hero-stats { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 4px; }
.brief-hero-stat-label { font-size: 10.5px; color: var(--fg-3); }
.brief-hero-stat-value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.brief-hero-actions { display: flex; gap: 10px; margin-top: 6px; }
.brief-hero-actions .btn { border-radius: 999px; }
.brief-hero-actions .btn.primary { flex: 2; }
.brief-hero-actions .btn.ghost { flex: 1; min-width: 0; }
.brief-dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.brief-dot { width: 6px; height: 6px; padding: 0; border-radius: 999px; background: var(--line); }
.brief-dot.on { background: var(--accent); }

/* Now slot: heroes sit side by side in a snap carousel; swipe or tap a dot to
   page between the top discretion and top cognition card. The wrap carries the
   bottom spacing the hero used to own, so dots clear the row beneath. */
.brief-now-wrap { margin: -6px 0 20px; flex-shrink: 0; }
.brief-now { display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.brief-now::-webkit-scrollbar { display: none; }
.brief-now > .brief-hero { width: 100%; flex: none; scroll-snap-align: start; margin: 0; }
.brief-now-wrap .brief-dots { margin-top: 10px; }

/* Discretion: 268×335 (4:5). Shorter than 3:4 + looser padding/line-height so the
   card fills with content and the void between the sub line and action buttons
   shrinks instead of leaving a tall empty gap. Cognition: 150×200 (3:4). */
.brief-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 4px; margin-bottom: 16px; flex-shrink: 0; scrollbar-width: none; -ms-overflow-style: none; }
.brief-row::-webkit-scrollbar { display: none; }
.brief-row:last-child { margin-bottom: 0; }
.brief-row > * { scroll-snap-align: start; flex: none; }
.brief-card { min-height: 200px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; gap: 6px;
  overflow: hidden; }
/* a minimum, not a fixed ratio: a card with a photo, stats and actions grows to fit
   instead of clipping its buttons, and the row's cards stretch to the tallest one */
.brief-row--discretion .brief-card { width: 268px; min-height: 335px; padding: 22px 18px; gap: 12px; }
.brief-row--cognition .brief-card { width: 150px; padding: 12px; }
.brief-card-time { font-size: 10px; color: var(--fg-3); align-self: flex-end; }
.brief-card-media { position: relative; border-radius: 14px; overflow: hidden; flex: none;
  display: flex; align-items: flex-end; }
.brief-row--discretion .brief-card-media { height: 132px; }
.brief-row--cognition .brief-card-media { height: 72px; border-radius: 12px; }
.brief-card-media-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; opacity: .55; display: flex; }
.brief-card-media-label { position: relative; margin: 8px; padding: 3px 8px; border-radius: 8px;
  background: rgba(0,0,0,.22); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: -.01em; }
.brief-card-title { font-weight: 800; letter-spacing: -.02em; }
.brief-row--discretion .brief-card-title { font-size: 16px; line-height: 1.4; }
.brief-row--cognition .brief-card-title { font-size: 12.5px; line-height: 1.3; }
.brief-card-sub { color: var(--fg-2); overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brief-row--discretion .brief-card-sub { font-size: 12px; line-height: 1.55; }
.brief-row--cognition .brief-card-sub { font-size: 10px; line-height: 1.35; }
.tag-bar { display: flex; align-items: center; gap: 6px; }
.tag-bar-label { font-size: 10px; color: var(--fg-2); flex-shrink: 0; min-width: 52px; }
.tag-bar-track { flex: 1; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.tag-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); }
.tag-bar--top .tag-bar-label { color: var(--fg); font-weight: 700; }
.tag-bar--top .tag-bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.brief-hero-tags { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; width: 100%; max-width: 340px; }
.brief-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.brief-card-tag { font-size: 10px; color: var(--fg-2); background: var(--surface-2);
  border-radius: 999px; padding: 2px 8px; }
.brief-card-actions { display: flex; gap: 6px; margin-top: auto; }
.brief-card-actions .btn { flex: 1; font-size: 11px; padding: 6px 8px; border-radius: 999px; }

.brief-card-stats { display: flex; flex-direction: column; gap: 3px; }
.brief-card-stat { display: flex; justify-content: space-between; gap: 6px; font-size: 10px; }
.brief-card-stat-label { color: var(--fg-3); }
.brief-card-stat-value { color: var(--fg-2); font-weight: 600; }

/* a card from one photo: the page's one primary action, a pill beside the title */
/* long-press on a card: Delete shows over its top corner; the card can't start a text
   selection or the system's long-press menu on the way */
.brief-hero, .brief-card { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.brief-card { position: relative; }
.brief-armed { outline: 2px solid var(--bad); outline-offset: -2px; }
.brief-del { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center;
  gap: 4px; padding: 7px 12px; border: 0; border-radius: 999px; background: var(--bad);
  color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn.brief-make { border-radius: 999px; padding: 9px 18px; flex: none; }
/* A card from photos opens with them, the full width of the card: one photo alone, a day's
   photos as one large and two stacked beside it; the last says how many more there are. */
.brief-hero-media { display: grid; gap: 4px; height: 188px; border-radius: 18px; overflow: hidden; flex: none;
  margin-bottom: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.brief-hero-media.n2 { grid-template-columns: 1fr 1fr; }
.brief-hero-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.brief-hero-media.n3 > :first-child { grid-row: 1 / 3; }
.brief-hero-shot { position: relative; min-width: 0; min-height: 0; background: var(--surface-2); }
.brief-hero-shot-img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.brief-hero-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.42); color: #fff; font-size: 18px; font-weight: 700; pointer-events: none; }
.brief-hero-from { font-size: 12px; color: var(--fg-2); }
.brief-card-photo { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
/* being made: two soft bars where the body will be; still for people who ask for less motion */
.brief-hero--making { min-height: 220px; }
.brief-hero--making .brief-hero-shot-img { cursor: default; }
.brief-shimmer { display: grid; gap: 8px; max-width: 70%; }
.brief-shimmer i { display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--line) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: brief-shimmer 1.4s ease-in-out infinite; }
.brief-shimmer i + i { width: 60%; }
@keyframes brief-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .brief-shimmer i { animation: none; } }
.brief-hero--making.failed .brief-hero-dot { background: var(--bad); }
/* handed on to chat: the card settles to one quiet line where its buttons were */
.brief-handed { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px;
  font-size: 12.5px; color: var(--fg-3); }
.brief-handed svg { color: var(--ok); flex: none; }
.brief-handed-open { margin-left: auto; border: 0; background: none; padding: 6px 2px; font: inherit;
  font-weight: 600; color: var(--accent); cursor: pointer; }
/* where a photo comes from (sheet) */
.brief-sources { display: flex; flex-direction: column; gap: 8px; }
.brief-source > svg { flex: none; color: var(--fg-2); }

/* Call progress shares the original chat composer and stays within its scrolling space. */
.chat-call { flex: none; max-height: 38%; overflow-y: auto; margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
/* A finished call settles to one quiet line above the chat. */
.chat-call.settled { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: none; color: var(--fg-3); font-size: 13px; }
.chat-call.settled .call-status { font-weight: 500; font-size: 13px; flex: 1; min-width: 0; }
.chat-call.settled .link { color: var(--accent); background: none; padding: 0; font-size: 13px; flex: none; }
.call-loading .call-note { margin: 0; }
.call-time { color: var(--fg-3); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }
.call-delivery { color: var(--fg-3); }
.call-notice { color: var(--fg-3); font-size: 13px; display: flex; gap: 8px; align-items: baseline; }
.call-facts { margin: 8px 0; }
.call-facts ul { margin: 4px 0 0; padding-inline-start: 18px; font-size: 14px; }
.call-facts li { overflow-wrap: anywhere; }
.call-older { align-self: flex-start; margin-bottom: 6px; }
.call-details > summary > span:first-child { margin-inline-end: 4px; }
.call-mark { display: inline-flex; vertical-align: -2px; margin-inline-end: 6px; color: var(--fg-3); }
.done-filter { margin-bottom: 12px; }

/* Flex details must preserve the native closed state within the optional call panel. */
.call-details:not([open]) > :not(summary) { display: none; }

/* under the step: what the work is doing right now */
.card-now.doing { color: var(--fg-3); font-size: 12px; }
.row-main > .card-now.doing { display: block; margin-top: 2px; }

/* running work: its latest step, outside the folded log */
.now-line { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 2px; }
.now-line .now-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-line .pulse { flex: none; color: var(--accent); }

/* a log line's detail (a brief handed on can run long): two lines, tap for the rest */
.tl-d:not(.open) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }

/* Settings › Character: each companion greeting in its tile, the chosen one marked */
.character-picks { display: flex; gap: 10px; margin-top: 10px; }
.character-pick { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px 8px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg-2); font-size: 13px; }
.character-pick.on { border-color: var(--accent); color: var(--fg); font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent) inset; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.character-pick .pick-canvas { width: 64px; height: 64px; }
/* Connection actions sit at the start of the row, including on narrow phones. */
.conn-menu .menu { left: 0; right: auto; }

/* Connection errors must remain readable at phone width. */
.conn-row .row-sub { white-space: normal; overflow-wrap: anywhere; }

/* Developer settings › Models: a mode, then a model for each part it uses */
.models-card { gap: 10px; }
.model-slot { display: flex; flex-direction: column; gap: 4px; }
.model-slot-name { font-weight: 600; font-size: 14px; }
.model-slot select.input { width: 100%; }
.model-url { display: flex; gap: 8px; align-items: center; }
.model-url .input { flex: 1; min-width: 0; }
.model-error { color: var(--bad); }
/* what the work was asked, above its steps: two lines, a tap shows the rest */
.task-asked { margin: 4px 0 2px; }
.task-asked .label { padding-left: 0; }
.task-asked .tl-d { font-size: 13.5px; color: var(--fg-2); line-height: 1.55; }

/* when the Brief's cards were made, and making them again: one quiet line above Now */
.brief-fresh { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0;
  font-size: 12.5px; color: var(--muted); }
.brief-card-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

/* a card's picture drawn from the card itself (no image model): its number, bars, tags or
   Ian in the card's mood; white on the template's colours in either theme */
.brief-drawn-metric { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end;
  position: absolute; inset: 14px 16px; color: #fff; }
.brief-drawn-value { font-size: 34px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.05; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* a longer number ("36,950 won") steps down so it stays on one line inside its tile */
.brief-drawn-value.long { font-size: 26px; } .brief-drawn-value.longer { font-size: 20px; }
.brief-row--cognition .brief-drawn-value { font-size: 22px; }
.brief-row--cognition .brief-drawn-value.long { font-size: 18px; } .brief-row--cognition .brief-drawn-value.longer { font-size: 15px; }
.brief-drawn-label { font-size: 12px; opacity: .85; margin-top: 2px; }
.brief-drawn-bars { position: absolute; inset: 14px 16px 10px; display: flex; align-items: flex-end; gap: 8px; }
.brief-drawn-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.brief-drawn-bar i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: rgba(255,255,255,.85); }
.brief-drawn-bar em { font-style: normal; font-size: 11px; color: #fff; opacity: .9; white-space: nowrap; }
.brief-drawn-tags { position: absolute; inset: 14px 16px; display: flex; flex-wrap: wrap; align-content: center; gap: 6px; }
.brief-drawn-tags span { padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.22); color: #fff;
  font-size: 13px; font-weight: 600; }
/* the cards' pictures: one line style, at full strength in the card's colour (white on a
   coloured tile, the subject's colour on the top card) */
.brief-art, .brief-drawn-art, .brief-drawn-badge { display: inline-block; flex: none; }
.brief-art.drawn, .brief-drawn-art.drawn, .brief-drawn-badge.drawn { background: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.brief-art.line svg, .brief-drawn-art.line svg, .brief-drawn-badge.line svg { width: 100%; height: 100%; stroke-width: 2.2; }
.brief-hero-watermark.art { opacity: .9; top: 54px; right: 20px; width: 64px; height: 64px; display: flex;
  align-items: center; justify-content: center; }
.brief-art.own, .brief-drawn-art.own, .brief-drawn-badge.own { object-fit: contain; }
.brief-card-media-icon.art { opacity: 1; color: #fff; }
.brief-drawn-art { position: absolute; top: 0; right: 0; color: #fff; opacity: .95; }
/* a developer's tools, shown by three taps on the title */
.brief-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
/* Developer settings › Brief look: three small cards drawn the way the choice looks */
.brief-look-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.brief-look-tile { height: 64px; align-items: center; justify-content: center; }
/* the title and when the cards were made share one line, centred on each other */
.brief-head h2 { margin: 0; }
.brief-head { margin: 6px 0 12px; }
/* the picture of what a card is about stands clear of its title */
.brief-hero--art .brief-hero-title, .brief-hero--art .brief-hero-body { padding-right: 84px; }
/* Ian beside what the work is about: the subject's picture in front, Ian behind on the right */
.brief-drawn-kind { position: absolute; inset: 0; }
.brief-drawn-badge { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: #fff; }
.brief-drawn-pose { position: absolute; right: 8px; bottom: 0; height: 92%; aspect-ratio: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,.18)); }
/* every kit fits its companion in a square canvas, as above the chat */
.brief-drawn-pose canvas { display: block; width: 100%; height: 100%; }
.brief-calm { display: flex; align-items: center; gap: 8px; margin: 4px 0 16px; padding: 14px 16px; border-radius: 16px;
  background: var(--bg2); color: var(--muted); font-size: 14px; }

/* Ian's own notices (work that finished): frosted glass with dark text that pops in with a
   small bounce, as the companion's cards over other apps (OverlayCard on Android) */
.toast.glass { background: rgba(255, 255, 255, .78); color: #1b1d2a; border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(20, 22, 40, .18); animation: toast-pop .42s cubic-bezier(.34, 1.56, .64, 1); }
.toast.glass.bad { color: #b42318; }
.toast.glass .toast-action { color: #1b1d2a; }
@keyframes toast-pop { from { opacity: 0; transform: translate(-50%, 24px) scale(.86); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .toast.glass { animation: none; } }

/* Developer settings › Brief look: soft tints and plain cards instead of gradient tiles */
.brief-design--soft .brief-card-media { background: color-mix(in srgb, var(--kind) 16%, var(--surface)) !important; }
.brief-design--plain .brief-card-media { background: var(--surface-2) !important; }
.brief-design--soft .brief-card-media-icon.art, .brief-design--soft .brief-drawn-badge,
.brief-design--soft .brief-drawn-art { color: var(--kind); }
.brief-design--plain .brief-card-media-icon.art, .brief-design--plain .brief-drawn-badge,
.brief-design--plain .brief-drawn-art { color: var(--fg); }
.brief-design--soft .brief-drawn-metric, .brief-design--plain .brief-drawn-metric,
.brief-design--soft .brief-drawn-bar em, .brief-design--plain .brief-drawn-bar em { color: var(--fg); }
.brief-design--soft .brief-drawn-bar i { background: var(--kind); }
.brief-design--plain .brief-drawn-bar i { background: var(--fg-2); }
.brief-design--soft .brief-drawn-tags span, .brief-design--plain .brief-drawn-tags span { color: var(--fg); }
/* colour icons keep their own colours: on a gradient tile they sit on a white tile of their own */
.brief-design--gradient .brief-drawn-badge.own, .brief-design--gradient .brief-card-media-icon .own {
  background: #fff; border-radius: 18px; padding: 8px; box-shadow: 0 6px 14px rgba(0, 0, 0, .14); }
/* Settings › reset: what goes, what stays, and the tick that lets the delete button work */
.reset-card { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.reset-list { margin: 6px 0 4px; padding-left: 18px; color: var(--fg-2); font-size: 13.5px; line-height: 1.55; }
.reset-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 6px 0; cursor: pointer; }
.reset-agree input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--bad); }
.reset-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* a real-time suggestion waiting in the notifications */
.live-row { gap: 6px; border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.live-head { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.live-head .row-title { flex: 1; color: var(--fg); }
.live-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* a web page the work made, shown as the page (Files, chat): tall enough to read, no scripts */
.file-html { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
/* What work is doing this moment: thinking pulses (a model call is working, not stuck);
   waiting for a worker, or a worker that stopped answering, is said in the warning colour */
.step-latest.thinking::before, .card-now.doing.thinking::before {
  content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: middle;
  border-radius: 999px; background: var(--accent); animation: live-think 1.2s ease-in-out infinite; }
@keyframes live-think { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .step-latest.thinking::before, .card-now.doing.thinking::before { animation: none; } }
.step-latest.queued, .step-latest.stalled, .card-now.doing.queued, .card-now.doing.stalled,
.now-line.queued .now-t, .now-line.stalled .now-t { color: var(--warn); }
/* Settings › change password: the fields of the sign-in screen, under the account */
.pw-card { gap: 12px; }
.pw-card .row { gap: 8px; }
.pw-card .callout { display: flex; align-items: center; gap: 8px; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); cursor: pointer; }

/* device pass: how long a fingerprint approval lasts, beside the approve button */
.pass-for { align-self: flex-start; margin: 10px 0 8px; font: inherit; font-size: 13px; padding: 4px 8px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.pass-actions { margin-top: 10px; }

/* a question asked as a short form: label above its input, one primary send */
.ask-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; padding: 14px 16px 16px; }
.ask-form .card-top { margin-bottom: 2px; }
.ask-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--fg-2); }
.ask-field input { font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.ask-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

/* sites reached through the person's device: one small chip each, removable */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; padding: 4px 6px 4px 10px;
  border-radius: 999px; background: var(--surface-2); color: var(--fg); }
.chip-x { display: inline-flex; border: 0; background: none; color: var(--fg-3); padding: 2px; cursor: pointer; }

/* the coach models' download in Settings */
.models-bar { width: 100%; height: 6px; margin-top: 10px; accent-color: var(--accent); }
