.source-render :where(button,input,select,textarea){font:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}
.source-render :where(button,input:where([type="button"],[type="reset"],[type="submit"])){appearance:button}
.source-render :where(h1,h2,h3,h4,p,ul,ol){margin:0}
.source-render :where(table){border-collapse:collapse;text-indent:0}
/* Source AMS presentation styles. See docs/product-concept-sources.md. */
.memory-card {
  max-width: min(560px, 84%);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--rule));
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 5%, var(--paper-strong));
  padding: 10px 14px 11px;
  font-size: 13px; line-height: 1.45;
}
/**
 * Held: the save exists and no agent can see it yet. The card is deliberately no louder than the
 * settled one — this is a few seconds of grace, not an alarm — and the meter below carries the
 * urgency instead, because a bar that is visibly running out reads faster than any wording.
 */
.memory-card.holding { padding-bottom: 0; }
.memory-card.pending { border-left-color: color-mix(in srgb, var(--accent) 45%, transparent); }

.memory-card-countdown {
  color: var(--ink-soft); font-size: 11px; font-variant-numeric: tabular-nums;
}
.memory-card-foot button.stop:hover:not(:disabled) { border-color: var(--danger, #b4342a); color: var(--danger, #b4342a); }

/* Full width of the card, flush to its bottom edge, so it reads as the card's own remaining time. */
.memory-card-meter {
  height: 2px; margin: 9px -14px 0;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 0 0 9px 9px; overflow: hidden;
}
.memory-card-meter i {
  display: block; height: 100%; width: 100%;
  background: var(--accent); transform-origin: left;
  animation: memory-hold-drain linear forwards;
}
@keyframes memory-hold-drain { to { transform: scaleX(0); } }
/* No animation: hold the bar at half so the window still reads as time-limited rather than broken. */
@media (prefers-reduced-motion: reduce) {
  .memory-card-meter i { animation: none; transform: scaleX(.5); }
}
.memory-card.undone { border-left-color: var(--rule); background: color-mix(in srgb, var(--paper-strong) 70%, transparent); opacity: .72; }

.memory-card-head { display: flex; align-items: center; gap: 7px; }
.memory-card-mark { display: inline-flex; color: var(--accent); }
.memory-card.undone .memory-card-mark { color: var(--ink-soft); }
.memory-card-title { font-size: 12px; font-weight: 680; letter-spacing: .01em; color: var(--ink); }
/* Who keeps it. The one thing a person cannot infer from the sentence itself. */
.memory-card-scope {
  margin-left: auto;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 1px 8px;
  color: var(--ink-soft); font-size: 10.5px; font-weight: 650; white-space: nowrap;
}

.memory-card-was { list-style: none; margin: 7px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.memory-card-was li { display: flex; gap: 7px; color: var(--ink-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink-soft) 55%, transparent); }
.memory-card-now { display: flex; gap: 7px; margin: 5px 0 0; color: var(--ink); }
/* Fixed width so "was" and "now" stack into a column and the two sentences line up for comparison. */
.memory-card-label {
  flex: none; width: 30px;
  color: var(--ink-soft); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding-top: 3px;
}

.memory-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.memory-card-foot button {
  min-height: 28px;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper-strong); padding: 3px 12px;
  color: var(--ink-soft); font-size: 11.5px; font-weight: 650;
  transition: color 150ms ease, border-color 150ms ease;
}
.memory-card-foot button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.memory-card-foot button:disabled { opacity: .6; }
.memory-card-error { color: var(--danger, #b4342a); font-size: 11.5px; }
.memory-card-restored { margin: 7px 0 0; color: var(--ink-soft); font-size: 11.5px; }

.memory-card-dots { display: inline-flex; gap: 4px; padding: 0 2px; }
.memory-card-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: card-pending-bounce 1.2s ease-in-out infinite;
}
.memory-card-dots i:nth-child(2) { animation-delay: .15s; }
.memory-card-dots i:nth-child(3) { animation-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .memory-card-dots i { animation: none; opacity: .7; } }

@media (max-width: 700px) { .memory-card { max-width: 100%; } }

.history-section { display: flex; flex-direction: column; }
/**
 * Where the day changes.
 *
 * A pill rather than the ruled line the conversation dividers use, because these two markers answer
 * different questions — which day is this, versus where does one chat end and the next begin — and
 * a reader scanning back should be able to tell them apart without reading either.
 */

.approval, .feedback-row > .approval {
  width: 100%; max-width: min(100%, 660px); margin: 0; padding: 0;
  border: 1px solid var(--rule); border-radius: 18px; overflow: hidden;
  background: var(--paper-strong); color: var(--ink); font-size: 13px; line-height: 1.5;
  box-shadow: 0 4px 18px rgba(73, 48, 30, .06);
}
.approval-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 18px; }
.approval-heading-icon { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--rule)); border-radius: 12px; color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper-strong)); }
.approval-heading-copy { min-width: 0; }
.approval-eyebrow { margin: 0 0 4px; color: var(--ink-soft); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.approval-head h3 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
.approval-requester { margin: 5px 0 0; color: var(--ink-soft); font-size: 12px; }
.approval-requester strong { color: var(--ink); font-weight: 550; }
.approval-body { padding: 0 24px 22px; }
.approval-amount { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px; margin-bottom: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.approval-field-label, .approval-fields dt { display: block; color: var(--ink-soft); font-size: 11px; font-weight: 500; }
.approval-amount p { margin: 3px 0 0; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.approval-amount p span { font-size: 16px; font-weight: 500; color: var(--ink-soft); }
.approval-amount p strong { font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.approval-type { max-width: 45%; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-strong); color: var(--ink-soft); font-size: 11px; font-weight: 600; text-transform: capitalize; }
.approval-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 24px; margin: 0; }
.approval-finance-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.approval-field { min-width: 0; }
.approval-field.wide { grid-column: 1 / -1; }
.approval-field.wide + .approval-field.wide { border-top: 1px solid var(--rule); padding-top: 14px; }
.approval-fields dd { margin: 4px 0 0; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.approval-prose { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.approval-more { display: block; margin-top: 6px; padding: 2px 0; background: none; border: 0; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; }
.approval-more:hover { text-decoration: underline; }
.approval-technical { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.approval-technical > summary { cursor: pointer; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.approval-technical > summary:hover { color: var(--accent); }
.approval-technical .approval-fields { margin-top: 12px; }
.approval-footer { padding: 18px 24px; border-top: 1px solid var(--rule); background: var(--paper); }
.approval-always { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; color: var(--ink-soft); cursor: pointer; }
.approval-always input, .approval-change label input { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; accent-color: var(--accent); }
.approval-always strong { display: block; color: var(--ink); font-size: 12px; font-weight: 550; }
.approval-always small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.approval-actions, .approval-decision-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.approval-actions { justify-content: space-between; }
.approval-decision-actions { min-width: 0; }
.approval-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border-radius: 9px; padding: 9px 15px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.approval-actions button svg { flex-shrink: 0; }
.approval-actions .approve { border: 1px solid transparent; background: var(--accent-fill); color: var(--accent-text); }
.approval-actions .approve:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-fill) 90%, var(--ink)); }
.approval-actions .decline { border: 1px solid var(--rule); background: var(--paper-strong); color: var(--ink); }
.approval-actions .approval-cancel { border: 1px solid transparent; background: transparent; color: var(--ink-soft); font-weight: 500; padding-inline: 4px; }
.approval-actions :is(.decline, .approval-cancel):hover:not(:disabled) { background: var(--surface-muted); }
.approval-actions button:disabled { opacity: .55; cursor: wait; }
.approval :is(button, input, summary, a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.approval-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 14px; color: var(--ink-soft); font-size: 10.5px; }
.approval-expiry { display: inline-flex; align-items: center; gap: 4px; }
.approval-selection-hint { margin: 0 0 12px; color: var(--ink-soft); font-size: 12px; }
.approval-changes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.approval-change { border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
.approval-change label { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; cursor: pointer; }
.approval-change label strong { font-weight: 600; }
.approval-change .approval-details { margin-top: 14px; }
.approval-change.off { opacity: .6; }
.approval-change.off label strong { text-decoration: line-through; }
@container agent-chat (max-width: 520px) {
  .approval-head { padding: 18px 16px 16px; }
  .approval-body { padding: 0 16px 18px; }
  .approval-footer { padding: 16px; }
  .approval-head h3 { font-size: 16px; }
  .approval-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .approval-amount { padding: 14px; }
}


.approval-attachment { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: .5rem 0 0; padding: .5rem .75rem; border: 1px solid var(--rule, #e5ded2); border-radius: 8px; font-size: .875rem; }
.approval-attachment span { color: var(--ink-mute, #8a8178); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.approval-attachment small { color: var(--ink-mute, #8a8178); }
.approval-attachment button { margin-left: auto; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.approval-attachment a { font-weight: 600; }
.approval-popup, .approval-popup-pill { position: fixed; z-index: 60; right: 20px; bottom: 20px; }
.approval-popup { display: flex; flex-direction: column; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); border: 1px solid var(--rule); border-radius: 18px; background: var(--paper-strong); box-shadow: 0 18px 50px rgb(0 0 0 / .22); overflow: hidden; }
.approval-popup > .approval { margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow-y: auto; min-height: 0; }
.approval-popup-bar { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft); font-size: 12px; }
.approval-popup-bar span { flex: 1; font-weight: 600; }
.approval-popup-bar a { color: var(--accent); font-weight: 600; text-decoration: none; }
.approval-popup-bar a:hover { text-decoration: underline; }
.approval-popup-bar button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--ink-soft); cursor: pointer; }
.approval-popup-bar button:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.approval-popup-error { margin: 0; padding: 10px 16px; border-top: 1px solid var(--rule); color: #b42318; font-size: 12px; }
.approval-popup-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid transparent; border-radius: 999px; background: var(--accent-fill); color: var(--accent-text); font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgb(0 0 0 / .2); cursor: pointer; }
@media (max-width: 1023px) {
  .approval-popup, .approval-popup-pill { right: 16px; left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .approval-popup { width: auto; max-height: calc(100dvh - 120px - env(safe-area-inset-bottom)); }
  .approval-popup-pill { justify-content: center; }
}

/* Source composer rules; renamed only to avoid the old demo selector. */
.ams-composer-wrap {
  position: relative;
  flex: 0 0 auto;
  padding: 12px clamp(14px, 5vw, 72px) max(14px, env(safe-area-inset-bottom));
}
.ams-composer-wrap::before {
  position: absolute; inset: -30px 0 auto 0; height: 30px; content: '';
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--paper) 55%, transparent));
  pointer-events: none;
}
.ams-composer { width: var(--chat-column); display: flex; align-items: flex-end; gap: 10px; margin: 0 auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/**
 * The pill holds the paperclip and the field together; only the send button stands outside it.
 *
 * That is the arrangement every messenger has settled on, and the reason is that the paperclip acts
 * on what you are writing, while send acts on the message. Putting the clip outside made the pill
 * one of three equal things in a row and left it unclear which of them the field belonged to.
 */
.ams-composer-field {
  min-width: 0; flex: 1; display: flex; align-items: flex-end; gap: 2px;
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 999px;
  background: var(--paper-strong);
  box-shadow: 0 6px 18px rgba(73,48,30,.07);
  padding: 0 6px 0 4px;
  transition: border-radius 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.ams-composer-field.multiline { border-radius: 20px; }
.ams-composer-field:focus-within { border-color: color-mix(in srgb, var(--ink) 20%, transparent); }

.attach {
  width: 38px; height: 42px; flex: 0 0 auto; display: grid; place-items: center;
  border: 0; background: transparent; padding: 0; color: var(--ink-mute);
  border-radius: 50%; transition: color 150ms ease;
}
.attach svg { width: 19px; height: 19px; }
.attach:hover:not(:disabled) { color: var(--ink); }
.attach:disabled { opacity: .4; }

.ams-composer textarea {
  min-width: 0; min-height: 42px; max-height: min(45dvh, 420px); flex: 1; overflow-y: auto; resize: none;
  border: 0; background: transparent; box-shadow: none;
  padding: 10px 8px;
  color: var(--ink); outline: none; font-size: 15px; line-height: 22px;
}
.ams-composer textarea::placeholder { color: var(--ink-mute); }
/**
 * Focus darkens the pill's rim and nothing else.
 *
 * The shared focus-visible rule draws a 2px accent outline three pixels clear of the element, which
 * is right for a button you tabbed onto and wrong here: the accent is a warm red for this workspace,
 * the outline traces the field at a distance, and it appears the moment anyone starts typing — so
 * writing a message looked like a validation error. A caret sitting in the field already says where
 * focus is, so the rim only has to confirm it.
 */
.ams-composer textarea:focus-visible { outline: none; }
.ams-composer textarea:disabled { opacity: .6; }
/**
 * No scrollbar inside the pill.
 *
 * overflow-y has to stay auto, because a draft longer than the 120px cap must still scroll. But the
 * shared scrollbar styling paints a 6px thumb in ink, and in a 44px pill that is a dark vertical bar
 * standing at the right end of the field — which is what it looked like: a stray bar between the
 * composer and the send button. Scrolling still works; only the chrome is hidden.
 */
.ams-composer textarea { scrollbar-width: none; }
.ams-composer textarea::-webkit-scrollbar { width: 0; height: 0; }
.send {
  width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--accent-fill); color: var(--accent-text);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: filter 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}
.send svg { width: 19px; height: 19px; }
.send:hover:not(:disabled) { filter: brightness(1.07); }
.send:disabled { background: var(--paper-strong); color: var(--ink-mute); box-shadow: 0 4px 12px rgba(73,48,30,.05); }

.sidebar-controls { border-top: 0; }
}
.brandbar-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brandbar-row .company-brand { min-width: 0; }
.brandbar-row .company-brand > span:last-child { min-width: 0; }
.brandbar-row .company-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/**
 * Who is signed in, and the menu behind them.
 *
 * The footer used to hold a bare sign-out and nothing else, so the sidebar never said whose
 * workspace was on screen. The name is the control now; signing out is one entry inside it. Shaped
 * the way the rest of this sidebar is shaped — the list rows' radius, the same rim mixed from the
 * text colour — so it reads as part of the column rather than a widget dropped into the bottom of it.
 *
 * Every tint here mixes from --surface-text rather than from --paper, because in the dark palette
 * --paper and --paper-strong are the same colour and a hover between them shows nothing. Mixing the
 * text colour into the ground darkens in the light theme and lightens in the dark one, which is what
 * raised means in each.
 */
.account { position: relative; }
.account-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  padding: 6px 8px;
  text-align: left;
  color: inherit;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.account-trigger:hover, .account-trigger.open {
  border-color: color-mix(in srgb, var(--surface-text) 13%, transparent);
  background: color-mix(in srgb, var(--surface-text) 6%, transparent);
}
.account-avatar {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-text) 12%, transparent);
  color: inherit;
  font-size: 11px; font-weight: 650; letter-spacing: .02em;
}
.account-name {
  min-width: 0; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600;
}
.account-chevron {
  width: 15px; height: 15px; flex: 0 0 auto;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: .5;
  transition: transform 160ms ease, opacity 150ms ease;
}
.account-trigger:hover .account-chevron { opacity: .8; }
/* Pointing at the menu it opened, which is above it. */
.account-trigger.open .account-chevron { transform: rotate(180deg); opacity: .8; }

/* The name-shaped hole held before the account has been read, so the footer does not change height. */
.account-trigger.placeholder .account-avatar,
.account-trigger.placeholder .account-name { background: color-mix(in srgb, var(--surface-text) 7%, transparent); }
.account-trigger.placeholder .account-name { height: 11px; border-radius: 5px; max-width: 108px; }

.account-menu {
  position: absolute;
  left: 0; right: 0; bottom: calc(100% + 7px);
  z-index: 40;
  display: flex; flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--surface-text) 12%, transparent);
  border-radius: 14px;
  background: var(--paper-strong);
  padding: 5px;
  box-shadow: 0 -2px 4px rgba(73,48,30,.04), 0 14px 34px rgba(73,48,30,.16);
  animation: account-menu-in 120ms ease-out;
}
@keyframes account-menu-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .account-menu { animation: none; } }
.account-menu-email {
  margin: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 7px 10px 8px;
  color: var(--ink-mute);
  font-size: 12px;
}
.account-menu-item {
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 9px;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  color: inherit;
  font-size: 13px;
}
/**
 * The row highlights; it does not get a ring.
 *
 * The shared focus-visible rule draws a 2px accent outline three pixels clear of the element, which
 * inside a menu means a warm red rectangle overhanging the menu's own padding and clipping on its
 * border. Highlighting the whole row is how a menu says where you are instead.
 *
 * Keyed to :focus and not :focus-visible. Opening a menu moves focus to its first entry, and the
 * browser does not reliably count a focus a script moved as keyboard-shaped — so the entry a person
 * had just arrowed to could sit there with nothing on it at all. Inside an open menu the
 * distinction is not worth keeping: focus is the selection, it is what Enter will act on, and the
 * entry under the pointer is covered by :hover regardless.
 */
.account-menu-item:focus, .account-menu-item:focus-visible { outline: none; }
.account-menu-item:hover, .account-menu-item:focus {
  background: color-mix(in srgb, var(--surface-text) 8%, transparent);
}
/* The rule belongs to the group, so it is drawn by the entry that starts one. */
.account-menu-item.separated {
  margin-top: 5px;
  border-top: 1px solid color-mix(in srgb, var(--surface-text) 10%, transparent);
  border-radius: 0 0 9px 9px;
  padding-top: 12px;
}
.account-menu-item.danger { color: var(--brick); }
.account-menu-item.danger:hover, .account-menu-item.danger:focus {
  background: color-mix(in srgb, var(--brick) 10%, transparent);
}
.account-menu-icon { display: grid; place-items: center; }
.account-menu-icon svg {
  width: 16px; height: 16px;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  opacity: .75;
}
.account-menu-item:hover .account-menu-icon svg, .account-menu-item:focus .account-menu-icon svg { opacity: 1; }

.sidebar-footer { position: relative; z-index: 2; flex: 0 0 auto; border-top: 1px solid color-mix(in srgb, var(--surface-text) 11%, transparent); background: color-mix(in srgb, var(--surface) 96%, var(--paper)); padding: 10px 12px max(10px, env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  .workspace-with-rail .chat-account-footer { display: none; }
}

.sidebar-controls { flex: 0 0 auto; border-top: 1px solid color-mix(in srgb, var(--surface-text) 11%, transparent); padding: 12px 14px; }
.search-wrap {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--surface-text) 15%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.search-wrap > span { flex: 0 0 auto; color: inherit; font-size: 18px; opacity: .58; }
.ams-search { min-width: 0; width: 100%; border: 0; background: transparent; padding: 10px 0; color: inherit; outline: none; }
.ams-search::placeholder { color: inherit; opacity: .58; }
/**
 * Focus darkens the search pill's rim and nothing else, exactly as it does in the composer.
 *
 * There were two accent rings here at once: this rule painted the pill and a 3px halo around it, and
 * the shared focus-visible rule drew a square 2px outline three pixels clear of the bare input
 * inside it. Against a warm red accent a box inside a box inside a halo reads as a field rejecting
 * what you typed, which is the opposite of what typing in a search box means. The caret already says
 * where focus is, so the rim only has to confirm it.
 */
.search-wrap:focus-within { border-color: color-mix(in srgb, var(--surface-text) 34%, transparent); }
.ams-search:focus-visible { outline: none; }
.sidebar-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px; scrollbar-gutter: stable; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 7px; color: inherit; font: 650 10px/1.2 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; opacity: .64; }
.list-item {
  width: 100%;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  padding: 10px;
  text-align: left;
  color: inherit;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.list-item + .list-item { margin-top: 2px; }
.list-item:hover:not(.active) { background: color-mix(in srgb, var(--paper) 62%, transparent); }
/**
 * The selected agent, marked by being lifted off the list rather than coloured.
 *
 * It used to carry a bar of the workspace accent down its left edge and an accent-tinted rim. In a
 * sidebar of ten rows that is a lot of brand for "this is the one you are reading", and the accent
 * is already doing the work that matters on the page — your own messages, the send button. A raised
 * white card against the sidebar's flat ground says selected on its own.
 */
.list-item.active { border-color: color-mix(in srgb, var(--ink) 8%, transparent); background: var(--paper-strong); box-shadow: 0 7px 20px rgba(73,48,30,.07); color: var(--ink); }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 7%, transparent); border-radius: 50%; background: var(--avatar-surface); color: var(--ink); font-weight: 750; box-shadow: inset 0 1px 0 rgba(255,255,255,.55); }
.conversation-avatar { width: 46px !important; height: 46px !important; }
/**
 * An agent row, in the shape a chat list has: who, when, and what was last said.
 *
 * The department moved onto the name's line because the line below it is worth more as a preview of
 * the conversation than as a label that never changes. It keeps its own width only as far as the
 * name allows — a long name pushes it out before either is truncated, since which agent this is
 * matters more than which department it sits in.
 */
.item-copy { min-width: 0; flex: 1; }
.item-line { min-width: 0; display: flex; align-items: baseline; gap: 7px; }
.item-title { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.item-role { min-width: 0; flex: 0 1 auto; overflow: hidden; color: inherit; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; opacity: .55; }
.item-stamp { flex: 0 0 auto; margin-left: auto; padding-left: 4px; color: inherit; font-size: 11px; font-variant-numeric: tabular-nums; opacity: .6; }
.item-sub { overflow: hidden; margin-top: 2px; color: inherit; font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; opacity: .66; }
.item-sender { opacity: .8; }
