/* ============================================================
   HIRO TALKS — design tokens
   Palette, radii and elevation follow the shadcn/ui neutral
   system (zero-chroma greys, near-black primary, hairline
   borders, barely-there shadows). Values were read off the
   reference kit's computed custom properties, not eyeballed.
   ============================================================ */
:root {
  /* Poppins is self-hosted: public/fonts/poppins, linked from the skeleton. */
  --font:
    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* --- chrome: rail, sidebar, topbar -------------------------------
     The reference kit has no dark chrome. Sidebar and shell share one
     light neutral tone; content panes sit on top of it as white cards. */
  --rail-bg: #f7f7f7;
  --side-bg: #f7f7f7;
  --top-bg: #f7f7f7;
  --side-fg: #5f5f5f;
  --side-fg-strong: #0a0a0a;
  --side-hover: #ededed;
  --side-active: #e4e4e4;
  --side-active-fg: #0a0a0a;
  --side-border: #e5e5e5;
  /* icon/affordance tints on chrome, replacing rgba(255,255,255,*) */
  --chrome-icon: #737373;
  --chrome-icon-hover: #0a0a0a;
  --chrome-hover: rgba(10, 10, 10, 0.05);
  --chrome-hover-strong: rgba(10, 10, 10, 0.08);
  --chrome-field: #ffffff;
  --chrome-field-border: #e5e5e5;

  /* --- content surfaces --- */
  --bg: #ffffff;
  --bg-2: #fafafa;
  --bg-3: #f5f5f5;
  --tool-dot: transparent; /* the reference kit uses flat surfaces */
  --hover: #f5f5f5;
  --fg: #0a0a0a;
  --fg-2: #525252;
  --fg-3: #737373;
  --border: #e5e5e5;
  --border-2: #e5e5e5;
  --ring: #a1a1a1;

  /* --- accents ---
     The kit's primary is a near-black neutral, not a hue. --green is
     this app's historical name for the primary/interactive colour;
     --accent-brand is the single knob to reintroduce a brand hue. */
  --accent-brand: #171717;
  --green: var(--accent-brand);
  --green-hover: #2e2e2e;
  --on-accent: #fafafa;
  --link: #2563eb;
  /* aliases: several sheets reference these with a purple fallback */
  --accent: var(--accent-brand);
  --violet: var(--accent-brand);
  --accent-soft: #f5f5f5;

  /* --- semantic --- */
  --red: #dc2626;
  --yellow: #f59e0b;
  --blue: #2563eb;
  --presence: #22c55e;
  /* People outside Hiro in a call (guest calls): one amber pair. */
  --guest-bg: #fef3c7;
  --guest-fg: #92400e;
  /* Answers to a scheduled call (calendar v2, P0): Accepted green,
     Tentative orange, Declined red, No answer white with a dashed grey
     border. The shape colour is for edges, dots and bars; text uses -ink,
     because the shapes are too light to read on white. Not --green: that
     is the near-black brand colour. */
  --rsvp-yes: #16a34a;
  --rsvp-yes-tint: #eaf6ef;
  --rsvp-yes-ink: #15803d;
  --rsvp-maybe: #ff8500;
  --rsvp-maybe-tint: #fff4e5;
  --rsvp-maybe-ink: #a85600;
  --rsvp-no: #ff0500;
  --rsvp-no-tint: #fff0f0;
  --rsvp-no-ink: #c70400;
  --rsvp-none: #a3a3a3;
  --away: #a3a3a3;
  --mention-bg: rgba(245, 158, 11, 0.12);
  --mention-fg: #0a0a0a;
  --highlight: #fde68a;

  /* --- elevation: the kit leans on borders, not shadows --- */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);

  /* --- radii: the kit's scale, based on 0.625rem --- */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
}
html[data-theme="dark"] {
  --rail-bg: #0a0a0a;
  --side-bg: #0a0a0a;
  --top-bg: #0a0a0a;
  --side-fg: #b5b5b5;
  --side-fg-strong: #fafafa;
  --side-hover: #1f1f1f;
  --side-active: #2b2b2b;
  --side-active-fg: #fafafa;
  --side-border: rgba(255, 255, 255, 0.1);
  --chrome-icon: #a1a1a1;
  --chrome-icon-hover: #fafafa;
  --chrome-hover: rgba(255, 255, 255, 0.08);
  --chrome-hover-strong: rgba(255, 255, 255, 0.12);
  --chrome-field: rgba(255, 255, 255, 0.06);
  --chrome-field-border: rgba(255, 255, 255, 0.12);

  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #171717;
  --tool-dot: transparent;
  --hover: #1c1c1c;
  --fg: #fafafa;
  --fg-2: #d4d4d4;
  --fg-3: #a3a3a3;
  --border: #262626;
  --border-2: #2e2e2e;
  --ring: #737373;

  --accent-brand: #525252;
  --green: var(--accent-brand);
  --green-hover: #737373;
  --on-accent: #fafafa;
  --link: #60a5fa;
  --accent: var(--accent-brand);
  --violet: var(--accent-brand);
  --accent-soft: #262626;

  --red: #f87171;
  --presence: #22c55e;
  /* People outside Hiro in a call (guest calls): one amber pair. */
  --guest-bg: rgba(245, 158, 11, 0.18);
  --guest-fg: #fbbf24;
  /* Answers to a scheduled call: the same hues; on a dark page the shapes
     are readable as text, except red, which gets a lighter ink. */
  --rsvp-yes: #4ade80;
  --rsvp-yes-tint: #07240f;
  --rsvp-yes-ink: #4ade80;
  --rsvp-maybe: #ff8500;
  --rsvp-maybe-tint: #2b1700;
  --rsvp-maybe-ink: #ff8500;
  --rsvp-no: #ff0500;
  --rsvp-no-tint: #2b0504;
  --rsvp-no-ink: #ff5a55;
  --rsvp-none: #737373;
  --mention-bg: rgba(245, 158, 11, 0.16);
  --highlight: #5c4a1e;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 1px 2px -1px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5),
    0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6),
    0 4px 6px -4px rgba(0, 0, 0, 0.6);
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--fg);
  background: var(--rail-bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  font-family: inherit;
  color: inherit;
}
/* the kit sets headings tight and semibold rather than black */
h1,
h2,
h3,
h4 {
  letter-spacing: -0.02em;
  font-weight: 600;
}
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
  background-clip: content-box;
  border: 3px solid transparent;
}
::-webkit-scrollbar-track {
  background: transparent;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  background-clip: content-box;
  border: 3px solid transparent;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  background-clip: content-box;
  border: 3px solid transparent;
}
.sidebar ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  background-clip: content-box;
  border: 3px solid transparent;
}
html[data-theme="dark"] .sidebar ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  background-clip: content-box;
  border: 3px solid transparent;
}
/* ============================ layout ============================ */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.tb-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--chrome-icon);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.tb-btn:hover {
  background: var(--chrome-hover);
  color: var(--chrome-icon-hover);
}
.tb-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.body {
  flex: 1;
  display: flex;
  min-height: 0;
}

/* rail */
.rail {
  width: 70px;
  flex: 0 0 70px;
  background: var(--rail-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 10px;
  gap: 2px;
  color: var(--chrome-icon);
}

/* sidebar */
/* Its width is the person's own: drag the edge (.sb-resize, 02-sidebar.js),
   remembered in this browser. 300px unless they choose. */
.sidebar {
  position: relative;
  width: var(--sb-w, 300px);
  flex: 0 0 var(--sb-w, 300px);
  background: var(--side-bg);
  color: var(--side-fg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--side-border);
  min-height: 0;
}
.sb-head {
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--side-border);
}
.sb-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--side-fg-strong);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
}
.sb-actions {
  display: flex;
  gap: 2px;
}
.sb-icon {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--side-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.sb-icon:hover {
  background: var(--chrome-hover);
  color: var(--chrome-icon-hover);
}
.sb-icon.filled {
  background: var(--accent-brand);
  color: var(--on-accent);
}
.sb-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 40px;
  min-height: 0;
}
.sb-quick {
  padding: 0 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sb-row {
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 34px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--side-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sb-row:hover {
  background: var(--side-hover);
}
.sb-row.active {
  background: var(--side-active);
  color: var(--side-active-fg);
  font-weight: 600;
}
.sb-row.unread {
  color: var(--side-fg-strong);
  font-weight: 600;
}
.sb-row .nm {
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.sb-row .ico {
  width: 16px;
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  color: var(--chrome-icon);
}
.sb-row:hover .ico,
.sb-row.active .ico,
.sb-row.unread .ico {
  color: currentColor;
}
/* A direct message's icon (convIcon): the other person's face with a
   presence dot, or the member count of a group DM. */
.conv-av {
  position: relative;
  display: inline-flex;
}
.conv-presence {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--side-bg);
}
.conv-presence.on {
  background: var(--presence);
}
.conv-presence.dnd {
  background: var(--red);
}
.conv-presence.off {
  border-color: var(--side-fg);
}
.sb-row .pill {
  background: var(--side-active);
  color: var(--side-active-fg);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
  line-height: 17px;
}
.sb-row .muted-tag {
  opacity: 0.55;
}
.sb-section {
  margin-top: 10px;
  padding: 0 8px;
}
.sb-sec-count {
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--side-active);
  color: var(--side-active-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 18px;
  margin-left: 5px;
}
.sb-sec-head {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--fg-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.12s;
}
.sb-sec-head:hover {
  color: var(--side-fg-strong);
}
.sb-sec-head .caret {
  transition: transform 0.12s;
}
.sb-sec-head.collapsed .caret {
  transform: rotate(-90deg);
}
.sb-sec-head .grow {
  flex: 1;
}
.avatar {
  border-radius: var(--radius-full);
  display: block;
  object-fit: cover;
}
.pres {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 9px;
}
.pres.on {
  background: var(--presence);
}
.pres.off {
  background: transparent;
  border: 1.6px solid currentColor;
  opacity: 0.7;
}
.pres.dnd {
  background: var(--red);
}

/* main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius) 0 0 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  overflow: hidden;
}
.main,
.msgs-wrap,
.msgs,
.tk-body,
.doc-main,
.doc-page,
#adBody,
.wb {
  background-color: var(--bg);
}
.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
}
.chan-head {
  height: 56px;
  flex: 0 0 56px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  background: var(--bg);
}
.ch-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: 16px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
  flex: 0 1 auto;
  min-width: 110px;
}
.ch-title:hover {
  background: var(--hover);
}

.ch-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
  flex: 0 1 auto;
  overflow: hidden;
}
.ch-tab {
  border: none;
  background: transparent;
  color: var(--fg-3);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ch-tab:hover {
  background: var(--hover);
  color: var(--fg);
}
.ch-tab.active {
  color: var(--fg);
  font-weight: 600;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
}
.head-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.facepile {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px 9px 3px 5px;
  gap: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s;
}
.facepile:hover {
  background: var(--hover);
}
.facepile .fp {
  display: flex;
}
.facepile .fp img {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  margin-right: -6px;
  border: 1.5px solid var(--bg);
}
.hbtn {
  height: 32px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, border-color 0.12s;
}
.hbtn:hover {
  background: var(--hover);
}
.hbtn.bordered {
  border-color: var(--border);
}
.hbtn.bordered:hover {
  background: var(--hover);
  border-color: var(--ring);
}
.hbtn.split {
  padding-right: 4px;
}
/* "Name this channel" beside an unnamed chat's title (P1): a link, not a
   button, so it stays quiet. */
.ch-name-it {
  border: none;
  background: transparent;
  color: var(--link);
  font-size: 12px;
  padding: 2px 4px;
  cursor: pointer;
  white-space: nowrap;
}
.ch-name-it:hover {
  text-decoration: underline;
}

/* The drag handle on the list's right edge (desktop only). */
.sb-resize {
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 5;
  touch-action: none;
}
.sb-resize::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 2px;
  width: 2px;
  background: transparent;
  transition: background 0.12s;
}
.sb-resize:hover::after,
.sb-resize:focus-visible::after,
body.sb-resizing .sb-resize::after {
  background: var(--fg-3);
}
.sb-resize:focus-visible {
  outline: none;
}
body.sb-resizing {
  cursor: col-resize;
  user-select: none;
}
@media (max-width: 1000px) {
  .sb-resize {
    display: none;
  }
}
body.sidebar-collapsed .sb-resize {
  display: none;
}
/* No easing while dragging: the edge follows the pointer. */
body.hs.sb-resizing .sidebar {
  transition: none;
}

/* ---- one conversation list (one-list plan, Part C) ---- */
/* The chips sit between the header and the list, outside the scroll box,
   so they never scroll away. */
.sb-chips {
  flex: 0 0 auto;
  display: flex;
  padding: 6px 12px 8px;
  border-bottom: 0;
}
.sb-chips .chip {
  height: 28px;
  padding: 0 10px;
  gap: 5px;
}
.sb-chips .chip svg {
  width: 14px;
  height: 14px;
}
.sb-chip-n {
  font-weight: 700;
}
/* The quiet line between Starred and everything else (D2). */
.sb-recent {
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--fg-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sb-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--fg-3);
  font-size: 13px;
}
.sb-empty-link {
  margin-top: 8px;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
/* The phone's compose button; the desktop has the pencil in the header. */
.sb-fab {
  display: none;
}
/* messages */
.msgs-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  position: relative;
}
.msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0 12px;
  min-height: 0;
}
.msg {
  display: flex;
  gap: 10px;
  padding: 6px 20px 6px 16px;
  position: relative;
}
.msg:hover {
  background: var(--hover);
}
.msg.unread-hl {
  background: var(--mention-bg);
}
.msg .gutter {
  width: 36px;
  flex: 0 0 36px;
  display: flex;
  justify-content: center;
  padding-top: 2px;
}
.msg .gutter img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.msg .ts-hover {
  font-size: 11px;
  color: var(--fg-3);
  opacity: 0;
  line-height: 22px;
}
.msg:hover .ts-hover {
  opacity: 1;
}
.msg .content {
  flex: 1;
  min-width: 0;
}
.msg .who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.msg .name {
  font-weight: 900;
  font-size: 15px;
  color: var(--fg);
  cursor: pointer;
}
.msg .name:hover {
  text-decoration: underline;
}
.msg .time {
  font-size: 12px;
  color: var(--fg-3);
  cursor: default;
}
.tag {
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
  padding: 1px 4px;
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tag.app {
  background: #e8e8e8;
  color: #4a4a4a;
  border: none;
}
.msg .text {
  color: var(--fg);
  word-wrap: break-word;
}
.msg .text p {
  margin: 0 0 2px;
}
.msg .text a {
  color: var(--link);
  text-decoration: none;
}
.msg .text a:hover {
  text-decoration: underline;
}
.msg .text code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 3px;
  color: #e01e5a;
}
.msg .text pre {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  overflow: auto;
  margin: 4px 0;
  color: var(--fg);
}
.msg .text blockquote {
  margin: 2px 0;
  padding-left: 12px;
  border-left: 4px solid var(--border-2);
  color: var(--fg);
}
.msg .text ul,
.msg .text ol {
  margin: 2px 0;
  padding-left: 22px;
}
.mention {
  background: #e8f5fa;
  color: var(--link);
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
  cursor: pointer;
}
.mention.me {
  background: var(--mention-bg);
  color: var(--fg);
}
html[data-theme="dark"] .mention {
  background: rgba(29, 155, 209, 0.18);
}
html[data-theme="dark"] .mention.me {
  background: var(--mention-bg);
  color: #f2c744;
}
.edited {
  font-size: 11px;
  color: var(--fg-3);
}
/* Conversation event lines ("Venkata added Kunal", "Huddle ended") — quiet
   grey lines from the conversation's left edge, the way Teams draws them.
   One line of text that wraps as a sentence: icon, words and time flow
   together instead of each breaking onto its own row (which is what a
   wrapping flex row did on a phone). Plain text, no border. No hover: there
   is nothing to act on. */
.msg.msg-event {
  display: block;
  padding-top: 4px;
  padding-bottom: 4px;
}
.msg.msg-event:hover {
  background: transparent;
}
/* No avatar column: that space is for message authors. An event line starts
   at the conversation's left edge. */
.msg.msg-event > .gutter {
  display: none;
}
.msg.msg-event > .content {
  min-width: 0;
  margin-left: 0;
  text-align: left;
}
/* A call's line takes replies — its chat (guest calls plan, P1), opened
   from the call's Chat button or the "N replies" line. */
.msg.msg-event .thread-line {
  margin-top: 4px;
}
.ev-line {
  display: inline;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--fg-3);
  overflow-wrap: anywhere;
}
.ev-line b {
  font-weight: 600;
  color: var(--fg-2);
}
.ev-line a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.ev-line a:hover {
  text-decoration: underline;
}
.ev-ic {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}
.ev-ic svg {
  display: block;
  width: 14px;
  height: 14px;
}
.ev-time {
  white-space: nowrap;
  font-size: 11.5px;
  opacity: 0.85;
}
.ev-time::before {
  content: "\00a0·\00a0";
}
.ev-line .btn {
  display: inline-flex;
  margin-left: 8px;
  padding: 1px 10px;
  vertical-align: 1px;
}
/* Join shows only while the call is live (syncHuddleJoinButtons sets
   [hidden]); the display above must not bring it back. */
.ev-line .btn[hidden] {
  display: none;
}
.hr-date {
  display: flex;
  align-items: center;
  margin: 14px 20px 8px;
}
.hr-date:before,
.hr-date:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.hr-date span {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2px 14px;
  font-size: 13px;
  font-weight: 700;
  background: var(--bg);
  color: var(--fg);
  margin: 0 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.hr-new {
  display: flex;
  align-items: center;
  margin: 10px 20px;
}
.hr-new:before {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--red);
}
.hr-new span {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  margin-left: 8px;
}

/* hover toolbar */
.msg-tools {
  position: absolute;
  top: -14px;
  right: 16px;
  display: none;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 2px;
  gap: 0;
  z-index: 20;
}
/* Opened deliberately — by the caret on a pointer device, by a long
   press on touch (see openMsgActions in 04-messages.js). It used to be
   .msg:hover, which flashed a toolbar over every message the cursor
   crossed and, on a touch screen, stuck open on whatever was tapped
   last because :hover never cleared. */
.msg.acts-open .msg-tools {
  display: flex;
}
/* The caret: the only thing hover reveals now. It sits on the bubble's
   top-right corner rather than inside it, so it never lands on top of
   the first line of a short message. */
/* Scoped: .content is also used by views in 08-views.js, and every
   other rule in this file qualifies it the same way. */
.msg .content {
  position: relative;
}
.msg-caret {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--bg);
  color: var(--fg-2);
  display: none;
  place-items: center;
  cursor: pointer;
  z-index: 19;
}
.msg-caret svg {
  width: 13px;
  height: 13px;
}
.msg-caret:hover {
  background: var(--hover);
  color: var(--fg);
}
.msg:hover .msg-caret,
.msg.acts-open .msg-caret {
  display: grid;
}
.mt-btn {
  width: 30px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--fg-2);
}
.mt-btn:hover {
  background: var(--hover);
  color: var(--fg);
}

/* reactions */
.reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.rx {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-2);
  background: var(--bg);
  border-radius: 12px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-2);
  cursor: pointer;
  height: 23px;
}
.rx:hover {
  border-color: var(--fg-3);
}
.rx.mine {
  background: #e8f5fa;
  border-color: var(--link);
  color: var(--link);
}
html[data-theme="dark"] .rx.mine {
  background: rgba(29, 155, 209, 0.18);
}
.rx .em {
  font-size: 14px;
}

/* thread indicator */
.thread-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  padding: 4px 6px 4px 4px;
  border-radius: 6px;
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  border: 1px solid transparent;
}
.thread-line:hover {
  background: var(--bg);
  border-color: var(--border-2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.thread-line .faces {
  display: flex;
}
.thread-line .faces img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  margin-right: 3px;
}
.thread-line .cnt {
  color: var(--link);
  font-size: 13px;
  font-weight: 700;
}
.thread-line .last {
  color: var(--fg-3);
  font-size: 12px;
}
.thread-line:hover .last {
  color: var(--fg-2);
}

/* attachments / blocks */
.attach {
  border-left: 4px solid var(--border-2);
  padding: 2px 0 2px 12px;
  margin-top: 6px;
  max-width: 600px;
}
.attach.blue {
  border-color: var(--presence);
}

.file-card {
  border: 1px solid var(--border-2);
  border-radius: 8px;
  padding: 10px;
  margin-top: 6px;
  max-width: 420px;
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}
.file-card:hover {
  background: var(--hover);
}
.file-ico {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.file-card .fn {
  font-weight: 900;
  font-size: 14px;
}
.file-card .fm {
  font-size: 12px;
  color: var(--fg-2);
}
/* Photos in one message: an album, not a stack. One photo keeps its own
   shape (reserved from the stored pixel size, so nothing jumps as it
   loads); several become square tiles, and past four the last one carries
   the count of the rest. */
.photo-group {
  margin-top: 6px;
  /* The album fills its bubble, and the bubble is what is capped (below).
     Sizing it the other way round — a width on the album and a bubble that
     shrink-wraps it — leaves the browser resolving the two against each
     other, and it falls back to each photo's natural width. */
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: grid;
  gap: 2px;
  background: var(--border);
}
.photo-tile {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-3, var(--hover));
}
.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* A draw that failed (a HEIC outside Safari) fills its tile rather than
   collapsing the album around it. */
.photo-tile .file-thumb-fallback:not([hidden]) {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 8px;
  text-align: center;
  font-size: 12px;
}
/* One photo: its own shape, reserved from the stored pixel size so nothing
   jumps as it loads, and boxed so a very tall one cannot take the screen —
   it opens whole in the viewer. */
.photo-group.one.sized {
  aspect-ratio: var(--ar);
  max-height: 420px;
}
/* No stored size (an older row, or a HEIC we cannot measure): the image
   flows at its natural height, exactly as it did before albums existed. */
.photo-group.one:not(.sized) .photo-tile img {
  height: auto;
}
/* Measured on this page after an earlier load: the box it flowed to, kept
   before the image loads again, so a redraw does not collapse it.
   - On the image, not the group: the group's 1 px borders sit outside the
     image, and a ratio on the group came out 1.2 px shorter.
   - The image's own width (--w), capped by its bubble, as a loaded image
     sizes itself: an image still loading has no width, and its bubble
     (which fits its content) shrank to 46 px.
   - No 420 px height cap — that would change its height from the screen.
   Measured equal, loading and loaded, at desktop and phone width (21 Nov). */
.photo-group.one.seen .photo-tile img {
  aspect-ratio: var(--ar);
  width: calc(var(--w) * 1px);
  max-width: 100%;
}
.photo-group.n2 {
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 2 / 1;
}
/* Three: one tall tile beside two stacked, as every chat app draws it. */
.photo-group.n3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1;
}
.photo-group.n3 .photo-tile:first-child {
  grid-row: span 2;
}
.photo-group.n4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 1;
}
/* The bubble stops at its album rather than running on to 78% of the pane
   and leaving a block of empty colour beside the photo: 420px of album plus
   the bubble's own 12px either side. The 78% still applies, so on a phone
   the bubble — and the album in it — shrink together. Named .mine/.theirs
   to outrank the bubble rules in 18-shadcn-theme.css, which load later. */
body.hs .msg.mine.msg-photo .content,
body.hs .msg.theirs.msg-photo .content {
  max-width: min(78%, 444px);
}
.photo-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(11, 13, 23, 0.55);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.file-preview-trigger {
  font: inherit;
  text-align: left;
  color: inherit;
  background: var(--bg);
}
.photo-tile.file-preview-trigger:focus-visible,
.file-card.file-preview-trigger:focus-visible {
  outline: 3px solid rgba(91, 61, 245, 0.35);
  outline-offset: -3px;
}
.file-thumb-fallback {
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--fg-2);
  background: var(--bg-3);
}
.file-thumb-fallback:not([hidden]) {
  display: grid;
}
.edited-history {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 11px;
  color: var(--fg-3, inherit);
  cursor: pointer;
  text-decoration: underline dotted;
}
.msg .text h3,
.msg .text h4,
.msg .text h5 {
  margin: 10px 0 4px;
  line-height: 1.3;
}
.msg .text h3 {
  font-size: 16px;
}
.msg .text h4 {
  font-size: 14.5px;
}
.msg .text h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-2);
}
.msg .text ul,
.msg .text ol {
  margin: 4px 0 8px;
  padding-left: 22px;
}
.msg .text li {
  margin: 2px 0;
}
.msg .text p {
  margin: 4px 0;
}
.msg .text blockquote {
  margin: 6px 0;
  padding: 4px 12px;
  border-left: 3px solid var(--border);
  color: var(--fg-2);
}
.int-unfurls {
  display: grid;
  gap: 6px;
  margin-top: 7px;
  max-width: 520px;
}
.int-unfurl {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--border);
  border-left: 3px solid var(--violet, var(--accent-brand));
  border-radius: 10px;
  background: var(--bg-3);
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.int-unfurl:hover {
  background: var(--hover);
}
.int-unfurl .iu-kind {
  flex: none;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--hover);
  color: var(--violet, var(--accent-brand));
}
.int-unfurl .iu-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.int-unfurl .iu-body b {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.int-unfurl .iu-meta {
  font-size: 11.5px;
  color: var(--fg-2);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.int-unfurl .iu-chip {
  font-weight: 800;
  text-transform: capitalize;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--hover);
}
.cmp-voice.rec {
  color: #fff;
  background: var(--red);
  border-radius: var(--radius-md);
  animation: pulse 1.2s infinite;
}
.cmp-voice.rec::after {
  content: attr(data-time);
  font-size: 11px;
  font-weight: 800;
  margin-left: 5px;
  font-variant-numeric: tabular-nums;
}
.hz {
  position: relative;
}
.meeting-actions {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 7px;
  background: var(--bg-3);
  max-width: 560px;
}
.meeting-actions .ma-head {
  font-size: 12px;
  font-weight: 900;
  color: var(--violet, var(--accent-brand));
}
.meeting-actions .ma-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--bg);
}
.meeting-actions .ma-task {
  flex: 1;
  min-width: 180px;
}
.meeting-actions .ma-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hover);
  color: var(--fg-2);
}
.meeting-actions .ma-chip.due {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}
.meeting-actions .ma-chip.done {
  background: rgba(16, 185, 129, 0.16);
  color: #0f766e;
}
.file-thumb-fallback small {
  font-size: 12px;
  color: var(--fg-3);
}
.file-card-copy {
  min-width: 0;
  flex: 1;
}
/* A long file name ends in "…" inside the bubble. The card is a <button>,
   which on its own will not shrink below its full text, so it ran past the
   bubble's edge on a phone and pushed "Preview" off screen. */
.file-card {
  box-sizing: border-box;
  /* One width for every document, as WhatsApp draws them: shrunk to its
     name, each card — and so each bubble — came out a different size, and a
     run of them read as a ragged column. Long names still end in "…". */
  width: 300px;
  max-width: min(420px, 100%);
  min-width: 0;
  text-align: left;
}
.file-card .file-ico,
.file-card-action {
  flex: none;
}
.file-card .fn,
.file-card .fm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A file with no preview is a download link that looks like the card. */
a.file-card.file-download {
  color: inherit;
  text-decoration: none;
}
.file-download .file-card-action {
  display: grid;
  place-items: center;
}
.file-card-action {
  margin-left: auto;
  color: var(--link);
  font-size: 12px;
  font-weight: 800;
}
.file-preview-body {
  min-height: min(62vh, 620px);
  padding: 0;
  display: grid;
  background: var(--bg-3);
}
.file-preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--fg-2);
}
.file-preview-frame {
  width: 100%;
  height: min(62vh, 620px);
  border: 0;
  background: #fff;
}
.file-preview-frame.text {
  background: var(--bg);
}
.file-preview-media {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #0b0d17;
}
.file-preview-media img,
.file-preview-media video {
  display: block;
  max-width: 100%;
  max-height: min(58vh, 580px);
  border-radius: 8px;
}
/* A photo opens full screen on black, as WhatsApp and Teams show one: the
   sender and time on top, icon actions on the right, the photo as large as
   the screen allows, thumbnails along the bottom. Always dark, whatever the
   theme — a photo is judged against black. */
.scrim.lb-scrim {
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  /* Solid: at 96% the sidebar and header still read through as faint text
     around the photo. */
  background: #08090c;
}
.modal.lightbox {
  --lb-top: 64px;
  --lb-strip: 0px;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  color: #fff;
}
.modal.lightbox:has(.lb-strip) {
  --lb-strip: 84px;
}
.lb-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--lb-top);
  padding: max(10px, env(safe-area-inset-top)) 12px 10px 20px;
}
.lb-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.lb-who {
  min-width: 0;
  flex: 1;
}
.modal.lightbox .lb-who h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal.lightbox .lb-who .sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.lb-btn,
.modal.lightbox .lb-x {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  text-decoration: none;
  margin: 0;
}
.lb-btn:hover,
.modal.lightbox .lb-x:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.lb-btn:focus-visible,
.modal.lightbox .lb-x:focus-visible,
.lb-thumb:focus-visible,
.gallery-nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* The scan and retry states still draw their text buttons here; the × is
   Close, so theirs is not repeated. */
.lb-actions .btn[data-c] {
  display: none;
}
.lb-actions .btn {
  background: rgba(255, 255, 255, 0.12);
  border-color: transparent;
  color: #fff;
}
.lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}
.modal.lightbox .file-preview-body {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  display: grid;
  place-items: center;
}
.modal.lightbox .file-preview-media {
  min-height: 0;
  padding: 8px 72px;
  background: transparent;
}
.modal.lightbox .file-preview-media img {
  max-width: 100%;
  max-height: calc(100dvh - var(--lb-top) - var(--lb-strip) - 24px);
  border-radius: 2px;
  object-fit: contain;
}
/* A PDF or text file fills the screen like a page; a video like a photo. */
.modal.lightbox .file-preview-frame {
  width: min(1100px, calc(100vw - 32px));
  height: calc(100dvh - var(--lb-top) - 16px);
  border-radius: 6px;
}
.modal.lightbox .file-preview-media video {
  max-height: calc(100dvh - var(--lb-top) - var(--lb-strip) - 24px);
  width: auto;
  max-width: 100%;
}
.modal.lightbox .file-preview-audio {
  width: min(460px, calc(100vw - 32px));
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
}
/* A text file reads as a page: the dark theme's frame colour left the
   browser's black text all but invisible on it. */
.modal.lightbox .file-preview-frame.text {
  background: #fff;
}
.modal.lightbox.lb-touch .file-preview-frame {
  width: 100vw;
  border-radius: 0;
}
.modal.lightbox .file-preview-loading {
  color: rgba(255, 255, 255, 0.7);
}
.modal.lightbox .file-preview-unsupported {
  max-width: 420px;
  margin: 16px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--fg);
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  z-index: 1;
}
.gallery-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.gallery-nav.prev {
  left: 16px;
}
.gallery-nav.next {
  right: 16px;
}
/* Invisible at the first and last photo, but still there. Hidden with
   visibility it stopped catching taps: a second tap on › at the last photo
   fell through to the black around the photo, which closes the viewer.
   A disabled button swallows the tap — once it can be hit at all: another
   rule gives disabled buttons pointer-events: none, which let the tap
   through. Opacity is forced because another rule leaves disabled buttons
   at 55%, and a ghost ‹ reads as "more this way". */
.modal.lightbox .gallery-nav:disabled {
  opacity: 0 !important;
  pointer-events: auto !important;
  cursor: default;
}
.lb-strip {
  flex: none;
  height: var(--lb-strip);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: safe center;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom));
  overflow-x: auto;
  scrollbar-width: none;
}
.lb-thumb {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  opacity: 0.55;
  cursor: pointer;
}
.lb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lb-thumb:hover {
  opacity: 0.85;
}
.lb-thumb.on {
  opacity: 1;
  border-color: #fff;
}
/* A phone swipes: no arrows over the photo and no strip, just the counter
   in the top line — as WhatsApp does it. Decided in script (touchScreen()),
   because the Android WebView reports hover and a fine pointer. */
.modal.lightbox.lb-touch .gallery-nav,
.modal.lightbox.lb-touch .lb-strip {
  display: none;
}
.modal.lightbox.lb-touch {
  --lb-strip: 0px;
}
.modal.lightbox.lb-touch .file-preview-media {
  padding: 0;
}
.modal.lightbox.lb-touch .lb-top {
  padding-left: 14px;
}
/* The phone app lays the page out below the status bar, yet Android's
   WebView still reports the status-bar inset: padding for it left an empty
   band above the name. Same reason the chat header has none. */
.modal.lightbox.lb-app .lb-top {
  padding-top: 10px;
}
@media (max-width: 640px) {
  .modal.lightbox .lb-strip {
    display: none;
  }
  .modal.lightbox {
    --lb-strip: 0px;
  }
  .modal.lightbox .file-preview-media {
    padding: 0;
  }
}
.fwd-file {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  min-width: 0;
}
.fwd-file img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
}
.fwd-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview-media video {
  width: 100%;
  height: auto;
  /* Until the file's own size is known, iOS drew a tall empty box. 16:9 is
     what every recording is; the file's real shape replaces it once loaded. */
  aspect-ratio: auto 16 / 9;
  background: #000;
}
/* Download and Open are links styled as buttons; they kept link underlines
   and, wrapped onto a second row on phones, sat at a different width. */
.m-foot.file-preview-foot .btn {
  flex: 1 1 0;
  /* A link is inline by default, so justify/align did nothing and its label
     sat high next to the real Close button. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.file-preview-audio,
.file-preview-unsupported {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 320px;
  padding: 28px;
  text-align: center;
}
.file-preview-audio audio {
  width: min(560px, 100%);
}
.file-preview-unsupported p {
  max-width: 520px;
  margin: 0;
  color: var(--fg-2);
  line-height: 1.5;
}
.file-preview-unsupported h3 {
  margin: 0;
  overflow-wrap: anywhere;
}
/* A file name like hala_telematics_backend_integration_guide.pdf has no
   space to break at; without this it widens the dialog on a phone. */
.m-head h2 {
  overflow-wrap: anywhere;
}
.file-preview-unsupported.danger {
  color: var(--red);
}
.file-preview-glyph {
  width: 76px;
  height: 76px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--fg-2);
  color: var(--bg);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.file-preview-glyph.scan {
  background: var(--bg);
  border: 1px solid var(--border-2);
  box-shadow: none;
}
.inline-media-card {
  margin-top: 8px;
  width: min(520px, 100%);
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.inline-media-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
}
.inline-media-copy {
  min-width: 0;
  flex: 1;
}
.inline-media-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}
.inline-media-meta {
  font-size: 11px;
  color: var(--fg-3);
}
.inline-media-open {
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--link);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.inline-media-open:hover {
  background: var(--hover);
}
.inline-media-card video {
  display: block;
  width: 100%;
  max-height: 360px;
  background: #0b0d17;
}
.inline-media-card audio {
  display: block;
  width: calc(100% - 20px);
  height: 44px;
  margin: 10px;
}
.link-previews {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  width: min(520px, 100%);
}
.link-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 88px;
  overflow: hidden;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--bg);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.link-preview-card:hover {
  border-color: var(--fg-3);
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}
.link-preview-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 11px 13px;
}
.link-preview-site {
  overflow: hidden;
  color: var(--fg-3);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-preview-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fg);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.link-preview-description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--fg-2);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.link-preview-url {
  overflow: hidden;
  color: var(--link);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.link-preview-image {
  width: 138px;
  min-height: 88px;
  background: var(--bg-3);
}
.link-preview-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 88px;
  max-height: 146px;
  object-fit: cover;
}
.link-preview-card.loading .link-preview-site:after {
  content: " · Loading preview…";
  font-weight: 500;
}
@media (max-width: 640px) {
  .link-preview-image {
    width: 104px;
  }
  .link-preview-description {
    display: none;
  }
}
/* Pipe tables from renderText. The wrapper scrolls sideways on a phone
   instead of pushing the message pane wider. */
.md-table {
  overflow-x: auto;
  margin: 4px 0;
}
.md-table table {
  border-collapse: collapse;
  font-size: 13px;
}
.md-table th,
.md-table td {
  border: 1px solid var(--border-2);
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
}
.md-table th {
  background: var(--bg-3);
  font-weight: 700;
}
/* A guest's message (guest calls): the badge beside their name. */
.tag.guest-tag {
  background: var(--guest-bg);
  color: var(--guest-fg);
  margin-left: 6px;
}
/* A button on an event line (a plain huddle's Join, Play) sits in a line of
   text: compact everywhere, a little taller on a phone — never the tall
   touch button the phone sheet gives other .btn. */
.ev-line .btn {
  min-height: 0;
  height: 26px;
  align-items: center;
  vertical-align: middle;
}
@media (max-width: 820px) {
  .ev-line .btn {
    height: 30px;
    padding: 0 12px;
  }
}
/* "0 replies" on a call that is over and has no replies yet: the same
   line as "N replies", as a button. */
.thread-line.ev-notes {
  display: none;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.msg-scard:has(.scard-main[data-ended]) .ev-notes,
.msg-event[data-event="HUDDLE_STARTED"]:not(:has([data-join-huddle]:not([hidden]))) .ev-notes {
  display: flex;
  width: fit-content;
}

/* Selecting several messages (04-messages.js, "Select messages"). Scoped to
   the centre list: the thread panel draws messages too and never selects. */
#center.selecting .msg-tools,
#center.selecting .msg-caret {
  display: none !important;
}
#center.selecting #msgs .msg {
  position: relative;
  padding-left: 48px;
}
#center.selecting #msgs .msg.selectable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
#center.selecting #msgs .msg.selected {
  background: var(--accent-soft, rgba(37, 99, 235, 0.12));
}
.sel-tick {
  display: none;
}
#center.selecting #msgs .sel-tick {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 2px solid var(--fg-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
}
/* The theme's accent is a neutral grey, which on the dark theme left a
   ticked circle hard to tell from an empty one; the text colour reads in
   both themes. */
#center.selecting #msgs .msg.selected .sel-tick {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.sel-tick svg {
  width: 13px;
  height: 13px;
}
/* Over the conversation header, as WhatsApp's selection bar sits: cancel,
   the count, and forward as an icon. The header is left in place under it,
   so nothing in it has to be re-wired. */
#center.selecting {
  position: relative;
}
.sel-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) 12px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.sel-x,
.sel-act {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.sel-x:hover,
.sel-act:hover:not([aria-disabled="true"]) {
  background: var(--hover);
}
/* Dimmed, not disabled: a tap still says why it can't act. */
.sel-act[aria-disabled="true"] {
  opacity: 0.35;
}
.sel-act svg {
  width: 22px;
  height: 22px;
}
.sel-count {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}
/* The forward sheet's list of what is going: first line of each. */
.fwd-many {
  list-style: none;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--hs-line, var(--border));
  border-radius: 4px;
  background: var(--hs-canvas-2, var(--bg-2));
  font-size: 14px;
  color: var(--hs-ink-2, var(--fg-2));
}
.fwd-many li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 0;
}
.fwd-many b {
  color: var(--hs-ink, var(--fg));
  font-weight: 600;
  margin-right: 4px;
}
.fwd-many .more {
  color: var(--hs-ink-3, var(--fg-3));
}

/* ------------- editing a sent message (editMessage, 04-messages.js) -------------
   While a message is being edited its bubble steps aside: the editor takes
   the bubble's place at a comfortable width instead of sitting inside a
   narrow coloured bubble, and the row's hover tools and footer are hidden
   so nothing can be clicked by mistake mid-edit. */
body.hs .msg.mine.editing .content,
.msg.mine.editing .content {
  display: block;
  flex: 1 1 auto;
  width: min(680px, 100%);
  max-width: min(680px, 100%);
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.msg.editing:hover {
  background: transparent;
}
/* Reactions normally hang over the bubble's bottom edge; under the editor
   they sit on their own line instead of covering its corner. */
body.hs .msg.mine.editing .content .reactions,
.msg.editing .content > .reactions {
  position: static;
  margin: 6px 0 0 auto;
}
.msg.editing .msg-tools,
.msg.editing .msg-caret,
.msg.editing .msg-meta {
  display: none !important;
}
.msg-edit {
  position: relative;
  margin: 2px 0;
  /* The phone's long-press Paste / Select menu needs selectable text;
     a message bubble switches selection off on touch screens. */
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.msg-edit .ac {
  left: auto;
  right: 0;
  min-width: min(320px, 80vw);
}
body.hs .msg-edit .composer.msg-edit-card,
.msg-edit .msg-edit-card {
  border: 1px solid var(--hs-line, var(--border-2));
  border-radius: 12px;
  background: var(--hs-card, var(--bg));
  box-shadow: var(--sh-shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.05));
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
body.hs .msg-edit .composer.msg-edit-card:focus-within,
.msg-edit .msg-edit-card:focus-within {
  border-color: var(--hiro-blue, #2563eb);
  box-shadow: 0 0 0 3px var(--hiro-blue-soft, rgba(37, 99, 235, 0.12));
}
body.hs .msg-edit .composer.msg-edit-card .cmp-input,
.msg-edit .msg-edit-card .cmp-input {
  min-height: 40px;
  max-height: 260px;
  padding: 10px 12px 4px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}
.msg-edit-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px 12px;
}
.msg-edit-hint {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--hs-ink-3, var(--fg-3));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-edit-hint kbd {
  font: inherit;
  font-weight: 600;
  color: var(--hs-ink-2, var(--fg-2));
}
.msg-edit.saving .cmp-input {
  opacity: 0.6;
  pointer-events: none;
}
.msg-edit.saving [data-edit] {
  pointer-events: none;
  opacity: 0.6;
}

/* Copying by hand takes the words, not the row around them. Selected
   across messages, the avatar, times, ticks and buttons came along and
   pasted as a picture and stray text ("DA", "4:17 PM"). Chrome leaves
   unselectable parts out of what it copies. */
.msg .gutter,
.msg .msg-meta,
.msg .who .time,
.msg .ticks,
.msg .ts-hover,
.msg .edited,
.msg .msg-caret,
.msg .msg-tools,
.msg .sel-tick {
  -webkit-user-select: none;
  user-select: none;
}
/* composer */
.composer-wrap {
  padding: 0 20px 22px;
}
.composer {
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.composer:focus-within {
  border-color: var(--fg-3);
  box-shadow: 0 0 0 1px var(--fg-3);
}
.fmt-bar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}
.fmt-btn {
  width: 28px;
  height: 26px;
  border: none;
  background: transparent;
  border-radius: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--fg-2);
  font-size: 13px;
}
.fmt-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--fg);
}
.fmt-btn.on {
  background: rgba(0, 0, 0, 0.12);
  color: var(--fg);
}
.fmt-div {
  width: 1px;
  height: 18px;
  background: var(--border-2);
  margin: 0 5px;
}
.cmp-input {
  min-height: 44px;
  max-height: 340px;
  overflow-y: auto;
  padding: 9px 12px;
  outline: none;
  font-size: 15px;
  color: var(--fg);
}
.cmp-input:empty:before {
  content: attr(data-ph);
  color: var(--fg-3);
}
.cmp-bar {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 5px 8px;
}
.cmp-send {
  margin-left: auto;
  background: var(--green);
  color: var(--on-accent);
  border: none;
  border-radius: 4px;
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.cmp-send:disabled {
  background: transparent;
  color: var(--fg-3);
  cursor: default;
}
.cmp-send .div {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.35);
}

.typing {
  font-size: 12px;
  color: var(--fg-2);
  padding: 2px 24px;
  height: 18px;
  font-style: italic;
}

/* autocomplete */
.ac {
  position: absolute;
  bottom: 100%;
  left: 20px;
  right: 20px;
  max-width: 520px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 6px;
  overflow: hidden;
  z-index: 40;
  display: none;
}
.ac.show {
  display: block;
}
.ac-h {
  font-size: 12px;
  font-weight: 900;
  color: var(--fg-2);
  padding: 8px 12px 4px;
  text-transform: uppercase;
}
.ac-list {
  max-height: 300px;
  overflow-y: auto;
}
.ac-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}
.ac-item.sel {
  background: var(--side-active);
  color: var(--side-active-fg);
}
.ac-item.sel .dim {
  color: var(--fg-3);
}
.ac-item .dim {
  color: var(--fg-2);
  font-size: 13px;
}
.ac-item b {
  font-weight: 900;
}
.mention-chip {
  background: #e8f5fa;
  color: var(--link);
  border-radius: 3px;
  padding: 1px 3px;
  font-weight: 700;
  user-select: none;
}
html[data-theme="dark"] .mention-chip {
  background: rgba(29, 155, 209, 0.18);
}
/* Blocks inside the box look the way they will in the message, so pressing
   Code block, Quote or Table visibly does something while typing. */
.cmp-input pre {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  margin: 4px 0;
  white-space: pre-wrap;
}
.cmp-input code {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 3px;
  color: #e01e5a;
}
.cmp-input pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}
.cmp-input blockquote {
  margin: 2px 0;
  padding-left: 12px;
  border-left: 4px solid var(--border-2);
}
.cmp-input ul,
.cmp-input ol {
  margin: 2px 0;
  padding-left: 22px;
}
.cmp-input table {
  border-collapse: collapse;
  margin: 4px 0;
  font-size: 13px;
}
.cmp-input th,
.cmp-input td {
  border: 1px solid var(--border-2);
  padding: 4px 8px;
  min-width: 64px;
  text-align: left;
  vertical-align: top;
}
.cmp-input th {
  background: var(--bg-3);
  font-weight: 700;
}
/* right pane */
.rpane {
  width: 400px;
  flex: 0 0 400px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 1px 1px, var(--tool-dot) 1px, transparent 1.35px)
      12px 12px/42px 42px,
    var(--bg);
  min-height: 0;
}
.rpane.wide {
  width: 600px;
  flex-basis: 600px;
}
.rp-head {
  height: 49px;
  flex: 0 0 49px;
  display: flex;
  align-items: center;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--border);
}
.rp-head .t {
  font-weight: 900;
  font-size: 18px;
}
.rp-head .s {
  font-size: 13px;
  color: var(--fg-2);
  margin-left: 8px;
}
.rp-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.rp-x {
  margin-left: auto;
}
.reply-count {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 700;
}
.reply-count:before,
.reply-count:after {
  content: "";
  height: 1px;
  background: var(--border);
  flex: 1;
}
.reply-count:before {
  display: none;
}


/* Message info (paneMessageInfo): the message, its timeline, then who has
   it unread and who is still waiting. */
.mi-body {
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.mi-msg {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2, var(--bg));
}
.mi-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14px;
}
.mi-meta {
  margin-top: 6px;
  color: var(--fg-2);
  font-size: 12px;
}
.mi-meta .ticks {
  cursor: default;
}
.mi-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
}
.mi-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 14px 1fr;
  column-gap: 10px;
  padding-bottom: 14px;
}
.mi-timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 12px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.mi-dot {
  grid-row: span 2;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: #34b7f1;
}
.mi-ev {
  font-size: 13.5px;
}
.mi-timeline .mi-when,
.mi-person .mi-when {
  color: var(--fg-2);
  font-size: 12px;
}
.mi-sec-h {
  margin-bottom: 6px;
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mi-person {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mi-person:hover {
  background: var(--hover);
}
.mi-person .avatar {
  border-radius: 50%;
  flex: none;
}
.mi-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* generic ui */
.btn {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background 0.12s, border-color 0.12s;
}
/* A link styled as a button (Download, Open) centres and drops its
   underline like a real one. */
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}
.btn:hover {
  background: var(--hover);
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--on-accent);
}
.btn.primary:hover {
  background: var(--green-hover);
}
.btn.danger {
  color: var(--red);
  border-color: var(--border-2);
}
.btn.danger:hover {
  background: color-mix(in srgb, var(--red) 10%, var(--bg));
  border-color: color-mix(in srgb, var(--red) 40%, var(--border));
}
.btn.sm {
  padding: 5px 10px;
  font-size: 13px;
}
.btn.ghost {
  border-color: transparent;
  box-shadow: none;
  background: transparent;
}
.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  font-size: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.12s, box-shadow 0.12s;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
  outline: none;
}
.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 28%, transparent);
}
label.fl {
  display: block;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 6px;
}
.hint {
  font-size: 13px;
  color: var(--fg-3);
  margin-top: 6px;
}

/* menus */
.menu {
  position: fixed;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 5px;
  min-width: 230px;
  z-index: 200;
  font-size: 14px;
  max-height: 80vh;
  overflow: auto;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}
.menu-item:hover {
  background: var(--hover);
  color: var(--fg);
}
.menu-item.danger {
  color: var(--red);
}
.menu-item.danger:hover {
  background: color-mix(in srgb, var(--red) 12%, var(--bg));
  color: var(--red);
}
.menu-item .k {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-3);
  padding-left: 24px;
}
.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 5px -5px;
}
.menu-h {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 6px 10px;
}

/* modal */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 8vh;
}
.modal {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: min(640px, 92vw);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.lg {
  width: min(900px, 94vw);
}
.modal.wide {
  width: min(1040px, 96vw);
}
.modal.xl {
  width: min(1180px, 96vw);
  height: 84vh;
}
.m-head {
  padding: 20px 24px 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.m-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.m-head .sub {
  font-size: 14px;
  color: var(--fg-2);
  margin-top: 4px;
}
.m-x {
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--fg-2);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.m-x:hover {
  background: var(--hover);
}
/* The close button sits on the title's first line (18px type, a 27px
   line). Its box is taller than that line — 32px, 44px for touch — so
   from the top of the header it sat low; it reaches up and down by half
   the difference instead, and its centre meets the title's. */
.m-head > .m-x {
  margin-block: -2.5px;
}
@media (pointer: coarse) {
  .m-head > .m-x {
    margin-block: -8.5px;
  }
}
.m-body {
  padding: 0 24px 8px;
  overflow: auto;
  flex: 1;
}
.m-foot {
  padding: 16px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  border-top: 1px solid transparent;
}
/* The × at the top closes every dialog, so a footer Cancel or Close only
   repeated it (and on a phone pushed the real action onto a row of its
   own). Hidden, not removed: Escape, the backdrop and the × still close.
   A yes/no question (.confirm) keeps its Cancel — the safe answer beside a
   destructive one. A footer left with nothing visible goes too. */
.modal:not(.confirm):has(.m-x) .m-foot .btn[data-c]:not(.primary),
.modal:not(.confirm):has(.m-x) .m-foot .btn[data-cancel] {
  display: none;
}
.modal:not(.confirm):has(.m-x)
  .m-foot:not(:has(> :not(.btn[data-c]:not(.primary)):not(.btn[data-cancel]):not([hidden]))) {
  display: none;
}
.tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.tab {
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tab.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}
.tab:hover {
  color: var(--fg);
}

/* search modal */
.searchbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.searchbox input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
}
.chipbar {
  display: flex;
  gap: 6px;
  padding: 10px 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.chip {
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 13px;
  cursor: pointer;
  background: var(--bg);
}
.chip:hover {
  background: var(--hover);
}
.chip.on {
  background: #e8f5fa;
  border-color: var(--link);
  color: var(--link);
  font-weight: 700;
}
.res {
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.res:hover {
  background: var(--hover);
}
.res .h {
  font-size: 13px;
  color: var(--fg-2);
  margin-bottom: 4px;
  display: flex;
  gap: 6px;
  align-items: center;
}
mark {
  background: var(--highlight);
  color: inherit;
  border-radius: 2px;
}

/* emoji picker */
.emoji-pop {
  position: fixed;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  width: 340px;
  z-index: 1250;
  overflow: hidden;
}
.ep-search {
  padding: 10px;
  border-bottom: 1px solid var(--border);
}
.ep-tabs {
  display: flex;
  padding: 4px 6px;
  gap: 2px;
  border-bottom: 1px solid var(--border);
}
.ep-tab {
  border: none;
  background: transparent;
  padding: 4px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
}
.ep-tab.active {
  background: var(--hover);
  opacity: 1;
}
.ep-grid {
  max-height: 280px;
  overflow-y: auto;
  padding: 6px;
}
.ep-h {
  font-size: 12px;
  font-weight: 900;
  color: var(--fg-2);
  padding: 6px 4px;
  text-transform: uppercase;
}
.ep-row {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
}
.ep-cell {
  border: none;
  background: transparent;
  font-size: 21px;
  line-height: 1;
  padding: 5px;
  border-radius: 5px;
  cursor: pointer;
}
.ep-cell:hover {
  background: var(--hover);
  transform: scale(1.15);
}
.ep-foot {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-2);
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* A view's own tab strip — tasks (list/board/calendar), admin (its fifteen
   sections) and activity (its six categories). These used to be rows in the
   shell's #hsSubtabs; they are switches between renderings of one view, not
   destinations, so each view carries its own. Sits directly under .chan-head
   and above the scrolling body, so it stays put while the body scrolls.
   Buttons keep the .hs-subtab look the shell row had. */
.view-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  /* 12px, not 24px: .hs-subtab carries its own 12px side padding, so this
     lands the first LABEL on the 24px gutter the bodies below use. Matching
     the box instead would push the text 12px out of the column. */
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.view-tabs::-webkit-scrollbar {
  height: 0;
}
.view-tabs .hs-subtab {
  flex: 0 0 auto;
}
/* A control shown so its reason can be read, but not usable by this person
   (its title says why; tapping it says so too, since touch has no hover). */
.is-disabled,
[aria-disabled="true"].btn,
.hs-control[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
/* The file preview's Close / Download / Open: one row of equal buttons.
   Phones make every dialog footer a two-column grid, which left Open alone
   on a second row; here there is one column per button, however many. */
body.hs #filePreviewActions {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

/* Edit profile: a company account's name comes from Microsoft. Shown in
   the field's shape so the form still lines up, but plainly not editable. */
.input.pf-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fg-2);
  background: var(--bg-2);
  cursor: default;
}
.input.pf-locked svg {
  width: 14px;
  height: 14px;
  flex: none;
  opacity: 0.6;
}

/* Someone's profile card (right pane). */
.rp-body.pf-card {
  padding: 20px;
}
.pf-photo {
  width: 100%;
  max-width: 220px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}
.pf-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}
.pf-title {
  margin-top: 2px;
  color: var(--fg-2);
  font-size: 15px;
}
.pf-status {
  margin-top: 8px;
}
.pf-pres {
  margin-top: 8px;
  gap: 6px;
}
.pf-actions {
  margin-top: 14px;
  gap: 8px;
}
.pf-actions .btn svg {
  width: 14px;
  height: 14px;
}
.pf-contact {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pf-h {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-3, var(--fg-2));
  margin-bottom: 8px;
}
.pf-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  color: var(--fg-1, inherit);
  text-decoration: none;
  overflow-wrap: anywhere;
}
a.pf-line:hover {
  background: var(--bg-2);
}
.pf-line svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--fg-2);
}
/* huddle */
.huddle-bar {
  background: var(--bg-3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  margin: 10px 8px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-width: 0;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(31, 8, 38, 0.22);
}
html[data-theme="dark"] .huddle-bar {
  background: #0f1114;
}
.huddle-head {
  display: grid;
  /* copy | call timer | expand control */
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: start;
}
.huddle-head-copy {
  min-width: 0;
}
.huddle-head-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}
.huddle-head-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-size: 10px;
  color: #d7c8de;
}
.huddle-time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.huddle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.hz {
  aspect-ratio: 4/3;
  border-radius: 11px;
  background: #4a2c4b;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.hz img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
}
.hz.speaking {
  outline: 2px solid var(--presence);
}
.hz .nm {
  position: absolute;
  bottom: 6px;
  left: 7px;
  right: 7px;
  font-size: 10px;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.hz.share {
  background: var(--bg-3);
}
.hz.share .nm {
  font-weight: 800;
  letter-spacing: 0.02em;
}
.hz.share::before {
  content: "⇱ presenting";
  position: absolute;
  top: 6px;
  left: 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f5c56a;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 2;
}
.hz.share video.huddle-media {
  object-fit: contain;
  background: #0d0817;
}
.huddle-ctl {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-wrap: wrap;
}
.hbtn2 {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hbtn2:hover {
  background: rgba(255, 255, 255, 0.26);
}
.hbtn2.off {
  background: #e01e5a;
}
/* Reads as unavailable but stays clickable on purpose: a real [disabled] would
   swallow the tap, and the tap is how somebody learns why they cannot use it. */
.hbtn2.locked,
.hs-control.locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.hbtn2.locked:hover,
.hs-control.locked:hover {
  background: rgba(255, 255, 255, 0.16);
}
.hbtn2.leave {
  background: #e01e5a;
  width: auto;
  padding: 0 12px;
  border-radius: 17px;
  font-weight: 900;
  font-size: 13px;
}
.hbtn2.record {
  width: auto;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 17px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.hbtn2.record.active {
  background: #e01e5a;
}
.hbtn2:disabled,
.hs-control:disabled {
  opacity: 0.65;
  cursor: wait;
}
/* Disabled because someone else holds the screen share — nothing is pending,
   so the waiting cursor would be a lie. */
.hbtn2.blocked:disabled,
.hs-control.blocked:disabled {
  cursor: not-allowed;
}
.huddle-call-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e01e5a;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  animation: pulse 1.35s infinite;
}
.huddle-invite {
  position: fixed;
  z-index: 1500;
  right: 22px;
  top: 82px;
  width: min(390px, calc(100vw - 24px));
  padding: 16px;
  border-radius: 16px;
  background: var(--bg-3);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 60px rgba(18, 5, 28, 0.38);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  animation: huddle-in 0.18s ease-out;
}
.huddle-invite .call-mark {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--accent-brand);
  color: var(--on-accent);
  display: grid;
  place-items: center;
}
.huddle-invite h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.huddle-invite p {
  font-size: 12px;
  color: #d9cde0;
  margin: 0;
  line-height: 1.45;
}
.huddle-invite-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.huddle-invite button {
  border: 0;
  border-radius: 9px;
  padding: 8px 13px;
  font-weight: 800;
  cursor: pointer;
}
.huddle-invite [data-call-decline] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.huddle-invite [data-call-join] {
  background: var(--accent-brand);
  color: #fff;
}
@keyframes huddle-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
}
.huddle-message {
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 560px;
}
.huddle-message .call-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: var(--radius-md);
  background: var(--accent-brand);
  color: var(--on-accent);
  display: grid;
  place-items: center;
}
/* Basis 0, so a long name wraps inside the text beside the icon instead of
   the whole block dropping onto its own line under it (the card wraps, to
   give Join a line of its own on a phone). */
.huddle-message-copy {
  flex: 1 1 0;
  min-width: 0;
}
.huddle-message-copy b {
  display: block;
  font-size: 13px;
}
.huddle-message-copy span {
  display: block;
  color: var(--fg-2);
  font-size: 11px;
  margin-top: 2px;
}
.huddle-message .btn {
  margin-left: auto;
  white-space: nowrap;
}
html[data-theme="dark"] .huddle-message {
  background: var(--bg-3);
  border-color: var(--border);
}
@media (max-width: 700px) {
  .huddle-invite {
    right: 12px;
    top: 64px;
  }
  .huddle-ctl {
    gap: 5px;
  }
  .huddle-bar {
    margin: 8px 6px;
    padding: 11px;
  }
  .hbtn2.record {
    padding: 0 8px;
  }
}

/* Minimized call dock — a floating window the user can drag anywhere, so the
   live call never covers the conversation list the way the old sidebar panel
   did. Expanded, the call still takes the full screen via .huddle-stage. */
#huddleDock {
  display: none;
}
#huddleDock.on {
  display: block;
  position: fixed;
  width: min(300px, calc(100vw - 24px));
  z-index: 700;
}
#huddleDock .huddle-bar {
  margin: 0;
  box-shadow: 0 18px 44px rgba(3, 6, 18, 0.42);
}
#huddleDock.dragging {
  cursor: grabbing;
}
.hdock-btn {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.hdock-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}
@media (max-width: 700px) {
  #huddleDock.on {
    width: calc(100vw - 16px);
  }
  #huddleDock .huddle-bar {
    margin: 0;
  }
}

/* The live call UI (apps/web/public/meeting-recorder.js) renders its own bar
   markup, whose header is .huddle-head — it is the drag handle there. */
#huddleDock .huddle-head {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
#huddleDock.dragging .huddle-head {
  cursor: grabbing;
}
/* "Nobody answered · Leave · Keep waiting" (C15), above the call. */
.huddle-alone {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 2147483000;
  display: grid;
  gap: 6px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: var(--radius-md, 10px);
  background: var(--bg-2, #1f1f1f);
  color: var(--fg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 44px rgba(3, 6, 18, 0.42);
  font-size: 13px;
}
/* The "Not in the call" list (C16). */
.hs-notin { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 6px; }
.hs-notin-banner { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: var(--bg-3); color: var(--fg); font-size: 12px; margin: 4px 0 6px; }
.hs-notin-banner b { flex: 1; }
.hs-notin .hs-person small.ringing { color: var(--green, #2bac76); }
.hs-notin-find { width: 100%; margin: 4px 0 6px; }
.hs-notin-toggle { background: none; border: none; color: inherit; cursor: pointer; padding: 6px 0; font: inherit; display: flex; gap: 6px; align-items: center; width: 100%; text-align: left; }
.hs-banner { padding: 8px 12px; font-size: 12px; background: var(--bg-3); border-bottom: 1px solid var(--border); }
/* A call coming in while you are on another one: no ringtone, less loud.
   Still opaque — over the call's side panel, see-through let the names
   behind it show through the card's words. */
.huddle-invite.quiet { box-shadow: none; }
@media (max-width: 600px) {
  .huddle-alone {
    left: 16px;
    right: 16px;
    transform: none;
    max-width: none;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  .huddle-alone .row { justify-content: flex-end; }
}
/* Recordings page, grouped by conversation (R2): one calm column, one row
   per recording. */
.rec-wrap { max-width: 760px; margin: 0 auto; padding: 28px 24px 48px; }
.rec-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.rec-head p { margin: 4px 0 0; color: var(--hs-ink-3, var(--fg-2)); font-size: 13px; }
.rec-search {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 22px; padding: 0 12px; height: 38px;
  border: 1px solid var(--hs-line, var(--border)); border-radius: 10px;
  background: var(--hs-card, var(--bg)); color: var(--hs-ink-3, var(--fg-2));
}
.rec-search:focus-within { border-color: var(--hs-ink-3, var(--fg-2)); }
.rec-search svg { width: 16px; height: 16px; flex: none; }
.rec-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--hs-ink, var(--fg)); font: inherit; font-size: 14px; }
.rec-group { margin-bottom: 26px; }
.rec-group-h { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.rec-group-name { font-size: 13px; font-weight: 600; color: var(--hs-ink, var(--fg)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-count { font-size: 12px; color: var(--hs-ink-3, var(--fg-2)); }
.rec-open { margin-left: auto; border: 0; background: none; padding: 2px 4px; font: inherit; font-size: 12px; color: var(--hs-ink-3, var(--fg-2)); cursor: pointer; border-radius: 6px; }
.rec-open:hover { color: var(--hs-ink, var(--fg)); text-decoration: underline; }
.rec-list { border: 1px solid var(--hs-line, var(--border)); border-radius: 12px; background: var(--hs-card, var(--bg)); overflow: hidden; }
.rec-list-tab { margin: 4px 0; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; min-height: 56px; }
.rec-row + .rec-row { border-top: 1px solid var(--hs-line, var(--border)); }
.rec-row[data-artifact] { cursor: pointer; }
.rec-row[data-artifact]:hover, .rec-row[data-artifact]:focus-visible { background: var(--hs-canvas, var(--bg-2)); outline: none; }
.rec-play {
  width: 32px; height: 32px; flex: none; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--hs-ink, var(--fg)); color: var(--hs-card, var(--bg));
}
.rec-play svg { margin-left: 2px; }
.rec-row.is-empty .rec-play { background: var(--hs-line, var(--bg-2)); color: var(--hs-ink-3, var(--fg-2)); }
.rec-row.is-empty .rec-play svg { margin-left: 0; width: 15px; height: 15px; }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rec-title { font-size: 14px; font-weight: 500; color: var(--hs-ink, var(--fg)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-meta { font-size: 12.5px; color: var(--hs-ink-3, var(--fg-2)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-live { flex: none; font-size: 12px; font-weight: 500; color: var(--hs-red, #dc2626); }
.rec-more { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--hs-ink-3, var(--fg-2)); display: grid; place-items: center; cursor: pointer; opacity: 0.7; }
.rec-row:hover .rec-more, .rec-more:focus-visible { opacity: 1; }
.rec-more:hover { background: var(--hs-line, var(--bg-2)); color: var(--hs-ink, var(--fg)); }
.rec-more svg { width: 16px; height: 16px; }
.rec-more-wrap { display: flex; justify-content: center; }
@media (max-width: 600px) {
  .rec-wrap { padding: 18px 16px 40px; }
  .rec-more { opacity: 1; }
}
/* tables (admin/lists) */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}
/* Page views scroll inside .msgs, which keeps a top padding (20px, 10px on
   smaller screens). A sticky header stops below that padding, so rows used
   to scroll through the gap and show above the header (Files, 13 Oct 2026).
   A band in the header's own colour fills the gap whatever its size; the
   scroller clips whatever reaches past its top. A pseudo-element, because
   Chrome draws no box-shadow on cells of a border-collapse table. */
.msgs .tbl th::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 24px;
  background: inherit;
}
/* That band also reaches up over whatever sits just above the table — the
   admin tabs' toolbars and filters, 14px above, lost their bottom edge
   (Invitations, 25 Oct 2026). Lifted above the header, they paint over the
   band; rows stay inside the table, under it, so the gap still hides them. */
.msgs :has(+ .tbl) {
  position: relative;
  z-index: 3;
}
/* The hs shell paints these views with its card colour, not --bg; the
   header and its band must match it or they show as a darker strip. */
body.hs .msgs .tbl th {
  background: var(--hs-card);
}
.tbl td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:hover td {
  background: var(--hover);
}
.badge2 {
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  padding: 2px 8px;
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid var(--border);
}
.badge2.owner {
  background: #fdecf1;
  color: #b4113c;
  border-color: #f5c9d6;
}
.badge2.admin {
  background: #eaf3fb;
  color: #1264a3;
  border-color: #c6ddf1;
}
.badge2.ok {
  background: #e7f5ef;
  color: #007a5a;
  border-color: #bde6d5;
}
.badge2.warn {
  background: #fff4da;
  color: #8a6100;
  border-color: #f0dfae;
}
.badge2.invited {
  background: #f1eeff;
  color: #5145b8;
  border-color: #d8d1ff;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
/* Adoption cards are controls: two filter the table below them, one opens the
   invitations list. */
.kpi[role="button"] {
  cursor: pointer;
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}
.kpi[role="button"]:hover {
  border-color: var(--link);
}
.kpi[role="button"].on {
  border-color: var(--link);
  background: var(--bg-2);
}
.kpi[role="button"]:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
.kpi .l {
  font-size: 12px;
  color: var(--fg-2);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.03em;
}
.kpi .v {
  font-size: 26px;
  font-weight: 900;
  margin-top: 4px;
}
.kpi .d {
  font-size: 12px;
  margin-top: 2px;
  color: var(--green);
  font-weight: 700;
}

/* toast */
.toasts {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  /* Above .huddle-stage (720). A call takes the whole screen, so at 400 every
     toast raised during one was painted behind it — including the notice that
     somebody had started recording, which is the one message that must never
     be missed. */
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.toast {
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  gap: 10px;
  align-items: center;
  animation: tin 0.2s ease;
}
@keyframes tin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.toast .act {
  color: #78d6c6;
  font-weight: 900;
  cursor: pointer;
}
/* misc */
.empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--fg-2);
}
.intro {
  padding: 24px 20px 8px;
}
.intro h1 {
  font-size: 32px;
  margin: 0 0 8px;
  font-weight: 900;
}
.intro p {
  color: var(--fg-2);
  margin: 0 0 12px;
  font-size: 15px;
}
.divider {
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.grow {
  flex: 1;
}
.muted {
  color: var(--fg-2);
}
.small {
  font-size: 13px;
}
.pin-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 20px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
}
.pin-banner:hover {
  background: var(--hover);
}
.scroll-btn {
  position: absolute;
  bottom: 96px;
  right: 24px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
}
.scroll-btn.show {
  display: block;
}
.sk-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 28px;
}
.sk-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
kbd {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-family: var(--font);
  color: var(--fg-2);
}
.switch {
  width: 38px;
  height: 22px;
  border-radius: 12px;
  background: #bbb;
  position: relative;
  cursor: pointer;
  flex: 0 0 38px;
  transition: background 0.15s;
  border: none;
}
.switch.on {
  background: var(--green);
}
/* A labelled switch in a toolbar (Activity's "Unread only"): the whole thing is
   one button, so the label is as clickable as the knob. */
.act-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.act-toggle .switch {
  width: 32px;
  height: 18px;
  flex-basis: 32px;
  pointer-events: none;
}
.act-toggle .switch:after {
  width: 14px;
  height: 14px;
}
.act-toggle .switch.on:after {
  left: 16px;
}
.switch:after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.switch.on:after {
  left: 18px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-2);
  border-top-color: var(--fg-2);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .rpane {
    width: 340px;
    flex-basis: 340px;
  }
}
@media (max-width: 900px) {
  .rail {
    display: none;
  }
  .sidebar {
    width: 220px;
    flex-basis: 220px;
  }
  .rpane {
    display: none;
  }
}

/* ---- Cosmetic pass: top-bar / rail elements taken off the UI ----
   The nodes stay in the DOM on purpose so every existing handler and the
   renderChrome() lines that touch them (e.g. #navBack.disabled) keep working.
   Hidden elements are not focusable or clickable, so no interaction is
   possible. The wiring itself gets cleaned up in a later pass. */
.hs-ui-off {
  display: none !important;
}
/* The drawer toggle is the only way to reach the channel list below 1000px
   (see compactSidebar()), so it is hidden only where the sidebar is pinned. */
@media (min-width: 1001px) {
  .hs-ui-off-desktop {
    display: none !important;
  }
}

/* The cercleOS mark is hidden in the top bar only. The CERCLE constant in
   01-chrome.js is shared — 12-admin.js reads its src for email branding — so
   this is scoped to #hsTop instead of touching the markup. */
#hsTop .hs-cercle-logo {
  display: none !important;
}
/* Jump to unread mentions: above "Jump to latest". */
.mention-btn {
  position: absolute;
  bottom: 140px;
  right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 5;
}
.mention-btn .mention-at {
  color: var(--unread, #22c55e);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}
@media (max-width: 820px) {
  .mention-btn {
    right: 16px;
    bottom: 150px;
  }
}
/* huddle media tiles */
.hz video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  background: #080c19;
}
/* The mute badge and the expand control are a matched pair in the tile's
   top-right corner. Size and vertical position are set once, for both, so they
   cannot drift out of line with each other again. */
.hz .hz-zoom,
.hz .mutedot {
  position: absolute;
  top: 5px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  color: #eef2ff;
  background: rgba(8, 12, 25, 0.62);
}
.hz .hz-zoom {
  right: 5px;
}
/* one 4px gap, clear of the button */
.hz .mutedot {
  right: 34px;
}
/* The expand control is always on screen rather than hover-only: the tiles are
   also used on touch, where there is no hover to reveal it. */
.hz .hz-zoom {
  cursor: pointer;
  opacity: 0.75;
  transition:
    opacity 0.12s ease,
    background 0.12s ease;
}
.hz .hz-zoom:hover,
.hz .hz-zoom:focus-visible {
  opacity: 1;
  background: rgba(8, 12, 25, 0.9);
}
.hz .hz-zoom:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: 1px;
}
/* The dock's grid never expands anything, so the control would be a dead
   button there. Hiro's seat has no video to expand either. */
.huddle-bar .hz-zoom,
.hz.hz-hiro .hz-zoom {
  display: none;
}
/* No button in the dock, so the badge keeps the corner — and the dock tiles are
   small, so it stays small too. */
.huddle-bar .hz .mutedot {
  top: 4px;
  right: 4px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
}
.huddle-stage {
  position: fixed;
  inset: 52px 18px 18px;
  background: #080c19;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(3, 6, 18, 0.5);
  z-index: 720;
  overflow: hidden;
  color: #fff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  /* One column, never wider than the stage. Left to size itself it grew to
     the title's full width — a long channel or person name pushed the title,
     the tiles and the controls past the right edge of a phone — instead of
     letting the name end in "…". */
  grid-template-columns: minmax(0, 1fr);
}
.huddle-stage .hs-title {
  min-height: 66px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(11, 16, 33, 0.96);
  display: flex;
  align-items: center;
  gap: 11px;
}
.huddle-stage .hs-brand {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #7557f5, #5634d8);
  box-shadow: 0 8px 24px rgba(109, 63, 229, 0.3);
}
.hs-title-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hs-title-copy strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hs-title-copy small {
  font-size: 11px;
  color: #9fa8c2;
}
.hs-recording-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 91, 116, 0.38);
  border-radius: 999px;
  background: rgba(225, 35, 69, 0.13);
  color: #ffb6c3;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
}
.hs-recording-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff355d;
  box-shadow: 0 0 0 5px rgba(255, 53, 93, 0.12);
  animation: record-pulse 1.5s infinite;
}
@keyframes record-pulse {
  50% {
    box-shadow: 0 0 0 8px rgba(255, 53, 93, 0);
  }
}
.huddle-stage .hs-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  min-height: 0;
}
.huddle-stage .hs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-auto-rows: minmax(210px, 1fr);
  gap: 10px;
  padding: 14px;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(
      circle at 52% 30%,
      rgba(86, 52, 216, 0.13),
      transparent 38%
    ),
    #080c19;
}
.huddle-stage .hs-grid .hz {
  position: relative;
  min-height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  overflow: hidden;
  background: var(--bg-3);
  display: grid;
  place-items: center;
}
.huddle-stage .hs-grid .hz > img {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
}
.huddle-stage .hs-grid .hz .nm {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(4, 7, 16, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.huddle-stage .hs-grid .hz .hz-zoom,
.huddle-stage .hs-grid .hz .mutedot {
  top: 9px;
  width: 30px;
  height: 30px;
}
.huddle-stage .hs-grid .hz .hz-zoom {
  right: 9px;
}
.huddle-stage .hs-grid .hz .mutedot {
  right: 44px;
}
.hs-side {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  background: #0e1426;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hs-side-head {
  padding: 16px 16px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hs-side-head b {
  display: block;
  font-size: 14px;
}
.hs-side-head small {
  color: #98a2bd;
  font-size: 11px;
}
.hs-roster {
  padding: 10px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hs-person {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 10px;
  color: #e7eaf4;
}
.hs-person img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
.hs-person b {
  display: block;
  font-size: 12px;
}
.hs-person small {
  display: block;
  color: #949db7;
  font-size: 10.5px;
}
.huddle-stage .hs-bar {
  min-height: 82px;
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #0b1021;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.hs-control {
  min-width: 66px;
  border: 0;
  background: transparent;
  color: #dde2f0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
}
.hs-control .ic {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--bg-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  font-size: 17px;
  transition: 0.14s;
}
.hs-control:hover .ic {
  background: var(--border-2);
  transform: translateY(-1px);
}
.hs-control.off .ic {
  background: #4d2032;
  color: #ffc2ce;
}
.hs-control.active .ic {
  background: #35286a;
  color: #d8cdff;
  border-color: #6d55d8;
}
.hs-control.leave .ic {
  width: auto;
  min-width: 82px;
  padding: 0 18px;
  background: #e3244f;
  color: #fff;
  border-color: #e3244f;
}
.hs-control.leave {
  color: #ffb9c8;
}
.hs-caption {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  max-width: min(760px, 72vw);
  padding: 10px 15px;
  border-radius: 10px;
  background: rgba(4, 7, 16, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  z-index: 3;
  backdrop-filter: blur(12px);
}
.hs-caption.show {
  display: block;
}
.hz.hz-hiro {
  background: var(--bg-3) !important;
  border-color: rgba(139, 124, 248, 0.4) !important;
}
.hz.hz-hiro .hz-hiro-avatar {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: radial-gradient(circle at 32% 28%, var(--accent-brand), var(--accent-brand) 68%);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
}
.huddle-bar .hz.hz-hiro .hz-hiro-avatar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  font-size: 19px;
}
.hz.hz-hiro .hz-hand {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 22px;
  display: none;
  animation: hiroHand 0.9s ease infinite alternate;
}
.hz.hz-hiro.hand .hz-hand {
  display: block;
}
@keyframes hiroHand {
  from {
    transform: translateY(0) rotate(-6deg);
  }
  to {
    transform: translateY(-4px) rotate(10deg);
  }
}
.hs-hiro-ask {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%);
  max-width: min(720px, 78vw);
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(
    150deg,
    rgba(45, 34, 104, 0.95),
    rgba(24, 22, 52, 0.95)
  );
  border: 1px solid rgba(139, 124, 248, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  z-index: 4;
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 40px rgba(20, 10, 60, 0.45);
}
.hs-hiro-ask.show {
  display: block;
}
.hs-hiro-ask b {
  color: rgba(255,255,255,.72);
}
/* Hiro Aura — one glow language for Hiro's state everywhere he appears.
   Violet breathing = listening · amber pulse = hand raised · green pulse =
   asking/speaking · cyan pulse = thinking on an Ask Hiro question. */
@keyframes auraBreathe {
  0%,
  100% {
    box-shadow: 0 0 10px 2px rgba(139, 124, 248, 0.35);
  }
  50% {
    box-shadow: 0 0 24px 8px rgba(139, 124, 248, 0.68);
  }
}
@keyframes auraHand {
  0%,
  100% {
    box-shadow: 0 0 12px 3px rgba(245, 158, 11, 0.5);
  }
  50% {
    box-shadow: 0 0 30px 11px rgba(245, 158, 11, 0.9);
  }
}
@keyframes auraSpeak {
  0%,
  100% {
    box-shadow: 0 0 12px 3px rgba(52, 211, 153, 0.5);
  }
  50% {
    box-shadow: 0 0 26px 9px rgba(52, 211, 153, 0.85);
  }
}
@keyframes auraThink {
  0%,
  100% {
    box-shadow: 0 0 12px 3px rgba(56, 189, 248, 0.45);
  }
  50% {
    box-shadow: 0 0 26px 9px rgba(56, 189, 248, 0.85);
  }
}
.hz.hz-hiro .hz-hiro-avatar {
  animation: auraBreathe 3.8s ease-in-out infinite;
}
.hz.hz-hiro.hand .hz-hiro-avatar {
  animation: auraHand 0.9s ease-in-out infinite;
}
.hz.hz-hiro.ask .hz-hiro-avatar {
  animation: auraSpeak 1s ease-in-out infinite;
}
.hz.hz-hiro .hz-hiro-state {
  position: absolute;
  right: 9px;
  bottom: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  background: rgba(18, 14, 48, 0.72);
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
}
.hz.hz-hiro.hand .hz-hiro-state {
  color: #fcd34d;
}
.hz.hz-hiro.ask .hz-hiro-state {
  color: #6ee7b7;
}
.huddle-bar .hz.hz-hiro .hz-hiro-state {
  display: none;
}
/* Expanding happens through .hz-zoom only — the tile itself is not a button,
   so it must not look like one. */
#huddleStage.active .hs-grid .hz {
  cursor: default;
}
#huddleStage.active .hs-grid.focused {
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr !important;
}
#huddleStage.active .hs-grid.focused .hz {
  display: none;
}
#huddleStage.active .hs-grid.focused .hz.focus {
  display: grid;
}
#hiroFab .orb {
  animation: auraBreathe 3.8s ease-in-out infinite;
}
body.hiro-thinking #hiroFab .orb,
body.hiro-thinking .hiro-title .orb {
  animation: auraThink 1.05s ease-in-out infinite;
}
.hz.hz-hiro.heard .hz-hiro-avatar {
  box-shadow: 0 0 34px 12px rgba(255, 255, 255, 0.35);
  transition: box-shadow 0.18s;
}

/* ---------------------------------------------------------------------------
   Controlled huddle and big calls
   ------------------------------------------------------------------------ */
/* "Control the huddle" on the pre-join screen, and the note a locked joiner
   sees there. */
.call-control-switch {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border, rgba(127, 127, 127, 0.25));
  border-radius: 10px;
  cursor: pointer;
}
.call-control-switch input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #4f46e5;
}
.call-control-switch b {
  display: block;
  font-size: 13px;
}
.call-control-switch small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  opacity: 0.75;
}
.call-control-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.45;
  background: rgba(245, 158, 11, 0.12);
  color: inherit;
}
.call-control-note svg {
  flex: none;
  margin-top: 2px;
}

/* A raised hand: amber on the participant's own bar button and on the
   organizer's list. Tiles carry no hand or lock badge. */
body.hs .hs-control.hand.active .ic,
.hs-control.hand.active .ic {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #1a1203;
}
.hs-control .ic {
  position: relative;
}
/* Locked (by the organizer, or Record for someone else's recording): dimmed,
   and hovering changes nothing — no grey box behind the button (07-huddle.css
   gives .locked:hover one), no lighter icon, no lift. The tooltip, or a tap,
   says why. */
.hs-control.locked:hover {
  background: transparent;
}
.hs-control.locked:hover .ic {
  background: var(--bg-3);
  transform: none;
}
body.hs .hs-control.locked:hover .ic {
  background: var(--call-raised);
}
.hs-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #f59e0b;
  color: #1a1203;
  font: 800 10px/17px inherit;
  font-style: normal;
  text-align: center;
}

/* The participant list in a controlled call. */
.hs-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hs-side-title {
  flex: 1;
  min-width: 0;
}
.hs-side-close {
  display: none;
}
.hs-roster-section {
  margin: 8px 8px 2px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8f98b3;
}
.hs-roster-section:first-child {
  margin-top: 2px;
}
.hs-person {
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
}
.hs-person.hand {
  background: rgba(245, 158, 11, 0.1);
}
.hs-person > span:nth-child(2) {
  min-width: 0;
}
.hs-person b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-person-icons {
  display: flex;
  gap: 4px;
  align-items: center;
  color: #b8c0d8;
  font-size: 12px;
}
.hs-person-icons svg {
  width: 13px;
  height: 13px;
}
/* ⋮ on a row: the person's options (rosterOptions in meeting-recorder.js).
   Quiet until hovered; shown only when there is something to do. */
.hs-person-more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2bd;
  cursor: pointer;
}
.hs-person-more:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #eef2ff;
}
.hs-person-more:focus-visible {
  outline: 2px solid #8ab4ff;
  outline-offset: 1px;
}
.hs-person-more svg {
  width: 16px;
  height: 16px;
}
.huddle-stage.people-hidden .hs-side {
  display: none;
}
.huddle-stage.people-hidden .hs-body {
  grid-template-columns: minmax(0, 1fr);
}
/* On a phone the list is a sheet from the bottom. The rules that hide it
   below 900 px are written against #huddleStage.active, so these are too. */
@media (max-width: 900px) {
  #huddleStage.active .huddle-stage.people-open .hs-side {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    max-height: 72vh;
    border-left: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  }
  #huddleStage.active .huddle-stage.people-open .hs-side-close {
    display: grid;
  }
}

/* The call's chat (guest calls plan, P1): the same place as People, one of
   the two open at a time. Drawn in the app's own colours — it holds
   ordinary thread messages and the composer. On a phone it covers the call. */
.hs-chat {
  display: none;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--fg);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}
#huddleStage.active .huddle-stage.chat-open .hs-side {
  display: none;
}
#huddleStage.active .huddle-stage.chat-open .hs-chat {
  display: flex;
}
#huddleStage.active .huddle-stage.chat-open .hs-body {
  grid-template-columns: minmax(0, 1fr) 340px;
}
.hs-chat .hs-side-head {
  border-bottom: 1px solid var(--border);
}
.hs-chat .hs-side-head small {
  color: var(--fg-3);
}
.hs-chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 0;
}
.hs-chat-list .empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--fg-3);
  font-size: 12.5px;
}
.hs-control[data-hs="chat"] {
  position: relative;
}
.hs-control[data-hs="chat"].has-unread .ic::after {
  content: "";
  position: absolute;
  top: -2px;
  right: 10px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--presence);
  box-shadow: 0 0 0 2px #0e1426;
}
@media (max-width: 900px) {
  #huddleStage.active .huddle-stage.chat-open .hs-body {
    grid-template-columns: minmax(0, 1fr);
  }
  #huddleStage.active .huddle-stage.chat-open .hs-chat {
    position: fixed;
    inset: 0;
    z-index: 31;
    border-left: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* A guest's tile (guest calls): their name and a Guest badge; the invited
   address on hover. */
.hz .nm .hz-guest {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* G12: a call thread guests can read says so at the top. */
.call-guest-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 12px 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--guest-bg);
  color: var(--guest-fg);
  font-size: 12px;
  font-weight: 600;
}
/* The call's chat panel is narrow and the call already has the mic: no
   formatting toggle or voice message there, so the text box gets the room. */
.hs-chat .cmp-fmt-toggle,
.hs-chat .cmp-voice,
.hs-chat .cmp-sep {
  display: none;
}

/* People asking to join (guest calls v2, PRD 05 §4, mock §1–§2). */
.huddle-stage .hs-knock-slot:empty {
  display: none;
}
/* A laptop: the card floats at the top of the tiles. */
.huddle-stage .hs-knock-slot {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100% - 32px));
  z-index: 6;
}
.huddle-stage .hs-knock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 12px;
  background: #fafafa;
  color: #09090b;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 13px;
  line-height: 1.35;
}
.huddle-stage .hs-knock-t {
  flex: 1;
  min-width: 0;
}
.huddle-stage .hs-knock-t b {
  font-weight: 600;
}
.huddle-stage .hs-knock-t small {
  display: block;
  font-size: 11.5px;
  color: #71717a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.huddle-stage .hs-knock-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  display: inline-grid;
  place-items: center;
  background: #f97316;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.huddle-stage .hs-knock-stack {
  display: flex;
  flex: none;
}
.huddle-stage .hs-knock-stack .hs-knock-av {
  width: 28px;
  height: 28px;
  font-size: 10px;
  border: 2px solid #fafafa;
  margin-left: -8px;
}
.huddle-stage .hs-knock-stack .hs-knock-av:first-child {
  margin-left: 0;
}
.huddle-stage .hs-knock-stack .hs-knock-av:nth-child(2) {
  background: #a855f7;
}
.huddle-stage .hs-knock-stack .hs-knock-av:nth-child(3) {
  background: #0ea5e9;
}
.huddle-stage .hs-kb {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #09090b;
  font: 500 12.5px/1 inherit;
  cursor: pointer;
  flex: none;
}
.huddle-stage .hs-kb:hover {
  background: #f4f4f5;
}
.huddle-stage .hs-kb.pri {
  background: #18181b;
  border-color: #18181b;
  color: #fafafa;
}
.huddle-stage .hs-kb.pri:hover {
  background: #27272a;
}
.huddle-stage .hs-kb:disabled {
  opacity: 0.45;
  cursor: default;
}

/* The People panel: "Asking to join" first, with the buttons. */
.hs-knock-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hs-knock-all {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 0;
  color: #93c5fd;
  font: 600 11.5px/1 inherit;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.hs-knock-all:disabled {
  opacity: 0.45;
  cursor: default;
}
.hs-person.ask {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  background: rgba(96, 165, 250, 0.1);
}
.hs-person.ask .hs-knock-av {
  width: 30px;
  height: 30px;
}
.hs-person.ask > span:nth-child(2) {
  min-width: 0;
}
.hs-person.ask b,
.hs-person.ask small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hs-knock-acts {
  display: flex;
  gap: 6px;
}
.hs-knock-acts button {
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #f8fafc;
  font: 500 12px/1 inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hs-knock-acts button:hover {
  background: rgba(255, 255, 255, 0.08);
}
.hs-knock-acts .hs-knock-admit {
  background: #fafafa;
  border-color: #fafafa;
  color: #09090b;
}
.hs-knock-acts .hs-knock-admit:hover {
  background: #e4e4e7;
}
.hs-knock-acts button:disabled {
  opacity: 0.45;
  cursor: default;
}
.hs-knock-deny .x {
  display: none;
}
.hs-knock-line {
  margin: 4px 8px 6px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.hs-knock-line svg {
  flex: none;
  margin-top: 1px;
}
.hs-knock-line b {
  color: #fff;
  font-weight: 600;
}

/* A phone: the card sits under the call's header and the tiles move down;
   two equal buttons; in the People sheet, Deny is an ✕. */
@media (max-width: 899px) {
  .huddle-stage .hs-pager.knocking {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .huddle-stage .hs-knock-slot {
    position: static;
    transform: none;
    width: auto;
    margin: 4px 10px 6px;
  }
  .huddle-stage .hs-knock {
    flex-wrap: wrap;
    padding: 10px 12px;
  }
  .huddle-stage .hs-knock-t {
    flex: 1 1 calc(100% - 44px);
  }
  /* Two or three faces are wider than one: the text still sits beside them. */
  .huddle-stage .hs-knock.many .hs-knock-t {
    flex-basis: calc(100% - 96px);
  }
  .huddle-stage .hs-knock .hs-kb {
    flex: 1 1 0;
    height: 38px;
    font-size: 13.5px;
  }
  .huddle-stage .hs-knock.many .hs-kb {
    flex: 1 1 100%;
  }
  .hs-knock-deny {
    width: 28px;
    padding: 0 !important;
  }
  .hs-knock-deny .lbl {
    display: none;
  }
  .hs-knock-deny .x {
    display: inline-flex;
  }
}
/* WhatsApp-parity messaging */
.fwd-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-2);
  font-size: 12px;
  font-style: italic;
  margin: 2px 0 4px;
}
.fwd-label svg {
  width: 13px;
  height: 13px;
}
.msg-quote {
  display: block;
  text-align: left;
  width: 100%;
  max-width: 420px;
  border: 0;
  border-left: 3px solid var(--accent, var(--accent-brand));
  background: var(--bg-2, rgba(91, 61, 245, 0.08));
  border-radius: 6px;
  padding: 7px 10px;
  margin: 2px 0 5px;
  cursor: pointer;
  color: inherit;
}
.msg-quote b {
  display: block;
  font-size: 12px;
  color: var(--accent, var(--accent-brand));
}
.msg-quote span {
  display: block;
  font-size: 12.5px;
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Ticks beside the time (tickState): a button, because they open Message
   info, styled as plain marks. */
.ticks {
  padding: 0 2px;
  margin-left: 1px;
  border: 0;
  border-radius: 4px;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--fg-3, #9aa0b5);
  cursor: pointer;
}
.ticks.sent {
  letter-spacing: 0;
}
.ticks.read {
  color: #34b7f1;
}
.ticks:focus-visible {
  outline: 2px solid var(--sh-ring, #34b7f1);
  outline-offset: 1px;
}
/* Still sending: a small clock where the ticks will be. */
.send-mark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 3px;
  color: var(--fg-3, #9aa0b5);
  font-size: 11px;
}
.send-mark svg {
  width: 11px;
  height: 11px;
}
body.hs .msg.mine .content .send-mark,
body.hs .msg.mine .content .message-send-state {
  color: var(--msg-mine-sub);
}
.cmp-quote {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 10px 0;
  padding: 7px 10px;
  border-left: 3px solid var(--accent, var(--accent-brand));
  background: var(--bg-2, rgba(91, 61, 245, 0.08));
  border-radius: 6px;
}
.cmp-quote-copy {
  flex: 1;
  min-width: 0;
}
.cmp-quote-copy b {
  display: block;
  font-size: 12px;
  color: var(--accent, var(--accent-brand));
}
.cmp-quote-copy span {
  display: block;
  font-size: 12.5px;
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmp-quote button {
  border: 0;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  flex: none;
  display: grid;
  place-items: center;
}
.audio-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.audio-wrap audio {
  flex: 1;
  min-width: 0;
}
.audio-speed {
  flex: none;
  border: 1px solid var(--border);
  background: var(--bg-2, transparent);
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.media-cell {
  position: relative;
  border: 0;
  padding: 0;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-2, #1c2237);
}
.media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-cell.media-video {
  display: grid;
  place-items: center;
  color: var(--fg-2);
}
.media-cell.media-video span {
  font-size: 20px;
}
.media-cell.media-video small {
  font-size: 9px;
  overflow: hidden;
  max-width: 90%;
}
.media-doc {
  display: block;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
}
/* A document that previews is a button; it looks like the link rows. */
button.media-doc {
  width: 100%;
  text-align: left;
  background: none;
  font: inherit;
  cursor: pointer;
}
.media-doc b {
  display: block;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-doc small {
  color: var(--fg-2);
}
/* Chat bubbles: your messages on the right, everyone else's on the left.
   Applied by messageHTML's `mine` / `theirs` classes, so system notes,
   huddle cards and Hiro's meeting-note cards keep their own layout. */
.msg.mine,
.msg.theirs {
  align-items: flex-start;
}
.msg.mine:not(.unread-hl):hover,
.msg.theirs:not(.unread-hl):hover {
  /* The bubble is the message; a full-row hover wash would hide it. */
  background: transparent;
}
.msg.mine .content,
.msg.theirs .content {
  flex: 0 1 auto;
  max-width: min(78%, 680px);
  padding: 6px 12px 7px;
  border-radius: 14px;
  background: var(--bg-3);
  text-align: left;
}
.msg.theirs:not(.grouped) .content {
  border-top-left-radius: 4px;
}
/* Their row: their name on top, outside the bubble (Teams-style); under it
   the avatar and the bubble side by side, tops level. Rows are explicit so a
   grouped message — no name — leaves row 1 empty, and an empty row takes no
   height. */
.msg.theirs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  /* .msg's gap is 10px both ways; the name should sit just over the bubble. */
  gap: 0 10px;
}
.msg.theirs > .gutter {
  grid-row: 2;
  padding-top: 0;
}
.msg.theirs > .msg-author {
  grid-row: 1;
  grid-column: -2 / -1;
}
.msg.theirs > .content {
  grid-row: 2;
  grid-column: -2 / -1;
}
.msg.theirs > .content {
  justify-self: start;
}
.msg-author {
  margin: 0 0 3px 2px;
  line-height: 1.3;
  min-width: 0;
}
.msg-author .name {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-3);
}
.msg.mine {
  justify-content: flex-end;
}
.msg.mine .gutter {
  /* No avatar on your own side — the position already says it is you. */
  display: none;
}
.msg.mine .content {
  background: var(--bg-3);
  background: color-mix(in srgb, var(--green) 14%, var(--bg));
}
.msg.mine:not(.grouped) .content {
  border-top-right-radius: 4px;
}
.msg-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.msg-meta .time {
  font-size: 11px;
}
/* Sit the hover toolbar on top of the bubble it acts on, rather than
   stranding it in the empty half of the row. Their bubble starts after the
   16px row padding + 36px gutter + 10px gap, so 56px overlaps its top-left
   corner; yours ends at the 20px row padding. Vertical placement is left to
   03-messages.css (top: -14px) and to the mobile block in 16-*.css, which
   docks the toolbar at the bottom of the row. */
.msg.theirs .msg-tools {
  right: auto;
  left: 56px;
}
.msg.mine .msg-tools {
  left: auto;
  right: 16px;
}
/* Slack-grade workflows */
.poll {
  display: grid;
  gap: 6px;
  max-width: 420px;
  margin: 6px 0 2px;
}
.poll-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}
.poll-opt:hover {
  border-color: var(--accent, var(--accent-brand));
}
.poll-opt.mine {
  border-color: var(--accent, var(--accent-brand));
  box-shadow: inset 0 0 0 1px var(--accent, var(--accent-brand));
}
.poll-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(91, 61, 245, 0.14);
  transition: width 0.35s ease;
}
.poll-label {
  position: relative;
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 650;
}
.poll-count {
  position: relative;
  flex: none;
  font-size: 12px;
  font-weight: 900;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.poll-meta {
  font-size: 11.5px;
  color: var(--fg-3, var(--fg-2));
}
/* Shared location: card in the chat + the capture dialog. */
.loc-card {
  display: grid;
  gap: 10px;
  /* One size for every pin, sent or forwarded, like a photo. */
  width: 280px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 6px 0 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  box-shadow: var(--shadow-xs);
}
.loc-map {
  position: relative;
  display: block;
  height: 150px;
  margin: -12px -12px 0;
  overflow: hidden;
  border-radius: 9px 9px 0 0;
  border-bottom: 1px solid var(--border);
  background: var(--hover);
  cursor: pointer;
}
.loc-map img {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
.loc-map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  /* The pin's tip, not its middle, sits on the point. */
  transform: translate(-50%, -100%);
  color: #dc2626;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.45));
}
.loc-map-pin svg {
  width: 32px;
  height: 32px;
  fill: #ef4444;
  stroke: #fff;
  stroke-width: 1.6;
}
.loc-map-pin svg circle {
  fill: #fff;
  stroke: none;
}
.loc-map-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 5px;
  font-size: 10px;
  color: #333;
  background: rgba(255, 255, 255, 0.8);
  border-top-left-radius: 4px;
}
.loc-capture .loc-map {
  width: 100%;
  margin: 0 0 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: default;
}
/* With the map shown, the round icon above the coordinates is redundant. */
.loc-capture .loc-map ~ .loc-ico {
  display: none;
}
.loc-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--red);
  background: color-mix(in srgb, var(--red) 10%, var(--bg));
}
.loc-info {
  min-width: 0;
  padding: 0 2px;
}
.loc-coords-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.loc-copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
}
.loc-copy:hover {
  background: var(--hover);
  color: var(--fg);
}
.loc-copy svg {
  width: 14px;
  height: 14px;
}
/* A location stands on its own, like a photo: no bubble behind the card.
   Names mine/theirs to outrank the bubble rules in 18-shadcn-theme.css,
   which load later. */
body.hs .msg.mine.msg-loc .content,
body.hs .msg.theirs.msg-loc .content {
  background: transparent;
  padding: 0;
}
body.hs .msg.msg-loc .loc-card {
  margin-top: 0;
}
/* Your own pin hugs the right edge even under a wider "Forwarded" line. */
body.hs .msg.mine.msg-loc .loc-card {
  margin-left: auto;
}
.loc-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.loc-acc {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
}
.loc-coords {
  font-size: 13px;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
  user-select: all;
}
.modal [data-retry] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.loc-capture {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 8px 8px;
  text-align: center;
}
.loc-capture .loc-ico {
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
}
.loc-capture .loc-ico svg {
  width: 24px;
  height: 24px;
}
.loc-capture.finding .loc-ico {
  color: var(--fg-2);
  background: var(--hover);
  animation: loc-pulse 1.4s ease-in-out infinite;
}
.loc-capture-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.loc-capture-text .loc-coords {
  font-size: 16px;
  color: var(--fg);
}
.loc-capture-sub {
  font-size: 13px;
  color: var(--fg-2);
}
.loc-capture.weak .loc-capture-sub {
  color: var(--amber, #b45309);
}
.loc-capture.error .loc-ico {
  color: var(--fg-2);
  background: var(--hover);
}
@keyframes loc-pulse {
  50% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loc-capture.finding .loc-ico {
    animation: none;
  }
}
.cmp-locked {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  color: var(--fg-2);
  font-size: 13px;
}
.cmp-locked svg {
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  .hz.hz-hiro .hz-hiro-avatar,
  #hiroFab .orb,
  .hiro-title .orb {
    animation: none !important;
  }
}
.record-note {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.45;
}
.record-note strong {
  display: block;
  margin-bottom: 4px;
}
html[data-theme="dark"] .record-note {
  background: var(--bg-3);
  color: #f2efff;
  border-color: var(--border-2);
}
.call-uploading {
  position: fixed;
  right: 30px;
  bottom: 112px;
  z-index: 760;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fff;
  color: var(--fg);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  font-weight: 800;
}
.meeting-page {
  height: 100%;
  overflow: auto;
  background: var(--bg);
  color: var(--fg);
}

@media (max-width: 900px) {
  .huddle-stage {
    inset: 44px 0 0;
    border-radius: 0;
  }
  .huddle-stage .hs-body {
    grid-template-columns: 1fr;
  }
  .hs-side {
    display: none;
  }
  .huddle-stage .hs-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
  .hs-control {
    min-width: 54px;
  }
}
.huddle-reaction-pop {
  position: fixed;
  left: 50%;
  bottom: 150px;
  z-index: 920;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  animation: huddle-react 1.8s ease-out forwards;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.25));
}
.huddle-reaction-pop b {
  font-size: 48px;
  line-height: 1;
}
.huddle-reaction-pop small {
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 17, 26, 0.86);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
@keyframes huddle-react {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.7);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.08);
  }
  75% {
    opacity: 1;
    transform: translate(-50%, -70px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -105px) scale(0.9);
  }
}
.transcript-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
}
.transcript-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-2);
  font-size: 14px;
  line-height: 1.4;
}
.transcript-line time {
  color: var(--fg-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.transcript-empty {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border-2);
  border-radius: 8px;
  color: var(--fg-2);
}

/* durable Hiro-originated meeting notes are first-class messages */
.msg.hiro-sent {
  margin: 5px 14px 5px 18px;
  padding: 13px 14px;
  border: 1px solid rgba(91, 61, 245, 0.24);
  border-left: 4px solid #6d3fe5;
  border-radius: 12px;
  background: linear-gradient(
    100deg,
    rgba(109, 63, 229, 0.1),
    rgba(14, 165, 233, 0.045) 62%,
    transparent
  );
}
.msg.hiro-sent:hover {
  background: linear-gradient(
    100deg,
    rgba(109, 63, 229, 0.14),
    rgba(14, 165, 233, 0.07) 62%,
    var(--msg-hover)
  );
}
.hiro-sent .gutter img {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(109, 63, 229, 0.38);
}
.hiro-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #5333c8;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.025em;
  vertical-align: middle;
}
html[data-theme="dark"] .hiro-sent-badge {
  background: #30265a;
  color: #cfc3ff;
}

/* connection banner */
.conn {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--yellow);
  color: #3a2b00;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 5px;
  z-index: 500;
  display: none;
}
.conn.show {
  display: block;
}
.conn.err {
  background: var(--red);
  color: #fff;
}

/* drag & drop */
.dropzone {
  position: absolute;
  inset: 0;
  background: rgba(18, 100, 163, 0.12);
  border: 2px dashed var(--link);
  border-radius: 10px;
  display: none;
  place-items: center;
  z-index: 60;
  font-weight: 900;
  color: var(--link);
  pointer-events: none;
}
.dropzone.show {
  display: grid;
}

/* Files waiting in the composer: one tile each, uploading on its own. */
.upload-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  scrollbar-width: thin;
}
.upload-tile {
  position: relative;
  flex: 0 0 auto;
  width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 6px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: var(--bg-3);
  font-size: 13px;
  overflow: hidden;
}
.upload-tile-thumb {
  position: relative;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--bg-2, var(--bg));
}
.upload-tile-thumb img,
.upload-tile-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-tile-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.upload-tile-kind {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--fg-2);
}
.upload-tile-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.upload-tile-copy b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.upload-tile-copy small {
  color: var(--fg-2);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-tile-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--border-2);
}
.upload-tile-bar i {
  display: block;
  height: 100%;
  background: var(--link);
  transition: width 0.2s;
}
.upload-tile-actions {
  display: flex;
  flex: 0 0 auto;
}
.upload-tile-actions button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1;
}
.upload-tile-actions button:hover {
  background: var(--border-2);
}
.upload-tile.is-failed,
.upload-tile.is-refused {
  border-color: var(--hs-red);
  background: var(--hs-red-soft);
}
.upload-tile.is-failed small,
.upload-tile.is-refused small {
  color: var(--hs-red);
  /* The reason is the point of a red tile: two lines, not an ellipsis. */
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
}
.upload-tile.is-refused .upload-tile-thumb {
  opacity: 0.5;
}
.upload-usage {
  margin-top: 4px;
  font-size: 12px;
  color: var(--fg-2);
}
@media (max-width: 640px) {
  .upload-tile {
    width: 168px;
  }
}


/* Asking for the location again: a small link beside the accuracy line,
   not a third footer button (locationModal). */
.loc-refresh {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--link);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.loc-refresh:hover {
  background: var(--hover);
}
.loc-refresh svg {
  width: 14px;
  height: 14px;
}
/* mobile */
@media (max-width: 820px) {

  .rail {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: 44px;
    bottom: 0;
    left: 0;
    z-index: 90;
    width: 82vw;
    max-width: 320px;
    transform: translateX(-102%);
    transition: transform 0.18s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.3);
  }
  .sidebar.open {
    transform: none;
  }
  .rpane {
    position: fixed;
    inset: 44px 0 0 0;
    width: 100% !important;
    flex-basis: auto !important;
    z-index: 95;
  }
  .main {
    border-radius: 0;
  }

  .msg {
    padding-left: 12px;
    padding-right: 12px;
  }
  .composer-wrap {
    padding: 0 10px 10px;
  }
  /* Rich-text toolbar is desktop-only. On a phone it costs a whole row of
     a composer that already has to share the screen with the keyboard, and
     every one of its actions is still reachable by typing markdown. */
  .fmt-bar {
    display: none;
  }
  .ch-tabs {
    display: none;
  }
  .facepile {
    display: none;
  }
  .huddle-stage {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 10px;
  }
  .scrim {
    padding-top: 0;
    align-items: stretch;
  }
  .modal {
    width: 100vw !important;
    max-height: 100vh;
    border-radius: 0;
  }
  .kpi-row {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {

  .msg .gutter {
    width: 32px;
    flex-basis: 32px;
  }
  .msg .gutter img {
    width: 32px;
    height: 32px;
  }
  .huddle-stage {
    inset: 44px 0 calc(64px + env(safe-area-inset-bottom)) 0;
    width: auto;
    max-height: none;
    border-radius: 0;
  }
  .huddle-stage .hs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .huddle-stage .hs-bar {
    padding: 10px max(10px, env(safe-area-inset-right)) 12px;
  }
  .transcript-line {
    grid-template-columns: 58px 1fr;
  }
}
/* ===================== tasks · docs · canvas ===================== */
/* Compact task cards (Home, message chips). The Work page, dialog and
   pickers live in 14-work.css. */
.tk-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
.tk-card:hover {
  border-color: var(--green);
  box-shadow: 0 1px 6px rgba(91, 61, 245, 0.1);
}
.tk-card.done {
  opacity: 0.55;
}
.tk-card.done .tk-title {
  text-decoration: line-through;
}
.tk-card.dragging {
  opacity: 0.4;
}
.tk-top {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.tk-title {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  line-height: 1.35;
}
.tk-pri {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex: none;
}
.tk-check {
  width: 19px;
  height: 19px;
  flex: none;
  border-radius: 50%;
  border: 1.6px solid var(--border);
  background: transparent;
  color: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  margin-top: 1px;
}
.tk-check:hover {
  border-color: var(--green);
  color: var(--fg-2);
}
.tk-check.on {
  background: var(--presence);
  border-color: var(--presence);
  color: #fff;
}
.tk-check.big {
  width: 24px;
  height: 24px;
}
.tk-check.sm {
  width: 15px;
  height: 15px;
  border-width: 1.4px;
}
.tk-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0 0 28px;
  flex-wrap: wrap;
}
.tk-meta .avatar {
  border-radius: 4px;
}
.tk-due {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--bg-3);
  border-radius: 9px;
  padding: 1px 7px;
}
.tk-due.soon {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}
.tk-due.late {
  background: rgba(225, 29, 72, 0.14);
  color: #be123c;
}
.tk-chan,
.tk-sub {
  font-size: 11.5px;
  color: var(--fg-2);
}
.tk-from {
  color: var(--fg-2);
  opacity: 0.7;
  display: inline-flex;
}
.msg-tasks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.msg-task {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-2);
  padding: 3px 10px 3px 6px;
  font-size: 12.5px;
  cursor: pointer;
  max-width: 100%;
}
.msg-task:hover {
  border-color: var(--green);
}
.msg-task.done .ttl {
  text-decoration: line-through;
  opacity: 0.6;
}
.msg-task .ttl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.msg-task .avatar {
  border-radius: 4px;
}
.msg.flash {
  animation: flashmsg 1.6s ease;
}
@keyframes flashmsg {
  0%,
  60% {
    background: rgba(245, 158, 11, 0.2);
  }
  100% {
    background: transparent;
  }
}

.doc-wrap {
  flex: 1;
  display: flex;
  min-height: 0;
}
.doc-side {
  width: 250px;
  flex: none;
  border-right: 1px solid var(--border);
  overflow: auto;
  padding: 10px 8px;
  background: var(--bg-2);
}
/* The two sides of the Docs tab, and the search over whichever is open. */
.doc-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.doc-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--fg-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
}
.doc-tab:hover {
  background: var(--bg-3);
}
.doc-tab.active {
  background: var(--bg-3);
  color: var(--fg);
}
.doc-search {
  width: 100%;
  margin-bottom: 8px;
  font-size: 13px;
  padding: 6px 8px;
}
/* "Shared with you", then "Open to everyone": a page somebody put in my
   hands by name is never buried under the company's handbooks. */
.doc-group {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 10px 8px 4px;
}
.doc-group:first-child {
  padding-top: 2px;
}
/* The state of a page I own, or what I may do with somebody else's. Never
   grows wide enough to squeeze the title. */
.doc-meta {
  flex: none;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.85;
}
.doc-row.active .doc-meta {
  color: var(--on-accent);
  opacity: 0.9;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 13.5px;
  text-align: left;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.doc-row:hover {
  background: var(--bg-3);
}
.doc-row.active {
  background: var(--green);
  color: var(--on-accent);
}
.doc-row.active .doc-plus {
  color: var(--on-accent);
}
.doc-plus {
  opacity: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--fg-2);
  border-radius: 6px;
  transition: opacity 0.12s ease, background 0.12s ease;
}
.doc-plus:hover {
  background: var(--bg-2);
  color: var(--fg);
}
.doc-row:focus-within .doc-plus,
.doc-row.active .doc-plus {
  opacity: 1;
}
.doc-row:hover .doc-plus {
  opacity: 1;
}
/* Where the page stands, next to its title: Private, 3 people, or Anyone.
   A button for an owner, a plain label for everybody else — but it reads the
   same either way, so nobody has to wonder who can see what they write. */
.doc-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.doc-chip svg {
  flex: none;
  opacity: 0.85;
}
.doc-chip:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.doc-chip.plain {
  cursor: default;
  background: transparent;
}
.doc-subhead {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 26px 10px;
}
.doc-viewonly {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}
.sh-add {
  display: flex;
  gap: 8px;
  align-items: center;
}
/* Add people: the scheduled-call type-ahead (its .sched-gadd / .sched-sugs
   styles are reused as they are), with the role it will give beside it. */
.sh-add .sh-find {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}
.sh-add #shWhat {
  flex: 0 0 132px;
  width: 132px;
}
.sh-role {
  flex: 0 0 150px;
  width: 150px;
}
/* One person per row, with air between them. */
.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
}
.sk-row + .sk-row {
  border-top: 1px solid var(--border);
}
.sk-row > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Somebody else saved first, so what is on this screen is not stored. It
   sits across the top of the page and typing stops until it is answered —
   piling more unsaved work on top would only make the loss bigger. */
.doc-conflict {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 14px 8px;
  padding: 10px 12px;
  border: 1px solid var(--amber, #b7791f);
  border-radius: 8px;
  background: var(--bg-2);
  color: var(--fg);
  font-size: 13px;
}
.doc-conflict[hidden] {
  display: none;
}
.doc-page[contenteditable="false"] {
  cursor: default;
}
.doc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 8px;
}
.doc-emoji {
  font-size: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}
.doc-title {
  flex: 1;
  font-size: 24px;
  font-weight: 800;
  border: none;
  background: transparent;
  color: var(--fg);
  outline: none;
  padding: 2px 4px;
  border-radius: 6px;
}
.doc-title:focus {
  background: var(--bg-2);
}
.doc-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 26px 8px;
  border-bottom: 1px solid var(--border);
}
.doc-page {
  flex: 1;
  overflow: auto;
  padding: 22px 26px 80px;
  outline: none;
  font-size: 15px;
  line-height: 1.65;
  max-width: 820px;
}
.doc-page h1 {
  font-size: 27px;
  font-weight: 800;
  margin: 0 0 10px;
}
.doc-page h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 22px 0 8px;
}
.doc-page p {
  margin: 0 0 12px;
}
.doc-page ul,
.doc-page ol {
  margin: 0 0 12px 20px;
}
.doc-page li {
  margin: 3px 0;
}
.doc-page blockquote {
  border-left: 3px solid var(--green);
  margin: 0 0 12px;
  padding: 2px 0 2px 12px;
  color: var(--fg-2);
}
.doc-page hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}
.doc-page code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
}
.doc-page .ck {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 12px;
}
.doc-page .ck label {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* A channel's Canvas, Files and Pins tabs, under the channel header. */
.chan-panel .panel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.chan-panel .panel-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.chan-panel .panel-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}
.chan-panel .panel-body > * {
  max-width: 880px;
}
.chan-panel .media-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.pin-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.wb {
  position: relative;
  flex: 1;
  overflow: auto;
}
.wb-surface {
  position: relative;
  min-width: 100%;
  min-height: 100%;
}
.wb canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Drawing with a finger must draw, not scroll the board. */
.wb canvas.pen {
  touch-action: none;
}
/* The note colours are light pastels in both themes, so the ink on them is
   dark in both. var(--fg) turned white in dark mode: white on pastel. */
.wb-note {
  --note-ink: #1f2430;
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 186px;
  min-height: 120px;
  border-radius: 10px;
  padding: 10px 10px 24px;
  color: var(--note-ink);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  font-size: 13.5px;
  line-height: 1.45;
}
.wb-grip {
  flex: none;
  touch-action: none;
  height: 12px;
  margin: -4px -4px 4px;
  border-radius: 6px;
  cursor: grab;
  background: rgba(0, 0, 0, 0.07);
}
.wb-grip:active {
  cursor: grabbing;
}
.wb-text {
  outline: none;
  min-height: 70px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* Resized: the note keeps its height and the text scrolls inside it. */
.wb-note.sized .wb-text {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.wb-size {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  touch-action: none;
  opacity: 0.45;
  background: linear-gradient(
    135deg,
    transparent 0 55%,
    var(--note-ink) 55% 62%,
    transparent 62% 72%,
    var(--note-ink) 72% 79%,
    transparent 79%
  );
}
.wb-note:hover .wb-size {
  opacity: 0.8;
}
.wb-colors {
  position: absolute;
  left: 9px;
  bottom: 7px;
  display: flex;
  gap: 4px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.12s;
}
.wb-note:hover .wb-colors {
  opacity: 1;
}
.wb-colors span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.wb-rm {
  margin-left: 4px;
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--note-ink);
  opacity: 0.6;
}
.hbtn.on {
  background: var(--green);
  color: var(--on-accent);
  border-color: var(--green);
}
/* The pages inside this one. The only way to a sub-page on a phone, and the
   same strip on a wide screen so there is one way to move about, not two. */
.doc-inside {
  border-top: 1px solid var(--border);
  margin: 18px 26px 0;
  padding: 10px 0 24px;
}
.doc-inside-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 0 8px;
}
.doc-inside-head {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--fg-2);
}
.doc-inside-head svg {
  opacity: 0.7;
}
.doc-inside-n {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  background: var(--bg-3);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
}
/* Said rather than assumed: a page in here belongs to this one and is open
   to exactly the same people. */
.doc-inside-blank {
  margin: 0 0 6px;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  line-height: 1.5;
}
.doc-inside-row,
.doc-inside-add {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  text-align: left;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.doc-inside-row:hover,
.doc-inside-add:hover {
  background: var(--bg-3);
}
.doc-inside-add {
  color: var(--fg-2);
  font-weight: 500;
  margin-top: 2px;
}
.doc-inside-add:hover {
  color: var(--fg);
}
.doc-inside-row svg,
.doc-inside-add svg {
  flex: none;
  opacity: 0.75;
}
.doc-inside-row:hover svg {
  opacity: 1;
}

/* A phone shows one thing at a time, like a conversation: the list, or a
   page with a way back. Hiding the list outright is what used to happen, and
   it left a phone unable to open any page at all (28 Oct 2026). */
@media (max-width: 900px) {
  .doc-wrap.phone .doc-side,
  .doc-wrap.phone .doc-main {
    width: 100%;
    flex: 1 1 auto;
    border-right: none;
    min-width: 0;
  }
  .doc-wrap.phone .doc-side.away,
  .doc-wrap.phone .doc-main.away {
    display: none;
  }
  /* A thumb needs a target, and a row that says what is inside it needs the
     room to say so. */
  .doc-wrap.phone .doc-row {
    min-height: 48px;
    font-size: 15px;
    padding: 8px 10px;
  }
  .doc-wrap.phone .doc-inside-count {
    display: block;
    font-size: 12px;
  }
  /* Every tool stays reachable by scrolling sideways rather than being
     crowded or wrapped. It is NOT pinned above the keyboard: an Android
     WebView cannot be relied on to say where the keyboard is (PRD §5.5). */
  .doc-wrap.phone .doc-tools {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .doc-wrap.phone .doc-tools::-webkit-scrollbar {
    display: none;
  }
  .doc-wrap.phone .doc-tools .grow {
    flex: 0 0 auto;
  }
  .doc-wrap.phone .doc-subhead {
    padding: 0 12px 6px;
  }
  .doc-head-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 48vw;
    display: inline-block;
    vertical-align: bottom;
  }
  /* The share screen is a screen, not a box to miss the edge of. */
  .modal.lg {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* Empty states: an icon, what this place is, and what to do about it. */
.doc-blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  color: var(--fg-2);
  font-size: 13px;
  padding: 28px 18px;
  line-height: 1.5;
}
.doc-blank b {
  color: var(--fg);
  font-size: 13.5px;
}
.doc-blank-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 6px;
  border-radius: 10px;
  background: var(--bg-3);
  color: var(--fg-2);
}
.doc-blank.big {
  justify-content: center;
  height: 100%;
  padding: 48px 24px;
}
.doc-blank.big .doc-blank-ico {
  width: 46px;
  height: 46px;
}
/* The share dialog's section labels carry their own icon. */
.fl svg {
  vertical-align: -2px;
  margin-right: 5px;
  opacity: 0.7;
}
.sh-gap {
  margin-top: 16px;
}

/* A page is read, so its words get a column rather than the whole window. */
.doc-page:empty::before,
.doc-page > p:only-child:empty::before {
  content: "Write something…";
  color: var(--fg-2);
  opacity: 0.6;
  pointer-events: none;
}

/* The words use the room there is. A narrow column left two thirds of a wide
   screen empty (Kalyan, 28 Oct 2026); the pane is already bounded by the doc
   list beside it, so the padding is enough to keep lines from running to the
   very edge. */
.doc-page,
.doc-inside {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* People with access: avatar rows like a call's invitees, the role on the
   right. The last owner has no picker, only the word. */
.sched-grow .sh-role {
  margin-left: auto;
}
.sched-grow .sh-fixed {
  margin-left: auto;
  padding-right: 10px;
}
/* ============================== work ============================== */
/* The Work page, a channel's Tasks tab, the task dialog, the pickers and
   the "Add new task" form. Layout language: a grouped list drawn as a table
   with one column grid shared by the header and every row, so assignee,
   date and priority line up down the whole group however deep a branch is
   indented. */

/* ------------------------------ page ------------------------------ */
.work-head .ch-title {
  font-weight: 800;
  font-size: 15px;
  gap: 8px;
}
.work-kinds {
  display: flex;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.work-kind-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.work-kind-tab.on {
  color: var(--fg);
  border-bottom-color: var(--fg);
}
.work-kind-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.tk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tk-bar .input.sm {
  height: 30px;
  font-size: 13px;
  padding: 0 8px;
  width: auto;
}
.tk-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-2);
}
.tk-search .input {
  width: 220px;
}
.tk-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px 24px 40px;
}
.view-tabs .hs-subtab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* A channel's Tasks tab fills the channel body the way the messages do. */
.chan-work {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ch-tab-n {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: 11px;
  font-weight: 700;
}
.ch-tab-n:empty {
  display: none;
}

/* ------------------------------ groups ----------------------------- */
.tk-lgroup {
  margin-bottom: 22px;
  container-type: inline-size;
}
.tk-lgroup-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
}
.tk-gtwist {
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--fg-2);
  border-radius: 5px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.12s;
}
.tk-lgroup.closed .tk-gtwist {
  transform: rotate(-90deg);
}
.tk-gtwist:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.tk-gpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gc) 13%, transparent);
  color: var(--fg);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.tk-gpill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gc);
}
.tk-gcount {
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 600;
}
/* ------------------------------- rows ------------------------------ */
.tk-grid {
  --tk-cols: minmax(0, 1fr) 140px 112px 104px;
  --tk-step: 24px;
  border-top: 1px solid var(--border);
}
.tk-cols,
.tk-row {
  display: grid;
  grid-template-columns: var(--tk-cols);
  align-items: stretch;
}
.tk-cols {
  min-height: 30px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 600;
}
.tk-cols .tk-c-name {
  padding-left: 56px;
}
.tk-c {
  display: flex;
  align-items: center;
  padding: 0 6px;
  min-width: 0;
}
.tk-row {
  position: relative;
  min-height: 40px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.tk-row:hover {
  background: var(--hover);
}
.tk-c-name {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 8px 4px calc(6px + var(--d, 0) * var(--tk-step));
}
.tk-row.done .tk-row-title {
  text-decoration: line-through;
  color: var(--fg-3, var(--fg-2));
}
.tk-row.done {
  opacity: 0.75;
}
/* The elbow into the parent above: down from the parent's indent, then a
   short stub into this row. */
.tk-rail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tk-row.nested .tk-rail::before,
.tk-inline.nested .tk-rail::before {
  content: "";
  position: absolute;
  left: calc(6px + (var(--d) - 1) * var(--tk-step) + 10px);
  top: 0;
  height: 50%;
  width: 1.5px;
  background: var(--border-2, var(--border));
}
.tk-row.nested .tk-rail::after,
.tk-inline.nested .tk-rail::after {
  content: "";
  position: absolute;
  left: calc(6px + (var(--d) - 1) * var(--tk-step) + 10px);
  top: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--border-2, var(--border));
}
.tk-twist {
  width: 20px;
  height: 20px;
  flex: none;
  border: none;
  background: transparent;
  color: var(--fg-2);
  border-radius: 4px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform: rotate(-90deg);
  transition: transform 0.12s;
}
.tk-twist.open {
  transform: rotate(0deg);
}
.tk-twist:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.tk-twist-none {
  cursor: default;
}
/* The status circle: a ring in the status colour, a tick when done. */
.tk-status {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--sc);
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.tk-status.s-todo {
  border-style: dashed;
}
.tk-status.s-doing {
  background: conic-gradient(var(--sc) 0 50%, transparent 50% 100%);
  background-clip: content-box;
  padding: 2px;
}
.tk-status.s-done {
  background: var(--sc);
}
.tk-status svg {
  width: 11px;
  height: 11px;
}
.tk-status:not(:disabled):hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 22%, transparent);
}
.tk-status:disabled {
  cursor: default;
  opacity: 0.7;
}
.tk-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.tk-row-title {
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-c-name .tk-from,
.tk-c-name .tk-chan {
  flex: none;
  color: var(--fg-2);
  display: inline-flex;
  align-items: center;
  font-size: 12px;
}
.tk-c-name .tk-chan {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg-3);
}
.tk-subpill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 1px 7px 1px 5px;
  border: none;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--fg-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
}
button.tk-subpill {
  cursor: pointer;
}
button.tk-subpill:hover {
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--border-2, var(--border));
}
.tk-subpill.full {
  background: #e7f5ef;
  color: #007a5a;
}
/* Editable cells: transparent until hovered; a disabled cell is just the
   value, with its reason in the tooltip. */
.tk-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.tk-c .tk-cell {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-cell:not(:disabled):hover {
  border-color: var(--border-2, var(--border));
  background: var(--bg);
}
.tk-cell:disabled {
  cursor: default;
  color: var(--fg);
}
.tk-who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-duecell.late {
  color: #e11d48;
  font-weight: 600;
}
.tk-duecell.soon {
  color: #b45309;
  font-weight: 600;
}
.tk-ghost {
  display: inline-flex;
  color: var(--fg-3, var(--fg-2));
  opacity: 0.55;
}
.tk-row:hover .tk-ghost {
  opacity: 1;
}
.tk-pricell svg {
  flex: none;
}
.tk-pricell.quiet svg path {
  fill: none;
}
.tk-pricell.quiet {
  opacity: 0.55;
}
.tk-row:hover .tk-pricell.quiet {
  opacity: 1;
}
.tk-noassignee {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.4px dashed var(--border-2, var(--border));
  flex: none;
}
.td-stack {
  display: inline-flex;
}
.td-stack .avatar {
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg);
}
.td-stack .avatar + .avatar {
  margin-left: -6px;
}
.td-stack-more {
  margin-left: 4px;
  color: var(--fg-2);
  font-size: 12px;
  font-weight: 700;
}
/* Hover actions: add subtask, edit, delete. Always in the layout so a row
   never changes width on hover. */
.tk-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex: none;
}
.tk-addsub {
  width: 24px;
  height: 24px;
  flex: none;
  border: none;
  background: transparent;
  color: var(--fg-2);
  border-radius: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
}
.tk-row:hover .tk-addsub,
.tk-addsub:focus-visible {
  opacity: 1;
}
.tk-addsub:hover {
  background: var(--green);
  color: #fff;
}
.tk-addsub.tk-del:hover {
  background: #e11d48;
}
.tk-rowmore {
  display: none;
  width: 30px;
  height: 30px;
  flex: none;
  margin-left: auto;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--fg-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.tk-rowmore:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.tk-row-rename {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}
.tk-emptyrow {
  padding: 10px 8px 10px 56px;
  color: var(--fg-3, var(--fg-2));
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

/* ---------------------------- quick-add ---------------------------- */
/* On the rows' column grid, so the assignee chip sits under Assignee. */
.tk-inline {
  position: relative;
  display: grid;
  grid-template-columns: var(--tk-cols);
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--green) 5%, transparent);
  box-shadow: inset 2px 0 0 var(--green);
}
.tk-inline-name {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 4px 8px 4px calc(6px + var(--d, 0) * var(--tk-step));
}
.tk-inline-input {
  flex: 1;
  min-width: 0;
  margin-left: 54px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  outline: none;
  padding: 6px 4px;
}
.tk-inline-input::placeholder {
  font-weight: 400;
  color: var(--fg-3, var(--fg-2));
}
/* Who the typed task goes to, in the Assignee column. Empty and red until
   someone is picked, like the channel chip; nobody is assigned by default. */
.tk-inline-who {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  padding: 2px 9px 2px 3px;
  border: 1px solid var(--border-2, var(--border));
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.tk-inline-who.missing {
  padding-left: 7px;
  border-color: #e11d48;
  color: #e11d48;
}
.tk-inline-who.shake {
  animation: tk-shake 0.32s;
}
.tk-inline-who > svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.tk-inline-who .avatar {
  width: 20px;
  height: 20px;
}
.tk-inline-who .lbl {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-inline-who:hover {
  border-color: var(--green);
}
.tk-inline-chan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  max-width: 180px;
  margin-left: 8px;
  padding: 4px 9px;
  border: 1px solid var(--border-2, var(--border));
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.tk-inline-chan span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tk-inline-chan svg {
  width: 12px;
  height: 12px;
  flex: none;
  color: var(--fg-2);
}
.tk-inline-chan:not(:disabled):hover {
  border-color: var(--green);
}
.tk-inline-chan.fixed {
  cursor: default;
  background: var(--bg-3);
  border-color: transparent;
}
.tk-inline-chan.missing {
  border-color: #e11d48;
  color: #e11d48;
}
.tk-inline-chan.shake {
  animation: tk-shake 0.32s;
}
@keyframes tk-shake {
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-2px);
  }
}
.req {
  color: #e11d48;
  font-weight: 700;
}
.tk-quickadd {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 38px;
  padding: 0 8px 0 56px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.tk-quickadd:hover {
  background: var(--hover);
  color: var(--fg);
}

/* ----------------------------- pickers ----------------------------- */
.tk-pop {
  min-width: 250px;
  max-width: 300px;
  font-size: 14px;
}
/* Dropped from a form field: as wide as the field (width set in JS). */
.tk-pop.tk-pop-field {
  min-width: 0;
  max-width: none;
}
.tk-pop .menu-item .avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}
.tk-pop-search {
  padding: 4px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tk-pop-search .input {
  width: 100%;
}
.tk-pop-list {
  max-height: 300px;
  overflow: auto;
}
.tk-pop-empty {
  padding: 8px 20px;
  color: var(--fg-2);
  font-size: 13px;
}
.tk-pop-hash {
  width: 20px;
  flex: none;
  text-align: center;
  color: var(--fg-2);
  font-weight: 600;
}
.tk-pick {
  gap: 9px;
}
.tk-pick.on {
  font-weight: 700;
}
.tk-pick.locked {
  opacity: 0.7;
  cursor: default;
}
.tk-tick {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--border-2, var(--border));
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: #fff;
}
.tk-tick.on {
  background: var(--green);
  border-color: var(--green);
}
.tk-tick svg {
  width: 11px;
  height: 11px;
}

/* --------------------------- add new task -------------------------- */
.modal.add-dlg {
  width: min(680px, 94vw);
}
.add-work {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.add-work .fl {
  margin-top: 8px;
}
/* The body scrolls; its fields keep their height instead of being squeezed
   (a wrapped row of chips used to collapse onto the label below it). */
.add-work > * {
  flex-shrink: 0;
}
.add-work textarea {
  resize: vertical;
  min-height: 72px;
}
.add-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.add-who {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  min-height: 38px;
}
.add-who > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.add-pick {
  position: relative;
  padding-right: 30px;
}
.add-pick::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--fg-2);
  border-bottom: 1.5px solid var(--fg-2);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.add-fixed {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  background: var(--bg-3);
  color: var(--fg);
  cursor: default;
}
.add-work .invalid {
  border-color: #e11d48;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.14);
}
/* A people field reads like a dropdown: the whole box opens the picker,
   one chip per person, each removable on its own. Wraps, never truncates. */
.pf {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 4px 36px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}
.pf:hover {
  border-color: var(--border-2, var(--fg-3, var(--border)));
}
/* The box is a role=button, so the app-wide press effect (a small shrink,
   in the skeleton) would hit it and its × buttons; a field should not move. */
body.hs .pf[role="button"]:not([aria-disabled]):active,
body.hs .pf .pf-x:not(:disabled):active {
  transform: none;
}
.pf:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.pf-ph {
  padding: 0 8px;
  color: var(--fg-3, var(--fg-2));
  font-size: 13.5px;
}
.pf-caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--fg-2);
  pointer-events: none;
}
.pf-caret svg {
  width: 15px;
  height: 15px;
}
.pf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 4px 3px 4px;
  border-radius: 999px;
  background: var(--bg-3, var(--hover));
  font-size: 13.5px;
  cursor: default;
}
.pf-chip .avatar {
  border-radius: 50%;
  flex: none;
}
.pf-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 4px;
}
.pf-x {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-left: -2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  flex: none;
}
.pf-x:hover {
  background: var(--hover);
  color: var(--fg);
}
.pf-x svg {
  width: 13px;
  height: 13px;
}
/* Done closes the people sheet on a phone; a mouse just clicks away. */
.tk-pop-done {
  display: none;
}
.tk-pop-count {
  font-weight: 400;
  color: var(--fg-2);
}
/* The channel field: a picker button, or a new private channel whose name
   is edited right there. */
.add-chan-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.add-chan-new {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding-top: 0;
  padding-bottom: 0;
  padding-right: 4px;
}
.add-chan-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  padding: 8px 0;
}
.add-new-badge {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #2563eb 16%, transparent);
  color: #3b82f6;
  font-size: 11.5px;
  font-weight: 600;
}
.add-chan-again {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}
.add-chan-again:hover {
  background: var(--hover);
}
.add-chan-again::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--fg-2);
  border-bottom: 1.5px solid var(--fg-2);
  transform: rotate(45deg);
}
#tfChanWrap.invalid,
#ifChanWrap.invalid {
  border-radius: 10px;
}
/* Who will see the work, said under the channel before it is created. */
.add-vis {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, #f59e0b 13%, transparent);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.45;
}
.add-vis.private {
  background: var(--bg-3, var(--hover));
  color: var(--fg-2);
}
.add-vis > svg {
  flex: none;
  width: 15px;
  height: 15px;
  margin-top: 2px;
}
.add-vis .linkish {
  font-size: inherit;
  text-decoration: underline;
}
.add-vis-s {
  display: block;
  margin-top: 2px;
  color: var(--fg-2);
}
#tfVis:empty,
#ifVis:empty {
  display: none;
}
/* The New private channel offer at the top of the channel picker. */
.tk-new-chan {
  align-items: flex-start;
}
.tk-new-chan .grow {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tk-new-sub {
  font-size: 12px;
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* In the task dialog, people fields list everyone by name and wrap. */
.td-val.td-people {
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}
.td-person[hidden] {
  display: none;
}
.td-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.td-person .avatar {
  border-radius: 50%;
}
.td-person.more {
  color: var(--fg-2);
}
.td-val.td-people > span:last-child {
  overflow: visible;
}
/* Phones: the people and channel pickers open as a sheet from the bottom,
   full width, so the list is reachable with a thumb and above the keyboard. */
@media (max-width: 600px) {
  #layers > .tk-pop-people,
  #layers > .tk-pop-chan {
    left: 0 !important;
    right: 0;
    width: auto !important;
    top: auto !important;
    bottom: 0;
    min-width: 0;
    max-width: none;
    width: 100%;
    border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #layers > .tk-pop-people .tk-pop-list,
  #layers > .tk-pop-chan .tk-pop-list {
    max-height: 50vh;
  }
  .tk-pop .menu-item {
    min-height: 44px;
  }
  .tk-pop-done {
    display: flex;
    padding: 8px 12px 10px;
    border-top: 1px solid var(--border);
  }
  .tk-pop-done .btn {
    flex: 1;
    min-height: 44px;
  }
  .pf-chip {
    font-size: 14px;
  }
  .pf-x {
    width: 28px;
    height: 28px;
  }
}

/* ---------------------------- the dialog --------------------------- */
.modal.task-dlg {
  width: min(1480px, 97vw);
  height: 88vh;
  max-height: 88vh;
  padding: 0;
  overflow: hidden;
}
.scrim:has(.task-dlg) {
  padding-top: 5vh;
}
.td {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.td-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 20px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.td-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  color: var(--fg-2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.td-crumbs > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.td-crumbs .sep {
  opacity: 0.5;
}
.td-crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 280px;
  border: none;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.td-crumb span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.td-crumb:hover {
  background: var(--hover);
}
.td-created {
  color: var(--fg-2);
  font-size: 12.5px;
  white-space: nowrap;
}
.td-icon {
  width: 30px;
  height: 30px;
  flex: none;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--fg-2);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.td-icon:hover {
  background: var(--hover);
  color: var(--fg);
}
.td-icon-danger:hover {
  background: #e11d48;
  color: #fff;
}
.td-icon.sm {
  width: 24px;
  height: 24px;
  font-size: 15px;
}
.td-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}
.td-split.has-tree {
  grid-template-columns: 220px minmax(0, 1fr) 360px;
}
.td-main {
  min-height: 0;
  overflow: auto;
  padding: 26px 34px 48px;
}
.td-kind {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.td-kindchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-2, var(--border));
  border-radius: 7px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
}
.td-kindchip-btn {
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  color: var(--fg-2);
}
.td-kindchip-btn:hover {
  color: var(--fg);
  background: var(--hover);
}
.td-title {
  margin: 0 0 18px;
  padding: 2px 4px;
  margin-left: -4px;
  border-radius: 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  outline: none;
  word-break: break-word;
}
.td-title[contenteditable="true"]:hover {
  background: var(--hover);
}
.td-title[contenteditable="true"]:focus {
  background: var(--bg-2);
  box-shadow: 0 0 0 2px var(--green);
}
.td-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 32px;
  padding-bottom: 6px;
}
.td-f {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: center;
  min-height: 36px;
}
.td-fl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-2);
  font-size: 14px;
  white-space: nowrap;
}
.td-fl svg {
  flex: none;
}
.td-fv {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.td-val {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  min-height: 30px;
  padding: 3px 8px;
  margin-left: -8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.td-val > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-val:not(:disabled):not(.td-static):hover {
  border-color: var(--border-2, var(--border));
  background: var(--bg-2);
}
.td-val:disabled,
.td-static {
  cursor: default;
  color: var(--fg);
}
.td-val.late {
  color: #e11d48;
  font-weight: 600;
}
.td-val.soon {
  color: #b45309;
  font-weight: 600;
}
.td-val svg {
  flex: none;
}
.td-empty {
  color: var(--fg-3, var(--fg-2));
}
/* The status control: pill (menu) with the next-status arrow tucked in it,
   and the finishing tick beside. */
.td-status {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  border-radius: 6px;
  background: color-mix(in srgb, var(--pc) 18%, transparent);
  overflow: hidden;
}
.td-status button {
  border: none;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  cursor: pointer;
}
.td-status button:disabled {
  cursor: default;
}
.td-status-main {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.td-status-next {
  padding: 0 8px 0 4px;
  font-size: 13px;
  opacity: 0.7;
}
.td-status button:not(:disabled):hover {
  background: color-mix(in srgb, var(--pc) 16%, transparent);
  opacity: 1;
}
.td-done {
  width: 28px;
  height: 26px;
  flex: none;
  border: 1px solid var(--border-2, var(--border));
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.td-done:not(:disabled):hover {
  border-color: #10b981;
  color: #10b981;
}
.td-done.on {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.td-done:disabled {
  cursor: default;
  opacity: 0.6;
}
.td-desc {
  width: 100%;
  min-height: 72px;
  margin-top: 14px;
  padding: 12px 0 8px;
  border: 1px solid transparent;
  border-top-color: var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
  overflow: hidden;
}
.td-desc:focus {
  border-top-color: var(--green);
}
.td-desc[readonly] {
  cursor: default;
}
.td-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 22px 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
}
.td-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.td-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 13.5px;
  padding: 4px 6px;
  margin-left: -6px;
  border-radius: 6px;
  cursor: pointer;
}
.td-link:hover {
  background: var(--hover);
  color: var(--fg);
}
.tk-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tk-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 13.5px;
}
.tk-file-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tk-file-row .tk-file {
  flex: 1;
  min-width: 0;
}
.tk-file:hover {
  border-color: var(--green);
}
.tk-file .fi {
  color: var(--fg-2);
  display: inline-flex;
}

/* Subtasks table. */
.td-subs {
  margin-top: 22px;
}
.td-subs-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
}
.td-subs-h .muted {
  font-size: 13px;
}
.td-subs-bar {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-3);
  overflow: hidden;
}
.td-subs-bar span {
  display: block;
  height: 100%;
  background: #10b981;
  transition: width 0.18s;
}
.td-subs-table {
  --td-cols: minmax(0, 1fr) 96px 96px 64px;
}
.td-sub {
  display: grid;
  grid-template-columns: var(--td-cols);
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.td-sub:hover {
  background: var(--hover);
}
.td-sub-cols {
  min-height: 30px;
  color: var(--fg-2);
  font-size: 12.5px;
  cursor: default;
}
.td-sub-cols:hover {
  background: transparent;
}
.td-sub-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 8px 0 calc(2px + var(--d, 0) * 26px);
}
.td-sub-cols .td-sub-name {
  padding-left: 26px;
}
.td-sub-t {
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-sub.done .td-sub-t {
  color: var(--fg-2);
  text-decoration: line-through;
}
.td-sub-c {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}
.td-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  color: var(--fg-2);
  font-size: 12px;
}
.td-hover-btn,
.td-more-btn {
  width: 24px;
  height: 24px;
  flex: none;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
}
.td-more-btn {
  font-size: 16px;
  line-height: 1;
}
.td-sub:hover .td-hover-btn,
.td-sub:hover .td-more-btn,
.td-hover-btn:focus-visible,
.td-more-btn:focus-visible {
  opacity: 1;
}
.td-hover-btn:hover,
.td-more-btn:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.td-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 12.5px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.td-add:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.td-quickadd {
  padding-left: 28px;
}
.td-subs-hidden {
  padding: 8px 2px;
}
.td-sub-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--green) 5%, transparent);
  box-shadow: inset 2px 0 0 var(--green);
  padding-left: calc(var(--d, 0) * 26px);
}
.td-new-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 9px 8px 6px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  outline: none;
}
.td-new-input::placeholder {
  font-weight: 400;
  color: var(--fg-3, var(--fg-2));
}
.td-new-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 8px 28px;
  flex-wrap: wrap;
}
.td-new-tools .btn.sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* The tree sidebar. */
.td-tree {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.td-tree.hidden {
  display: none;
}
.td-tree-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 10px 16px;
  font-size: 14px;
}
.td-tree-h b {
  flex: 1;
}
.td-tree-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 6px;
}
.td-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 8px 0 calc(4px + var(--d, 0) * 14px);
  border-radius: 7px;
  font-size: 13.5px;
  cursor: pointer;
}
.td-tree-row:hover {
  background: var(--hover);
}
.td-tree-row.on {
  background: var(--bg-3);
  font-weight: 600;
}
.td-tree-t {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-tree-caret {
  width: 16px;
  height: 16px;
  flex: none;
  border: none;
  background: transparent;
  color: var(--fg-2);
  border-radius: 4px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transform: rotate(-90deg);
  transition: transform 0.12s;
}
span.td-tree-caret {
  cursor: default;
}
.td-tree-caret.open {
  transform: rotate(0deg);
}
.td-tree-caret svg {
  width: 10px;
  height: 10px;
}
button.td-tree-caret:hover {
  background: var(--bg-3);
  color: var(--fg);
}
.td-tree-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 10px 14px;
  padding: 6px 8px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--fg-2);
  font-family: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.td-tree-add:hover {
  background: var(--hover);
  color: var(--fg);
}
.td-mini {
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  border: 1.6px solid var(--sc);
}
.td-mini.s-todo {
  border-style: dashed;
}
.td-mini.s-doing {
  background: conic-gradient(var(--sc) 0 50%, transparent 50% 100%);
  background-clip: content-box;
  padding: 1.5px;
}
.td-mini.s-done {
  background: var(--sc);
}

/* Activity. */
.td-side {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  background: var(--bg-2);
}
.td-side-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.td-feed {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.td-act {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: baseline;
  color: var(--fg-2);
  font-size: 12.5px;
  line-height: 1.45;
}
.td-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--fg-3, var(--fg-2));
  transform: translateY(-2px);
}
.td-when {
  color: var(--fg-3, var(--fg-2));
  font-size: 11.5px;
  white-space: nowrap;
}
.td-inline-link {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--border-2, var(--border));
}
.td-cm {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.td-cm .avatar {
  border-radius: 50%;
}
.td-cm-b {
  min-width: 0;
  flex: 1;
}
.td-cm-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}
.td-cm-t {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.td-compose {
  position: relative;
  flex: none;
  margin: 0 14px 14px;
  border: 1px solid var(--border-2, var(--border));
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(11, 13, 23, 0.06);
}
.td-compose:focus-within {
  border-color: var(--green);
}
.td-comment-wrap {
  position: relative;
}
/* The box and the highlight layer behind it must lay text out identically:
   same box, font, padding, line height and wrapping. */
.td-comment,
.td-comment-hl {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px 4px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: normal;
}
.td-comment {
  position: relative;
  z-index: 1;
  display: block;
  min-height: 44px;
  max-height: 160px;
  background: transparent;
  outline: none;
  resize: none;
  color: var(--fg);
}
.td-comment-hl {
  position: absolute;
  inset: 0;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
}
.td-comment-hl mark {
  color: transparent;
  background: color-mix(in srgb, var(--link) 22%, transparent);
  border-radius: 4px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--link) 22%, transparent);
}
.td-compose-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 6px 8px 8px 14px;
}
.td-send {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.td-send:hover {
  filter: brightness(1.08);
}
.td-gone {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px;
  text-align: center;
}
.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;
}

/* --------------------------- the chat side -------------------------- */
.msg-sys .content {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.msg-task-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px 6px 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.msg-task-card:hover {
  border-color: var(--green);
}
.msg-task-card svg {
  flex: none;
  color: var(--green);
}
.msg-task .td-stack .avatar {
  width: 16px;
  height: 16px;
}

/* ------------------------------ phones ------------------------------ */
@container (max-width: 680px) {
  .tk-grid {
    --tk-cols: minmax(0, 1fr) 44px 90px 44px;
  }
  .tk-who,
  .tk-pricell span,
  .tk-c-name .tk-chan {
    display: none;
  }
  .tk-cols .tk-c {
    overflow: hidden;
    white-space: nowrap;
    font-size: 0;
  }
  .tk-cols .tk-c:nth-child(3) {
    font-size: 12px;
  }
}
@media (max-width: 1100px) {
  .td-split.has-tree {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .td-split.has-tree .td-tree {
    display: none;
  }
}
@media (max-width: 900px) {
  /* One column: details, subtasks, then activity, in one scroll. */
  .modal.task-dlg {
    height: 100vh;
    max-height: 100vh;
  }
  .scrim:has(.task-dlg) {
    padding-top: 0;
  }
  .td-split,
  .td-split.has-tree {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .td-main {
    min-height: auto;
    overflow: visible;
    padding: 18px 18px 8px;
  }
  .td-side {
    min-height: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .td-feed {
    overflow: visible;
  }
  .td-fields {
    grid-template-columns: 1fr;
  }
  .td-f {
    grid-template-columns: 112px minmax(0, 1fr);
  }
  .td-fl {
    white-space: normal;
    line-height: 1.2;
  }
  .td-fv {
    flex-wrap: wrap;
  }
  .td-title {
    font-size: 21px;
  }
  .td-subs-table {
    --td-cols: minmax(0, 1fr) 36px 40px 30px;
  }
  .td-add span {
    display: none;
  }
  .td-sub .td-more-btn,
  .td-hover-btn {
    opacity: 1;
  }
  .td-sub-cols .td-sub-c:nth-child(n + 2) {
    font-size: 0;
  }
  .td-top {
    padding: 8px 10px 8px 14px;
    gap: 4px;
  }
  .td-crumbs > span:first-child,
  .td-crumbs > .sep:first-of-type {
    display: none;
  }
}
@media (max-width: 820px) {
  .work-kinds {
    padding: 0 10px;
  }
  .tk-bar {
    padding: 9px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .tk-search {
    flex: 1 1 145px;
  }
  .tk-search .input {
    width: 100%;
  }
  .tk-body {
    padding: 12px 10px 90px;
  }
  /* The columns shrink to their icons and the header row goes; the title
     wraps to two lines; the three hover icons become one ⋯. */
  .tk-row .tk-chan,
  .tk-row .tk-from {
    display: none;
  }
  .tk-grid {
    --tk-cols: minmax(0, 1fr) 32px 68px 34px;
    --tk-step: 14px;
  }
  .tk-row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 13.5px;
    flex: 1 1 84px;
    min-width: 84px;
  }
  .tk-c-name {
    gap: 5px;
    padding-right: 2px;
  }
  .tk-row-actions {
    display: none;
  }
  .tk-rowmore {
    display: inline-grid;
    place-items: center;
  }
  .tk-c-name .tk-subpill svg {
    display: none;
  }
  .tk-inline-input {
    margin-left: 44px;
  }
  .tk-inline-who {
    padding: 3px;
  }
  .tk-inline-who .lbl,
  .tk-inline-who .req,
  .tk-inline-who .avatar + .avatar,
  .tk-inline-who .td-stack-more {
    display: none;
  }
  .tk-quickadd,
  .tk-emptyrow {
    padding-left: 46px;
  }
  .tk-cols {
    display: none;
  }
  .tk-who,
  .tk-pricell span {
    display: none;
  }
  .tk-c {
    padding: 0 2px;
  }
  .tk-cell {
    padding: 2px 3px;
    font-size: 12px;
  }
  .add-grid {
    grid-template-columns: 1fr;
  }
}

/* Menus and pickers opened from inside the task dialog must sit above the
   modal scrim (z-index 1200), or every click lands on the scrim and closes
   the dialog. */
#layers > .menu,
#layers > .emoji-pop {
  z-index: 1300;
}

/* A locked cell shows its value at full strength: it is information, not a
   greyed-out control. The skin dims every disabled button to 55%, which
   made a locked assignee, date or priority look faded. */
body.hs .tk-cell:disabled,
body.hs .td-val:disabled {
  opacity: 1;
}

/* ---------------------------- incidents ---------------------------- */
/* The Incidents side of Work and a channel's Incidents tab (List), the
   declare form, the action modals and the incident half of the dialog.
   Stage colours: Unacknowledged red, In progress blue, Postmortem amber,
   Resolved green. Severity: S1 red, S2 amber, S3 grey. */
.tk-grid-inc {
  --tk-cols: minmax(0, 1fr) 132px 118px 118px;
}
.tk-status.s-unacknowledged {
  border-style: dashed;
}
.tk-status.s-in_progress,
.tk-status.s-postmortem {
  background: conic-gradient(var(--sc) 0 50%, transparent 50% 100%);
  background-clip: content-box;
  padding: 2px;
}
.tk-status.s-resolved {
  background: var(--sc);
}
.tk-gpill-s {
  display: none;
}
.tk-sev {
  display: inline-grid;
  place-items: center;
  height: 18px;
  min-width: 26px;
  padding: 0 5px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--sv) 16%, transparent);
  color: var(--sv);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.tk-sevname {
  color: var(--fg-2);
  font-size: 13px;
}
.tk-tlcell {
  cursor: default;
}
.tk-tl {
  font-size: 13px;
  white-space: nowrap;
}
.tk-tlverb {
  color: var(--fg-2);
}
.tk-tl.late {
  color: #e11d48;
  font-weight: 600;
}
.tk-tl.late .tk-tlverb {
  color: inherit;
}
.tk-tl.dim {
  color: var(--fg-3, var(--fg-2));
}
.tk-row-inc.done .tk-row-title {
  text-decoration: line-through;
  color: var(--fg-2);
}

/* The dialog: stage pill, action buttons or the waiting line, stamps, card. */
.td-statusrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.td-stage .td-status-main {
  cursor: default;
}
.td-incact {
  height: 26px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.td-incact.primary {
  background: var(--green, #16a34a);
  color: #fff;
}
.td-incact.success {
  background: #16a34a;
  color: #fff;
}
.td-incact.plain {
  border-color: var(--border-2, var(--border));
}
.td-incact.danger {
  border-color: #e11d48;
  color: #e11d48;
}
.td-incact.danger:hover {
  background: #e11d48;
  color: #fff;
}
.td-incact:not(.danger):hover {
  filter: brightness(0.95);
}
.td-waiting {
  color: var(--fg-2);
  font-size: 13px;
}
.td-kindchip-inc {
  gap: 6px;
}
.td-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 10px 0 0;
  color: var(--fg-2);
  font-size: 12.5px;
}
.td-stamps b {
  color: var(--fg);
  font-weight: 600;
}
.td-stamps .sep {
  color: var(--fg-3, var(--fg-2));
}
.inc-both {
  margin-top: 8px;
  color: var(--fg-2);
  font-size: 12.5px;
}
.inc-card {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.inc-card > b {
  font-size: 13.5px;
}
.inc-card.reopen {
  background: color-mix(in srgb, #e11d48 5%, var(--bg));
}
.inc-card.pm {
  background: color-mix(in srgb, #f59e0b 7%, var(--bg));
}
.inc-card.pm.overdue {
  border-color: #e11d48;
}
.inc-card.done {
  background: color-mix(in srgb, #10b981 6%, var(--bg));
}
.inc-tag {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #fef3c7;
  color: #8a6100;
}
.inc-card.reopen .inc-tag,
.inc-card.pm.overdue .inc-tag {
  background: #fde7ec;
  color: #b4113c;
}
.inc-card.done .inc-tag {
  background: #dcfce7;
  color: #15803d;
}
.inc-card-s {
  color: var(--fg-2);
  font-size: 12.5px;
}
.inc-quote {
  padding: 6px 10px;
  border-left: 3px solid var(--border-2, var(--border));
  color: var(--fg);
  font-style: italic;
}
.inc-card-f {
  color: var(--fg-2);
  font-size: 12.5px;
}
.inc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.inc-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.inc-stats b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.inc-stats span {
  color: var(--fg-2);
  font-size: 12px;
}
/* Workflow moves stand out in the feed: bolder, a stage-coloured dot, the
   note in quotes under them. */
.td-act.td-move {
  color: var(--fg);
  font-size: 13px;
}
.td-act.td-move .td-dot {
  width: 8px;
  height: 8px;
  background: var(--mc);
  transform: translateY(-1px);
}
.td-move-note {
  display: block;
  margin-top: 3px;
  padding-left: 8px;
  border-left: 2px solid var(--mc);
  color: var(--fg-2);
  font-size: 12.5px;
}
/* The action forms. */
.inc-form textarea.invalid,
.inc-form select.invalid {
  border-color: #e11d48;
}
.inc-next {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-2, var(--hover));
  font-size: 13px;
}
.inc-next ol {
  margin: 6px 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.btn.danger-solid {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}
.btn.danger-solid:hover {
  background: #be123c;
}
.msg-inc-card svg {
  color: #e11d48;
}
@media (max-width: 820px) {
  /* The columns shrink to their icons: avatar, the duration, the S-tag.
     The duration column fits its longest value, "Overdue 12d", at 12px;
     the verb and its " · " are hidden. */
  .tk-grid-inc {
    --tk-cols: minmax(0, 1fr) 32px 78px 36px;
  }
  .tk-row-inc .tk-tl {
    font-size: 12px;
  }
  .tk-sevname,
  .tk-tlverb {
    display: none;
  }
  .tk-gpill-l:has(+ .tk-gpill-s) {
    display: none;
  }
  .tk-gpill-s {
    display: inline;
  }
  .inc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ------------------------- new for me markers ------------------------ */
/* An assignment I have not picked up yet: a dot before the title and a
   bold title, the same cue as an unread channel. */
.tk-newdot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--red, #e11d48);
  margin-right: 2px;
}
.tk-row.new .tk-row-title {
  font-weight: 700;
}
/* Notifications: the per-row read / unread toggle and the Unread only switch. */
.activity-toggle {
  margin-left: auto;
  width: 26px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--fg-3, var(--fg-2));
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
}
.msg:hover .activity-toggle,
.activity-toggle:focus-visible,
/* A touch screen has no hover, so read / unread was unreachable on a phone.
   Decided by touchScreen() rather than a media query: the Android WebView can
   report a fine pointer and hover when it has neither. */
.activity-toggle.touch {
  opacity: 1;
}
/* An unread notification: a light tint, a dot before the title and a bold
   title; a read one steps back. It used to be a bar in --accent, which this
   theme sets near-black, so it read as a stray line rather than "new". --link
   is blue in both themes. */
.activity-row {
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.12s;
}
.activity-row .who {
  row-gap: 2px;
  align-items: center;
}
.msg.activity-row .who .name {
  font-weight: 500;
}
/* The read / unread toggle sits in the row's top-right corner instead of in
   the header line: as the header's last flex item it wrapped onto a line of
   its own whenever the title was long, leaving a blank gap under the title
   (visible on a phone, where the toggle always shows). */
.activity-row .content {
  position: relative;
  padding-right: 34px;
}
.activity-row .activity-toggle {
  position: absolute;
  top: 0;
  right: 0;
  margin-left: 0;
}
.activity-row:not(.activity-unread) .text {
  color: var(--fg-2);
}
.activity-row.activity-unread {
  background: color-mix(in srgb, var(--link, #2563eb) 7%, transparent);
}
.activity-row.activity-unread:hover {
  background: color-mix(in srgb, var(--link, #2563eb) 11%, transparent);
}
.msg.activity-row.activity-unread .who .name {
  font-weight: 700;
}
.activity-row.activity-unread .who .name::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 7px 1px 0;
  border-radius: 50%;
  background: var(--link, #2563eb);
  vertical-align: middle;
}
/* The buttons that belong to one row — "Show all 8", "Call back" — are small
   chips under it, not full toolbar buttons. */
.activity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.activity-actions .hbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg);
}
.activity-actions .hbtn:hover {
  background: var(--bg-3);
}
.activity-actions .hbtn svg {
  width: 14px;
  height: 14px;
}
/* The next page of older notifications, at the foot of the list. */
#activityMore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-2);
  font-weight: 500;
  color: var(--fg-2);
}
#activityMore:hover {
  background: var(--bg-3);
  color: var(--fg);
}
@media (max-width: 600px) {
  #activityMore {
    width: 100%;
  }
  #unreadOnly,
  #readAll {
    height: 30px;
    padding: 0 10px;
    font-size: 12.5px;
  }
  #unreadOnly {
    padding-right: 4px;
  }
}
.activity-toggle:hover {
  border-color: var(--border-2, var(--border));
  background: var(--bg);
  color: var(--fg);
}
.hbtn.bordered.on {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
/* "Unread only" with nothing unread: one centred block, not a sentence with a
   button trailing off to the left. */
#center .empty:has(#showAllActivity) {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 40px 16px 24px;
  text-align: center;
}
.activity-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.activity-empty-sub {
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 10px;
}
#showAllActivity {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

/* ------------------------- the filter bar --------------------------- */
/* Filter on the left, the chips that are actually APPLIED, search on the
   right, and a plain sentence underneath. Spec:
   docs/prd/work-module/05-work-filters-and-dm-prd.md §3.

   Nothing unset is drawn here — an unset filter lives inside the popup,
   which is the whole reason there is one. */
.tk-barwrap {
  position: relative;
  background: var(--bg);
}
.tk-filters {
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 0;
}
.tk-fbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.tk-fbtn:hover,
.tk-fbtn.on {
  background: var(--sh-muted);
}
.tk-fbtn.on {
  border-color: var(--fg-2);
}
/* An applied filter. The body reopens the popup on its category; the × drops
   the category. A locked one carries a lock instead — a channel tab IS its
   channel and a DM IS its two people, so removing them would make the tab
   mean something it does not. */
.tk-fchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  color: var(--fg);
  background: var(--sh-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tk-fchip .k {
  color: var(--fg-2);
}
.tk-fchip:hover {
  border-color: var(--fg-2);
}
.tk-fchip.locked {
  cursor: default;
  background: var(--bg);
}
.tk-fchip.locked:hover {
  border-color: var(--border);
}
.tk-fchip.locked svg {
  color: var(--fg-2);
}
.tk-fchip:focus-visible {
  outline: 2px solid var(--sh-ring);
  outline-offset: 1px;
}
.tk-fclear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-right: -3px;
  border-radius: 5px;
  color: var(--fg-2);
  font-size: 15px;
  line-height: 1;
}
.tk-fclear:hover {
  background: var(--sh-accent);
  color: var(--fg);
}
/* The line that makes "every person you pick must match" understandable
   without anybody having to learn the rule (PRD §3.3). */
.tk-summary {
  padding: 0 24px 10px;
  font-size: 12.5px;
  color: var(--fg-2);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tk-sumcount {
  white-space: nowrap;
}
.tk-ferr {
  color: var(--red);
}
.linkish {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------------------------- the popup ----------------------------- */
/* Categories on the left, that category's values on the right, Cancel and
   Apply at the bottom. It edits a DRAFT: nothing is queried until Apply.

   It sits inside the bar, NOT in #layers, on purpose — openMenu() clears
   every layer before it opens, which is what made the role chooser close the
   popup it was opened from. */
.tk-pop-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% - 4px);
  left: 24px;
  width: 520px;
  max-width: calc(100vw - 48px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--sh-shadow-md);
  overflow: hidden;
}
.tk-pop-body {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 250px;
}
.tk-pop-rail {
  border-right: 1px solid var(--border);
  padding: 8px;
  background: var(--sh-muted);
}
.tk-rail-i {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--fg-2);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.tk-rail-i:hover {
  color: var(--fg);
}
.tk-rail-i.on {
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
}
/* A locked category is still worth opening — the pane explains WHY it is
   locked — but it must not look like a choice. --fg-2 here was the same
   colour as the base rule, so it said nothing at all. */
.tk-rail-i.off {
  color: var(--fg-3);
  cursor: default;
}
.tk-rail-i.off:hover {
  color: var(--fg-3);
}
.tk-rail-i.off svg {
  opacity: 0.7;
}
.tk-rail-n {
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--sh-accent);
  color: var(--fg);
  font-size: 11px;
  font-weight: 600;
}
.tk-pop-pane {
  padding: 10px 12px;
  min-width: 0;
}
.tk-pane-s {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--fg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 9px;
  margin-bottom: 6px;
}
.tk-pane-s .input {
  width: 100%;
  border: 0;
  padding: 0;
  height: 22px;
  background: none;
}
/* The box is the label, not the input: the input is borderless inside it.
   The theme's focus ring would otherwise draw a second box INSIDE the first,
   so the ring moves out to the label, where the border already is. */
.tk-pane-s .input:focus,
.tk-pane-s .input:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}
.tk-pane-s:focus-within {
  border-color: var(--fg-3);
  box-shadow: 0 0 0 2px var(--sh-muted);
}
.tk-pane-list {
  max-height: 232px;
  overflow: auto;
}
.tk-pane-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 6px;
  font: inherit;
  font-size: 13.5px;
  color: var(--fg);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
/* Hover fills; being PICKED does not. The tick is the state, and a fill
   behind some rows and not others made the list look patchy — worst in the
   People pane, where it sat behind an avatar and a name. Applies to every
   pane so one popup does not shade its rows two different ways. */
.tk-pane-row:hover:not(:disabled) {
  background: var(--sh-muted);
}
.tk-pane-row:disabled {
  cursor: default;
}
.tk-box {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--fg-2);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.tk-box.on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
/* A locked tick: on, and not yours to turn off. No "always" label — the
   un-untickable box says it. */
.tk-box.lock {
  background: var(--fg-2);
  border-color: var(--fg-2);
}
.tk-nm {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A person row is ONE surface: the tick, the name and the role live in the
   same row, with nothing bolted on beside it.

   A PICKED row gets no fill. The tick already says it is picked, and a grey
   block behind an avatar and a name made the list look heavy and uneven —
   some rows shaded, some not. Hover still fills, because that is pointer
   feedback rather than state. */
.tk-prow {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 6px;
  border-radius: 8px;
}
.tk-prow:hover {
  background: var(--sh-muted);
}
.tk-prow .tk-pane-row,
.tk-prow .tk-pane-row:hover {
  flex: 1;
  min-width: 0;
  width: auto;
  background: none;
}
/* The role each ticked person is filtered by. A real dropdown, drawn by the
   browser — a floating menu of ours would be wiped by openMenu(), which
   clears every layer before it opens, and this popup is what it would
   clear. Quiet by default so the name stays the thing you read. */
.tk-role {
  flex: none;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  height: 24px;
  padding: 0 18px 0 7px;
  color: var(--fg-2);
  background: transparent
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 5px center;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  appearance: none;
  -webkit-appearance: none;
}
.tk-role:hover,
.tk-role:focus-visible {
  color: var(--fg);
  border-color: var(--border);
  background-color: var(--bg);
  outline: none;
}
/* The native list is the OS's; only the closed control is ours to style. */
.tk-role option {
  color: var(--fg);
  background: var(--bg);
  font-weight: 400;
}
.tk-pane-hint,
.tk-pane-warn {
  padding: 8px 6px 0;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg-2);
  border-top: 1px solid var(--border);
}
.tk-pane-warn {
  color: var(--amber, var(--red));
  border-top: 0;
  padding-top: 6px;
  margin-top: 2px;
}
.tk-pane-locked {
  padding: 14px 8px;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
}
.tk-pane-locked-h {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--fg);
  font-weight: 600;
  margin-bottom: 6px;
}
.tk-pop-empty {
  padding: 10px 8px;
  color: var(--fg-2);
  font-size: 13px;
}
.tk-pop-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.tk-pop-foot .linkish {
  color: var(--fg-2);
  font-size: 13px;
}
/* Apply is the filled button the modals use, just smaller: this footer is
   Cancel-and-confirm, the same shape as every other confirm in the app. */
.tk-pop-apply {
  padding: 7px 18px;
  font-size: 13px;
}
@media (max-width: 760px) {
  .tk-filters {
    padding: 8px 12px;
  }
  .tk-summary {
    padding: 0 12px 8px;
  }
  .tk-pop-panel {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
  .tk-pop-body {
    grid-template-columns: 112px minmax(0, 1fr);
  }
}
/* In a DM's Tasks or Incidents tab the rows come from several channels, so
   the channel tag is not decoration — it is the row's whole context
   (filters PRD §6.1). The narrow-width rules above drop it on a channel
   board, where every row is in that channel anyway; here it stays. */
.tk-body[data-dmview] .tk-c-name .tk-chan,
.tk-body[data-dmview] .tk-row .tk-chan {
  display: inline-flex;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* An empty list names its cause and offers a way off each filter. */
.tk-empty-state {
  margin: 4px 0 18px;
  padding: 16px 18px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.tk-empty-h {
  font-size: 14px;
  color: var(--fg);
}
.tk-empty-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
/* "N from parent" on the dialog's People involved field. */
.td-sub {
  margin-left: 6px;
  font-size: 11.5px;
  color: var(--fg-2);
}
/* The @ list sits above the comment box, inside the dialog's width. */
.td-compose .td-ac {
  left: 0;
  right: 0;
  max-width: none;
  margin-bottom: 6px;
  z-index: 5;
}

/* TSK-42 / INC-7 in the task dialog (work numbers). The chip copies the
   reference with the title and a link; monospace so digits line up. */
.td-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.td-ref svg {
  opacity: 0.6;
}
.td-ref:hover svg {
  opacity: 1;
}
.td-crumb .td-ref-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--hs-ink-3, var(--fg-3));
  margin-right: 6px;
}
/* ============================== sign-in ============================= */
body.signed-out #app {
  filter: blur(2px);
  pointer-events: none;
}

/* =====================================================================
   Hiro Talks production shell — identical to the supplied UI authority.
   ===================================================================== */
:root {
  --hs-canvas: #f6f6f6;
  --hs-dot: transparent;
  --hs-card: #ffffff;
  --hs-line: #e5e5e5;
  --hs-line-soft: #f0f0f0;
  --hs-ink: #0a0a0a;
  --hs-ink-2: #404040;
  --hs-ink-3: #737373;
  --hs-violet: #171717;
  --hs-violet-soft: #f5f5f5;
  --hs-on-violet: #fafafa;
  --hs-active: #e8e8e8;
  --hs-green: #16a34a;
  --hs-green-soft: #f0fdf4;
  --hs-red: #dc2626;
  --hs-red-soft: #fef2f2;
  --hs-amber: #f59e0b;
  --hs-amber-soft: #fffbeb;
  --hs-r: 12px;
  --hs-r-sm: 8px;
  --hs-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --hs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
[data-theme="dark"] {
  --hs-canvas: #0a0a0a;
  --hs-dot: transparent;
  --hs-card: #171717;
  --hs-line: rgba(255, 255, 255, 0.1);
  --hs-line-soft: rgba(255, 255, 255, 0.06);
  --hs-ink: #fafafa;
  --hs-ink-2: #d4d4d4;
  --hs-ink-3: #a1a1a1;
  --hs-violet: #e5e5e5;
  --hs-violet-soft: #262626;
  --hs-on-violet: #171717;
  --hs-active: #2e2e2e;
  --hs-green-soft: rgba(22, 163, 74, 0.18);
  --hs-red: #f87171;
  --hs-red-soft: rgba(248, 113, 113, 0.15);
  --hs-amber-soft: rgba(245, 158, 11, 0.16);
  --hs-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
body.hs {
  background:
    radial-gradient(var(--hs-dot) 1px, transparent 1px) 0 0/22px 22px,
    var(--hs-canvas);
  color: var(--hs-ink);
}
.hs-wrap {
  /* The cap only exists to stop the shell stretching on an ultra-wide monitor.
     It used to be 1560px, which left a dead margin on any ordinary laptop or
     1920px desktop; message bubbles carry their own max-widths (see
     03-messages.css) so a wider shell does not lengthen chat lines — the extra
     space goes to the sidebar, tables and the admin charts, which want it. */
  width: min(100%, 2200px);
  max-width: 2200px;
  margin: 0 auto;
  padding: 0 16px;
}
.hs-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 4px 10px;
}
.hs-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: auto;
  height: auto;
  min-width: max-content;
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.hs-prod {
  line-height: 1.15;
}
.hs-prod b {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hs-prod span {
  display: block;
  font-size: 12.5px;
  color: var(--hs-ink-3);
}
.hs-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--hs-line);
  background: var(--hs-card);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--hs-ink);
  cursor: pointer;
  white-space: nowrap;
}
.hs-pill:hover {
  border-color: var(--hs-violet);
}
.hs-pill--focus {
  border-color: var(--hs-violet);
  box-shadow: 0 0 0 3px var(--hs-violet-soft);
}

.hs-pill b {
  font-weight: 800;
}
.hs-dot-g,
.hs-dot-v {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.hs-dot-g {
  background: var(--hs-green);
}

.hs-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--hs-line);
  background: var(--hs-card);
  color: var(--hs-ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.hs-icon-btn:hover {
  color: var(--hs-ink);
  border-color: var(--hs-violet);
}
/* The bell is a nav control now, so it needs the same "you are here" the
   rail pill gives every other view. */
.hs-icon-btn.is-on {
  background: var(--hs-active);
  border-color: var(--hs-active);
  color: var(--hs-ink);
}
.hs-icon-btn .n {
  position: absolute;
  top: -6px;
  right: -4px;
  background: var(--hs-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 5px;
  border: 2px solid var(--hs-canvas);
}
/* The primary nav is a vertical rail down the left of the body row — icon
   above label, ClickUp-style. It is laid out by the grid on .hs-body-wrap
   below, which spans it across all three content rows so it runs the full
   height beneath the top bar. Under 1000px it reverts to the horizontal
   strip it used to be; see 16-hiro-boot-intro-and-veil.css. */
.hs-nav {
  background: var(--hs-card);
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  box-shadow: var(--hs-shadow);
  width: 88px;
  flex: 0 0 88px;
  overflow-y: auto;
  overflow-x: hidden;
  /* Twelve items plus New need ~700px; a 768px-tall laptop scrolls the last
     one or two. Same hidden-scrollbar treatment the strip already had. */
  scrollbar-width: none;
}
.hs-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.hs-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--hs-ink);
  font-size: 11.5px;
  font-weight: 700;
  /* Without this, thirteen items that do not fit are SHRUNK to fit by the
     column flex, and the last one — New — collapses to zero height rather
     than the rail scrolling. */
  flex: 0 0 auto;
  /* Twelve items must clear a 768px-tall laptop without scrolling: at 54px
     each plus gaps they come to ~670px against the ~692px the rail gets. */
  padding: 6px 3px 5px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.1;
  text-align: center;
}
.hs-tab:hover {
  background: var(--hs-violet-soft);
  color: var(--hs-violet);
}
.hs-tab.on {
  background: var(--hs-active);
  color: var(--hs-ink);
  font-weight: 600;
}
.hs-tab .n {
  position: absolute;
  top: 3px;
  right: 9px;
  background: var(--hs-red);
  color: #fff;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 800;
}
.hs-tab.on .n {
  background: var(--hs-ink);
  color: var(--hs-canvas);
}
/* The per-view description line is off. Every view now names itself in its
   own header, so this restated the obvious above the body card — and its
   ~31px row was the whole reason the rail ran taller than the card beside it
   (the rail spans all three grid rows, the card only the last). Hidden rather
   than deleted: renderSubtabs() bails out early if #hsSub is missing, which
   would leave the empty secondary bar showing again. The element and the
   SUBLINE map go in the stale-code pass. */
.hs-sub {
  display: none;
  min-height: 31px;
  font-size: 12.5px;
  color: var(--hs-ink-3);
  padding: 10px 6px 4px;
}
.hs-subtabs {
  display: flex;
  align-items: center;
  min-height: 43px;
  height: 43px;
  gap: 4px;
  padding: 0 4px;
  border-bottom: 1px solid var(--hs-line);
  margin-bottom: 12px;
  overflow-x: auto;
  /* Without this the strip scrolls on BOTH axes: `overflow-x: auto` forces
     overflow-y from `visible` to `auto`, and the horizontal scrollbar's own
     ~15px gutter then pushes the 35px-tall tabs past the fixed 43px height,
     so a second, vertical scrollbar appears inside the row. */
  overflow-y: hidden;
  /* Same treatment every other horizontal strip gets (.hs-nav, .ops-tabs,
     .ch-tabs): it still scrolls, the scrollbar just isn't drawn. */
  scrollbar-width: none;
}
.hs-subtabs::-webkit-scrollbar {
  height: 0;
}
/* Every view now carries its own .view-tabs strip, so SUBTABS is empty and
   this bar is always empty too. It was `visibility: hidden` to hold the row's
   height steady when switching between views that had tabs and views that did
   not — with no view having them, that reservation is 55px of dead space on
   every screen. The element stays in the DOM (the interface contract check in
   CI asserts id="hsSubtabs"), it just stops taking up room. */
.hs-subtabs.is-empty {
  display: none;
}
.hs-subtab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--hs-ink-2);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.hs-subtab:hover {
  color: var(--hs-ink);
}
.hs-subtab.on {
  color: var(--hs-violet);
  border-bottom-color: var(--hs-violet);
  font-weight: 800;
}
.hs-card {
  background: var(--hs-card);
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-r);
  box-shadow: var(--hs-shadow);
}
/* Rail glyphs are neutral: the icon carries the meaning, the selected pill
   carries the emphasis. Each item used to get its own tint and a tinted chip
   behind the glyph, which made eleven competing colours down the left edge. */
.hs-glyph {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--hs-ink-2);
  background: transparent;
}
.hs-tab:hover .hs-glyph {
  color: var(--hs-ink);
}
.hs-tab.on .hs-glyph {
  background: transparent;
  color: var(--hs-ink);
}
body.hs #app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: transparent;
}
body.hs .hs-body-wrap {
  flex: 1 1 0;
  /* Must track the .hs-wrap cap above, or the body card ends up narrower than
     the header row it sits under. */
  width: min(100%, 2200px);
  min-width: 0;
  min-height: 0;
  height: 0;
  padding-bottom: 12px;
  /* Two columns: the rail, then everything that belongs to the current view.
     The rail spans all three rows, so it runs from under the top bar to the
     bottom of the window while the subline, the secondary tabs and the body
     card stack to its right. Grid rather than a flex row plus a wrapper div
     keeps the markup flat — the four children stay siblings, which is what
     lets the mobile fallback be a single `display: flex` line. */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  column-gap: 12px;
}
body.hs .hs-body-wrap > .hs-nav {
  grid-column: 1;
  grid-row: 1 / 4;
}
body.hs .hs-body-wrap > .hs-sub {
  grid-column: 2;
  grid-row: 1;
}
body.hs .hs-body-wrap > .hs-subtabs {
  grid-column: 2;
  grid-row: 2;
}
body.hs .hs-body-wrap > .body {
  grid-column: 2;
  grid-row: 3;
}
body.hs .body {
  width: 100%;
  height: 100%;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--hs-r);
}
body.hs .main {
  flex: 1 1 0;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
}
body.hs .workspace {
  flex: 1 1 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
}
body.hs #center {
  flex: 1 1 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
}
body.hs .conn {
  top: 8px;
}
body.hs .sidebar {
  background: var(--hs-card);
  color: var(--hs-ink-2);
  border-right: 1px solid var(--hs-line);
  /* The person's own width (--sb-w, dragged — 02-sidebar.js); 300px unless they choose. */
  width: var(--sb-w, 300px);
  flex: 0 0 var(--sb-w, 300px);
  transition:
    width 0.18s ease,
    flex-basis 0.18s ease,
    transform 0.18s ease;
}
body.hs .sb-head {
  color: var(--hs-ink);
  border-bottom: 1px solid var(--hs-line-soft);
}
body.hs .sb-title {
  color: var(--hs-ink);
}
body.hs .sb-row,
body.hs .sb-sec {
  color: var(--hs-ink-2);
}
body.hs .sb-row:hover {
  background: var(--hs-violet-soft);
  color: var(--hs-ink);
}
body.hs .sb-row.active {
  background: var(--hs-active);
  color: var(--hs-ink);
  font-weight: 600;
}
body.hs .sb-row.unread {
  color: var(--hs-ink);
  font-weight: 700;
}
body.hs .sb-icon {
  color: var(--hs-ink-2);
}
/* Unused as of the mobile pass: the compose pencil that carried it was
   replaced by a plain search button, and nothing in this row is a
   primary action any more. Kept for the next control that needs it. */
body.hs .sb-icon.filled {
  background: var(--hs-violet);
  color: var(--hs-on-violet);
}
/* Says "a filter is on" without reading as a button you should press —
   a state, not a peer of the actions beside it. */
body.hs .sb-icon.is-on {
  background: var(--hs-violet-soft);
  color: var(--hs-ink);
}

body.hs.sidebar-collapsed .sidebar {
  width: 0;
  flex-basis: 0;
  border-right: 0;
  overflow: hidden;
}
body.hs.sidebar-collapsed .main {
  border-radius: var(--hs-r);
}
body.hs .main {
  background: var(--hs-card);
  border-radius: 0 var(--hs-r) var(--hs-r) 0;
}
body.hs .chan-head {
  background: var(--hs-card);
  border-bottom: 1px solid var(--hs-line);
}
body.hs .msgs {
  background: var(--hs-card);
}
/* The strip under the list — the composer, the band around it, the
   typing line — is the same surface as the list. It showed the page's
   darker --bg through, a visibly different band in the dark theme. */
body.hs .composer-wrap,
body.hs .composer,
body.hs .typing {
  background-color: var(--hs-card);
}
body.hs .composer {
  border-radius: 12px;
  border-color: var(--hs-line);
}
body.hs .rpane {
  border-left: 1px solid var(--hs-line);
  background: var(--hs-card);
}

.hs-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  cursor: pointer;
  border: 1px solid var(--hs-line);
}
.hs-avatar img {
  width: 100%;
  height: 100%;
  display: block;
}
.hs-avatar .dot {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--hs-green);
  border: 2px solid var(--hs-card);
}
.hs-pill .ph {
  color: var(--hs-ink-2);
  font-weight: 500;
}
#hiroFab.hs-ask {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 680;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--hs-card);
  border: 1px solid rgba(91, 61, 245, 0.35);
  border-radius: 999px;
  padding: 9px 18px 9px 10px;
  box-shadow: 0 10px 30px rgba(91, 61, 245, 0.22);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--hs-ink);
}
#hiroFab.hs-ask:hover {
  box-shadow: 0 14px 36px rgba(91, 61, 245, 0.3);
  transform: none;
}
#hiroFab.hs-ask .orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--hs-canvas);
  background: var(--hs-ink);
}
.hs-cercle-logo {
  display: block;
  width: 132px;
  height: auto;
  object-fit: contain;
}
@media (max-width: 1100px) {
  .hs-prod span,
  .hs-top .hide-md {
    display: none;
  }
  .hs-cercle-logo {
    width: 112px;
  }
}
@media (max-width: 860px) {
  #hiroFab.hs-ask span:last-child {
    display: none;
  }
  #hiroFab.hs-ask {
    padding: 9px;
  }
}
.signin {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
  animation: sifade 0.25s ease;
}
.signin.out {
  opacity: 0;
  transition: opacity 0.25s ease;
}
@keyframes sifade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.si-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 8vw;
  overflow: auto;
}
.si-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 26px;
  color: var(--fg);
}
.si-brand b {
  font-weight: 800;
}
.si-bolt {
  display: inline-flex;
}
.si-by {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
  margin-left: 4px;
}
.si-card {
  max-width: 380px;
  width: 100%;
}
.si-card h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 4px;
}
.si-sub {
  color: var(--fg-2);
  margin: 0 0 20px;
  font-size: 14px;
}
.si-microsoft {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.si-microsoft:hover {
  background: var(--hover);
}
.si-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--fg-2);
  font-size: 12px;
}
.si-or::before,
.si-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.si-go {
  width: 100%;
  height: 42px;
  margin-top: 16px;
  font-size: 14px;
}
.si-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: none;
  background: transparent;
  color: var(--link);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.si-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--fg-2);
}
.si-code {
  display: flex;
  gap: 8px;
}
.si-code .input {
  width: 46px;
  height: 52px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  padding: 0;
}
.si-right {
  background: #0b0d17;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.si-right h2 {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  margin: 22px 0 8px;
  max-width: 340px;
}
.si-right p {
  color: #a7adc9;
  font-size: 14px;
  max-width: 360px;
  margin: 0;
  line-height: 1.6;
}
.si-stage {
  position: relative;
  width: min(340px, 60%);
  aspect-ratio: 1;
}
.si-stage canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.si-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transform: scale(1.8);
}
@media (max-width: 900px) {
  .signin {
    grid-template-columns: 1fr;
  }
  .si-right {
    display: none;
  }
}
/* ===================== Hiro boot — intro and veil ======================= */
body.hboot-on {
  overflow: hidden;
}
body.hboot-on #app {
  opacity: 0;
}
#app {
  transition: opacity 0.5s ease;
}

.hboot {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #0a0e1c;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.5s ease;
}
.hboot.is-out {
  opacity: 0;
  pointer-events: none;
}
.hboot__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.95;
  animation: hbootRise 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hbootRise {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
  to {
    opacity: 0.95;
    transform: none;
  }
}
.hboot::after {
  /* vignette, so the centre reads */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(10, 14, 28, 0.18) 26%,
    rgba(10, 14, 28, 0.8) 72%
  );
}
.hboot__center {
  position: relative;
  z-index: 2;
  width: min(560px, 88vw);
  text-align: center;
  font-family: var(--font, "Poppins", system-ui, sans-serif);
  color: #fff;
}
.hboot__eyebrow {
  color: #f59e0b;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hboot__title {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: #fff;
}
.hboot__title b {
  font-weight: 800;
}
.hboot__sub {
  color: #97a1c4;
  font-size: 14px;
  margin: 0 0 30px;
  min-height: 20px;
}
.hboot__steps {
  list-style: none;
  margin: 0 auto 26px;
  padding: 0;
  max-width: 420px;
  text-align: left;
}
.hboot__step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  color: #6f7a9e;
  font-size: 14.5px;
  transition: color 0.3s ease;
}
.hboot__step.is-active {
  color: #e8ecf8;
}
.hboot__step.is-done {
  color: #c7cfe6;
}
.hboot__mark {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  flex: none;
  position: relative;
  border: 1.6px solid #2a3355;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
}
.hboot__step.is-active .hboot__mark {
  border-color: #f59e0b;
  animation: hbootSpin 1s linear infinite;
  border-right-color: transparent;
}
.hboot__step.is-done .hboot__mark {
  background: #16a34a;
  border-color: #16a34a;
}
.hboot__step.is-done .hboot__mark::after {
  content: "";
  position: absolute;
  left: 5.4px;
  top: 2.6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}
@keyframes hbootSpin {
  to {
    transform: rotate(360deg);
  }
}
.hboot__label {
  flex: 1;
}
.hboot__count {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  min-width: 62px;
  text-align: right;
}
.hboot__step:not(.is-done):not(.is-active) .hboot__count {
  color: #5a648a;
  font-weight: 600;
}
.hboot__bar {
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
  margin: 0 auto;
  max-width: 420px;
}
.hboot__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #f59e0b, #8b5cf6 60%, #6366f1);
  transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.hboot__by {
  margin-top: 26px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: #4b5578;
  font-weight: 700;
}
@media (max-width: 560px) {
  .hboot__title {
    font-size: 30px;
  }
  .hboot__step {
    font-size: 13px;
    gap: 9px;
  }
}

/* ------------------------------- the veil ------------------------------ */
.hveil {
  position: fixed;
  inset: 0;
  z-index: 880;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(7px) saturate(1.1);
  -webkit-backdrop-filter: blur(7px) saturate(1.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.hveil.is-in {
  opacity: 1;
}
.hveil--dark {
  background: rgba(10, 14, 28, 0.72);
}
.hveil__card {
  text-align: center;
  font-family: var(--font, "Poppins", system-ui, sans-serif);
}
.hveil__mark {
  width: 132px;
  height: 132px;
  margin: 0 auto 6px;
  position: relative;
}
.hveil__mark canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.hveil__word {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.42em;
  color: var(--accent-brand);
  margin-bottom: 10px;
}
.hveil--dark .hveil__word {
  color: #fafafa;
}
.hveil__label {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 10px;
}
.hveil--dark .hveil__label {
  color: #d4d4d4;
}
.hveil__line {
  width: 200px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: rgba(91, 61, 245, 0.16);
  overflow: hidden;
}
.hveil__line i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: var(--accent-brand);
  animation: hveilSlide 1.25s ease-in-out infinite;
}
@keyframes hveilSlide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(360%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hveil__line i {
    animation: none;
    width: 60%;
  }
}

/* Ask Hiro — scoped workspace intelligence */
#hiroFab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 680;
  border: 0;
  border-radius: 999px;
  padding: 12px 17px;
  background: var(--accent-brand);
  color: var(--on-accent);
  font:
    800 13px/1 Lato,
    Arial,
    sans-serif;
  box-shadow: 0 14px 38px rgba(55, 36, 170, 0.34);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
#hiroFab .spark {
  font-size: 17px;
  color: #ffd166;
}
#hiroFab:hover {
  transform: translateY(-1px);
}
#hiroPanel {
  position: fixed;
  right: 22px;
  bottom: 76px;
  width: min(390px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 104px));
  z-index: 679;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 1px 1px, var(--hs-dot) 1px, transparent 1.35px)
      12px 12px/42px 42px,
    var(--hs-card);
  border: 1px solid rgba(91, 61, 245, 0.28);
  box-shadow: var(--hs-shadow-lg);
  color: var(--hs-ink);
}
#hiroPanel.open {
  display: flex;
}
.hiro-head {
  padding: 16px 17px 13px;
  border-bottom: 1px solid var(--hs-line);
  background: radial-gradient(
    circle at 80% 0,
    rgba(107, 82, 255, 0.26),
    transparent 54%
  );
}
.hiro-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: 16px;
}
.hiro-title .orb {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #7d6af7;
  color: #12152c;
}
.hiro-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--hs-ink-2);
  font-size: 20px;
  cursor: pointer;
}
.hiro-provider {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  color: var(--hs-ink-3);
  font-size: 11px;
}
.hiro-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6b7280;
}
.hiro-status-dot.active {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}
.hiro-status-dot.degraded {
  background: #f59e0b;
}
.hiro-status-dot.offline {
  background: #ef4444;
}
.hiro-scope {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hs-line);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hs-ink-3);
  font-size: 11px;
}
.hiro-scope select {
  flex: 1;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  border: 1px solid var(--hs-line);
  border-radius: 9px;
  padding: 7px 9px;
}
.hiro-threadbar {
  padding: 9px 14px;
  border-bottom: 1px solid var(--hs-line);
  display: flex;
  gap: 7px;
}
.hiro-threadbar select {
  min-width: 0;
  flex: 1;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  border: 1px solid var(--hs-line);
  border-radius: 9px;
  padding: 7px 9px;
}
.hiro-threadbar button {
  width: 34px;
  border: 1px solid var(--hs-line);
  border-radius: 9px;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  font-size: 18px;
  cursor: pointer;
}
.hiro-feed {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.hiro-welcome {
  padding: 13px;
  border-radius: 14px;
  background: rgba(126, 106, 247, 0.12);
  border: 1px solid rgba(126, 106, 247, 0.2);
  font-size: 13px;
  line-height: 1.5;
  color: var(--hs-ink-2);
}
.hiro-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.48;
}
.hiro-msg.user {
  align-self: flex-end;
  background: var(--accent-brand);
  color: var(--on-accent);
  border-bottom-right-radius: 5px;
}
.hiro-msg.assistant {
  align-self: flex-start;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  border: 1px solid var(--hs-line);
  border-bottom-left-radius: 5px;
}
.hiro-msg.error {
  border-color: var(--hs-red);
  color: var(--hs-red);
}
.hiro-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.hiro-cite {
  border: 1px solid var(--hs-line);
  background: var(--hs-canvas);
  color: var(--hs-ink-2);
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 10px;
  cursor: pointer;
}
.hiro-actions {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.hiro-action {
  padding: 9px;
  border: 1px solid var(--hs-line);
  border-radius: 11px;
  background: var(--hs-canvas);
}
.hiro-action-head {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--hs-ink-3);
}
.hiro-action-title {
  margin-top: 5px;
  font-weight: 800;
  color: var(--hs-ink);
}
.hiro-action-meta {
  margin-top: 3px;
  font-size: 10px;
  color: var(--hs-ink-3);
}
.hiro-action-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.hiro-action-buttons button {
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  padding: 6px 8px;
  font-size: 10px;
  cursor: pointer;
}
.hiro-action-buttons .confirm {
  background: #6f5ce5;
  border-color: var(--accent-brand);
}
.hiro-action-status {
  margin-left: auto;
  border-radius: 999px;
  padding: 3px 6px;
  background: var(--hs-violet-soft);
  color: var(--hs-violet);
}
.hiro-starters {
  display: flex;
  gap: 6px;
  overflow: auto;
  padding: 0 14px 10px;
}
.hiro-starters button {
  white-space: nowrap;
  border: 1px solid var(--hs-line);
  background: var(--hs-canvas);
  color: var(--hs-ink-2);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 10px;
  cursor: pointer;
}
.hiro-compose {
  padding: 11px;
  border-top: 1px solid var(--hs-line);
  display: flex;
  gap: 8px;
  background: var(--hs-card);
}
.hiro-compose textarea {
  min-height: 42px;
  max-height: 100px;
  resize: none;
  flex: 1;
  border: 1px solid var(--hs-line);
  border-radius: 12px;
  background: var(--hs-canvas);
  color: var(--hs-ink);
  padding: 10px 11px;
  font:
    13px Lato,
    Arial,
    sans-serif;
}
.hiro-send {
  width: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-brand);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.hiro-send:disabled {
  opacity: 0.45;
}
@media (max-width: 640px) {
  #hiroFab {
    right: 13px;
    bottom: 13px;
  }
  #hiroPanel {
    right: 7px;
    bottom: 66px;
    width: calc(100vw - 14px);
    height: min(640px, calc(100vh - 76px));
    border-radius: 17px;
  }
}

/* Operations Brief + work system */
.brief-wrap {
  padding: 20px 24px 80px;
  overflow: auto;
}
.brief-hero {
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(135deg, #141936, #242054);
  color: #fff;
  box-shadow: 0 18px 50px rgba(39, 31, 112, 0.18);
}
.brief-eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #b9b0ff;
}
.brief-headline {
  font-size: 26px;
  font-weight: 900;
  margin: 7px 0;
}
.brief-meta {
  color: #aeb5d2;
  font-size: 12px;
}
.brief-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: 9px;
  margin: 14px 0;
}
.brief-kpi {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-1);
}
.brief-kpi b {
  display: block;
  font-size: 22px;
}
.brief-kpi span {
  font-size: 11px;
  color: var(--fg-3);
}
.brief-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}
.brief-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-1);
  overflow: hidden;
}
.brief-section h3 {
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.brief-list {
  padding: 8px;
}
.brief-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}
.brief-item:hover {
  background: var(--bg-2);
}
.brief-item .bi-main {
  min-width: 0;
  flex: 1;
}
.brief-item .bi-title {
  font-weight: 800;
}
.brief-item .bi-detail {
  font-size: 12px;
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sev {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  background: #94a3b8;
}
.sev.HIGH {
  background: #f59e0b;
}
.sev.URGENT {
  background: #ef4444;
}
.brief-empty {
  padding: 18px;
  color: var(--fg-3);
  font-size: 12px;
}
.work-kind {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--bg-3);
  color: var(--fg-2);
}
.work-kind.incident {
  background: color-mix(in srgb, var(--red) 12%, var(--bg));
  color: var(--red);
}
.activity-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  overflow: auto;
}
.activity-tabs button {
  border: 1px solid var(--border);
  background: var(--bg-1);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}
.activity-tabs button.active {
  background: var(--accent-brand);
  color: #fff;
  border-color: var(--accent-brand);
}
.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.ai-provider {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  background: var(--bg-1);
}
.ai-provider.active {
  border-color: var(--accent-brand);
  box-shadow: 0 0 0 2px rgba(120, 101, 239, 0.12);
}
.ai-provider.off {
  opacity: 0.58;
}
.ai-provider .model {
  font-size: 11px;
  color: var(--fg-3);
  margin: 4px 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.email-template-hero {
  padding: 18px;
  border-radius: 16px;
  background: var(--accent-brand);
  color: #fff;
  margin-bottom: 14px;
}
.email-template-hero h3 {
  margin: 0 0 5px;
  font-size: 20px;
}
.email-template-hero p {
  margin: 0;
  color: #c9c8e7;
  font-size: 12px;
}
.email-template-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}
.email-template-summary .card {
  padding: 12px;
}
.email-template-summary b {
  display: block;
  font-size: 21px;
}
.email-template-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
}
.email-template-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 22px;
  height: 100%;
}
.email-template-form {
  min-width: 0;
  overflow: auto;
  padding-right: 3px;
}
.email-template-preview {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.email-preview-frame {
  width: 100%;
  min-height: 580px;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #eef1f7;
}
.email-variable-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.email-variable-list button {
  font: 12px var(--mono);
  color: var(--accent-brand);
  background: #f3f0ff;
  border: 1px solid #d9d2ff;
  border-radius: 999px;
  padding: 5px 9px;
  cursor: pointer;
}
.email-fields-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 900px) {
  .brief-kpis {
    grid-template-columns: repeat(3, 1fr);
  }
  .brief-grid {
    grid-template-columns: 1fr;
  }
  .brief-wrap {
    padding: 14px 12px 80px;
  }
}
@media (max-width: 520px) {
  .brief-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .brief-headline {
    font-size: 21px;
  }
}
@media (max-width: 900px) {
  .email-template-editor {
    grid-template-columns: 1fr;
    height: auto;
  }
  .email-template-form {
    overflow: visible;
  }
  .email-preview-frame {
    min-height: 520px;
  }
  .email-fields-2 {
    grid-template-columns: 1fr;
  }
}

/* Operations Inbox */
.ops-tabs {
  display: flex;
  gap: 7px;
  margin: 16px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.ops-tabs::-webkit-scrollbar {
  display: none;
}
.ops-tab {
  flex: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg-2);
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.ops-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.ops-queue {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  margin-bottom: 18px;
}
.ops-queue > header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}
.ops-queue > header h3 {
  margin: 0;
  font-size: 14px;
}
.ops-queue > header span {
  margin-left: auto;
  color: var(--fg-3);
  font-size: 11px;
}
.ops-queue-list {
  padding: 8px;
}
.ops-queue-list .tk-card:last-child {
  margin-bottom: 0;
}

/* Mobile is a first-class shell, not a compressed desktop. */
.mobile-scrim {
  display: none;
}
@media (max-width: 820px) {
  html,
  body,
  #app {
    height: 100dvh;
    min-height: 100dvh;
  }
  body {
    overscroll-behavior: none;
  }

  .body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
    min-width: 0;
  }
  .rail {
    display: flex !important;
    position: fixed;
    z-index: 85;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(62px + env(safe-area-inset-bottom));
    padding: 4px max(4px, env(safe-area-inset-left)) env(safe-area-inset-bottom)
      max(4px, env(safe-area-inset-right));
    flex-direction: row;
    align-items: flex-start;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 26px rgba(4, 6, 20, 0.18);
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  .rail .ws-switch,
  .rail > .rail-spacer,
  .rail > [data-new] {
    display: none !important;
  }

  .sidebar {
    top: calc(44px + env(safe-area-inset-top));
    bottom: calc(62px + env(safe-area-inset-bottom));
    width: min(86vw, 340px);
    max-width: none;
  }
  .mobile-scrim {
    display: block;
    position: fixed;
    z-index: 84;
    inset: calc(44px + env(safe-area-inset-top)) 0
      calc(62px + env(safe-area-inset-bottom));
    border: 0;
    background: rgba(4, 6, 20, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .mobile-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }
  .main {
    min-width: 0;
    width: 100%;
  }
  .chan-head {
    height: auto;
    min-height: 50px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    padding: 7px 10px;
    gap: 5px;
    overflow: visible;
  }
  .ch-title {
    flex: 1 1 150px;
    min-width: 0;
    max-width: none;
    height: 34px;
    padding: 5px 4px;
    font-size: 16px;
  }
  .ch-tabs {
    display: flex;
    order: 3;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding-top: 1px;
  }
  .ch-tabs::-webkit-scrollbar {
    display: none;
  }
  .ch-tab {
    flex: none;
    min-height: 34px;
    padding: 7px 11px;
  }
  .head-right {
    flex: 0 1 auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .head-right::-webkit-scrollbar {
    display: none;
  }
  .hbtn {
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    white-space: nowrap;
  }
  .facepile {
    display: none;
  }
  .msgs {
    padding-top: 10px;
    padding-bottom: 8px;
    scroll-padding-bottom: 140px;
  }
  /* The toolbar docks under the bubble (below), so a row makes room for
     it only while its toolbar is open. Reserving the 36px on every row
     left a band of empty space under each message. */
  .msg {
    padding: 6px 10px;
    gap: 8px;
  }
  .msg.acts-open {
    padding-bottom: 54px;
  }
  .msg .content {
    min-width: 0;
  }
  .msg .text,
  .msg .text p {
    overflow-wrap: anywhere;
  }
  /* Docked at the bottom of the row rather than floating above it.
     No `display` here on purpose: this used to force flex, because
     there is no hover on touch and the toolbar would otherwise never
     appear. A long press opens it now (.acts-open), so forcing it on
     would put a toolbar under every single message again. */
  .msg-tools {
    top: auto;
    right: 8px;
    bottom: 3px;
    padding: 1px;
    box-shadow: none;
    background: var(--bg-2);
  }
  .msg-tools [data-quickrx],
  .msg-tools [data-act="react"] {
    display: none;
  }
  .mt-btn {
    width: 36px;
    height: 30px;
  }
  .composer-wrap {
    padding: 0 8px 8px;
  }
  .composer {
    border-radius: 11px;
  }
  .fmt-btn {
    width: 36px;
    min-width: 36px;
    height: 34px;
  }
  .cmp-input {
    min-height: 50px;
    max-height: 34dvh;
    padding: 11px;
    font-size: 16px;
  }
  .cmp-bar {
    min-height: 45px;
    padding: 5px 6px;
  }
  .cmp-send {
    height: 36px;
    min-width: 44px;
    justify-content: center;
  }

  .typing {
    padding-left: 14px;
  }
  .ac {
    left: 0;
    right: 0;
    max-width: none;
  }
  .rpane {
    inset: calc(44px + env(safe-area-inset-top)) 0
      calc(62px + env(safe-area-inset-bottom)) 0;
  }
  .rp-head {
    min-height: 52px;
    height: auto;
  }
  .scrim {
    padding: 0;
    align-items: stretch;
  }
  /* A yes/no question is two lines and two buttons. Stretched to full height
     like the other dialogs it read as an empty screen with the buttons far
     below, so on phones it sits at the bottom as a short sheet instead. */
  .scrim:has(.modal.confirm) {
    align-items: flex-end;
  }
  .modal.confirm {
    height: auto;
    border-radius: 16px 16px 0 0;
  }
  .modal.confirm .m-body:empty {
    display: none;
  }
  /* Every dialog is a sheet from the bottom, as tall as what it holds —
     stretched to the full screen, a short one (Share location, a recording)
     was a small card in a sea of white. Long forms still grow to near the
     top and scroll. The photo/file viewer and the forward sheet set their
     own full-screen size. */
  .scrim {
    align-items: flex-end;
  }
  .modal {
    width: 100vw !important;
    height: auto;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .m-head {
    padding: 15px 16px;
  }
  .m-body {
    padding: 14px 16px;
  }
  .m-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .m-foot .btn {
    min-height: 42px;
  }
  .tbl {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
  .tk-bar {
    padding: 9px 10px;
    gap: 8px;
    flex-wrap: wrap;
  }
  .tk-bar .input.sm,
  .tk-bar #tkQuery {
    height: 38px;
    width: 100%;
    flex: 1 1 145px;
  }
  .tk-bar > label {
    min-height: 38px;
  }
  .tk-body {
    padding: 12px 10px 90px;
  }

  .tk-card {
    padding: 12px;
    margin-bottom: 9px;
  }
  .tk-check {
    width: 24px;
    height: 24px;
  }
  .tk-meta {
    margin-left: 32px;
  }

  .cal-grid {
    width: 1008px;
    min-width: 1008px;
    grid-template-columns: repeat(7, 144px);
    grid-template-rows: 34px repeat(6, 104px);
  }
  .cal-cell {
    height: 104px;
  }
  .doc-head {
    padding: 10px 12px 7px;
  }
  .doc-title {
    font-size: 20px;
    min-width: 0;
  }
  .doc-tools {
    padding: 0 10px 7px;
    overflow-x: auto;
  }
  .doc-page {
    padding: 16px 14px 90px;
    font-size: 16px;
  }
  .wb {
    min-height: 0;
    touch-action: pan-x pan-y;
  }
  .wb-note {
    width: min(186px, 72vw);
  }
  .wb-colors {
    opacity: 1;
  }
  .wb-colors span {
    width: 20px;
    height: 20px;
  }
  .wb-rm {
    width: 28px;
    height: 28px;
  }
  .wb-size {
    width: 26px;
    height: 26px;
    opacity: 0.8;
  }
  #adBody {
    overflow-x: auto;
  }
  .ai-provider-grid {
    grid-template-columns: 1fr;
  }
  .card {
    max-width: 100%;
  }
  .searchbox {
    width: 100%;
    min-width: 0;
  }
  .sk-list {
    grid-template-columns: 1fr;
  }
  .brief-wrap {
    padding: 12px 10px 90px;
  }
  .brief-hero {
    padding: 17px;
  }
  .brief-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brief-kpi {
    padding: 10px;
  }
  .brief-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .huddle-stage {
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 126px);
    overflow: auto;
  }
  /* The fab floats bottom-right, which on a phone is exactly where the
     composer's Send button sits. Clear the bottom rail (62px), then the
     composer itself — its height is published as --composer-h because it
     grows with what you type, so no fixed offset can stay out of the way.
     No composer on screen (admin, tasks) and the var is 0, which lands the
     fab back where it always was. */
  #hiroFab {
    bottom: calc(
      62px + var(--composer-h, 10px) + 10px + env(safe-area-inset-bottom)
    );
    right: max(10px, env(safe-area-inset-right));
    padding: 11px 13px;
  }
  #hiroPanel {
    right: 6px;
    bottom: calc(124px + env(safe-area-inset-bottom));
    width: calc(100vw - 12px);
    height: calc(100dvh - 180px - env(safe-area-inset-top));
    max-height: none;
  }
  .toasts {
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }
  .toast {
    max-width: 100%;
    font-size: 13px;
  }
}
@media (max-width: 430px) {

  .brief-headline {
    font-size: 20px;
  }
  .brief-kpi b {
    font-size: 19px;
  }
  .si-code {
    gap: 5px;
  }
  .si-code .input {
    width: calc((100vw - 72px) / 6);
    max-width: 46px;
  }

}

/* Calls are a contained viewport, never a document-sized scrolling surface. */
html.huddle-open,
html.huddle-open body {
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;
}
#huddleStage.active {
  position: fixed;
  inset: 0;
  z-index: 720;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}
#huddleStage.active .huddle-stage {
  position: absolute;
  inset: max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  overflow: hidden;
  pointer-events: auto;
  grid-template-rows: minmax(58px, auto) minmax(0, 1fr) minmax(72px, auto);
}
#huddleStage.active .hs-body {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
/* Tiles in pages of four (2×2) with ‹ › arrows and dots — see pageLineup in
   meeting-recorder.js. The pager holds the grid, the arrows and the dots. */
#huddleStage.active .hs-pager,
.huddle-stage .hs-pager {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}
/* ‹ › — a frosted disc that sits lightly on the dark stage: chevrons, not
   arrows; centred on the tiles (not on tiles + dots); quiet until the
   pointer is over the call, then full strength. At either end the arrow
   that leads nowhere is not shown at all rather than drawn greyed out. */
.huddle-stage .hs-page {
  position: absolute;
  top: calc((100% - 26px) / 2);
  transform: translateY(-50%);
  z-index: 4;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  color: #f4f6fb;
  cursor: pointer;
  opacity: 0.72;
  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}
.huddle-stage .hs-page svg {
  display: block;
}
.huddle-stage .hs-page.prev {
  left: 8px;
}
.huddle-stage .hs-page.next {
  right: 8px;
}
.huddle-stage .hs-page[hidden] {
  display: none;
}
.huddle-stage .hs-page:disabled {
  visibility: hidden;
}
.huddle-stage .hs-pager:hover .hs-page {
  opacity: 1;
}
.huddle-stage .hs-page:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%) scale(1.06);
}
.huddle-stage .hs-page:active {
  transform: translateY(-50%) scale(0.96);
}
.huddle-stage .hs-page:focus-visible {
  outline: 2px solid #8ab4ff;
  outline-offset: 2px;
  opacity: 1;
}
/* Arrows sit in the grid's side gutters, never over a tile. */
.huddle-stage.paged .hs-grid {
  padding-left: 58px !important;
  padding-right: 58px !important;
}
/* The current page is a short pill; the others are small dots. */
.huddle-stage .hs-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0;
}
.huddle-stage .hs-dots[hidden] {
  display: none;
}
.huddle-stage .hs-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}
.huddle-stage .hs-dot:hover {
  background: rgba(255, 255, 255, 0.55);
}
.huddle-stage .hs-dot.on {
  width: 18px;
  background: #f4f6fb;
}
.huddle-stage .hs-dots-label {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(244, 246, 251, 0.55);
  font-variant-numeric: tabular-nums;
}
/* Swipe on the grid; vertical scrolling of the page stays with the browser. */
.huddle-stage .hs-grid {
  touch-action: pan-y;
}
.huddle-stage .hs-grid.slide-next {
  animation: hs-slide-next 0.18s ease-out;
}
.huddle-stage .hs-grid.slide-prev {
  animation: hs-slide-prev 0.18s ease-out;
}
@keyframes hs-slide-next {
  from {
    transform: translateX(24px);
    opacity: 0.4;
  }
}
@keyframes hs-slide-prev {
  from {
    transform: translateX(-24px);
    opacity: 0.4;
  }
}
@media (max-width: 900px) {
  /* On a phone the arrows shrink and the gutters with them; swipe is the
     main way across. */
  .huddle-stage .hs-page {
    width: 32px;
    height: 32px;
    opacity: 0.85;
  }
  .huddle-stage .hs-page svg {
    width: 17px;
    height: 17px;
  }
  .huddle-stage .hs-page.prev {
    left: 4px;
  }
  .huddle-stage .hs-page.next {
    right: 4px;
  }
  .huddle-stage.paged .hs-grid {
    padding-left: 42px !important;
    padding-right: 42px !important;
  }
}
#huddleStage.active .hs-grid {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: repeat(var(--hs-cols, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--hs-rows, 1), minmax(0, 1fr));
  grid-auto-columns: unset;
  grid-auto-rows: unset;
  align-items: stretch;
}
#huddleStage.active .hs-grid .hz {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
#huddleStage.active .hs-grid .hz video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
#huddleStage.active .hs-side,
#huddleStage.active .hs-roster {
  min-height: 0;
  overflow: hidden;
}
#huddleStage.active .hs-roster {
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (max-width: 900px) {
  #huddleStage.active .huddle-stage {
    inset: env(safe-area-inset-top) env(safe-area-inset-right)
      env(safe-area-inset-bottom) env(safe-area-inset-left);
    border-radius: 0;
  }
  #huddleStage.active .hs-body {
    grid-template-columns: minmax(0, 1fr);
  }
  #huddleStage.active .hs-side {
    display: none;
  }
  #huddleStage.active .hs-grid {
    padding: 8px;
    gap: 8px;
  }
}
@media (max-width: 560px) {
  #huddleStage.active .huddle-stage {
    grid-template-rows: minmax(50px, auto) minmax(0, 1fr) minmax(66px, auto);
  }
  #huddleStage.active .hs-title {
    min-height: 50px;
    padding: 7px 10px;
  }
  #huddleStage.active .hs-brand {
    width: 34px;
    height: 34px;
  }
  #huddleStage.active .hs-title-copy small {
    display: none;
  }
  #huddleStage.active .hs-bar {
    min-height: 66px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 7px max(8px, env(safe-area-inset-right))
      calc(7px + env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left));
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  #huddleStage.active .hs-bar::-webkit-scrollbar {
    display: none;
  }
  #huddleStage.active .hs-control {
    min-width: 54px;
    flex: 0 0 54px;
    gap: 3px;
    font-size: 9px;
  }
  #huddleStage.active .hs-control .ic {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }
  #huddleStage.active .hs-control.leave {
    min-width: 76px;
    flex-basis: 76px;
  }
  #huddleStage.active .hs-control.leave .ic {
    min-width: 70px;
    padding: 0 10px;
  }
}
/* On a phone the bar scrolled sideways with its scrollbar hidden, and Leave —
   its last control — started past the right edge with nothing to say it was
   there. Pinning Leave covered Record instead. Share the width out: every
   control shrinks to fit, so all of them are on screen at once. */
@media (max-width: 480px) {
  body.hs #huddleStage.active .hs-bar,
  #huddleStage.active .hs-bar {
    gap: 2px;
    overflow-x: hidden;
  }
  body.hs #huddleStage.active .hs-bar .hs-control,
  #huddleStage.active .hs-control {
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
    line-height: 1.15;
  }
  body.hs #huddleStage.active .hs-bar .hs-control .ic,
  #huddleStage.active .hs-control .ic {
    width: 36px;
    height: 36px;
  }
  body.hs #huddleStage.active .hs-bar .hs-control.leave,
  #huddleStage.active .hs-control.leave {
    min-width: 0;
    flex: 1.5 1 0;
  }
  body.hs #huddleStage.active .hs-bar .hs-control.leave .ic,
  #huddleStage.active .hs-control.leave .ic {
    min-width: 0;
    width: 100%;
    padding: 0 4px;
  }
  /* Seven labelled controls do not fit a phone: at 375px each got ~47px
     and the labels ran into one another ("Mute micCamera off"). Icons
     only, as on any phone's call screen, with the label kept for screen
     readers. Each icon is a 44px touch target that shrinks to its share
     on a narrower phone; Leave stays a wider red pill. */
  body.hs #huddleStage.active .hs-bar,
  #huddleStage.active .hs-bar {
    box-sizing: border-box;
    width: 100%;
    min-height: 60px;
    gap: 6px;
    justify-content: space-between;
  }
  body.hs #huddleStage.active .hs-bar .hs-control,
  #huddleStage.active .hs-control {
    padding: 0;
  }
  body.hs #huddleStage.active .hs-bar .hs-control > .ic + span,
  #huddleStage.active .hs-control > .ic + span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  body.hs #huddleStage.active .hs-bar .hs-control .ic,
  #huddleStage.active .hs-control .ic {
    width: 100%;
    max-width: 44px;
    height: auto;
    aspect-ratio: 1;
    border-radius: 50%;
  }
  body.hs #huddleStage.active .hs-bar .hs-control.leave .ic,
  #huddleStage.active .hs-control.leave .ic {
    max-width: 76px;
    aspect-ratio: auto;
    height: 44px;
    border-radius: 999px;
    font-size: 15px;
  }
}

@media (max-width: 640px) {

  body.hs #topSearch {
    padding: 0 10px;
  }
  body.hs #topSearch svg {
    flex: 0 0 auto;
  }
  body.hs #adBody [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  body.hs #adBody {
    padding: 14px 12px !important;
  }

}

/* The updated prototype shell is authoritative: chrome consumes its natural
   height and the workspace card owns the remaining viewport. */
html,
body.hs {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body.hs .tk-body,
body.hs .doc-body,
body.hs .view-body,
body.hs .msgs,
body.hs .sb-scroll,
body.hs .list-scroll {
  overscroll-behavior: contain;
}
@media (max-width: 1000px) {
  body.hs {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body.hs #app > .hs-wrap {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }
  body.hs #app > .hs-wrap:first-child {
    flex: 0 0 auto;
    overflow: hidden;
  }
  body.hs .hs-top {
    width: 100%;
    min-width: 0;
    gap: 9px;
    padding: 12px 2px 9px;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  body.hs .hs-top > * {
    min-width: 0;
  }
  body.hs .hs-brand {
    width: auto;
    height: auto;
    min-width: max-content;
    overflow: visible;
    align-items: baseline;
  }
  body.hs .hs-prod,
  body.hs #hsOut {
    display: none;
  }
  body.hs #topSearch {
    min-width: 0 !important;
    max-width: none;
    margin: 0 0 0 auto !important;
    flex: 1 1 auto;
    overflow: hidden;
  }
  body.hs #topSearch .ph {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.hs #skKey {
    display: none;
  }
  /* The left rail is desktop only. Here the body wrap drops its two-column
     grid and stacks, which puts the four children back in source order —
     rail, subline, secondary tabs, body — the exact layout this had before
     the rail moved. The rail and its items go back to being a horizontal
     strip below. */
  body.hs .hs-body-wrap {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 0 10px calc(10px + env(safe-area-inset-bottom));
    overflow: hidden;
    display: flex;
    flex-direction: column;
    column-gap: 0;
  }
  body.hs .hs-nav {
    flex: 0 0 auto;
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  body.hs .hs-tab {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0;
    font-size: 14px;
    padding: 9px 15px;
    line-height: 1;
  }
  body.hs .hs-tab .n {
    position: static;
    margin-left: 7px;
  }
  body.hs .hs-glyph {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    margin-right: 8px;
  }
  body.hs .hs-nav .hs-startup-tab {
    width: 112px;
    height: 38px;
  }
  body.hs .body {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding-bottom: 0;
    border-radius: var(--hs-r);
    overflow: hidden;
  }
  body.hs .workspace,
  body.hs .main,
  body.hs .msgs-wrap {
    width: 100%;
    min-width: 0;
    min-height: 0;
  }
  body.hs .main {
    border-radius: var(--hs-r);
  }
  body.hs .sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(80vw, 288px);
    max-width: none;
    height: auto;
    flex-basis: auto;
    z-index: 100;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    border-radius: var(--hs-r) 0 0 var(--hs-r);
    box-shadow: 16px 0 40px rgba(9, 12, 25, 0.2);
  }
  body.hs .sidebar.open {
    transform: translateX(0);
  }
  body.hs.sidebar-collapsed .sidebar {
    width: min(80vw, 288px);
    overflow: visible;
  }
  body.hs .mobile-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 99;
    border: 0;
    background: rgba(9, 12, 25, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  body.hs .mobile-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }
  body.hs .rpane {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    flex-basis: auto !important;
    z-index: 105;
    border-radius: var(--hs-r);
  }
  body.hs .chan-head {
    padding-left: 10px;
    padding-right: 10px;
  }
  body.hs .msgs {
    min-width: 0;
    min-height: 0;
  }
  body.hs #hiroFab.hs-ask {
    bottom: calc(18px + env(safe-area-inset-bottom));
    right: 16px;
  }
}
@media (max-width: 760px) {
  body.hs .hs-cercle-logo {
    width: 96px;
  }
  body.hs .hs-top {
    gap: 8px;
    padding: 10px 2px 8px;
  }
  body.hs .hs-icon-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
  body.hs #topSearch {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 0;
    display: grid;
    place-items: center;
  }
  body.hs #topSearch .ph,
  body.hs #topSearch > span {
    display: none;
  }
  body.hs #topSearch svg {
    display: block;
    width: 17px;
    height: 17px;
  }
  body.hs .hs-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  body.hs .hs-nav {
    width: 100%;
    min-width: 0;
    padding: 5px;
    gap: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.hs .hs-tab {
    flex: 0 0 auto;
    padding: 7px 10px;
    font-size: 12.5px;
  }
  body.hs .hs-glyph {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: -5px;
  }
  body.hs .hs-sub {
    display: none;
  }
  body.hs .hs-subtabs {
    min-height: 42px;
    margin: 0;
    padding: 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  body.hs .hs-subtab {
    flex: 0 0 auto;
    padding: 10px 11px 8px;
    font-size: 12.5px;
  }
}
@media (max-width: 430px) {
  body.hs .hs-top {
    gap: 6px;
  }
  body.hs .hs-tab {
    padding: 7px 9px;
  }
  body.hs .hs-body-wrap {
    padding-top: 7px;
  }
}

/* Views that are not about a single conversation hide the channel list
   entirely — see SIDEBAR_VIEWS in 02-sidebar.js, which sets this class.
   display:none rather than the `sidebar-collapsed` width:0 trick, because
   this must also suppress the mobile drawer (position:absolute + transform),
   which a zero width would leave openable. The drawer's toggle and scrim go
   with it, so there is nothing left to open. */
body.hs.hs-no-sidebar .sidebar,
body.hs.hs-no-sidebar #mobileScrim,
body.hs.hs-no-sidebar #btnMenu {
  display: none;
}
/* ======================= mobile shell (phones) =======================

   The phone layout is a different shape from the desktop one, not a
   narrower version of it. Desktop is two panes side by side with a
   primary nav strip across the top; a phone gets ONE pane at a time
   plus a fixed bottom bar, the way every native chat app on the
   platform behaves.

   Breakpoint is 820px and it owns everything below it. The older
   drawer layer at max-width:1000px (16-hiro-boot-intro-and-veil.css)
   still governs 821-1000px, where a two-pane split is still useful —
   this file only has to beat it below 820, which it does on source
   order plus the same body.hs specificity.

   Three body classes drive it, all set in render():
     hs-no-sidebar   a view that is not about one conversation
     hs-m-detail     conv view WITH a conversation open
     hs-hiro-open    the Hiro panel is the screen
     hs-m-chat       a conversation is open (no app top bar on a phone)

   The markup this styles is never removed, only hidden: the CI
   interface contract asserts .hs-nav and #hiroFab exist in the
   generated HTML, so both stay in the DOM and go display:none here. */

/* Defaults first: hide the phone-only chrome everywhere, then let the
   820px block below switch it back on. Order matters — these selectors
   carry the same specificity as the ones inside the media query, so
   whichever comes last wins, and a trailing reset would keep the bottom
   bar hidden on phones too.

   .sb-lines is display:contents rather than hidden: the desktop row then
   lays out as the flat flex line it always was, with the extra wrapper
   invisible to the layout. */
.sb-row .sb-lines {
  display: contents;
}
.sb-row .sb-prev,
.sb-row .sb-when {
  display: none;
}
#mnav,
#mSheet,
#mSheetScrim,
.hs-m-title,
.chan-head .ch-back {
  display: none;
}

/* Hiro's one entry point, at every width: the orb in the top bar beside
   the search. The floating #hiroFab it replaces stays in the DOM — the
   CI interface contract asserts that id exists in the generated HTML —
   but nothing shows it any more. */
#hiroFab {
  display: none !important;
}
/* A labelled pill, not an icon button: "Ask Hiro" then the orb, reading
   left to right into the mark. It keeps .hs-icon-btn for the hover and
   focus behaviour it shares with its neighbours, so the fixed 38px
   square that class sets has to be undone here. */
body.hs #btnHiroTop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 38px;
  border: 1px solid var(--hs-line);
  background: var(--hs-card);
  border-radius: 999px;
  padding: 0 5px 0 13px;
  flex: 0 0 auto;
  cursor: pointer;
}
body.hs #btnHiroTop:hover {
  border-color: var(--hs-violet);
}
body.hs #btnHiroTop .hs-hiro-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--hs-ink);
  white-space: nowrap;
}
/* The search and Hiro are centred as a PAIR: one auto margin on the
   outside of each splits the free space around both. These were inline
   on #topSearch as `margin: 0 auto`, which centred the search by itself
   and, with an auto on its right too, shoved Hiro to the far edge of
   the bar — 650px from the control it belongs beside. Moved into CSS so
   the phone layer below can switch them off. */
body.hs #topSearch {
  min-width: 300px;
  margin-left: auto;
}
body.hs #btnHiroTop {
  margin-right: auto;
}
/* The phone reaches Activity from its bottom bar, so the top-bar bell would
   be a second control for the same destination. Desktop has no bottom bar,
   which is where the bell earns its place. */
@media (max-width: 820px) {
  body.hs #hsBell {
    display: none;
  }
}
body.hs #btnHiroTop .orb {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--bg);
  font-size: 15px;
  line-height: 1;
  background: var(--fg);
}

/* ===================== touch: no hover states =======================

   A touch screen has no hover to give. What it does instead is leave
   :hover applied to whatever you tapped last, until you tap something
   else — so a rule meant as a passing highlight becomes a permanent one
   on an arbitrary row, and anything revealed on hover (the + on a
   section header) either never appears or appears stuck.

   The condition is an OR on purpose. (hover: none) is the accurate
   test and catches a touch tablet at any width; max-width covers a
   narrow window, and keeps this consistent with the phone layer below
   rather than having two different ideas of "mobile" in one file.

   Two things follow. Passing highlights are switched off, since there
   is no pointer to acknowledge. Things hover was hiding are simply
   shown: there is room, and an affordance you cannot discover is worse
   than one that is always there. */
@media (hover: none), (max-width: 820px) {
  /* The :not() guards matter. These rules come after every stylesheet
     that paints a resting background, so a bare `background:
     transparent` would also strip the ones that are state rather than
     hover feedback — the open conversation, the violet primary button,
     a mention highlight. Excluding them here beats restating their
     colours, which would then have to be kept in sync by hand. */
  .sb-title:hover,
  .sb-icon:not(.filled):not(.is-on):hover,
  .sb-row:not(.active):hover,
  .sb-sec-head:hover,
  .msg:not(.unread-hl):hover {
    background: transparent;
  }
}

@media (max-width: 820px) {
  /* ---- the desktop primary nav strip is replaced, not shrunk ---- */
  body.hs .hs-nav,
  body.hs #hiroFab,
  body.hs #btnMenu,
  body.hs #mobileScrim {
    display: none !important;
  }

  /* ---- top bar: brand out, screen title in ---- */
  body.hs .hs-brand {
    display: none;
  }
  body.hs .hs-m-title {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--hs-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Back sits in the channel header, immediately left of the name, so
     it belongs to the conversation it leaves rather than to the app
     chrome above it. -8px pulls it back against the header's own
     padding so the name keeps its usual left edge. */
  body.hs .chan-head .ch-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: -8px;
    flex-shrink: 0;
    border: 0;
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--hs-ink);
    -webkit-tap-highlight-color: transparent;
  }
  body.hs .chan-head .ch-back svg {
    width: 21px;
    height: 21px;
  }
  /* Only the sizes differ on a phone — the orb's look, and the button's
     stripped chrome, come from the shared rule above. Sized explicitly
     rather than inherited from the skeleton's pointer:coarse block,
     which only fires on a touch device: on a narrow non-touch window
     the button stayed 38px while the orb still asked for more, and as a
     shrinkable flex item the orb came out 38 wide by 44 tall — an oval. */
  /* Back to a bare orb on a phone: there is no room for a label beside
     the title, the search and the avatar, and the mark carries the
     meaning on its own. The pill chrome from the shared rule comes off
     with it. */
  body.hs #btnHiroTop .hs-hiro-label {
    display: none;
  }
  body.hs #btnHiroTop {
    width: 44px;
    height: 44px;
    min-width: 44px;
    gap: 0;
    padding: 0;
    border: 0;
    background: none;
    /* No centring here: the title takes the free space, so the controls
       simply sit at the end of the row. */
    margin-right: 0;
  }
  body.hs #btnHiroTop .orb {
    width: 30px;
    height: 30px;
    font-size: 19px;
  }
  /* The three controls are the same 44px box, but the glyphs inside
     were not: a 14px spark, a 17px magnifier and a 42px avatar photo
     read as three different sizes however equal the boxes are. The
     line icons go up to 20px, which is the weight that sits level
     with a filled circle beside it. */
  body.hs #topSearch svg {
    width: 20px;
    height: 20px;
  }
  /* The search pill collapses to an icon here; its desktop centring
     (margin:0 auto, min-width:300px) would otherwise fight the title
     for the row. */
  body.hs #topSearch {
    margin: 0;
    min-width: 0;
    flex: 0 0 auto;
  }
  /* #topSearch carries .hs-pill--focus: a violet border plus a 3px
     ring, applied permanently rather than on :focus. At 300px wide on
     desktop that marks the search field as the prominent control of
     the bar. Collapsed to a 38px circle it just looks stuck in focus,
     and next to two plain circles it reads as an error state. */
  body.hs #topSearch.hs-pill--focus {
    border-color: var(--hs-line);
    box-shadow: none;
  }
  /* And then no circle at all. Hiro's orb and the avatar are things —
     a brand mark and a face — so they are painted. Search is an action,
     like the filter and search icons in the list header right below,
     and those are bare glyphs. Keeping a filled 44px disc here made it
     the heaviest element in the bar while carrying the least. */
  body.hs #topSearch {
    background: none;
    border: 0;
  }
  /* The bar is three circles in a row, so they have to agree — and
     they did not. The pointer:coarse block in the skeleton lifts
     .hs-icon-btn to 44x44 for touch, but #topSearch is a .hs-pill, so
     it only gained the height (38x44), and .hs-avatar is in neither
     list, so the 760px tier left it at 32. Three different sizes.
     44px is the touch target the rest of the app already uses, so
     everything here is squared off at that. */
  body.hs #topSearch,
  body.hs .hs-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    /* Same reason as the orb: these are circles, so they must not take
       their width from whatever the title leaves behind. */
    flex: 0 0 auto;
  }
  /* Same treatment as the orb: the box stays a 44px tap target, but
     what is painted is a 32px circle, so the avatar carries about as
     much ink as a line icon rather than dominating the bar.
     The border moves to the image for the same reason, and overflow
     goes visible because the presence dot's 2px card-coloured ring
     only makes sense if the dot may sit ON the edge — clipping the box
     to a circle was cutting 6px off it. */
  body.hs .hs-avatar {
    overflow: visible;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
  }
  body.hs .hs-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--hs-line);
  }
  /* Re-anchored: the dot used to hug a 44px box, but the circle it
     belongs to is now the 32px image centred inside it. */
  body.hs .hs-avatar .dot {
    right: 5px;
    bottom: 5px;
  }
  body.hs .hs-top {
    gap: 6px;
  }

  /* ---- full bleed --------------------------------------------------
     On desktop the workspace is a card: 10px gutters, a 14px radius, a
     hairline border and a shadow, floating on the dotted page. That
     reads as "a surface among others", which is right when a browser
     window surrounds it.

     On a phone the card IS the window. The gutters waste 20px of the
     only 375 there are, the radius clips content against a background
     nobody can see, and the shadow implies a depth that has nothing to
     sit behind it. So the content area runs edge to edge and the page
     texture never shows. */
  body.hs #app > .hs-wrap.hs-body-wrap {
    padding: 0;
  }
  body.hs .body.hs-card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body.hs .main,
  body.hs .sidebar {
    border-radius: 0;
  }

  /* ---- one pane at a time ----------------------------------------
     conv view with nothing open: the conversation list IS the screen.
     position:static undoes the drawer's absolute + translateX so the
     list sits in normal flow at full width. */
  body.hs:not(.hs-no-sidebar):not(.hs-m-detail) .sidebar {
    position: static;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    height: auto;
    transform: none;
    border-right: 0;
    box-shadow: none;
    z-index: auto;
  }
  body.hs:not(.hs-no-sidebar):not(.hs-m-detail) .main {
    display: none;
  }
  /* conv view with a conversation open: the conversation is the screen */
  body.hs.hs-m-detail .sidebar {
    display: none;
  }
  body.hs.hs-m-detail .main {
    flex: 1 1 auto;
  }

  /* ---- richer list rows ------------------------------------------
     lastPreview and lastTs already ride on every channel from the API
     (channelView in prototype.service.ts); the desktop 250px sidebar
     simply had no room to draw them. A full-width phone does. */
  body.hs .sb-row {
    height: auto;
    min-height: 68px;
    align-items: center;
    padding: 10px 14px;
    gap: 12px;
  }
  /* The leading icon at messenger size: a 44px circle. Channels get a
     soft disc with their # or lock; a DM is the person's face, with a
     presence dot big enough to read; a group DM shows its head count.
     The desktop sidebar keeps its 16px glyphs (02-sidebar.css). */
  body.hs .sb-row .ico {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 50%;
    background: var(--sh-muted);
    color: var(--hs-ink-2);
  }
  body.hs .sb-row .ico > svg {
    width: 20px;
    height: 20px;
  }
  body.hs .sb-row .ico .conv-av,
  body.hs .sb-row .ico .conv-av .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }
  body.hs .sb-row .ico .conv-av .avatar {
    object-fit: cover;
  }
  body.hs .sb-row .ico .conv-presence {
    right: 0;
    bottom: 0;
    width: 12px;
    height: 12px;
    border: 2px solid var(--hs-card);
  }
  body.hs .sb-row .sb-lines {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 1px;
  }
  body.hs .sb-row .nm {
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.hs .sb-row .sb-prev {
    display: block;
    font-size: 13.5px;
    line-height: 1.3;
    color: var(--hs-ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.hs .sb-row .sb-when {
    display: block;
    flex-shrink: 0;
    font-size: 11.5px;
    color: var(--hs-ink-3);
    align-self: center;
  }
  /* Level with the name, which is the top line when a preview sits
     under it: the name/preview block is centred in the row, so its top
     is half the leftover height down, not the row's top edge. */
  body.hs .sb-row:has(.sb-prev) .sb-when {
    align-self: flex-start;
    margin-top: 16px;
  }
  body.hs .sb-row.unread .sb-prev {
    color: var(--hs-ink-2);
  }
  body.hs .sb-sec-head {
    padding: 12px 12px 4px;
  }

  /* ---- bottom bar -------------------------------------------------
     A flex child of #app rather than position:fixed, so the panes
     above simply get a shorter box and nothing has to reserve space
     for it or fight it on z-index. */
  #mnav {
    display: grid;
    /* One equal column per button, however many there are: a fixed five
       left an empty slot at the end while Home is hidden (HOME_HIDDEN). */
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    flex: 0 0 auto;
    background: var(--hs-card);
    border-top: 1px solid var(--hs-line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #mnav .mnav-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 56px;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--hs-ink-3);
    font: inherit;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  #mnav .mnav-btn span {
    font-size: 11px;
    line-height: 1;
  }
  #mnav .mnav-btn svg {
    width: 21px;
    height: 21px;
  }
  #mnav .mnav-btn.active {
    color: var(--hs-violet);
  }
  #mnav .mnav-btn.active span {
    font-weight: 600;
  }
  #mnav .mnav-badge {
    position: absolute;
    top: 6px;
    left: 50%;
    margin-left: 4px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    line-height: 15px;
    font-weight: 700;
    border-radius: 8px;
    padding: 0 4px;
    min-width: 16px;
    text-align: center;
  }
  #mnav .mnav-dot {
    position: absolute;
    top: 9px;
    left: 50%;
    margin-left: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--red);
  }

  /* A pushed screen owns the whole phone: back is the way out, so the
     bar would only be competing with the composer for thumb space. */
  body.hs.hs-m-detail #mnav,
  body.hs.hs-hiro-open #mnav {
    display: none;
  }

  /* An open chat drops the app's top bar (Hiro Talks, search, Hiro, the
     avatar): the conversation header — Back, name, call — is the top of
     the screen. The bar is .hs-top inside the first .hs-wrap; this used to
     hide `.topbar`, which no longer exists, so the bar stayed.

     No safe-area padding on the chat header: the app's own top bar never
     had any either. The phone app lays the page out below the status bar,
     yet Android's WebView still reports the status-bar inset, so padding
     for it opened an empty band above the header. */
  body.hs.hs-m-chat #app > .hs-wrap:first-child {
    display: none;
  }

  /* ---- the More sheet ---------------------------------------------
     Both need display restored: the defaults block above hides them at
     every width, and .open only drives opacity and transform. */
  #mSheetScrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 13, 23, 0.45);
    border: 0;
    padding: 0;
    z-index: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  #mSheetScrim.open {
    opacity: 1;
    pointer-events: auto;
  }
  #mSheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 701;
    background: var(--hs-card);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
    transform: translateY(101%);
    transition: transform 0.2s ease;
    max-height: 80vh;
    overflow-y: auto;
  }
  #mSheet.open {
    transform: translateY(0);
  }
  #mSheet .msheet-grip {
    width: 34px;
    height: 4px;
    border-radius: 2px;
    background: var(--hs-line);
    margin: 0 auto 10px;
  }
  #mSheet .msheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    color: var(--hs-ink);
    text-align: left;
  }
  #mSheet .msheet-item svg {
    width: 20px;
    height: 20px;
    color: var(--hs-ink-2);
    flex-shrink: 0;
  }
  #mSheet .msheet-item.active {
    color: var(--hs-violet);
    font-weight: 600;
  }
  #mSheet .msheet-item.active svg {
    color: var(--hs-violet);
  }
  #mSheet .msheet-item .grow {
    flex: 1;
  }
  #mSheet .msheet-badge {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    line-height: 16px;
    font-weight: 700;
    border-radius: 8px;
    padding: 0 5px;
  }

  /* ---- Home (the operations brief) --------------------------------
     Three KPI tiles across rather than the two the 520px rule gives,
     because six counts two-up is three rows of chrome before the queue
     — the part of the view that actually needs reading — starts. Three
     across is two rows and the numbers are still legible at 375px. */
  body.hs .brief-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0;
  }
  body.hs .brief-kpi {
    padding: 9px 7px;
    text-align: center;
  }
  body.hs .brief-kpi b {
    font-size: 18px;
  }
  body.hs .brief-kpi span {
    line-height: 1.25;
  }
  body.hs .brief-hero {
    border-radius: 14px;
    padding: 15px 14px;
    box-shadow: none;
  }
  body.hs .brief-headline {
    font-size: 19px;
    line-height: 1.3;
  }
  body.hs .brief-wrap {
    /* 80px of it was clearance for the floating Hiro button, which is
       not on screen here. */
    padding: 12px 12px 20px;
  }
  body.hs .ops-tabs {
    margin: 12px 0 8px;
    gap: 5px;
  }
  body.hs .ops-tab {
    padding: 7px 10px;
    font-size: 12px;
  }
  /* Five filters do not fit 375px and the strip scrolls, which is fine —
     but a hard edge looks like the end of the list rather than the edge
     of a scroller. Fading the last 22px says there is more without
     spending width on an arrow. */
  body.hs .ops-tabs,
  body.hs .ch-tabs {
    -webkit-mask-image: linear-gradient(
      to right,
      #000 calc(100% - 22px),
      transparent
    );
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
  }

  /* The view header carries a window picker and Refresh. Let the row
     wrap, and let the picker shrink — at its natural 158px the two
     together overflowed the header by 4px and clipped Refresh. */
  body.hs .chan-head {
    flex-wrap: wrap;
    row-gap: 8px;
    padding: 10px 12px;
  }
  body.hs .chan-head .head-right {
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  body.hs .chan-head .head-right #briefHours {
    flex: 0 1 140px;
    min-width: 0;
  }

  /* ---- a long channel name must not push the caret off ---------------
     .ch-title is a flex row of icon + name + caret. The name is the only
     part that may shrink, so it takes min-width:0 and an ellipsis while
     the icons and the ▾ hold their size — otherwise a name like
     #battery-swap-incidents-hyderabad shoved the dropdown arrow past the
     edge of the header and the menu looked like it wasn't there. */
  body.hs .chan-head .ch-title {
    min-width: 0;
    flex: 0 1 auto;
    overflow: hidden;
  }
  body.hs .chan-head .ch-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.hs .chan-head .ch-title > span:not(.ch-name),
  body.hs .chan-head .ch-title > img {
    flex: 0 0 auto;
  }

  /* ---- no scrollbars ------------------------------------------------
     The phone build is used as an installed app in a webview, and no
     native app paints a persistent scrollbar down its content. The
     horizontal strips (.hs-nav, .ops-tabs, .ch-tabs, .view-tabs) were
     already doing this one at a time; this extends the same pair of
     declarations to every scroller in the shell — the brief, the
     message list, the conversation list, the More sheet, Hiro's feed.

     Scrolling itself is untouched: these only hide the indicator.
     Worth knowing that the indicator was also the only hint that a
     region scrolls, so the edge fades on the tab strips are now doing
     that job alone. */
  body.hs,
  body.hs * {
    scrollbar-width: none;
  }
  body.hs::-webkit-scrollbar,
  body.hs *::-webkit-scrollbar {
    display: none;
  }

  /* ---- message actions ---------------------------------------------
     The caret is a pointer affordance and has no place here: there is
     no hover to reveal it, and a tap leaves a sticky :hover behind that
     would strand one on screen. The long press opens the toolbar
     instead (openMsgActions in 04-messages.js). The second selector is
     not redundant — .msg.acts-open .msg-caret outranks a plain
     body.hs .msg-caret, so the open state needs suppressing too. */
  body.hs .msg .msg-caret,
  body.hs .msg.acts-open .msg-caret {
    display: none;
  }
  /* Suppress iOS's own callout on the gesture we are handling, without
     touching user-select — selecting and copying message text still
     works. */
  body.hs .msg .content {
    -webkit-touch-callout: none;
  }

  /* ---- your own bubble's footer --------------------------------------
     "Read by" and the time share one line, faces on the left and the
     time on the right, as in any messenger. Stacked, the two made the
     footer taller than a one-line message. Everything else in the
     bubble spans both columns in its usual order; the footer pair is
     moved to the end with `order`. A grid, not a wrapping flexbox,
     because a grid's width is the wider of the text and the footer line,
     so a short message keeps a short bubble. */
  body.hs .msg.mine .content {
    display: grid;
    /* minmax(0, …) on both: an auto column — and 1fr, which is
       minmax(auto, 1fr) — cannot shrink below a child's own width, so a
       300px document card pushed the bubble off the screen. */
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
  }
  body.hs .msg.mine .content > * {
    grid-column: 1 / -1;
    min-width: 0;
  }
  body.hs .msg.mine .content > .msg-meta {
    grid-column: 2;
    order: 2;
    margin-top: 2px;
  }

  /* ---- no sideways movement ------------------------------------------
     The conversation scrolls up and down only. The list clips instead
     of scrolling sideways, so a message a pixel too wide can't nudge
     the whole chat, and a sideways swipe is not handed on to the page,
     where Android plays its overscroll stretch and the chat slides left
     and right. Code blocks and tables keep their own sideways scroll. */
  body.hs .msgs {
    overflow-x: hidden;
    overscroll-behavior-x: none;
  }
  html,
  body.hs {
    overscroll-behavior-x: none;
  }

  /* ---- composer ---------------------------------------------------
     The rich-text row (bold, italic, strike, lists, quote, code) costs
     43px of a 149px composer and is close to unusable on a phone: its
     partner is a keyboard shortcut nobody has, and the actions people
     actually reach for on mobile — attach, camera, voice, emoji,
     mention, send — all live in .cmp-bar below the input, which stays.
     Hidden rather than removed, so the same composer keeps working on
     desktop and in threads. */
  body.hs .composer .fmt-bar {
    display: none;
  }

  /* ---- Hiro takes the whole screen -------------------------------- */
  body.hs #hiroPanel.open {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    border-radius: 0;
    z-index: 702;
  }
  /* The panel covers the top bar, so its own close control is the only
     way back — it has to be a real target, not a 20px glyph. */
  body.hs #hiroPanel .hiro-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  body.hs #hiroPanel .hiro-head {
    padding-top: calc(8px + env(safe-area-inset-top));
  }
}

/* Phone: no list header. The workspace name, the filter and the old
   "find a conversation" button all go; the top bar's search finds
   channels and people instead (it opens on People & Channels). */
@media (max-width: 820px) {
  body.hs .sb-head {
    display: none;
  }
}

/* One list on the phone (one-list plan, C5): the chips at touch height and
   a floating compose button in place of the hidden list header. Shown only
   on the list screen; a conversation covers it. */
@media (max-width: 820px) {
  body.hs:not(.hs-no-sidebar):not(.hs-m-detail) .sidebar {
    position: relative;
  }
  body.hs .sb-chips {
    padding: 8px 16px;
  }
  body.hs .sb-chips .chip {
    height: 36px;
    padding: 0 14px;
  }
  body.hs:not(.hs-no-sidebar):not(.hs-m-detail) .sb-fab {
    position: absolute;
    right: 18px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: var(--fg);
    color: var(--bg);
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
  }
  /* The last row scrolls clear of the button. */
  body.hs .sb-scroll {
    padding-bottom: 88px;
  }
}
/* ===================== shadcn design language ======================== */
/* The reference: shadcn/ui's "neutral" theme, as its chat template uses it.
   A near-monochrome palette — white surfaces on a light grey page, one
   near-black for the primary action and your own messages, hairline #e5e5e5
   borders, 8–12px radii, 14px body type, medium (500) and semibold (600)
   weights instead of heavy ones, and Lucide line icons. Colour is kept for
   meaning only: green for presence and unread, red for danger, the task and
   incident status colours.

   This file is last in load order and only restyles: every selector here
   already exists and keeps its behaviour. Palette values live in the token
   blocks of 00-base.css and 15-sign-in.css. */
:root {
  --sh-muted: #f5f5f5;
  --sh-accent: #ebebeb;
  --sh-ring: rgba(163, 163, 163, 0.35);
  --sh-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --sh-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  /* Your own bubble: a soft blue from the link colour's family, dark text.
     Every rule inside the bubble reads these, so the shade is one change.
     Near-black was hard on the eye and forced white-on-dark overrides that
     kept missing things (file names, reply quotes, the actions arrow). */
  --msg-mine-bg: #dbeafe;
  --msg-mine-fg: #0f172a;
  --msg-mine-sub: #475569;
  --msg-mine-tint: rgba(255, 255, 255, 0.6);
  --msg-mine-line: rgba(30, 64, 175, 0.2);
  --msg-mine-link: #1d4ed8;
  --unread: #22c55e;
}
[data-theme="dark"] {
  --sh-muted: #262626;
  --sh-accent: #262626;
  --sh-ring: rgba(115, 115, 115, 0.45);
  --msg-mine-bg: #1e3a5f;
  --msg-mine-fg: #f1f5f9;
  --msg-mine-sub: rgba(241, 245, 249, 0.72);
  --msg-mine-tint: rgba(255, 255, 255, 0.1);
  --msg-mine-line: rgba(255, 255, 255, 0.18);
  --msg-mine-link: #93c5fd;
}

body.hs {
  background: var(--hs-canvas);
  font-size: 14px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.hs .hs-card {
  border-radius: 12px;
  border-color: var(--hs-line);
  box-shadow: var(--sh-shadow-xs);
}

/* ------------------------------ top bar ------------------------------- */
body.hs .hs-brand b {
  font-weight: 600;
}
/* Search: a shadcn input — white, hairline, muted placeholder, ⌘K chip. */
body.hs #topSearch {
  height: 36px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-card);
  box-shadow: var(--sh-shadow-xs);
  color: var(--hs-ink-3);
  font-weight: 400;
}
body.hs #topSearch:hover {
  background: var(--hs-card);
  border-color: #d4d4d4;
}
body.hs #topSearch .kbd {
  padding: 1px 6px;
  border: 1px solid var(--hs-line);
  border-radius: 4px;
  background: var(--sh-muted);
  font-size: 11px !important;
  font-weight: 500;
}
/* Icon buttons: shadcn "ghost" — no chrome until hover. */
body.hs .hs-icon-btn {
  border-radius: 8px;
  color: var(--hs-ink-2);
}
body.hs .hs-icon-btn:hover {
  background: var(--sh-accent);
  color: var(--hs-ink);
}
/* Ask Hiro: an "outline" button. */
body.hs #btnHiroTop {
  height: 36px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: var(--hs-card);
  box-shadow: var(--sh-shadow-xs);
  color: var(--hs-ink);
  font-weight: 500;
}
body.hs #btnHiroTop:hover {
  background: var(--sh-muted);
}
/* Phone only: just the ✦ glyph — no label, pill, border, or the orb's
   filled circle. Desktop keeps the labelled "Ask Hiro" pill. */
@media (max-width: 820px) {
  body.hs #btnHiroTop,
  body.hs .hs-top #btnHiroTop,
  body.hs #btnHiroTop:hover {
    border: 0;
    background: none;
    box-shadow: none;
    padding: 0;
    gap: 0;
  }
  body.hs #btnHiroTop .hs-hiro-label {
    display: none;
  }
  body.hs #btnHiroTop .orb,
  body.hs .hs-top #btnHiroTop .orb {
    background: none;
    border: 0;
    box-shadow: none;
    color: var(--hs-ink);
    font-size: 20px;
  }
}
body.hs #hsBell .n {
  background: var(--hs-red);
}

/* -------------------- left navigation (desktop) ----------------------- */
/* ClickUp's rail: a slim dark card beside the page — each section an icon
   with its name in small type beneath, the current one on a lighter tile,
   counts as small badges on the icon. Tablets and phones keep their own
   navigation. */
@media (min-width: 1001px) {
  body.hs .hs-nav {
    width: 68px;
    flex: 0 0 68px;
    padding: 8px 6px;
    gap: 2px;
    background: #18181b;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    scrollbar-width: none;
  }
  body.hs .hs-nav::-webkit-scrollbar {
    width: 0;
  }
  body.hs .hs-tab {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-height: 54px;
    padding: 7px 2px 6px;
    border-radius: 10px;
    color: #a1a1aa;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    letter-spacing: 0;
  }
  /* A long label ("Recordings") is set a size down so it sits inside the
     rail like the short ones, not edge to edge. */
  body.hs .hs-tab .hs-lbl { white-space: nowrap; }
  body.hs .hs-tab .hs-lbl.long { font-size: 9px; letter-spacing: -0.02em; }
  body.hs .hs-tab:hover {
    background: #27272a;
    color: #fafafa;
  }
  body.hs .hs-tab.on {
    background: #3f3f46;
    color: #ffffff;
    font-weight: 600;
    box-shadow: none;
  }
  body.hs .hs-glyph,
  body.hs .hs-tab.on .hs-glyph,
  body.hs .hs-tab:hover .hs-glyph {
    width: 22px;
    height: 22px;
    color: inherit;
    background: transparent;
  }
  body.hs .hs-glyph svg {
    width: 20px;
    height: 20px;
  }
  body.hs .hs-tab .n,
  body.hs .hs-tab.on .n {
    position: absolute;
    top: 4px;
    right: 6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    border: 2px solid #18181b;
    background: var(--hs-red);
    color: #fff;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  [data-theme="dark"] body.hs .hs-nav,
  body.hs[data-theme="dark"] .hs-nav {
    background: #111113;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}

/* ------------------- conversation list (the "Chats" card) ------------- */
body.hs .sidebar {
  background: var(--hs-card);
}
body.hs .sb-head .sb-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
body.hs .sb-icon {
  border-radius: 8px;
  color: var(--hs-ink-2);
}
body.hs .sb-icon:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .sb-sec-head {
  color: var(--hs-ink-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
body.hs .sb-row {
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--hs-ink-2);
  font-size: 14px;
}
body.hs .sb-row:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .sb-row.active,
body.hs .sb-row.active:hover {
  background: var(--sh-accent);
  color: var(--hs-ink);
  font-weight: 500;
}
body.hs .sb-row.unread {
  color: var(--hs-ink);
  font-weight: 600;
}
/* Unread count: the reference's green circle. */
body.hs .sb-row .pill {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--unread);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
/* Muted rows (28 Oct 2026): the count stays, in the same colour; a 🔕 after
   the name says it is muted, and an @ before the count says something in
   there names you — like WhatsApp. */
body.hs .sb-row .sb-muted {
  display: inline-flex;
  flex: none;
  color: var(--fg-3);
}
/* A plain green @ — a white @ in a green dot was too small to read. */
body.hs .sb-row .sb-at {
  color: var(--unread);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
body.hs .sb-sec-count {
  background: var(--sh-muted);
  color: var(--hs-ink-2);
  font-weight: 500;
}

/* ------------------------- channel header ----------------------------- */
body.hs .chan-head {
  border-bottom: 1px solid var(--hs-line);
}
body.hs .ch-title {
  font-weight: 600;
}
body.hs .ch-title .ch-name {
  font-weight: 600;
}
/* Tabs: shadcn's TabsList — a muted track, the active tab a raised white
   segment — for the channel tabs and the Work view's switches alike. */
body.hs .ch-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--sh-muted);
}
body.hs .ch-tab {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--hs-ink-2);
  font-size: 13px;
  font-weight: 500;
}
body.hs .ch-tab:hover {
  background: transparent;
  color: var(--hs-ink);
}
body.hs .ch-tab.active {
  background: var(--hs-card);
  color: var(--hs-ink);
  font-weight: 500;
  border-radius: 7px;
  box-shadow: var(--sh-shadow-xs), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
body.hs .ch-tab .ch-tab-n,
body.hs .ch-tab.active .ch-tab-n {
  background: transparent;
  color: var(--hs-ink-3);
  font-weight: 500;
  padding: 0 2px;
  min-width: 0;
}
body.hs .view-tabs .hs-subtab.on,
body.hs .work-kind-tab.on {
  color: var(--hs-ink);
}
body.hs .work-kind-tab.on {
  border-bottom-color: var(--hs-ink);
}
body.hs .work-kind-tab {
  font-weight: 600;
}
body.hs .work-kind-count {
  background: var(--hs-red);
}
body.hs .pin-banner {
  background: var(--hs-card);
  border-bottom: 1px solid var(--hs-line);
  font-size: 13px;
}

/* ------------------------------ messages ------------------------------ */
/* Bubbles: muted grey for others, near-black for yours; 14px type, a
   uniform 14px radius, and timestamps in muted 12px. */
body.hs .msg.theirs .content {
  background: var(--sh-muted);
  border-radius: 14px;
  padding: 8px 12px;
}
body.hs .msg.mine .content {
  background: var(--msg-mine-bg);
  color: var(--msg-mine-fg);
  border-radius: 14px;
  padding: 8px 12px;
}
body.hs .msg .content .text {
  font-size: 14px;
  line-height: 1.5;
}
body.hs .msg .who .name {
  font-weight: 600;
  font-size: 13.5px;
}
/* Their name above the bubble: a quiet label, not part of the message. */
body.hs .msg .msg-author .name {
  font-weight: 400;
  font-size: 12px;
  color: var(--hs-ink-3);
}
body.hs .msg .who .time,
body.hs .msg .msg-meta .time {
  color: var(--hs-ink-3);
  font-size: 12px;
}
body.hs .msg.mine .content .text,
body.hs .msg.mine .content .who .name {
  color: var(--msg-mine-fg);
}
body.hs .msg.mine .content .msg-meta,
body.hs .msg.mine .content .msg-meta .time {
  color: var(--msg-mine-sub);
}
body.hs .msg.mine .content .mention {
  background: var(--msg-mine-tint);
  color: var(--msg-mine-link);
}
body.hs .msg.mine .content a {
  color: var(--msg-mine-link);
  text-decoration: underline;
}
body.hs .msg.mine .content code,
body.hs .msg.mine .content pre,
body.hs .msg.mine .content .msg-quote {
  background: var(--msg-mine-tint);
  color: var(--msg-mine-fg);
  border-color: var(--msg-mine-line);
}
/* A reply's author name read from --accent, which is near-black in this
   palette, so in dark mode it vanished on other people's bubbles. */
body.hs .msg-quote b {
  color: var(--link);
}
body.hs .msg-quote {
  border-left-color: var(--link);
}
/* The reply you are answering: name in the link colour, excerpt in the
   bubble's secondary colour, bar on the left in the link colour. */
body.hs .msg.mine .content .msg-quote {
  border-left-color: var(--msg-mine-link);
}
body.hs .msg.mine .content .msg-quote b {
  color: var(--msg-mine-link);
}
body.hs .msg.mine .content .msg-quote span {
  color: var(--msg-mine-sub);
}
body.hs .msg.mine .content blockquote {
  color: var(--msg-mine-sub);
  border-left-color: var(--msg-mine-line);
}
body.hs .msg.mine .content .md-table th,
body.hs .msg.mine .content .md-table td {
  color: var(--msg-mine-fg);
  border-color: var(--msg-mine-line);
}
body.hs .msg.mine .content .md-table th {
  background: var(--msg-mine-tint);
}
/* Files: the plain card takes the bubble's colours; the media card has its
   own white (or dark) surface, so it sets its own text colour instead of
   inheriting the bubble's. A white file name on a white card was the bug. */
body.hs .msg.mine .content .file-card {
  border-color: var(--msg-mine-line);
  background: var(--msg-mine-tint);
}
/* A download card is an <a>; it keeps the card's look, not the bubble's
   link colour and underline (body.hs .msg.mine .content a). */
body.hs .msg .content a.file-card {
  color: inherit;
  text-decoration: none;
}
body.hs .msg.mine .content .file-card .fm {
  color: var(--msg-mine-sub);
}
body.hs .msg.mine .content .file-card-action {
  color: var(--msg-mine-link);
}
body.hs .msg .content .inline-media-card {
  color: var(--fg);
}
/* The actions arrow is a small button with its own surface; it keeps the
   page's colours rather than the bubble's. */
body.hs .msg.mine .content .msg-caret {
  background: var(--hs-card, var(--bg));
  color: var(--fg-2);
  box-shadow: var(--sh-shadow-xs);
}
body.hs .msg.mine .content .reactions .rx {
  background: var(--msg-mine-tint);
  border-color: var(--msg-mine-line);
  color: var(--msg-mine-fg);
}
body.hs .msg.mine .content .ticks {
  color: var(--msg-mine-sub);
}
/* Read: WhatsApp's blue, the same on every bubble and in both themes, so
   it never reads as the grey of "delivered". */
body.hs .msg.mine .content .ticks.read {
  color: #34b7f1;
}
:root[data-theme="light"] body.hs .msg.mine .content .ticks.read {
  color: #0a8fd6;
}
body.hs .msg .mention {
  font-weight: 600;
}
body.hs .reactions .rx {
  border-radius: 999px;
  border-color: var(--hs-line);
  background: var(--hs-card);
  font-weight: 500;
}
body.hs .reactions .rx.mine {
  border-color: #a3a3a3;
  background: var(--sh-muted);
}
body.hs .msg .avatar,
body.hs .msg .gutter img {
  border-radius: 999px;
}

/* ------------------------------ composer ------------------------------ */
body.hs .composer {
  border-radius: 10px;
  border-color: var(--hs-line);
  box-shadow: var(--sh-shadow-xs);
}
body.hs .composer:focus-within {
  border-color: #a3a3a3;
  box-shadow: 0 0 0 3px var(--sh-ring);
}
body.hs .composer .fmt-bar {
  border-bottom: 1px solid var(--hs-line);
  background: transparent;
}
body.hs .composer .fmt-btn {
  border-radius: 6px;
  color: var(--hs-ink-3);
}
body.hs .composer .fmt-btn:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .cmp-send {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--green);
  color: #fafafa;
  font-weight: 500;
}
body.hs .cmp-send:disabled {
  background: var(--sh-muted);
  color: var(--hs-ink-3);
}

/* ------------------------- buttons and inputs ------------------------- */
/* shadcn Button: "outline" by default, "default" (near-black) for primary;
   Input: hairline, 8px radius, a soft grey focus ring. */
.btn {
  border-radius: 8px;
  border-color: var(--border);
  background: var(--bg);
  font-weight: 500;
  box-shadow: var(--sh-shadow-xs);
}
.btn:hover {
  background: var(--sh-muted);
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fafafa;
}
.btn.primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
}
.btn.ghost {
  box-shadow: none;
  border-color: transparent;
  background: transparent;
}
.btn.danger {
  color: var(--red);
}
.hbtn {
  border-radius: 8px;
}
.hbtn.bordered {
  border-color: var(--border);
  background: var(--bg);
  box-shadow: var(--sh-shadow-xs);
  color: var(--fg);
  font-weight: 500;
}
.hbtn.bordered:hover,
.hbtn:hover {
  background: var(--sh-muted);
}
.hbtn.primary {
  border-radius: 8px;
  font-weight: 500;
}
/* Flat at rest; focus is a darker hairline plus a faint 2px halo — the
   old 3px grey ring read as a heavy shadow around every field. */
.input {
  border-color: var(--border);
  border-radius: 8px;
  box-shadow: none;
}
.input:focus,
.input:focus-visible {
  outline: none;
  border-color: var(--fg-3);
  box-shadow: 0 0 0 2px var(--sh-muted);
}
:focus-visible {
  outline-color: #a3a3a3;
}

/* ------------------------- menus, dialogs, toasts --------------------- */
.menu {
  padding: 4px;
  border-radius: 8px;
  border-color: var(--border);
  box-shadow: var(--sh-shadow-md);
  font-size: 14px;
}
.menu-item {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 6px;
}
.menu-item:hover {
  background: var(--sh-muted);
  color: var(--fg);
}
.menu-item:hover .k {
  color: var(--fg-3);
}
.menu-item.danger:hover {
  background: #fee2e2;
  color: #dc2626;
}
.menu-h {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: none;
  letter-spacing: 0;
}
.modal {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.m-head h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.m-head .sub {
  color: var(--fg-3);
}
.scrim {
  background: rgba(0, 0, 0, 0.5);
}
/* Toasts: shadcn's Sonner — a white card with a hairline, not a dark pill. */
.toast {
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
}
.toast .act {
  color: var(--fg);
  font-weight: 600;
  text-decoration: underline;
}

/* ----------------------- work: tasks and incidents -------------------- */
/* Same layout, same states — only the design language changes: quieter
   headings, neutral chips, and the shared buttons above. */
.tk-gpill {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.td-title {
  font-weight: 700;
  letter-spacing: -0.015em;
}
.td-kindchip,
.td-crumb {
  font-weight: 500;
}
.td-send {
  background: var(--green);
}
.td-send:hover {
  background: var(--green-hover);
}
.td-status-main {
  font-weight: 600;
}
.tk-inline {
  background: var(--sh-muted);
  box-shadow: inset 2px 0 0 var(--hs-ink);
}
/* The stage pill never gives up its width to the action buttons beside it;
   when both do not fit, the buttons wrap under it. */
.td-status {
  flex: none;
}
.td-fv:has(.td-incact) {
  flex-wrap: wrap;
  row-gap: 6px;
}

/* ------------------------------- calls -------------------------------- */
/* The call surfaces were drawn on var(--bg-3), which was dark in the old
   navy theme and is near-white now, while their text and icons stayed
   hard-coded white — so mic, share, add-people and record were white on
   white. The docked bar and the full-screen bar are always dark, like any
   call screen; the incoming-call card is an ordinary card that follows the
   theme. */
:root {
  --call-bg: #111827;
  --call-raised: rgba(255, 255, 255, 0.1);
  --call-raised-hover: rgba(255, 255, 255, 0.18);
  --call-line: rgba(255, 255, 255, 0.14);
  --call-fg: #f8fafc;
  --call-sub: #cbd5e1;
  --call-danger: #dc2626;
}
body.hs .huddle-bar {
  background: var(--call-bg);
  color: var(--call-fg);
  border-color: var(--call-line);
}
body.hs .hbtn2,
body.hs .hdock-btn {
  background: var(--call-raised);
  color: var(--call-fg);
}
body.hs .hbtn2:hover,
body.hs .hdock-btn:hover {
  background: var(--call-raised-hover);
}
body.hs .hbtn2.off,
body.hs .hbtn2.leave,
body.hs .hbtn2.record.active {
  background: var(--call-danger);
  color: #fff;
}
body.hs .hbtn2 svg {
  width: 18px;
  height: 18px;
}

/* Full-screen call bar: every control is the same square, every glyph the
   same size, whether it is a Lucide icon, an emoji or the record dot.
   A mix of 13px text glyphs, 17px emoji and unsized SVGs is what made the
   icons look uneven on a phone. */
body.hs .hs-control {
  color: var(--call-sub);
}
body.hs .hs-control .ic {
  background: var(--call-raised);
  border-color: var(--call-line);
  color: var(--call-fg);
  font-size: 18px;
  line-height: 1;
}
body.hs .hs-control .ic svg {
  width: 20px;
  height: 20px;
}
body.hs .hs-control:hover .ic {
  background: var(--call-raised-hover);
}
body.hs .hs-control.off .ic {
  background: rgba(220, 38, 38, 0.22);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}
body.hs .hs-control.active .ic {
  background: rgba(37, 99, 235, 0.3);
  border-color: rgba(96, 165, 250, 0.6);
  color: #dbeafe;
}
body.hs .hs-control.leave .ic {
  background: var(--call-danger);
  border-color: var(--call-danger);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
body.hs .hs-control.leave {
  color: #fecaca;
}
/* The record control's dot and stop square, drawn rather than typed. */
.rec-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ef4444;
}
.rec-dot.stop {
  border-radius: 3px;
}
@media (max-width: 760px) {
  body.hs .hs-control .ic svg {
    width: 18px;
    height: 18px;
  }
  body.hs .hs-control .ic {
    font-size: 16px;
  }
}

/* Incoming huddle card. */
body.hs .huddle-invite {
  background: var(--hs-card);
  color: var(--hs-ink);
  border: 1px solid var(--hs-line);
  box-shadow: var(--sh-shadow-md);
}
body.hs .huddle-invite p {
  color: var(--hs-ink-3);
}
body.hs .huddle-invite .call-mark {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .huddle-invite button {
  font-weight: 600;
  font-size: 13px;
}
body.hs .huddle-invite [data-call-decline] {
  background: var(--hs-card);
  color: var(--hs-ink);
  border: 1px solid var(--hs-line);
}
body.hs .huddle-invite [data-call-decline]:hover {
  background: var(--sh-muted);
}
body.hs .huddle-invite [data-call-join] {
  background: #15803d;
  color: #fff;
}
body.hs .huddle-invite [data-call-join]:hover {
  background: #166534;
}
/* Participant and screen-share tiles sat on the same var(--bg-3), which put
   a light-grey block in the middle of the dark call screen. */
body.hs .huddle-stage .hs-grid .hz,
body.hs .hz.share {
  background: #1f2937;
}
body.hs .hz.hz-hiro {
  background: #1f2937 !important;
}
/* One line per label, so every tile in the phone bar sits on the same row.
   "Mute mic" wrapping to two lines lifted its tile above "Share". The bar
   already scrolls sideways on a phone, so the extra width costs nothing. */
body.hs .hs-bar {
  align-items: flex-start;
}
body.hs .hs-control > span:last-child {
  white-space: nowrap;
}
@media (max-width: 760px) {
  body.hs #huddleStage.active .hs-control {
    flex: 0 0 auto;
    min-width: 58px;
  }
}

/* Phone: a compact top bar and conversation header.
   The two stacked bars took ~160px before the first message — a 62px top bar
   with 44px search / Hiro / avatar targets, then a 99px header whose name,
   huddle and ⋯ row sat above a second row of tabs, each padded 10px with an
   8px gap between them. Same controls, same order; smaller and tighter, so the
   conversation starts about 45px higher. Touch targets stay at 32px or more. */
@media (max-width: 820px) {
  body.hs .hs-top {
    min-height: 0;
    height: auto;
    padding: 6px 8px 6px 12px;
    gap: 6px;
  }
  body.hs .hs-top #topSearch,
  body.hs .hs-top #btnHiroTop {
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
  }
  body.hs .hs-top #topSearch svg,
  body.hs .hs-top #btnHiroTop svg {
    width: 17px;
    height: 17px;
  }
  /* Collapsed to an icon, search is a bare glyph like Hiro's: no fill,
     border, shadow or focus ring. */
  body.hs .hs-top #topSearch,
  body.hs .hs-top #topSearch:hover,
  body.hs .hs-top #topSearch.hs-pill--focus {
    background: none;
    border: 0;
    box-shadow: none;
  }
  body.hs .hs-top #meAvatar {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }
  body.hs .hs-top #meAvatar img {
    width: 32px;
    height: 32px;
  }
  body.hs .hs-top .hs-m-title {
    font-size: 17px;
  }

  body.hs .chan-head {
    padding: 4px 8px 6px;
    gap: 4px;
    min-height: 0;
  }
  /* Icon-only buttons only (huddle, ⋯): Activity puts its labelled "Unread
     only" and "Mark all as read" in this same header, and those keep their
     width. */
  body.hs .chan-head .ch-back,
  body.hs .chan-head .head-right .hbtn:not(.act-toggle):not(#readAll) {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
  }
  body.hs .chan-head .head-right {
    gap: 4px;
  }
  body.hs .chan-head .ch-title {
    padding: 2px 4px;
    min-width: 0;
  }
  body.hs .chan-head .ch-name {
    font-size: 16px;
  }
  body.hs .chan-head .ch-title > img {
    width: 24px;
    height: 24px;
  }
  body.hs .chan-head .ch-tabs {
    padding: 2px;
  }
  body.hs .chan-head .ch-tabs > * {
    padding: 4px 10px;
    font-size: 13px;
    line-height: 20px;
  }
}

/* ---------------------- search tabs (global search) ------------------- */
/* One row that scrolls sideways instead of wrapping onto two, and the
   active tab in the theme's near-black, not the old link blue. */
.chipbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 6px;
  padding: 10px 16px;
  border-bottom-color: var(--border);
}
.chipbar::-webkit-scrollbar {
  display: none;
}
.chipbar {
  align-items: center;
}
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  box-sizing: border-box;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  color: var(--fg-2);
  background: var(--bg);
  box-shadow: none;
}
.chip:hover {
  background: var(--sh-muted);
  color: var(--fg);
}
.chip.on,
.chip.on:hover {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
  font-weight: 500;
}
.ac-h {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
  text-transform: none;
  letter-spacing: 0;
}
.res:hover {
  background: var(--sh-muted);
}

/* ---------------------------- new message ----------------------------- */
.np-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.np-field {
  position: relative;
}
.np-field > svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--fg-3);
  pointer-events: none;
}
.np-field .input {
  width: 100%;
  padding-left: 34px;
}
.np-sel {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.np-sel:not(:empty) {
  margin-top: 10px;
}
.np-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--sh-muted);
  font-size: 13px;
  font-weight: 500;
}
.np-chip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--fg-3);
  cursor: pointer;
}
.np-chip button:hover {
  background: var(--sh-accent);
  color: var(--fg);
}
.np-chip button svg {
  width: 12px;
  height: 12px;
}
.np-list {
  flex: 1 1 auto;
  min-height: 160px;
  max-height: 360px;
  overflow-y: auto;
  margin: 10px -8px 0;
}

.np-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.np-item:hover {
  background: var(--sh-muted);
}
.np-item[aria-disabled="true"] {
  cursor: default;
  opacity: 0.75;
}
.np-item[aria-disabled="true"]:hover {
  background: transparent;
}
.np-item .badge2 {
  margin-left: auto;
}
.np-ico {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sh-muted);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 600;
}
.np-ico svg {
  width: 16px;
  height: 16px;
}
.np-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.np-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-sub {
  font-size: 12.5px;
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-empty {
  padding: 24px 8px;
  text-align: center;
  color: var(--fg-3);
  font-size: 13px;
}
.btn.primary:disabled,
.btn.primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Phone: the dialog is full height, so the list takes all of it. */
@media (max-width: 820px) {
  .np-list {
    max-height: none;
  }
  .np-foot .btn {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }
}

/* Theme toggle: desktop header only; the phone keeps it in the profile menu. */
@media (max-width: 820px) {
  body.hs #btnTheme {
    display: none;
  }
}
/* Log out sits at the foot of the desktop rail, below the spacer. */
body.hs .hs-nav .hs-logout {
  margin-top: 4px;
}

/* =============================== composer ============================= */
/* One row. Desktop: a single bordered box — the input, then Format, Emoji,
   Attach, Voice, + and, past a hairline, Send. Phone: a round + on the
   left, a pill with the input and emoji, then Attach and Voice (Send in
   Voice's place once there is something to send). Formatting shows only
   when asked for (.fmt-open). */
body.hs .composer {
  border: 1px solid var(--hs-line);
  border-radius: 10px;
  background: var(--hs-card);
  box-shadow: none;
  overflow: hidden;
}
body.hs .composer:focus-within {
  border-color: var(--hs-line);
  box-shadow: inset 0 -2px 0 var(--hs-ink);
}
body.hs .composer .fmt-bar {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--hs-line);
  background: transparent;
}
body.hs .composer.fmt-open .fmt-bar {
  display: flex;
}
.fmt-scroll {
  display: flex;
  align-items: center;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.fmt-scroll::-webkit-scrollbar {
  display: none;
}
.fmt-scroll .fmt-btn {
  flex: 0 0 auto;
}
body.hs .composer .fmt-close {
  display: none;
}
.cmp-pending:not(:empty) {
  padding: 8px 10px 0;
}
.cmp-row {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 5px 6px 5px 14px;
}
.cmp-field {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
body.hs .composer .cmp-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  max-height: 40vh;
  padding: 8px 0;
  font-size: 15px;
}
.cmp-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hs-ink-3);
  cursor: pointer;
}
.cmp-btn:hover,
.cmp-btn.on {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
.cmp-btn svg {
  width: 19px;
  height: 19px;
}
.cmp-plus {
  display: none;
}
.cmp-sep {
  flex: 0 0 1px;
  align-self: center;
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--hs-line);
}
body.hs .composer .cmp-send {
  flex: 0 0 auto;
  min-width: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fafafa;
}
body.hs .composer .cmp-send:disabled {
  background: transparent;
  color: var(--hs-ink-3);
}
body.hs .composer .cmp-send svg {
  width: 18px;
  height: 18px;
}

/* Recording: the input gives way to a strip — pulsing dot, timer, label,
   discard — and the mic becomes a red stop control. */
.cmp-rec {
  display: none;
}
.composer.recording .cmp-rec {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  min-width: 0;
}
.composer.recording .cmp-input,
.composer.recording .cmp-fmt-toggle,
.composer.recording .cmp-emoji,
.composer.recording .cmp-attach,
.composer.recording .cmp-more,
.composer.recording .cmp-plus,
.composer.recording .cmp-sep,
.composer.recording .cmp-send {
  display: none;
}
.cmp-rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  animation: cmpRecPulse 1.2s ease-in-out infinite;
}
@keyframes cmpRecPulse {
  50% {
    opacity: 0.3;
  }
}
.cmp-rec-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--hs-ink);
}
.cmp-rec-label {
  flex: 1 1 auto;
  color: var(--hs-ink-3);
  font-size: 13px;
}
body.hs .composer .cmp-voice.rec {
  display: grid;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  animation: none;
}
body.hs .composer .cmp-voice.rec::after {
  content: none;
}

/* ------------------------------ phone -------------------------------- */
@media (max-width: 820px) {
  body.hs .composer-wrap {
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  }
  body.hs .composer,
  body.hs .composer:focus-within {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .cmp-row {
    gap: 4px;
    padding: 0;
  }
  .cmp-plus {
    display: grid;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hs-ink);
    color: var(--hs-card);
  }
  .cmp-plus:hover {
    background: var(--hs-ink);
    color: var(--hs-card);
  }
  .cmp-field {
    min-height: 42px;
    padding: 0 3px 0 14px;
    border: 1px solid var(--hs-line);
    border-radius: 21px;
    background: var(--hs-card);
    align-items: flex-end;
  }
  .cmp-field:focus-within {
    border-color: var(--hs-ink-3);
  }
  body.hs .composer .cmp-input {
    min-height: 40px;
    max-height: 30dvh;
    padding: 10px 0;
    font-size: 16px;
  }
  .cmp-field .cmp-btn {
    width: 36px;
    height: 40px;
  }
  .cmp-fmt-toggle,
  .cmp-more,
  .cmp-sep {
    display: none;
  }
  .cmp-attach,
  .cmp-voice {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  .cmp-btn svg {
    width: 21px;
    height: 21px;
  }
  /* Voice while empty, Send once there is something to send. */
  body.hs .composer .cmp-send {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  body.hs .composer.has-content .cmp-send {
    display: grid;
  }
  body.hs .composer.has-content .cmp-voice {
    display: none;
  }
  body.hs .composer.recording .cmp-voice {
    display: grid;
  }
  body.hs .composer.recording .cmp-send {
    display: none;
  }
  .composer.recording .cmp-field {
    padding-right: 3px;
  }
  /* Formatting, when switched on from the + sheet: a card above the row
     that scrolls sideways, with its own close. */
  body.hs .composer.fmt-open .fmt-bar {
    display: flex;
    margin-bottom: 6px;
    padding: 4px;
    border: 1px solid var(--hs-line);
    border-radius: 12px;
    background: var(--hs-card);
  }
  body.hs .composer .fmt-btn {
    width: 38px;
    min-width: 38px;
    height: 36px;
    font-size: 15px;
  }
  body.hs .composer.fmt-open .fmt-close {
    display: grid;
    flex: 0 0 auto;
    border-left: 1px solid var(--hs-line);
    border-radius: 0 8px 8px 0;
  }
  .cmp-pending:not(:empty) {
    padding: 0 0 6px;
  }
}

/* ---------------------------- bottom sheet --------------------------- */
.bsheet-scrim {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(0, 0, 0, 0);
  transition: background 0.18s ease;
}
.bsheet-scrim.open {
  background: rgba(0, 0, 0, 0.4);
}
.bsheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: var(--hs-card);
  color: var(--hs-ink);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.18s ease;
}
.bsheet-scrim.open .bsheet {
  transform: none;
}
.bsheet-grip {
  width: 36px;
  height: 4px;
  margin: 2px auto 10px;
  border-radius: 2px;
  background: var(--hs-line);
}
.bsheet-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.bsheet-item:active,
.bsheet-item:hover {
  background: var(--sh-muted);
}
.bsheet-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sh-muted);
  color: var(--hs-ink);
}
.bsheet-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bsheet-txt b {
  font-weight: 500;
  font-size: 15px;
}
.bsheet-txt small {
  color: var(--hs-ink-3);
  font-size: 12.5px;
}

/* ------------------- phone: conversation header + tabs ---------------- */
/* Row 1: back · name (truncates) · huddle · ⋯, always one line. Row 2: the
   tabs, as scrolling chips like global search. Desktop is untouched. */
@media (max-width: 820px) {
  body.hs .chan-head.conv-head {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 8px;
    column-gap: 4px;
    padding: 6px 8px 8px;
  }
  body.hs .conv-head .ch-back {
    order: 0;
    flex: 0 0 auto;
  }
  body.hs .conv-head .ch-title {
    order: 1;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    height: 36px;
  }
  body.hs .conv-head .ch-name {
    font-size: 16px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.hs .conv-head .head-right {
    order: 2;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: 0;
    overflow: visible;
    gap: 2px;
  }
  /* Members are in the ⋯ menu and channel details; the facepile would
     push the name off the line. */
  body.hs .conv-head .facepile {
    display: none;
  }
  /* The header's buttons are sized in 21-conv-header.css. */
  body.hs .conv-head .ch-tabs {
    order: 3;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 0 0 2px;
    border-radius: 0;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  body.hs .conv-head .ch-tabs::-webkit-scrollbar {
    display: none;
  }
  body.hs .conv-head .ch-tabs > .ch-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    min-height: 0;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--fg-2);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
  }
  body.hs .conv-head .ch-tabs > .ch-tab.active {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
    box-shadow: none;
  }
  body.hs .conv-head .ch-tab.active .ch-tab-n {
    color: var(--bg);
    opacity: 0.8;
  }
}

/* ------------------- phone: bottom bar, current section --------------- */
/* The section you are in gets a soft pill behind its icon and dark ink,
   instead of only a violet tint that was easy to miss. */
@media (max-width: 820px) {
  #mnav .mnav-btn {
    color: var(--hs-ink-3);
  }
  #mnav .mnav-btn svg {
    box-sizing: content-box;
    padding: 4px 16px;
    border-radius: 999px;
    transition: background 0.15s ease;
  }
  #mnav .mnav-btn.active {
    color: var(--hs-ink);
  }
  #mnav .mnav-btn.active svg {
    background: var(--sh-accent);
  }
  #mnav .mnav-btn.active span {
    font-weight: 600;
  }
  #mnav .mnav-badge {
    top: 3px;
    margin-left: 8px;
  }
  #mnav .mnav-dot {
    top: 5px;
    margin-left: 12px;
  }
}

/* Placeholder: shown whenever the box is empty, including after typing and
   deleting (see .is-empty in wireComposer). */
.cmp-input.is-empty:before {
  content: attr(data-ph);
  color: var(--fg-3);
  pointer-events: none;
  position: absolute;
}
.cmp-input {
  position: relative;
}

/* ------------------- phone: message actions + swipe ------------------- */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  /* The actions caret is always there on touch (no long press). */
  body.hs .msg .msg-caret,
  body.hs .msg.acts-open .msg-caret {
    display: grid;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
  }
  /* Vertical scrolling stays with the browser; a horizontal drag is ours
     (swipe to reply). */
  body.hs .msg {
    position: relative;
    touch-action: pan-y;
  }
  .swipe-reply {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%) scale(0.85);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--sh-muted);
    color: var(--hs-ink-2);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .msg.swipe-ready .swipe-reply {
    transform: translateY(-50%) scale(1);
    background: var(--hs-ink);
    color: var(--hs-card);
  }
}

/* ------------------------------ inbox rows ---------------------------- */
/* Desktop and phone: avatar · name ··· time / unread count, no message
   preview, a hairline between rows starting after the avatar. Sizes are
   variables so the phone only changes numbers. */
body.hs .sb-row[data-conv] {
  --sb-av: 24px;
  --sb-pad: 10px;
  display: grid;
  grid-template-columns: var(--sb-av) minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  height: auto;
  min-height: calc(var(--sb-av) + 12px);
  padding: 6px var(--sb-pad);
  position: relative;
  text-align: left;
}
body.hs .sb-row[data-conv]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hs-line);
}
body.hs .sb-row[data-conv] .ico {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: var(--sb-av);
  height: var(--sb-av);
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sh-muted);
  color: var(--hs-ink-2);
}
body.hs .sb-row[data-conv] .ico > svg {
  width: 14px;
  height: 14px;
}
body.hs .sb-row[data-conv] .ico .conv-av,
body.hs .sb-row[data-conv] .ico .conv-av .avatar {
  width: var(--sb-av);
  height: var(--sb-av);
  border-radius: 50%;
  object-fit: cover;
}
body.hs .sb-row[data-conv] .sb-lines {
  display: contents;
}
body.hs .sb-row[data-conv] .nm {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--hs-ink);
  font-weight: 500;
}
body.hs .sb-row[data-conv] .sb-prev {
  display: none;
}
body.hs .sb-row[data-conv] .sb-when,
body.hs .sb-row[data-conv]:has(.sb-prev) .sb-when {
  display: block;
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  margin: 0;
  font-size: 11.5px;
  color: var(--hs-ink-3);
  white-space: nowrap;
}
.sb-row[data-conv] .sb-badges {
  grid-column: 3;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-height: 18px;
}
body.hs .sb-row[data-conv]:not(:has(.sb-when)) .sb-badges {
  grid-row: 1 / span 2;
}
body.hs .sb-row[data-conv].unread .nm {
  font-weight: 600;
}
body.hs .sb-row[data-conv].unread .sb-when {
  color: var(--unread);
  font-weight: 600;
}
@media (max-width: 820px) {
  body.hs .sb-row[data-conv] {
    --sb-av: 36px;
    --sb-pad: 16px;
    column-gap: 12px;
    min-height: 52px;
    padding: 8px var(--sb-pad);
    border-radius: 0;
  }
  body.hs .sb-row[data-conv] .ico > svg {
    width: 17px;
    height: 17px;
  }
  body.hs .sb-row[data-conv] .nm {
    font-size: 15.5px;
  }
  body.hs .sb-row[data-conv] .sb-when {
    font-size: 12px;
  }
  body.hs .sb-row[data-conv] .pill {
    min-width: 20px;
    height: 20px;
    font-size: 11.5px;
  }
  body.hs .sb-row[data-conv].active,
  body.hs .sb-row[data-conv].active:hover {
    border-radius: 0;
  }
}

/* Conversation rows are full-bleed blocks: square corners, so the hover
   and selected highlight fill the whole row edge to edge. */
body.hs .sb-row[data-conv],
body.hs .sb-row[data-conv]:hover,
body.hs .sb-row[data-conv].active,
body.hs .sb-row[data-conv].active:hover {
  border-radius: 0;
}
/* Sections are padded 8px on each side; conversation rows step out of that
   padding so the highlight reaches both edges of the list. */
body.hs .sb-section .sb-row[data-conv] {
  width: calc(100% + 16px);
  margin-left: -8px;
  margin-right: -8px;
  --sb-pad: 18px;
}
@media (max-width: 820px) {
  body.hs .sb-section .sb-row[data-conv] {
    --sb-pad: 20px;
  }
}

/* The sidebar header matches the conversation header's 56px, so the two
   bottom borders form one continuous line across the page. */
body.hs .sb-head {
  height: 56px;
  flex: 0 0 56px;
  box-sizing: border-box;
}
body.hs .chan-head {
  box-sizing: border-box;
}

/* Row separators are a phone thing; the desktop sidebar has none. */
@media (min-width: 821px) {
  body.hs .sb-row[data-conv]::after {
    content: none;
  }
}

/* =============================== Ask Hiro ============================= */
/* Hiro's one colour: blue, on the top-bar button and inside the panel. */
:root {
  --hiro-blue: #2563eb;
  --hiro-blue-hover: #1d4ed8;
  --hiro-blue-soft: rgba(37, 99, 235, 0.08);
  --hiro-blue-line: rgba(37, 99, 235, 0.2);
}
[data-theme="dark"] {
  --hiro-blue: #3b82f6;
  --hiro-blue-hover: #60a5fa;
  --hiro-blue-soft: rgba(59, 130, 246, 0.14);
  --hiro-blue-line: rgba(59, 130, 246, 0.3);
}
/* Top bar: the pill keeps its shape; the orb and the hover go blue. */
body.hs #btnHiroTop .orb {
  background: var(--hiro-blue);
  color: #fff;
}
body.hs #btnHiroTop:hover {
  border-color: var(--hiro-blue-line);
  background: var(--hiro-blue-soft);
}
@media (max-width: 820px) {
  body.hs #btnHiroTop .orb,
  body.hs .hs-top #btnHiroTop .orb {
    background: none;
    color: var(--hiro-blue);
  }
  body.hs #btnHiroTop:hover {
    background: none;
  }
}

/* The panel: a plain card that drops from the top bar on desktop. */
body.hs #hiroPanel {
  border: 1px solid var(--hs-line);
  border-radius: 16px;
  background: var(--hs-card);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.25), var(--sh-shadow-md);
}
@media (min-width: 821px) {
  body.hs #hiroPanel {
    top: 64px;
    bottom: auto;
    right: 16px;
    width: min(400px, calc(100vw - 32px));
    height: min(640px, calc(100vh - 84px));
  }
}
body.hs #hiroPanel .hiro-head {
  padding: 14px 14px 12px 16px;
  background: none;
  border-bottom: 1px solid var(--hs-line);
}
body.hs #hiroPanel .hiro-title {
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}
body.hs #hiroPanel .hiro-title .orb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--hiro-blue);
  color: #fff;
  font-size: 15px;
}
body.hs #hiroPanel .hiro-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--hs-ink-3);
}
body.hs #hiroPanel .hiro-close:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs #hiroPanel .hiro-provider {
  margin: 4px 0 0 40px;
  font-size: 11.5px;
}
/* Scope and conversation pickers: two quiet rows of shadcn selects. */
body.hs #hiroPanel .hiro-scope,
body.hs #hiroPanel .hiro-threadbar {
  padding: 8px 14px;
  gap: 8px;
  font-size: 12px;
  border-bottom: 0;
}
body.hs #hiroPanel .hiro-scope {
  padding-top: 12px;
}
body.hs #hiroPanel .hiro-threadbar {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hs-line);
}
body.hs #hiroPanel .hiro-scope > span {
  font-weight: 500;
  color: var(--hs-ink-3);
}
body.hs #hiroPanel .hiro-scope select,
body.hs #hiroPanel .hiro-threadbar select {
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--hs-line);
  background: var(--hs-card);
  color: var(--hs-ink);
  font: inherit;
  font-size: 13px;
}
body.hs #hiroPanel .hiro-threadbar button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--hs-line);
  background: var(--hs-card);
  color: var(--hs-ink-2);
}
body.hs #hiroPanel .hiro-threadbar button:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
/* Conversation. */
body.hs #hiroPanel .hiro-feed {
  padding: 16px 14px;
  gap: 12px;
}
body.hs #hiroPanel .hiro-welcome {
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--hiro-blue-soft);
  border: 1px solid var(--hiro-blue-line);
  color: var(--hs-ink-2);
  font-size: 13px;
  line-height: 1.55;
}
body.hs #hiroPanel .hiro-welcome b {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hs-ink);
}
body.hs #hiroPanel .hiro-msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
}
body.hs #hiroPanel .hiro-msg.user {
  background: var(--hiro-blue);
  color: #fff;
  border-bottom-right-radius: 4px;
}
body.hs #hiroPanel .hiro-msg.assistant {
  background: var(--sh-muted);
  border: 0;
  color: var(--hs-ink);
  border-bottom-left-radius: 4px;
}
body.hs #hiroPanel .hiro-msg.error {
  background: #fef2f2;
  color: #b91c1c;
}
body.hs #hiroPanel .hiro-cite {
  padding: 4px 9px;
  border: 1px solid var(--hiro-blue-line);
  background: var(--hs-card);
  color: var(--hiro-blue);
  font-size: 11px;
  font-weight: 500;
}
body.hs #hiroPanel .hiro-cite:hover {
  background: var(--hiro-blue-soft);
}
body.hs #hiroPanel .hiro-action {
  padding: 12px;
  border-radius: 12px;
  background: var(--hs-card);
}
body.hs #hiroPanel .hiro-action-head {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
body.hs #hiroPanel .hiro-action-title {
  font-weight: 600;
}
body.hs #hiroPanel .hiro-action-meta {
  font-size: 12px;
}
body.hs #hiroPanel .hiro-action-status {
  background: var(--hiro-blue-soft);
  color: var(--hiro-blue);
}
body.hs #hiroPanel .hiro-action-buttons button {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}
body.hs #hiroPanel .hiro-action-buttons .confirm {
  background: var(--hiro-blue);
  border-color: var(--hiro-blue);
  color: #fff;
}
/* Suggestions: the same chips as search. */
body.hs #hiroPanel .hiro-starters {
  gap: 6px;
  padding: 0 14px 10px;
  scrollbar-width: none;
}
body.hs #hiroPanel .hiro-starters::-webkit-scrollbar {
  display: none;
}
body.hs #hiroPanel .hiro-starters button {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hs-line);
  border-radius: 999px;
  background: var(--hs-card);
  color: var(--hs-ink-2);
  font-size: 12.5px;
  font-weight: 500;
}
body.hs #hiroPanel .hiro-starters button:hover {
  border-color: var(--hiro-blue-line);
  background: var(--hiro-blue-soft);
  color: var(--hiro-blue);
}
/* Ask box: one rounded field with the send button inside it. */
body.hs #hiroPanel .hiro-compose {
  position: relative;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--hs-line);
  background: var(--hs-card);
}
body.hs #hiroPanel .hiro-compose textarea {
  min-height: 46px;
  max-height: 120px;
  padding: 12px 52px 12px 14px;
  border: 1px solid var(--hs-line);
  border-radius: 14px;
  background: var(--hs-card);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
}
body.hs #hiroPanel .hiro-compose textarea:focus {
  border-color: var(--hiro-blue);
  box-shadow: 0 0 0 3px var(--hiro-blue-soft);
}
body.hs #hiroPanel .hiro-send {
  position: absolute;
  right: 20px;
  bottom: 19px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--hiro-blue);
  color: #fff;
}
body.hs #hiroPanel .hiro-send:hover:not(:disabled) {
  background: var(--hiro-blue-hover);
}
body.hs #hiroPanel .hiro-send:disabled {
  opacity: 0.35;
}
@media (max-width: 820px) {
  body.hs #hiroPanel {
    border-radius: 0;
    border: 0;
  }
  body.hs #hiroPanel .hiro-close {
    width: 40px;
    height: 40px;
  }
  body.hs #hiroPanel .hiro-compose {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
  body.hs #hiroPanel .hiro-send {
    bottom: calc(19px + env(safe-area-inset-bottom));
  }
  body.hs #hiroPanel .hiro-compose textarea {
    font-size: 16px;
  }
}

/* Ask box: starts one line (46px) tall; the send button is centred on
   that line and stays pinned to the bottom-right as the box grows. */
body.hs #hiroPanel .hiro-compose {
  display: block;
}
body.hs #hiroPanel .hiro-compose textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  height: 46px;
  min-height: 46px;
  overflow-y: auto;
}
body.hs #hiroPanel .hiro-send {
  right: 19px;
  bottom: 19px;
}
@media (max-width: 820px) {
  body.hs #hiroPanel .hiro-send {
    bottom: calc(19px + env(safe-area-inset-bottom));
  }
}

/* Hiro header: title + current chat, then History, New chat, close.
   The old conversation dropdown row is hidden (kept as data only). */
body.hs #hiroPanel .hiro-threadbar {
  display: none;
}
body.hs #hiroPanel .hiro-scope {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hs-line);
}
.hiro-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.2;
}
.hiro-titles small {
  font-size: 12px;
  font-weight: 400;
  color: var(--hs-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.hs #hiroPanel .hiro-close {
  margin-left: 0;
}
.hiro-hbtn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hs-ink-3);
  cursor: pointer;
}
.hiro-hbtn:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs #hiroPanel .hiro-provider {
  margin-left: 40px;
}
/* History popover. */
#layers > .menu.hiro-hist {
  width: 300px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
}
.hiro-hist-h {
  padding: 6px 8px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
}
.hiro-hist-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.hiro-hist-item:hover {
  background: var(--sh-muted);
}
.hiro-hist-item.on {
  background: var(--hiro-blue-soft);
}
.hiro-hist-t {
  font-size: 13.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hiro-hist-s {
  font-size: 12px;
  color: var(--fg-3);
}
.hiro-hist-empty {
  padding: 14px 8px;
  font-size: 13px;
  color: var(--fg-3);
}

/* Tooltip for icon buttons (see the tooltip block in 00-head.js). */
.ui-tip {
  position: fixed;
  z-index: 2000;
  max-width: 240px;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--hs-ink, #171717);
  color: var(--hs-card, #fff);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.ui-tip.show {
  opacity: 1;
  transform: none;
}

/* A new chat has no subtitle, and a healthy model no status line. */
.hiro-titles small:empty,
body.hs #hiroPanel .hiro-provider[hidden] {
  display: none;
}

/* Ask Hiro in the chat's theme. Only the Hiro mark (the ✦ orb) stays
   blue; bubbles, buttons, chips and focus follow the conversation view:
   your questions in the soft "mine" bubble, Hiro's answers in the grey
   "theirs" bubble, the green send, neutral chips and focus. */
body.hs #hiroPanel .hiro-msg {
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 14px;
}
body.hs #hiroPanel .hiro-msg.user {
  background: var(--msg-mine-bg);
  color: var(--msg-mine-fg);
  border-bottom-right-radius: 14px;
}
body.hs #hiroPanel .hiro-msg.assistant {
  background: var(--sh-muted);
  color: var(--hs-ink);
  border-bottom-left-radius: 14px;
}
body.hs #hiroPanel .hiro-welcome {
  background: var(--sh-muted);
  border: 0;
}
body.hs #hiroPanel .hiro-cite {
  border-color: var(--hs-line);
  color: var(--hs-ink-2);
}
body.hs #hiroPanel .hiro-cite:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs #hiroPanel .hiro-hist-item.on,
.hiro-hist-item.on {
  background: var(--sh-accent);
}
body.hs #hiroPanel .hiro-action-status {
  background: var(--sh-muted);
  color: var(--hs-ink-2);
}
body.hs #hiroPanel .hiro-action-buttons .confirm {
  background: var(--green);
  border-color: var(--green);
  color: #fafafa;
}
body.hs #hiroPanel .hiro-starters button:hover {
  border-color: var(--hs-line);
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs #hiroPanel .hiro-compose textarea:focus {
  border-color: var(--hs-ink-3);
  box-shadow: none;
}
body.hs #hiroPanel .hiro-send {
  border-radius: 8px;
  background: var(--green);
  color: #fafafa;
}
body.hs #hiroPanel .hiro-send:hover:not(:disabled) {
  background: var(--green-hover, var(--green));
}
body.hs #hiroPanel .hiro-send:disabled {
  opacity: 1;
  background: transparent;
  color: var(--hs-ink-3);
}
.hiro-hist-item.on {
  background: var(--sh-accent);
}

/* ----------------- phone: message actions drawer ---------------------- */
/* Long press opens the drawer, so the per-message caret and hover toolbar
   are not shown on touch. */
@media (max-width: 820px), (hover: none) and (pointer: coarse) {
  body.hs .msg .msg-caret,
  body.hs .msg.acts-open .msg-caret,
  body.hs .msg .msg-tools {
    display: none;
  }
  body.hs .msg .content {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
}
.bsheet {
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
}
.bsheet-list {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.bsheet-sep {
  height: 1px;
  margin: 6px 12px;
  background: var(--hs-line);
}
.bsheet-h {
  padding: 12px 12px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--hs-ink-3);
}
.bsheet-item.danger,
.bsheet-item.danger .bsheet-ico {
  color: #dc2626;
}
/* Message drawer: plain icon rows (no discs), quick reactions on top. */
.msg-sheet .bsheet-item {
  gap: 16px;
  min-height: 48px;
  padding: 8px 14px;
}
.msg-sheet .bsheet-ico {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: none;
  color: var(--hs-ink-2);
}
.msg-sheet .bsheet-ico svg {
  width: 20px;
  height: 20px;
}
.msg-sheet .bsheet-txt b {
  font-size: 15px;
  font-weight: 400;
}
.bsheet-rx {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 10px 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--hs-line);
}
.bsheet-rx-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.bsheet-rx-btn:active {
  background: var(--sh-muted);
}
.bsheet-rx-btn.more {
  background: var(--sh-muted);
  color: var(--hs-ink-2);
}
.bsheet-rx-btn.more svg {
  width: 22px;
  height: 22px;
}

/* Phone inbox rows: name ··· time / (tick) preview ··· unread — as the
   messenger layout. Desktop keeps avatar + name only. */
body.hs .sb-row[data-conv] .sb-when,
body.hs .sb-row[data-conv] .sb-prev {
  display: none;
}
@media (max-width: 820px) {
  body.hs .sb-row[data-conv] {
    --sb-av: 48px;
    min-height: 72px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  body.hs .sb-row[data-conv]:has(.sb-prev) .nm {
    grid-row: 1;
    align-self: end;
  }
  body.hs .sb-row[data-conv] .sb-prev {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    align-self: start;
    font-size: 13.5px;
    color: var(--hs-ink-3);
  }
  body.hs .sb-row[data-conv].unread .sb-prev {
    color: var(--hs-ink-2);
  }
  body.hs .sb-row[data-conv] .sb-prev-t {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.hs .sb-row[data-conv] .sb-when {
    display: block;
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    margin: 0;
    font-size: 12px;
    color: var(--hs-ink-3);
    white-space: nowrap;
  }
  body.hs .sb-row[data-conv].unread .sb-when {
    color: var(--unread);
    font-weight: 600;
  }
  body.hs .sb-row[data-conv]:has(.sb-when) .sb-badges {
    grid-row: 2;
    align-self: start;
  }
}

/* Bottom bar: the current section is shown by its filled icon (the rest
   are outlined) and darker label, no pill behind it. */
@media (max-width: 820px) {
  #mnav .mnav-btn svg,
  #mnav .mnav-btn.active svg {
    padding: 0;
    background: none;
    border-radius: 0;
  }
  #mnav .mnav-badge {
    top: 6px;
    margin-left: 4px;
  }
  #mnav .mnav-dot {
    top: 9px;
    margin-left: 7px;
  }
}

/* Desktop message menu: a reaction row above the actions. */
.menu-top {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 2px 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.menu-rx-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.menu-rx-btn:hover {
  background: var(--sh-muted);
}
.menu-rx-btn.more {
  background: var(--sh-muted);
  color: var(--fg-2);
}
.menu-rx-btn.more svg {
  width: 16px;
  height: 16px;
}
.msg.menu-open .msg-caret {
  display: grid;
}

/* Reaction pill on the bubble's bottom edge (reactionsHTML). */
body.hs .msg .content .reactions {
  position: absolute;
  bottom: -13px;
  left: 10px;
  margin: 0;
  z-index: 2;
}
body.hs .msg.mine .content .reactions {
  left: auto;
  right: 10px;
}
body.hs .msg .content .reactions:empty {
  display: none;
}
body.hs .msg .content:has(.rx-sum) {
  margin-bottom: 16px;
}
.rx-sum {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--hs-line);
  border-radius: 999px;
  background: var(--hs-card);
  box-shadow: var(--sh-shadow-xs);
  color: var(--hs-ink-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.rx-sum:hover {
  background: var(--sh-muted);
}
.rx-sum.mine {
  border-color: #a3a3a3;
}
.rx-ems {
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1px;
}
body.hs .msg.mine .content .reactions .rx-sum {
  background: var(--hs-card);
  color: var(--hs-ink-2);
}
.rx-menu-em {
  font-size: 18px;
  line-height: 1;
}

/* Reaction pill, refined: never wraps (a narrow bubble was squeezing the
   emoji onto two lines), and the bubble gets a little inner room at the
   bottom so the pill straddles the edge without covering "Sent" or the
   time. */
body.hs .msg .content .reactions {
  bottom: -12px;
  width: max-content;
  white-space: nowrap;
}
.rx-sum,
.rx-ems {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.rx-ems {
  display: inline-flex;
  gap: 1px;
  letter-spacing: 0;
}
.rx-sum {
  height: 22px;
  padding: 0 6px 0 5px;
  gap: 4px;
}
.rx-n {
  font-variant-numeric: tabular-nums;
}
body.hs .msg .content:has(.rx-sum) {
  padding-bottom: 16px;
  margin-bottom: 14px;
}

/* Desktop sidebar rows: avatar + name only — no time, no preview (the
   :has() variants outranked the earlier hide). */
@media (min-width: 821px) {
  body.hs .sb-row[data-conv] .sb-when,
  body.hs .sb-row[data-conv]:has(.sb-prev) .sb-when,
  body.hs .sb-row[data-conv] .sb-prev {
    display: none;
  }
  body.hs .sb-row[data-conv] .sb-badges,
  body.hs .sb-row[data-conv]:has(.sb-when) .sb-badges {
    grid-row: 1 / span 2;
    align-self: center;
  }
  body.hs .sb-row[data-conv] .nm,
  body.hs .sb-row[data-conv]:has(.sb-prev) .nm {
    grid-row: 1 / span 2;
    align-self: center;
  }
}

/* A menu row with a second line (openMenu's `sub`): the "Seen by" list puts
   when each person saw the message under their name. */
.menu-item .menu-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.menu-item .menu-txt small {
  margin-top: 2px;
  color: var(--hs-ink-3, #6b7280);
  font-size: 12px;
}
.seen-by-menu {
  min-width: 260px;
  max-height: min(420px, 70vh);
}
.seen-by-menu .menu-item img.avatar,
.seen-by-sheet .bsheet-ico img.avatar {
  border-radius: 50%;
  object-fit: cover;
}
/* On a phone: the sheet's icon circle is the avatar itself, and a long list
   scrolls inside the sheet instead of running off the screen. */
.seen-by-sheet .bsheet-ico {
  background: transparent;
}
.seen-by-sheet .bsheet-list {
  max-height: 62vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* The call's chat panel sits on the call screen, which is always dark; in
   light mode it was a white slab on it. It takes the dark theme's colours in
   both themes (all three token sets: base, sign-in/shell, this sheet). */
.huddle-stage .hs-chat {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #171717;
  --hover: #1c1c1c;
  --fg: #fafafa;
  --fg-2: #d4d4d4;
  --fg-3: #a3a3a3;
  --border: #262626;
  --border-2: #2e2e2e;
  --ring: #737373;
  --accent-soft: #262626;
  --link: #60a5fa;
  --red: #f87171;
  --mention-bg: rgba(245, 158, 11, 0.16);
  --highlight: #5c4a1e;
  --guest-bg: rgba(245, 158, 11, 0.18);
  --guest-fg: #fbbf24;
  --chrome-field: rgba(255, 255, 255, 0.06);
  --chrome-field-border: rgba(255, 255, 255, 0.12);
  --hs-canvas: #0a0a0a;
  --hs-card: #171717;
  --hs-line: rgba(255, 255, 255, 0.1);
  --hs-line-soft: rgba(255, 255, 255, 0.06);
  --hs-ink: #fafafa;
  --hs-ink-2: #d4d4d4;
  --hs-ink-3: #a1a1a1;
  --hs-violet: #e5e5e5;
  --hs-violet-soft: #262626;
  --hs-on-violet: #171717;
  --hs-active: #2e2e2e;
  --hs-red: #f87171;
  --hs-red-soft: rgba(248, 113, 113, 0.15);
  --hs-amber-soft: rgba(245, 158, 11, 0.16);
  --sh-muted: #262626;
  --sh-accent: #262626;
  --sh-ring: rgba(115, 115, 115, 0.45);
  --msg-mine-bg: #1e3a5f;
  --msg-mine-fg: #f1f5f9;
  --msg-mine-sub: rgba(241, 245, 249, 0.72);
  --msg-mine-tint: rgba(255, 255, 255, 0.1);
  --msg-mine-line: rgba(255, 255, 255, 0.18);
  --msg-mine-link: #93c5fd;
  color-scheme: dark;
  background: var(--bg);
  color: var(--fg);
}
/* The same bell-off as the sidebar row, beside the channel's name. */
body.hs .conv-muted {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 6px;
  color: var(--fg-3);
}

/* New channel form (one-list plan B4): who is in it, and errors in place. */
.nc-people { display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.nc-people .avatar { border-radius: 50%; }
.nc-people .small { margin-left: 6px; }
.nc-more { font-size: 12px; font-weight: 700; color: var(--fg-2); padding: 0 4px; }
.nc-err { color: var(--red); font-size: 12.5px; line-height: 1.35; }
.nc-err:empty { display: none; }
.np-foot .nc-err { display: block; flex: 1; margin-right: 8px; }
/* You, always picked in New (D17): no remove button, so even padding. */
.np-chip-me {
  padding-right: 10px;
}
/* Scheduled calls (Release B): huddle-button menu, form, upcoming list. */
.huddle-menu-btn .hm-caret {
  display: inline-flex;
  margin-left: 2px;
  opacity: 0.6;
}
.sched-form .fl {
  margin-top: 12px;
}
.sched-form .fl:first-child {
  margin-top: 0;
}
.sched-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* Date · Start · Duration on one row (calendar v2); on a phone Duration
   takes a row of its own. */
.sched-row.sched-when {
  grid-template-columns: 1.4fr 1fr 1fr;
}
@media (max-width: 560px) {
  .sched-row.sched-when {
    grid-template-columns: 1fr 1fr;
  }
  .sched-row.sched-when .sched-durf {
    grid-column: 1 / -1;
  }
}
#scEnds {
  margin-top: 8px;
}
#scEnds.sched-warn {
  color: var(--red);
}
.sched-ctl {
  margin-top: 14px;
  align-items: center;
}
.sched-list {
  display: grid;
  gap: 8px;
}
.sched-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.sched-title {
  font-weight: 700;
}
.sched-acts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.sched-picks {
  max-height: 300px;
  overflow: auto;
  margin-top: 8px;
}
.sched-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
@media (max-width: 600px) {
  .sched-item {
    flex-wrap: wrap;
  }
  .sched-acts {
    width: 100%;
  }
}

/* B3: card line, details. (The header chip became the call strip,
   21-conv-header.css.) */
[data-sched-card] s {
  opacity: 0.7;
}
.sched-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.sched-badge.on {
  background: var(--presence);
  color: #fff;
}
.sched-badge.off {
  background: var(--bg-3);
  color: var(--fg-2);
}
.sched-details {
  display: grid;
  gap: 2px;
  /* A full-screen modal on phones: rows stay at the top. */
  align-content: start;
}
.sd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.sd-k {
  width: 96px;
  flex-shrink: 0;
  color: var(--fg-2);
  font-size: 13px;
}
.sd-v {
  flex: 1;
  min-width: 0;
}
.sd-desc {
  margin-top: 12px;
  white-space: pre-wrap;
}
.m-foot .grow {
  flex: 1;
}
.m-foot .grow:empty {
  display: none;
}
@media (max-width: 820px) {
  .sched-details + .m-foot,
  .modal .m-foot:has([data-sd-edit]) {
    flex-wrap: wrap;
  }
}

/* ---------- B6: the Calendar page ---------- */
.cal-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}
.cal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.cal-bar [data-cal-step="-1"] svg {
  transform: rotate(90deg);
}
.cal-bar [data-cal-step="1"] svg {
  transform: rotate(-90deg);
}
.cal-label {
  font-weight: 700;
  font-size: 15px;
  margin-left: 6px;
}
.cal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
/* Day / Week grid */
.cal-grid {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cal-heads,
.cal-rows {
  display: grid;
  grid-template-columns: 64px repeat(var(--cal-cols), minmax(0, 1fr));
}
.cal-heads {
  border-bottom: 1px solid var(--border);
}
.cal-colhead {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  font-size: 12px;
  color: var(--fg-2);
  cursor: pointer;
}
.cal-colhead b {
  font-size: 18px;
  color: var(--fg);
}
.cal-colhead.today b {
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-full);
  min-width: 30px;
  text-align: center;
}
.cal-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.cal-rows {
  position: relative;
}
.cal-hours {
  grid-column: 1;
}
.cal-hour {
  height: var(--cal-hour, 72px);
  position: relative;
  font-size: 11px;
  color: var(--fg-3);
  text-align: right;
  padding-right: 8px;
}
.cal-hour span {
  position: relative;
  top: -7px;
}
.cal-col {
  position: relative;
  height: calc(var(--cal-hour, 72px) * 24);
  border-left: 1px solid var(--border);
  background-image: linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 100% var(--cal-hour, 72px);
}
.cal-col.today {
  background-color: color-mix(in srgb, var(--hover) 50%, transparent);
}
.cal-ev {
  position: absolute;
  margin-left: 2px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  /* A fill drawn from the text colour shows on both themes: --bg-3 alone
     was nearly the page colour in dark mode, so a call all but vanished. */
  border: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  border-left: 3px solid var(--fg-2);
  background: color-mix(in srgb, var(--fg) 8%, var(--bg));
  color: var(--fg);
  font-size: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-ev:hover {
  background: color-mix(in srgb, var(--fg) 13%, var(--bg));
}
.cal-ev b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev span {
  color: var(--fg-2);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev .btn {
  align-self: flex-start;
  margin-top: 2px;
}
.cal-ev.live {
  border-left-color: var(--presence);
}
.cal-ev.past,
.cal-pill.past {
  opacity: 0.55;
}
.cal-now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--red);
  z-index: 2;
  pointer-events: none;
}
.cal-now::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
}
.cal-empty {
  padding: 8px 20px;
}
/* Month */
.cal-month {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cal-mhead,
.cal-mgrid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-mhead div {
  padding: 8px;
  font-size: 12px;
  color: var(--fg-2);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.cal-mgrid {
  flex: 1;
  grid-auto-rows: minmax(104px, 1fr);
}
.cal-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cal-cell.other {
  background: color-mix(in srgb, var(--bg-2) 60%, transparent);
}
.cal-cell.other .cal-date {
  color: var(--fg-3);
}
.cal-date {
  align-self: flex-start;
  border: 0;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.cal-cell.today .cal-date {
  background: var(--fg);
  color: var(--bg);
}
.cal-pill,
.cal-more {
  border: 0;
  background: var(--bg-3);
  color: var(--fg);
  font: inherit;
  font-size: 11.5px;
  text-align: left;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-pill span {
  color: var(--fg-2);
}
.cal-pill.live {
  box-shadow: inset 3px 0 0 var(--presence);
}
.cal-more {
  background: none;
  color: var(--fg-2);
}
/* Agenda (calendar v2, A2): every day in a column of dates — weekday and
   number on the left, that day's calls on the right, a hairline between
   days. An empty day is one short, quiet line. On web it sits in a card;
   on a phone it runs edge to edge. */
.cal-agenda {
  /* As wide as the page, like Day, Week and Month — a narrow column left
     half the screen empty on a laptop. */
  margin: 16px 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  overflow: hidden;
}
.ag-month {
  padding: 14px 16px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.ag-day {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  /* Every day the same height, empty or not, so the list keeps one rhythm. */
  min-height: 68px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.ag-day:last-child {
  border-bottom: 0;
}
.ag-date {
  width: 52px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.ag-date small {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.ag-date b {
  font-size: 20px;
  font-weight: 600;
  color: var(--fg);
}
.ag-date.today small,
.ag-date.today b {
  color: var(--blue);
}
.ag-list {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* An empty day keeps the same date column; its number is quieter, and
   "No calls" sits in the middle of the row. */
.ag-day.quiet {
  align-items: center;
}
.ag-day.quiet .ag-date b {
  color: var(--fg-2);
}
.ag-day.quiet .ag-date.today b {
  color: var(--blue);
}
.ag-empty {
  font-size: 13px;
  color: var(--fg-3);
}
/* A call: a soft tile with its coloured edge — no outline, so a row as
   wide as the page doesn't read as a form field. */
.ag-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 6px 14px;
  border-left: 3px solid var(--fg-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--fg) 5%, transparent);
  cursor: pointer;
}
.ag-row:hover {
  background: color-mix(in srgb, var(--fg) 9%, transparent);
}
.ag-row.live {
  border-left-color: var(--presence);
}
.ag-row.past {
  opacity: 0.55;
}
.ag-time {
  width: 132px;
  flex: none;
  font-size: 13px;
  color: var(--fg-2);
  font-variant-numeric: tabular-nums;
}
.ag-start {
  display: none;
}
.ag-what {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ag-what b,
.ag-what small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ag-what b {
  font-size: 14px;
  font-weight: 600;
}
.ag-what small {
  font-size: 12px;
  color: var(--fg-2);
}
.ag-more {
  margin: 12px 20px 96px;
}
.cal-agenda h4 {
  margin: 18px 0 6px;
  font-size: 13px;
  color: var(--fg-2);
}
.cal-act {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.cal-on {
  color: var(--presence);
  font-weight: 700;
  font-size: 12px;
}
.sched-people {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--fg);
  font: inherit;
  text-align: left;
  margin-top: 6px;
}
.sched-people small {
  display: block;
}
.cal-fab {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  z-index: 3;
  border-radius: 50%;
  border: 0;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
}
@media (max-width: 820px) {
  .cal-bar {
    padding: 10px 16px;
  }
  .cal-bar .small.muted {
    display: none;
  }
  .cal-agenda {
    margin: 0;
    border: 0;
    border-radius: 0;
    max-width: none;
  }
  .ag-day {
    gap: 12px;
    min-height: 60px;
    padding: 10px 14px;
  }
  .ag-date {
    width: 40px;
  }
  .ag-time {
    width: 62px;
    font-size: 12px;
  }
  .ag-range {
    display: none;
  }
  .ag-start {
    display: inline;
  }
  .ag-more {
    margin: 12px 14px 96px;
  }
}

.cal-ev.short {
  padding: 1px 6px;
  justify-content: center;
}
.cal-ev.short b {
  font-size: 11.5px;
  line-height: 1.2;
}
.cal-ev.short b span {
  font-weight: 400;
  font-size: 11px;
  /* In a narrow column the time gives way before the title does: where
     the block sits already says when it is. */
  flex: 0 100 auto;
  min-width: 0;
}

/* Guests in the schedule form (guest calls, P2): an address, an optional
   name, Add; then a chip per guest. A refused address turns its chip red. */
.sched-pick.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Add people in a scheduled call (guest calls, P6; tabs in the UI pass):
   Teammates | Guest by email. */
.hp-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-3);
}
.hp-tabs button {
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: transparent;
  color: var(--fg-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hp-tabs button.on {
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-xs);
}
.hp-pane .fl {
  margin-top: 12px;
}
.hp-pane .input {
  width: 100%;
}
.hg-sub {
  margin-top: 10px;
}
.hp-pane .hg-sub:first-child {
  margin-top: 0;
}
[data-pane][hidden] {
  display: none !important;
}
/* Add people to a huddle: the search stays in view while the list scrolls
   under it, and rows it filters out leave no gap in the grid. */
.hp-search {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-bottom: 10px;
  background: var(--bg);
}
.hp-people .sk-row[hidden],
.hp-people .np-empty[hidden] {
  display: none;
}

/* The schedule form's "Who's coming" (guest calls UI pass): where the call
   lives, one box for guests' addresses, a row per guest. */
.sched-who {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  font-size: 13.5px;
  color: var(--fg);
}
.sched-who-ico {
  display: inline-flex;
  color: var(--fg-3);
  flex-shrink: 0;
}
.sched-who-ico svg {
  width: 15px;
  height: 15px;
}
.sched-gadd {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.sched-gadd .input {
  flex: 1;
  min-width: 0;
  padding-left: 34px;
}
.sched-gadd-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: var(--fg-3);
  pointer-events: none;
}
.sched-glink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 2px 0;
  background: none;
  border: 0;
  color: var(--link);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sched-glink:hover span {
  text-decoration: underline;
}
.sched-glink[hidden],
#scGuestRow[hidden] {
  display: none;
}
.sched-glink svg {
  width: 15px;
  height: 15px;
}
.sched-gadd.bad .input {
  border-color: var(--red);
}
.sched-gerr {
  color: var(--red);
  font-size: 12.5px;
  margin-top: 4px;
}
.sched-gerr:empty {
  display: none;
}
.sched-glist {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.sched-glist:empty {
  display: none;
}
.sched-grow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 10px;
}
.sched-grow + .sched-grow {
  border-top: 1px solid var(--border);
}
.sched-grow.bad {
  background: color-mix(in srgb, var(--red) 8%, transparent);
}
.sched-grow.bad .g-mail {
  color: var(--red);
}
.g-av {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--fg-2);
  font-size: 11.5px;
  font-weight: 700;
}
.g-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.g-name {
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 1px 0;
  outline: none;
  min-width: 0;
}
.g-name::placeholder {
  color: var(--fg-3);
  font-weight: 500;
}
.g-name:focus {
  box-shadow: 0 1px 0 var(--ring);
}
.g-mail {
  font-size: 12px;
  color: var(--fg-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.g-x {
  flex-shrink: 0;
}
.sched-callout {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0 4px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--yellow) 12%, transparent);
  color: var(--fg);
  font-size: 12.5px;
  line-height: 1.45;
}
.sched-callout svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--yellow);
}
.sched-callout.quiet {
  background: none;
  padding: 2px 0 0;
  color: var(--fg-3);
}
.sched-callout.quiet svg {
  color: var(--fg-3);
}
.sched-foot {
  flex-wrap: wrap;
  row-gap: 8px;
}
/* On a phone: the summary on its own line, then the buttons two to a row
   at equal widths. */
@media (max-width: 560px) {
  .modal .m-foot.sched-foot {
    gap: 8px;
  }
  .modal .m-foot.sched-foot {
    grid-template-columns: 1fr 1fr;
  }
  .modal .m-foot.sched-foot .grow {
    grid-column: 1 / -1;
  }
  .modal .m-foot.sched-foot .btn {
    margin: 0;
    justify-content: center;
  }
  /* An odd button out (a lone Close) takes the whole row. */
  .modal .m-foot.sched-foot > .btn:last-child:nth-of-type(odd) {
    grid-column: 1 / -1;
  }
}

/* Where? (Calendar): the two other ways in as cards, then the
   conversations — one tap each. Move keeps a tick and its button. */
.sched-opts {
  display: grid;
  gap: 8px;
}
.sched-opt,
.sched-conv {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: var(--bg);
  cursor: pointer;
}
.sched-opt {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.sched-opt:hover,
.sched-conv:hover:not(:disabled) {
  background: var(--hover);
}
.so-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--fg-2);
  flex-shrink: 0;
}
.so-txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.so-txt b {
  font-size: 14px;
}
.so-txt small,
.sc-name small {
  color: var(--fg-3);
  font-size: 12px;
  line-height: 1.35;
}
.sc-go,
.sc-tick {
  display: inline-flex;
  color: var(--fg-3);
  flex-shrink: 0;
}
.sched-or {
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
}
.sched-where .sched-picks {
  max-height: min(320px, 40vh);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.sched-where .sched-picks .empty {
  padding: 14px;
}
.sched-conv {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.sched-conv:last-child {
  border-bottom: 0;
}
.sc-ico {
  display: inline-flex;
  color: var(--fg-3);
}
.sc-name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sched-conv .sc-tick {
  visibility: hidden;
}
.sched-conv.on .sc-tick {
  visibility: visible;
  color: var(--fg);
}
.sched-conv.on {
  background: var(--accent-soft);
}
.sched-conv.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.sc-ico svg,
.so-ico svg {
  width: 16px;
  height: 16px;
}

/* A scheduled call in the conversation: a card (guest-calls UI pass). */
.scard {
  max-width: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  padding: 10px 12px 12px;
  margin: 2px 0;
}
.scard-by {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fg-3);
  min-width: 0;
}
.scard-by b {
  font-weight: 600;
  color: var(--fg-2);
}
.scard-ic {
  display: inline-flex;
}
.scard-ic svg {
  width: 13px;
  height: 13px;
}
.scard-main {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 6px;
}
.scard-body {
  flex: 1;
  min-width: 0;
}
.scard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14.5px;
  line-height: 1.35;
}
.scard-title b {
  font-weight: 650;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.scard-title s b {
  color: var(--fg-3);
}
.scard-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--fg-2);
  white-space: nowrap;
}
.scard-pill.live {
  background: color-mix(in srgb, var(--presence) 16%, transparent);
  color: var(--presence);
}
.scard-pill.warn {
  background: color-mix(in srgb, var(--yellow) 16%, transparent);
  color: #b45309;
}
html[data-theme="dark"] .scard-pill.warn {
  color: #fbbf24;
}
.scard-pill.off {
  color: var(--fg-3);
}
.scard-when {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--fg-2);
}
.scard-when a {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}
.scard-guests {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--fg-3);
}
.scard-guests svg {
  width: 13px;
  height: 13px;
}
.scard-acts {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.scard-acts:empty {
  display: none;
}
.scard-acts .btn svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
@media (max-width: 560px) {
  .scard-main {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .scard-acts .btn {
    flex: 1;
    justify-content: center;
  }
}

/* Call details (guest-calls UI pass): sections, and a row per guest. */
.sd-h {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sd-sec {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.sd-sec:last-child {
  border-bottom: 0;
}
/* Outlook sync: the organizer's "not updated yet" line. */
.sd-outlook {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sd-outlook svg {
  width: 14px;
  height: 14px;
}
.sd-sec .sd-k {
  width: auto;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
}
.sd-sec .sd-k .muted {
  font-weight: 500;
}
.sd-sec .sd-desc {
  margin-top: 0;
}
.g-nm {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-gstate {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--fg-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.sd-gstate.warn {
  background: color-mix(in srgb, var(--red) 12%, transparent);
  color: var(--red);
}
.sd-addguest {
  margin-top: 8px;
  gap: 4px;
}
/* Invite a guest and Copy call link, side by side (guest calls v2). */
.sd-guest-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.sd-guest-acts .sd-addguest {
  margin-top: 0;
}
.sd-addguest svg {
  width: 14px;
  height: 14px;
}

/* ---- Answers in the call details (calendar v2) ----
   The header names when, where and the crowned organizer; under it, your
   answer, then People. Colours are the --rsvp-* tokens only: the shape
   colour for edges, bars and dots, -ink for text, -tint behind it. */
.sd-headin {
  min-width: 0;
}
.sd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--fg-3);
}
.sd-meta > span,
.sd-metalink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.sd-meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.sd-metalink {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.sd-metalink:hover {
  color: var(--fg);
  text-decoration: underline;
}
.sd-org {
  color: var(--fg-2);
  font-weight: 600;
}
.sd-crown {
  display: inline-flex;
  color: var(--rsvp-yes-ink);
}
.sd-rsvp {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--border);
}
.sd-rsvp .q {
  flex: 1;
  min-width: 110px;
  font-weight: 600;
}
.sd-seg {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg-3);
}
.sd-seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--fg-2);
  cursor: pointer;
}
.sd-seg button:hover {
  color: var(--fg);
}
.sd-seg button.on {
  font-weight: 600;
}
.sd-seg button.on.c-acc {
  color: var(--rsvp-yes-ink);
  background: var(--rsvp-yes-tint);
  box-shadow: inset 0 0 0 1px var(--rsvp-yes);
}
.sd-seg button.on.c-ten {
  color: var(--rsvp-maybe-ink);
  background: var(--rsvp-maybe-tint);
  box-shadow: inset 0 0 0 1px var(--rsvp-maybe);
}
.sd-seg button.on.c-dec {
  color: var(--rsvp-no-ink);
  background: var(--rsvp-no-tint);
  box-shadow: inset 0 0 0 1px var(--rsvp-no);
}
.sd-sec .sd-k svg {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  margin-right: 4px;
}
.sd-tbar {
  display: flex;
  height: 6px;
  margin: 2px 0 10px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--border);
}
.sd-tbar i {
  display: block;
}
.sd-tbar .a {
  background: var(--rsvp-yes);
}
.sd-tbar .t {
  background: var(--rsvp-maybe);
}
.sd-tbar .d {
  background: var(--rsvp-no);
}
.sd-prow {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}
.sd-prow:hover {
  background: var(--bg-2);
}
.sd-prow .grow {
  flex: 1;
  min-width: 0;
}
.sd-prow > svg {
  color: var(--fg-3);
  flex-shrink: 0;
}
.sd-stack {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sd-stack .avatar,
.sd-stack .sd-more {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-left: -7px;
}
.sd-stack > :first-child {
  margin-left: 0;
}
.sd-more {
  display: inline-grid;
  place-items: center;
  background: var(--bg-3);
  color: var(--fg-2);
  font-size: 9px;
  font-weight: 700;
}
/* The organizer's Cancel sits apart from Move and Edit. */
.sched-foot [data-sd-cancel] {
  margin-right: auto;
}
/* Toasts live under dialogs (z-index 900). "Answer saved · Undo" is raised
   from inside the call details, so there it sits above the dialog's scrim
   (1200) — or Undo could not be clicked — and below its menus (1250). */
body:has(.modal .sched-details) .toasts {
  z-index: 1201;
}
/* People: the same dialog or sheet, with Back. The footer's buttons
   belong to the details, so the list hides them. */
.modal.sd-listing .m-foot {
  display: none;
}
.sd-subh {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sd-subh h2 {
  margin: 0;
}
.sd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.sd-chips button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: none;
  font: inherit;
  font-size: 12.5px;
  color: var(--fg-2);
  cursor: pointer;
}
.sd-chips button.on {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.sd-chips b {
  font-weight: 600;
}
.sd-srch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg-3);
}
.sd-srch input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--fg);
}
.sd-srch:focus-within {
  border-color: var(--fg-3);
}
.sd-pp {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 4px;
}
.sd-pp + .sd-pp {
  border-top: 1px solid var(--border);
}
.sd-pp .n {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.sd-pn {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
}
.sd-pp .s {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--fg-3);
}
.sd-pp .s svg {
  width: 13px;
  height: 13px;
  color: var(--rsvp-yes-ink);
}
.sd-pp .tb-btn {
  flex-shrink: 0;
}
.sd-av {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}
.sd-av .avatar,
.sd-av .g-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
/* The answer's mark on the avatar: a tick, a dash, a cross, or a hollow ring. */
.sd-av .st {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--bg);
  color: #fff;
}
.sd-av .st svg {
  width: 9px;
  height: 9px;
  stroke-width: 3.5;
}
.sd-av .st.acc {
  background: var(--rsvp-yes);
}
.sd-av .st.ten {
  background: var(--rsvp-maybe);
}
.sd-av .st.dec {
  background: var(--rsvp-no);
}
.sd-av .st.none {
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px var(--rsvp-none);
}
.sd-pempty {
  padding: 18px 4px;
  font-size: 13px;
  text-align: center;
}
/* On a phone the call details are a sheet from the bottom, as tall as
   what they hold, like other dialogs — not the full screen the docs share
   screen gives every large dialog. */
@media (max-width: 820px) {
  .modal.lg:has(.sched-details) {
    width: 100vw;
    height: auto;
    max-height: 92dvh;
    border-radius: 16px 16px 0 0;
  }
}
/* Phones: the meta stacks, and the three answers fill the width. */
@media (max-width: 560px) {
  .sd-meta {
    flex-direction: column;
    gap: 4px;
  }
  .sd-rsvp .q {
    flex-basis: 100%;
  }
  .sd-seg {
    display: flex;
    width: 100%;
  }
  .sd-seg button {
    flex: 1;
    height: 40px;
  }
  .sd-pp .g-mail {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Pick people: teammates suggested under the box as you type. */
.sched-sugs {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 5;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
}
.sched-sugs[hidden] {
  display: none;
}
.sched-sug {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--fg);
  font: inherit;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.sched-sug img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.sched-sug small {
  color: var(--fg-3);
  font-size: 12px;
}
.sched-sug.on,
.sched-sug:hover {
  background: var(--hover);
}
img.g-av {
  object-fit: cover;
}
.sched-who[hidden] {
  display: none;
}
/* A guest's row: an amber mail avatar, so teammates and guests read apart
   without a label. The note under the list is plain, quiet text. */
.sched-grow.is-guest .g-av {
  background: var(--guest-bg);
  color: var(--guest-fg);
}
.sched-grow.is-guest .g-av svg {
  width: 14px;
  height: 14px;
}
#scGuestNote {
  background: none;
  padding: 2px 0 0;
  color: var(--fg-3);
}
#scGuestNote svg {
  color: var(--fg-3);
}
#scGuestNote[hidden] {
  display: none;
}
/* The footer's "what Schedule still needs": marked and coloured, so it reads
   as the reason the button is off — not as the quiet summary. */
#scWhy.need {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #b45309;
  font-weight: 600;
}
html[data-theme="dark"] #scWhy.need {
  color: #fbbf24;
}
#scWhy.need svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------- Calendar on a phone (calendar v2, A2) ----------
   Agenda | Day under the title; in Day, a strip of dates that scrolls
   sideways (each chip snaps whole, the edges fade to say there is more)
   over one full-width day. */
.cal-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.cal-seg button {
  border: 0;
  background: none;
  color: var(--fg-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 34px;
  padding: 0 14px;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
}
.cal-seg button.on {
  background: var(--bg);
  color: var(--fg);
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0, 0, 0, 0.06));
}
.cal-phone-day .cal-label {
  margin-left: 0;
  font-size: 14px;
}
.cal-strip {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}
.cal-strip::-webkit-scrollbar {
  display: none;
}
.cal-chip {
  flex: 0 0 44px;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0 5px;
  border: 0;
  border-radius: var(--radius-md);
  background: none;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.cal-chip span {
  font-size: 11px;
  color: var(--fg-3);
}
.cal-chip b {
  font-size: 17px;
  line-height: 1.2;
}
.cal-chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fg-3);
}
.cal-chip i[hidden] {
  display: block;
  visibility: hidden;
}
.cal-chip.today {
  box-shadow: inset 0 0 0 1.5px var(--fg-2);
}
.cal-chip.sel {
  background: var(--fg);
  color: var(--bg);
}
.cal-chip.sel span {
  color: var(--bg);
  opacity: 0.75;
}
.cal-chip.sel i {
  background: var(--bg);
}
.cal-phone-day .cal-body {
  overflow: hidden;
}
/* 16-hiro-boot-intro-and-veil.css sizes a .cal-grid to 1008px under 820px,
   left from an older calendar; phones never drew this grid until now. */
.cal-phone-day .cal-grid {
  width: auto;
  min-width: 0;
  display: flex;
  grid-template-columns: none;
  grid-template-rows: none;
}
.cal-phone-day .cal-grid .cal-hours {
  width: 52px;
}
.cal-phone-day .cal-rows {
  grid-template-columns: 52px minmax(0, 1fr);
}
.cal-phone-day .cal-ev {
  font-size: 12.5px;
}

/* ---- Answers on the card, the Calendar and the Agenda (calendar v2) ----
   The same four looks everywhere, from the --rsvp-* tokens only: accepted
   (and the organizer) a green tint and edge, tentative orange stripes,
   declined white with a red edge and the title struck through, no answer
   white with a dashed grey border. Every state carries its own mark too. */
.btn.sc-rsvp {
  gap: 4px;
}
.btn.sc-rsvp svg:last-child {
  width: 13px;
  height: 13px;
  margin: 0 -2px 0 2px;
  opacity: 0.8;
}
.btn.s-acc {
  color: var(--rsvp-yes-ink);
  background: var(--rsvp-yes-tint);
  border-color: var(--rsvp-yes);
}
.btn.s-ten {
  color: var(--rsvp-maybe-ink);
  background: var(--rsvp-maybe-tint);
  border-color: var(--rsvp-maybe);
}
.btn.s-dec {
  color: var(--rsvp-no-ink);
  background: var(--rsvp-no-tint);
  border-color: var(--rsvp-no);
}
/* You declined: the title and time fade — not the status pill, not the
   buttons (Join still works), so the card reads as declined, not broken. */
.scard-main[data-muted] .scard-title b,
.scard-main[data-muted] .scard-when {
  opacity: 0.55;
}
/* When the card's time line, with its clock as in the mock. */
.scard-when > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.scard-when > span:first-child > svg {
  width: 13px;
  height: 13px;
  color: var(--fg-3);
  flex-shrink: 0;
}
/* The card as in the mock: who posted it on a quiet band with its time at
   the right, the call below it, at most two buttons. */
.scard {
  padding: 0;
  overflow: hidden;
}
.scard-by {
  padding: 7px 12px;
  background: color-mix(in srgb, var(--fg) 3%, var(--bg));
  border-bottom: 1px solid var(--border);
}
.scard-by .ev-time {
  margin-left: auto;
  padding-left: 8px;
}
.scard-by .ev-time::before {
  content: none;
}
.scard-main {
  margin-top: 0;
  padding: 10px 12px 12px;
}
.scard-pill.up {
  background: color-mix(in srgb, var(--link) 12%, transparent);
  color: var(--link);
}
@media (max-width: 560px) {
  .scard-acts .btn {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
/* Phone Agenda: Join says the call is on, so the "on now" word goes and the
   title keeps its room; buttons are the same small size as RSVP. */
@media (max-width: 820px) {
  .ag-row .cal-on {
    display: none;
  }
  .ag-row .cal-act .btn {
    min-height: 32px;
    padding: 5px 12px;
  }
}
/* The answer menu: each choice in its colour, yours ticked. */
.rsvp-menu .menu-item svg {
  width: 15px;
  height: 15px;
}
.rsvp-menu .rsvp-acc > span:first-child {
  color: var(--rsvp-yes-ink);
}
.rsvp-menu .rsvp-ten > span:first-child {
  color: var(--rsvp-maybe-ink);
}
.rsvp-menu .rsvp-dec > span:first-child {
  color: var(--rsvp-no-ink);
}
.menu-item.on {
  font-weight: 600;
}
.menu-item .menu-on {
  margin-left: auto;
  padding-left: 12px;
  display: inline-flex;
}
/* On a phone the same three choices are a small sheet along the bottom,
   with rows big enough for a thumb. */
.menu.sheet {
  position: fixed;
  left: 0 !important;
  right: 0;
  bottom: 0;
  top: auto !important;
  width: auto;
  max-width: none;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
}
.menu.sheet .menu-item {
  min-height: 44px;
  font-size: 15px;
}
/* On a sheet the tap that opened it must not light up a row: only the
   answer you have is shaded. */
.menu.sheet .menu-item:hover {
  background: none;
}
.menu.sheet .menu-item.on {
  background: var(--hover);
}
/* The grip and the heading, as on the app's other sheets (More). */
.menu.sheet::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: var(--hs-line, var(--border));
  margin: 2px auto 8px;
}
.menu.sheet .menu-h {
  padding: 2px 12px 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fg-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Upcoming calls: a call you declined is faded, and Change is one tap. */
.sched-item.declined .sched-title,
.sched-item.declined .small.muted {
  opacity: 0.6;
}
.sched-declined {
  margin-top: 2px;
  color: var(--rsvp-no-ink);
}
.sched-declined button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--fg);
  text-decoration: underline;
  cursor: pointer;
}

/* Calendar blocks, Month pills and Agenda rows. */
.cal-ev b i,
.cal-pill i,
.ag-what b i {
  font-style: normal;
}
.cal-ev b,
.ag-what b {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.cal-ev b i,
.ag-what b i {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-ev b svg,
.cal-pill svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  stroke-width: 2.5;
}
.ag-what b svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.cal-pill svg {
  vertical-align: -2px;
  margin-right: 3px;
}
.cal-ev.a-acc,
.cal-pill.a-acc {
  background: var(--rsvp-yes-tint);
  border-color: color-mix(in srgb, var(--rsvp-yes) 35%, transparent);
  border-left-color: var(--rsvp-yes);
}
.cal-ev.a-ten,
.cal-pill.a-ten {
  background: repeating-linear-gradient(135deg, var(--rsvp-maybe-tint) 0 6px, var(--bg) 6px 12px);
  border-color: color-mix(in srgb, var(--rsvp-maybe) 40%, transparent);
  border-left-color: var(--rsvp-maybe);
}
.cal-ev.a-dec,
.cal-pill.a-dec {
  background: var(--bg);
  border-color: color-mix(in srgb, var(--rsvp-no) 35%, transparent);
  border-left-color: var(--rsvp-no);
  color: var(--fg-2);
}
.cal-ev.a-none,
.cal-pill.a-none {
  background: var(--bg);
  border: 1px dashed var(--rsvp-none);
  border-left: 3px solid var(--rsvp-none);
}
.cal-ev.a-acc b svg,
.cal-pill.a-acc svg,
.ag-row.a-acc .ag-what b svg {
  color: var(--rsvp-yes-ink);
}
.cal-ev.a-ten b svg,
.cal-pill.a-ten svg,
.ag-row.a-ten .ag-what b svg {
  color: var(--rsvp-maybe-ink);
}
.cal-ev.a-dec b svg,
.cal-pill.a-dec svg,
.ag-row.a-dec .ag-what b svg {
  color: var(--rsvp-no-ink);
}
.cal-ev.a-none b svg,
.cal-pill.a-none svg,
.ag-row.a-none .ag-what b svg {
  color: var(--fg-3);
}
.cal-ev.a-dec b i,
.cal-pill.a-dec i,
.ag-row.a-dec .ag-what b i {
  text-decoration: line-through;
}
/* Month pills have no edge of their own: the answer draws one. */
.cal-pill.a-acc,
.cal-pill.a-ten,
.cal-pill.a-dec,
.cal-pill.a-none {
  border-width: 1px;
  border-style: solid;
  border-left-width: 3px;
}
.cal-pill.a-none {
  border-style: dashed;
  border-left-style: solid;
}
.ag-row.a-acc {
  border-left-color: var(--rsvp-yes);
}
.ag-row.a-ten {
  border-left-color: var(--rsvp-maybe);
}
.ag-row.a-dec {
  border-left-color: var(--rsvp-no);
}
.ag-row.a-dec .ag-what,
.ag-row.a-dec .ag-time {
  opacity: 0.6;
}
/* No answer: a dashed border with a solid left edge, as on the blocks. */
.ag-row.a-none {
  border: 1px dashed var(--rsvp-none);
  border-left: 3px solid var(--rsvp-none);
}
/* On a phone the RSVP button already says there is no answer: the word
   goes, so the conversation's name keeps its room. */
@media (max-width: 820px) {
  .ag-row.a-none .ag-ans {
    display: none;
  }
  /* A row with a button keeps its whole second line: it wraps to two lines
     rather than cutting "Declined" to "Dec…". */
  .ag-what small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}
/* A pill on now draws its green edge as a shadow; with an answer, the
   answer's own edge is the one shown — never two side by side. */
.cal-pill.live.a-acc,
.cal-pill.live.a-ten,
.cal-pill.live.a-dec,
.cal-pill.live.a-none {
  box-shadow: none;
}
/* Dark mode: the main button on a call (RSVP, Join) is the inverted one —
   the app's grey primary read as disabled there. */
html[data-theme="dark"] .scard-acts .btn.primary,
html[data-theme="dark"] .ag-row .btn.primary {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
html[data-theme="dark"] .scard-acts .btn.primary:hover,
html[data-theme="dark"] .ag-row .btn.primary:hover {
  background: color-mix(in srgb, var(--fg) 88%, var(--bg));
}

/* ---- Free/busy in the schedule form (calendar v2) ----
   The box under the time: checking, green, orange (busy, or no time that
   day). "View availability timeline" sits inside it. */
.sched-free {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: 13px;
}
.sched-free[hidden] {
  display: none;
}
.sched-free .sf-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.sched-free .sf-ico {
  display: inline-flex;
  flex: none;
  align-self: flex-start;
  margin-top: 2.5px;
}
/* Centre the icon on the title's first line, whatever its line height,
   rather than a guessed offset. */
@supports (height: 1lh) {
  .sched-free .sf-ico {
    margin-top: 0;
    height: 1lh;
    align-items: center;
  }
}
/* A title with no line under it (the timeline's copy) is centred in a row
   as tall as the Use button: the icon is centred with it. */
.sched-free .sf-main:not(:has(.sf-detail)) .sf-ico {
  align-self: center;
}
.sched-free .sf-txt {
  flex: 1;
  min-width: 0;
}
.sched-free .sf-title {
  font-weight: 700;
}
.sched-free .sf-detail {
  margin-top: 2px;
  color: var(--fg-2, var(--muted));
}
.sched-free .sf-use {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: var(--bg);
}
.sched-free .sf-tl {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--border);
  background: none;
  font: inherit;
  font-weight: 600;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}
.sched-free .sf-tl span {
  flex: 1;
}
.sched-free .sf-tl:hover {
  background: color-mix(in srgb, currentColor 6%, transparent);
}
.sched-free.k-checking {
  color: var(--muted);
}
.sched-free.k-checking .sf-ico svg {
  animation: sf-spin 0.9s linear infinite;
}
@keyframes sf-spin {
  to {
    transform: rotate(360deg);
  }
}
.sched-free.k-free {
  background: var(--rsvp-yes-tint);
  border-color: color-mix(in srgb, var(--rsvp-yes) 35%, transparent);
}
.sched-free.k-free .sf-ico,
.sched-free.k-free .sf-title,
.sched-free.k-free .sf-tl {
  color: var(--rsvp-yes-ink);
}
.sched-free.k-free .sf-tl {
  border-top-color: color-mix(in srgb, var(--rsvp-yes) 25%, transparent);
}
.sched-free.k-busy,
.sched-free.k-none {
  background: var(--rsvp-maybe-tint);
  border-color: color-mix(in srgb, var(--rsvp-maybe) 40%, transparent);
}
.sched-free.k-busy .sf-ico,
.sched-free.k-busy .sf-title,
.sched-free.k-busy .sf-tl,
.sched-free.k-none .sf-ico,
.sched-free.k-none .sf-title,
.sched-free.k-none .sf-tl {
  color: var(--rsvp-maybe-ink);
}
.sched-free.k-busy .sf-tl,
.sched-free.k-none .sf-tl {
  border-top-color: color-mix(in srgb, var(--rsvp-maybe) 25%, transparent);
}
.sched-free.k-busy .sf-detail,
.sched-free.k-none .sf-detail,
.sched-free.k-free .sf-detail {
  color: var(--fg);
}
.sched-free.k-error {
  color: var(--muted);
}
@media (max-width: 560px) {
  /* Phone (as the mock): the icon by the title, the timeline link, then
     the suggestion as a full-width button at the bottom. */
  .sched-free.k-busy {
    display: grid;
    grid-template-columns: auto 1fr;
  }
  .sched-free.k-busy .sf-main {
    display: contents;
  }
  .sched-free.k-busy .sf-ico {
    grid-row: 1;
    grid-column: 1;
    /* The text's own top padding, and kept outside the 1lh height: inside
       it (border-box) the icon was centred in 6.5px and sat 5px high. */
    padding: 12px 0 0 14px;
    box-sizing: content-box;
  }
  /* In this grid the icon has its own cell beside the title: it lines up
     by the padding above, never by centring in the row. */
  .sched-free.k-busy .sf-main > .sf-ico {
    align-self: start;
  }
  .sched-free.k-busy .sf-txt {
    grid-row: 1;
    grid-column: 2;
    padding: 12px 14px 12px 10px;
  }
  .sched-free.k-busy .sf-tl {
    grid-row: 2;
    grid-column: 1 / -1;
    border-radius: 0;
  }
  .sched-free.k-busy .sf-use {
    grid-row: 3;
    grid-column: 1 / -1;
    justify-content: center;
    margin: 0 14px 14px;
    height: 40px;
  }
}

/* The timeline: the same dialog, switched over. */
.modal.tl-open > .m-head,
.modal.tl-open > .sched-form,
.modal.tl-open > .sched-foot {
  display: none;
}
.sched-tl {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.sched-tl .tl-head {
  align-items: center;
}
.sched-tl .tl-head h2 {
  flex: 1;
  margin: 0;
}
.sched-tl .tl-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}
.sched-tl .tl-line {
  margin-top: 0;
}
.sched-tl .tl-day {
  font-weight: 700;
  font-size: 13px;
}
.tl-scroll {
  overflow: auto;
  max-height: min(52vh, 460px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.tl-scroll::-webkit-scrollbar-corner {
  background: transparent;
}
.tl-grid {
  position: relative;
  width: max-content;
  min-width: 100%;
  --name: 170px;
}
.tl-row {
  display: flex;
  height: 44px;
  border-bottom: 1px solid var(--border);
}
.tl-row:last-child {
  border-bottom: 0;
}
.tl-name {
  position: sticky;
  left: 0;
  z-index: 3;
  flex: none;
  width: var(--name);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  font-size: 13px;
  min-width: 0;
}
.tl-nm {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-lane {
  position: relative;
  flex: none;
  width: var(--lanes);
  background-image: linear-gradient(to right, var(--border) 1px, transparent 1px);
  background-size: var(--hour) 100%;
}
.tl-hours {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 30px;
  background: var(--bg);
}
.tl-hours .tl-name {
  z-index: 5;
  color: var(--muted);
  font-size: 11px;
}
.tl-hours .tl-lane {
  background: var(--bg);
}
.tl-h {
  position: absolute;
  top: 8px;
  transform: translateX(4px);
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.tl-dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rsvp-yes);
}
.tl-dot.s-busy {
  background: var(--rsvp-no);
}
.tl-dot.s-tentative {
  background: var(--rsvp-maybe);
}
.tl-dot.s-guest {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--rsvp-none);
  border: 1.5px dashed transparent;
}
.tl-busy,
.tl-tent {
  position: absolute;
  top: 10px;
  bottom: 10px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fg) 30%, transparent);
}
.tl-tent {
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--fg) 40%, transparent) 0 3px, transparent 3px 7px);
}
.tl-row.is-guest .tl-lane {
  background-color: color-mix(in srgb, var(--fg) 4%, transparent);
}
.tl-unknown {
  position: sticky;
  left: calc(var(--name) + 12px);
  display: inline-block;
  line-height: 44px;
  padding-left: 12px;
  font-size: 12px;
  color: var(--muted);
}
.tl-more .tl-name {
  font-size: 12px;
}
.tl-over {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: var(--name);
  width: var(--lanes);
  z-index: 2;
  pointer-events: none;
}
.tl-past {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  /* Faint: it says "can't pick", not "busy". */
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--fg) 5%, transparent) 0 1px, transparent 1px 8px);
  background-color: color-mix(in srgb, var(--fg) 2%, transparent);
}
.tl-sug {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border: 1.5px dashed var(--rsvp-yes);
  border-radius: 6px;
}
.tl-sug[hidden] {
  display: none;
}
.tl-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border: 2px solid var(--blue);
  border-radius: 6px;
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.tl-bar.drag {
  cursor: grabbing;
}
.tl-bar:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.tl-rows {
  cursor: pointer;
}
.tl-rows .tl-name {
  cursor: default;
}
.sched-tl .tl-foot {
  justify-content: flex-end;
}
.sched-tl .tl-foot .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sched-tl .tl-use[hidden] {
  display: none;
}
@media (min-width: 561px) {
  /* Web: Back in the footer; the suggestion sits in the line above. */
  .sched-tl .tl-foot .tl-use {
    display: none;
  }
}
@media (max-width: 560px) {
  .tl-grid {
    --name: 118px;
  }
  /* As tall as its rows, up to the room left; then it scrolls. */
  .tl-scroll {
    max-height: none;
    flex: 0 1 auto;
    min-height: 0;
  }
  .sched-tl .tl-body {
    flex: 1;
  }
  .sched-tl .tl-line .sf-use,
  .sched-tl .tl-foot .tl-back2 {
    display: none;
  }
  .sched-tl .tl-foot .tl-use {
    flex: 1;
    justify-content: center;
    height: 44px;
  }
}
/* Each hour draws its line on its left, so the last hour (11 PM – 12 AM)
   needs a closing line on the right: midnight, the end of the day. */
.tl-hours .tl-lane,
.tl-rows .tl-lane {
  box-shadow: inset -1px 0 0 var(--border);
}
/* Outside working hours (before 8 AM, after 8 PM): drawn, so any start the
   form offers has a place, but quieter. */
.tl-off {
  position: absolute;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
}

/* ---------- Your own Outlook events (calendar v2) ----------
   Read-only and quieter than a call: a grey tile with a grey edge and the
   calendar mark, and a link to Outlook rather than the call details. An
   event marked Free has no fill and a dashed outline. */
a.cal-ev.ol,
a.cal-pill.ol,
a.ag-row.ol,
a.cal-adev.ol {
  text-decoration: none;
  color: inherit;
}
.cal-ev.ol,
.cal-pill.ol {
  background: var(--bg-3);
  border-color: color-mix(in srgb, var(--fg) 10%, transparent);
  border-left-color: var(--fg-3);
  color: var(--fg-2);
}
.cal-ev.ol:hover,
.cal-pill.ol:hover,
.cal-adev.ol:hover {
  background: color-mix(in srgb, var(--fg) 12%, var(--bg));
}
.cal-pill.ol {
  display: block;
  box-shadow: inset 3px 0 0 var(--fg-3);
}
.cal-ev.ol b svg,
.cal-pill.ol svg,
.ag-row.ol .ag-what b svg {
  color: var(--fg-3);
}
.ag-row.ol {
  border-left-color: var(--fg-3);
  background: color-mix(in srgb, var(--fg) 3%, transparent);
  color: var(--fg-2);
}
.ag-row.ol .ag-what small {
  color: var(--fg-3);
}
.ol-open {
  display: inline-flex;
  color: var(--fg-3);
}
.ag-row.ol:hover .ol-open {
  color: var(--fg);
}
.cal-ev.ol.free,
.cal-pill.ol.free,
.cal-adev.ol.free,
.ag-row.ol.free {
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--fg) 28%, transparent);
  border-left: 3px dashed var(--fg-3);
  box-shadow: none;
}
/* All day: a slim row over the hours, one cell per day. */
.cal-allday {
  display: grid;
  grid-template-columns: 64px repeat(var(--cal-cols), minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}
.cal-allday .cal-gutter {
  font-size: 11px;
  color: var(--fg-3);
  text-align: right;
  padding: 6px 8px 0 0;
}
.cal-adcol {
  border-left: 1px solid var(--border);
  padding: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cal-adev {
  display: block;
  font-size: 11.5px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  box-shadow: inset 3px 0 0 var(--fg-3);
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-adev i {
  font-style: normal;
}
/* Outlook could not be read: a quiet line, the calls still show. */
.cal-olnote {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 16px 8px;
}
.cal-olnote svg {
  width: 14px;
  height: 14px;
}

/* People asking to join (guest calls v2, PRD 05 §4, mock §3–§4). */
/* The organizer's card chip while the call is on and they're not in it. */
.scard-knock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--yellow) 45%, transparent);
  background: color-mix(in srgb, var(--yellow) 12%, transparent);
  color: #b45309;
  font-size: 12.5px;
  font-weight: 500;
}
.scard-knock span {
  flex: 1;
  min-width: 0;
}
.scard-knock b {
  font-weight: 600;
  white-space: nowrap;
}
html[data-theme="dark"] .scard-knock {
  color: #fbbf24;
}

/* Call details' People row with nobody to count (5 Nov). */
.sd-none {
  margin-top: 4px;
  font-size: 13px;
  color: var(--fg-3);
}
/* Share from another app on the phone (app/06-share-sheet.js): a full
   screen over the workspace — files, an optional message, who to send to. */
.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  background: var(--hs-canvas, var(--bg));
  color: var(--hs-ink, var(--fg));
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.share-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hs-line, var(--border));
}
.share-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.share-title b {
  font-size: 17px;
}
.share-title small {
  color: var(--hs-ink-3, var(--fg-2));
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.share-icon-btn svg {
  width: 22px;
  height: 22px;
}
.share-send {
  background: var(--hs-violet, var(--link));
  color: var(--hs-on-violet, #fff);
}
.share-send:disabled {
  background: transparent;
  color: var(--hs-ink-3, var(--fg-2));
  opacity: 0.6;
}
.share-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 24px;
}
.share-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.share-tile {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--hs-line, var(--border));
  background: var(--hs-card, var(--bg-3));
}
.share-tile > img,
.share-tile > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.share-tile-doc {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
}
.share-tile-doc b {
  font-size: 12px;
  color: var(--hs-ink-2, var(--fg-2));
}
.share-tile-doc small {
  font-size: 11px;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-tile-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.share-tile-actions button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.share-tile-actions svg {
  width: 14px;
  height: 14px;
}
.share-tile.is-failed,
.share-tile.is-refused {
  border-color: var(--hs-red);
}
.share-tile-err {
  position: absolute;
  inset: auto 0 0 0;
  padding: 5px 6px;
  background: var(--hs-red);
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-files .upload-usage {
  margin-top: 6px;
}
.share-msg {
  display: block;
  width: 100%;
  margin: 16px 0 12px;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--hs-line, var(--border));
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  resize: none;
  outline: none;
}
.share-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 46px;
  border-radius: 10px;
  background: var(--hs-card, var(--bg-3));
  border: 1px solid var(--hs-line, var(--border));
  color: var(--hs-ink-3, var(--fg-2));
}
.share-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--hs-ink, var(--fg));
  font: inherit;
  font-size: 16px;
  outline: none;
}
/* The line keeps its height while empty: appearing on the first pick, it
   pushed the list down under the finger and the next tap hit the wrong row. */
.share-picked {
  margin-top: 8px;
  min-height: 18px;
  font-size: 13px;
  line-height: 18px;
  color: var(--hs-violet, var(--link));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Toasts live under modals (z-index 900); over the full-screen sheet they
   would be invisible, and a refused chat would fail without a word. */
body.share-open .toasts {
  z-index: 1401;
}
.share-sec {
  margin: 18px 0 6px;
  font-weight: 700;
  font-size: 15px;
}
.share-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border: none;
  border-bottom: 1px solid var(--hs-line-soft, var(--border));
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.share-av {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--hs-violet-soft, var(--bg-3));
}
.share-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.share-av-ico svg {
  width: 22px;
  height: 22px;
  color: var(--hs-violet, var(--link));
}
.share-lines {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.share-lines b {
  font-weight: 500;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-lines small {
  color: var(--hs-ink-3, var(--fg-2));
  font-size: 13px;
}
.share-check {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--hs-ink-3, var(--fg-2));
  display: grid;
  place-items: center;
}
.share-row.on .share-check {
  border-color: var(--hs-violet, var(--link));
  background: var(--hs-violet, var(--link));
  color: var(--hs-on-violet, #fff);
}
.share-check svg {
  width: 14px;
  height: 14px;
}

/* Forward (forwardModal in app/04-messages.js) is this same sheet inside a
   modal(): a panel on a desktop, the whole screen on a phone. The parts
   above are shared; only the frame and what is being sent differ. */
.modal.fwd-sheet {
  width: min(480px, 94vw);
  height: min(680px, 86vh);
  display: flex;
  flex-direction: column;
  background: var(--hs-canvas, var(--bg));
  color: var(--hs-ink, var(--fg));
}
.modal.fwd-sheet.fwd-touch {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  border: 0;
  border-radius: 0;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.fwd-sheet .share-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.share-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.fwd-preview {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--hs-line, var(--border));
  border-radius: 4px;
  background: var(--hs-canvas-2, var(--bg-2));
  font-size: 14px;
  color: var(--hs-ink-2, var(--fg-2));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 96px;
  overflow: hidden;
}
.fwd-preview small {
  display: block;
  margin-top: 4px;
  color: var(--hs-ink-3, var(--fg-3));
}
.fwd-sheet .fwd-file {
  margin-top: 14px;
}
.fwd-file-ico {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #5d6d7e;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
/* ========================= conversation header ========================
   One row of controls that never changes with the call: back (phone),
   name, 🔍, huddle ▾, members (desktop), ⋯. Every icon button is the same
   square with the same icon size; the huddle button is the one filled
   control, because it is the main action. A live call is the strip under
   the row (.call-strip), and search takes the row over (.conv-searching).
   Loaded last, and scoped to .conv-head, so the older header rules in
   02/16/17/18 still apply to the other views that use .chan-head. */

body.hs .conv-head {
  gap: 4px;
}
/* Squeezed for room, the tabs scroll (as on a phone) and the name takes
   an ellipsis; the buttons never shrink or fall off the end. */
body.hs .conv-head .head-right {
  flex: none;
  gap: 4px;
  overflow: visible;
}
@media (min-width: 821px) {
  body.hs .conv-head .ch-tabs {
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.hs .conv-head .ch-tabs::-webkit-scrollbar {
    display: none;
  }
  body.hs .conv-head .ch-tab {
    flex: none;
  }
  body.hs .conv-head .ch-title {
    min-width: 72px;
  }
}
body.hs .conv-head .ch-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.hs .conv-head .hbtn {
  height: 36px;
  min-width: 36px;
  padding: 0;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--hs-ink-2);
}
body.hs .conv-head .hbtn:hover {
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .conv-head .hbtn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
body.hs .conv-head .hbtn:disabled {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}

/* Huddle ▾: a soft filled pill, so it reads as the main action. */
body.hs .conv-head .huddle-menu-btn {
  width: auto;
  gap: 2px;
  padding: 0 8px 0 10px;
  border-radius: 18px;
  background: var(--sh-muted);
  color: var(--hs-ink);
}
body.hs .conv-head .huddle-menu-btn .hm-caret {
  display: inline-flex;
  color: var(--hs-ink-3);
}
body.hs .conv-head .huddle-menu-btn .hm-caret svg {
  width: 14px;
  height: 14px;
}
body.hs .conv-head .huddle-menu-btn.live {
  color: var(--presence);
}
body.hs .conv-head .huddle-menu-btn.is-disabled {
  opacity: 0.45;
}

body.hs .conv-head .facepile {
  height: 32px;
  padding: 0 8px 0 4px;
  border-radius: 16px;
  box-shadow: none;
}

/* ------------------------------ call strip ---------------------------- */
.call-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0 8px 0 16px;
  background: color-mix(in srgb, var(--presence) 12%, var(--hs-card, var(--bg)));
  border-bottom: 1px solid var(--hs-line, var(--border));
  color: var(--hs-ink, var(--fg));
  font-size: 13px;
}
.call-strip[hidden] {
  display: none;
}
.call-strip > svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--presence);
}
.call-strip .cs-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.call-strip .cs-act {
  flex: none;
  height: 28px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: var(--presence);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* --------------------------- search mode ------------------------------ */
body.hs .conv-searching {
  flex-wrap: nowrap;
}
.conv-searching .cs-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--sh-muted, var(--bg-3));
  color: var(--hs-ink-3, var(--fg-3));
  cursor: text;
}
.conv-searching .cs-field svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.conv-searching .cs-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--hs-ink, var(--fg));
  font: inherit;
  font-size: 14px;
}
.conv-searching .cs-field input::-webkit-search-cancel-button {
  display: none;
}
.cs-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.cs-nav .cs-count {
  min-width: 72px;
  padding-right: 4px;
  text-align: right;
  color: var(--hs-ink-3, var(--fg-3));
  font-size: 13px;
  white-space: nowrap;
}
.cs-nav-foot {
  display: none;
}
body.hs .cs-nav .hbtn:not(.act-toggle):not(#readAll) {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 0;
  padding: 0;
  justify-content: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--hs-ink-2);
}
body.hs .cs-nav .hbtn svg {
  width: 18px;
  height: 18px;
}
body.hs .cs-nav .hbtn:disabled {
  opacity: 0.35;
}

/* -------------------------------- phone ------------------------------- */
@media (max-width: 820px) {
  body.hs .conv-head {
    padding: 6px 8px;
    row-gap: 4px;
    gap: 2px;
  }
  body.hs .chan-head.conv-head .ch-back {
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin-left: 0;
  }
  body.hs .conv-head .ch-back svg {
    width: 20px;
    height: 20px;
  }
  /* Basis 0: the name gives way (with an ellipsis) before the buttons
     would wrap to a second line. */
  body.hs .chan-head.conv-head .ch-title {
    flex: 1 1 0;
    min-width: 0;
    height: 40px;
    padding: 0 4px;
    font-size: 16px;
  }
  body.hs .conv-head .head-right {
    margin-left: 0;
    flex-wrap: nowrap;
    gap: 2px;
  }
  /* Doubled .chan-head.conv-head and the :not()s outrank the shared
     32px phone rule in 18-shadcn-theme.css, which carries an id. Square
     40px targets; the 44px coarse-pointer minimum would make them tall. */
  body.hs .chan-head.conv-head .hbtn:not(.act-toggle):not(#readAll) {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 0;
    color: var(--hs-ink);
  }
  body.hs .chan-head.conv-head .hbtn:active {
    background: var(--sh-muted);
  }
  body.hs .conv-head .hbtn svg {
    width: 20px;
    height: 20px;
  }
  body.hs .chan-head.conv-head .huddle-menu-btn:not(.act-toggle):not(#readAll) {
    width: auto;
    height: 36px;
    padding: 0 8px 0 10px;
    margin: 0 4px;
  }
  body.hs .chan-head.conv-head .huddle-menu-btn.live:not(.act-toggle):not(#readAll) {
    color: var(--presence);
  }
  body.hs .conv-head .facepile {
    display: none;
  }
  body.hs .conv-head .ch-tabs {
    display: flex;
  }
  /* 16px keeps iOS from zooming the page when the field takes focus. */
  .conv-searching .cs-field input {
    font-size: 16px;
  }
  .conv-searching .cs-x,
  .cs-nav-head {
    display: none;
  }
  /* The count and arrows sit at the bottom, where the thumb is, in the
     composer's place while searching. */
  .cs-nav-foot {
    display: flex;
    height: 48px;
    padding: 0 8px calc(env(safe-area-inset-bottom)) 16px;
    border-top: 1px solid var(--hs-line, var(--border));
    background: var(--hs-card, var(--bg));
  }
  .cs-nav-foot .cs-count {
    flex: 1;
    min-width: 0;
    text-align: left;
  }
  .cs-nav-foot ~ .composer-wrap {
    display: none;
  }
  .call-strip {
    padding-left: 14px;
  }
}

@media (max-width: 820px) {
  /* The tab strip scrolls and a hard edge read as the end of the list
     ("Ca…"). Fade the right edge only while there is more to the right —
     a fixed fade also dimmed the last tab once you had scrolled to it, which
     is why 18-shadcn-theme.css switched it off. .more-right is set by
     syncTabFade() in 05-conversation-view.js. */
  body.hs .conv-head .ch-tabs.more-right {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
  /* On a phone the labelled pill sat on top of photos in the message list.
     A round arrow says the same in a corner; the label stays for screen
     readers through aria-label. */
  .scroll-btn {
    right: 16px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
  }
  .scroll-btn.show {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .scroll-btn-t {
    display: none;
  }
}
/* "This message was deleted": the placeholder a deleted message leaves
   (deletedMessageHTML). A quiet outlined bubble in the same place and on
   the same side, so it reads as "something was here" rather than content. */
.msg-deleted .deleted-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px dashed var(--hs-line, var(--border));
  border-radius: 14px;
  background: transparent;
  color: var(--hs-ink-3, var(--fg-3));
  font-size: 13px;
  font-style: italic;
}
.msg-deleted .deleted-text svg {
  flex: none;
  opacity: 0.8;
}
/* The time stays whole; on a phone the long manager line wraps instead
   (it used to split "12:18" across two lines). */
.msg-deleted .deleted-text .time {
  flex: none;
  white-space: nowrap;
  margin-left: 4px;
  font-style: normal;
  font-size: 11px;
  color: var(--hs-ink-3, var(--fg-3));
}
.msg.mine.msg-deleted .content {
  align-items: flex-end;
}
/* The dashed line is the whole bubble: no bubble fill behind it. */
body.hs .msg.msg-deleted .content,
.msg.msg-deleted .content {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}
/* ---------------------------- date picker ---------------------------- */
/* The field: an .input-shaped button (06-date-picker.js). */
.dp-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  font: inherit;
}
.dp-field.dp-empty .dp-text {
  color: var(--fg-3);
}
.dp-field .dp-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The icon at the end of a date or time field. As a plain inline box it
   sat on the text's baseline — about 2px high in the time fields, which
   only had the size rule — so both fields share this one. */
.dp-field .dp-ico,
.tp-field .dp-ico {
  display: inline-flex;
  line-height: 0;
  color: var(--fg-3);
  flex: none;
}
.dp-field:disabled {
  cursor: default;
}

/* The calendar, in its own popover or inline (the task due-date menu). */
#layers > .menu.dp-pop {
  min-width: 0;
  width: 272px;
  padding: 8px;
  overflow: visible;
}
.dp-cal {
  user-select: none;
}
.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.dp-month {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}
.dp-nav {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dp-nav:hover:not(:disabled) {
  background: var(--sh-muted);
}
.dp-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.dp-week,
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.dp-week span {
  text-align: center;
  font-size: 11px;
  color: var(--fg-3);
  padding: 4px 0;
}
.dp-day {
  min-width: 0;
  padding: 0;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.dp-day.out {
  /* Clearly the next or last month, in both themes: --fg-3 alone was
     nearly as bright as this month's days on a dark page. */
  color: color-mix(in srgb, var(--fg) 38%, transparent);
}
.dp-day:hover:not(:disabled):not(.on) {
  background: var(--sh-muted);
}
.dp-day.today {
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--border);
}
.dp-day.on {
  background: var(--fg);
  color: var(--bg);
  box-shadow: none;
}
.dp-day:disabled {
  color: var(--fg-3);
  opacity: 0.4;
  cursor: default;
}
.dp-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.dp-link {
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.dp-link:hover {
  background: var(--sh-muted);
}
.tk-pop-due {
  overflow-x: hidden;
}
.tk-pop-due .dp-inline {
  padding: 4px 8px 6px;
}

/* On a touch screen it is a sheet along the bottom, with bigger targets. */
/* A phone's pickers come up as a sheet over a dimmed page, so where the
   sheet starts is never in doubt. The shadow dims without catching taps:
   a tap outside still closes the sheet, as before. */
#layers > .menu.dp-pop.dp-sheet,
#layers > .menu.tp-pop.tp-sheet {
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5), 0 -8px 24px rgba(0, 0, 0, 0.25);
}
#layers > .menu.dp-pop.dp-sheet {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto;
  max-height: none;
  border-radius: 14px 14px 0 0;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
}
.dp-sheet .dp-day {
  height: 44px;
  font-size: 15px;
}
.dp-sheet .dp-nav {
  width: 44px;
  height: 44px;
}
.dp-sheet .dp-month {
  font-size: 16px;
}
.dp-sheet .dp-link {
  font-size: 15px;
  padding: 10px 12px;
}

/* Send later: date and time side by side, as in the call form. */
.later-at {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ---------------------------- time picker ---------------------------- */
/* The field: like the date field (06-date-picker.js). */
.tp-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--fg);
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.tp-field .dp-ico svg {
  width: 15px;
  height: 15px;
}
.tp-field:disabled {
  cursor: default;
}
.tp-field.tp-empty .tp-text {
  color: var(--fg-3);
}
/* The list: about seven times tall, scrolled to the chosen one. */
#layers > .menu.tp-pop {
  min-width: 0;
  max-height: 264px;
  overflow-y: auto;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.tp-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: left;
  cursor: pointer;
}
.tp-opt:hover,
.tp-opt:focus-visible {
  background: var(--sh-muted);
  outline: none;
}
.tp-opt.on {
  font-weight: 600;
}
.tp-opt svg {
  width: 15px;
  height: 15px;
  color: var(--fg-2);
}
/* On a phone: a sheet from the bottom, with thumb-sized rows. */
#layers > .menu.tp-pop.tp-sheet {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto;
  max-height: 50vh;
  border-radius: 14px 14px 0 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
}
.tp-head {
  position: sticky;
  top: -8px;
  margin: -8px -8px 4px;
  padding: 14px 18px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  background: inherit;
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.tp-sheet .tp-opt {
  height: 44px;
  font-size: 15px;
  padding: 0 14px;
}
