/* blabbur.io: styled after the desktop app's default "Melange" theme
   (crates/blabbur-client/src/ui/theme.rs). No external requests: every
   font, image and icon is served from this site. */

@font-face {
  font-family: "Ubuntu";
  src: url("/assets/fonts/Ubuntu-Light.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hack";
  src: url("/assets/fonts/Hack-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Melange, from the app */
  --strip: #1c1814;
  --panel: #201b17;
  --sidebar: #241f1a;
  --chat: #2a2520;
  --hover: #342f2a;
  --button: #3a342e;
  --sep: #39342f;
  --selected: #433e39;
  --text: #ece1d7;
  --muted: #b09b86;
  --accent: #a95f33;
  --accent-deep: #8f4f2a;
  --highlight: #e49b5d;
  --yellow: #ebc06d;
  --green: #85b695;
  --danger: #b85c5e;
  --link: #9aacce;

  --font: "Ubuntu", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Hack", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 16px;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1180px;
  --shadow: 0 1px 0 rgba(255, 240, 225, 0.04) inset, 0 24px 60px -20px rgba(0, 0, 0, 0.65);

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  background: var(--strip);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--strip);
  font-synthesis: none;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

strong {
  font-weight: 700;
  font-synthesis: weight;
  color: var(--text);
}

b {
  font-weight: 400;
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #b9c7e2;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.86em;
}

code {
  background: var(--strip);
  border: 1px solid var(--sep);
  border-radius: 4px;
  padding: 0.08em 0.4em;
  overflow-wrap: anywhere;
}

kbd {
  background: var(--button);
  border: 1px solid var(--selected);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.05em 0.4em;
}

::selection {
  background: rgba(169, 95, 51, 0.55);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  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: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-s);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 24, 20, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--sep);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin-right: auto;
  border-radius: 8px;
}

.brand:hover {
  color: #fff;
}

.brand img {
  width: 34px;
  height: 34px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: var(--radius-s);
}

.site-nav a:hover {
  color: var(--text);
  background: var(--hover);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--selected);
}

.site-header .btn {
  padding: 8px 16px;
  font-size: 15px;
}

@media (max-width: 860px) {
  .site-nav .nav-section {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-nav {
    display: none;
  }
}

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

.btn {
  --btn-bg: var(--button);
  --btn-fg: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-s);
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  color: var(--btn-fg);
  background: var(--selected);
  border-color: var(--highlight);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.btn-primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  box-shadow: 0 8px 24px -10px rgba(169, 95, 51, 0.9);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--highlight);
}

.btn-large {
  min-height: 52px;
  padding: 13px 28px;
  font-size: 18px;
}

.btn-ghost {
  --btn-bg: transparent;
  border-color: var(--selected);
}

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

.btn-block {
  width: 100%;
}

/* ---------- Common section furniture ---------- */

.section {
  padding-block: clamp(64px, 9vw, 108px);
}

.section.tight-top {
  padding-top: 12px;
}

.section-alt {
  background: var(--panel);
  border-block: 1px solid #2b2621;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--highlight);
  margin-bottom: 14px;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(32px, 4.6vw, 50px);
}

.section-head p {
  font-size: 19px;
  color: var(--muted);
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(235, 192, 109, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(235, 192, 109, 0.35);
  white-space: nowrap;
}

.pill-soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 900px;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 45% at 50% 30%, rgba(169, 95, 51, 0.30), transparent 70%),
    radial-gradient(ellipse 30% 30% at 22% 18%, rgba(235, 192, 109, 0.10), transparent 70%),
    radial-gradient(ellipse 30% 30% at 80% 22%, rgba(184, 92, 94, 0.12), transparent 70%);
  pointer-events: none;
}

.hero::after {
  /* faint dotted texture, like a notebook */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  z-index: -1;
  background-image: radial-gradient(rgba(236, 225, 215, 0.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  pointer-events: none;
}

.hero-copy {
  text-align: center;
  max-width: 820px;
  margin-inline: auto;
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 14px 30px rgba(169, 95, 51, 0.45));
}

.hero h1 {
  margin: 0 0 20px;
}

.hero .wordmark {
  display: block;
  font-size: clamp(22px, 3vw, 28px);
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.hero .tagline {
  display: block;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text);
}

.hero .tagline em {
  font-style: normal;
  color: var(--highlight);
}

.hero-sub {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-platforms {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.hero-platforms span[aria-hidden="true"] {
  margin-inline: 6px;
  color: var(--selected);
}

.hero-stage {
  position: relative;
  margin-top: clamp(40px, 7vw, 72px);
  padding-bottom: clamp(56px, 9vw, 100px);
}

.theme-try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.theme-try[hidden] {
  display: none;
}

.theme-try .label {
  margin-right: 4px;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--sidebar);
  border: 1px solid var(--sep);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  cursor: pointer;
  min-height: 36px;
}

.theme-btn:hover {
  border-color: var(--highlight);
}

.theme-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--hover);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.theme-btn .swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.swatch-melange { background: linear-gradient(135deg, #2a2520 50%, #a95f33 50%); }
.swatch-navy { background: linear-gradient(135deg, #0d2536 50%, #2176ae 50%); }
.swatch-graphite { background: linear-gradient(135deg, #313338 50%, #5865f2 50%); }
.swatch-light { background: linear-gradient(135deg, #ffffff 50%, #5865f2 50%); }

/* ---------- The app-window mock ---------- */

.app {
  /* Melange */
  --m-chrome: #15120f;
  --m-strip: #1c1814;
  --m-sidebar: #241f1a;
  --m-chat: #2a2520;
  --m-panel: #201b17;
  --m-selected: #433e39;
  --m-hover: #342f2a;
  --m-button: #3a342e;
  --m-sep: #39342f;
  --m-text: #ece1d7;
  --m-muted: #b09b86;
  --m-accent: #a95f33;
  --m-success: #85b695;
  --m-danger: #b85c5e;
  --m-mention-row: #3e3425;
  --m-mention-bar: #ebc06d;
  --m-pill: #503725;
  --m-pill-text: #e6c4ad;
  --m-react: #493425;
  --m-input: #1c1814;
  --m-indicator: #ece1d7;
  --m-offline: #433e39;
  --m-role: #e49b5d;

  position: relative;
  max-width: 1120px;
  margin-inline: auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--m-chat);
  color: var(--m-text);
  border: 1px solid rgba(236, 225, 215, 0.10);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 40px 100px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -40px rgba(169, 95, 51, 0.55);
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.3s ease;
}

.app[data-theme="navy"] {
  --m-chrome: #050f16;
  --m-strip: #07141d;
  --m-sidebar: #0a1d29;
  --m-chat: #0d2536;
  --m-panel: #081822;
  --m-selected: #194663;
  --m-hover: #112d41;
  --m-button: #123049;
  --m-sep: #194967;
  --m-text: #d8e6ef;
  --m-muted: #8aa8bc;
  --m-accent: #2176ae;
  --m-success: #23a55a;
  --m-danger: #da373c;
  --m-mention-row: #193e58;
  --m-mention-bar: #ffa000;
  --m-pill: #133d5a;
  --m-pill-text: #b5d6ec;
  --m-react: #11354e;
  --m-input: #07141d;
  --m-indicator: #d8e6ef;
  --m-offline: #194663;
  --m-role: #6fb2dc;
}

.app[data-theme="graphite"] {
  --m-chrome: #17181a;
  --m-strip: #1e1f22;
  --m-sidebar: #2b2d31;
  --m-chat: #313338;
  --m-panel: #232428;
  --m-selected: #404249;
  --m-hover: #35373c;
  --m-button: #404249;
  --m-sep: #1f2124;
  --m-text: #dbdee1;
  --m-muted: #989fa8;
  --m-accent: #5865f2;
  --m-success: #23a55a;
  --m-danger: #da373c;
  --m-mention-row: #423d35;
  --m-mention-bar: #f0b232;
  --m-pill: #3d4270;
  --m-pill-text: #c9cdfb;
  --m-react: #393d5d;
  --m-input: #1e1f22;
  --m-indicator: #dbdee1;
  --m-offline: #404249;
  --m-role: #f0b232;
}

.app[data-theme="light"] {
  --m-chrome: #d9dce0;
  --m-strip: #e3e5e8;
  --m-sidebar: #f2f3f5;
  --m-chat: #ffffff;
  --m-panel: #ebedef;
  --m-selected: #d4d7dc;
  --m-hover: #e8eaed;
  --m-button: #d4d7dc;
  --m-sep: #e1e2e4;
  --m-text: #313338;
  --m-muted: #5c5e66;
  --m-accent: #5865f2;
  --m-success: #248046;
  --m-danger: #da373c;
  --m-mention-row: #fef1db;
  --m-mention-bar: #c88c14;
  --m-pill: #e1e3fd;
  --m-pill-text: #3c46b8;
  --m-react: #e6e8fd;
  --m-input: #ebedef;
  --m-indicator: #313338;
  --m-offline: #d4d7dc;
  --m-role: #a8620f;
}

.app * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.app-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 0 0 12px;
  background: var(--m-chrome);
  color: var(--m-muted);
  font-size: 12.5px;
}

.app-titlebar img {
  width: 16px;
  height: 16px;
}

.app-titlebar .win-controls {
  margin-left: auto;
  display: flex;
  height: 100%;
}

.app-titlebar .win-controls span {
  width: 44px;
  display: grid;
  place-items: center;
}

.app-titlebar .win-controls svg {
  width: 10px;
  height: 10px;
}

.app-body {
  display: grid;
  grid-template-columns: 72px 240px minmax(0, 1fr) 232px;
  grid-template-rows: minmax(0, 1fr);
  height: 590px;
}

.app-body > * {
  min-height: 0;
  overflow: hidden;
}

/* Guild strip */
.m-strip {
  background: var(--m-strip);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
}

.m-guild {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 17px;
  color: #fff;
  flex: none;
}

.m-guild svg {
  width: 22px;
  height: 22px;
}

.m-guild.home {
  background: var(--m-sidebar);
  color: var(--m-text);
}

.m-guild.add {
  background: var(--m-sidebar);
  color: var(--m-success);
}

.m-guild.add svg {
  width: 18px;
  height: 18px;
}

.m-guild.is-active {
  border-radius: 16px;
}

.m-guild::before {
  /* the pill left of a guild: tall when selected, a dot when unread */
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 4px;
  height: 0;
  border-radius: 0 4px 4px 0;
  background: var(--m-indicator);
  transform: translateY(-50%);
}

.m-guild.is-active::before {
  height: 40px;
}

.m-guild.is-unread::before {
  height: 8px;
}

.m-strip-sep {
  width: 32px;
  height: 2px;
  border-radius: 1px;
  background: var(--m-selected);
  flex: none;
}

.m-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #da373c;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 0 0 3px var(--m-strip);
}

/* Avatar colours (pastels, as the app draws letter avatars) */
.c-peach { background: #e5bba0; }
.c-mint { background: #9fdcc0; }
.c-lilac { background: #c3a8e8; }
.c-sky { background: #a0c4e5; }
.c-rose { background: #e8a8b8; }
.c-lime { background: #bbe5a0; }
.c-sand { background: #e5d6a0; }

/* Channel sidebar */
.m-sidebar {
  background: var(--m-sidebar);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.m-guild-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 14px 0 12px;
  font-size: 16px;
  flex: none;
}

.m-guild-name svg {
  width: 12px;
  height: 12px;
  color: var(--m-muted);
}

.m-channels {
  padding: 4px 8px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.m-category {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--m-muted);
  padding: 14px 4px 6px;
}

.m-category:first-child {
  padding-top: 6px;
}

.m-category svg {
  width: 10px;
  height: 10px;
}

.m-channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 8px;
  margin-bottom: 2px;
  border-radius: 4px;
  color: var(--m-muted);
  white-space: nowrap;
}

.m-channel .glyph {
  width: 16px;
  flex: none;
  color: var(--m-muted);
  text-align: center;
  font-size: 17px;
}

.m-channel .glyph svg {
  width: 16px;
  height: 16px;
}

.m-channel.is-active {
  background: var(--m-selected);
  color: var(--m-text);
}

.m-channel.is-unread {
  color: var(--m-text);
}

.m-channel.is-unread::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  width: 4px;
  height: 8px;
  margin-top: -4px;
  border-radius: 0 4px 4px 0;
  background: var(--m-indicator);
}

.m-channel .m-count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #da373c;
  color: #fff;
  font-size: 11.5px;
  line-height: 18px;
  text-align: center;
}

.m-voice-user {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 8px 0 34px;
  color: var(--m-text);
  font-size: 14.5px;
}

.m-voice-user .m-av {
  width: 22px;
  height: 22px;
  font-size: 10px;
}

.m-voice-user .m-av.is-speaking {
  box-shadow: 0 0 0 2px var(--m-sidebar), 0 0 0 4px #23a55a;
}

.m-live {
  display: inline-block;
  margin-left: auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: #da373c;
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.m-voice-panel {
  flex: none;
  border-top: 1px solid var(--m-sep);
  padding: 10px 8px 8px;
}

.m-voice-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--m-success);
  font-size: 14.5px;
  padding: 0 2px;
}

.m-voice-status svg {
  width: 14px;
  height: 14px;
}

.m-voice-status .m-hangup {
  margin-left: auto;
  color: var(--m-danger);
}

.m-voice-status .m-hangup svg {
  width: 18px;
  height: 18px;
}

.m-voice-where {
  font-size: 12px;
  color: var(--m-muted);
  padding: 2px 2px 10px;
}

.m-voice-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.m-voice-tiles span {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 4px;
  background: var(--m-hover);
  color: var(--m-text);
}

.m-voice-tiles span.is-on {
  background: var(--m-accent);
  color: #fff;
}

.m-voice-tiles svg {
  width: 18px;
  height: 18px;
}

.m-user-panel {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 10px 0 8px;
  background: var(--m-panel);
}

.m-user-panel .who {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
  margin-right: auto;
}

.m-user-panel .who small {
  font-size: 12px;
  color: var(--m-muted);
}

.m-user-panel .tools {
  display: flex;
  gap: 12px;
  color: var(--m-text);
}

.m-user-panel .tools svg {
  width: 18px;
  height: 18px;
}

/* Avatars and status */
.m-av {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
}

.m-av.sm {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.m-av.is-offline {
  background: var(--m-offline);
  color: var(--m-muted);
}

.m-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #23a55a;
  box-shadow: 0 0 0 3px var(--m-sidebar);
}

.m-user-panel .m-status {
  box-shadow: 0 0 0 3px var(--m-panel);
}

.m-status.idle { background: #f0b232; }
.m-status.dnd { background: #da373c; }
.m-status.off { background: #80848e; }

/* Chat */
.m-chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--m-chat);
}

.m-chat-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 48px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--m-sep);
  font-size: 16px;
}

.m-chat-head .hash {
  color: var(--m-muted);
  font-size: 20px;
  margin-right: -6px;
}

.m-chat-head .topic {
  color: var(--m-muted);
  font-size: 13px;
  padding-left: 14px;
  border-left: 1px solid var(--m-sep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.m-head-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--m-text);
  flex: none;
}

.m-head-tools > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
}

.m-head-tools > span.is-on {
  background: var(--m-accent);
  color: #fff;
}

.m-head-tools svg {
  width: 18px;
  height: 18px;
}

.m-head-tools .m-search {
  width: 170px;
  justify-content: start;
  display: flex;
  gap: 6px;
  padding: 0 8px;
  height: 28px;
  background: var(--m-input);
  color: var(--m-muted);
  font-size: 13px;
}

.m-head-tools .m-search svg {
  width: 13px;
  height: 13px;
}

.m-messages {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding-bottom: 6px;
}

.m-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 16px 10px;
  font-size: 12px;
  color: var(--m-muted);
}

.m-divider::before,
.m-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--m-sep);
}

.m-msg {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 0 16px;
  padding: 7px 16px 7px 16px;
}

.m-msg + .m-msg {
  margin-top: 6px;
}

.m-msg.is-mention {
  background: var(--m-mention-row);
}

.m-msg.is-mention::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--m-mention-bar);
}

.m-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.3;
  margin-bottom: 3px;
}

.m-name {
  font-size: 15px;
  color: var(--m-text);
}

.m-name.role {
  color: var(--m-role);
}

.m-time {
  font-size: 12px;
  color: var(--m-muted);
}

.m-text {
  margin: 0;
  font-size: 15px;
  color: var(--m-text);
  overflow-wrap: anywhere;
}

.m-text + .m-text {
  margin-top: 4px;
}

.m-pill {
  background: var(--m-pill);
  color: var(--m-pill-text);
  border-radius: 3px;
  padding: 0 2px;
}

.emoji {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: -0.3em;
  margin: 0 0.05em;
}

.m-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.m-reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 7px;
  border-radius: 8px;
  background: var(--m-react);
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--m-text);
}

.m-reaction.is-mine {
  border-color: var(--m-accent);
}

.m-reaction .emoji {
  width: 17px;
  height: 17px;
  margin: 0;
  vertical-align: 0;
}

.m-reaction.add {
  background: var(--m-input);
  color: var(--m-muted);
  padding: 0 8px;
}

.m-reaction.add svg {
  width: 18px;
  height: 18px;
}

.m-typing {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 18px;
  font-size: 12px;
  color: var(--m-muted);
}

.m-typing .dots {
  display: inline-flex;
  gap: 3px;
}

.m-typing .dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--m-muted);
  animation: typing 1.2s infinite ease-in-out;
}

.m-typing .dots i:nth-child(2) { animation-delay: 0.15s; }
.m-typing .dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.m-composer {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  margin: 0 12px 14px 16px;
  padding: 0 6px 0 12px;
  border-radius: 8px;
  background: var(--m-input);
  color: var(--m-muted);
}

.m-composer svg {
  width: 18px;
  height: 18px;
  color: var(--m-text);
}

.m-composer .placeholder {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-composer .send {
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--m-button);
  color: var(--m-muted);
  font-size: 14px;
}

/* Member list */
.m-members {
  background: var(--m-sidebar);
  padding: 16px 12px 12px 16px;
  min-width: 0;
  overflow: hidden;
}

.m-members .m-category {
  padding: 0 0 10px;
}

.m-members .m-category + .m-member {
  margin-top: 0;
}

.m-member {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  font-size: 15px;
  white-space: nowrap;
}

.m-member .emoji {
  width: 15px;
  height: 15px;
  margin-left: -6px;
  vertical-align: 0;
}

.m-member.is-offline {
  color: var(--m-muted);
  opacity: 0.8;
}

.m-members .m-category.offline {
  padding-top: 18px;
}

/* Mock responsiveness: drop panes the way a narrow window would */
@media (max-width: 1100px) {
  .app-body { grid-template-columns: 72px 220px minmax(0, 1fr) 200px; }
  .m-chat-head .topic { display: none; }
}

@media (max-width: 960px) {
  .app-body { grid-template-columns: 72px 220px minmax(0, 1fr); }
  .m-members { display: none; }
}

@media (max-width: 700px) {
  .app-body { grid-template-columns: 64px minmax(0, 1fr); height: 540px; }
  .m-sidebar { display: none; }
  .m-strip { gap: 8px; }
  .m-guild { width: 44px; height: 44px; }
  .m-guild::before { left: -10px; }
  .m-head-tools .m-search { display: none; }
  .app-titlebar .win-controls span { width: 34px; }
}

@media (max-width: 420px) {
  .app-body { grid-template-columns: 56px minmax(0, 1fr); height: 520px; }
  .m-guild { width: 40px; height: 40px; font-size: 15px; }
  .m-guild::before { left: -8px; }
  .m-msg { grid-template-columns: 34px minmax(0, 1fr); gap: 0 10px; padding-inline: 10px; }
  .m-av { width: 34px; height: 34px; font-size: 14px; }
  .m-text,
  .m-name { font-size: 14px; }
  .m-head-tools > span:not(.is-on):not(:first-child) { display: none; }
  .m-composer { margin-inline: 10px; }
  .m-divider { margin-inline: 10px; }
  .m-typing { padding-inline: 12px; }
}

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  background: var(--chat);
  border: 1px solid var(--sep);
  border-radius: var(--radius-l);
  padding: 28px;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(228, 155, 93, 0.55);
  background: #2d2823;
}

.feature-card h3 {
  font-size: 24px;
  margin: 18px 0 10px;
}

.feature-card p {
  color: var(--muted);
  margin-bottom: 14px;
}

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--highlight);
  background: linear-gradient(145deg, rgba(169, 95, 51, 0.32), rgba(169, 95, 51, 0.12));
  border: 1px solid rgba(228, 155, 93, 0.28);
}

.icon-tile svg {
  width: 28px;
  height: 28px;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15.5px;
}

.ticks li {
  position: relative;
  padding-left: 22px;
  margin-top: 7px;
  line-height: 1.45;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(169, 95, 51, 0.22);
}

.theme-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.theme-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.theme-chip i {
  display: grid;
  grid-template-columns: 22% 28% 1fr;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.theme-chip i::before,
.theme-chip i::after {
  content: "";
  display: block;
  grid-row: 1;
}

.theme-chip i::before { grid-column: 1; }
.theme-chip i::after { grid-column: 2; }

.theme-chip.melange i { background: #2a2520; border-color: var(--accent); }
.theme-chip.melange i::before { background: #1c1814; }
.theme-chip.melange i::after { background: #241f1a; }
.theme-chip.navy i { background: #0d2536; }
.theme-chip.navy i::before { background: #07141d; }
.theme-chip.navy i::after { background: #0a1d29; }
.theme-chip.graphite i { background: #313338; }
.theme-chip.graphite i::before { background: #1e1f22; }
.theme-chip.graphite i::after { background: #2b2d31; }
.theme-chip.light i { background: #fff; }
.theme-chip.light i::before { background: #e3e5e8; }
.theme-chip.light i::after { background: #f2f3f5; }

.theme-chip i b {
  display: block;
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  margin: 11px 7px 0;
  height: 4px;
  border-radius: 2px;
  box-shadow: 0 9px 0 0 rgba(128, 128, 128, 0.55), 0 18px 0 0 rgba(128, 128, 128, 0.4);
}

.theme-chip.melange i b { background: #a95f33; }
.theme-chip.navy i b { background: #2176ae; }
.theme-chip.graphite i b,
.theme-chip.light i b { background: #5865f2; }

.also {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 36px;
  border-top: 1px solid var(--sep);
  padding-top: 40px;
}

.also h3 {
  grid-column: 1 / -1;
  font-size: 22px;
  margin-bottom: 20px;
}

.also-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
}

.also-item svg {
  width: 22px;
  height: 22px;
  flex: none;
  margin-top: 3px;
  color: var(--highlight);
}

.also-item h4 {
  font-size: 17px;
  margin: 0 0 2px;
  letter-spacing: 0;
}

.also-item p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

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

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .also { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 22px; }
}

/* ---------- How joining works ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
  position: relative;
}

.step {
  position: relative;
  counter-increment: step;
  background: var(--chat);
  border: 1px solid var(--sep);
  border-radius: var(--radius-l);
  padding: 28px 26px 26px;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  margin-bottom: 18px;
  box-shadow: 0 0 0 6px rgba(169, 95, 51, 0.18);
}

.step h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  margin: 0;
}

.steps-note {
  margin: 28px 0 0;
  text-align: center;
  color: var(--muted);
}

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

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shot {
  margin: 0;
}

.shot a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--sep);
  background: var(--chat);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s ease, transform 0.25s ease;
}

.shot a:hover {
  border-color: var(--highlight);
  transform: translateY(-3px);
}

.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.shot figcaption {
  margin-top: 12px;
  font-size: 15.5px;
  color: var(--muted);
}

.shot figcaption b {
  font-weight: 400;
  color: var(--text);
}

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

.lightbox {
  width: min(1320px, 96vw);
  max-width: none;
  max-height: 96vh;
  padding: 0;
  border: 1px solid var(--sep);
  border-radius: 14px;
  background: var(--sidebar);
  color: var(--text);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
}

.lightbox::backdrop {
  background: rgba(10, 8, 7, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox img {
  width: 100%;
  max-height: calc(96vh - 64px);
  object-fit: contain;
  background: #120f0d;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 16px;
  min-height: 56px;
}

.lightbox-bar p {
  margin: 0 auto 0 0;
  font-size: 15px;
  color: var(--muted);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--button);
  color: var(--text);
  cursor: pointer;
  flex: none;
}

.icon-btn:hover {
  border-color: var(--highlight);
  background: var(--selected);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- Self-hosting ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.split .section-head {
  margin-bottom: 24px;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 12px;
}

.facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.facts svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 4px;
  color: var(--green);
}

.aside-note {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.terminal {
  border-radius: 12px;
  overflow: hidden;
  background: #120f0d;
  border: 1px solid var(--sep);
  box-shadow: var(--shadow);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  background: var(--strip);
  border-bottom: 1px solid var(--sep);
  font-size: 13px;
  color: var(--muted);
}

.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--selected);
}

.terminal-bar span {
  margin-left: 8px;
}

.terminal pre {
  margin: 0;
  padding: 20px 22px 24px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
}

.terminal pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  overflow-wrap: normal;
}

.terminal .c { color: #a08b77; }
.terminal .p { color: var(--highlight); user-select: none; -webkit-user-select: none; }
.terminal .ok { color: var(--green); }

.ports {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.ports span {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--sep);
  background: var(--sidebar);
  color: var(--muted);
}

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

@media (max-width: 520px) {
  .terminal pre { font-size: 12.5px; padding: 16px; }
}

/* ---------- Phones teaser ---------- */

.phones {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 64px);
  align-items: center;
  background:
    radial-gradient(ellipse 60% 80% at 85% 50%, rgba(169, 95, 51, 0.22), transparent 70%),
    var(--chat);
  border: 1px solid var(--sep);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
}

.phones h2 {
  font-size: clamp(30px, 4.2vw, 46px);
}

.phones .pill {
  margin-bottom: 16px;
}

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

.phone-art {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.phone {
  width: 180px;
  height: 360px;
  border-radius: 30px;
  background: #0f0d0b;
  border: 1px solid #4a433c;
  padding: 9px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9), 0 0 0 5px #1a1613;
  flex: none;
}

.phone + .phone {
  margin-top: 40px;
}

.phone-screen {
  height: 100%;
  border-radius: 22px;
  background: #2a2520;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  line-height: 1.35;
}

.phone-top {
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #241f1a;
  border-bottom: 1px solid #39342f;
  font-size: 11px;
  color: var(--text);
}

.phone-top::before {
  content: "#";
  color: var(--muted);
  margin-right: 4px;
}

.phone-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
}

.phone-bubble {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.phone-bubble i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
}

.phone-bubble span {
  background: #342f2a;
  color: var(--text);
  border-radius: 8px;
  padding: 5px 7px;
}

.phone-bubble.me {
  flex-direction: row-reverse;
}

.phone-bubble.me span {
  background: var(--accent);
  color: #fff;
}

.phone-input {
  height: 26px;
  margin: 0 8px 10px;
  border-radius: 13px;
  background: #1c1814;
  color: var(--muted);
  display: flex;
  align-items: center;
  padding: 0 10px;
  flex: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-screen.lock {
  background:
    radial-gradient(ellipse 90% 60% at 30% 100%, rgba(169, 95, 51, 0.55), transparent 70%),
    radial-gradient(ellipse 80% 50% at 90% 20%, rgba(184, 92, 94, 0.35), transparent 70%),
    #1f1a16;
  text-align: center;
}

.lock-time {
  margin-top: 34px;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #f6ede4;
}

.lock-date {
  margin-top: 6px;
  font-size: 10px;
  color: rgba(246, 237, 228, 0.8);
}

.phone-notice {
  text-align: left;
  margin: 22px 8px 0;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(236, 225, 215, 0.12);
  color: var(--text);
  display: flex;
  gap: 6px;
  align-items: center;
}

.phone-notice img {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .phones { grid-template-columns: minmax(0, 1fr); }
  .phone { width: 150px; height: 300px; }
}

@media (max-width: 420px) {
  .phone { width: 128px; height: 256px; border-radius: 24px; }
  .phone-screen { border-radius: 17px; font-size: 9px; }
  .phone + .phone { margin-top: 28px; }
}

/* ---------- Closing call to action ---------- */

.closing {
  text-align: center;
}

.closing h2 {
  font-size: clamp(32px, 5vw, 54px);
}

.closing p {
  color: var(--muted);
  font-size: 19px;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* ---------- Footer ---------- */

.site-footer {
  flex: none;
  background: #171310;
  border-top: 1px solid var(--sep);
  padding: 44px 0 36px;
  font-size: 15px;
  color: var(--muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand p {
  margin: 10px 0 0;
  max-width: 340px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--highlight);
  text-decoration: underline;
}

.footer-small {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #2b2621;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 13px;
  color: #9a8674;
}

.footer-small p {
  margin: 0;
}

.footer-small a {
  color: #a6b4d3;
}

/* ---------- Page header (download, privacy, 404) ---------- */

.page-hero {
  position: relative;
  padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 48px);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 600px;
  z-index: -1;
  background: radial-gradient(ellipse 45% 50% at 50% 35%, rgba(169, 95, 51, 0.26), transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.03em;
}

.page-hero p.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 660px;
  margin: 0;
}

.page-hero.center {
  text-align: center;
}

.page-hero.center p.lead {
  margin-inline: auto;
}

/* ---------- Download page ---------- */

.detected {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
  justify-content: center;
}

.detected[hidden] {
  display: none;
}

.detected p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  width: 100%;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.platform {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.platform.is-yours {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -24px rgba(169, 95, 51, 0.7);
  background: #2e2822;
}

.platform-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.platform-head h2 {
  font-size: 26px;
  margin: 0;
}

.platform-head .sub {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

.yours-badge {
  display: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--highlight);
}

.platform.is-yours .yours-badge {
  display: block;
}

.platform .links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.platform .links .btn {
  justify-content: space-between;
  text-align: left;
}

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

.platform.is-soon .icon-tile {
  color: var(--yellow);
  background: rgba(235, 192, 109, 0.10);
  border-color: rgba(235, 192, 109, 0.3);
}

.platform .note {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.platforms-phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

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

.install-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.install-notes .card h3 {
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.install-notes .card h3 svg {
  width: 22px;
  height: 22px;
  color: var(--highlight);
}

.install-notes p,
.install-notes li {
  color: var(--muted);
}

.install-notes p:last-child {
  margin-bottom: 0;
}

.install-notes .card.all {
  background: linear-gradient(145deg, rgba(133, 182, 149, 0.10), transparent 60%), var(--chat);
}

.install-notes .card.all h3 svg {
  color: var(--green);
}

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

.phone-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.phone-steps h3 {
  font-size: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.phone-steps ol {
  list-style: none;
  counter-reset: s;
  margin: 18px 0 0;
  padding: 0;
}

.phone-steps li {
  position: relative;
  counter-increment: s;
  padding: 0 0 16px 44px;
  color: var(--muted);
}

.phone-steps li:last-child {
  padding-bottom: 0;
}

.phone-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: -1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--text);
  background: var(--button);
  border: 1px solid var(--selected);
}

.phone-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 30px;
  bottom: 2px;
  width: 1px;
  background: var(--selected);
}

.phone-steps li b {
  font-weight: 400;
  color: var(--text);
}

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

.next-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 28px 32px;
  border-radius: var(--radius-l);
  border: 1px solid var(--sep);
  background: linear-gradient(120deg, rgba(169, 95, 51, 0.2), rgba(169, 95, 51, 0.04) 60%), var(--chat);
}

.next-callout h2 {
  font-size: 26px;
  margin: 0 0 4px;
}

.next-callout p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Privacy (prose) ---------- */

.prose-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
  font-size: 14.5px;
}

.toc h2 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--sep);
}

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--text);
  border-left-color: var(--highlight);
}

.prose {
  max-width: 720px;
}

.prose section {
  padding-bottom: 12px;
  margin-bottom: 36px;
  border-bottom: 1px solid #2f2a25;
}

.prose section:last-child {
  border-bottom: 0;
}

.prose h2 {
  font-size: 30px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 20px;
  margin: 24px 0 8px;
  color: var(--text);
}

.prose p,
.prose li {
  color: #dccfc2;
}

.prose ul {
  padding-left: 0;
  list-style: none;
  margin: 0 0 1em;
}

.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.summary-box {
  border-radius: var(--radius-l);
  padding: 24px 26px;
  margin-bottom: 44px;
  background: linear-gradient(140deg, rgba(133, 182, 149, 0.12), transparent 55%), var(--chat);
  border: 1px solid var(--sep);
}

.summary-box h2 {
  font-size: 20px;
  margin-bottom: 12px;
}

.summary-box ul {
  margin: 0;
}

.callout {
  border-left: 3px solid var(--yellow);
  background: rgba(235, 192, 109, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 0 0 1em;
}

.callout p:last-child {
  margin: 0;
}

.effective {
  font-size: 15px;
  color: var(--muted);
  margin-top: 14px;
}

@media (max-width: 900px) {
  .prose-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
}

/* ---------- 404 ---------- */

.lost {
  text-align: center;
  padding: clamp(64px, 12vw, 140px) 0;
}

.app.app-mini {
  max-width: 520px;
  margin: 0 auto 40px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 30px 80px -30px rgba(0, 0, 0, 0.85), 0 0 90px -40px rgba(169, 95, 51, 0.6);
}

.app-mini .m-msg {
  padding-block: 16px 18px;
}

.lost h1 {
  font-size: clamp(36px, 6vw, 60px);
}

.lost .lost-text {
  color: var(--muted);
  font-size: 19px;
  margin-bottom: 28px;
}

.lost .hero-actions {
  justify-content: center;
}

/* ---------- Link pages (/i, /l, /r) ---------- */

.link-hero {
  padding-bottom: clamp(40px, 7vw, 72px);
}

.link-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(26px, 5vw, 44px);
  box-shadow: var(--shadow);
}

/* The page's elements toggle with [hidden]; .btn and friends set display. */
.link-card [hidden] {
  display: none !important;
}

.link-card .icon-tile {
  margin: 0 auto 18px;
}

.link-card h1 {
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.02em;
}

.link-card .lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.link-host {
  color: var(--text);
}

.link-facts {
  margin: 26px 0 0;
  text-align: left;
  border: 1px solid var(--sep);
  border-radius: var(--radius);
  background: var(--sidebar);
  overflow: hidden;
}

.link-facts > div {
  display: grid;
  grid-template-columns: 8.5em minmax(0, 1fr);
  gap: 4px 16px;
  padding: 11px 16px;
  border-top: 1px solid var(--sep);
}

.link-facts > div:first-child {
  border-top: 0;
}

.link-facts dt {
  color: var(--muted);
  font-size: 15px;
  padding-top: 1px;
}

.link-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.link-fact-note {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.link-card .callout {
  text-align: left;
  margin: 22px 0 0;
  font-size: 15.5px;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.link-copy {
  margin: 16px 0 0;
  text-align: left;
}

.link-copy label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.link-copy input {
  width: 100%;
  font: inherit;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  background: var(--strip);
  border: 1px solid var(--selected);
  border-radius: var(--radius-s);
  padding: 10px 12px;
}

.link-status {
  margin: 16px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.link-status:empty {
  display: none;
}

.link-noscript {
  margin: 20px 0 0;
  color: var(--yellow);
  font-size: 15px;
}

.link-download {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--sep);
  color: var(--muted);
  font-size: 15.5px;
}

.link-privacy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  max-width: 640px;
  margin: 18px auto 0;
  font-size: 14px;
  color: var(--muted);
  text-align: left;
}

.link-privacy svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 3px;
  color: var(--green);
}

@media (max-width: 560px) {
  .link-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .link-actions .btn { width: 100%; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .m-typing .dots i {
    animation: none;
    opacity: 0.7;
  }

  .shot a:hover {
    transform: none;
  }
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
