/* Tallē Engage on the web — "Quiet Ink", the same language as the app
 * (Talle Engage/DesignSystem.swift): a faint grey page, white paper cards,
 * ink for words and actions, and Engage purple (the logomark's #5000ff) only
 * where something is live or ready to send, with white on a purple fill. Amber
 * is only for things that need attention. */
:root {
  --page: #f4f4f4;
  --card: #ffffff;
  --ink: #121212;
  --on-ink: #ffffff;
  --secondary: rgba(18, 18, 18, 0.68);
  --tertiary: rgba(18, 18, 18, 0.62);
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.14);
  --wash: #efefef;
  --field: rgba(0, 0, 0, 0.045);
  --field-strong: rgba(0, 0, 0, 0.08);
  /* Purple fills (the same in both appearances) carry white; small marks get
   * a lighter purple on the dark page so they stay visible. */
  --accent: #5000ff;
  --accent-hover: #4400d9;
  --on-accent: #ffffff;
  --accent-mark: #5000ff;
  --attention: #8a5a12;
  --danger: #b3261e;
  --shadow: rgba(0, 0, 0, 0.06);
  --backdrop: rgba(18, 18, 18, 0.32);
  --glass: rgba(255, 255, 255, 0.82);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0f0f10;
    --card: #1c1c1e;
    --ink: #ffffff;
    --on-ink: #121212;
    --secondary: rgba(255, 255, 255, 0.66);
    --tertiary: rgba(255, 255, 255, 0.6);
    --hairline: rgba(255, 255, 255, 0.1);
    --hairline-strong: rgba(255, 255, 255, 0.18);
    --wash: #2c2c2e;
    --field: rgba(255, 255, 255, 0.08);
    --field-strong: rgba(255, 255, 255, 0.13);
    --attention: #e3bc78;
    --danger: #ff8a80;
    --shadow: rgba(0, 0, 0, 0.45);
    --backdrop: rgba(0, 0, 0, 0.6);
    --glass: rgba(28, 28, 30, 0.82);
    --accent-mark: #8c66ff;
    --accent-hover: #6a2bff;
  }
}

/* ── Base ─────────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}
html {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  min-height: 100dvh;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
}
button:disabled {
  cursor: default;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
h1,
h2,
h3,
p,
dl,
dd,
ol,
ul {
  margin: 0;
}
h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.12;
}
h1:focus {
  outline: none;
}
h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.35px;
  line-height: 1.25;
}
h3 {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.15px;
}
p {
  line-height: 1.55;
}
small,
.muted {
  color: var(--secondary);
}
.small {
  font-size: 13px;
}
.small-note {
  font-size: 13px;
  color: var(--tertiary);
  line-height: 1.5;
}
.micro,
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--tertiary);
  line-height: 1.3;
}
.micro.ink {
  color: var(--ink);
}
.attention-text,
.micro.attention-text {
  color: var(--attention);
}
.danger-text {
  color: var(--danger);
}
.tabular {
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.clamp-2 {
  -webkit-line-clamp: 2;
}
.clamp-3 {
  -webkit-line-clamp: 3;
}
.break,
.prewrap {
  overflow-wrap: anywhere;
}
.prewrap {
  white-space: pre-wrap;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -80px;
  left: 16px;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 12px;
  z-index: 99;
}
.skip:focus {
  top: 16px;
}

/* ── Layout helpers ───────────────────────────────────────────────────── */
.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tight-row {
  gap: 8px;
}
.spread {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.center {
  justify-content: center;
}
.baseline {
  align-items: baseline;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tight {
  gap: 8px;
}
.gap {
  gap: 24px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn .icon {
  width: 18px;
  height: 18px;
}

/* ── Brand ────────────────────────────────────────────────────────────── */
.engage-mark {
  display: block;
  flex: none;
}
/* The Engage logomark: brand purple in both appearances, like the app icon. */
.engage-mark-circle {
  fill: #5000ff;
}
.engage-mark-slash {
  fill: none;
  stroke: #fff;
  stroke-width: 5.565;
  stroke-linecap: round;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  border-radius: 12px;
}
.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.wordmark-text strong {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.7px;
}
.wordmark-text span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--secondary);
  margin-top: 2px;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: normal;
  text-align: center;
  border: 1px solid transparent;
  transition: background-color 120ms ease, opacity 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.4;
}
.btn[aria-busy="true"] {
  opacity: 0.7;
}
.primary {
  background: var(--ink);
  color: var(--on-ink);
}
.secondary {
  background: var(--field);
  color: var(--ink);
}
.quiet {
  background: transparent;
  color: var(--ink);
}
.danger {
  background: var(--field);
  color: var(--danger);
}
.accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.apple-signin {
  background: #000000;
  color: #ffffff;
}
@media (prefers-color-scheme: dark) {
  .apple-signin {
    background: #ffffff;
    color: #000000;
  }
}
.chip {
  min-height: 36px;
  padding: 7px 15px;
  font-size: 13px;
  font-weight: 500;
  background: var(--card);
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.chip.selected,
.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
  border-color: transparent;
  font-weight: 600;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--ink);
  flex: none;
  transition: background-color 120ms ease;
}
.icon-btn.soft,
.icon-btn.round {
  background: var(--field);
}
.icon-btn.round {
  width: 48px;
  height: 48px;
}
.icon-btn.small {
  width: 32px;
  height: 32px;
}
.icon-btn.small .icon {
  width: 16px;
  height: 16px;
}
.text-button {
  font-size: 13px;
  color: var(--secondary);
  border-radius: 8px;
  padding: 4px 6px;
}
.text-link {
  font-size: 13px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
}
.mobile-back {
  display: none;
  align-self: flex-start;
  margin: -6px 0 -4px -10px;
  padding: 6px 12px 6px 6px;
  min-height: 36px;
  color: var(--secondary);
}
@media (hover: hover) and (pointer: fine) {
  .primary:not(:disabled):hover {
    opacity: 0.86;
  }
  .secondary:not(:disabled):hover,
  .danger:not(:disabled):hover,
  .icon-btn.soft:hover,
  .icon-btn.round:hover {
    background: var(--field-strong);
  }
  .quiet:not(:disabled):hover,
  .icon-btn:not(.soft):not(.round):hover,
  .text-button:hover {
    background: var(--field);
  }
  .accent:not(:disabled):hover {
    background: var(--accent-hover);
  }
  .chip:not(.selected):not([aria-pressed="true"]):hover {
    background: var(--field);
  }
  .apple-signin:not(:disabled):hover {
    opacity: 0.86;
  }
  .text-link:hover {
    text-decoration-color: currentColor;
  }
}

/* ── Chips, dots, badges, avatars ─────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 500;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  white-space: nowrap;
  max-width: 100%;
}
.pill .dot,
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--tertiary);
}
.pill.live .dot,
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--accent-mark);
}
.pill.neutral .dot,
.dot.neutral {
  width: 6px;
  height: 6px;
  background: var(--tertiary);
}
.pill.attention,
.pill.attention .dot + * {
  color: var(--attention);
}
.pill.attention .dot,
.dot.attention {
  background: var(--attention);
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.count-badge {
  position: absolute;
  top: -6px;
  right: -9px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--page);
  font-variant-numeric: tabular-nums;
}
.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  flex: none;
  letter-spacing: 0.2px;
}
.avatar.small {
  width: 30px;
  height: 30px;
  font-size: 11.5px;
}
.ink-chip {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--on-ink);
  flex: none;
}
.ink-chip .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}
.ink-chip.large {
  width: 48px;
  height: 48px;
  border-radius: 15px;
}
.ink-chip.large .icon {
  width: 24px;
  height: 24px;
}

/* ── Cards ────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  box-shadow: 0 6px 18px var(--shadow);
  min-width: 0;
}
.panel {
  padding: 24px;
}
.group {
  padding: 0;
  overflow: hidden;
}
.center-card {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px;
  align-items: center;
  text-align: center;
}
.loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--secondary);
  min-height: 180px;
}
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--wash);
  border-top-color: var(--ink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading {
  padding: 32px;
  text-align: center;
  color: var(--secondary);
}

/* ── Shell ────────────────────────────────────────────────────────────── */
.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 22px 14px 18px 18px;
  overflow-y: auto;
}
.sidebar > .wordmark {
  padding: 2px 6px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--secondary);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  transition: background-color 120ms ease, color 120ms ease;
}
.nav-item.active {
  background: var(--card);
  border-color: var(--hairline);
  box-shadow: 0 3px 10px var(--shadow);
  color: var(--ink);
  font-weight: 600;
}
.nav-item.active .icon {
  stroke-width: 2.1;
}
.nav-glyph {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.nav-label {
  min-width: 0;
}
@media (hover: hover) and (pointer: fine) {
  .nav-item:not(.active):hover {
    background: var(--field);
    color: var(--ink);
  }
}
.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-item {
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  border-radius: 12px;
  text-align: left;
}
.menu-item .icon {
  width: 17px;
  height: 17px;
}
.account-email {
  margin-top: 8px;
  padding: 12px 12px 4px;
  border-top: 1px solid var(--hairline);
  font-size: 12.5px;
  color: var(--tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 20px 4px;
}
.strip {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 4px 4px 12px;
}
.strip-mark {
  display: none;
}
.strip-title {
  font-size: 15px;
  font-weight: 600;
}
.strip-status {
  gap: 12px;
  min-width: 0;
}
.texts-left {
  font-size: 13px;
  color: var(--secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.texts-left strong {
  font-weight: 600;
  color: var(--ink);
}
.org-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 420px;
  padding: 7px 10px;
  margin-left: -10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 120ms ease;
}
.org-name {
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: -0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.org-chevron {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  flex: none;
}
.org-picker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.org-picker-wrap:has(.org-picker:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .org-picker-wrap:hover {
    background: var(--field);
  }
}
.account-menu {
  display: none;
  position: relative;
}
.account-menu summary {
  list-style: none;
  cursor: pointer;
  border-radius: 999px;
}
.account-menu summary::-webkit-details-marker {
  display: none;
}
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(290px, calc(100vw - 32px));
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 18px;
  box-shadow: 0 18px 40px var(--shadow), 0 2px 6px var(--shadow);
  z-index: 30;
}
.menu-panel .menu-item {
  color: var(--ink);
  width: 100%;
}
.paper {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  box-shadow: 0 6px 18px var(--shadow);
  padding: 32px 36px 44px;
  min-width: 0;
}
.paper:focus {
  outline: none;
}
/* On the paper, groups keep their hairline and drop the lift. */
.paper .card {
  box-shadow: none;
}
.page-head {
  margin-bottom: 24px;
}
.tabbar {
  display: none;
}

/* ── Notices ──────────────────────────────────────────────────────────── */
.notice {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  background: var(--field);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
}
.paper > .notice,
#workspace-body > .notice {
  margin-bottom: 22px;
}
.notice p {
  color: var(--secondary);
}
.notice strong {
  color: var(--ink);
}
.notice.attention,
.notice.attention p,
.notice.attention .icon {
  color: var(--attention);
}
.notice-text {
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
}
.notice-text .icon {
  margin-top: 1px;
  color: var(--secondary);
}
.notice .btn {
  flex-shrink: 0;
}
/* Texts owed are a plain fact, never an error colour. */
p.owed,
.notice.attention p.owed {
  color: var(--ink);
  font-weight: 500;
}
.inline-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--field);
  color: var(--secondary);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13.5px;
}
.inline-notice .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.inline-notice.attention-text {
  color: var(--attention);
}
.error {
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.5;
  background: var(--field);
  border-radius: 12px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}

/* ── Empty states ─────────────────────────────────────────────────────── */
.empty {
  padding: 44px 24px;
  text-align: center;
  align-items: center;
  gap: 12px;
}
.empty h2 {
  font-size: 17px;
}
.empty p {
  font-size: 14px;
  max-width: 340px;
}
.detail-empty .empty,
.stack > .empty {
  border: 1px dashed var(--hairline-strong);
  border-radius: 22px;
}

/* ── Home ─────────────────────────────────────────────────────────────── */
.home {
  gap: 22px;
  max-width: 1120px;
}
.home .page-head {
  margin-bottom: 2px;
}
.hero {
  padding: 22px 24px;
  border-radius: 24px;
  gap: 16px;
}
.hero-number-row {
  gap: 10px;
}
.hero-number {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.meter-block {
  max-width: 460px;
}
.meter {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}
.meter.thin {
  height: 4px;
  max-width: 320px;
}
.hero-actions {
  gap: 10px;
  margin-top: 2px;
}
.hero-actions .primary {
  min-height: 48px;
  padding: 12px 22px;
}
.setup h2 {
  font-size: 22px;
}
.progress-dots {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 6px;
  max-width: 460px;
}
.progress-dots li {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--wash);
}
.progress-dots li.done {
  background: var(--ink);
}
.progress-dots li.current {
  background: linear-gradient(90deg, var(--ink) 45%, var(--wash) 45%);
}
.progress-dots li.changes {
  background: var(--attention);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px 13px;
  border-radius: 18px;
  text-align: left;
  box-shadow: none;
  transition: background-color 120ms ease;
}
.stat strong {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  font-variant-numeric: tabular-nums;
}
.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 20px;
  align-items: start;
}
.section-heading {
  padding: 0 4px;
  align-items: baseline;
}
.section-heading h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.coming {
  padding: 18px;
  text-align: left;
  align-items: flex-start;
  width: 100%;
}
.coming strong {
  font-size: 16px;
}
.coming > div {
  margin-top: 4px;
}
.conversation-row,
.row-button {
  width: 100%;
  padding: 14px 16px;
  gap: 12px;
  text-align: left;
  align-items: flex-start;
  position: relative;
  transition: background-color 120ms ease;
}
.row-button {
  align-items: center;
}
.conversation-row + .conversation-row::before,
.row-button + .row-button::before,
.list-row + .list-row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 68px;
  height: 1px;
  background: var(--hairline);
}
.row-button + .row-button::before {
  left: 62px;
}
.list-row + .list-row::before {
  left: 18px;
}
.row-text {
  gap: 2px;
  min-width: 0;
}
.row-text .row {
  gap: 10px;
  align-items: baseline;
}
.row-text time {
  font-size: 12.5px;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.row-text .muted {
  font-size: 14px;
}
.conversation-row .row-text .row:last-child {
  align-items: center;
}
.conversation-row.selected,
.list-row.selected {
  background: var(--wash);
}
.conversation-row.unread strong {
  font-weight: 700;
}
.chevron {
  color: var(--tertiary);
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}
@media (hover: hover) and (pointer: fine) {
  .stat:hover,
  .coming:is(button):hover,
  .conversation-row:not(.selected):hover,
  .row-button:hover,
  .list-row:not(.selected):hover {
    background: var(--field);
  }
}

/* ── Lists and details ────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.segments {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.search,
.field input,
.field select,
.field textarea,
.dialog-body input[type="search"],
.dialog-body select,
.compare-edit,
.reply-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 14px;
  background: var(--field);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  min-height: 44px;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.search {
  max-width: 300px;
}
:is(.search, .field input, .field select, .field textarea, .dialog-body input, .dialog-body select, .compare-edit, .reply-input):focus {
  border-color: var(--hairline-strong);
  background: var(--card);
}
:is(.search, .field input, .field textarea, .dialog-body input, .compare-edit, .reply-input)::placeholder {
  color: var(--tertiary);
}
.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.25fr);
  gap: 20px;
  align-items: start;
}
.list {
  display: flex;
  flex-direction: column;
}
.list > .btn {
  margin: 8px;
}
.list-row {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  text-align: left;
  transition: background-color 120ms ease;
}
.list-row strong {
  font-size: 15px;
  font-weight: 600;
}
.list-preview {
  font-size: 14px;
  color: var(--secondary);
}
.list-card {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
}
.detail {
  position: sticky;
  top: 20px;
  padding: 24px;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}
.facts dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--tertiary);
}
.facts dd {
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.preview-bubble {
  background: var(--wash);
  border-radius: 20px 20px 20px 6px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.confirm-facts {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Conversation ─────────────────────────────────────────────────────── */
.conversation-head {
  gap: 12px;
}
.conversation-head h2 {
  font-size: 19px;
}
.conversation-title {
  gap: 2px;
}
.thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(460px, 55dvh);
  overflow-y: auto;
  padding: 4px 2px;
  overscroll-behavior: contain;
}
.bubble {
  padding: 10px 14px;
  background: var(--wash);
  border-radius: 20px 20px 20px 6px;
  max-width: 82%;
  align-self: flex-start;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.bubble.outgoing {
  align-self: flex-end;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 20px 20px 6px 20px;
}
.bubble time {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  opacity: 0.7;
}
.reply-box {
  border-top: 1px solid var(--hairline);
  padding-top: 14px;
}
.reply-row {
  align-items: flex-end;
  gap: 10px;
}
.reply-input {
  border-radius: 22px;
  padding: 11px 16px;
  resize: none;
  line-height: 1.4;
  max-height: 180px;
  field-sizing: content;
}
.reply-counter {
  padding-left: 16px;
  font-variant-numeric: tabular-nums;
}
.compose-disc {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid transparent;
  flex: none;
  transition: background-color 120ms ease, opacity 120ms ease;
}
.compose-disc .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2;
}
.compose-disc:disabled,
.compose-disc.quiet {
  background: var(--wash);
  color: var(--tertiary);
  border-color: transparent;
}
@media (hover: hover) and (pointer: fine) {
  .compose-disc:not(:disabled):not(.quiet):hover {
    background: var(--accent-hover);
  }
}

/* ── Tables ───────────────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
}
.table-card {
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--tertiary);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table .num {
  text-align: right;
}
.actions-cell {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.activity-table td:first-child {
  width: 1%;
}
.activity-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── Line & billing ───────────────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 20px;
}
.metric > strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.6px;
  overflow-wrap: anywhere;
  line-height: 1.2;
}
.steps {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step {
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
}
.step.current > .stack > span:first-child {
  font-weight: 650;
}
.step-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.step-mark.done {
  background: var(--ink);
  color: var(--on-ink);
}
.step-mark .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.6;
}
.steps-fold summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--secondary);
  width: fit-content;
  border-radius: 8px;
  padding: 2px 4px;
  margin-left: -4px;
}
.steps-fold[open] summary {
  margin-bottom: 12px;
}
.billing-facts {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14.5px;
  line-height: 1.5;
}
.plan-table td strong {
  font-weight: 650;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
label.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
}
.field textarea {
  resize: vertical;
  line-height: 1.55;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 450;
}
.check input,
.person-choice input,
.refill-consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  flex: none;
  margin: 2px 0 0;
}
.choice-group {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.choice-group legend {
  font-size: 13.5px;
  font-weight: 600;
  padding: 0;
  margin-bottom: 10px;
}
.access-lists {
  padding-left: 28px;
}
.field-box {
  background: var(--field);
  border-radius: 12px;
  padding: 12px 14px;
}
.refill-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
}
.dialog-body > form h3 {
  margin-top: 10px;
}
.dialog-body input[type="search"] {
  flex: 1;
  min-width: 180px;
}
.dialog-body select {
  max-width: 100%;
}

/* ── Dialogs ──────────────────────────────────────────────────────────── */
.dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100dvh - 32px);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.dialog.wide {
  width: min(820px, calc(100% - 24px));
}
.dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(4px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px 24px;
  background: var(--card);
}
.dialog-head h2 {
  font-size: 20px;
}
.dialog-close {
  background: var(--field);
  width: 34px;
  height: 34px;
}
.dialog-close .icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}
.dialog-body {
  padding: 6px 24px 22px;
  gap: 20px;
}
.dialog-body > * {
  flex-shrink: 0;
}
.dialog-errors {
  padding: 0 24px;
}
.dialog-errors:not(:empty) {
  padding-bottom: 14px;
}
.dialog-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--hairline);
  background: var(--card);
}
.dialog-foot:empty {
  display: none;
}

/* ── Composer ─────────────────────────────────────────────────────────── */
.composer-counter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  margin-top: -8px;
}
.composer-counter .row {
  gap: 4px 12px;
}
.counter-each {
  font-weight: 600;
}
.counter-total {
  color: var(--secondary);
}
.counter-parts {
  font-size: 12.5px;
}
.counter-note {
  margin: 0;
}
.emoji-fix {
  margin-top: 4px;
}
.audience {
  max-height: 240px;
  min-height: 90px;
  overflow: auto;
  background: var(--field);
  border-radius: 16px;
  padding: 4px 14px;
}
.person-choice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
}
.person-choice:last-child {
  border: 0;
}
.person-choice input {
  margin: 0;
}
.person-choice span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.person-choice small {
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ── Plans ────────────────────────────────────────────────────────────── */
.plan-grid {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 15px 14px 13px 44px;
  background: var(--card);
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  transition: border-color 120ms ease, background-color 120ms ease;
}
.plan-card input {
  position: absolute;
  left: 15px;
  top: 17px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ink);
}
.plan-card:has(input:checked) {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.plan-card:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.plan-card.recommended {
  background: var(--field);
}
.fits-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 8px;
}
.plan-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}
.plan-name .pill {
  font-size: 11px;
  padding: 1px 8px;
}
.plan-price strong {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}
.plan-card small {
  font-size: 12px;
}
.plan-custom {
  grid-column: 1 / -1;
  padding-left: 16px;
  border-style: dashed;
  justify-content: center;
}
.topup-line {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--hairline);
  color: var(--secondary);
}
.topup-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr);
  gap: 16px 22px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--hairline-strong);
  border-radius: 18px;
  padding: 16px 18px;
}
.topup-copy p {
  font-size: 14px;
  color: var(--secondary);
}
.topup-side {
  gap: 14px;
}
.topup-unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--field);
  border-radius: 12px;
  padding: 10px 14px;
}
.topup-unit span {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
}
.topup-unit strong {
  font-size: 17px;
}
.topup-unit small {
  font-size: 13px;
  color: var(--secondary);
}
.topup-limit .field span {
  font-size: 13px;
}
.headroom p {
  font-size: 14.5px;
}
.finder-best {
  font-size: 15px;
}
.plan-lede {
  font-size: 14.5px;
  font-weight: 550;
}
/* Change plan: "Upgrade now · $20 today" / "Switch on Oct 23", each with its line. */
.choice-btn {
  flex-direction: column;
  gap: 1px;
  padding-block: 8px;
}
.choice-btn .choice-detail {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.75;
}
.dialog-foot .foot-hint {
  flex: 1 1 100%;
  margin: 0;
}
.upgrade-facts {
  flex-direction: column;
  gap: 6px;
}
.upgrade-consent {
  background: var(--field);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--secondary);
}
.plan-finder {
  background: var(--field);
  border-radius: 18px;
  padding: 12px 16px;
}
.plan-finder summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  width: fit-content;
  border-radius: 8px;
}
.plan-finder[open] summary {
  margin-bottom: 12px;
}
.finder-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.finder-fields .field input,
.finder-fields .field select {
  background: var(--card);
}
.finder-times {
  padding-bottom: 11px;
  color: var(--tertiary);
  font-size: 18px;
}
.finder-answer {
  align-items: flex-start;
  margin-top: 12px;
  font-size: 14px;
}

/* ── Signup, QR and the go-live moment ───────────────────────────────── */
.signup-qr {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  image-rendering: pixelated;
}
.signup-qr.small {
  width: 132px;
  margin: 0;
  border: 1px solid var(--hairline);
}
.golive {
  gap: 14px;
}
.golive-row {
  gap: 12px;
  flex-wrap: wrap;
}
.golive-number {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.golive-qr {
  align-items: center;
  gap: 18px;
  background: var(--field);
  border-radius: 20px;
  padding: 14px;
}

/* ── Team ─────────────────────────────────────────────────────────────── */
.member-list {
  list-style: none;
  padding: 0;
}
.member {
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  flex-wrap: wrap;
}
.member:first-child {
  border-top: 0;
}
.member-text {
  gap: 2px;
  flex: 1 1 200px;
}
.member-actions {
  gap: 4px;
}
.member-actions .btn {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
}
.role-list {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--secondary);
  font-size: 14px;
}
.role-list strong {
  color: var(--ink);
}
.invite-code {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

/* ── Series ───────────────────────────────────────────────────────────── */
.series-texts summary {
  cursor: pointer;
  font-size: 13.5px;
  color: var(--secondary);
  width: fit-content;
  border-radius: 8px;
  padding: 2px 4px;
  margin-left: -4px;
}
.series-texts[open] summary {
  margin-bottom: 12px;
}
.series-texts ol {
  list-style: none;
  padding: 0;
}
.series-step {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  padding: 16px;
}
.series-settings > .field {
  flex: 1 1 220px;
  min-width: 0;
}
.series-when {
  align-items: flex-end;
}
.series-day {
  flex: 0 0 96px;
}
.series-time {
  flex: 1 1 140px;
  max-width: 200px;
}
.series-now {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  color: var(--secondary);
}
.series-total {
  font-variant-numeric: tabular-nums;
}
.inline-add select {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  inset: 16px auto auto 50%;
  transform: translateX(-50%);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(92vw, 560px);
  padding: 12px 20px 12px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 30px var(--shadow), 0 2px 6px var(--shadow);
  overflow: visible;
}
.toast:empty {
  display: none;
}
/* A failure isn't a success: warning tone, and it stays until dismissed or replaced. */
.toast.toast-error {
  border-color: var(--danger);
  color: var(--danger);
}
.toast:not(:popover-open) {
  display: none;
}
.toast-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

/* ── Sign in ──────────────────────────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100dvh;
  gap: 24px;
  padding: 24px;
}
.auth-intro {
  justify-content: space-between;
  padding: 28px max(24px, 5vw);
  gap: 40px;
}
.auth-copy h1 {
  font-size: clamp(36px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -2px;
  white-space: pre-line;
}
.auth-copy > p:not(.micro) {
  font-size: 16.5px;
  color: var(--secondary);
  max-width: 420px;
}
.auth-preview {
  max-width: 340px;
  padding: 20px 22px;
  gap: 12px;
  font-size: 14px;
}
.auth-preview .hero-number {
  font-size: 26px;
}
.auth-footer {
  font-size: 13px;
  color: var(--tertiary);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 36px 32px;
  gap: 18px;
  border-radius: 28px;
}
.auth-card h2 {
  font-size: 26px;
  letter-spacing: -0.6px;
}
.auth-card .btn:not(.quiet),
.auth-card form .btn {
  width: 100%;
  min-height: 48px;
}
.auth-card > .quiet {
  align-self: center;
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--tertiary);
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--hairline-strong);
  flex: 1;
}
.boot {
  min-height: 90dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
  color: var(--secondary);
  padding: 24px;
}

/* ── Staff review of a prepared carrier fix ──────────────────────────── */
.review-page {
  min-height: 100dvh;
  background: var(--page);
  padding: 20px 16px 48px;
}
.review-top {
  max-width: 1080px;
  margin: 0 auto 18px;
}
.review-card {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 24px;
  box-shadow: 0 6px 18px var(--shadow);
  padding: 32px;
  min-width: 0;
}
.review-card section {
  min-width: 0;
}
.review-card > :empty {
  display: none;
}
.review-quote {
  border-left: 3px solid var(--hairline-strong);
  padding-left: 14px;
}
.review-steps {
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink);
}
.compare-field {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
}
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.compare-pane {
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 0;
}
.compare-pane.current {
  background: var(--field);
}
.compare-pane.proposed {
  border-color: var(--hairline-strong);
}
.compare-text {
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.compare-edit {
  line-height: 1.6;
  resize: vertical;
}
.diff-add {
  text-decoration: none;
  background: var(--field-strong);
  border-radius: 4px;
  padding: 1px 2px;
  font-weight: 600;
}
.diff-del {
  text-decoration: line-through;
  text-decoration-color: var(--tertiary);
  background: var(--field);
  border-radius: 4px;
  padding: 1px 2px;
  color: var(--secondary);
}
.review-issues {
  padding-left: 20px;
  line-height: 1.6;
  font-size: 14.5px;
}
.review-card .field input:disabled,
.review-card .field textarea:disabled {
  opacity: 0.7;
}
.review-actions {
  border-top: 1px solid var(--hairline);
  padding-top: 20px;
}
.review-result {
  align-items: flex-start;
}
.review-result p,
.review-result strong {
  color: inherit;
}

/* ── Wide screens ─────────────────────────────────────────────────────── */
@media (min-width: 1500px) {
  .shell {
    grid-template-columns: 252px minmax(0, 1fr);
  }
  .paper {
    padding: 40px 48px 52px;
  }
}

/* ── Narrower: list and detail take turns ─────────────────────────────── */
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 206px minmax(0, 1fr);
  }
  .paper {
    padding: 26px 26px 36px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .split.has-selection > .list,
  .split:not(.has-selection) > .detail-empty {
    display: none;
  }
  .detail {
    position: static;
  }
  .mobile-back {
    display: inline-flex;
  }
  .home-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metric-grid > .metric:last-child {
    grid-column: 1 / -1;
  }
  .auth-layout {
    padding: 16px;
  }
}

/* ── Phones: the page is the canvas, a floating tab bar below ────────── */
@media (max-width: 700px) {
  html {
    font-size: 15px;
  }
  h1 {
    font-size: 30px;
    letter-spacing: -0.7px;
  }
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main-col {
    padding: 0;
  }
  .strip {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 12px 16px 6px;
    min-height: 0;
  }
  .strip-mark {
    display: block;
  }
  .strip .org-picker-wrap {
    flex: 1;
    max-width: none;
    margin-left: -4px;
    padding-left: 4px;
  }
  .org-name {
    font-size: 16px;
  }
  .strip-status {
    order: 5;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .strip-status:empty {
    display: none;
  }
  .strip > .grow,
  #new-message {
    display: none;
  }
  .account-menu {
    display: block;
  }
  .paper {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 12px 16px calc(112px + env(safe-area-inset-bottom));
  }
  .no-org .paper {
    padding-bottom: 40px;
  }
  .paper .card {
    box-shadow: 0 6px 18px var(--shadow);
  }
  .page-head {
    margin-bottom: 18px;
  }
  .tabbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .tabbar::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 110px;
    background: linear-gradient(to bottom, transparent, var(--page) 70%);
    opacity: 0.92;
    pointer-events: none;
    z-index: -1;
  }
  .tabbar-glass {
    flex: 1;
    display: flex;
    padding: 4px;
    border-radius: 999px;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border: 1px solid var(--hairline);
    box-shadow: 0 10px 30px var(--shadow), 0 1px 4px var(--shadow);
    min-width: 0;
  }
  .tabbar .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-height: 52px;
    padding: 6px 0;
    border-radius: 999px;
    border: 0;
    font-size: 10px;
    letter-spacing: -0.1px;
    color: var(--tertiary);
    justify-content: center;
    text-align: center;
    min-width: 0;
  }
  .tabbar .nav-item.active {
    background: var(--wash);
    box-shadow: none;
    color: var(--ink);
  }
  .tabbar .nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tabbar .compose-disc {
    width: 54px;
    height: 54px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  }
  .tabbar .compose-disc .icon {
    width: 23px;
    height: 23px;
  }
  .panel {
    padding: 20px;
  }
  .hero {
    padding: 20px;
  }
  .hero-actions .primary {
    flex: 1;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 12px 13px;
  }
  .stat strong {
    font-size: 22px;
  }
  .notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .toolbar {
    gap: 10px;
  }
  .search {
    max-width: none;
  }
  .metric-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .metric-grid > .metric:last-child {
    grid-column: auto;
  }
  .metric > strong {
    font-size: 24px;
  }
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-card {
    padding: 13px 10px 11px 38px;
  }
  .plan-card input {
    left: 12px;
    top: 15px;
  }
  .plan-custom {
    padding-left: 12px;
  }
  .finder-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .topup-strip {
    grid-template-columns: minmax(0, 1fr);
  }
  .finder-times {
    display: none;
  }
  .billing-facts {
    flex-direction: column;
  }
  .dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }
  .dialog-head {
    padding: 16px 14px 12px 18px;
  }
  .dialog-body {
    padding: 4px 18px 18px;
  }
  .dialog-errors {
    padding: 0 18px;
  }
  .dialog-foot {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
  .dialog-foot .btn {
    flex: 1 1 auto;
  }
  .dialog-foot .choice-btn {
    flex-basis: 100%;
  }
  .golive-number {
    font-size: 32px;
  }
  .golive-qr {
    flex-direction: column;
    align-items: flex-start;
  }
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 12px;
    gap: 8px;
  }
  .auth-intro {
    padding: 16px 12px 8px;
    gap: 22px;
  }
  .auth-copy h1 {
    font-size: 36px;
    letter-spacing: -1.4px;
  }
  .auth-preview,
  .auth-intro > .auth-footer {
    display: none;
  }
  .auth-card {
    padding: 26px 20px;
    border-radius: 24px;
  }
  .review-page {
    padding: 14px 12px 32px;
  }
  .review-card {
    padding: 20px 16px;
    border-radius: 20px;
  }
  .review-card h1 {
    font-size: 26px;
  }
  .review-actions .btn {
    width: 100%;
  }
  .review-actions .grow {
    display: none;
  }
}
@media (max-width: 760px) {
  .compare {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* People on phones: each person is a card row, Edit always in reach. */
@media (max-width: 600px) {
  .people-table,
  .people-table tbody,
  .people-table tr,
  .people-table td {
    display: block;
  }
  .people-table thead {
    display: none;
  }
  .people-table tr {
    position: relative;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
  }
  .people-table tr:last-child {
    border-bottom: 0;
  }
  .people-table td {
    border: 0;
    padding: 2px 0 2px 40px;
    font-size: 14px;
  }
  .people-table td.person-cell {
    padding: 0 72px 4px 0;
  }
  .people-table td[data-label]::before {
    content: attr(data-label) " · ";
    color: var(--tertiary);
    font-size: 12.5px;
  }
  .people-table td.actions-cell {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
