/*
 * TetherCord design system. Shared by the website and the dashboard.
 *
 * Built on two rule sets:
 *   - The Apple design language: one accent, pill actions, a 400/600/700
 *     weight ladder, hairlines instead of borders, no shadows on UI chrome.
 *   - Liquid glass: frosted, refracting surfaces for navigation, cards and
 *     dialogs, sitting over a soft glow so the glass has something to show.
 *
 * The accent is the brand teal, deepened in light mode so white text on it
 * stays readable (#14A89E itself is only 2.9:1 against white).
 *
 * Themes key off data-theme on <html>, set by boot.js before first paint.
 */

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

/* ------------------------------------------------------------------ tokens */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --s-xxs: 2px;
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-base: 16px;
  --s-lg: 20px;
  --s-xl: 24px;
  --s-xxl: 32px;
  --s-xxxl: 48px;
  --s-huge: 64px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  --t-hero: clamp(42px, 7.2vw, 80px);
  --t-title1: clamp(34px, 5vw, 56px);
  --t-title2: clamp(30px, 3.6vw, 40px);
  --t-title3: 28px;
  --t-headline: 20px;
  --t-body: 17px;
  --t-callout: 15px;
  --t-caption: 13px;
  --t-micro: 11px;

  --w-regular: 400;
  --w-semibold: 600;
  --w-bold: 700;

  --dur: 180ms;
  --dur-slow: 240ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: var(--s-xl);
  --content: 1120px;
  --topbar-h: 56px;

  /* Brand colours, used as-is only in the logo and the backdrop glow. */
  --brand-teal: #14a89e;
  --brand-amber: #f5a300;
  --brand-navy: #0f1b33;
}

:root,
html[data-theme="light"] {
  color-scheme: light;

  --accent: #0b766f;
  --accent-focus: #0e8a81;
  --on-accent: #ffffff;
  --accent-soft: rgba(11, 118, 111, 0.1);

  --ink: #0f1b33;
  --ink-80: #38425a;
  --ink-48: #5c6577;

  --page: #eef2f5;
  --canvas: #ffffff;
  --parchment: #f5f5f7;
  --tile: #0f1b33;
  --on-tile: #ffffff;
  --on-tile-muted: #c3c9d6;
  --accent-on-tile: #2fd1c4;

  --hairline: rgba(15, 27, 51, 0.12);
  --divider: rgba(15, 27, 51, 0.07);
  --field: rgba(255, 255, 255, 0.62);
  --field-hover: rgba(255, 255, 255, 0.8);
  --quiet: rgba(15, 27, 51, 0.05);
  --scrim: rgba(10, 17, 32, 0.38);

  --danger: #c4161c;
  --danger-fill: #c4161c;
  --success: #1c7c3a;
  --warning: #9a5800;

  /* Glass */
  --glass-tint-top: rgba(255, 255, 255, 0.34);
  --glass-tint-bottom: rgba(236, 240, 244, 0.22);
  --glass-tint-top-hover: rgba(255, 255, 255, 0.46);
  --glass-tint-bottom-hover: rgba(236, 240, 244, 0.32);
  --glass-rim-top: rgba(255, 255, 255, 0.75);
  --glass-rim-hairline: rgba(255, 255, 255, 0.22);
  --glass-rim-bottom: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(15, 27, 51, 0.1);
  --glass-menu: rgba(246, 248, 250, 0.72);
  --glass-modal: rgba(255, 255, 255, 0.72);

  --glow-teal: rgba(20, 168, 158, 0.22);
  --glow-amber: rgba(245, 163, 0, 0.14);
  --glow-sky: rgba(56, 132, 214, 0.12);
  --glow-corner: rgba(20, 168, 158, 0.08);

  --hero-shadow: 0 30px 60px -20px rgba(15, 27, 51, 0.28);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --accent: #2fd1c4;
  --accent-focus: #5be0d3;
  --on-accent: #0f1b33;
  --accent-soft: rgba(47, 209, 196, 0.14);

  --ink: #f2f4f8;
  --ink-80: #c3c9d6;
  --ink-48: #8e98ad;

  --page: #0a1120;
  --canvas: #121a2b;
  --parchment: #172136;
  --tile: #131d33;
  --on-tile: #ffffff;
  --on-tile-muted: #c3c9d6;
  --accent-on-tile: #2fd1c4;

  --hairline: rgba(255, 255, 255, 0.12);
  --divider: rgba(255, 255, 255, 0.07);
  --field: rgba(255, 255, 255, 0.06);
  --field-hover: rgba(255, 255, 255, 0.1);
  --quiet: rgba(255, 255, 255, 0.06);
  --scrim: rgba(0, 0, 0, 0.55);

  --danger: #ff6b63;
  --danger-fill: #d92d2d;
  --success: #4fd17a;
  --warning: #ffb648;

  --glass-tint-top: rgba(255, 255, 255, 0.07);
  --glass-tint-bottom: rgba(179, 190, 210, 0.05);
  --glass-tint-top-hover: rgba(255, 255, 255, 0.11);
  --glass-tint-bottom-hover: rgba(179, 190, 210, 0.08);
  --glass-rim-top: rgba(255, 255, 255, 0.4);
  --glass-rim-hairline: rgba(255, 255, 255, 0.08);
  --glass-rim-bottom: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-menu: rgba(20, 28, 46, 0.72);
  --glass-modal: rgba(16, 24, 40, 0.74);

  --glow-teal: rgba(20, 168, 158, 0.26);
  --glow-amber: rgba(245, 163, 0, 0.12);
  --glow-sky: rgba(56, 132, 214, 0.18);
  --glow-corner: rgba(20, 168, 158, 0.16);

  --hero-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

/* ------------------------------------------------------------------- base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: 1.47;
  letter-spacing: -0.01em;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* The glow behind everything. Glass shows what is behind it; over a flat
   colour it reads as a grey box, so this is part of the recipe. */
.backdrop {
  position: relative;
  isolation: isolate;
}

.backdrop::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(42rem 34rem at 18% 12%, var(--glow-teal), transparent 62%),
    radial-gradient(34rem 28rem at 86% 26%, var(--glow-amber), transparent 62%),
    radial-gradient(40rem 34rem at 60% 88%, var(--glow-sky), transparent 62%),
    radial-gradient(60rem 40rem at -10% 110%, var(--glow-corner), transparent 60%);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: var(--w-bold);
  margin: 0;
  letter-spacing: -0.022em;
  line-height: 1.1;
}

h1 { font-size: var(--t-title1); }
h2 { font-size: var(--t-title2); }
h3 { font-size: var(--t-headline); letter-spacing: -0.012em; line-height: 1.25; }
h4 { font-size: var(--t-body); font-weight: var(--w-semibold); letter-spacing: -0.01em; }

p { margin: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; text-underline-offset: 3px; }

strong, b { font-weight: var(--w-semibold); }

code, .mono {
  font-family: var(--mono);
  font-size: 0.88em;
  letter-spacing: 0;
}

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--accent-soft); }

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

.skip-link {
  position: absolute;
  left: var(--s-base);
  top: -100px;
  z-index: 100;
  padding: var(--s-sm) var(--s-base);
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
}

.skip-link:focus { top: var(--s-sm); }

[hidden] { display: none !important; }

/* ------------------------------------------------------------ type helpers */

.hero-title {
  font-size: var(--t-hero);
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.eyebrow {
  font-size: var(--t-callout);
  font-weight: var(--w-semibold);
  color: var(--accent);
  letter-spacing: 0;
}

.lead {
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.38;
  color: var(--ink-80);
  letter-spacing: -0.015em;
}

.muted { color: var(--ink-48); }
.soft { color: var(--ink-80); }
.callout { font-size: var(--t-callout); }
.caption { font-size: var(--t-caption); letter-spacing: 0; }
.micro { font-size: var(--t-micro); letter-spacing: 0.01em; }
.semibold { font-weight: var(--w-semibold); }
.danger-text { color: var(--danger); }
.success-text { color: var(--success); }
.warning-text { color: var(--warning); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ glass */

.glass {
  position: relative;
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, var(--glass-tint-top), var(--glass-tint-bottom));
  box-shadow:
    inset 0 1px 0 var(--glass-rim-top),
    inset 0 0 0 1px var(--glass-rim-hairline),
    inset 0 -1px 0 var(--glass-rim-bottom);
  /* Fallback where refraction doesn't run. glass.js swaps this for an SVG
     displacement filter in Chromium. */
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.glass-hover {
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}

.glass-hover:hover {
  background: linear-gradient(180deg, var(--glass-tint-top-hover), var(--glass-tint-bottom-hover));
  transform: translateY(-2px);
}

/* Small things that appear in bulk: no refraction, just frost. */
.glass-chip {
  border: 1px solid var(--glass-border);
  background: linear-gradient(180deg, var(--glass-tint-top), var(--glass-tint-bottom));
  box-shadow: inset 0 1px 0 var(--glass-rim-top);
  backdrop-filter: blur(8px) saturate(130%);
  -webkit-backdrop-filter: blur(8px) saturate(130%);
}

/* Menus float over anything, so they trade transparency for legibility. */
.glass-menu {
  border: 1px solid var(--glass-border);
  background: var(--glass-menu);
  box-shadow: inset 0 1px 0 var(--glass-rim-top);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.glass-modal {
  background:
    linear-gradient(180deg, var(--glass-modal), var(--glass-modal)),
    linear-gradient(180deg, var(--glass-tint-top), var(--glass-tint-bottom));
}

/* -------------------------------------------------------------- layout */

.wrap {
  width: 100%;
  max-width: calc(var(--content) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow { max-width: calc(760px + var(--gutter) * 2); }

.stack { display: flex; flex-direction: column; gap: var(--s-base); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-sm); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s-xl); }
.stack-xl { display: flex; flex-direction: column; gap: var(--s-xxl); }
.row { display: flex; align-items: center; gap: var(--s-md); }
.row-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s-sm); }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s-base); flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }

.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--s-base); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* ------------------------------------------------------------- buttons */

.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 44px;
  padding: var(--s-md) var(--s-xl);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-size: var(--t-body);
  font-weight: var(--w-regular);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.95); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-focus); }

.btn-outline { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }

.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }

.btn-quiet { background: var(--quiet); color: var(--ink); }
.btn-quiet:hover { background: var(--field-hover); }

.btn-danger { background: var(--danger-fill); color: #ffffff; }

.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--quiet); }

.btn-sm { min-height: 34px; padding: 6px var(--s-base); font-size: var(--t-callout); }
.btn-block { width: 100%; }

.btn-icon {
  width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.btn svg, .icon { width: 18px; height: 18px; flex: none; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 44px; height: 44px; }

/* -------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: var(--s-xs); }

.label {
  font-size: var(--t-callout);
  font-weight: var(--w-semibold);
  color: var(--ink);
}

.hint { font-size: var(--t-caption); color: var(--ink-48); letter-spacing: 0; }
.field-error { font-size: var(--t-caption); color: var(--danger); letter-spacing: 0; }

.input,
.select,
.textarea {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: var(--s-md) var(--s-base);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: var(--t-body);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.input:hover, .select:hover, .textarea:hover { background: var(--field-hover); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--field-hover);
}

.input::placeholder, .textarea::placeholder { color: var(--ink-48); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 160px; resize: vertical; line-height: 1.5; }

.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%235c6577' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

.input-search { border-radius: var(--r-pill); padding-left: var(--s-xl); }

/* Checkboxes and radios, in the accent. */
.check {
  display: flex;
  align-items: flex-start;
  gap: var(--s-md);
  cursor: pointer;
}

.check input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--field);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.check input[type="radio"] { border-radius: 50%; }

.check input::after {
  content: "";
  width: 12px;
  height: 12px;
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
  background: var(--on-accent);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%);
}

.check input[type="radio"]::after { clip-path: circle(40%); }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; }

/* An on/off switch. */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-base);
  cursor: pointer;
}

.switch input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: var(--r-pill);
  background: var(--hairline);
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.switch input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform var(--dur-slow) var(--ease);
}

.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 2px solid var(--accent-focus); outline-offset: 2px; }

/* Segmented control: a row of radio pills, used for each sync rule. */
.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--quiet);
  max-width: 100%;
}

.segmented label { position: relative; }

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: block;
  padding: 7px var(--s-base);
  border-radius: var(--r-pill);
  font-size: var(--t-callout);
  text-align: center;
  white-space: nowrap;
  color: var(--ink-80);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.segmented input:checked + span {
  background: var(--canvas);
  color: var(--ink);
  font-weight: var(--w-semibold);
}

.segmented input:focus-visible + span { outline: 2px solid var(--accent-focus); outline-offset: 1px; }

/* -------------------------------------------------------------- cards */

.card {
  border-radius: var(--r-lg);
  padding: var(--s-lg);
}

.card-lg { border-radius: var(--r-xl); padding: var(--s-xxl); }
.card-flush { padding: 0; overflow: hidden; }
.card-head { padding: var(--s-lg) var(--s-lg) var(--s-sm); }
.card-foot { padding: var(--s-md) var(--s-lg) var(--s-lg); }
/* Linked cards stack their children like the plain ones; .stat and .stack-*
   set the gap. */
a.card { display: flex; flex-direction: column; color: inherit; text-decoration: none; }

/* Rows inside a glass card: no surfaces of their own, separated by a
   divider that stops short of the rim. */
.list { list-style: none; margin: 0; padding: 0; }

.list > li,
.list > .item {
  position: relative;
  padding: var(--s-base) var(--s-lg);
}

.list > li + li::before,
.list > .item + .item::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s-lg);
  right: var(--s-lg);
  border-top: 1px solid var(--divider);
}

a.item {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: background var(--dur) var(--ease);
}

a.item:hover { background: var(--quiet); }

/* -------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  padding: var(--s-xxs) var(--s-sm);
  border-radius: var(--r-pill);
  font-size: var(--t-caption);
  font-weight: var(--w-semibold);
  letter-spacing: 0;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--quiet);
  color: var(--ink-80);
}

.badge-filled { background: var(--accent); color: var(--on-accent); }
.badge-accent { color: var(--accent); }
.badge-warning { color: var(--warning); }
.badge-danger { color: var(--danger); }
.badge-muted { color: var(--ink-48); }
.badge-neutral { color: var(--ink-80); }

.count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--t-micro);
  font-weight: var(--w-semibold);
  display: inline-grid;
  place-content: center;
  letter-spacing: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-48);
  flex: none;
}

.dot-ok { background: var(--success); }
.dot-warn { background: var(--warning); }
.dot-bad { background: var(--danger); }

/* ------------------------------------------------------------- avatars */

.avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--quiet);
  display: grid;
  place-content: center;
  font-weight: var(--w-semibold);
  color: var(--ink-48);
  font-size: var(--t-callout);
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; font-size: var(--t-micro); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--t-headline); }
.avatar-square { border-radius: var(--r-md); }

/* ------------------------------------------------------------- stat tile */

.stat { display: flex; flex-direction: column; gap: var(--s-xs); }

.stat-value {
  font-family: var(--font-display);
  font-size: var(--t-title3);
  font-weight: var(--w-bold);
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label { font-size: var(--t-caption); color: var(--ink-48); letter-spacing: 0; }

/* --------------------------------------------------------- empty state */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-base);
  padding: var(--s-huge) var(--s-xl);
}

.empty .icon-xl { color: var(--ink-48); }
.empty h3 { font-size: var(--t-title3); font-weight: var(--w-semibold); }
.empty p { color: var(--ink-48); max-width: 380px; }

/* ----------------------------------------------------------- notices */

.notice {
  display: flex;
  gap: var(--s-md);
  align-items: flex-start;
  padding: var(--s-base) var(--s-lg);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}

.notice .icon { color: var(--accent); margin-top: 2px; }
.notice-warning { background: var(--quiet); }
.notice-warning .icon { color: var(--warning); }

/* --------------------------------------------------------------- toast */

.toast-region {
  position: fixed;
  top: calc(var(--topbar-h) + var(--s-sm));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  width: max-content;
  max-width: calc(100vw - var(--gutter) * 2);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: var(--s-md) var(--s-lg);
  border-radius: var(--r-lg);
  background: var(--tile);
  color: var(--on-tile);
  font-size: var(--t-callout);
  animation: toast-in var(--dur-slow) var(--ease) both;
}

.toast-success { background: var(--accent); color: var(--on-accent); }
.toast-error { background: var(--danger-fill); color: #ffffff; }
.toast.leaving { animation: toast-out var(--dur) var(--ease) both; }

@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px); } }

/* -------------------------------------------------------------- dialog */

.dialog {
  /* .glass sets position: relative; a modal dialog has to stay fixed and
     centred, as the browser places it. */
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  width: min(400px, calc(100vw - var(--gutter) * 2));
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-xl);
  color: var(--ink);
  overflow: hidden;
}

.dialog::backdrop {
  background: var(--scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.dialog[open] { animation: dialog-in var(--dur) var(--ease) both; }

@keyframes dialog-in { from { opacity: 0; transform: scale(0.94); } }

.dialog-body {
  padding: var(--s-xl) var(--s-xl) var(--s-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
}

.dialog-body h2 { font-size: var(--t-headline); font-weight: var(--w-semibold); letter-spacing: -0.012em; }
.dialog-body p { font-size: var(--t-callout); color: var(--ink-80); }

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hairline);
}

.dialog-actions button {
  -webkit-appearance: none;
  appearance: none;
  min-height: 52px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--t-body);
  color: var(--accent);
  cursor: pointer;
}

.dialog-actions button + button { border-left: 1px solid var(--hairline); }
.dialog-actions button:hover { background: var(--quiet); }
.dialog-actions .cancel { font-weight: var(--w-semibold); }
.dialog-actions .destructive { color: var(--danger); }

/* ------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  border-width: 0 0 1px;
  border-radius: 0;
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-base);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; }
.brand-word { height: 17px; width: auto; color: var(--ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  margin-left: auto;
}

.nav-links a:not(.btn) {
  padding: 6px var(--s-md);
  border-radius: var(--r-pill);
  font-size: var(--t-callout);
  color: var(--ink-80);
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: var(--quiet);
  text-decoration: none;
}

.menu-button { display: none; margin-left: auto; color: var(--ink); }

.mobile-menu {
  position: fixed;
  top: calc(var(--topbar-h) + var(--s-sm));
  left: var(--s-sm);
  right: var(--s-sm);
  z-index: 45;
  padding: var(--s-sm);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  gap: var(--s-xxs);
  animation: menu-in var(--dur) var(--ease) both;
}

.mobile-menu a:not(.btn) {
  padding: var(--s-md) var(--s-base);
  border-radius: var(--r-lg);
  color: var(--ink);
  font-size: var(--t-body);
}

.mobile-menu a:not(.btn):hover { background: var(--quiet); text-decoration: none; }
.mobile-menu .btn { margin-top: var(--s-sm); }

@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-button { display: inline-flex; }
}

/* -------------------------------------------------------------- footer */

.footer {
  margin-top: var(--s-huge);
  padding: var(--s-xxxl) 0 var(--s-xxl);
  border-top: 1px solid var(--divider);
  font-size: var(--t-callout);
  color: var(--ink-48);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--s-xl);
}

.footer h4 { font-size: var(--t-caption); color: var(--ink); margin-bottom: var(--s-sm); letter-spacing: 0; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-sm); }
.footer a { color: var(--ink-48); }
.footer a:hover { color: var(--ink); }

.linklike {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-48);
  cursor: pointer;
  text-align: left;
}

.linklike:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.footer-base {
  margin-top: var(--s-xxl);
  padding-top: var(--s-lg);
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-base);
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Theme picker: system / light / dark. */
.theme-picker { display: inline-grid; grid-auto-flow: column; padding: 3px; border-radius: var(--r-pill); background: var(--quiet); }

.theme-picker button {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-48);
  display: grid;
  place-content: center;
  cursor: pointer;
}

.theme-picker button svg { width: 16px; height: 16px; }
.theme-picker button[aria-pressed="true"] { background: var(--canvas); color: var(--ink); }

/* --------------------------------------------------------- cookie banner */

.cookie-banner {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: var(--s-base);
  transform: translateX(-50%);
  width: min(720px, calc(100vw - var(--s-base) * 2));
  padding: var(--s-lg) var(--s-xl);
  border-radius: var(--r-xl);
  display: flex;
  gap: var(--s-lg);
  align-items: center;
  animation: banner-in var(--dur-slow) var(--ease) both;
}

.cookie-banner p { font-size: var(--t-callout); color: var(--ink-80); }
.cookie-banner .row-wrap { flex: none; }

@keyframes banner-in { from { opacity: 0; transform: translate(-50%, 16px); } }

@media (max-width: 640px) {
  .cookie-banner { flex-direction: column; align-items: stretch; padding: var(--s-lg); }
  .cookie-banner .row-wrap .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------- website */

.hero {
  padding: clamp(56px, 10vw, 120px) 0 var(--s-huge);
  text-align: center;
}

.hero .lead { max-width: 680px; margin: var(--s-lg) auto 0; }
.hero-actions { margin-top: var(--s-xxl); justify-content: center; }

.hero-shot {
  margin: var(--s-huge) auto 0;
  max-width: 880px;
  border-radius: var(--r-xl);
  text-align: left;
  /* The one place a drop shadow is allowed: the hero image. */
  box-shadow:
    var(--hero-shadow),
    inset 0 1px 0 var(--glass-rim-top),
    inset 0 0 0 1px var(--glass-rim-hairline);
}

.shot-head {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: var(--s-lg) var(--s-xl) var(--s-md);
}

.shot-head .grow { display: flex; flex-direction: column; gap: 2px; }

.shot-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-md);
  padding: var(--s-md) var(--s-xl);
  position: relative;
}

.shot-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--s-xl);
  right: var(--s-xl);
  border-top: 1px solid var(--divider);
}

.shot-foot { padding: var(--s-md) var(--s-xl) var(--s-lg); }

.section { padding: clamp(56px, 9vw, 112px) 0; }
.section-head { max-width: 720px; margin: 0 auto var(--s-xxxl); text-align: center; }
.section-head .lead { margin-top: var(--s-base); }

.feature { display: flex; flex-direction: column; gap: var(--s-md); padding: var(--s-xl); border-radius: var(--r-xl); }
.feature-icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent); display: grid; place-content: center; }
.feature-icon svg { width: 24px; height: 24px; }
.feature p { color: var(--ink-80); }

.steps { counter-reset: step; display: grid; gap: var(--s-base); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.step { padding: var(--s-xl); border-radius: var(--r-xl); display: flex; flex-direction: column; gap: var(--s-sm); }

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: var(--w-semibold);
  margin-bottom: var(--s-sm);
}

.step p { color: var(--ink-80); }

/* The dark tile, used once per page for emphasis. */
.tile {
  background: var(--tile);
  color: var(--on-tile);
  border-radius: var(--r-xl);
  padding: clamp(32px, 6vw, 72px);
}

.tile .lead, .tile p { color: var(--on-tile-muted); }
.tile a:not(.btn) { color: var(--accent-on-tile); }
.tile .eyebrow { color: var(--accent-on-tile); }
.tile .btn-primary { background: var(--accent-on-tile); color: var(--brand-navy); }

.later-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
  justify-content: center;
}

.later-list li { padding: var(--s-sm) var(--s-base); border-radius: var(--r-pill); font-size: var(--t-callout); }

.cta-band { text-align: center; }
.cta-band .row-wrap { justify-content: center; margin-top: var(--s-xl); }

/* Long-form pages: guide, privacy, terms, cookies. */
.page-head { padding: clamp(48px, 8vw, 96px) 0 var(--s-xxl); }
.page-head .lead { margin-top: var(--s-base); }

.prose { font-size: var(--t-body); line-height: 1.6; color: var(--ink-80); }
.prose > * + * { margin-top: var(--s-base); }
.prose h2 { font-size: var(--t-title3); color: var(--ink); margin-top: var(--s-xxxl); letter-spacing: -0.02em; }
.prose h3 { color: var(--ink); margin-top: var(--s-xl); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: var(--s-xs); }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--t-callout); }
.prose th { text-align: left; color: var(--ink); font-weight: var(--w-semibold); }
.prose th, .prose td { padding: var(--s-md) var(--s-sm); border-bottom: 1px solid var(--divider); vertical-align: top; }
.table-scroll { overflow-x: auto; }

.toc { display: flex; flex-direction: column; gap: var(--s-xs); font-size: var(--t-callout); }
.toc a { color: var(--ink-80); }

.guide-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--s-xxxl); align-items: start; }
.guide-layout .toc { position: sticky; top: calc(var(--topbar-h) + var(--s-xl)); }

@media (max-width: 860px) {
  .guide-layout { grid-template-columns: 1fr; }
  .guide-layout .toc { position: static; }
}

.faq details { padding: var(--s-base) var(--s-lg); position: relative; }
.faq details + details::before { content: ""; position: absolute; top: 0; left: var(--s-lg); right: var(--s-lg); border-top: 1px solid var(--divider); }
.faq summary { cursor: pointer; font-weight: var(--w-semibold); list-style: none; display: flex; justify-content: space-between; gap: var(--s-base); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: var(--w-regular); font-size: var(--t-headline); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: var(--s-sm); color: var(--ink-80); }

/* ----------------------------------------------------------- dashboard */

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-lg);
  padding: var(--s-lg) var(--s-base);
  border-width: 0 1px 0 0;
  border-radius: 0;
  overflow-y: auto;
}

.sidebar .brand { padding: var(--s-xs) var(--s-sm); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-nav a {
  display: flex;
  align-items: center;
  gap: var(--s-md);
  padding: 9px var(--s-md);
  border-radius: var(--r-md);
  color: var(--ink-80);
  font-size: var(--t-callout);
}

.side-nav a:hover { background: var(--quiet); color: var(--ink); text-decoration: none; }
.side-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: var(--w-semibold); }
.side-nav .count { margin-left: auto; }
.side-nav .badge { margin-left: auto; }

/* Group headings in the sidebar: Moderation, Members, Network, Settings. */
.side-group {
  margin-top: var(--s-base);
  padding: 0 var(--s-md) var(--s-xs);
  font-size: var(--t-micro);
  font-weight: var(--w-semibold);
  color: var(--ink-48);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.side-label {
  padding: 0 var(--s-md);
  font-size: var(--t-micro);
  font-weight: var(--w-semibold);
  color: var(--ink-48);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.network-switch .select { font-size: var(--t-callout); padding: 9px 36px 9px var(--s-md); }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s-md); }

.user-chip { display: flex; align-items: center; gap: var(--s-sm); padding: var(--s-sm); border-radius: var(--r-lg); }
.user-chip .grow { font-size: var(--t-callout); line-height: 1.25; }

.main { min-width: 0; padding: var(--s-xxl) clamp(16px, 4vw, 48px) var(--s-huge); }
.main-inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-xl); }

.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-base); flex-wrap: wrap; }
.page-title h1 { font-size: var(--t-title2); }
.page-title p { margin-top: var(--s-xs); color: var(--ink-48); }

.app-topbar { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open {
    display: flex;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    height: auto;
    z-index: 45;
    border-width: 1px 0 0;
    background: var(--glass-menu);
  }
  .app-topbar { display: block; }
  .sidebar .brand { display: none; }
}

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-base); }
.section-title h2 { font-size: var(--t-headline); letter-spacing: -0.012em; }

.server-row { display: flex; align-items: center; gap: var(--s-md); }
.server-row .grow { display: flex; flex-direction: column; gap: 2px; }

.meta { display: flex; flex-wrap: wrap; gap: var(--s-xs) var(--s-md); font-size: var(--t-caption); color: var(--ink-48); letter-spacing: 0; }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: var(--s-sm) var(--s-base); font-size: var(--t-callout); }
.kv dt { color: var(--ink-48); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: var(--s-sm); }
}

.rule-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: var(--s-md);
}

@media (max-width: 560px) {
  .rule-row { grid-template-columns: 1fr; }
  .segmented { width: 100%; }
}

.channel-group { display: flex; flex-direction: column; gap: var(--s-sm); }
.channel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--s-sm) var(--s-base); }

.preview {
  padding: var(--s-base);
  border-radius: var(--r-md);
  background: var(--quiet);
  font-size: var(--t-callout);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-card { border-left: 4px solid var(--brand-teal); padding-left: var(--s-base); }

.pager { display: flex; justify-content: center; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: var(--s-sm); align-items: end; }

/* Login page */
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: var(--s-xl) var(--gutter); }
.login-card { width: min(420px, 100%); padding: var(--s-xxl); border-radius: var(--r-xl); text-align: center; display: flex; flex-direction: column; gap: var(--s-base); align-items: center; }
.login-card .brand-mark { width: 56px; height: 56px; }

/* ------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .glass-hover:hover { transform: none; }
}

/* ------------------------------------------------------------- additions */

.icon-inline { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; }
.steps, ul.stack, ul.stack-sm, .plain-list { list-style: none; margin: 0; padding: 0; }
.tile .row .icon { color: var(--accent-on-tile); }
.center > a { display: inline-flex; align-items: center; gap: 6px; }
.link-button {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.inline-form { display: inline; }
a.item.server-row { display: flex; }
a.item .icon { color: var(--ink-48); }
.title3 { font-size: var(--t-title3); letter-spacing: -0.02em; }
.h3 { font-size: var(--t-headline); letter-spacing: -0.012em; }
.segmented a { color: inherit; text-decoration: none; }
.segmented a[aria-current="page"] span { background: var(--canvas); color: var(--ink); font-weight: var(--w-semibold); }
.segmented a:focus-visible { outline: none; }
.segmented a:focus-visible span { outline: 2px solid var(--accent-focus); outline-offset: 1px; }
.filters .field-error { grid-column: 1 / -1; }

/* ------------------------------------------------------------------ charts */
/* Single-series charts in the brand teal, which passes the dataviz checks
   on both themes' surfaces (the deeper UI accent reads too grey as a mark). */

:root { --chart-mark: #14a89e; --chart-wash: rgba(20, 168, 158, 0.1); }

.chart { width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--divider); stroke-width: 1; }
.chart text { fill: var(--ink-48); font-size: 11px; font-family: var(--font); letter-spacing: 0; }
.chart .label-strong { fill: var(--ink); font-weight: var(--w-semibold); font-size: 12px; }
.chart .label-name { fill: var(--ink-80); font-size: 12px; }
.chart .mark { fill: var(--chart-mark); }
.chart .line { fill: none; stroke: var(--chart-mark); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .wash { fill: var(--chart-wash); }
.chart .dot { fill: var(--chart-mark); stroke: var(--canvas); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover + .mark, .chart .hit:focus + .mark, .chart .hit.active + .mark { opacity: 0.75; }
.chart .crosshair { stroke: var(--ink-48); stroke-width: 1; }
.chart-wrap { position: relative; }

.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  padding: var(--s-sm) var(--s-md);
  border-radius: var(--r-md);
  background: var(--glass-menu);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  font-size: var(--t-caption);
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 10px));
}

.chart-tip strong { display: block; font-size: var(--t-callout); }
.chart-tip .key { display: inline-block; width: 12px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--chart-mark); }

.data-table { width: 100%; border-collapse: collapse; font-size: var(--t-callout); }
.data-table th { text-align: left; font-weight: var(--w-semibold); }
.data-table th, .data-table td { padding: var(--s-sm) var(--s-xs); border-bottom: 1px solid var(--divider); }
.data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
details.table-view summary { cursor: pointer; color: var(--accent); font-size: var(--t-callout); }
details.table-view[open] summary { margin-bottom: var(--s-sm); }

/* Big standalone numbers keep proportional figures; tabular is for columns. */
.stat-value { font-variant-numeric: normal; }
.delta { font-size: var(--t-caption); color: var(--ink-48); letter-spacing: 0; }
.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }

/* ----------------------------------------------------------- welcome editor */

.emoji-bar { display: flex; flex-wrap: wrap; gap: var(--s-xs); }
.emoji-button, .chip-button {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--hairline);
  background: var(--field);
  color: var(--ink);
  border-radius: var(--r-pill);
  font: inherit;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.emoji-button { width: 36px; height: 36px; display: grid; place-content: center; font-size: 18px; padding: 0; }
.emoji-button img { width: 22px; height: 22px; }
.chip-button { padding: 4px var(--s-md); font-size: var(--t-caption); font-family: var(--mono); letter-spacing: 0; }
.emoji-button:hover, .chip-button:hover { background: var(--field-hover); }
.emoji-button:active, .chip-button:active { transform: scale(0.95); }
.color-input { width: 44px; height: 36px; padding: 0; border: 1px solid var(--hairline); border-radius: var(--r-md); background: none; cursor: pointer; }
.welcome-preview {
  padding: var(--s-base);
  border-radius: var(--r-md);
  background: var(--quiet);
  border-left: 4px solid var(--brand-teal);
  font-size: var(--t-callout);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.welcome-preview.plain { border-left-color: transparent; }
.welcome-preview strong:empty { display: none; }
.welcome-preview strong { display: block; margin-bottom: var(--s-xs); }
.inline-emoji { display: inline-block; width: 20px; height: 20px; vertical-align: -4px; }
.select-compact { width: auto; min-width: 160px; padding-top: 8px; padding-bottom: 8px; font-size: var(--t-callout); }

/* Bot branding: the saved profile banner. */
.banner-preview {
  display: block;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 17 / 6;
  object-fit: cover;
  border-radius: var(--r-md);
  background: var(--quiet);
}
