/* Huddle in Missouri City Dentistry's colours: navy and charcoal on warm off-white, serif
   headings over Inter, pill buttons (taken from missouricitydentistry.net). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2-variations"), url("/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --bg: #f8f7f3;
  --surface: #fdfdfc;
  --surface-2: #f1f1ee;
  --line: #e7e8e7;
  --line-strong: #dcdcd9;
  --text: #1f2a30;
  --muted: #5e6970;
  --heading: #1f2a30;
  /* Charcoal for the main buttons, like the site's "Book a Visit". */
  --accent: #1f2a30;
  --accent-strong: #11191d;
  --accent-text: #ffffff;
  /* Navy, the logo's colour: links, chosen filters, the sidebar. */
  --brand: #1f3a5f;
  --brand-strong: #172d4a;
  --accent-ink: #1f3a5f;
  --accent-soft: #eaeef1;
  --note-line: #e2e5dd;
  --chip-text: #3f4a4e;
  --side-bg: #1f3a5f;
  --side-text: #eef2f7;
  --side-muted: #a9b8cc;
  --side-hover: rgba(255, 255, 255, 0.08);
  --side-active-bg: #eaeef1;
  --side-active-text: #1f3a5f;
  --tab-bg: #f9f8f4;
  --warn: #d19a36;
  --warn-soft: #f7ebd2;
  --warn-ink: #7c5410;
  --danger: #b8432d;
  --danger-soft: #f7ddd5;
  --ok: #2f7a4e;
  --ok-soft: #e2efe6;
  --radius: 16px;
  --radius-sm: 10px;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1418;
    --surface: #161d22;
    --surface-2: #1d262c;
    --line: #27323a;
    --line-strong: #34424c;
    --text: #e7ecef;
    --muted: #9ba8b0;
    --heading: #f2f5f7;
    --accent: #e7ecef;
    --accent-strong: #ffffff;
    --accent-text: #11191d;
    --brand: #3d6394;
    --brand-strong: #4a73a8;
    --accent-ink: #9dbbe6;
    --accent-soft: #1e2a36;
    --note-line: #2a3845;
    --chip-text: #c9d2d8;
    --side-bg: #0f1f33;
    --side-text: #e3eaf3;
    --side-muted: #8699b3;
    --side-hover: rgba(255, 255, 255, 0.06);
    --side-active-bg: #233a57;
    --side-active-text: #e3eaf3;
    --tab-bg: #11181d;
    --warn: #e2b35a;
    --warn-soft: #3a2e14;
    --warn-ink: #f0c877;
    --danger: #ef8b77;
    --danger-soft: #3d201b;
    --ok: #7fcf99;
    --ok-soft: #173424;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-ink);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 2px;
}

h1 {
  margin: 0;
  font: 400 32px/1.15 var(--serif);
  letter-spacing: -0.01em;
  color: var(--heading);
}

h2 {
  margin: 24px 0 10px;
  font-size: 17px;
  font-weight: 650;
  color: var(--heading);
}

.boot {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Layout: the teal sidebar on computers, a tab bar on phones ---- */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 26px 16px 18px;
  background: var(--side-bg);
  color: var(--side-text);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  font: 600 24px/1 var(--serif);
  color: var(--heading);
}

.sidebar .brand {
  color: var(--side-text);
}

.brand .logo-mark {
  width: 34px;
  height: 34px;
}

.sidebar .eyebrow {
  margin: 18px 0 8px;
  padding: 0 12px;
  color: var(--side-muted);
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 999px;
  color: var(--side-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}

.nav a:hover {
  background: var(--side-hover);
}

.nav a.active {
  background: var(--side-active-bg);
  color: var(--side-active-text);
  font-weight: 650;
}

.nav .label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav .icon {
  width: 20px;
  height: 20px;
}

.sidebar .spacer {
  flex: 1;
}

.me {
  margin-top: 10px;
  padding: 14px 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: var(--side-muted);
}

.me strong {
  display: block;
  color: var(--side-text);
  font-size: 14px;
}

.me .btn {
  display: flex;
  width: fit-content;
  margin-top: 10px;
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--side-text);
}

.me .btn:hover {
  background: var(--side-hover);
}

.main {
  min-width: 0;
  width: 100%;
  max-width: 1240px;
  padding: 36px 40px 56px;
}

.tabbar {
  display: none;
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .main {
    padding: 22px 16px calc(92px + env(safe-area-inset-bottom));
  }
  .tabbar {
    position: fixed;
    inset: auto 0 0 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: var(--tab-bg);
    border-top: 1px solid var(--line);
    z-index: 10;
  }
  .tabbar a {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 6px 2px;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
  }
  .tabbar .label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }
  .tabbar a.active {
    color: var(--brand);
  }
  .tabbar .count {
    position: absolute;
    top: 0;
    right: calc(50% - 24px);
  }
  h1 {
    font-size: 28px;
  }
}

/* ---- The logo: a tooth that is also a chat bubble (js/logo.js) ---- */

.logo {
  --logo-fill: var(--brand);
  --logo-dots: #ffffff;
  --logo-spark: var(--warn);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar .logo {
  --logo-fill: #ffffff;
  --logo-dots: var(--side-bg);
  --logo-spark: #f2c25b;
}

.logo-mark {
  width: 32px;
  height: 32px;
  overflow: visible;
}

.logo-fill {
  fill: var(--logo-fill);
}

.logo-line {
  fill: none;
  stroke: var(--logo-fill);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
}

.logo-dots circle {
  fill: var(--logo-dots);
}

.logo-spark {
  fill: var(--logo-spark);
  opacity: 0;
}

.logo-mark *,
.logo-name {
  transform-box: fill-box;
  transform-origin: center;
}

/* As it appears, in about a second: both sides draw down from the top, the tooth fills, the
   dots pop in one after another, a sparkle flashes and the name slides in. */
.logo-line {
  animation: logo-draw 0.45s cubic-bezier(0.65, 0, 0.35, 1) both;
}

.logo-fill {
  animation: logo-fill 0.2s 0.35s ease-out both;
}

.logo-dots circle {
  animation: logo-pop 0.34s cubic-bezier(0.3, 1.7, 0.5, 1) both;
}

.logo-dots g:nth-child(1) circle {
  animation-delay: 0.42s;
}

.logo-dots g:nth-child(2) circle {
  animation-delay: 0.49s;
}

.logo-dots g:nth-child(3) circle {
  animation-delay: 0.56s;
}

.logo-spark {
  animation: logo-twinkle 0.55s 0.72s ease-out both, logo-twinkle 0.55s 7.72s ease-out infinite;
}

.logo-name {
  animation: logo-name 0.35s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Then the dots type every seven seconds; on hover, and when something new arrives, at once. */
.logo-dots g {
  animation: logo-wave 7s 2.2s ease-in-out infinite;
}

.logo-dots g:nth-child(2) {
  animation-delay: 2.29s;
}

.logo-dots g:nth-child(3) {
  animation-delay: 2.38s;
}

.logo.bump .logo-dots g,
.logo:hover .logo-dots g {
  animation: logo-type 0.62s ease-in-out infinite;
}

.logo.bump .logo-dots g:nth-child(2),
.logo:hover .logo-dots g:nth-child(2) {
  animation-delay: 0.09s;
}

.logo.bump .logo-dots g:nth-child(3),
.logo:hover .logo-dots g:nth-child(3) {
  animation-delay: 0.18s;
}

@keyframes logo-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

@keyframes logo-fill {
  from { fill-opacity: 0; }
  to { fill-opacity: 1; }
}

@keyframes logo-pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

@keyframes logo-twinkle {
  0% { opacity: 0; transform: scale(0) rotate(-60deg); }
  45% { opacity: 1; transform: scale(1.2) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.6) rotate(25deg); }
}

@keyframes logo-name {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes logo-wave {
  0%, 12%, 100% { transform: translateY(0); }
  4% { transform: translateY(-4px); }
  8% { transform: translateY(0.8px); }
}

@keyframes logo-type {
  0%, 60%, 100% { transform: translateY(0); }
  25% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-mark *,
  .logo-name {
    animation: none !important;
  }
}

/* ---- Page parts ---- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.date {
  margin-bottom: 6px;
  font-size: 17px;
  color: var(--muted);
}

.home-head h1 {
  font-size: 42px;
}

@media (max-width: 860px) {
  .home-head h1 {
    font-size: 32px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card.pad {
  padding: 20px 22px;
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 6px;
}

.card-head h2 {
  margin: 0;
  font: 600 22px/1.2 var(--serif);
}

.group-label {
  padding: 14px 22px 4px;
}

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

.list > li + li {
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  color: var(--text);
  text-decoration: none;
}

a.row:hover,
.row-button:hover {
  background: var(--surface-2);
}

.list > li:last-child > .row {
  border-radius: 0 0 var(--radius) var(--radius);
}

.row .grow {
  flex: 1;
  min-width: 0;
}

.row .title {
  font-weight: 650;
  font-size: 16px;
  color: var(--accent-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row .meta {
  font-size: 14px;
  color: var(--muted);
}

.row .when,
.activity .when {
  flex: none;
  font-size: 12px;
  color: var(--muted);
}

.row .snippet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-button {
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}

.empty {
  margin: 0;
  padding: 18px 22px 22px;
  color: var(--muted);
}

/* Coloured dots in front of rows, as in a to-do list. */
.dot {
  flex: none;
  align-self: flex-start;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.dot.warn {
  background: var(--warn);
}

.dot.danger {
  background: var(--danger);
}

.dot.ok {
  background: var(--ok);
}

.dot.accent {
  background: var(--accent-ink);
}

.count {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--warn);
  color: #2b1d05;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--muted);
}

.badge.open {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.badge.in_progress {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.badge.waiting {
  background: var(--surface-2);
  color: var(--muted);
}

.badge.done {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.page-head .toolbar {
  margin-bottom: 0;
}

/* Filters: separate pills, the chosen one filled. */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button {
  padding: 8px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--chip-text);
  cursor: pointer;
  font-weight: 550;
}

.segmented button:hover {
  background: var(--surface-2);
}

.segmented button[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

@media (max-width: 860px) {
  .segmented {
    gap: 6px;
  }
  .segmented button {
    padding: 7px 13px;
    font-size: 14px;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 14px;
}

.chip a {
  display: inline-flex;
  padding: 0 6px;
  color: inherit;
  text-decoration: none;
  font-size: 16px;
}

/* ---- Home ---- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat {
  padding: 20px 24px 22px;
}

.stat-label {
  font-size: 15px;
  color: var(--muted);
}

.stat-value {
  margin: 4px 0 2px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.stat-sub {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 14px 16px 16px;
  }
  .stat-value {
    font-size: 28px;
  }
  .stat-label,
  .stat-sub {
    font-size: 13px;
  }
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 22px;
  align-items: start;
}

.home-grid > .side {
  display: grid;
  gap: 22px;
}

/* minmax(0, …) so long one-line titles shorten instead of widening the page. */
.home-grid > *,
.detail-grid > * {
  min-width: 0;
}

@media (max-width: 1100px) {
  .home-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.attention a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  color: var(--text);
  text-decoration: none;
}

.attention a:hover {
  background: var(--surface-2);
}

.attention .num {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 600;
}

.attention .num.warn {
  background: var(--warn-soft);
  color: var(--warn-ink);
}

.attention .grow {
  flex: 1;
  min-width: 0;
}

.attention .what {
  font-weight: 650;
  font-size: 16px;
  color: var(--heading);
}

.attention .sub {
  font-size: 14px;
  color: var(--muted);
}

.attention .icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

/* ---- Buttons and forms ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--heading);
}

.btn:hover {
  background: var(--surface-2);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
  letter-spacing: 0.03em;
}

.btn.primary:hover {
  background: var(--accent-strong);
}

.btn.danger {
  color: var(--danger);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn.block {
  width: 100%;
}

.btn.small-btn,
.small-btn {
  padding: 4px 12px;
  font-size: 13px;
}

.btn.link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-weight: 600;
}

.btn.link:hover {
  background: none;
  text-decoration: underline;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--heading);
}

.field .hint {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent-ink);
}

.textarea {
  min-height: 84px;
  resize: vertical;
}

.select.narrow {
  width: auto;
  border-radius: 999px;
  padding: 8px 14px;
}

.code-input {
  font: 600 22px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 6px;
}

.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
}

.check input {
  margin-top: 4px;
  accent-color: var(--accent);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

@media (max-width: 600px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

fieldset.plain {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

fieldset.plain legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--heading);
}

.error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 600;
}

.note {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--note-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text);
}

.note.compact {
  margin-bottom: 6px;
  padding: 5px 12px;
  font-size: 13px;
}

.banner {
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn-ink);
  font-weight: 600;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.actions.start {
  justify-content: flex-start;
  margin-top: 16px;
}

/* ---- Sign-in ---- */

.center {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 16px;
}

.center .card {
  width: 100%;
  max-width: 440px;
  padding: 30px 28px;
}

.center h1 {
  margin-bottom: 8px;
}

/* ---- Messages ---- */

.conversation {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
}

.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 16px;
}

.message {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.message .who {
  font-weight: 700;
  font-size: 14px;
  color: var(--heading);
}

.message .when {
  margin-left: 8px;
  font-size: 12px;
  color: var(--muted);
}

.message .text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message.bot {
  border: 1px solid var(--note-line);
  background: var(--accent-soft);
}

.message .mention {
  color: var(--accent-ink);
  font-weight: 650;
}

.message-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

.message .edited {
  margin-left: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Edit and Delete show on hover or focus; always on touch screens. */
.message-actions {
  display: inline-flex;
  gap: 14px;
  margin-left: auto;
  opacity: 0;
}

.message:hover .message-actions,
.message:focus-within .message-actions {
  opacity: 1;
}

@media (hover: none) {
  .message-actions {
    opacity: 1;
  }
}

.message-actions .btn.link {
  padding: 0;
}

.message.deleted .text {
  font-style: italic;
}

.message-edit .textarea {
  min-height: 64px;
  margin-top: 6px;
}

.message-edit .actions {
  margin-top: 8px;
}

/* A private channel's lock, after its name. */
.private {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: -2px;
  color: var(--muted);
}

.private .icon {
  width: 15px;
  height: 15px;
}

.new-divider {
  margin: 8px 0;
  border-top: 2px solid var(--warn);
  color: var(--warn-ink);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.composer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding: 12px 0 4px;
  background: var(--bg);
}

.composer .textarea {
  min-height: 46px;
  max-height: 200px;
  border-radius: 22px;
  padding: 11px 16px;
}

@media (max-width: 860px) {
  .composer {
    bottom: calc(70px + env(safe-area-inset-bottom));
  }
}

.suggest {
  margin: 0 0 6px;
  max-height: 180px;
  overflow: auto;
}

.suggest button {
  display: block;
  width: 100%;
  padding: 9px 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.suggest button[aria-selected="true"],
.suggest button:hover {
  background: var(--accent-soft);
}

/* ---- Item page ---- */

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

@media (max-width: 1000px) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.details {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.facts dt {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.facts dd {
  margin: 3px 0 14px;
}

.facts dd .select {
  padding: 7px 10px;
}

.activity {
  font-size: 13px;
  color: var(--muted);
}

.activity li {
  padding: 5px 0;
}

/* ---- Dialogs and tables ---- */

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 16px 16px;
  background: rgba(10, 28, 28, 0.45);
  z-index: 20;
}

.dialog {
  width: 100%;
  max-width: 540px;
  max-height: 84vh;
  overflow: auto;
  padding: 24px;
}

.dialog h2 {
  margin-top: 0;
  font: 600 24px/1.2 var(--serif);
}

.section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.nudge h2 {
  margin-top: 0;
}

.nudge .btn.link {
  margin-left: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.table tr.off td {
  color: var(--muted);
}

.table td.right {
  text-align: right;
}

.scroll-x {
  overflow-x: auto;
}

.nowrap {
  white-space: nowrap;
}

.icon {
  flex: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Leads ---- */

.lead-summary {
  margin: 6px 0 0;
  font-size: 16px;
  color: var(--muted);
}

.lead-call .call {
  font-size: 17px;
  padding: 12px 22px;
}

.lead-call .call .icon {
  width: 20px;
  height: 20px;
}

.lead-call .deadline {
  margin: 12px 0 0;
  font-weight: 650;
  color: var(--heading);
}

.lead-call .deadline.late {
  color: var(--danger);
}

.lead-call .deadline.done {
  color: var(--ok);
}

.lead-call h2 {
  margin-top: 18px;
}

.outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

/* ---- Settings ---- */

h2.flush {
  margin-top: 0;
}

.input.narrow-input {
  width: 12em;
}

.input.time {
  width: 8.5em;
  padding: 6px 8px;
}

.hours legend {
  font: 600 18px/1.3 var(--serif);
  color: var(--heading);
}

.hours-table td {
  padding: 6px 8px;
  vertical-align: middle;
  border-bottom: 0;
}

.check.inline {
  margin: 0;
}

/* ---- Front-desk computers ---- */

.station-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -12px 0 18px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--note-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 14px;
}

.lock .card {
  max-width: 560px;
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0 6px;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  text-align: left;
  color: var(--heading);
}

.person:hover {
  background: var(--surface-2);
}

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.lock-foot {
  margin: 18px 0 0;
}

.btn.link.small {
  font-size: 13px;
}

/* ---- Offices ---- */

.office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 22px;
}

.office .problems .row .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.office-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px 18px;
  margin: 0;
  padding: 16px 22px 4px;
  border-top: 1px solid var(--line);
}

.office-stats dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.office-stats dd {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--heading);
}

.office-stats dd.sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.office-foot {
  margin: 0;
  padding: 10px 22px 18px;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.office-floor {
  border-top: 1px solid var(--line);
  padding-top: 4px;
}

.office-floor h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 22px 4px;
  font-size: 15px;
  font-weight: 650;
  color: var(--heading);
}

.office-floor > p {
  margin: 4px 22px 8px;
}

.office-floor .office-stats {
  border-top: 0;
  padding-top: 6px;
}

.card.health {
  margin-bottom: 16px;
}

.floor-settings .minutes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 4px 18px;
}

.floor-settings .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.floor-settings h2:not(.flush) {
  margin-top: 20px;
}

.head-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.floor-channel .row {
  align-items: flex-start;
}

.floor-channel time {
  min-width: 64px;
  padding-top: 2px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ---- Search ---- */

.side-search {
  position: relative;
  margin: 0 0 4px;
}

.side-search .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--side-muted);
  pointer-events: none;
}

.side-search input {
  width: 100%;
  padding: 10px 14px 10px 39px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--side-text);
  font: inherit;
  font-size: 15px;
}

.side-search input::placeholder {
  color: var(--side-muted);
}

.side-search input:focus {
  border-color: var(--side-muted);
  outline: none;
}

.search-form {
  margin-bottom: 16px;
}

.search-form .input {
  max-width: 640px;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 16px;
}

.search-messages .found {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

mark {
  border-radius: 3px;
  background: var(--warn-soft);
  color: inherit;
}

/* Search sits in the sidebar on computers; phones get a button on Home and Messages. */
@media (min-width: 861px) {
  .phone-only {
    display: none;
  }
}
