/* Hot Jobs — a landing page built from Telegram Web (K) pieces. Own wallpaper and brand. */

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --primary: #3390ec;
  --primary-hover: #2a82d9;
  --primary-ink: #1f73bb;          /* primary as text on light surfaces (AA) */
  --page: #ffffff;
  --band: #f4f4f5;
  --surface: #fff;
  --surface-hover: #f4f4f5;
  --surface-elevated: rgba(255, 255, 255, 0.86);
  --border: #dfe1e5;
  --text: #000;
  --text-2: #5f6368;
  --badge-muted: #a8acb2;

  --bubble-in: #fff;
  --bubble-out: #e3fee0;
  --bubble-out-text: #000;
  --time-in: #686c72;
  --time-out: #2e7d32;
  --link-in: #1f73bb;
  --link-out: #1f6f24;
  --bubble-shadow: 0 1px 2px rgba(16, 35, 47, 0.15);

  --service-bg: rgba(52, 86, 50, 0.52);
  --kb-bg: rgba(52, 86, 50, 0.42);
  --kb-bg-hover: rgba(52, 86, 50, 0.58);
  --kb-on: rgba(42, 120, 204, 0.92);

  --wall: linear-gradient(135deg, #dbddbb 0%, #8fb98a 35%, #d5d88d 65%, #88b884 100%);
  --pattern: #000;
  --pattern-opacity: 0.13;
  --wall-text: #0b1f0c;
  --wall-text-2: #1f3a20;

  --window-shadow: 0 24px 60px -18px rgba(16, 35, 47, 0.35), 0 2px 6px rgba(16, 35, 47, 0.08);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 20;
  --z-launcher: 25;
  --z-header: 30;
  --z-assistant: 40;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #8774e1;
  --primary-hover: #7a66d8;
  --primary-ink: #a797f3;
  --page: #121212;
  --band: #181818;
  --surface: #212121;
  --surface-hover: #2c2c2c;
  --surface-elevated: rgba(33, 33, 33, 0.82);
  --border: #2b2b2b;
  --text: #fff;
  --text-2: #aaa;
  --badge-muted: #5b5b5b;

  --bubble-in: #212121;
  --bubble-out: #766ac8;
  --bubble-out-text: #fff;
  --time-in: #aaa;
  --time-out: #ecebff;
  --link-in: #a797f3;
  --link-out: #fff;
  --bubble-shadow: none;

  --service-bg: rgba(38, 38, 42, 0.78);
  --kb-bg: rgba(46, 46, 52, 0.72);
  --kb-bg-hover: rgba(62, 62, 70, 0.82);
  --kb-on: rgba(135, 116, 225, 0.9);

  --wall: #0f0f0f;
  --pattern: linear-gradient(160deg, #6f4ad6 0%, #b24c8d 45%, #4b62c9 100%);
  --pattern-opacity: 0.42;
  --wall-text: #fff;
  --wall-text-2: #c9c9d1;

  --window-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
svg { display: block; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: calc(var(--z-header) + 1);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.noscript { position: fixed; inset: auto 16px 16px; padding: 12px; background: var(--surface); border-radius: 12px; }

/* ------------------------------------------------------------ layout */
.container { width: min(1180px, 100% - 48px); margin: 0 auto; }
.container.narrow { width: min(760px, 100% - 48px); }
.center { text-align: center; }

.section { position: relative; padding: clamp(64px, 9vw, 120px) 0; }
.band { background: var(--band); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
.split.reverse .copy { order: 2; }

.copy { max-width: 540px; }

.pill {
  display: inline-block;
  margin-bottom: 20px;
  padding: 4px 12px;
  border-radius: 14px;
  background: var(--band);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}

h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
h1 .accent { color: var(--primary-ink); }
:root[data-theme="dark"] h1 .accent { color: var(--primary); }

.section h2 {
  font-size: clamp(2rem, 1.35rem + 2.3vw, 3.1rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.lead {
  margin-top: 20px;
  font-size: clamp(1.075rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
}
.center .lead { margin-left: auto; margin-right: auto; }

.facts {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-2);
}
.facts li { position: relative; padding-left: 30px; }
.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
}
.facts li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(0.2em + 4px);
  width: 10px;
  height: 10px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2l2.3 2.3L8.5 2.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2l2.3 2.3L8.5 2.6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.facts b { color: var(--text); font-weight: 600; }

/* ----------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 26px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, transform 150ms var(--ease-out), box-shadow 150ms;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { color: var(--primary-ink); }
:root[data-theme="dark"] .btn-ghost { color: var(--primary); }
.btn-ghost:hover { background: var(--band); }
.btn-sm { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 15px; box-shadow: none; }
.btn-lg { height: 60px; padding: 0 34px; font-size: 17px; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 32px; }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--text-2);
}
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 18px; height: 18px; fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-2);
  transition: background-color 150ms;
}
.icon-btn:hover { background: var(--surface-hover); }
.icon-btn svg, .composer-field svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }

/* ------------------------------------------------------- promo video */
/* Sits right under the hero, which already has bottom padding. */
.video-section { padding-top: 0; }
.promo-video {
  display: block;
  width: min(560px, 100%);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 18px;
  background: var(--wall);
  box-shadow: var(--window-shadow);
}
.video-section .copy { order: 2; } /* after the video: right of it, or under it on phones */

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-elevated);
  backdrop-filter: saturate(1.4) blur(18px);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid var(--border);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1180px, 100% - 32px);
  height: 60px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}
.brand .avatar svg { width: 18px; height: 18px; }
.site-nav { display: flex; gap: 4px; margin-right: 8px; }
.site-nav a {
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}
.site-nav a:hover { background: var(--surface-hover); color: var(--text); }

/* ----------------------------------------------------------- avatars */
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  user-select: none;
}
.avatar-sm { width: 42px; height: 42px; font-size: 16px; }
.avatar-xs { width: 32px; height: 32px; font-size: 13px; }
.avatar .emoji { font-size: 1.3em; line-height: 1; }
.av-red    { background: linear-gradient(#ff885e, #ff516a); }
.av-orange { background: linear-gradient(#ffcd6a, #ffa85c); }
.av-violet { background: linear-gradient(#82b1ff, #665fff); }
.av-green  { background: linear-gradient(#a0de7e, #54cb68); }
.av-cyan   { background: linear-gradient(#53edd6, #28c9b7); }
.av-blue   { background: linear-gradient(#72d5fd, #2a9ef1); }
.av-pink   { background: linear-gradient(#e0a2f3, #d669ed); }

/* ---------------------------------------------------- telegram window */
.tg-window {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--window-shadow);
  isolation: isolate;
}
.tg-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 16px;
  flex: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tg-title { flex: 1; min-width: 0; }
.tg-title h2, .tg-title h3, .tg-title .tg-name {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tg-title p { font-size: 14px; line-height: 1.3; color: var(--text-2); }
.tg-title .tg-name { color: var(--text); }
.tg-title p.typing { color: var(--primary); }
.tg-header-hint {
  flex: none;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--band);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
}

.tg-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: var(--wall);
}

.wallpaper { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wallpaper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--pattern);
  opacity: var(--pattern-opacity);
  -webkit-mask: url("pattern.svg") 0 0 / 420px 420px repeat;
  mask: url("pattern.svg") 0 0 / 420px 420px repeat;
}

.hero { padding: clamp(32px, 4vw, 48px) 0 clamp(64px, 8vw, 104px); }
.connect-window { height: clamp(560px, calc(100dvh - 60px - 96px), 720px); }

.messages {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}
.messages-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100%;
  padding: 12px 16px 8px;
}
.messages-inner.static { padding: 20px 20px 24px; }

/* --- service pills */
.service {
  align-self: center;
  max-width: 90%;
  margin: 10px 0 6px;
  padding: 3px 10px;
  border-radius: 14px;
  background: var(--service-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- "What can this bot do?" card */
.intro-card {
  align-self: center;
  width: min(340px, 100%);
  margin: auto 0;
  padding: 14px 16px 16px;
  border-radius: 15px;
  background: var(--bubble-in);
  box-shadow: var(--bubble-shadow);
  font-size: 15px;
  line-height: 1.35;
}
.intro-card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; text-align: center; }
.intro-card p { margin: 0 0 8px; }
.intro-card ul { margin: 0 0 8px; padding-left: 20px; }
.intro-card li { margin: 2px 0; }
.intro-card p:last-child { margin: 0; }
.intro-hero, .invoice-art {
  display: grid;
  place-items: center;
  height: 108px;
  margin: -2px -4px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff885e, #e1466b 55%, #8774e1);
  color: #fff;
}
.intro-hero svg, .invoice-art svg { width: 56px; height: 56px; }

/* --- message rows & bubbles */
.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: min(480px, 88%);
  margin-top: 2px;
  animation: bubble-in 220ms var(--ease-out);
}
.msg.first { margin-top: 8px; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.msg.wide { width: min(480px, 100%); max-width: 100%; }
.msg.wide .bubble { align-self: stretch; }

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

.bubble {
  position: relative;
  padding: 6px 9px 7px 11px;
  border-radius: 15px;
  background: var(--bubble-in);
  color: var(--text);
  line-height: 1.3125;
  filter: drop-shadow(0 1px 1px rgba(16, 35, 47, 0.12));
  overflow-wrap: anywhere;
  white-space: pre-line;
}
:root[data-theme="dark"] .bubble { filter: none; }
.msg.out .bubble { background: var(--bubble-out); color: var(--bubble-out-text); }

.msg.last .bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 11px;
  height: 20px;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 20'%3E%3Cpath d='M11 0v20H2c-1.4 0-2-1.5-1-2.4C5.5 13.5 9.6 8 11 0z'/%3E%3C/svg%3E") no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 20'%3E%3Cpath d='M11 0v20H2c-1.4 0-2-1.5-1-2.4C5.5 13.5 9.6 8 11 0z'/%3E%3C/svg%3E") no-repeat;
}
.msg.in.last .bubble { border-bottom-left-radius: 0; }
.msg.in.last .bubble::after { left: -9px; }
.msg.out.last .bubble { border-bottom-right-radius: 0; }
.msg.out.last .bubble::after { right: -9px; transform: scaleX(-1); }
.msg.has-kb .bubble { border-bottom-left-radius: 6px; }
.msg.has-kb .bubble::after { display: none; }

.bubble b { font-weight: 600; }
.bubble a, .bubble .fake-link { color: var(--link-in); text-decoration: none; }
.bubble a:hover { text-decoration: underline; }
.msg.out .bubble a { color: var(--link-out); }
.bubble .muted { color: var(--time-in); }
.bubble .step { display: block; margin-bottom: 2px; color: var(--link-in); font-size: 14px; font-weight: 600; }

.time {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  position: relative;
  top: 7px;
  margin-left: 10px;
  font-size: 12px;
  line-height: 1;
  color: var(--time-in);
  white-space: nowrap;
  user-select: none;
}
.msg.out .time { color: var(--time-out); }
.time svg { width: 16px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.summary { display: grid; gap: 6px; margin: 4px 0 2px; white-space: normal; }
.summary-row { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.summary-row .k { display: block; font-size: 13px; color: var(--time-in); }

/* examples feed: bubbles arrive as the window scrolls into view */
.examples-window .messages-inner { min-height: 440px; }
.msg.waiting { display: none; }

/* --- invoice (pricing) */
.invoice { width: min(360px, 100%); }
.invoice .bubble { padding: 6px 6px 10px; white-space: normal; }
.invoice .invoice-art { margin: 0 0 10px; height: 150px; border-radius: 12px; }
.invoice-body { padding: 0 6px; white-space: pre-line; }
.invoice-total { display: block; margin-top: 8px; font-size: 18px; }
.invoice .keyboard { min-width: 0; }

/* --- typing indicator */
.typing-bubble { display: flex; gap: 4px; padding: 13px 14px; }
.typing-bubble i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--time-in);
  animation: typing 1s infinite ease-in-out;
}
.typing-bubble i:nth-child(2) { animation-delay: 150ms; }
.typing-bubble i:nth-child(3) { animation-delay: 300ms; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* --- inline keyboard */
.keyboard {
  display: grid;
  gap: 4px;
  align-self: stretch;
  margin-top: 4px;
  min-width: 240px;
}
.kb-row { display: flex; gap: 4px; }
.kb-row.sticky { position: sticky; bottom: 8px; z-index: 1; }
.kb-row.sticky .kb-btn { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28); }
.kb-label {
  justify-self: center;
  margin: 6px 0 2px;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--service-bg);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kb-label:first-child { margin-top: 0; }
.kb-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--kb-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color 150ms, transform 150ms var(--ease-out), opacity 150ms;
}
.keyboard > .kb-row:last-child .kb-btn:first-child { border-bottom-left-radius: 15px; }
.keyboard > .kb-row:last-child .kb-btn:last-child { border-bottom-right-radius: 15px; }
.kb-btn:hover:not(:disabled) { background: var(--kb-bg-hover); }
.kb-btn:active:not(:disabled) { transform: scale(0.97); }
.kb-btn:disabled { opacity: 0.55; }
.kb-btn[aria-pressed="true"], .kb-btn[aria-pressed="true"]:hover:not(:disabled) { background: var(--kb-on); }
.kb-btn[aria-pressed="true"]::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.kb-btn.primary { background: var(--primary); }
.kb-btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.kb-btn.link::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 6.5l5-5M2.5 1.5h4v4' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath d='M1.5 6.5l5-5M2.5 1.5h4v4' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.kb-btn .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- bottom of the bot window */
.bottom { position: relative; z-index: 2; flex: none; padding: 6px 14px 14px; }

.start-bar {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 2px rgba(16, 35, 47, 0.12);
  transition: background-color 150ms;
}
.start-bar:hover:not(:disabled) { background: var(--surface-hover); }
.start-bar:disabled { color: var(--text-2); }
.start-bar[hidden], .composer[hidden] { display: none; }

.composer { display: flex; align-items: flex-end; gap: 8px; }
.composer-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 16px 0 14px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: 0 1px 2px rgba(16, 35, 47, 0.12);
}
.composer-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 16px; /* 16px stops iOS from zooming on focus */
}
.composer-field input::placeholder { color: var(--text-2); }
.composer-field:focus-within { box-shadow: 0 0 0 2px var(--primary); }
.send-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(16, 35, 47, 0.12);
  transition: background-color 150ms, transform 150ms var(--ease-out);
}
.send-btn:hover { background: var(--primary-hover); }
.send-btn:active { transform: scale(0.94); }
.send-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }

/* --------------------------------------------------------- how steps */
.steps { display: grid; gap: 28px; margin: 36px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}
.steps h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin-top: 2px; }
.steps p { margin-top: 6px; color: var(--text-2); }

/* ------------------------------------------------ wallpaper bands */
.band-wall { background: var(--wall); color: var(--wall-text); overflow: hidden; isolation: isolate; }
.band-wall .container { position: relative; z-index: 1; }
.band-wall .lead { color: var(--wall-text-2); }

.role-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.role-wall .kb-btn { flex: 0 1 auto; min-height: 44px; padding: 10px 16px; border-radius: 12px; font-size: 15px; }

.role-go { margin-top: 32px; }
.role-go:disabled { background: var(--surface); color: var(--text-2); box-shadow: none; opacity: 0.9; }

.final h2 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.5rem); }
.final .btn { margin-top: 36px; }

/* -------------------------------------------------------------- faq */
.tg-list {
  margin-top: 40px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 35, 47, 0.08);
  overflow: hidden;
}
.tg-list details + details { border-top: 1px solid var(--border); }
.tg-list summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background-color 150ms;
}
.tg-list summary::-webkit-details-marker { display: none; }
.tg-list summary:hover { background: var(--surface-hover); }
.tg-list summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-left: auto;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}
.tg-list details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.list-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 17px;
}
.tg-list details p { padding: 0 18px 18px 68px; color: var(--text-2); max-width: 70ch; }

/* ----------------------------------------------------------- footer */
.site-footer { padding: 28px 0 36px; background: var(--page); border-top: 1px solid var(--border); font-size: 14px; color: var(--text-2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* --------------------------------------------------- mobile sticky */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-sticky);
  display: none;
  padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--page) 55%, transparent);
  transition: transform 250ms var(--ease-out), opacity 250ms;
}
.sticky-cta .start-bar { box-shadow: 0 6px 24px rgba(16, 35, 47, 0.22); border: 1px solid var(--border); }
.sticky-cta.away { transform: translateY(110%); opacity: 0; pointer-events: none; }
.sticky-cta:not([hidden]) { gap: 8px; }
.sticky-cta .start-bar { display: flex; align-items: center; justify-content: center; gap: 0.3em; flex: 1; min-width: 0; padding: 0 12px; text-decoration: none; white-space: nowrap; font-size: 14px; }

/* ------------------------------------------------------ first load */
.hero .copy > * { animation: rise 600ms var(--ease-out) both; }
.hero .copy > h1 { animation: none; } /* the headline is the largest paint: show it at once */
.hero .copy > :nth-child(2) { animation-delay: 60ms; }
.hero .copy > :nth-child(3) { animation-delay: 120ms; }
.hero .copy > :nth-child(4) { animation-delay: 180ms; }
.hero .copy > :nth-child(5) { animation-delay: 240ms; }
.connect-window { animation: window-in 800ms 120ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes window-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } }

/* ------------------------------------------------------ responsive */
@media (max-width: 980px) {
  #examples .examples-window { order: -1; } /* stacked: show the example alerts first */
  .site-nav { display: none; }
  .split { grid-template-columns: 1fr; }
  .split.reverse .copy { order: 0; }
  .copy { max-width: 640px; }
  .tg-header-hint { display: none; }
}

@media (max-width: 640px) {
  .container, .container.narrow { width: calc(100% - 32px); }
  .section { padding: 56px 0; }
  .hero { padding-top: 32px; }
  .connect-window { height: min(680px, calc(100dvh - 80px)); margin: 0 -8px; border-radius: 16px; }
  .examples-window, .invoice-window, .assistant-preview { margin: 0 -8px; }
  .messages-inner { padding: 10px 10px 6px; }
  .messages-inner.static { padding: 16px 12px 18px; }
  .bottom { padding: 6px 8px 8px; }
  .msg { max-width: 92%; }
  .keyboard { min-width: 0; }
  .kb-btn { font-size: 13.5px; padding: 8px; }
  .start-bar, .composer-field { height: 50px; }
  .send-btn { width: 50px; height: 50px; }
  .cta-row .btn { flex: 1 1 100%; }
  .trust { flex-direction: column; gap: 8px; }
  .sticky-cta { display: flex; align-items: center; }
  .sticky-cta[hidden] { display: none; }
  .site-footer { padding-bottom: 96px; }
  .role-wall .kb-btn { font-size: 14px; padding: 9px 12px; }
  .tg-list summary { padding: 14px; gap: 12px; }
  .tg-list details p { padding: 0 14px 16px 60px; }
}

/* --------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .typing-bubble i { opacity: 0.7; }
}

/* ================================================== v3: language switch */
.lang-switch {
  display: flex;
  padding: 3px;
  border-radius: 12px;
  background: var(--band);
}
.lang-switch a {
  padding: 5px 9px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 150ms, color 150ms;
}
.lang-switch a:hover { color: var(--text); }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 35, 47, 0.12); }

/* ===================================================== v3: setup card */
.connect-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
}
.connect-body > .service { margin: 8px 0 4px; }
.connect-body > .service:first-child { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chips-2 { display: grid; grid-template-columns: 1fr 1fr; }
.chip { flex: 0 1 auto; min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.chips-2 .chip { width: 100%; }
.chip-more { background: transparent; border: 1.5px dashed rgba(255, 255, 255, 0.7); backdrop-filter: none; -webkit-backdrop-filter: none; }
:root:not([data-theme="dark"]) .chip-more { color: #1d3a1f; border-color: rgba(29, 58, 31, 0.45); }

.card-field {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  padding: 10px 14px 12px;
  border-radius: 14px;
  background: var(--bubble-in);
  box-shadow: var(--bubble-shadow);
  cursor: text;
}
.card-field-label { font-size: 13px; color: var(--time-in); }
.card-field-label .req { color: var(--link-in); font-weight: 600; }
.card-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 16px;
}
.card-field input::placeholder { color: var(--text-2); }
.card-field:focus-within { box-shadow: 0 0 0 2px var(--primary); }

.card-notice {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bubble-in);
  box-shadow: var(--bubble-shadow);
  font-size: 15px;
  line-height: 1.4;
}
.card-notice.warn { box-shadow: inset 0 0 0 1.5px #e5534b, var(--bubble-shadow); }
.card-notice.ok { box-shadow: inset 0 0 0 1.5px #3fb950, var(--bubble-shadow); }

.connect-footer { position: relative; z-index: 2; flex: none; padding: 8px 14px 14px; }
.connect-footer:empty { display: none; }
.connect-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent), 0 1px 2px rgba(16, 35, 47, 0.15);
  transition: background-color 150ms, transform 150ms var(--ease-out);
}
.connect-btn:hover:not(:disabled) { background: var(--primary-hover); }
.connect-btn:active:not(:disabled) { transform: scale(0.98); }
.connect-btn:disabled { opacity: 0.85; }
.connect-note {
  margin: 8px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 2px 10px;
  border-radius: 12px;
  background: var(--service-bg);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.spinner {
  width: 18px; height: 18px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.spinner.big { width: 34px; height: 34px; margin: 4px auto 12px; border-color: var(--border); border-top-color: var(--primary); border-width: 3px; }

.connect-skeleton { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 32px; }
.connect-skeleton span { width: 42%; height: 40px; border-radius: 10px; background: var(--kb-bg); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.5; } }

/* --- activation */
.card-center { display: flex; flex: 1; align-items: center; justify-content: center; padding: 6px 0; }
.ready-card {
  width: min(380px, 100%);
  padding: 20px 20px 18px;
  border-radius: 18px;
  background: var(--bubble-in);
  box-shadow: var(--bubble-shadow);
  text-align: center;
  line-height: 1.45;
}
.ready-card h3 { margin: 6px 0 8px; font-size: 20px; font-weight: 700; }
.ready-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(#37aee2, #1e96c8);
  color: #fff;
}
.ready-icon svg { width: 34px; height: 34px; margin-left: -3px; }
.ready-steps { margin: 0 0 16px; text-align: left; white-space: pre-line; font-size: 15px; }
.ready-lead { margin: 0 0 16px; color: var(--text-2); }
.ready-open { width: 100%; }
.ready-open svg { width: 20px; height: 20px; }
.ready-row { display: flex; gap: 8px; margin-top: 8px; }
.ready-row .btn { flex: 1; }
.btn-soft { height: 44px; padding: 0 14px; border-radius: 12px; background: var(--band); color: var(--text); font-size: 14px; font-weight: 600; }
.btn-soft:hover { background: var(--surface-hover); filter: brightness(0.97); }
.ready-qr { margin: 16px 0 0; }
.ready-qr .qr { width: 148px; height: 148px; margin: 0 auto; padding: 6px; border-radius: 12px; background: #fff; }
.ready-qr .qr svg { width: 100%; height: 100%; }
.ready-qr figcaption { margin-top: 6px; font-size: 13px; color: var(--text-2); }
.ready-manual { margin: 14px 0 6px; font-size: 13px; color: var(--text-2); }
.ready-command {
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--band);
  cursor: copy;
  overflow-wrap: anywhere;
}
.ready-command code { font: 500 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); }
.ready-actions { display: flex; gap: 6px; }
.ready-actions .kb-btn { border-radius: 12px; }

/* ================================================== v3: chat assistant */
.assistant-preview {
  display: flex;
  width: 100%;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 250ms var(--ease-out), box-shadow 250ms;
}
.assistant-preview:hover { transform: translateY(-3px); }
.assistant-preview .tg-header, .assistant-preview .tg-body { display: flex; }
.assistant-preview .tg-body { min-height: 360px; }
.assistant-preview .tg-title { display: flex; flex-direction: column; }
.assistant-preview .tg-title .h { font-size: 16px; font-weight: 500; }
.assistant-preview .tg-title .p { font-size: 14px; color: var(--text-2); }
.assistant-preview .messages-inner, .assistant-preview .msg, .assistant-preview .keyboard { display: flex; }
.assistant-preview .bubble, .assistant-preview .kb-row { display: block; }
.assistant-preview .kb-row { display: flex; }
.assistant-preview .msg { flex-direction: column; }
.assistant-preview .keyboard { flex-direction: column; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.assistant-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-launcher);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px 6px 6px;
  border-radius: 32px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(16, 35, 47, 0.4), 0 0 0 1px var(--border);
  transition: transform 200ms var(--ease-out), box-shadow 200ms;
}
.assistant-launcher:hover { transform: translateY(-2px); }
.assistant-launcher .avatar { width: 46px; height: 46px; }
.assistant-launcher .avatar svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.assistant-launcher .icon-close { display: none; stroke-width: 2.4; }
.assistant-open .assistant-launcher .icon-chat { display: none; }
.assistant-open .assistant-launcher .icon-close { display: block; }

.assistant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-assistant);
  bottom: 92px; /* above the launcher, which stays visible as the close toggle */
  width: min(400px, calc(100vw - 40px));
  height: min(640px, calc(100dvh - 176px));
  transform-origin: bottom right;
  animation: assistant-in 260ms var(--ease-out);
}
.assistant[hidden] { display: none; }
@keyframes assistant-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
.assistant .messages-inner { padding: 10px 12px 6px; }
.assistant .bottom { padding: 6px 10px 10px; }
.assistant .composer-field, .assistant .send-btn { height: 48px; }
.assistant .send-btn { width: 48px; }
.assistant .msg { max-width: 92%; }
.assistant .keyboard { min-width: 0; }

/* ======================================================== v3: blog */
.blog .section { padding: clamp(40px, 6vw, 72px) 0; }
.blog-head { background: var(--band); }
.blog h1 {
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.crumbs { margin-bottom: 16px; font-size: 14px; color: var(--text-2); }
.crumbs a { color: var(--primary-ink); text-decoration: none; }
:root[data-theme="dark"] .crumbs a { color: var(--primary); }
.crumbs a:hover { text-decoration: underline; }

.blog-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.post-card {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border-radius: 16px;
  text-decoration: none;
  transition: background-color 150ms;
}
.post-card:hover { background: var(--band); }
.post-meta { font-size: 14px; color: var(--text-2); }
.post-title { font-size: 1.3rem; font-weight: 650; line-height: 1.3; text-wrap: balance; }
.post-card:hover .post-title { color: var(--primary-ink); }
:root[data-theme="dark"] .post-card:hover .post-title { color: var(--primary); }
.post-desc { color: var(--text-2); }

.article h1 { margin-bottom: 12px; }
.article .post-meta { margin-bottom: 28px; }
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 1.9em; font-size: 1.55rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.prose h3 { margin-top: 1.5em; font-size: 1.2rem; font-weight: 650; line-height: 1.3; }
.prose p, .prose li { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose a { color: var(--primary-ink); text-underline-offset: 3px; }
:root[data-theme="dark"] .prose a { color: var(--primary); }
.prose strong { font-weight: 650; }
.prose code { padding: 1px 5px; border-radius: 5px; background: var(--band); font-size: 0.9em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; color: var(--text-2); box-shadow: inset 3px 0 0 var(--border); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.prose th { font-weight: 650; }

.article-cta { margin-top: 48px; border-radius: 20px; overflow: hidden; isolation: isolate; box-shadow: var(--window-shadow); }
.article-cta .tg-body { padding: 0; }
.article-cta-inner { position: relative; z-index: 1; display: grid; gap: 10px; justify-items: start; padding: 28px; color: var(--wall-text); }
.article-cta-h { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.015em; }
.article-cta-inner p:not(.article-cta-h) { color: var(--wall-text-2); }
.article-cta .btn { margin-top: 6px; }

.more-posts { margin-top: 48px; }
.more-posts h2 { font-size: 1.3rem; font-weight: 700; }
.more-posts ul { margin: 14px 0 12px; padding: 0; list-style: none; display: grid; gap: 2px; }
.more-posts li a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; font-weight: 500; }
.more-posts li a:hover { color: var(--primary-ink); }
.more-posts .btn { padding: 0 12px; margin-left: -12px; }
.more-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.more-links .btn { margin-left: 0; }
.more-links .btn:first-child { margin-left: -12px; }

.topic-nav { margin-top: 28px; }
.topic-nav ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 150ms, color 150ms;
}
.topic-chip:hover { border-color: var(--primary-ink); color: var(--primary-ink); }
.topic-chip[aria-current="page"] { border-color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--primary-ink); color: var(--primary-ink); font-weight: 650; }
:root[data-theme="dark"] .topic-chip:hover,
:root[data-theme="dark"] .topic-chip[aria-current="page"] { border-color: var(--primary); color: var(--primary); }
:root[data-theme="dark"] .topic-chip[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--primary); }
.topic-count { font-size: 13px; font-weight: 400; color: var(--text-2); }

.section .blog-list-title { margin-bottom: 12px; font-size: 1.3rem; letter-spacing: -0.01em; }

.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 40px; }
.pager ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pager ol a {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
}
.pager ol a:hover { background: var(--band); }
.pager ol a[aria-current="page"] { background: var(--band); color: var(--primary-ink); font-weight: 700; }
:root[data-theme="dark"] .pager ol a[aria-current="page"] { color: var(--primary); }

.not-found { min-height: 60vh; display: grid; align-items: center; }
.site-footer { padding-bottom: 96px; } /* room for the chat launcher */
.blog-list { margin: 0 -22px; }
.nf-code { font-size: clamp(4rem, 3rem + 5vw, 6rem); font-weight: 800; letter-spacing: -0.04em; color: var(--primary-ink); line-height: 1; margin-bottom: 12px; }
.not-found .btn { margin-top: 28px; }

/* ================================================== v3: responsive */
@media (max-width: 980px) {
  .header-cta { display: none; }
}
@media (max-width: 640px) {
  .site-header-inner { gap: 8px; }
  .lang-switch a { padding: 5px 7px; }
  .chips-2 { grid-template-columns: 1fr; }
  .chip { font-size: 13.5px; padding: 8px 10px; }
  /* Phones: a round button beside the START bar; the chat panel stops above it. */
  .assistant-launcher { right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); padding: 4px; }
  .assistant-launcher .avatar { width: 46px; height: 46px; }
  .assistant-launcher-label { display: none; }
  .sticky-cta { padding-right: 76px; }
  .assistant { top: 0; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); width: 100%; height: auto; border-radius: 0 0 18px 18px; }
  .assistant-open { overflow: hidden; }
  .assistant-open .sticky-cta { display: none; }
  .ready-card { padding: 18px 16px 16px; }
  .prose { font-size: 1.05rem; }
  .post-card { padding: 16px 4px; }
  .blog-list { margin: 0; }
  .article-cta-inner { padding: 22px; }
  .topic-nav { margin-top: 22px; }
  .topic-nav ul { gap: 6px; }
  .topic-chip { padding: 7px 12px; font-size: 14px; }
  .topic-count { display: none; }
  .pager ol { order: -1; flex-basis: 100%; justify-content: center; }
}

/* ============================================ phones: sheets, calm page */
.sheet-close { display: none; }
@media (max-width: 640px) {
  /* The hero is just the pitch and "Connect bot"; setup opens as a full-screen sheet. */
  .hero .split { gap: 0; }
  .connect-window { display: none; }
  .setup-open .connect-window {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: var(--z-assistant);
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    animation: sheet-in 260ms var(--ease-out);
  }
  .setup-open .sheet-close { display: grid; margin-right: -6px; }
  .setup-open .connect-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }

  /* The chat assistant fills the screen; its × closes it. */
  .assistant {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    animation: sheet-in 260ms var(--ease-out);
  }
  .assistant .bottom { padding-bottom: max(10px, env(safe-area-inset-bottom)); }

  .setup-open, .assistant-open { overflow: hidden; }
  .setup-open .assistant-launcher, .assistant-open .assistant-launcher,
  .setup-open .sticky-cta, .assistant-open .sticky-cta { display: none; }

  /* Less noise: role picking lives in the setup sheet. */
  #roles { display: none; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } }
