/* TO-152: Memory lives in the drawer, and hosts link only zen-drawer.css. */
@import url("tomo-memory.css");

/*
  The ZenAI drawer and its brief list (U2/U3, TO-50).

  Its own stylesheet, like tomo-visibility.css. The drawer carries .tomo-face, so every token
  below (and the dark palette under prefers-color-scheme) comes from tomo-face.css. Nothing here
  invents a colour. Flat, like the chat: briefs are steps divided by hairlines, not boxes.

  Hosts include it after tomo-face.css and tomo-visibility.css, with tomo-share.css for the
  share dialog the owner's Share opens (TO-118):
    <link rel="stylesheet" href="_content/Tomo.Face/zen-drawer.css" />
    <link rel="stylesheet" href="_content/Tomo.Face/tomo-share.css" />
*/

/* ---------- The drawer: docked on the right, a bottom sheet on a phone ---------- */

/* --zen-drawer-top: where the drawer starts. A host with a top bar sets it to that bar's height,
   so the bar (its bell, its account and customer pickers) stays reachable while the drawer is
   open. Unset, it is 0 and the drawer is full height, as before. Full screen keeps it too.
   --zen-drawer-bottom: the same for a host's bottom bar (a mobile tab bar): the drawer ends above
   it, so the bar stays reachable. Unset, 0. The phone sheet sits on it too.
   --zen-drawer-z: the drawer's stacking level. A host sets it above its page content (sticky
   toolbars and the like) and below its dialogs and toasts. Unset, 40, as before. */
.zen-drawer.tomo-face {
  position: fixed;
  inset: var(--zen-drawer-top, 0px) 0 var(--zen-drawer-bottom, 0px) auto;
  z-index: var(--zen-drawer-z, 40);
  box-sizing: border-box;
  /* TO-144 (Z1): 560px, 640px on screens 1600px or wider, and whatever the grip set
     (--zen-drawer-w, 480 to 800px). Full width on a tablet and a phone. */
  width: var(--zen-drawer-w, 560px);
  height: calc(100dvh - var(--zen-drawer-top, 0px) - var(--zen-drawer-bottom, 0px));
  max-width: 100vw;
  background: var(--tomo-surface);
  border-left: 1px solid var(--tomo-border-light);
  box-shadow: var(--tomo-shadow-lg);
  animation: zen-drawer-in var(--tomo-duration-normal) var(--tomo-ease-out);
}

/* No token: one calm not-connected state with, at most, one Connect. */
.zen-drawer__signin { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tomo-space-3); }
.zen-drawer__signin .zen-connect__title,
.zen-drawer__signin .zen-connect__lede { margin: 0; }

@keyframes zen-drawer-in {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.zen-drawer__head {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--tomo-space-2);
  padding: var(--tomo-space-3) var(--tomo-space-4);
  border-bottom: 1px solid var(--tomo-border-subtle);
}

.zen-drawer__mark { width: 16px; height: 16px; }

.zen-drawer__name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.zen-drawer__acts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

/* TO-182: Close is the last, fixed-width item and never shrinks. "Brief this report" left the
   header, so the row fits down to the drawer's 480px minimum; the name and the shared-by line
   give way first. */
.zen-drawer__head .zen-drawer__btn,
.zen-drawer__head .zen-drawer__mark,
.zen-drawer__head .zen-switch { flex: none; }
.zen-drawer__name,
.zen-drawer__shared { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.zen-drawer__btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--tomo-radius-sm);
  background: transparent;
  color: var(--tomo-text-muted);
  cursor: pointer;
  transition: background var(--tomo-duration-fast) var(--tomo-ease-out),
              color var(--tomo-duration-fast) var(--tomo-ease-out);
}

.zen-drawer__btn:hover { background: var(--tomo-surface-sunken); color: var(--tomo-text-secondary); }
.zen-drawer__btn:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-drawer__btn--on { background: var(--tomo-accent-subtle); color: var(--tomo-accent); }

/* The body scrolls on its own, never sideways. It is a container, so the parts inside lay out
   by the drawer's width, not the window's. */
.zen-drawer__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  container-type: inline-size;
  container-name: zen-drawer;
}

/* One centred column, as the chat has it. At 380px it is the drawer; full screen (TO-51) keeps it. */
.zen-drawer__column {
  box-sizing: border-box;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  padding: var(--tomo-space-4);
}

.zen-drawer__back {
  display: inline-flex;
  align-items: center;
  gap: var(--tomo-space-1);
  margin: 0 0 var(--tomo-space-3);
  padding: 2px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
}

.zen-drawer__back:hover { color: var(--tomo-accent); }

.zen-drawer__title {
  margin: 0 0 var(--tomo-space-2);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* What your AIs can see sits inside Your connections: no page padding of its own here. */
.zen-drawer .tomo-visibility.tomo-face {
  padding: var(--tomo-space-2) 0 0;
  max-width: none;
}

.zen-drawer .tomo-visibility__title { font-size: 15px; font-weight: 700; }

/* ---------- The list ---------- */

.zen-briefs__head {
  margin: 0 0 var(--tomo-space-1);
  font-size: 13px;
  font-weight: 700;
  color: var(--tomo-text-primary);
}

.zen-briefs__failure { align-items: center; margin-top: var(--tomo-space-3); }
.zen-briefs__failtext { flex: 1; }

.zen-briefs__empty { padding: var(--tomo-space-8) 0; text-align: center; }
/* TO-224: the business picker's choices. */
.zen-briefs__businesses { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--tomo-space-2); margin-top: var(--tomo-space-3); }
.zen-briefs__emptytitle { margin: 0 0 var(--tomo-space-1); font-size: 15px; font-weight: 600; }
.zen-briefs__emptybody { margin: 0; font-size: 13px; color: var(--tomo-text-muted); }

/* ---------- A brief: a flat step, a hairline above ---------- */

.zen-brief {
  display: flex;
  flex-direction: column;
  padding: var(--tomo-space-4) 0;
  border-top: 1px solid var(--tomo-border-subtle);
}

.zen-brief:first-of-type,
.zen-briefs__cards > :first-child { border-top: 0; }

/* Unhide focuses the card it brought back (TO-118): a ring for the keyboard only. */
.zen-brief:focus { outline: none; }
.zen-brief:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 2px; border-radius: var(--tomo-radius-sm); }

/* The card after an Undo line at the top keeps its rule (TO-58). */
.zen-briefs__cards > .zen-brief:first-of-type:not(:first-child) { border-top: 1px solid var(--tomo-border-subtle); }

/* Hide for me, just done: one line in the card's place, with Undo, for this look. */
.zen-brief-hidden {
  display: flex;
  align-items: baseline;
  gap: var(--tomo-space-2);
  padding: var(--tomo-space-3) 0;
  border-top: 1px solid var(--tomo-border-subtle);
  font-size: 13px;
  color: var(--tomo-text-secondary);
}

.zen-brief-hidden .zen-brief__runfail { margin: 0; }

.zen-briefs__cards > .zen-brief-hidden:first-child { border-top: 0; }

/* TO-118: "Hidden for you" at the foot of the list. Open, one hairline line per brief and its Unhide. */

.zen-briefs__hiddenlist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--tomo-border-subtle); }

.zen-briefs__hiddenitem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tomo-space-1) var(--tomo-space-2);
  min-height: 40px;
  padding: 6px 0;
  border-bottom: 1px solid var(--tomo-border-subtle);
  font-size: 13.5px;
}

.zen-briefs__hiddenname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tomo-text-primary); }

.zen-briefs__hiddennote { flex-basis: 100%; font-size: 13px; color: var(--tomo-text-secondary); }

/* TO-205: what a link to a brief outside the customer focus did. Information, not an error. */
.zen-briefs__focusnote { margin: 0 0 var(--tomo-space-3); font-size: 13px; color: var(--tomo-text-secondary); }

.zen-briefs__hiddenitem .zen-brief__runfail { flex-basis: 100%; margin: 0; }

/* The brief the drawer was opened from: a quiet accent rule at the edge, nothing louder. */
.zen-brief--forward {
  margin-inline: calc(var(--tomo-space-3) * -1);
  padding-inline: calc(var(--tomo-space-3) - 2px);
  border-left: 2px solid var(--tomo-accent);
}

.zen-brief__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tomo-text-muted);
}

.zen-brief__name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tomo-text-secondary);
}

.zen-brief__sig {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--tomo-space-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--tomo-accent);
}

.zen-brief__mark { width: 13px; height: 13px; }
.zen-brief__when { font-weight: 500; color: var(--tomo-text-muted); }

.zen-brief__head {
  margin: var(--tomo-space-1) 0 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--tomo-text-primary);
}

.zen-brief__ev {
  margin: var(--tomo-space-1) 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--tomo-text-secondary);
}

.zen-brief__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--tomo-space-2);
}

/* P26 C1: "How this run went" (⋯ → Sources): one line per step, step word in a narrow column. */
.zen-brief__working {
  margin-top: var(--tomo-space-3);
}

.zen-brief__working-h {
  margin: 0 0 var(--tomo-space-1);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tomo-text-secondary);
}

.zen-brief__working-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

.zen-brief__working-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--tomo-space-2);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--tomo-text-secondary);
}

.zen-brief__working-k {
  color: var(--tomo-text-tertiary, var(--tomo-text-secondary));
}

.zen-brief__working-v b {
  font-weight: 600;
  color: var(--tomo-text-primary, inherit);
}

.zen-brief__chip {
  padding: 3px 7px;
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface-sunken);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--tomo-text-secondary);
}

.zen-brief__notrun { margin: var(--tomo-space-2) 0 0; font-size: 14px; font-weight: 600; color: var(--tomo-text-secondary); }
.zen-brief__next { margin: 2px 0 0; font-size: 12px; color: var(--tomo-text-muted); }

.zen-brief__runfail { margin: var(--tomo-space-2) 0 0; font-size: 12px; color: var(--tomo-text-secondary); }

.zen-brief__link {
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--tomo-accent);
  cursor: pointer;
}

/* "Earlier · 31 Aug · 24 Aug": each date opens that run in place. */
.zen-brief__earlier {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin-top: var(--tomo-space-3);
  font-size: 12px;
  color: var(--tomo-text-muted);
}

.zen-brief__earlierlabel { font-weight: 600; }

.zen-brief__date {
  padding: 2px 4px;
  border: 0;
  border-radius: var(--tomo-radius-sm);
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--tomo-accent);
  cursor: pointer;
}

.zen-brief__date:hover { background: var(--tomo-accent-subtle); }
.zen-brief__date:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-brief__date--open { background: var(--tomo-accent-subtle); }

/* An earlier run, opened in place under the latest: indented on a hairline, still no box. */
.zen-brief__past {
  margin-top: var(--tomo-space-3);
  padding-left: var(--tomo-space-3);
  border-left: 1px solid var(--tomo-border-light);
  animation: zen-brief-open var(--tomo-duration-fast) var(--tomo-ease-out);
}

.zen-brief__past .zen-brief__sig { margin-top: 0; }
.zen-brief__past .zen-brief__head { font-size: 14.5px; }

@keyframes zen-brief-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Skeleton: three quiet cards ---------- */

.zen-brief__skel {
  display: block;
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-border-light);
  animation: zen-pulse 1.4s ease-in-out infinite;
}

.zen-brief__skel--label { width: 40%; height: 10px; }
.zen-brief__skel--sig { width: 55%; height: 10px; margin-top: var(--tomo-space-3); }
.zen-brief__skel--head { width: 85%; height: 16px; margin-top: var(--tomo-space-2); }
.zen-brief__skel--ev { width: 100%; height: 12px; margin-top: var(--tomo-space-2); }

@keyframes zen-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- Ask (A3, TO-53): the pill on a card and the drawer's chat ----------
   Behind TomoFaceOptions.AskEnabled, on by default from P22 (TO-64). Flat like the list: the
   brief compact at the head, the thread under it, the composer pinned to the drawer's foot. */

.zen-brief__pills { display: flex; gap: 6px; margin-top: var(--tomo-space-3); }

.zen-brief__pill {
  padding: 4px 12px;
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
  transition: border-color var(--tomo-duration-fast) var(--tomo-ease-out),
              color var(--tomo-duration-fast) var(--tomo-ease-out);
}

.zen-brief__pill:hover { border-color: var(--tomo-accent); color: var(--tomo-accent); }
.zen-brief__pill:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }

/* The chat fills the drawer's height, so the composer sits at its foot even on a short thread. */
.zen-drawer__column:has(> .zen-chat),
.zen-drawer__column:has(> .zen-drawer__thread:not([hidden]) > .zen-chat) { display: flex; flex-direction: column; min-height: 100%; }
/* TO-184: the brief thread's wrapper, so it can stay mounted (hidden) under Manage. */
.zen-drawer__thread { display: contents; }
.zen-drawer__thread[hidden] { display: none; }
.zen-chat { flex: 1; display: flex; flex-direction: column; }

/* TO-152: Memory and Approvals open over the view they came from, which stays mounted underneath
   so Back finds it as it was. Only the aside shows. */
.zen-drawer__column--aside > :not(.zen-drawer__aside) { display: none !important; }

/* The brief the chat is about: the card's own type, smaller, a hairline under it. */
.zen-brief--compact { padding: 0 0 var(--tomo-space-3); border-bottom: 1px solid var(--tomo-border-subtle); }
.zen-brief--compact .zen-brief__head { font-size: 14px; }

.zen-chat__thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-4);
  padding: var(--tomo-space-4) 0;
  font-size: 14px;
  line-height: 1.55;
}

.zen-chat__empty { margin: var(--tomo-space-4) 0; text-align: center; font-size: 13px; color: var(--tomo-text-muted); }

/* ZenAI's reply: a note signed like a brief, no box around it. */
.zen-chat__note { display: flex; flex-direction: column; gap: var(--tomo-space-1); }
.zen-chat__note .zen-brief__sig { margin-top: 0; }
.zen-chat__refused { margin: 0; color: var(--tomo-text-secondary); }

/* The chips under a reply sit a step below the answer; the row itself is the kit's (tomo-face.css). */
.zen-chat__mems { margin-top: var(--tomo-space-2); }
.zen-chat__mock { align-self: flex-start; margin-bottom: var(--tomo-space-1); }

.zen-chat__fail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--tomo-space-2);
  margin: 0;
  font-size: 13px;
  color: var(--tomo-danger-ink);
}

.tomo-turn--user + .zen-chat__fail { justify-content: flex-end; margin-top: calc(-1 * var(--tomo-space-2)); }

/* The composer and the meter stay at the drawer's foot while the thread scrolls. */
.zen-chat__foot {
  position: sticky;
  bottom: calc(-1 * var(--tomo-space-4));
  margin: 0 calc(-1 * var(--tomo-space-4)) calc(-1 * var(--tomo-space-4));
  padding: var(--tomo-space-2) var(--tomo-space-4) var(--tomo-space-4);
  background: var(--tomo-surface);
}

.zen-chat__foot .tomo-composer-wrap { padding: 0; background: transparent; }
.zen-chat__foot .tomo-composer-card { width: 100%; }

.zen-chat__meter { margin: var(--tomo-space-2) 0 0; font-size: 12px; color: var(--tomo-text-muted); }
.zen-chat__meter--high { color: var(--tomo-warn-ink); font-weight: 600; }

.zen-chat__ceiling { display: flex; flex-direction: column; gap: var(--tomo-space-3); padding-top: var(--tomo-space-3); border-top: 1px solid var(--tomo-border-subtle); }
.zen-chat__ceilingtext { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--tomo-text-primary); }
.zen-chat__ceilingacts { display: flex; flex-wrap: wrap; gap: var(--tomo-space-2); }
.zen-chat__ceilingnote { margin: 0; font-size: 12px; color: var(--tomo-text-muted); }

@media (max-width: 640px) {
  /* TO-144 (Z5): the phone head fits 360px: the mark names it, the switch and Brief this report tighten. */
  .zen-drawer__head { padding: var(--tomo-space-2) var(--tomo-space-3); }
  .zen-drawer__name { display: none; }
  .zen-switch { margin-left: var(--tomo-space-1); }
  .zen-switch__tab { padding: 0 var(--tomo-space-2); }
  .zen-drawer__brief { margin-right: 0; }
}

/* ---------- Phone: a bottom sheet ---------- */

@media (max-width: 640px) {
  /* TO-144 (Z5): a full-height sheet, the Chat | Briefs switch at its top. */
  .zen-drawer.tomo-face {
    inset: var(--zen-drawer-top, 0px) 0 var(--zen-drawer-bottom, 0px) 0;
    width: 100%;
    height: calc(100dvh - var(--zen-drawer-top, 0px) - var(--zen-drawer-bottom, 0px));
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--tomo-border-light);
    border-radius: var(--tomo-radius-lg) var(--tomo-radius-lg) 0 0;
    animation-name: zen-sheet-in;
  }

  @keyframes zen-sheet-in {
    from { transform: translateY(32px); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
}

/* What your AIs can see in a narrow drawer: its phone layout, by the drawer's width, not the
   window's (the same rules as tomo-visibility.css's 40rem block). */
@container zen-drawer (max-width: 40rem) {
  .zen-drawer .tomo-visibility__row--head { display: none; }

  .zen-drawer .tomo-visibility__row {
    grid-template-columns: 1fr;
    gap: var(--tomo-space-2);
  }

  .zen-drawer .tomo-visibility__row:nth-child(2) { border-top: 0; }

  .zen-drawer .tomo-visibility__cell { justify-content: space-between; }

  .zen-drawer .tomo-visibility__celllabel {
    display: inline;
    font-size: 13px;
    color: var(--tomo-text-secondary);
  }

  .zen-drawer .tomo-visibility__cell--follows {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
  }

  .zen-drawer .tomo-visibility__follownote { order: 3; flex-basis: 100%; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .zen-drawer.tomo-face,
  .zen-brief__past,
  .zen-brief__skel { animation: none; }

  .zen-drawer__btn { transition: none; }
}

/* ---------- Your connections: H1 (Connect ZenAI) and H2 (TO-52) ----------
   Flat, like the list: rows are steps divided by hairlines, not cards. One badge, one paragraph,
   one button on H1; on H2 each row carries its own action. */

.zen-connect { display: flex; flex-direction: column; }

.zen-connect__sov {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--tomo-space-3);
  padding: 4px 10px;
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-sovereign-subtle);
  color: var(--tomo-sovereign);
  font-size: 11.5px;
  font-weight: 600;
}

.zen-connect__title {
  margin: 0 0 var(--tomo-space-2);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.zen-connect__lede {
  margin: 0 0 var(--tomo-space-4);
  font-size: 13px;
  line-height: 1.6;
  color: var(--tomo-text-secondary);
}

.zen-connect__label {
  margin: 0 0 var(--tomo-space-1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tomo-text-muted);
}

.zen-connect__muted { margin: var(--tomo-space-2) 0; font-size: 13px; color: var(--tomo-text-muted); }

.zen-connect__rows { margin: 0; padding: 0; list-style: none; }

.zen-connect__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--tomo-space-3);
  padding: var(--tomo-space-3) 0;
  border-top: 1px solid var(--tomo-border-subtle);
}

.zen-connect__row:first-child { border-top: 0; }

.zen-connect__dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-text-muted);
  opacity: 0.5;
}

.zen-connect__dot--on { background: var(--tomo-success); opacity: 1; }
.zen-connect__dot--warn { background: var(--tomo-warning); opacity: 1; }

/* A long label ("Connect Calendar and Teams") drops the button below the text rather than squeeze it. */
.zen-connect__body { flex: 1 1 200px; min-width: 0; }

.zen-connect__name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--tomo-space-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--tomo-text-primary);
}

.zen-connect__status { font-size: 12px; font-weight: 500; color: var(--tomo-text-muted); }
.zen-connect__row[data-status="Connected"] .zen-connect__status { color: var(--tomo-success); }

.zen-connect__sub,
.zen-connect__when { margin-top: 2px; font-size: 12px; color: var(--tomo-text-muted); }

/* TO-68: kind and owner, then which AIs may use it. Same quiet line as the sub; the owner reads a shade stronger. */
.zen-connect__owner { margin-top: 2px; font-size: 12px; color: var(--tomo-text-secondary); }
.zen-connect__ais { margin-top: 2px; font-size: 12px; color: var(--tomo-text-muted); }
/* TO-68 AC6: a lapsed credential, or this card's own failed action. The rest of the list is untouched. */
.zen-connect__problem { margin-top: 2px; font-size: 12px; color: var(--tomo-warning); }
.zen-connect__card-error { margin-top: var(--tomo-space-1); font-size: 12px; color: var(--tomo-danger-ink); }
/* TO-68: Share beside Disconnect, one row, right-aligned like the single action was. */
.zen-connect__acts { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--tomo-space-2); margin-left: auto; }
.zen-connect__acts .zen-connect__act { margin-left: 0; }
/* TO-68: Public · your own key. Neutral, not the sovereign green: it is not composed on Zendaita hardware. */
.zen-connect__sov--public { background: var(--tomo-surface-sunken); color: var(--tomo-text-secondary); }

.zen-connect__act { flex: none; margin-left: auto; padding: 6px var(--tomo-space-3); }

.zen-connect__confirm {
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-2);
  margin-top: var(--tomo-space-2);
  font-size: 13px;
  color: var(--tomo-text-secondary);
}

.zen-connect__confirmacts { display: flex; flex-wrap: wrap; gap: var(--tomo-space-2); }

/* The kit's own danger button, so a host without tomo-connections.css still gets it. */
.zen-connect .tomo-btn--danger {
  border: 1px solid var(--tomo-danger);
  background: var(--tomo-danger);
  color: var(--tomo-text-inverse);
}

.zen-connect__failure { align-items: center; margin-top: var(--tomo-space-3); }
.zen-connect__failtext { flex: 1; }

.zen-connect__fear {
  margin: var(--tomo-space-4) 0 var(--tomo-space-3);
  font-size: 12px;
  line-height: 1.5;
  color: var(--tomo-text-muted);
}

.zen-connect__go { width: 100%; padding-block: 11px; }

.zen-connect__foot {
  margin: var(--tomo-space-3) 0 var(--tomo-space-2);
  padding-top: var(--tomo-space-3);
  border-top: 1px solid var(--tomo-border-subtle);
  font-size: 12px;
  line-height: 1.5;
  color: var(--tomo-text-muted);
}

.zen-connect__lapsed {
  margin: var(--tomo-space-8) 0;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
}

/* What your AIs can see follows H2's rows: a hairline between the two. */
.zen-connect + .tomo-visibility.tomo-face {
  margin-top: var(--tomo-space-2);
  border-top: 1px solid var(--tomo-border-subtle);
}

/* Microsoft 365 as one card (Ro, 26 Oct 2026): its parts inline, flat, a small dot each. */
.zen-connect__parts { display: flex; flex-wrap: wrap; gap: 4px var(--tomo-space-3); margin-top: var(--tomo-space-1); font-size: 12px; color: var(--tomo-text-secondary); }
.zen-connect__part { display: inline-flex; align-items: center; gap: 5px; }
.zen-connect__dot--sm { width: 6px; height: 6px; margin-top: 0; }
/* Same pill as the Sample's "On mock" notice: the single Microsoft 365 consent is mocked. */
.zen-connect__mock {
  display: inline-block;
  margin-top: var(--tomo-space-1);
  padding: 3px 8px;
  border-radius: var(--tomo-radius-sm); /* not a full pill: it wraps to two lines in a narrow drawer */
  font-size: 11px;
  font-weight: 600;
  background: rgba(214, 158, 46, 0.16);
  color: #8a5a00;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .zen-connect__mock { color: #f0c36b; }
}
:root[data-theme="dark"] .zen-connect__mock { color: #f0c36b; }

.zen-connect__missing { margin-top: 2px; font-size: 12px; color: var(--tomo-warning); }
/* R100(11): a stored-password connection, as Tezai flags it. Marker beside the status (the name row's gap spaces it, so it wraps flush), one line under the sub. */
.zen-connect__weaker { font-size: 12px; font-weight: 600; color: var(--tomo-warning); }
.zen-connect__weaker-line { margin-top: 2px; font-size: 12px; color: var(--tomo-text-muted); }
/* TO-106: what the one Microsoft 365 consent did, said once on return. A decline is grey, not red. */
.zen-connect__outcome { margin-top: 2px; font-size: 12px; color: var(--tomo-text-secondary); }
.zen-connect__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.zen-connect__link { padding: 0; border: 0; background: none; font: inherit; color: var(--tomo-text-secondary); text-decoration: underline; cursor: pointer; }
.zen-connect__link:hover { color: var(--tomo-danger); }

/* B12a: the Daitalens customer line, and Link for an owner or admin. Link opens the editor in place. */
.zen-connect__customer { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--tomo-space-2); margin-top: 2px; font-size: 12px; color: var(--tomo-text-muted); }
.zen-connect__customer-line { min-width: 0; }
.zen-connect__link--go { min-height: 24px; padding: 0 4px; margin-left: -4px; color: var(--tomo-accent); font-weight: 600; text-decoration: none; }
.zen-connect__link--go:hover { color: var(--tomo-accent); text-decoration: underline; }
.zen-connect__link--go:focus-visible,
.zen-connect__input:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 2px; }
.zen-connect__linkedit { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: var(--tomo-space-1); }
.zen-connect__linkedit label { font-size: 12px; font-weight: 600; color: var(--tomo-text-secondary); }
.zen-connect__linkrow { display: flex; flex-wrap: wrap; gap: var(--tomo-space-2); }
.zen-connect__input {
  flex: 1 1 120px;
  width: 140px;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--tomo-border-strong);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-surface);
  color: var(--tomo-text-primary);
  font: inherit;
  font-size: 13px;
}
.zen-connect__hint { margin: 0; font-size: 12px; color: var(--tomo-text-muted); }
.zen-connect__customer .zen-connect__outcome { flex-basis: 100%; }
.zen-connect__customer .zen-connect__outcome[data-ok="false"] { color: var(--tomo-danger); }

/* ---------- TO-58: New, Pinned, and the card's pills (U3) ---------- */

/* New: a small accent word after the name, gone once the drawer has been opened (U1). */
.zen-brief__new,
.zen-brief__pinned {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--tomo-radius-full);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: 1px;
}

.zen-brief__new { background: var(--tomo-accent); color: var(--tomo-surface); }
.zen-brief__pinned { background: var(--tomo-surface-sunken); color: var(--tomo-text-secondary); }

/* The pills: flat outline buttons in one wrapping row, under the run. */
.zen-brief__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--tomo-space-3);
}

.zen-brief__pill {
  padding: 3px 10px;
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
  transition: background var(--tomo-duration-fast) var(--tomo-ease-out), color var(--tomo-duration-fast) var(--tomo-ease-out);
}

.zen-brief__pill:hover:not(:disabled) { background: var(--tomo-surface-sunken); color: var(--tomo-text-primary); }
.zen-brief__pill:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 2px; }
.zen-brief__pill:disabled { opacity: 0.55; cursor: default; }
.zen-brief__pill[aria-pressed="true"] { border-color: transparent; background: var(--tomo-accent-subtle); color: var(--tomo-accent); }

@media (prefers-reduced-motion: reduce) {
  .zen-brief__pill { transition: none; }
}

/* ---------- New brief (B1, TO-54) ----------
   The drawer turns into the form: one column of labelled fields, divided by space, not boxes.
   Every colour is a token, so dark mode comes from tomo-face.css. A part still on a mock says
   so in the warning tint, beside what it stands for. */

.zen-drawer__brief {
  flex: none;
  margin-right: var(--tomo-space-1);
  padding: 5px var(--tomo-space-2);
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
  white-space: nowrap;
}
.zen-drawer__brief:hover { color: var(--tomo-accent); border-color: var(--tomo-accent); }
.zen-drawer__brief:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }

.zen-briefs__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tomo-space-2);
  margin-bottom: var(--tomo-space-1);
}
.zen-briefs__top .zen-briefs__head { margin: 0; }
.zen-briefs__new.tomo-btn { padding: 5px var(--tomo-space-3); font-size: 12px; }
.zen-briefs__acts { flex: none; display: inline-flex; gap: var(--tomo-space-1); }
.zen-briefs__acts .zen-briefs__new { white-space: nowrap; }

.zen-brief__newnote { margin: var(--tomo-space-1) 0 0; font-size: 12px; color: var(--tomo-warn-ink); }

/* TO-151: the customer a brief reads for. One quiet line under the name; the mock tag may wrap. */
.zen-brief__customer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tomo-space-1) var(--tomo-space-2);
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--tomo-text-secondary);
}

.zen-form__customer { margin: 0; font-size: 14px; font-weight: 600; color: var(--tomo-text-primary); }

.zen-form { display: flex; flex-direction: column; }
.zen-form .zen-drawer__back { align-self: flex-start; }
.zen-form .zen-drawer__title { margin-bottom: var(--tomo-space-4); }

.zen-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-2);
  margin-bottom: var(--tomo-space-5);
}

.zen-form__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tomo-text-muted);
}

.zen-form__input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 8px var(--tomo-space-3);
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface);
  color: var(--tomo-text-primary);
  font: inherit;
  font-size: 14px;
}
.zen-form__input::placeholder { color: var(--tomo-text-muted); }
.zen-form__input:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: -1px; border-color: transparent; }
.zen-form__input:disabled { opacity: 0.6; }
.zen-form__textarea { resize: vertical; line-height: 1.5; }

.zen-form__hint { margin: 0; font-size: 12px; line-height: 1.5; color: var(--tomo-text-secondary); }
.zen-form__muted { color: var(--tomo-text-muted); }

.zen-form__error {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--tomo-danger-ink);
}

.zen-form__mock {
  align-self: flex-start;
  padding: 2px var(--tomo-space-2);
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-warn-bg);
  color: var(--tomo-warn-ink);
  font-size: 11px;
  font-weight: 600;
}

.zen-form__link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-accent);
  cursor: pointer;
}
.zen-form__link:hover { text-decoration: underline; }

.zen-form__add {
  align-self: flex-start;
  padding: 6px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tomo-accent);
  cursor: pointer;
}
.zen-form__add:disabled { opacity: 0.55; cursor: not-allowed; }

.zen-form__inline { display: flex; gap: var(--tomo-space-2); }
.zen-form__inline .zen-form__input { flex: 1; }

.zen-form__chips { display: flex; flex-wrap: wrap; gap: var(--tomo-space-1); }

.zen-chip {
  padding: 4px var(--tomo-space-2);
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--tomo-text-secondary);
  cursor: pointer;
}
.zen-chip:hover:not(:disabled) { border-color: var(--tomo-accent); color: var(--tomo-accent); }
.zen-chip:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }

/* P26 TO-221 (mock A1): the question is required, its period read back underneath, a soft nudge
   for a vague one. Flat lines, no boxes inside the form; tokens carry dark mode. */
.zen-form__req { margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--tomo-danger-ink); }
.zen-form__readback { margin: 0; font-size: 12px; line-height: 1.5; color: var(--tomo-text-secondary); }
.zen-form__readback::before { content: "\25F7"; margin-right: 6px; font-size: 14px; line-height: 1; vertical-align: -1px; color: var(--tomo-accent); }
.zen-form__nudge {
  margin: 0;
  padding: var(--tomo-space-2) var(--tomo-space-3);
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-warn-bg);
  font-size: 12px;
  line-height: 1.5;
  color: var(--tomo-warn-ink);
}
.zen-form__allcust {
  padding: var(--tomo-space-2) var(--tomo-space-3);
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-warn-bg);
}
.zen-form__allcust .zen-form__hint { color: var(--tomo-warn-ink); }
.zen-form__badge {
  align-self: flex-start;
  padding: 2px var(--tomo-space-2);
  border: 1px solid var(--tomo-warn-line);
  border-radius: var(--tomo-radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--tomo-warn-ink);
}

/* P26 TO-221 (mock A1 state 3): with 2+ sources each gets one optional dashed focus line under it. */
.zen-src:has(.zen-src__focusline) { flex-wrap: wrap; }
.zen-src__focusline {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: var(--tomo-space-2);
  min-width: 0;
  padding-left: var(--tomo-space-3);
  font-size: 12px;
  color: var(--tomo-text-secondary);
}
.zen-src__focuslabel { flex: none; }
.zen-src__focuslabel::before { content: "\21B3"; margin-right: 4px; color: var(--tomo-accent); }
.zen-form__input.zen-src__focusinput {
  flex: 1;
  min-width: 0;
  padding: 2px 4px;
  border: 0;
  border-bottom: 1px dashed var(--tomo-border-light);
  border-radius: 0;
  background: transparent;
  font-size: 12px;
}
@media (max-width: 420px) {
  .zen-src__focusline { flex-wrap: wrap; padding-left: 0; }
  .zen-form__input.zen-src__focusinput { flex-basis: 100%; }
}

/* A source: a row you select (its focus is edited below) with a remove control. */
.zen-src {
  display: flex;
  align-items: flex-start;
  gap: var(--tomo-space-2);
  padding: var(--tomo-space-2) var(--tomo-space-3);
  border: 1px solid var(--tomo-border-subtle);
  border-radius: var(--tomo-radius-sm);
}
.zen-src--on { border-color: var(--tomo-accent); background: var(--tomo-accent-subtle); }

.zen-src__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.zen-src__main:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 2px; }
.zen-src__what { font-size: 13px; font-weight: 600; color: var(--tomo-text-primary); overflow-wrap: anywhere; }
.zen-src__focus { font-size: 12px; color: var(--tomo-text-secondary); overflow-wrap: anywhere; }
.zen-src__range { font-size: 12px; color: var(--tomo-text-secondary); }

.zen-src__remove {
  flex: none;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--tomo-radius-sm);
  background: transparent;
  color: var(--tomo-text-muted);
  cursor: pointer;
}
.zen-src__remove:hover:not(:disabled) { background: var(--tomo-surface-sunken); color: var(--tomo-danger-ink); }

/* "+ Add a source": what the person's connections can read. */
.zen-pick {
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-2);
  padding: var(--tomo-space-3);
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface-sunken);
}
.zen-pick__row { display: flex; align-items: center; gap: var(--tomo-space-2); }
.zen-pick__row .tomo-btn { padding: 5px var(--tomo-space-3); }
.zen-pick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.zen-pick__name { font-size: 13px; font-weight: 600; color: var(--tomo-text-primary); }
.zen-pick__from { font-size: 11px; color: var(--tomo-text-muted); }

/* A segmented choice: Run now | On a schedule, and the picker's Daily | Weekly | Monthly. */
.zen-seg {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px;
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface-sunken);
}
.zen-seg__opt {
  padding: 6px var(--tomo-space-3);
  border: 0;
  border-radius: calc(var(--tomo-radius-sm) - 2px);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
}
.zen-seg__opt--on { background: var(--tomo-surface); color: var(--tomo-text-primary); box-shadow: var(--tomo-shadow-sm); }
.zen-seg__opt:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-seg__opt:disabled { opacity: 0.55; cursor: not-allowed; }

/* The schedule picker: DLSchedulePicker from the Zendaita.Schedule package (DL-3548). Its own CSS
   reads --dl-* tokens with Daitalens fallbacks and turns dark only on [data-theme="dark"]. Here the
   kit points those tokens at its own, and repaints the few surfaces the picker hard-codes, so the
   picker follows the kit's palette and the OS dark mode in any host. Four classes deep so it
   outranks the picker's scoped dark rules ([data-theme="dark"] .dl-sched[b-…]) in any load order. */
.tomo-face .zen-form .zen-sched .dl-sched {
  --dl-text-primary: var(--tomo-text-primary);
  --dl-text-secondary: var(--tomo-text-secondary);
  --dl-nav-text: var(--tomo-text-primary);
  --dl-bg-secondary: var(--tomo-surface-sunken);
  --dl-border-light: var(--tomo-border-light);
  --dl-border-emphasis: var(--tomo-border-strong);
  --dl-danger: var(--tomo-danger-ink);
  --dl-radius-sm: var(--tomo-radius-sm);
  --dl-radius-md: var(--tomo-radius-md);
  --dl-radius-full: var(--tomo-radius-full);
  --dl-dark-text: var(--tomo-text-primary);
  --dl-dark-text-secondary: var(--tomo-text-secondary);
  --dl-dark-text-muted: var(--tomo-text-muted);
  --dl-dark-surface: var(--tomo-surface);
  --dl-dark-surface-raised: var(--tomo-surface-sunken);
  --dl-dark-surface-overlay: var(--tomo-surface-elevated);
  --dl-dark-border: var(--tomo-border-light);
  --dl-dark-border-light: var(--tomo-border-light);
  --dl-font-display: inherit;
  --dl-space-6: var(--tomo-space-4);
  background: var(--tomo-surface);
  border-color: var(--tomo-border-light);
  box-shadow: none;
  color: var(--tomo-text-primary);
}
.tomo-face .zen-form .zen-sched .dl-sched__seg-btn.is-on { background: var(--tomo-surface-elevated); color: var(--tomo-text-primary); }
.tomo-face .zen-form .zen-sched .dl-sched__day.is-on { border-color: var(--tomo-accent); background: var(--tomo-accent-subtle); color: var(--tomo-text-primary); }
.tomo-face .zen-form .zen-sched .dl-sched__input,
.tomo-face .zen-form .zen-sched .dl-sched__select { background: var(--tomo-surface); border-color: var(--tomo-border-light); color: var(--tomo-text-primary); }
.tomo-face .zen-form .zen-sched .dl-sched__preview-line { color: var(--tomo-text-primary); }
.tomo-face .zen-form .zen-sched .dl-sched__heading { font-size: 13px; color: var(--tomo-text-primary); }
.tomo-face .zen-form .zen-sched .dl-sched__note,
.tomo-face .zen-form .zen-sched .dl-sched__preview-sub { color: var(--tomo-text-muted); }
.tomo-face .zen-form .zen-sched .dl-sched__note--time { color: var(--tomo-text-secondary); }
/* The drawer is always narrow: time and zone stack, whatever the window width. */
.tomo-face .zen-form .zen-sched .dl-sched__group--split { flex-direction: column; gap: var(--tomo-space-3); }
/* Stacked, the picker's flex-basis of 200px would become each field's height. */
.tomo-face .zen-form .zen-sched .dl-sched__field { flex: none; min-width: 0; }

.zen-form__deliver {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tomo-space-3);
  font-size: 13px;
  color: var(--tomo-text-primary);
}
.zen-form__switch { width: 18px; height: 18px; margin: 0; accent-color: var(--tomo-accent); cursor: pointer; }

.zen-form__privacy {
  margin: 0 0 var(--tomo-space-4);
  padding-top: var(--tomo-space-3);
  border-top: 1px solid var(--tomo-border-subtle);
  font-size: 12px;
  line-height: 1.5;
  color: var(--tomo-text-secondary);
}

.zen-form > .zen-form__error { margin-bottom: var(--tomo-space-3); }

.zen-form__actions { display: flex; flex-wrap: wrap; gap: var(--tomo-space-2); }

.zen-form__none { display: flex; flex-direction: column; align-items: flex-start; gap: var(--tomo-space-2); }
.zen-form__nonetitle { margin: 0; font-size: 14px; font-weight: 700; color: var(--tomo-text-primary); }
.zen-form__none .tomo-btn { margin-top: var(--tomo-space-2); }

@media (prefers-reduced-motion: reduce) {
  .zen-chip, .zen-seg__opt { transition: none; }
}

/* ---------- A brief shared with this person (P18, TO-60; pitch C4) ---------- */

/* "ZenAI · Shared by Steve C. · 7 Sep" in the drawer's header. */
.zen-drawer__shared {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 500;
  color: var(--tomo-text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.zen-shared__by {
  margin-left: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tomo-text-muted);
}

.zen-shared__tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface-sunken);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tomo-text-secondary);
}

/* "Shared as written": a quiet accent rule, above the actions, never buried under the answer. */
.zen-shared__note {
  margin-top: var(--tomo-space-3);
  padding: var(--tomo-space-2) var(--tomo-space-3);
  border-left: 2px solid var(--tomo-accent);
  background: var(--tomo-accent-subtle);
  border-radius: 0 var(--tomo-radius-sm) var(--tomo-radius-sm) 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--tomo-text-secondary);
}

.zen-shared__notelab {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tomo-accent);
}

.zen-shared__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--tomo-space-3);
}

.zen-shared__btn {
  padding: 4px 10px;
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
}

.zen-shared__btn:hover,
.zen-shared__btn--on,
.zen-shared__btn[aria-pressed="true"] { background: var(--tomo-accent-subtle); color: var(--tomo-accent); border-color: transparent; }
.zen-shared__btn:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }

.zen-shared__settings {
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-2);
  margin-top: var(--tomo-space-2);
  padding: var(--tomo-space-3) 0 0 var(--tomo-space-3);
  border-left: 1px solid var(--tomo-border-light);
  animation: zen-brief-open var(--tomo-duration-fast) var(--tomo-ease-out);
}

.zen-shared__settings .zen-connect__mock { align-self: flex-start; }

.zen-shared__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tomo-space-3);
  font-size: 13px;
  color: var(--tomo-text-primary);
}

/* TO-63: the card's actions (Explain this number, Compare, That's wrong) and That's wrong's one line. */
.zen-actions__row { flex-wrap: wrap; align-items: center; }
.zen-actions__wrong { display: flex; gap: 6px; align-items: center; margin-top: var(--tomo-space-2); }
.zen-actions__wrong .zen-form__input { flex: 1; min-width: 0; }
.zen-actions__save { flex: none; }
.zen-actions__save:disabled { opacity: 0.5; cursor: default; }
.zen-chat__corrected { margin: 0; font-size: 13px; color: var(--tomo-text-secondary); }

/* ---------- TO-144: Chat | Briefs, the general chat, the simple card, the full view ---------- */

@media (min-width: 1600px) {
  .zen-drawer.tomo-face { width: var(--zen-drawer-w, 640px); }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .zen-drawer.tomo-face { width: 100%; }
}

/* Chat text and the card keep a ~620px column, centred when the drawer is wider. */
.zen-drawer .zen-drawer__column { max-width: 620px; }

/* The grip: the left edge, desktop only. */
.zen-drawer__grip {
  position: absolute;
  inset: 0 auto 0 -3px;
  width: 6px;
  cursor: ew-resize;
  z-index: 1;
}
.zen-drawer__grip:hover,
.zen-drawer--resizing .zen-drawer__grip { background: var(--tomo-accent-subtle); }
.zen-drawer--resizing { animation: none; user-select: none; }
@media (max-width: 1024px) {
  .zen-drawer__grip { display: none; }
}

/* The switch: one two-way control in the header. */
.zen-switch {
  display: inline-flex;
  margin-left: var(--tomo-space-3);
  padding: 2px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-surface-sunken);
  border: 1px solid var(--tomo-border-subtle);
}
.zen-switch__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 var(--tomo-space-3);
  border: 0;
  border-radius: var(--tomo-radius-full);
  background: transparent;
  color: var(--tomo-text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.zen-switch__tab--on {
  background: var(--tomo-surface);
  color: var(--tomo-text-primary);
  box-shadow: var(--tomo-shadow-sm);
}
.zen-switch__tab:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-switch__count {
  padding: 0 6px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-accent);
  color: var(--tomo-on-accent);
  font-size: 11px;
  line-height: 18px;
}

.zen-drawer__prefill {
  margin: 0 0 var(--tomo-space-3);
  padding: var(--tomo-space-2) var(--tomo-space-3);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-accent-subtle);
  color: var(--tomo-text-primary);
  font-size: 13px;
}

/* The general chat (Z1/Z2). */
.zen-conv { display: flex; flex-direction: column; min-height: 100%; gap: var(--tomo-space-4); }

/* TO-184 (E1, Ro 13 Nov 2026 11:48): the composer is the floor of the drawer, empty or mid-thread.
   The chat's column takes the body's full height and the thread scrolls inside it, so nothing
   below the composer and no grey block around it. */
.zen-drawer__column--chat { display: flex; flex-direction: column; height: 100%; padding-bottom: 0; }
.zen-drawer__column--chat > .zen-conv { flex: 1; min-height: 0; }
.zen-drawer__column--chat .zen-conv__thread { min-height: 0; overflow-y: auto; overflow-x: hidden; margin: 0 calc(-1 * var(--tomo-space-4)); padding: 0 var(--tomo-space-4) var(--tomo-space-2); }
.zen-conv__threadwrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.zen-conv__threadwrap > .zen-conv__thread { flex: 1; }
.zen-conv__threadwrap .tomo-newmsg { position: absolute; left: 0; right: 0; bottom: var(--tomo-space-2); height: auto; }
.zen-conv__threadwrap .tomo-newmsg__pill { transform: none; min-height: 32px; }
/* TO-154 (AC2): Swift Home's header line. The switch on the left, "Memory · N in scope" on the right. */
.zen-conv__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--tomo-space-2); }
.zen-conv__memory {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border: 1px solid transparent;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-accent-subtle);
  color: var(--tomo-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
button.zen-conv__memory { cursor: pointer; }
button.zen-conv__memory:hover { border-color: var(--tomo-accent); }
button.zen-conv__memory:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-conv__thread { flex: 1; display: flex; flex-direction: column; gap: var(--tomo-space-3); }
/* Empty: the greeting, lede and starters sit centred in the space above the composer. */
.zen-conv[data-state="empty"] .zen-conv__thread { justify-content: center; }
.zen-conv__hello { display: flex; flex-direction: column; align-items: center; gap: var(--tomo-space-3); padding: var(--tomo-space-6) 0; text-align: center; }
.zen-conv__mark { width: 28px; height: 28px; }
.zen-conv__greet { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: var(--tomo-text-primary); }
.zen-conv__lede { margin: 0; font-size: 14px; color: var(--tomo-text-secondary); }
.zen-conv__starters { display: flex; flex-direction: column; gap: var(--tomo-space-2); width: 100%; }
.zen-conv__starter {
  text-align: left;
  padding: var(--tomo-space-3) var(--tomo-space-4);
  border: 1px solid var(--tomo-border-subtle);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-surface);
  color: var(--tomo-text-primary);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.zen-conv__starter:hover { border-color: var(--tomo-accent); background: var(--tomo-accent-subtle); }
.zen-conv__brief { display: flex; padding-left: var(--tomo-space-6); }
.zen-conv__foot { position: sticky; bottom: 0; flex: none; display: flex; flex-direction: column; gap: var(--tomo-space-2); margin: 0 calc(-1 * var(--tomo-space-4)); padding: var(--tomo-space-3) var(--tomo-space-4) var(--tomo-space-3); border-top: 1px solid var(--tomo-border-subtle); background: var(--tomo-surface); }
.zen-conv__foot .tomo-composer-wrap { padding: 0; background: transparent; }
.zen-conv__foot .tomo-composer-card { width: 100%; }
.zen-conv__foot .tomo-composer__footnote { width: 100%; }
.zen-conv__anchor { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tomo-space-2); }
.zen-conv__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-surface-sunken);
  color: var(--tomo-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

/* The simple card (Z3): a row that opens. */
.zen-brief--row { padding: 0; }
.zen-brief__rowbtn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--tomo-space-3) 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.zen-brief__rowtop { display: flex; align-items: center; gap: var(--tomo-space-2); width: 100%; }
.zen-brief__rowtop .zen-brief__name { font-size: 14px; font-weight: 700; color: var(--tomo-text-primary); }
.zen-brief__rowwhen { margin-left: auto; font-size: 12px; color: var(--tomo-text-muted); }
.zen-brief__chev {
  width: 8px; height: 8px;
  border-right: 1.6px solid var(--tomo-text-muted);
  border-bottom: 1.6px solid var(--tomo-text-muted);
  transform: rotate(45deg);
  transition: transform var(--tomo-duration-fast) var(--tomo-ease-out);
}
.zen-brief--open .zen-brief__chev { transform: rotate(-135deg); }
.zen-brief__rowhead {
  font-size: 13px;
  color: var(--tomo-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.zen-brief__rowbtn:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 2px; border-radius: var(--tomo-radius-sm); }

/* TO-209 (F6, Ro 17 Nov 2026): the row is name, pin, unread dot and one status on the right;
   the closed row's second line is the takeaway. Tokens turn dark in tomo-face.css. */
.zen-brief__rowtop .zen-brief__name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zen-brief__pin { display: inline-flex; flex: 0 0 auto; color: var(--tomo-text-muted); }
.zen-brief__unread { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--tomo-accent); }
.zen-brief__st {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 12px;
  white-space: nowrap;
  color: var(--tomo-text-muted);
}
.zen-brief__st--plain { color: var(--tomo-text-muted); }
.zen-brief__st--bad { color: var(--tomo-danger-ink); font-weight: 600; }
.zen-brief__st--warn { color: var(--tomo-warn-ink); font-weight: 600; }
.zen-brief__st--run { color: var(--tomo-accent); font-weight: 600; }
.zen-brief__stdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.zen-brief__spin {
  width: 10px; height: 10px; flex: 0 0 10px;
  border: 1.6px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: zen-brief-spin 0.9s linear infinite;
}
@keyframes zen-brief-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .zen-brief__spin { animation: none; border-right-color: currentColor; opacity: 0.6; } }
.zen-brief__pause { width: 7px; height: 8px; border-left: 2px solid currentColor; border-right: 2px solid currentColor; }
.zen-brief__open { padding-left: 18px; }
.zen-brief__meta { font-size: 12px; color: var(--tomo-text-muted); }
.zen-brief__bullets--figures { list-style: none; padding-left: 0; }
.zen-brief__bullets--figures li { display: flex; gap: 8px; }
.zen-brief__bullets--figures li::before { content: ""; width: 4px; height: 4px; margin-top: 0.6em; flex: 0 0 4px; border-radius: 50%; background: var(--tomo-text-muted); }
.zen-brief__bullets--figures b { color: var(--tomo-text-primary); font-variant-numeric: tabular-nums; }
.zen-brief__stline { margin: 0; font-size: 13px; color: var(--tomo-text-muted); }
.zen-brief__stline--bad { color: var(--tomo-danger-ink); }
.zen-brief__stline--warn { color: var(--tomo-warn-ink); }
.zen-brief__setup { display: flex; align-items: flex-start; gap: var(--tomo-space-2); margin: 0; font-size: 13px; color: var(--tomo-text-secondary); }
.zen-brief__setup .zen-brief__spin { margin-top: 3px; color: var(--tomo-accent); }
.zen-brief__pill--fix { border-color: var(--tomo-accent); color: var(--tomo-accent); font-weight: 700; }
.zen-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.zen-brief__open { display: flex; flex-direction: column; gap: var(--tomo-space-2); padding-bottom: var(--tomo-space-4); }
.zen-brief__open[hidden], .zen-brief__morebody[hidden] { display: none; }

.zen-brief--failing .zen-brief__rowtop .zen-brief__name { color: var(--tomo-danger-ink); }
.zen-brief__failtag {
  padding: 0 8px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-danger-bg);
  color: var(--tomo-danger-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}
/* TO-206: paused after failed runs. Calm, not red: an amber tag on the row, a quiet status block
   with Resume brief and one line on what resuming does (Swift twin: BriefHealthLine). */
.zen-brief__pausedtag {
  padding: 0 8px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-warn-bg);
  color: var(--tomo-warn-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}
.zen-brief__paused {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: var(--tomo-space-3);
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-surface-sunken);
  font-size: 13px;
}
.zen-brief__paused p { margin: 0; }
.zen-brief__pausedline { font-weight: 650; color: var(--tomo-warn-ink); }
.zen-brief__pausedacts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--tomo-space-2); }
.zen-brief__pausedsmall { font-size: 12px; color: var(--tomo-text-muted); }
.zen-brief__failline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--tomo-space-2) var(--tomo-space-3);
  margin: 0;
  padding: var(--tomo-space-3);
  border: 1px solid var(--tomo-danger-line);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-danger-bg);
  color: var(--tomo-danger-ink);
  font-size: 13px;
}

/* TO-156: three across down to phone width (390), as Swift; a long label ends in an ellipsis, the value never does. */
.zen-brief__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: var(--tomo-space-2); }
.zen-brief__tile {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--tomo-space-3);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-surface-sunken);
}
.zen-brief__tilelabel { font-size: 12px; color: var(--tomo-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zen-brief__tilevalue { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tomo-text-primary); }
/* TO-156: the glyph says the direction; colour repeats it. Ink tokens hold AA on the sunken tile in light and dark. */
.zen-brief__tilechange { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--tomo-text-muted); }
/* TO-158: colour is the news, not the arrow: good ok-ink, bad danger-ink (a cost going up), muted for neutral or no change. */
.zen-brief__tilechange--good { color: var(--tomo-ok-ink); }
.zen-brief__tilechange--bad { color: var(--tomo-danger-ink); }
.zen-brief__bullets { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--tomo-text-secondary); }
.zen-brief__changed { margin: 0; font-size: 13px; color: var(--tomo-text-secondary); }
.zen-brief__primary { display: flex; align-items: center; gap: var(--tomo-space-2); margin-top: var(--tomo-space-1); }
.zen-brief__more {
  min-height: 30px;
  padding: 0 var(--tomo-space-3);
  border: 1px solid var(--tomo-border-subtle);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  color: var(--tomo-text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.zen-brief__more[aria-expanded="true"] { background: var(--tomo-surface-sunken); color: var(--tomo-text-primary); }
.zen-brief__morebody {
  display: flex;
  flex-direction: column;
  gap: var(--tomo-space-3);
  padding: var(--tomo-space-3);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-surface-sunken);
}
.zen-brief__exact { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; font-size: 13px; }
.zen-brief__exact > div { display: flex; justify-content: space-between; gap: var(--tomo-space-3); }
.zen-brief__exact dt { color: var(--tomo-text-secondary); }
.zen-brief__exact dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--tomo-text-primary); }

/* ---------- TO-184 (E2): the Manage tab ---------- */
.zen-manage { display: flex; flex-direction: column; gap: var(--tomo-space-2); }
.zen-manage__title { margin: 0; font-size: 13px; font-weight: 700; color: var(--tomo-text-secondary); }
.zen-manage__rows { margin: 0; padding: 0; list-style: none; }
.zen-manage__item + .zen-manage__item { border-top: 1px solid var(--tomo-border-subtle); }
.zen-manage__row {
  display: flex;
  align-items: center;
  gap: var(--tomo-space-3);
  width: 100%;
  padding: var(--tomo-space-3) var(--tomo-space-1);
  border: 0;
  border-radius: var(--tomo-radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.zen-manage__row:hover { background: var(--tomo-surface-sunken); }
.zen-manage__row:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: -2px; }
.zen-manage__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--tomo-radius-sm);
  background: var(--tomo-surface-sunken);
  color: var(--tomo-text-secondary);
}
.zen-manage__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.zen-manage__name { display: inline-flex; align-items: center; gap: var(--tomo-space-2); font-size: 14px; font-weight: 600; color: var(--tomo-text-primary); }
.zen-manage__line { font-size: 12px; color: var(--tomo-text-secondary); }
.zen-manage__count {
  padding: 0 8px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-accent);
  color: var(--tomo-on-accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
}
.zen-manage__chev {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--tomo-text-muted);
  border-top: 1.5px solid var(--tomo-text-muted);
  transform: rotate(45deg);
  margin-right: var(--tomo-space-1);
}

/* ---------- TO-186: the standalone app's page (ZenDrawer Standalone) ----------
   The same drawer as a whole page: a sidebar (Chat, Briefs, the Manage group and its rows) beside
   one centred ~740px column (Ro, 23 Oct 2026). Not fixed, no shadow, no slide-in: the host puts
   it where its page body goes and it fills that space. On a phone the sidebar becomes a strip
   across the top that scrolls sideways. */
.zen-drawer.tomo-face.zen-drawer--page {
  position: relative;
  inset: auto;
  z-index: auto;
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.zen-drawer--page > .zen-drawer__body { height: 100%; }
.zen-drawer--page .zen-drawer__column { max-width: 740px; padding: var(--tomo-space-6, 24px) var(--tomo-space-4); }
.zen-drawer--page .zen-drawer__column--chat { padding-bottom: 0; }

.zen-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  padding: var(--tomo-space-3) var(--tomo-space-2);
  background: var(--tomo-surface-sunken);
  border-right: 1px solid var(--tomo-border-subtle);
}

.zen-side__brand {
  display: flex;
  align-items: center;
  gap: var(--tomo-space-2);
  padding: var(--tomo-space-1) var(--tomo-space-2) var(--tomo-space-3);
}

.zen-side__item,
.zen-side__group,
.zen-side__sub {
  display: flex;
  align-items: center;
  gap: var(--tomo-space-2);
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.zen-side__item {
  min-height: 34px;
  padding: 0 var(--tomo-space-2);
  border-radius: var(--tomo-radius-sm);
  color: var(--tomo-text-secondary);
  font-size: 13px;
}
.zen-side__item:hover { background: var(--tomo-surface); color: var(--tomo-text-primary); }
.zen-side__item--on,
.zen-side__item--on:hover { background: var(--tomo-accent-subtle); color: var(--tomo-accent); font-weight: 700; }

.zen-side__icon { flex: none; display: inline-flex; }
.zen-side__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* New chat: a quiet line under Chat while the chat shows. */
.zen-side__sub {
  min-height: 28px;
  padding: 0 var(--tomo-space-2) 0 34px;
  border-radius: var(--tomo-radius-sm);
  color: var(--tomo-accent);
  font-size: 12px;
  font-weight: 600;
}
.zen-side__sub:hover { background: var(--tomo-surface); }

/* The Manage heading: a group label that opens the Manage list, with the count of approvals waiting. */
.zen-side__group {
  margin-top: var(--tomo-space-3);
  min-height: 28px;
  padding: 0 var(--tomo-space-2);
  border-radius: var(--tomo-radius-sm);
  color: var(--tomo-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.zen-side__group:hover { color: var(--tomo-text-primary); }
.zen-side__group--on { color: var(--tomo-accent); }

.zen-side__count {
  flex: none;
  margin-left: auto;
  padding: 0 6px;
  border-radius: var(--tomo-radius-full);
  background: var(--tomo-accent);
  color: var(--tomo-on-accent);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}
.zen-side__count--quiet { background: transparent; color: var(--tomo-accent); padding: 0; }

.zen-side__item:focus-visible,
.zen-side__group:focus-visible,
.zen-side__sub:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: -2px; }

/* "screen and": the same 640px phone break, written so it never reads as the phone sheet's block. */
@media screen and (max-width: 640px) {
  .zen-drawer.tomo-face.zen-drawer--page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .zen-side {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--tomo-space-2);
    border-right: 0;
    border-bottom: 1px solid var(--tomo-border-subtle);
  }

  .zen-side__brand { padding: 0 var(--tomo-space-2) 0 0; }
  .zen-side__brand .zen-drawer__name { display: none; }
  .zen-side__item,
  .zen-side__group,
  .zen-side__sub { width: auto; flex: none; margin-top: 0; }
  .zen-side__sub { padding-left: var(--tomo-space-2); }
  .zen-side__name { overflow: visible; }
}

/* TO-78: the person's own connectors ("Yours") and the New connector entry. Tokens only. */
.zen-connect__yours {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--tomo-accent-soft, color-mix(in srgb, var(--tomo-accent) 14%, transparent));
  color: var(--tomo-accent);
  font-size: 11px;
  font-weight: 700;
}

/* TO-208: a Yours row that is still a draft: it can't run until every grade is confirmed. */
.zen-connect__draft {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tomo-warning) 14%, transparent);
  color: var(--tomo-warn-ink, var(--tomo-warning));
  font-size: 11px;
  font-weight: 700;
}
.zen-connect__new { align-self: flex-start; margin-top: var(--tomo-space-2); }
/* TO-211 (mock F7): a brief's settings, inline under its card. Status first, one sentence,
   four icon rows, outcome-named actions, Delete apart below a hairline. */
.zen-brief__pill--on { border-color: var(--tomo-accent); color: var(--tomo-accent); }
.zen-set {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--tomo-border-subtle);
  font-size: 13px;
  color: var(--tomo-text-primary);
}
.zen-set__status { display: flex; align-items: baseline; gap: 8px; margin: 0; line-height: 1.45; }
.zen-set__status b { font-weight: 650; }
.zen-set__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-1px);
  background: var(--tomo-success);
}
.zen-set__status--paused .zen-set__dot { background: var(--tomo-text-muted); }
.zen-set__status--warn .zen-set__dot { background: var(--tomo-warning); }
.zen-set__status--bad .zen-set__dot { background: var(--tomo-danger); }
.zen-set__status--bad b { color: var(--tomo-danger-ink); }
.zen-set__sum { margin: 0; line-height: 1.5; color: var(--tomo-text-secondary); }
.zen-set__rows { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.zen-set__rows > div {
  display: grid;
  grid-template-columns: 16px minmax(92px, auto) 1fr;
  column-gap: 8px;
  align-items: baseline;
}
.zen-set__rows svg { color: var(--tomo-text-muted); transform: translateY(2px); }
.zen-set__rows dt { font-size: 12px; color: var(--tomo-text-muted); }
.zen-set__rows dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.zen-set__quiet { display: block; margin: 2px 0 0; font-size: 12px; color: var(--tomo-text-muted); }
.zen-set__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.zen-set__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border: 1px solid var(--tomo-border-light);
  border-radius: var(--tomo-radius-full);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--tomo-text-secondary);
  cursor: pointer;
}
.zen-set__btn:hover:not(:disabled) { border-color: var(--tomo-accent); color: var(--tomo-accent); }
.zen-set__btn:focus-visible, .zen-set__del:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-set__btn:disabled, .zen-set__del:disabled { opacity: .6; cursor: default; }
.zen-set__btn--pri { border-color: var(--tomo-accent); background: var(--tomo-accent); color: var(--tomo-on-accent); }
.zen-set__btn--pri:hover:not(:disabled) { color: var(--tomo-on-accent); filter: brightness(1.06); }
.zen-set__btn--danger { border-color: var(--tomo-danger); background: var(--tomo-danger); color: #fff; }
.zen-set__btn--danger:hover:not(:disabled) { color: #fff; filter: brightness(1.06); }
.zen-set__del {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: stretch;
  margin: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--tomo-border-subtle);
  background: none;
  font: inherit;
  font-size: 12px;
  color: var(--tomo-text-muted);
  text-align: left;
  cursor: pointer;
}
.zen-set__del:hover:not(:disabled) { color: var(--tomo-danger-ink); }
.zen-set__confirm {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--tomo-danger);
  border-radius: var(--tomo-radius-md);
  background: var(--tomo-danger-bg);
}
.zen-set__confirm span { color: var(--tomo-text-secondary); line-height: 1.45; }
.zen-set__done {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  line-height: 1.45;
  color: var(--tomo-text-primary);
}
.zen-set__done svg { flex: none; color: var(--tomo-success); transform: translateY(2px); }
.zen-brief--gone { padding: 12px 14px; }
.zen-set__edit { margin: 0 -2px; }
/* The done line's live region stays in the DOM (so it is announced when filled) but takes no room empty. */
.zen-set__live--empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.zen-set__edit:focus, .zen-brief--gone:focus { outline: none; }
/* TO-212 (mock F8): Run now's real steps, the time so far, the step a failed run stopped on. No percent bar. */
.zen-run { margin: 0; padding: var(--tomo-space-3); border-radius: 10px; background: var(--tomo-accent-subtle); }
.zen-run--failed { background: var(--tomo-danger-bg); }
.zen-run__head { display: flex; align-items: baseline; gap: var(--tomo-space-2); margin-bottom: var(--tomo-space-2); font-size: 13px; font-weight: 600; color: var(--tomo-text-primary); }
.zen-run--failed .zen-run__title { color: var(--tomo-danger-ink); }
.zen-run__time { margin-left: auto; font-size: 12px; color: var(--tomo-text-muted); font-variant-numeric: tabular-nums; }
.zen-run__steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.zen-run__step { display: flex; align-items: center; gap: var(--tomo-space-2); font-size: 13px; color: var(--tomo-text-secondary); }
.zen-run__step--active { color: var(--tomo-text-primary); font-weight: 600; }
.zen-run__step--active .zen-brief__spin { color: var(--tomo-accent); }
.zen-run__step--pending { color: var(--tomo-text-muted); }
.zen-run__step--stopped { color: var(--tomo-danger-ink); font-weight: 600; }
.zen-run__tick { width: 10px; height: 6px; flex: 0 0 10px; margin-bottom: 3px; border-left: 2px solid var(--tomo-success, var(--tomo-accent)); border-bottom: 2px solid var(--tomo-success, var(--tomo-accent)); transform: rotate(-45deg); }
.zen-run__wait { width: 8px; height: 8px; flex: 0 0 8px; margin: 0 1px; border: 1px solid var(--tomo-text-muted); border-radius: 50%; }
/* Review: the stopped step is a red ✕, as the mock. */
.zen-run__stop { width: 10px; flex: 0 0 10px; color: var(--tomo-danger-ink); font-size: 11px; font-weight: 700; line-height: 1; text-align: center; }
.zen-run__stop::before { content: "\2715"; }
.zen-run__bell { margin: var(--tomo-space-2) 0 0; font-size: 12px; color: var(--tomo-text-secondary); }
/* Review: 0.7, not 0.55, so muted text over the card still passes AA (light and dark). */
.zen-brief__last--dim { opacity: 0.7; }
.zen-brief--landed { animation: zen-brief-landed 2.4s ease-out 1; }
.zen-brief--landed .zen-brief__st { color: var(--tomo-success, var(--tomo-accent)); font-weight: 600; }
@keyframes zen-brief-landed { from { background: color-mix(in srgb, var(--tomo-success, #2F855A) 16%, transparent); } to { background: transparent; } }
/* Reduced motion keeps the landed tint, still, without the fade. */
@media (prefers-reduced-motion: reduce) { .zen-brief--landed { animation: none; background: color-mix(in srgb, var(--tomo-success, #2F855A) 10%, transparent); } }

/* ---------- P26 TO-219/TO-220: the inbox (option A, Ro 18 Nov 2026) ----------
   A mail-style row (glow dot, name and time, the one-line answer, customer and status), the
   reading pane (answer first, figures only when the run has them, Not covered, Ask at the foot),
   the Pinned group, the Hidden toast with Undo and "Hidden (n)". Tokens turn dark in tomo-face.css. */

.zen-inbox__slot { display: contents; }
.zen-inbox__slot[hidden] { display: none; }
.zen-briefs__cards > * ~ .zen-inbox__slot > .zen-brief { border-top: 1px solid var(--tomo-border-subtle); }
.zen-briefs--reading .zen-briefs__cards > .zen-inbox__slot > .zen-brief { border-top: 0; }
.zen-briefs__top[hidden] { display: none; }

.zen-inbox { position: relative; }
.zen-inbox__rowwrap { position: relative; }
.zen-inbox__row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 0;
  padding: 11px 14px 11px 0;
  border-radius: var(--tomo-radius-sm);
  transition: background var(--tomo-duration-fast) var(--tomo-ease-out);
}
.zen-inbox__row:hover { background: color-mix(in srgb, var(--tomo-surface-sunken) 60%, transparent); }
.zen-inbox--justnew .zen-inbox__row { background: linear-gradient(90deg, var(--tomo-accent-subtle) 0%, var(--tomo-accent-subtle) 55%, transparent 100%); }
.zen-inbox__dot { display: flex; justify-content: center; padding-top: 6px; }
.zen-inbox__glow {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: #2aaae1;
  box-shadow: 0 0 0 3px rgba(42, 170, 225, 0.18), 0 0 9px rgba(42, 170, 225, 0.65);
  display: inline-block;
}
.zen-inbox__glow--sm { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(42, 170, 225, 0.18), 0 0 6px rgba(42, 170, 225, 0.55); }
.zen-inbox__main { display: flex; flex-direction: column; min-width: 0; }
.zen-inbox__l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.zen-inbox__title { font-size: 14px; font-weight: 550; color: var(--tomo-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.zen-inbox--unread .zen-inbox__title, .zen-inbox--justnew .zen-inbox__title { font-weight: 750; }
.zen-inbox__time { margin-left: auto; font-size: 12px; color: var(--tomo-text-muted); white-space: nowrap; }
.zen-inbox--unread .zen-inbox__time { color: var(--tomo-accent); font-weight: 650; }
.zen-inbox__l2 { font-size: 13.5px; color: var(--tomo-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zen-inbox--unread .zen-inbox__l2 { color: var(--tomo-text-primary); font-weight: 550; }
.zen-inbox__l3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.zen-inbox__cust { font-size: 12px; color: var(--tomo-text-muted); }
.zen-inbox__allc {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0 6px; border-radius: var(--tomo-radius-full);
  background: var(--tomo-accent-subtle); color: var(--tomo-accent);
  font-size: 10.5px; font-weight: 650;
}
.zen-inbox__st { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--tomo-text-muted); white-space: nowrap; }
.zen-inbox__st--run, .zen-inbox__st--new { color: var(--tomo-accent); font-weight: 650; }
.zen-inbox__st--warn { color: var(--tomo-warn-ink); font-weight: 600; }
.zen-inbox__st--bad { color: var(--tomo-danger-ink); font-weight: 650; }
.zen-inbox__half {
  width: 11px; height: 11px; flex: none; border-radius: 50%;
  border: 1.6px solid var(--tomo-warn-ink);
  background: linear-gradient(90deg, var(--tomo-warn-ink) 50%, transparent 50%);
}
.zen-inbox__resume { position: absolute; right: 14px; bottom: 10px; }
.zen-inbox__err { margin: 0 14px 8px 20px; }

/* Row actions: Run, Pin and ⋯ on hover or keyboard focus; ⋯ stays while its menu is open. */
.zen-inbox__hov {
  position: absolute; top: 6px; right: 8px;
  display: flex; padding: 2px;
  background: var(--tomo-surface); border: 1px solid var(--tomo-border-light);
  border-radius: 9px; box-shadow: var(--tomo-shadow-md);
  opacity: 0; pointer-events: none;
  transition: opacity var(--tomo-duration-fast) var(--tomo-ease-out);
}
.zen-inbox__rowwrap:hover .zen-inbox__hov,
.zen-inbox__rowwrap:focus-within .zen-inbox__hov,
.zen-inbox__hov:has(.zen-inbox__icb--on) { opacity: 1; pointer-events: auto; }
.zen-inbox__hov--pane { position: absolute; top: 2px; right: 0; opacity: 1; pointer-events: auto; }
@media (hover: none) { .zen-inbox__hov { opacity: 1; pointer-events: auto; position: static; float: right; margin: -40px 8px 0 0; box-shadow: none; border: 0; background: transparent; } }
.zen-inbox__icb {
  width: 28px; height: 28px; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--tomo-text-secondary); cursor: pointer;
}
.zen-inbox__icb:hover, .zen-inbox__icb--on { background: var(--tomo-surface-sunken); color: var(--tomo-text-primary); }
.zen-inbox__icb:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; }
.zen-inbox__icb:disabled { opacity: 0.5; cursor: default; }

.zen-inbox__mwrap { position: relative; display: inline-flex; }
.zen-inbox__menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20;
  width: 232px; padding: 5px;
  background: var(--tomo-surface-elevated); border: 1px solid var(--tomo-border-light);
  border-radius: 11px; box-shadow: var(--tomo-shadow-lg);
  display: flex; flex-direction: column;
}
.zen-inbox__menu button, .zen-inbox__pop button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 7px 8px; border: 0; border-radius: 7px; background: transparent;
  color: var(--tomo-text-primary); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; cursor: pointer;
}
.zen-inbox__menu button:hover, .zen-inbox__pop button:hover { background: var(--tomo-surface-sunken); }
.zen-inbox__menu button svg, .zen-inbox__pop button svg { color: var(--tomo-text-muted); }
.zen-inbox__menu hr { border: 0; border-top: 1px solid var(--tomo-border-subtle); margin: 5px 4px; }
.zen-inbox__menu .zen-inbox__mswitch { justify-content: space-between; }
.zen-inbox__mswitch .tomo-switch { flex: none; pointer-events: none; }
.zen-inbox__mlabel { flex: 1; }
.zen-inbox__menu small { display: block; padding: 0 8px 4px 33px; margin-top: -3px; font-size: 11px; color: var(--tomo-text-muted); white-space: normal; }

/* Pinned and All briefs. */
.zen-inbox__grp {
  display: flex; align-items: center; gap: 5px; margin: 0;
  padding: 10px 14px 4px 20px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tomo-text-muted);
}

/* The reading pane. */
.zen-inbox--reading { padding-bottom: 0; }
/* The open pane is the only brief on show: no "opened from" rule, which ran the text into the edge. */
.zen-inbox--reading.zen-brief--forward { margin-inline: 0; padding-inline: 0; border-left: 0; }
.zen-inbox__reader { display: flex; flex-direction: column; }
.zen-inbox__tool { display: flex; align-items: center; gap: 2px; padding: 4px 0; }
.zen-inbox__crumb { font-size: 13px; color: var(--tomo-text-secondary); font-weight: 550; }
.zen-inbox__sp { flex: 1; }
.zen-inbox__read { position: relative; padding: 6px 4px 8px; }
.zen-inbox__eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding-right: 96px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tomo-text-muted);
}
.zen-inbox__eyebrow .zen-inbox__allc, .zen-inbox__eyebrow .zen-inbox__st { margin-left: 8px; letter-spacing: 0; text-transform: none; }
.zen-inbox__sep { margin: 0 6px; }
.zen-inbox__hlrow { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; }
.zen-inbox__hl { flex: 1; margin: 0; font-size: 22px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.22; color: var(--tomo-text-primary); }
.zen-inbox__exact { display: block; padding: 4px 10px 6px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--tomo-text-secondary); border-bottom: 1px solid var(--tomo-border); }
.zen-inbox__wrong {
  margin-top: 6px; padding: 0; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 550; color: var(--tomo-text-muted); white-space: nowrap;
}
.zen-inbox__wrong:hover, .zen-inbox__wrong[aria-expanded="true"] { color: var(--tomo-accent); }
.zen-inbox__bd { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--tomo-text-secondary); }
.zen-inbox__figs { margin-top: 14px; }
.zen-inbox__frow {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 12px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--tomo-border-subtle);
}
.zen-inbox__frow:last-child { border-bottom: 1px solid var(--tomo-border-subtle); }
.zen-inbox__flabel { font-size: 13px; color: var(--tomo-text-secondary); }
.zen-inbox__fig { position: relative; }
.zen-inbox__fv {
  padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tomo-text-primary);
  text-decoration: underline dotted; text-decoration-color: color-mix(in srgb, var(--tomo-text-muted) 70%, transparent); text-underline-offset: 3px;
}
.zen-inbox__fv:hover, .zen-inbox__fig--open .zen-inbox__fv { text-decoration-color: var(--tomo-accent); }
.zen-inbox__fv--plain { cursor: default; text-decoration: none; }
.zen-inbox__pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 220px; padding: 6px;
  background: var(--tomo-surface-elevated); border: 1px solid var(--tomo-border-light);
  border-radius: 10px; box-shadow: var(--tomo-shadow-lg); display: flex; flex-direction: column;
}
.zen-inbox__fdl { min-width: 44px; text-align: right; font-size: 12.5px; font-weight: 650; }
.zen-inbox__fdl--good { color: var(--tomo-ok-ink); }
.zen-inbox__fdl--bad { color: var(--tomo-danger-ink); }
.zen-inbox__fdl--muted { color: var(--tomo-text-muted); }
.zen-inbox__chg { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 12px 0 0; font-size: 13px; color: var(--tomo-text-secondary); }
.zen-inbox__lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tomo-text-muted); }
.zen-inbox__nc { margin-top: 16px; padding: 2px 0 2px 12px; border-left: 2px solid var(--tomo-warn-line); }
.zen-inbox__nch { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tomo-warn-ink); }
.zen-inbox__nct { margin: 3px 0 0; font-size: 14px; color: var(--tomo-text-primary); }
.zen-inbox__ncs { margin: 2px 0 0; font-size: 12.5px; color: var(--tomo-text-secondary); }
.zen-inbox__srcline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 0; font-size: 12px; color: var(--tomo-text-muted); }
.zen-inbox__link { align-self: flex-start; margin-top: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--tomo-accent); }
.zen-inbox__ask {
  position: sticky; bottom: 0; display: flex; align-items: center; gap: 9px;
  margin: 10px 0 12px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--tomo-surface-sunken);
}
.zen-inbox__askin { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--tomo-text-primary); font: inherit; font-size: 13.5px; outline: none; }
.zen-inbox__askin::placeholder { color: var(--tomo-text-muted); }
.zen-inbox__send {
  width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: var(--tomo-accent); color: var(--tomo-on-accent); cursor: pointer;
}
.zen-inbox__ask:focus-within { box-shadow: 0 0 0 2px var(--tomo-accent-subtle); }

/* Hide → the toast with Undo; the Hidden (n) row and its dimmed rows. */
.zen-inbox__toast {
  display: flex; align-items: center; gap: 12px; margin: 10px 0; padding: 8px 12px;
  border-radius: 10px; background: var(--tomo-text-primary); color: var(--tomo-surface);
  font-size: 13px; box-shadow: var(--tomo-shadow-lg);
}
.zen-inbox__undo { margin-left: auto; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 700; color: #2aaae1; }
.zen-inbox__hidden { margin-top: 4px; border-top: 1px solid var(--tomo-border-subtle); }
.zen-inbox__hiddenrow {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 14px 10px 2px;
  border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--tomo-text-muted); text-align: left;
}
.zen-inbox__hiddenrow:focus-visible { outline: 2px solid var(--tomo-accent); outline-offset: 1px; border-radius: var(--tomo-radius-sm); }
.zen-inbox__hrow {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 20px;
  border-top: 1px solid var(--tomo-border-subtle);
  background: color-mix(in srgb, var(--tomo-surface-sunken) 45%, transparent);
}
.zen-inbox__hmain { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.zen-inbox__hname { font-size: 14px; font-weight: 500; color: var(--tomo-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zen-inbox__hline { font-size: 13px; color: var(--tomo-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zen-inbox__unhide { margin-left: auto; padding: 0; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--tomo-accent); white-space: nowrap; }

@media (max-width: 480px) {
  .zen-inbox__hl { font-size: 20px; }
  .zen-inbox__eyebrow { padding-right: 0; }
  .zen-inbox__hov--pane { position: static; justify-content: flex-end; margin-bottom: 4px; border: 0; box-shadow: none; }
}

/* P26 TO-219: "You asked: …" and "Shared by …" under the eyebrow (mock option A, .q). */
.zen-inbox__q { margin: 4px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--tomo-text-muted); }
.zen-inbox__q i { font-style: normal; color: var(--tomo-text-secondary); }
