/* OnlyChats website, in Notion's style: warm white and greys, an off-black text, the computer's own font,
   flat grey panels instead of boxes, emoji for icons, soft coloured tags; the apps' own colours only on their
   icons. A light and a dark theme (theme.js switches them; data-theme on <html>). */
:root {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --band: #F7F7F5;        /* Notion's sidebar grey: every other landing section, panels */
  --panel: #F7F6F3;       /* feature tiles, callouts */
  --line: #E9E9E7;
  --line-soft: #F1F1EF;
  --chip: #F1F1EF;
  --input: #E3E2E0;
  --text: #37352F;
  --muted: #787774;
  --muted-strong: #55534E; /* long text (the privacy policy) */
  --subtle: #787774;
  --ink: #37352F;
  --link: #37352F;
  --ring: #2383E2;        /* the focus outline: Notion's blue */
  --ok-bg: #DBEDDB;
  --ok: #1C3829;
  --warn-bg: #FDECC8;
  --warn: #6B4A13;
  --warn-dot: #CB912F;
  --danger: #D44C47;
  --wa: #1A8D4A;
  --ig: #C02D7A;
  --fb: #1F5BD6;
  --tg: #2481CC;
  --sg: #3A76F0;
  --dc: #5865F2;
  --ln: #06A04B;
  --on-ink: #FFFFFF;      /* text on --ink (primary buttons, counts) */
  --ink-hover: #2F2D28;
  --link-hover: #787774;
  --hover: #F1F1EF;
  --hover-strong: #E9E9E7;
  --field: #F7F6F3;       /* the search box, plain status lines */
  --danger-bg: #FDEBEC;
  --danger-line: #F5C6C4;
  --warn-line: #F4D9A6;
  --rail: #F7F7F5;        /* the sidebar, like Notion's */
  --rail-text: #5F5E5B;
  --rail-active: #E9E9E7;
  --mine-bg: #37352F;     /* your message bubbles */
  --mine-text: #FFFFFF;
  --mine-seen: #8FCBF5;   /* "seen" ticks on your bubbles */
  --sk1: #F1F1EF;         /* loading placeholders */
  --sk2: #F7F7F5;
  --brand: #37352F;       /* primary buttons, with --on-brand text */
  --brand-hover: #2F2D28;
  --on-brand: #FFFFFF;
  --brand-text: #37352F;
  --brand-soft: #F1F1EF;
  --tag-green: #DBEDDB; --tag-green-text: #1C3829;
  --tag-yellow: #FDECC8; --tag-yellow-text: #402C1B;
  --tag-gray: #E3E2E0; --tag-gray-text: #32302C;
  --shadow: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow-lg: 0 0 0 1px rgba(15, 15, 15, 0.05), 0 3px 6px rgba(15, 15, 15, 0.08), 0 9px 24px rgba(15, 15, 15, 0.1);
}

/* Dark: the sun/moon button, Settings > Theme > Dark, or System on a computer set to dark. data-theme is in
   the page as the server sends it (web.mjs) or as theme.js sets it first thing, so there's no flash of light. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191919; --card: #202020; --band: #202020; --panel: #252525; --line: #2F2F2F; --line-soft: #262626; --chip: #2C2C2C; --input: #373737;
  --text: #D4D4D4; --muted: #9B9B9B; --muted-strong: #BFBFBF; --subtle: #9B9B9B; --ink: #E3E2E0; --link: #D4D4D4; --ring: #2383E2;
  --ok-bg: #2B593F; --ok: #D4E9D9; --warn-bg: #594A3A; --warn: #F4E1C2; --warn-dot: #CB912F; --danger: #E57373;
  --on-ink: #191919; --ink-hover: #FFFFFF; --link-hover: #9B9B9B; --hover: #2C2C2C; --hover-strong: #373737;
  --field: #252525; --danger-bg: #3A2524; --danger-line: #6E3632; --warn-line: #6B5332;
  --rail: #202020; --rail-text: #9B9B9B; --rail-active: #2C2C2C;
  --mine-bg: #E3E2E0; --mine-text: #191919; --mine-seen: #1E6FB8; --sk1: #2C2C2C; --sk2: #252525;
  --brand: #E3E2E0; --brand-hover: #FFFFFF; --on-brand: #191919; --brand-text: #D4D4D4; --brand-soft: #2C2C2C;
  --tag-green: #2B593F; --tag-green-text: #E3F0E6; --tag-yellow: #6E5833; --tag-yellow-text: #F7EBD6; --tag-gray: #474747; --tag-gray-text: #E3E2E0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 3px 6px rgba(0, 0, 0, 0.3), 0 9px 24px rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;
    --bg: #191919; --card: #202020; --band: #202020; --panel: #252525; --line: #2F2F2F; --line-soft: #262626; --chip: #2C2C2C; --input: #373737;
    --text: #D4D4D4; --muted: #9B9B9B; --muted-strong: #BFBFBF; --subtle: #9B9B9B; --ink: #E3E2E0; --link: #D4D4D4; --ring: #2383E2;
    --ok-bg: #2B593F; --ok: #D4E9D9; --warn-bg: #594A3A; --warn: #F4E1C2; --warn-dot: #CB912F; --danger: #E57373;
    --on-ink: #191919; --ink-hover: #FFFFFF; --link-hover: #9B9B9B; --hover: #2C2C2C; --hover-strong: #373737;
    --field: #252525; --danger-bg: #3A2524; --danger-line: #6E3632; --warn-line: #6B5332;
    --rail: #202020; --rail-text: #9B9B9B; --rail-active: #2C2C2C;
    --mine-bg: #E3E2E0; --mine-text: #191919; --mine-seen: #1E6FB8; --sk1: #2C2C2C; --sk2: #252525;
    --brand: #E3E2E0; --brand-hover: #FFFFFF; --on-brand: #191919; --brand-text: #D4D4D4; --brand-soft: #2C2C2C;
    --tag-green: #2B593F; --tag-green-text: #E3F0E6; --tag-yellow: #6E5833; --tag-yellow-text: #F7EBD6; --tag-gray: #474747; --tag-gray-text: #E3E2E0;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-lg: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 3px 6px rgba(0, 0, 0, 0.3), 0 9px 24px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
::selection { background: rgba(35, 131, 226, 0.28); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 32px; }
.top.wide { max-width: 1160px; width: 100%; margin: 0 auto; padding: 20px 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--text); }
/* The OnlyChats mark (scripts/draw-icons.py): the speech bubble alone, in the text colour, so it's dark on the
   light theme and light on the dark one. Wordmark: "Only" light, "Chats" bold. */
.brand-mark { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.brand-mark svg { width: 100%; height: 100%; }
.wordmark { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; }
.wordmark b { font-weight: 700; }
.progress { display: flex; gap: 6px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.progress span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.progress .done { color: var(--text); }
.progress .current { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.user-menu { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.top-right { display: flex; align-items: center; gap: 10px; }
/* The theme button (theme.js), like ui.shadcn.com's: a ghost icon button with a half-shaded circle that
   switches between light and dark (the D key does too). */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); cursor: pointer; transition: background 0.15s; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle svg { width: 18px; height: 18px; }

.row.between { justify-content: space-between; }

/* ---------- layout ---------- */
.page { flex-grow: 1; display: flex; justify-content: center; padding: 32px 20px 64px; }
.page.center { align-items: center; }
.col { width: 100%; display: flex; flex-direction: column; gap: 24px; }
.w-440 { max-width: 440px; } .w-560 { max-width: 560px; } .w-640 { max-width: 640px; } .w-720 { max-width: 720px; } .w-880 { max-width: 880px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 28px; box-shadow: var(--shadow); }
.card.tight { padding: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 32px; }
.split > .main { flex: 999 1 340px; min-width: 0; }
.split > .side { flex: 1 1 290px; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; }
.lead { font-size: 15px; color: var(--muted); }
.small { font-size: 14px; color: var(--subtle); }
.tiny { font-size: 13px; color: var(--subtle); }
.center-text { text-align: center; }
.divider { padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background 0.15s, border-color 0.15s;
}
.btn:hover { color: var(--text); background: var(--hover); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--on-brand); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { color: var(--danger); background: var(--danger-bg); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--link); font-size: 15px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.link-btn:disabled { color: var(--subtle); text-decoration: none; cursor: default; }

label { font-size: 14px; font-weight: 500; }
.input {
  width: 100%; min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: 16px; color: var(--text); background: var(--field);
}
.input::placeholder { color: var(--muted); }
.input.grow { flex: 1 1 240px; width: auto; min-width: 0; }
.input.code { min-height: 56px; font-size: 28px; font-weight: 600; letter-spacing: 0.45em; text-align: center; }

/* ---------- status lines ---------- */
.status { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 6px; background: var(--field); font-size: 15px; color: var(--muted); }
.status.ok { background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.status.error { background: var(--warn-bg); color: var(--warn); }
.error-text { font-size: 14px; color: var(--danger); }
.spinner { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--input); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 999px; background: var(--wa); }
.dot.warn { background: var(--warn-dot); }
.dot.off { background: var(--input); }

/* ---------- app icons and chips ---------- */
.app-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #FFFFFF; }
.app-icon.lg { width: 48px; height: 48px; }
.app-icon.sm { width: 20px; height: 20px; border-radius: 6px; }
.bg-wa { background: var(--wa); } .bg-ig { background: var(--ig); } .bg-fb { background: var(--fb); }
.bg-tg { background: var(--tg); } .bg-sg { background: var(--sg); } .bg-dc { background: var(--dc); } .bg-ln { background: var(--ln); }
.app-chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.app-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); color: var(--subtle); text-decoration: none; }
.app-chip.current { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); color: var(--text); }
.app-chip.done { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.chip-dot { width: 10px; height: 10px; border-radius: 999px; }

/* ---------- pick apps ---------- */
.pick {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 84px; padding: 16px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-align: left; cursor: pointer; box-shadow: var(--shadow);
}
.pick[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pick .name { font-size: 16px; font-weight: 600; display: block; }
.pick .how { font-size: 14px; color: var(--subtle); display: block; }
.pick .grow { flex-grow: 1; }
.check { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--input); display: flex; align-items: center; justify-content: center; }
.check svg { visibility: hidden; }
.pick[aria-pressed="true"] .check { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pick[aria-pressed="true"] .check svg { visibility: visible; }

/* ---------- linking ---------- */
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; font-size: 16px; }
.steps li { display: flex; gap: 12px; }
.num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; background: var(--chip); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.num.done { background: var(--ok-bg); color: var(--ok); }
.qr-box { width: 288px; height: 288px; padding: 14px; background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.qr-box svg { width: 100%; height: 100%; }
.qr-box.linked { background: var(--ok-bg); border-color: var(--ok-bg); flex-direction: column; gap: 12px; }
.pin-code { font-size: 44px; font-weight: 700; letter-spacing: 0.12em; color: #191919; font-variant-numeric: tabular-nums; }
.big-check { width: 72px; height: 72px; border-radius: 999px; background: var(--wa); display: flex; align-items: center; justify-content: center; }

.stack > .link-btn { align-self: flex-start; }

/* ---------- dashboard ---------- */
.apps-list { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.app-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.app-row:last-child { border-bottom: 0; }
.app-row.needs-you { background: var(--warn-bg); }
.app-row .text { flex: 999 1 240px; display: flex; flex-direction: column; gap: 3px; }
.app-row .name { font-size: 17px; font-weight: 600; }
.app-row .state { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--muted); }
.app-row .state .dot { margin-top: 7px; }
.app-row.needs-you .state { color: var(--warn); }
.danger-card { border-color: var(--danger-line); }
.section-title { margin-top: 8px; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.feature-head { display: flex; align-items: center; gap: 16px; }
.feature-head .text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.feature-head .name { font-size: 17px; font-weight: 600; }
.feature-head .state { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.feature-head .state .dot { margin-top: 7px; }
.feature-head .btn { flex: 0 0 auto; white-space: nowrap; }
.bg-gmail { background: #C5221F; }
.settings { padding-top: 6px; padding-bottom: 6px; }
.setting { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.setting:last-of-type { border-bottom: 0; }
.setting .text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setting .name { font-size: 15.5px; font-weight: 600; }
.settings .tiny { padding-bottom: 8px; }
.group-title { margin: 14px 0 2px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--subtle); }
.group-title:first-child { margin-top: 6px; }
.setting.sub { padding: 8px 0 8px 14px; }
.setting.sub .name { font-size: 14.5px; font-weight: 500; }
.setting-more { border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.setting-more .setting.sub { border-bottom: 0; }
.quiet-times { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 0 8px 14px; font-size: 14px; color: var(--muted); }
.quiet-times label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.input.time { width: auto; min-height: 38px; padding: 0 10px; font-size: 15px; }
.test-row { padding: 6px 0 4px 14px; }
.mute-hint { padding: 4px 0 8px; }
.setting.hidden-chats { border-bottom: 0; padding-bottom: 4px; }
/* Detox: a switch per site, and its options when on. */
.detox-intro { margin: 4px 0 6px; }
.detox-note { margin: 0 0 6px; color: var(--warn); }
.detox-site { border-bottom: 1px solid var(--line-soft); }
.detox-site:last-child { border-bottom: 0; }
.detox-site .setting { border-bottom: 0; }
.app-icon.sm { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #FFFFFF; font-size: 16px; font-weight: 700; }
.app-icon.sm svg { width: 18px; height: 18px; }
.bg-yt { background: #FF0033; } .bg-tt { background: #111111; } .bg-x { background: #111111; }
:root[data-theme="dark"] .bg-tt, :root[data-theme="dark"] .bg-x { background: #2C2C2C; }
.bg-site { background: #52525B; }
.detox-site .remove { color: var(--subtle); font-size: 20px; }
.detox-options .btn { min-height: 38px; }
.detox-access { color: var(--warn); }
.detox-add { display: flex; gap: 8px; padding: 12px 0 4px; border-top: 1px solid var(--line-soft); }
.detox-add-error { margin: 4px 0 8px; }
/* Detox's lock: its row, and the code from the email to unlock it. */
.detox-lock { border-bottom: 1px solid var(--line-soft); }
.detox-lock .setting { border-bottom: 0; }
.detox-lock.on .name { color: var(--warn); }
.detox-unlock { display: flex; gap: 8px; padding: 0 0 12px; }
.detox-relock { padding: 0 0 12px; }
.detox-relock .input { width: auto; max-width: 100%; min-height: 38px; padding: 6px 10px; font-size: 14.5px; }
.detox-unlock .input { width: 150px; letter-spacing: 0.15em; }
.detox-lock .error-text { margin: 0 0 10px; }
.detox-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 14px 46px; }
.detox-options .input { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14.5px; }
.detox-mode { min-width: 210px; }
.detox-time { display: inline-flex; align-items: center; gap: 6px; }
.detox-used { color: var(--muted); }
@media (max-width: 420px) { .detox-options { padding-left: 0; } .detox-mode { min-width: 0; flex: 1 1 100%; } }
.hidden-list { display: flex; flex-direction: column; gap: 6px; padding: 0 0 12px; border-bottom: 1px solid var(--line-soft); }
.hidden-row { display: flex; align-items: center; gap: 10px; }
.hidden-name { flex: 1 1 auto; min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.choices-row { flex: 0 0 auto; display: inline-flex; padding: 3px; border-radius: 8px; background: var(--field); }
.choice { min-height: 30px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.choice[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); }
/* A row with choices wraps under its text when narrow. */
@media (max-width: 420px) { .setting:has(.choices-row) { flex-wrap: wrap; } }
/* An on/off switch (role="switch", aria-checked). */
.switch { position: relative; flex: 0 0 auto; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 999px; background: var(--input); cursor: pointer; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform 0.2s; }
.switch[aria-checked="true"] { background: #2383E2; }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.switch:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .switch, .switch::after { transition: none; } }

/* ---------- the landing page (index.html) ---------- */
.section { max-width: 1160px; margin: 0 auto; padding: 88px 24px; display: flex; flex-direction: column; gap: 44px; }
.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero-zone { position: relative; }
/* Light and dark screenshots (<picture>): the <img> inside lays out as if the <picture> weren't there. */
picture { display: contents; }
.accent { color: var(--muted); }
.hero { max-width: 1160px; margin: 0 auto; padding: 56px 24px 88px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; font-weight: 700; letter-spacing: -0.03em; }
.hero .lead { font-size: 18px; max-width: 620px; }
.hero .row { justify-content: center; }
/* A small note above a heading, with a Notion tag in it. */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 6px; background: var(--panel); font-size: 14px; font-weight: 500; color: var(--muted); }
.eyebrow b { padding: 0 6px; border-radius: 4px; background: var(--tag-green); color: var(--tag-green-text); font-size: 13px; font-weight: 500; }
.stack-lg > .eyebrow { align-self: flex-start; }
.app-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.app-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 6px; background: var(--panel); font-size: 14px; font-weight: 500; }
.app-chips .app-icon { width: 24px; height: 24px; border-radius: 5px; }
.app-chips .app-icon svg { width: 13px; height: 13px; }
.shot { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.hero .shot { max-width: 1100px; margin-top: 20px; padding: 6px; background: var(--band); border-radius: 16px; }
.hero picture { display: block; width: 100%; max-width: 1100px; }
/* The hero's video (hero.js): its cover is the chats screenshot until it plays, and stays it for anyone who asked
   for less motion. */
.hero-media { position: relative; width: 100%; max-width: 1100px; }
.hero-media .hero-video { aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.sound-toggle { position: absolute; right: 22px; bottom: 22px; width: 44px; height: 44px; border: 0; border-radius: 999px; display: grid; place-items: center; background: rgba(25, 25, 25, 0.72); color: #FFFFFF; cursor: pointer; }
.sound-toggle[hidden] { display: none; }
.sound-toggle:hover { background: rgba(25, 25, 25, 0.88); }
.sound-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.sound-toggle .icon-sound, .sound-toggle[aria-pressed="true"] .icon-muted { display: none; }
.sound-toggle[aria-pressed="true"] .icon-sound { display: block; }
.h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 660px; }
.section-head p, .section-lead { font-size: 17px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid.narrow { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 12px; background: var(--panel); }
.tile.soft { background: var(--panel); }
.tile h3 { font-size: 16px; font-weight: 600; }
.tile p { font-size: 15px; color: var(--muted); }
/* Notion's page icons: an emoji, big. */
.tile-icon { font-size: 28px; line-height: 1; margin-bottom: 4px; color: var(--text); }
.tile-icon svg { width: 22px; height: 22px; }
.step-num { width: 28px; height: 28px; border-radius: 6px; background: var(--ink); color: var(--on-ink); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.steps-grid { margin: 0; padding: 0; list-style: none; }
.split-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.split-hero > * { flex: 1 1 420px; min-width: 0; }
.ticks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.ticks li { display: flex; gap: 10px; }
.ticks svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 3px; color: var(--text); }
.ticks span { color: var(--muted); }
.ticks strong { color: var(--text); font-weight: 600; }
/* The side panel, at the right of a browser window. */
.browser { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-lg); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--band); }
.browser-bar > span { width: 10px; height: 10px; border-radius: 999px; background: var(--input); }
.browser-bar .url { flex: 1 1 auto; width: auto; height: 26px; margin-left: 10px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); font-size: 12px; line-height: 24px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.browser-body { display: flex; height: 470px; }
.browser-page { flex: 1 1 auto; display: flex; flex-direction: column; gap: 14px; padding: 32px 28px; }
.browser-page i { display: block; height: 10px; border-radius: 5px; background: var(--chip); }
.browser-page i.title { height: 20px; width: 60%; background: var(--line); }
.browser-page i.short { width: 70%; }
.browser-body img { flex: 0 0 auto; width: 248px; height: 470px; object-fit: cover; object-position: top; border-left: 1px solid var(--line); }
/* Detox: its settings, and the pause in front. */
.detox-shots { position: relative; padding: 0 0 48px 40px; }
.detox-shots .shot { max-width: 520px; margin-left: auto; }
.detox-shots .pause { position: absolute; left: 0; bottom: 0; width: 44%; max-width: 250px; }
/* Send to Gmail: the apps flow into OnlyChats, then into an inbox with one thread per person. */
.inbox { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.flow { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.flow-apps { display: flex; }
.flow-apps .app-icon { width: 32px; height: 32px; border-radius: 999px; border: 2px solid var(--bg); }
.flow-apps .app-icon + .app-icon { margin-left: -8px; }
.flow > svg { width: 30px; height: 30px; color: var(--text); }
.flow-mail { width: 32px; height: 32px; border-radius: 6px; background: var(--panel); border: 0; color: var(--text); display: flex; align-items: center; justify-content: center; }
.inbox-card { width: 100%; max-width: 560px; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.inbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 16px; }
.mail-row { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.mail-row .app-icon { width: 32px; height: 32px; border-radius: 8px; }
.mail-row .grow { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mail-row .who { display: flex; justify-content: space-between; gap: 8px; }
.mail-row .who .tiny { flex: 0 0 auto; white-space: nowrap; }
.mail-row strong { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.unread strong, .mail-row.unread .tiny { font-weight: 700; color: var(--text); }
.mail-row .snippet { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-foot { display: flex; justify-content: center; padding: 14px; }
.reply-pill { padding: 2px 8px; border-radius: 4px; background: var(--tag-green); color: var(--tag-green-text); font-size: 13px; font-weight: 500; }
/* Products: what's out now and what's coming, each on its device (real screenshots in drawn frames). */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; }
.product { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stage {
  position: relative; height: 300px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 24px; flex: 1 1 auto; }
.product-body h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.product-body p { font-size: 15px; color: var(--muted); flex: 1 1 auto; }
.product-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* Notion's tags: soft colours, small corners. */
.status-pill { padding: 0 6px; border-radius: 4px; font-size: 13px; font-weight: 500; line-height: 20px; white-space: nowrap; }
.status-pill.now { background: var(--tag-green); color: var(--tag-green-text); }
.status-pill.soon { background: var(--tag-yellow); color: var(--tag-yellow-text); }
.status-pill.later { background: var(--tag-gray); color: var(--tag-gray-text); }
.product .platforms { font-size: 13px; font-weight: 500; color: var(--muted); }
.product-link { align-self: flex-start; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.product-link::after { content: " →"; }
.product-link:hover { color: var(--muted); }
/* The frames: browser bars and windows in the page's colours (the screenshots match the theme); laptops, phones
   and monitors in their own dark hardware. */
.stage img { display: block; }
.stage .bar { display: flex; align-items: center; gap: 5px; padding: 6px 10px; background: var(--band); border-bottom: 1px solid var(--line); }
.stage .bar > span:not(.url):not(.ext-icon) { width: 8px; height: 8px; border-radius: 999px; background: var(--input); }
.stage .url { display: inline-flex; align-items: center; gap: 5px; flex: 1 1 auto; margin-left: 8px; height: 20px; padding: 0 10px; border-radius: 5px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; }
.device-browser { width: 88%; margin-bottom: -40px; border-radius: 10px 10px 0 0; overflow: hidden; border: 1px solid var(--line); background: var(--bg); box-shadow: var(--shadow-lg); }
.device-browser .ext-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 26px; height: 22px; margin-left: 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.device-browser .ext-icon b { position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: #EF4444; color: #FFFFFF; font-size: 9.5px; line-height: 15px; text-align: center; }
.device-browser .body { display: flex; height: 280px; }
.device-browser .page { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; }
.device-browser .page i { display: block; height: 8px; border-radius: 4px; background: var(--chip); }
.device-browser .page i.title { width: 55%; height: 14px; background: var(--line); }
.device-browser .page i.short { width: 70%; }
.device-browser .body img { width: 148px; height: 280px; object-fit: cover; object-position: top; border-left: 1px solid var(--line); }
.device-laptop { width: min(86%, 350px); margin-bottom: 22px; display: flex; flex-direction: column; align-items: center; }
.device-laptop .screen { width: 100%; padding: 7px 7px 0; border-radius: 12px 12px 0 0; background: #191919; box-shadow: var(--shadow-lg); }
.device-laptop .screen .bar { border-radius: 5px 5px 0 0; }
.device-laptop .screen img { width: 100%; height: auto; }
.device-laptop .base { width: 112%; height: 11px; border-radius: 0 0 12px 12px; background: linear-gradient(#D4D4D8, #A1A1AA); box-shadow: var(--shadow-lg); }
.device-phone { position: relative; width: 168px; height: 330px; margin-bottom: -70px; padding: 7px; border-radius: 34px; background: #191919; box-shadow: 0 0 0 1px #3F3F46, var(--shadow-lg); overflow: hidden; }
.device-phone .island { position: absolute; top: 13px; left: 50%; width: 52px; height: 15px; margin-left: -26px; border-radius: 999px; background: #000000; z-index: 1; }
.device-phone .status { display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 16px 0 20px; border-radius: 27px 27px 0 0; background: var(--card); color: var(--text); font-size: 10px; font-weight: 600; }
.device-phone .signal { display: flex; align-items: flex-end; gap: 1.5px; height: 8px; }
.device-phone .signal i { width: 2.5px; background: var(--text); border-radius: 1px; }
.device-phone .signal i:nth-child(1) { height: 3px; } .device-phone .signal i:nth-child(2) { height: 5px; }
.device-phone .signal i:nth-child(3) { height: 6.5px; } .device-phone .signal i:nth-child(4) { height: 8px; }
.device-phone img { width: 100%; height: auto; }
.float-note { position: absolute; top: 44px; left: calc(50% + 36px); max-width: 180px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 12px; color: var(--muted); }
.float-note > span:first-child { font-size: 18px; }
.float-note strong { display: block; color: var(--text); font-size: 13px; }
.device-monitor { width: min(80%, 330px); margin-bottom: 18px; display: flex; flex-direction: column; align-items: center; }
.device-monitor .screen { width: 100%; padding: 8px; border-radius: 10px; background: #191919; box-shadow: var(--shadow-lg); }
.device-monitor .window { border-radius: 6px; overflow: hidden; background: var(--card); }
.device-monitor .titlebar { position: relative; display: flex; align-items: center; justify-content: center; height: 20px; background: var(--band); border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 600; color: var(--muted); }
.device-monitor .titlebar .name { display: inline-flex; align-items: center; gap: 5px; }
.device-monitor .titlebar .name svg { width: 11px; height: 11px; }
.device-monitor .lights { position: absolute; left: 8px; display: flex; gap: 4px; }
.device-monitor .lights i { width: 7px; height: 7px; border-radius: 999px; background: #FF5F57; }
.device-monitor .lights i:nth-child(2) { background: #FEBC2E; } .device-monitor .lights i:nth-child(3) { background: #28C840; }
.device-monitor .window img { width: 100%; height: auto; }
.device-monitor .neck { width: 16%; height: 22px; background: linear-gradient(#D4D4D8, #A1A1AA); clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.device-monitor .foot { width: 34%; height: 6px; border-radius: 4px 4px 2px 2px; background: #A1A1AA; box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .stage { height: 240px; }
  .device-browser .page { display: none; }
  .device-browser { width: auto; }
  .device-browser .body img { width: 170px; }
  .float-note { display: none; }
  .product-body { padding: 20px; }
}
/* Notion's toggle lists: a triangle on the left that turns, a grey highlight on hover, no lines. */
.faq summary svg { flex: 0 0 auto; color: var(--muted); transform: rotate(-90deg); transition: transform 0.15s; }
.faq { display: flex; flex-direction: column; gap: 2px; }
.faq details { border: 0; }
.faq summary { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px; border-radius: 6px; font-size: 16px; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--hover); }
.faq details[open] summary svg { transform: rotate(0deg); }
.faq p { margin: 2px 0 12px 34px; font-size: 15px; color: var(--muted-strong); }
.faq-section { max-width: 800px; gap: 28px; }
.cta { align-items: center; text-align: center; gap: 20px; }
/* The closing call: a grey Notion panel. */
.cta-card { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px 24px; border-radius: 16px; background: var(--panel); }
.cta-card .h2 { max-width: 720px; }
.cta-mark { width: 72px; height: 72px; color: var(--text); }
.cta-mark svg { width: 100%; height: 100%; }
.footer { border-top: 1px solid var(--line); }
.footer > div { max-width: 1160px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--subtle); }
.footer .brand { font-size: 15px; }
.footer .brand svg { width: 28px; height: 28px; }
.footer .row a { color: var(--subtle); text-decoration: none; }
.footer .row a:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.nav .quiet { color: var(--muted); text-decoration: none; }
.nav .quiet:hover { color: var(--text); }
.thread { display: flex; flex-direction: column; padding: 8px 24px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.thread > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.thread > div:last-child { border-bottom: 0; }
.thread .head { font-size: 18px; font-weight: 600; border-bottom-color: var(--line); }
.thread strong { font-size: 14px; font-weight: 600; }
.thread .via { font-weight: 400; color: var(--subtle); }
.quote { font-size: 14px; color: var(--subtle); padding-left: 10px; border-left: 3px solid var(--line); }
.file { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #FFFFFF; font-size: 14px; }
.thread > div > span:not(.file):not(.quote) { font-size: 15px; }

@media (max-width: 860px) {
  .browser-page { display: none; }
  .browser-body { justify-content: center; }
  .browser-body img { border-left: 0; }
}
@media (max-width: 640px) {
  .top { padding: 16px 20px; }
  .top.wide { padding: 16px; }
  .card { padding: 22px; }
  .nav { gap: 12px; }
  .nav .quiet { display: none; }
  .section { padding: 64px 16px; }
  .hero { padding: 32px 16px 64px; }
  .hero .lead { font-size: 18px; }
  .hero .shot { border-radius: 10px; }
  .detox-shots { padding: 0; display: flex; flex-direction: column; gap: 16px; }
  .detox-shots .pause { position: static; width: 70%; align-self: center; }
}
@media (max-width: 480px) { .nav .nav-start { display: none; } }

/* ---------- privacy, terms and support (privacy.html, terms.html, support.html) ---------- */
.doc { width: 100%; max-width: 760px; margin: 0 auto; padding: 32px 24px 88px; display: flex; flex-direction: column; gap: 14px; }
.doc h1 { font-size: clamp(32px, 4.4vw, 42px); line-height: 1.08; font-weight: 700; letter-spacing: -0.04em; }
.doc .updated { font-size: 14px; color: var(--subtle); }
.doc h2 { margin-top: 26px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; scroll-margin-top: 16px; }
.doc h3 { margin-top: 10px; font-size: 17px; font-weight: 600; }
.doc p, .doc li { font-size: 15.5px; line-height: 1.7; color: var(--muted-strong); }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.page-icon { font-size: 64px; line-height: 1; margin-bottom: 4px; }
.doc .summary { margin: 8px 0 0; max-height: none; overflow: visible; font-size: inherit; padding: 16px 20px 16px 52px; border-radius: 6px; border: 0; background: var(--panel); display: flex; flex-direction: column; gap: 10px; position: relative; }
/* A Notion callout: an emoji at its top left. */
.doc .summary::before { content: "💡"; position: absolute; left: 18px; top: 14px; font-size: 20px; }
.doc .summary-title { margin: 0; font-size: 17px; }
.doc .contact-card { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; padding: 16px 20px; border-radius: 6px;  background: var(--panel); border: 0; }
.doc .contact-card .grow { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.doc .contact-card strong { font-size: 17px; overflow-wrap: anywhere; }
.doc details { border: 0; }
.doc summary { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 2px 6px; border-radius: 6px; font-size: 15.5px; font-weight: 500; color: var(--text); cursor: pointer; list-style: none; }
.doc summary::-webkit-details-marker { display: none; }
.doc summary:hover { background: var(--hover); }
.doc summary::before { content: ""; flex: 0 0 auto; width: 0; height: 0; margin: 0 4px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--muted); transition: transform 0.15s; }
.doc details[open] summary::before { transform: rotate(90deg); }
.doc details p { margin: 2px 0 12px 30px; }
.doc > .small { margin-top: 24px; }
@media (max-width: 640px) { .doc { padding: 20px 16px 64px; } .doc .contact-card { padding: 18px; } }

/* ---------- the app: sidebar, chats (chats.html, dashboard.html) ---------- */
body.app { height: 100vh; min-height: 0; overflow: hidden; }
.shell { display: flex; height: 100vh; min-height: 0; }
.shell-main { flex: 1 1 auto; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; }
.rail { flex: 0 0 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0; background: var(--rail); border-right: 1px solid var(--line); }
.rail-mark { width: 34px; height: 34px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.rail-mark svg { width: 100%; height: 100%; }
.rail-item { position: relative; width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; color: var(--rail-text); display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.rail-item:hover { background: var(--rail-active); color: var(--text); }
.rail-item[aria-current="page"] { background: var(--rail-active); color: var(--text); }
.rail-net { width: 28px; height: 28px; border-radius: 8px; color: #FFFFFF; display: flex; align-items: center; justify-content: center; opacity: 0.8; }
.rail-item:hover .rail-net, .rail-item[aria-current="page"] .rail-net { opacity: 1; }
.rail-badge { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; border: 2px solid var(--rail); background: #E5484D; color: #FFFFFF; font-size: 10px; font-weight: 700; line-height: 1; display: flex; align-items: center; justify-content: center; }
.rail-spacer { flex: 1 1 auto; }
/* An app that isn't connected: its button greyed out. */
.rail-item.off .rail-net { filter: grayscale(1); opacity: 0.35; }
.rail-item.off:hover .rail-net, .rail-item.off[aria-current="page"] .rail-net { opacity: 0.6; }
.link-app { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px 24px; text-align: center; }
.link-app h2 { font-size: 19px; font-weight: 700; }
.link-app p { max-width: 280px; }
.link-icon { width: 56px; height: 56px; border-radius: 16px; color: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.link-icon svg { width: 28px; height: 28px; }

.chats { position: relative; flex: 1 1 auto; display: flex; min-width: 0; min-height: 0; }
.list-pane { flex: 0 0 340px; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); border-right: 1px solid var(--line); }
.pane-head { padding: 14px 16px 8px; }
.pane-head h1 { font-size: 20px; font-weight: 700; }
.search { padding: 0 12px 8px; }
.search .input { min-height: 38px; padding: 0 12px; border-color: transparent; border-radius: 10px; background: var(--field); font-size: 14px; }
.chat-list { flex: 1 1 auto; overflow-y: auto; }
.list-empty { padding: 28px 20px; text-align: center; }
.chat-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.chat-item:hover { background: var(--hover); }
.chat-item[aria-current="true"] { background: var(--hover-strong); }
.chat-item .text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item .line { display: flex; align-items: center; gap: 8px; }
.chat-item .name { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .when { flex: 0 0 auto; font-size: 12px; color: var(--subtle); }
.chat-item .preview { flex: 1 1 auto; min-width: 0; font-size: 13.5px; color: var(--subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item.unread .name { font-weight: 700; }
.chat-item.unread .preview { color: var(--text); }
.chat-item.unread .when { color: var(--link); font-weight: 600; }
.count { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--link); color: var(--on-ink); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.avatar { position: relative; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 999px; background: var(--chip); color: var(--muted); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 999px; object-fit: cover; background: var(--chip); }
.avatar .net-dot { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--card); }
.avatar.sm .net-dot { width: 12px; height: 12px; }

.convo-pane { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.convo-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.convo-head .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.convo-head strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-head .small { font-size: 12.5px; }
.icon-btn { flex: 0 0 auto; width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: var(--hover-strong); }
.convo-head .mute { margin-left: auto; color: var(--subtle); }
.convo-head #more { color: var(--subtle); }
/* The picture and name at the top of a chat: opens its profile. */
.who-btn { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; margin: -4px 0 -4px -6px; padding: 4px 8px 4px 6px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.who-btn:hover, .who-btn[aria-expanded="true"] { background: var(--hover); }
.who-btn:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }

/* A chat's profile: a column beside the chat on a wide screen, over the chat when there's less room, and
   the whole window in the popup. */
.profile-pane { flex: 0 0 320px; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); border-left: 1px solid var(--line); }
.profile-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; min-height: 61px; border-bottom: 1px solid var(--line); }
.profile-head h2 { margin: 0; font-size: 16px; }
.profile-body { flex: 1 1 auto; overflow-y: auto; padding: 0 18px 24px; }
.profile-who { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 0 18px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.avatar.xl { width: 104px; height: 104px; font-size: 34px; margin-bottom: 6px; }
.profile-name { margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.profile-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; margin: 0; color: var(--muted); font-size: 14px; }
.profile-line .app-tag { margin-left: 0; }
.profile-handle { user-select: all; }
.profile-section { padding: 16px 0 10px; border-bottom: 1px solid var(--line-soft); }
.profile-section h3 { margin: 0 0 10px; color: var(--subtle); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.profile-section .setting { padding: 8px 0; border-bottom: 0; }
.profile-section .setting .name { font-size: 15px; font-weight: 500; }
.shared-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.shared-tile { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--chip); color: inherit; text-decoration: none; }
.shared-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shared-tile:hover img { opacity: 0.85; }
.shared-tile:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.shared-icon { font-size: 22px; }
.shared-play { position: absolute; left: 6px; bottom: 4px; color: #FFFFFF; font-size: 13px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.shared-more { margin-top: 10px; }
.member-list { display: flex; flex-direction: column; gap: 2px; }
.member { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.member-name { min-width: 0; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-hide { width: 100%; margin-top: 18px; }
@media (max-width: 1099px) {
  .profile-pane { position: absolute; z-index: 5; top: 0; right: 0; bottom: 0; width: 340px; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18); }
}
@media (max-width: 760px) {
  .profile-pane { left: 0; width: auto; border-left: 0; box-shadow: none; }
}
.pane-head { display: flex; align-items: center; gap: 4px; }
.list-section { margin: 0; padding: 14px 16px 6px; color: var(--subtle); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.list-note { margin: 0; padding: 8px 16px 12px; }
.app-tag { flex: 0 0 auto; margin-left: auto; font-size: 11.5px; font-weight: 600; }
.app-tag.tag-wa { color: #1FA855; } .app-tag.tag-ig { color: #D6246E; } .app-tag.tag-fb { color: #0866FF; }
:root[data-theme="dark"] .app-tag.tag-fb { color: #5B9BFF; } :root[data-theme="dark"] .app-tag.tag-ig { color: #F06A9E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .app-tag.tag-fb { color: #5B9BFF; } :root:not([data-theme="light"]):not([data-theme="dark"]) .app-tag.tag-ig { color: #F06A9E; } }
.chat-item.person:disabled { cursor: default; opacity: 0.7; }
.relink { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 8px; }
.relink-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; line-height: 1.35; }
.relink-text { flex: 1 1 auto; min-width: 0; }
.relink-text strong { display: block; }
.relink-x { flex: 0 0 auto; width: 28px; height: 28px; margin-right: -4px; color: var(--warn); }
.relink-go { flex: 0 0 auto; min-height: 34px; padding: 0 12px; font-size: 13.5px; color: var(--text); background: var(--card); }
.archived-row { display: block; width: 100%; padding: 12px 16px; border: 0; border-top: 1px solid var(--line-soft); background: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.archived-row:hover { background: var(--hover); }
.chat-menu { position: fixed; z-index: 10; min-width: 200px; padding: 4px; border: 0; border-radius: 8px; background: var(--card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.menu-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--hover-strong); outline: none; }
.menu-item.danger { color: var(--danger); }
.toast { position: fixed; z-index: 11; left: 50%; bottom: 76px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 10px 14px; border-radius: 12px; background: var(--rail); color: #FFFFFF; font-size: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.toast .link-btn { color: #8FCBF5; font-size: 14px; }
.mute .bell-off, .mute[aria-pressed="true"] .bell-on { display: none; }
.mute[aria-pressed="true"] .bell-off { display: block; }
.muted-mark { flex: 0 0 auto; font-size: 12px; opacity: 0.7; }
.count.muted { background: var(--input); color: var(--text); }
.media-tap { display: block; padding: 10px 12px; border: 1px dashed var(--input); border-radius: 10px; background: none; color: inherit; font: inherit; font-size: 14px; cursor: pointer; }
.messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 3px; }
.convo-note { align-self: center; margin: 24px 0; }
.convo-error { padding: 0 14px 8px; }
.convo-notice { margin: 0 12px 8px; padding: 9px 12px; font-size: 13.5px; display: block; }
.convo-notice a { color: inherit; font-weight: 600; }
.older { align-self: center; margin: 4px 0 8px; }
.day { align-self: center; margin: 12px 0 6px; padding: 3px 10px; border-radius: 999px; background: var(--hover-strong); color: var(--muted); font-size: 12px; font-weight: 500; }
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.msg-sender { margin: 6px 0 2px 10px; font-size: 12px; font-weight: 600; }
.msg-sender.c0 { color: #B54708; } .msg-sender.c1 { color: #1F55D6; } .msg-sender.c2 { color: #13612F; }
.msg-sender.c3 { color: #9E2A8C; } .msg-sender.c4 { color: #8A3A06; } .msg-sender.c5 { color: #5B3FC4; }
:root[data-theme="dark"] .msg-sender.c0 { color: #F5A35C; } :root[data-theme="dark"] .msg-sender.c1 { color: #7AA2F7; } :root[data-theme="dark"] .msg-sender.c2 { color: #6BD08E; } :root[data-theme="dark"] .msg-sender.c3 { color: #E58AD3; } :root[data-theme="dark"] .msg-sender.c4 { color: #F4B26B; } :root[data-theme="dark"] .msg-sender.c5 { color: #B4A2F7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c0 { color: #F5A35C; } :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c1 { color: #7AA2F7; } :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c2 { color: #6BD08E; } :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c3 { color: #E58AD3; } :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c4 { color: #F4B26B; } :root:not([data-theme="light"]):not([data-theme="dark"]) .msg-sender.c5 { color: #B4A2F7; } }
.bubble { max-width: 100%; padding: 7px 11px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); font-size: 15px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.mine .bubble { background: var(--mine-bg); border-color: var(--mine-bg); color: var(--mine-text); }
.msg.pending .bubble { opacity: 0.6; }
.msg.failed .bubble { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); cursor: pointer; }
.bubble .media-link { display: block; color: inherit; }
.bubble .media-file { text-decoration: underline; }
.bubble img { display: block; width: 260px; max-width: 100%; height: auto; max-height: 320px; object-fit: cover; border-radius: 10px; background: var(--hover-strong); }
.bubble .media-link + .msg-text, .bubble .media-links + .msg-text, .bubble .media-audio + .msg-text { display: block; margin-top: 6px; }
.media-video { display: block; width: 260px; max-width: 100%; height: auto; max-height: 360px; border-radius: 10px; background: #000000; object-fit: contain; }
.media-audio { display: block; width: 240px; max-width: 100%; height: 40px; }
.media-links { display: block; margin-top: 6px; font-size: 13px; }
.media-open, .msg-link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.msg.mine .media-open, .msg.mine .msg-link { color: var(--mine-text); }
.media-size { opacity: 0.7; }
.bubble .meta { display: block; margin-top: 2px; font-size: 11px; text-align: right; opacity: 0.6; white-space: normal; }
.bubble .deleted { font-style: italic; opacity: 0.75; }
.composer { position: relative; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); }
.composer textarea { flex: 1 1 auto; min-height: 40px; max-height: 140px; padding: 9px 14px; border: 1px solid var(--input); border-radius: 20px; font: inherit; font-size: 15px; line-height: 1.35; resize: none; color: var(--text); background: var(--card); }
.send { flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.send:disabled { opacity: 0.35; cursor: default; }
.composer .attach { flex: 0 0 auto; width: 36px; height: 40px; color: var(--subtle); }
.composer .attach[aria-expanded="true"] { color: var(--link); }
/* The mic (an empty box) and a voice note being recorded. */
.composer .mic { background: none; color: var(--subtle); }
.composer .mic:hover { background: var(--hover-strong); color: var(--text); }
.composer .recorder { display: none; flex: 1 1 auto; align-items: center; gap: 10px; min-height: 40px; }
.composer.recording > :not(.recorder) { display: none !important; }
.composer.recording .recorder { display: flex; }
.rec-dot { width: 10px; height: 10px; border-radius: 999px; background: #E5484D; animation: rec 1s ease-in-out infinite alternate; }
@keyframes rec { to { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Them typing, at the end of the chat. */
.bubble.typing { display: flex; gap: 4px; align-items: center; padding: 11px 13px; }
.bubble.typing span { width: 7px; height: 7px; border-radius: 999px; background: var(--subtle); animation: dot 1.2s infinite ease-in-out; }
.bubble.typing span:nth-child(2) { animation-delay: 0.15s; } .bubble.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .bubble.typing span { animation: none; } }
#convo-net.is-typing { color: var(--ok); font-weight: 600; }
/* Seen: ✓✓ in blue. */
.bubble .meta .seen { color: #0284C7; font-weight: 700; opacity: 1; }
.msg.mine .bubble .meta .seen { color: var(--mine-seen); }
/* A translation under a message. */
.bubble .translation { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(127, 127, 127, 0.3); font-size: 14px; }
.bubble .translation strong { font-size: 11.5px; opacity: 0.75; }
/* Messages waiting to be sent later. */
.msg.scheduled .bubble { opacity: 0.8; border-style: dashed; }
.msg.scheduled .meta-btn { padding: 0; color: inherit; font-size: 11px; text-decoration: underline; }
/* The summary card over the messages. */
.summary { flex: 0 0 auto; max-height: 45%; overflow-y: auto; margin: 10px 14px 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.summary-head { display: flex; align-items: center; justify-content: space-between; }
.summary-text p { margin: 4px 0; font-size: 14px; line-height: 1.4; }
.summary-note { margin: 6px 0 0; }
/* Menus with a title, and send later's date picker. */
.menu-title { margin: 4px 12px 6px; color: var(--subtle); font-size: 12px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.menu-pick { display: flex; gap: 6px; padding: 6px 6px 2px; border-top: 1px solid var(--line-soft); margin-top: 4px; }
.menu-pick .input { min-height: 36px; padding: 4px 8px; font-size: 13.5px; }
.menu-pick .btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.lang-menu { max-height: 320px; overflow-y: auto; }
/* In the list: a draft, a chat marked unread, a message found by the search. */
.draft-mark { color: #D14343; font-weight: 600; }
.count.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.found-message .preview strong { color: var(--text); }
/* Keyboard shortcuts. */
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 4px 18px 18px; font-size: 14px; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; color: var(--muted); }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--hover); font: inherit; font-size: 12.5px; text-align: center; }
.reply-bar.editing .reply-text { border-left-color: var(--ok); }
.reply-bar.editing .reply-text strong { color: var(--ok); }

/* A message's react button (on hover, beside it) and its reactions (under it). */
.bubble-line { display: flex; align-items: center; gap: 4px; max-width: 100%; }
.msg.mine .bubble-line { flex-direction: row-reverse; }
.bubble-line .bubble { min-width: 0; }
.react-btn { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 999px; background: none; color: var(--subtle); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 0.12s; }
.msg:hover .react-btn, .react-btn:focus-visible { opacity: 1; }
.react-btn:hover { background: var(--hover-strong); color: var(--text); }
@media (hover: none) { .react-btn { opacity: 0.6; } }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 8px 2px; position: relative; }
.reaction { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: 13px; line-height: 20px; cursor: pointer; }
.reaction.mine { border-color: var(--link); background: color-mix(in srgb, var(--link) 16%, var(--card)); }
.reaction:hover { background: var(--hover-strong); }
.msg-pop { position: fixed; z-index: 12; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.msg-pop.right { align-items: flex-end; }
.action-list { min-width: 190px; padding: 4px; border: 0; border-radius: 8px; background: var(--card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.action-list .menu-item { display: flex; align-items: center; gap: 10px; }
.action-list .menu-item svg { flex: 0 0 auto; color: var(--subtle); }
.react-bar { display: flex; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.react-pick { width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; font-size: 23px; line-height: 1; cursor: pointer; transition: transform 0.1s; }
.react-pick:hover, .react-pick:focus-visible { background: var(--hover-strong); transform: scale(1.12); outline: none; }
.react-pick.mine { background: color-mix(in srgb, var(--link) 22%, var(--card)); }
.react-pick.more { color: var(--subtle); font-size: 22px; font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .react-pick, .react-btn { transition: none; } .react-pick:hover { transform: none; } }

/* The emoji picker, over the messages above the box. */
.emoji-picker { position: absolute; z-index: 6; left: 10px; bottom: calc(100% + 8px); display: flex; flex-direction: column; width: min(352px, calc(100% - 20px)); height: min(360px, 60vh); border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22); overflow: hidden; }
.emoji-search { margin: 10px 10px 6px; width: auto; min-height: 36px; padding: 6px 12px; font-size: 14px; }
.emoji-tabs { display: flex; justify-content: space-between; padding: 0 6px 4px; border-bottom: 1px solid var(--line-soft); }
.emoji-tab { flex: 1 1 0; min-width: 0; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 17px; cursor: pointer; filter: grayscale(0.6); }
.emoji-tab:hover { background: var(--hover); filter: none; }
.emoji-scroll { flex: 1 1 auto; overflow-y: auto; padding: 4px 8px 10px; }
.emoji-section h4 { position: sticky; top: -4px; margin: 0; padding: 8px 2px 4px; background: var(--card); color: var(--subtle); font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); }
.emoji { height: 38px; border: 0; border-radius: 8px; background: none; font-size: 24px; line-height: 1; cursor: pointer; }
.emoji:hover, .emoji:focus-visible { background: var(--hover-strong); outline: none; }
.emoji-note { padding: 16px 4px; }
/* Files waiting to be sent, above the box. */
.staged { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px 0; overflow-x: auto; background: var(--card); border-top: 1px solid var(--line); }
.staged:not(.hidden) ~ .reply-bar, .staged:not(.hidden) ~ .composer, .reply-bar:not(.hidden) + .composer { border-top: 0; }
/* Replying: above the box, what to. */
.reply-bar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 8px 0 12px; background: var(--card); border-top: 1px solid var(--line); }
.reply-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding: 5px 10px; border-left: 3px solid var(--link); border-radius: 6px; background: var(--hover); }
.reply-text strong { color: var(--link); font-size: 12.5px; }
.reply-text span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* In a message: what it answers. */
.bubble .quote { display: flex; flex-direction: column; width: 100%; min-width: 0; margin: 0 0 6px; padding: 4px 9px; border: 0; border-left: 3px solid var(--link); border-radius: 8px; background: rgba(127, 127, 127, 0.14); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bubble .quote strong { color: var(--link); font-size: 12.5px; }
.bubble .quote span { max-width: 260px; font-size: 13px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.mine .bubble .quote { border-left-color: var(--mine-text); background: rgba(127, 127, 127, 0.2); }
.msg.mine .bubble .quote strong { color: var(--mine-text); }
.msg.flash .bubble { animation: flash 1.4s ease-out; }
@keyframes flash { 0%, 35% { box-shadow: 0 0 0 3px var(--link); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .msg.flash .bubble { animation: none; outline: 3px solid var(--link); } }
/* Plus: the tag on what a Free account doesn't have, and the box with what Plus has (app.js showPlus). */
.menu-item.plus { display: flex; align-items: center; gap: 10px; }
.menu-item.plus::after, .btn.plus::after, .plus-tag { content: 'Plus'; margin-left: auto; padding: 0 6px; border-radius: 4px; background: var(--tag-yellow); color: var(--tag-yellow-text); font-size: 12px; font-weight: 500; line-height: 20px; }
.btn.plus::after { margin-left: 8px; }
.no-plans #plan, .no-plans #plan + section, .no-plans .plus-tag { display: none; }
.plus-tag { display: inline-block; margin-left: 6px; vertical-align: 2px; }
.plus-body { display: flex; flex-direction: column; gap: 10px; padding: 4px 18px 18px; }
.plus-body p { margin: 0; }
.plus-why { font-weight: 600; }
.plus-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
/* Your plan (Accounts): the apps to keep on Free, and the owner's look at each plan. */
.keep-apps { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 8px; background: var(--field); }
.plan-preview { padding-bottom: 0; border-top: 1px solid var(--line-soft); border-bottom: 0; }
/* Forward to…: the chats to pick from. */
.forward { width: min(420px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3); }
.forward[open] { display: flex; flex-direction: column; }
.forward::backdrop { background: rgba(0, 0, 0, 0.45); }
.forward-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 4px 18px; }
.forward-head h2 { margin: 0; font-size: 17px; }
.forward-what { margin: 0 18px 10px; padding: 6px 10px; border-left: 3px solid var(--link); border-radius: 6px; background: var(--hover); color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forward-search { margin: 0 14px 8px; width: auto; }
.forward-error { margin: 0 18px 8px; }
.forward-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 0 8px; }
.forward-item .text { gap: 0; }
.forward-item.sending { opacity: 1; background: var(--hover); }
.forward-item.sending .name::after { content: ' · sending…'; color: var(--subtle); font-weight: 400; }
.staged-item { position: relative; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 92px; height: 92px; padding: 6px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--chip); }
.staged-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.staged-icon { font-size: 26px; }
.staged-name { position: relative; max-width: 100%; color: var(--muted); font-size: 11px; line-height: 1.25; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staged-item img ~ .staged-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px; background: rgba(0, 0, 0, 0.55); color: #FFFFFF; }
@media (max-width: 420px) { .staged-item { width: 76px; height: 76px; } }
.staged-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #FFFFFF; font-size: 11px; line-height: 22px; cursor: pointer; }
/* A file you're sending, before the server has it. */
.bubble .local-media { display: block; width: 260px; max-width: 100%; height: auto; max-height: 360px; border-radius: 10px; object-fit: cover; }
.msg.pending .local-media, .msg.pending .media-video { opacity: 0.75; }
.bubble .local-media + .msg-text { display: block; margin-top: 6px; }
/* Dragging a file over the open chat. */
.convo-pane.drop::after { content: 'Drop to send'; position: absolute; inset: 8px; z-index: 4; display: flex; align-items: center; justify-content: center; border: 2px dashed var(--link); border-radius: 14px; background: color-mix(in srgb, var(--bg) 85%, transparent); color: var(--link); font-size: 17px; font-weight: 600; pointer-events: none; }
.convo-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); color: var(--subtle); font-size: 15px; text-align: center; }

/* Loading placeholders: grey shapes with a slow shimmer (chats.js, dashboard.html). */
.sk { display: block; background: linear-gradient(90deg, var(--sk1) 25%, var(--sk2) 40%, var(--sk1) 55%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sk-avatar { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 999px; }
.sk-avatar.square { border-radius: 12px; }
.sk-lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.sk-line.short { height: 10px; }
.sk-bubble { height: 36px; border-radius: 16px; margin: 4px 0; }
.sk-bubble.left { align-self: flex-start; }
.sk-bubble.right { align-self: flex-end; }
.w35 { width: 35%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* One pane at a time when narrow (the extension's popup, a phone): the list, or the open chat. */
@media (max-width: 760px) {
  .list-pane { flex: 1 1 auto; border-right: 0; }
  .convo-pane { display: none; }
  .chats.show-convo .list-pane { display: none; }
  .chats.show-convo .convo-pane { display: flex; }
  .msg { max-width: 86%; }
}
@media (min-width: 761px) {
  #back { display: none; }
}

/* Phone-sized: a phone, or the extension's popup (380 px wide, 600 tall; extension/popup.html). Tighter
   spacing so a page fits without scrolling, and a narrower sidebar. */
@media (max-width: 420px) {
  html { scrollbar-width: thin; }
  .top, .top.wide { padding: 12px 14px; gap: 8px; flex-wrap: nowrap; }
  .brand { font-size: 15px; gap: 7px; white-space: nowrap; }
  .brand-mark { width: 30px; height: 30px; }
  .wordmark { font-size: 17px; }
  .progress { gap: 3px; font-size: 12px; flex-wrap: nowrap; }
  .progress span { padding: 3px 8px; white-space: nowrap; }
  .top-right { gap: 4px; }
  .top-right .theme-toggle { width: 28px; height: 28px; flex: 0 0 auto; }
  .user-menu { gap: 12px; font-size: 13px; }
  .page { padding: 8px 14px 24px; }
  .col { gap: 16px; }
  .card { padding: 18px; border-radius: 14px; }
  .card.tight { padding: 16px; }
  .stack-lg { gap: 16px; }
  .title { font-size: 24px; }
  .lead { font-size: 15px; }
  .btn { min-height: 46px; padding: 0 18px; font-size: 15px; }
  .row .btn { flex: 1 1 auto; }
  .input.code { min-height: 54px; font-size: 26px; letter-spacing: 0.35em; }
  .app-chips { gap: 6px; font-size: 13px; }
  .app-chip { padding: 6px 10px; }
  .app-row { padding: 12px 14px; gap: 12px; flex-wrap: nowrap; }
  .app-row .app-icon { width: 38px; height: 38px; border-radius: 10px; }
  .app-row .text { flex: 1 1 auto; min-width: 0; }
  .app-row .name { font-size: 16px; }
  .app-row .state { font-size: 13px; }
  .app-row .btn { flex: 0 0 auto; min-height: 38px; padding: 0 12px; font-size: 14px; }
  .pick { min-height: 72px; padding: 12px 14px; gap: 12px; }
  .split { gap: 16px; }
  .split > .side { order: -1; } /* the QR code first, where it can be scanned without scrolling */
  .qr-box { width: 248px; height: 248px; padding: 10px; }
  .rail { flex-basis: 48px; padding: 10px 0; gap: 4px; }
  .rail-mark { width: 30px; height: 30px; margin-bottom: 6px; }
  .rail-item { width: 38px; height: 38px; }
  .chat-item { padding: 9px 12px; gap: 10px; }
  .avatar { width: 42px; height: 42px; }
  .feature-head { gap: 12px; }
  .feature-head .app-icon { width: 38px; height: 38px; border-radius: 10px; }
  .feature-head .name { font-size: 16px; }
  .feature-head .state { font-size: 13px; }
  .feature-head .btn { min-height: 38px; padding: 0 12px; font-size: 14px; }
}

/* /admin: the owner's numbers */
.admin-col { min-width: 0; } /* a wide table scrolls in its box, not the page */
.admin-col .row .btn { flex: 0 0 auto; width: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.admin-stat { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.admin-stat .label { font-size: 13px; color: var(--subtle); }
.admin-stat .value { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.admin-stat .value small { font-size: 14px; font-weight: 500; color: var(--subtle); }
.table-wrap { position: relative; width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.table-wrap:has(table.hidden) { display: none; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 500; color: var(--subtle); border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .figure { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .email { word-break: break-all; min-width: 160px; }
.admin-table .when { white-space: nowrap; color: var(--muted); }
.admin-table .actions { white-space: nowrap; text-align: right; }
.admin-table .actions .btn + .btn { margin-left: 6px; }
.admin-table .quiet-row td { color: var(--subtle); }
.admin-table .tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 12px; line-height: 18px; background: var(--tag-gray); color: var(--tag-gray-text); }
.meter { height: 8px; border-radius: 4px; background: var(--field); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ink); }
.meter.low > span { background: var(--danger); }
.footer .row a.social { display: inline-flex; align-items: center; gap: 6px; }
