/* OttoTalk's panel. Plain CSS, no build step: design tokens on :root (redefined
   for dark mode, which follows the operating system), then layout, then
   components. The colours are the logo's: indigo ("Otto") for the brand and
   the Agent, lime ("talk") for what is connected and for Human Replies. */

@font-face {
  font-family: InterVariable;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/inter-4.1.woff2") format("woff2");
}

:root {
  --font-sans: InterVariable, Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --bg: #ffffff;
  --well: #fafafa;
  --surface: #ffffff;
  --fg: #09090b;
  --fg-soft: #3f3f46;
  --muted: #71717a;
  --line: rgb(9 9 11 / 0.08);
  --ring: rgb(9 9 11 / 0.1);
  --ring-strong: rgb(9 9 11 / 0.15);
  --hover: rgb(9 9 11 / 0.04);

  --accent: #404999;
  --accent-hover: #343c85;
  --accent-text: #404999;
  --accent-soft: #eff0fa;
  --accent-ring: rgb(64 73 153 / 0.2);
  --focus: #404999;

  --ok-text: #4d7c0f;
  --ok-soft: #f6fbe9;
  --ok-ring: rgb(146 192 32 / 0.4);
  --ok-dot: #92c020;

  --warn-text: #b45309;
  --warn-soft: #fffbeb;
  --warn-ring: rgb(217 119 6 / 0.25);
  --warn-dot: #f59e0b;

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-text: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-ring: rgb(220 38 38 / 0.2);

  --info-soft: #f6fbe9;
  --info-ring: rgb(146 192 32 / 0.4);
  --info-text: #4d7c0f;

  --neutral-dot: #a1a1aa;
  --shadow-sm: 0 1px 2px rgb(9 9 11 / 0.05);

  --text-body: 1rem;
  --leading-body: 1.5rem;
  --text-small: 0.875rem;
  --leading-small: 1.25rem;
  --gutter: 1rem;

  color-scheme: light dark;
  font-family: var(--font-sans);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fg);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --well: rgb(255 255 255 / 0.025);
    --surface: #18181b;
    --fg: #fafafa;
    --fg-soft: #d4d4d8;
    --muted: #a1a1aa;
    --line: rgb(255 255 255 / 0.08);
    --ring: rgb(255 255 255 / 0.1);
    --ring-strong: rgb(255 255 255 / 0.15);
    --hover: rgb(255 255 255 / 0.05);

    --accent: #4b55b3;
    --accent-hover: #5c66c4;
    --accent-text: #a5acef;
    --accent-soft: rgb(99 110 210 / 0.14);
    --accent-ring: rgb(165 172 239 / 0.22);
    --focus: #8a92e6;

    --ok-text: #bef264;
    --ok-soft: rgb(146 192 32 / 0.12);
    --ok-ring: rgb(190 242 100 / 0.2);

    --warn-text: #fbbf24;
    --warn-soft: rgb(245 158 11 / 0.1);
    --warn-ring: rgb(251 191 36 / 0.2);

    --danger: #dc2626;
    --danger-hover: #ef4444;
    --danger-text: #f87171;
    --danger-soft: rgb(239 68 68 / 0.1);
    --danger-ring: rgb(248 113 113 / 0.2);

    --info-soft: rgb(146 192 32 / 0.12);
    --info-ring: rgb(190 242 100 / 0.2);
    --info-text: #bef264;

    --neutral-dot: #71717a;
    --shadow-sm: none;
  }
}

/* Body text is larger on phones and settles at 14px from 640px up. */
@media (min-width: 640px) {
  :root {
    --text-body: 0.875rem;
    --leading-body: 1.25rem;
    --text-small: 0.8125rem;
    --leading-small: 1.125rem;
    --gutter: 1.5rem;
  }
}
@media (min-width: 1024px) {
  :root { --gutter: 2rem; }
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  font-size: var(--text-body);
  line-height: var(--leading-body);
  background: var(--bg);
  isolation: isolate;
}

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.92em; }
img { display: block; }
strong { font-weight: 600; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--muted); }
.number { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Layout */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 72rem;
  height: 3.5rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo { display: flex; flex-shrink: 0; }
.logo img { width: auto; height: 1.75rem; }

.topnav { display: flex; gap: 0.25rem; min-width: 0; }
.topnav a {
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}
.topnav a:hover { color: var(--fg); background: var(--hover); }
.topnav a[aria-current="page"] { color: var(--fg); background: var(--hover); }
.topbar form { margin-left: auto; }

main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 4rem;
}
main.narrow { max-width: 48rem; }
@media (min-width: 640px) {
  main { padding-top: 2.5rem; }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.back-link:hover { color: var(--fg); }
.back-link svg { width: 1rem; height: 1rem; flex-shrink: 0; fill: currentColor; }

/* The title of a page, with its description or actions beside it. */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding-bottom: 2rem;
}
.page-header > div { min-width: 0; }
#new-company { display: flex; flex-direction: column; gap: 0.5rem; flex: 0 1 28rem; min-width: 0; }
@media (min-width: 640px) { #new-company .input-row { flex-wrap: nowrap; } }
#new-company .input-row > input { flex-basis: auto; }
.page-header h1 {
  font-size: 1.5rem;
  line-height: 2rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.page-header .subtitle { margin-top: 0.25rem; color: var(--muted); max-width: 60ch; }
.page-header .subtitle.number { font-variant-numeric: tabular-nums; }

/* A settings-style section: what it is on the left, its controls on the
   right; stacked on phones. Sections are divided by hairlines. */
.section {
  display: grid;
  gap: 1.25rem 3rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .section { grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); padding: 2.5rem 0; }
}
.section-intro { display: flex; flex-direction: column; gap: 0.375rem; }
.section-intro h2 { font-size: 1rem; line-height: 1.5rem; }
.section-intro p { color: var(--muted); max-width: 48ch; }
.section-body { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.section-body > form { max-width: 40rem; }

/* ----------------------------------------------------------------- Forms */

label, .label { font-weight: 500; color: var(--fg); }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field .hint { color: var(--muted); }
.input-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.input-row > input { flex: 1 1 14rem; min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  box-shadow: inset 0 0 0 1px var(--ring-strong), var(--shadow-sm);
}
@media (min-width: 640px) {
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  textarea { font-size: 0.875rem; line-height: 1.25rem; padding: 0.4375rem 0.625rem; }
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -1px;
}
textarea { resize: vertical; min-height: 12rem; line-height: 1.5rem; }
@media (min-width: 640px) { textarea { line-height: 1.375rem; } }

/* Hours and minutes of the Pause duration, each with its unit. */
.duration { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.duration .field { width: 7rem; }

/* The Agent Mode: a segmented control built on native radio buttons. */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 0.625rem;
  background: var(--hover);
  box-shadow: inset 0 0 0 1px var(--line);
}
.segmented label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  color: var(--muted);
  cursor: pointer;
}
.segmented label:hover { color: var(--fg); }
.segmented input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.segmented label:has(input:checked) {
  color: var(--fg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring), var(--shadow-sm);
}
.segmented label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.segmented .dot { width: 0.375rem; height: 0.375rem; }

/* --------------------------------------------------------------- Buttons */

/* Two sizes only: regular (36px) and small (28px). Secondary by default;
   each page has at most one .primary. */
button, .button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--ring-strong), var(--shadow-sm);
}
@media (min-width: 640px) {
  button, .button { font-size: 0.875rem; line-height: 1.25rem; padding: 0.5rem 0.75rem; }
}
button:hover, .button:hover { background: var(--well); }
@media (prefers-color-scheme: dark) {
  button:hover, .button:hover { background: #27272a; }
}
button:focus-visible, .button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button:disabled { opacity: 0.55; cursor: progress; }

button.primary, .button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
button.primary:hover, .button.primary:hover { background: var(--accent-hover); }

button.danger, .button.danger {
  background: var(--danger);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
button.danger:hover, .button.danger:hover { background: var(--danger-hover); }

/* Destructive but not the page's main action: quiet until hovered. */
.button.danger-soft { color: var(--danger-text); }
.button.danger-soft:hover { background: var(--danger-soft); }

button.small, .button.small {
  padding: 0.25rem 0.625rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}
@media (min-width: 640px) {
  button.small, .button.small { font-size: 0.8125rem; padding: 0.25rem 0.5rem; }
}

button.ghost, button.link {
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}
button.ghost:hover, button.link:hover { color: var(--fg); background: var(--hover); }
button.ghost.danger-text:hover { color: var(--danger-text); background: var(--danger-soft); }

/* Touch target of at least 48px for small buttons on coarse pointers. */
@media (pointer: coarse) {
  button.small::after, button.ghost::after, button.link::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 3rem);
    height: max(100%, 3rem);
    transform: translate(-50%, -50%);
  }
}

/* ---------------------------------------------------------------- Badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  line-height: 1.25rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--fg-soft);
  background: var(--hover);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 640px) {
  .badge { font-size: 0.75rem; line-height: 1rem; }
}
.badge:has(.dot) { padding-left: 0.4375rem; }

.dot {
  display: inline-block;
  flex-shrink: 0;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 999px;
  background: var(--neutral-dot);
}

.badge.ok { color: var(--ok-text); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.badge.ok .dot, .dot.ok { background: var(--ok-dot); }
.badge.warn { color: var(--warn-text); background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.badge.warn .dot, .dot.warn { background: var(--warn-dot); }
.badge.bad { color: var(--danger-text); background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-ring); }
.badge.bad .dot, .dot.bad { background: var(--danger); }

.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .dot.pulse { animation: none; } }

/* -------------------------------------------------------- Status & alerts */

.status-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.error { color: var(--danger-text); }
.error ul { margin: 0; padding-left: 1.25rem; }
.error li + li { margin-top: 0.25rem; }

/* A highlighted block: a Pause in effect, a warning, a QR code. */
.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
}
.callout > div { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; flex: 1 1 18rem; }
.callout h2, .callout h3 { font-size: 1rem; line-height: 1.5rem; }
.callout.warn { background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.callout.warn h2 { color: var(--warn-text); }
.callout.bad { background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-ring); }

.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-top: 0.25rem; }
.facts dt { font-weight: 500; color: var(--fg); }
.facts dd { color: var(--fg-soft); font-variant-numeric: tabular-nums; }

/* The QR code that pairs the Company's phone, with the steps beside it. */
.pairing {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 640px) {
  .pairing { grid-template-columns: auto minmax(0, 1fr); }
}
.pairing img {
  width: 13rem;
  height: 13rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--ring);
}
.pairing ol { display: flex; flex-direction: column; gap: 0.5rem; padding-left: 1.25rem; color: var(--fg-soft); }
.pairing .waiting { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }

.divider-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: var(--text-small);
}
.divider-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------------------------------------------------------------- Tables */

.table-scroll {
  margin: -0.5rem calc(var(--gutter) * -1);
  overflow-x: auto;
}
.table-scroll > div {
  display: inline-block;
  min-width: 100%;
  padding: 0.5rem var(--gutter);
  vertical-align: middle;
}
table { width: 100%; border-collapse: collapse; }
th {
  padding: 0 0.75rem 0.625rem;
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--ring);
}
td {
  padding: 0.75rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  color: var(--fg-soft);
}
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
th.number, td.number { text-align: right; font-variant-numeric: tabular-nums; }
td.actions { text-align: right; width: 1%; }
td a { color: var(--fg); font-weight: 500; text-decoration: none; }
td a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
td time, td.phone { font-variant-numeric: tabular-nums; }

/* Conversations: which of them the page lists, then the previous (newer)
   and next (older) pages, as two buttons of the same width. A rule above it
   continues the table's row dividers. */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: -0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.pagination-range {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pagination-range strong { color: var(--fg); font-weight: 500; }
/* "conversas" only where there is room for it. */
.pagination-noun { display: none; }
@media (min-width: 640px) {
  .pagination-noun { display: inline; }
}
.pagination-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.pagination .button svg { width: 1rem; height: 1rem; flex-shrink: 0; fill: currentColor; }
/* The icon's side gets the vertical padding, so the label sits centred. */
.pagination .button.previous { padding: 0.25rem 0.625rem 0.25rem 0.375rem; }
.pagination .button.next { padding: 0.25rem 0.375rem 0.25rem 0.625rem; }
@media (min-width: 640px) {
  .pagination .button.previous { padding: 0.25rem 0.5rem 0.25rem 0.25rem; }
  .pagination .button.next { padding: 0.25rem 0.25rem 0.25rem 0.5rem; }
}
.pagination .button[aria-disabled="true"] {
  color: var(--muted);
  opacity: 0.5;
  box-shadow: inset 0 0 0 1px var(--ring);
  cursor: default;
}
.pagination .button[aria-disabled="true"]:hover { background: var(--surface); }
@media (pointer: coarse) {
  .pagination a.button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 3rem);
    height: max(100%, 3rem);
    transform: translate(-50%, -50%);
  }
}

/* Testers: a plain list of numbers. */
table.plain td { padding-top: 0.5rem; padding-bottom: 0.5rem; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 2.5rem 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  border: 1px dashed var(--ring-strong);
}
.empty .empty-title { font-weight: 500; color: var(--fg); }
.empty p:not(.empty-title) { color: var(--muted); max-width: 44ch; }

/* --------------------------------------------------------- Conversation */

/* The Contact's messages on the left, the Company's (the Agent's and Human
   Replies) on the right, like the WhatsApp the Contact sees. */
.chat {
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--well);
  box-shadow: inset 0 0 0 1px var(--line);
}
@media (min-width: 640px) { .chat { padding: 1.5rem; } }
ol.messages { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.message {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: min(36rem, 85%);
  padding: 0.5rem 0.875rem 0.625rem;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.message .message-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--muted);
}
.message .message-author { font-weight: 600; color: var(--fg-soft); }
.message time { font-variant-numeric: tabular-nums; }
.message .message-text { text-wrap: wrap; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--fg); }

.message.from-contact { align-self: flex-start; border-top-left-radius: 0.375rem; }
.message.from-agent {
  align-self: flex-end;
  border-top-right-radius: 0.375rem;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-ring);
}
.message.from-agent .message-author { color: var(--accent-text); }
.message.from-human {
  align-self: flex-end;
  border-top-right-radius: 0.375rem;
  background: var(--info-soft);
  box-shadow: inset 0 0 0 1px var(--info-ring);
}
.message.from-human .message-author { color: var(--info-text); }
/* A reply the Agent failed to send: where it would have been, with its error. */
.message.failed-reply {
  align-self: flex-end;
  border-top-right-radius: 0.375rem;
  background: var(--danger-soft);
  box-shadow: inset 0 0 0 1px var(--danger-ring);
}
.message.failed-reply .message-author { color: var(--danger-text); }
.message .failed-reply-error {
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--danger-text);
  background: var(--hover);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: var(--text-small);
}
.chat-legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.swatch { width: 0.625rem; height: 0.625rem; border-radius: 0.1875rem; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--ring); }
.swatch.contact { background: var(--surface); }
.swatch.agent { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.swatch.human { background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info-ring); }

/* ------------------------------------------------------------ Login page */

.login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100dvh;
  max-width: calc(20rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3rem var(--gutter);
}
.login .logo img { height: 2.75rem; }
.login h1 { margin-top: 1.5rem; font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.02em; }
.login .subtitle { margin-top: 0.25rem; color: var(--muted); }
.login form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
.login button { width: 100%; }

/* ------------------------------------------------------- Danger confirm */

.confirm { max-width: 32rem; }
.confirm h1 { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.confirm .lead { margin-top: 0.75rem; color: var(--fg-soft); }
.confirm ul { margin-top: 1rem; padding-left: 1.25rem; color: var(--fg-soft); display: flex; flex-direction: column; gap: 0.25rem; }
.confirm form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 2rem; }

.not-found { padding: 4rem 0; text-align: center; }
.not-found h1 { font-size: 1.5rem; line-height: 2rem; letter-spacing: -0.02em; }
.not-found p { margin-top: 1rem; }
.not-found a { color: var(--accent-text); font-weight: 500; }

/* Renaming a Company: a disclosure beside its name. */
.rename { position: relative; }
.rename summary { list-style: none; }
.rename summary::-webkit-details-marker { display: none; }
.rename[open] summary { background: var(--hover); }
.rename form {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2 * var(--gutter)));
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring), 0 10px 30px -10px rgb(9 9 11 / 0.2);
}
@media (max-width: 639px) {
  .rename form { left: 0; right: auto; }
}

td.month { color: var(--fg); }
td.month:first-letter { text-transform: uppercase; }

/* A Conversation's page: the Pause, then the messages. */
#pause { margin-bottom: 2rem; }
.conversation { display: flex; flex-direction: column; gap: 1rem; }
.conversation-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.conversation-header h2 { font-size: 1rem; line-height: 1.5rem; }
