/* One style sheet for both directions: only logical properties (inline-start, inline-end), no left or right. */
@font-face {
  font-family: Vazirmatn;
  src: url("/fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* CLI-35: light by default in this file; dark when the device asks for it, or when the visitor chose it (data-theme on <html>).
   Neutral greys and one green, after ngrok (owner, 2026-11-18). */
:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #fff;
  --text: #16181d;
  --muted: #5b6470;
  --line: #e2e5e9;
  --brand: #0b7a61;
  --on-brand: #fff;
  --mine: #dcf2ea;
  --danger: #b3261e;
  --accent: #a8620a;
  --brand-soft: #e0f3ec;
  --code-bg: #14181a;
  --code-text: #d7f5ea;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(0 0 0 / .06);
  --rainbow: #6aa514, #0b9a78, #2f7fd0, #8a5bd6, #d0558c;
  --glow: .16;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --space-s: 8px;
  --space-m: 16px;
  --space-l: 32px;
  --space-xl: 64px;
  --text-hero: clamp(28px, 5vw, 46px);
  --text-title: clamp(22px, 3.2vw, 30px);
  --page-width: 1080px;
  --mono: ui-monospace, monospace;
  --tracking: .12em;
}
:lang(fa) { --mono: Vazirmatn, system-ui, sans-serif; --tracking: 0; }

/* The same dark values twice: once for "like the device", once for the visitor's choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141716;
    --surface: #1c201f;
    --text: #f1f4f2;
    --muted: #a3aeaa;
    --line: #2f3533;
    --brand: #3fd0a8;
    --on-brand: #06231c;
    --mine: #1f4037;
    --danger: #ff8a80;
    --accent: #f2b45a;
    --brand-soft: #173a31;
    --code-bg: #0e1110;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
    --rainbow: #c6e05a, #3fd0a8, #5aa9f2, #b78af2, #f28ab2;
    --glow: .28;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141716;
  --surface: #1c201f;
  --text: #f1f4f2;
  --muted: #a3aeaa;
  --line: #2f3533;
  --brand: #3fd0a8;
  --on-brand: #06231c;
  --mine: #1f4037;
  --danger: #ff8a80;
  --accent: #f2b45a;
  --brand-soft: #173a31;
  --code-bg: #0e1110;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
  --rainbow: #c6e05a, #3fd0a8, #5aa9f2, #b78af2, #f28ab2;
  --glow: .28;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 Vazirmatn, system-ui, sans-serif;
}

body.offline::before {
  content: attr(data-connecting);
  display: block;
  padding: 2px 12px;
  background: var(--muted);
  color: var(--bg);
  font-size: 13px;
  text-align: center;
}

[hidden] { display: none !important; }

/* Scrollbars stay on the right edge of the window, also in Persian (owner, 2026-11-18): the root is left to right for
   the browser, and the page inside it follows the language. */
html[dir="rtl"] { direction: ltr; }
html[dir="rtl"] body { direction: rtl; }

/* App screens: a 608px column, but the main is as wide as the window, so the scroller (and its scrollbar) reaches the edge. */
main {
  /* vw, not %: the value is used again by the children, where % would mean something else. */
  --gutter: max(16px, calc((100vw - 608px) / 2));
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100dvh;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
}

body.offline main { height: calc(100dvh - 28px); }

header {
  display: flex;
  align-items: center;
  gap: 12px;
}

h1 { flex: 1; margin: 0; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
h2 { margin: 0; font-size: 16px; }
p { margin: 0; }

.note { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; }
.error:empty { display: none; }

input, textarea, button { font: inherit; color: inherit; }

input, textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

textarea { resize: none; max-height: 30dvh; field-sizing: content; }

button {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

button:disabled { opacity: .6; cursor: default; }
button.primary { border-color: var(--brand); background: var(--brand); color: var(--on-brand); font-weight: 600; }
button.link { min-height: 0; padding: 4px 6px; border: 0; background: none; color: var(--brand); }

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

.row { display: flex; gap: 8px; }
.row > button { flex: none; }

/* Login */
.login { justify-content: center; align-items: center; }
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.card button { margin-block-start: 8px; }
.card button.link { align-self: flex-start; margin: 0; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
/* CLI-36: one card like ngrok: the name above, GitHub, "or", the form, the other ways at the bottom. */
.login .brand { flex: none; font-size: 32px; font-weight: 800; text-align: center; }
.login .card { gap: 12px; padding: 24px; }
.login .card-body { display: flex; flex-direction: column; gap: 12px; }
.login .card form { display: flex; flex-direction: column; gap: 8px; }
.login .card > .links { justify-content: center; margin-inline: -24px; padding: 12px 24px 0; border-top: 1px solid var(--line); }
.login .card > .links button.link { align-self: center; }
.login a.button.github { gap: 10px; min-height: 44px; border-radius: 10px; background: var(--surface); font-weight: 600; }
.login a.button.github svg { width: 20px; height: 20px; flex: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.scroller > .card { max-width: none; flex: none; }

/* Bot list */
.bots { margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.bots a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-block-end: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.bots span { color: var(--muted); }

/* Chat */
.scroller { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
/* A list that scrolls under the column reaches the window edges, so its scrollbar sits at the right edge.
   It is left to right only for its scrollbar; what is inside follows the language. */
main > .scroller, main > .bots { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
[dir="rtl"] main > .scroller, [dir="rtl"] main > .bots { direction: ltr; }
[dir="rtl"] main > .scroller > *, [dir="rtl"] main > .bots > * { direction: rtl; }
.messages { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.messages li {
  align-self: flex-start;
  max-width: 85%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-end-start-radius: 4px;
  background: var(--surface);
}
.messages li.user {
  align-self: flex-end;
  border-color: transparent;
  border-radius: 14px;
  border-end-end-radius: 4px;
  background: var(--mine);
}
.messages p { white-space: pre-wrap; overflow-wrap: anywhere; }
.messages time { display: block; color: var(--muted); font-size: 11px; text-align: end; }

.keyboard { display: flex; flex-direction: column; gap: 6px; max-height: 40dvh; overflow-y: auto; }
.keyboard:empty { display: none; }
.keyboard .row > button { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.start { align-self: stretch; }

/* Rich messages (CLI-13 to CLI-17) */
.note:empty { display: none; }
.pinned {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.messages li { display: flex; flex-direction: column; gap: 6px; }
.messages img, .messages video { max-width: 100%; max-height: 50dvh; border-radius: 10px; }
.messages audio { max-width: 100%; }
.messages a { color: var(--brand); overflow-wrap: anywhere; }
.row.inline > button, .row.inline > a.button { flex: 1; min-width: 0; min-height: 36px; padding: 4px 8px; overflow-wrap: anywhere; }
a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
}
form.row > button:not(.primary) { padding: 8px 10px; }

/* Presence and push (CLI-18 to CLI-21) */
.bots strong { flex: 1; }
.bots a { align-items: center; }
.bots .badge {
  min-width: 24px;
  padding: 0 8px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 13px;
  line-height: 24px;
  text-align: center;
  display: inline-grid;
  place-items: center;
  height: 24px;
}
.chat .status { margin-block-start: -10px; }

/* Builder and admin screens (CLI-23 to CLI-25) */
.column { display: flex; flex-direction: column; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.badge.danger { background: var(--danger); color: var(--on-brand); }
.bots .line { display: flex; flex: 1; align-items: center; gap: 8px; flex-wrap: wrap; }
.bots li > .note { padding-inline: 12px; }
.token code, .log code { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.token code { padding: 8px; border-radius: 8px; background: var(--bg); user-select: all; }
.tabs { margin-block: 4px; }
.tabs button { min-height: 36px; padding: 4px 10px; }
.setting { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: 6px; border-top: 1px solid var(--line); }
.setting label { flex: 1 1 100%; overflow-wrap: anywhere; font-size: 14px; }
.setting input, .setting select { flex: 1; width: auto; padding: 6px 10px; }
.setting .badge { margin-inline-start: 6px; padding: 0 6px; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-size: 11px; }
.card .setting button { flex: none; margin: 0; min-height: 36px; padding: 4px 10px; }
.log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
select { font: inherit; color: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: transparent; }
/* Public pages (CLI-26 to CLI-28) and the showcase parts (CLI-29) follow the theme (CLI-35).
   The document itself scrolls; the header stays on top. */
main.public { --gutter: max(16px, calc((100vw - var(--page-width)) / 2)); height: auto; min-height: 100dvh; padding-block-end: 0; overflow-x: clip; }
body.offline main.public { height: auto; }
main.public > .scroller { flex: none; overflow: visible; }
main.public > header.site { position: sticky; top: 0; margin-block-start: -12px; padding-block: 12px; background: var(--bg); }
.label { font: 600 12px/1.6 var(--mono); letter-spacing: var(--tracking); text-transform: uppercase; color: var(--muted); }
.soon { padding: 0 6px; border-radius: 6px; background: rgb(242 180 90 / .15); color: var(--accent); font: 600 11px/1.7 var(--mono); letter-spacing: 0; }
:lang(en) .public h2 { font-family: ui-serif, Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.01em; }
:lang(fa) .public h2 { font-weight: 800; }

/* Header and the "Problems we solve" menu */
header.site { position: relative; z-index: 2; flex-wrap: wrap; gap: var(--space-s) var(--space-m); }
header.site h1 { flex: 0 0 auto; font-size: 22px; overflow: visible; }
header.site h1 a { display: inline-flex; align-items: center; gap: var(--space-s); color: var(--text); text-decoration: none; }
header.site .links { flex: 1; align-items: center; justify-content: flex-start; gap: 2px; }
/* Every item of the top bar has the same box, so the words sit on one line (owner, 2026-11-18: "the texts are not aligned"). */
header.site .links a, header.site .links button.link, .menu summary {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 14px; line-height: 1;
}
header.site .links a:hover, header.site .links button.link:hover, .menu summary:hover { background: var(--surface); }
header.site > button.primary { border-radius: 999px; }
.links a, .links button.link { color: var(--muted); text-decoration: none; font-size: 14px; }
.links a:hover, .links button.link:hover { color: var(--text); }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-s); background: var(--brand); color: var(--on-brand); }
.mark .icon { width: 22px; height: 22px; }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu summary { cursor: pointer; color: var(--muted); list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: "▾"; margin-inline-start: 6px; font-size: 11px; }
.menu[open] summary { color: var(--text); }
.menu .panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: var(--space-m);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  box-shadow: var(--shadow);
}
@media (min-width: 760px) { .menu .panel { grid-template-columns: repeat(3, 1fr); } }
.menu .item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--radius-s); color: var(--text); text-decoration: none; }
.menu a.item:hover { background: var(--bg); }
.menu .item strong, .product > .label, footer.site .column > span { display: inline-flex; align-items: center; gap: 8px; }
.menu .item small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.menu .item.off { opacity: .7; }
/* On a phone the menu gives its place to the login button (owner, 2026-11-18). */
@media (max-width: 640px) { header.site .links { order: 3; flex-basis: 100%; } header.site h1 { flex: 1; } header.site .menu { display: none; } }

/* Layout */
.page { gap: var(--space-xl); }
.page .content { display: flex; flex-direction: column; gap: var(--space-m); }
.page:has(.hero) .content { gap: calc(var(--space-xl) * 1.5); }
.page .content:not(:has(.hero)) { width: 100%; max-width: 760px; padding-block-start: var(--space-m); }
.page .content > .card { max-width: none; flex: none; }
.page .content > .bots { flex: none; overflow: visible; }
.page h2.title { font-size: var(--text-title); }
.page ol { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 8px; }
.page p { color: var(--muted); }
.page h3 { margin: 0; font-size: 18px; }
a.button { min-height: 44px; padding: 8px 18px; border-radius: 999px; color: var(--text); background: transparent; }
.public button.primary { border-radius: 999px; }
a.button:hover, .public button:hover { border-color: var(--brand); }

/* Glow behind the hero and the closing call: CSS only, nothing loaded (rule 7). */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: "";
  position: absolute;
  inset: 10% 15%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 90deg, #3fd0a8, #5aa9f2, #b78af2, #f28ab2, #f2b45a, #c6e05a, #3fd0a8);
  filter: blur(90px);
  opacity: var(--glow);
}
.rainbow {
  background: linear-gradient(90deg, var(--rainbow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:lang(fa) .rainbow { background-image: linear-gradient(270deg, var(--rainbow)); }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); padding-block: var(--space-xl) var(--space-l); text-align: center; }
.hero h2 { font-size: clamp(32px, 6.4vw, 64px); line-height: 1.3; }
.hero .lead { max-width: 560px; font-size: 18px; }
.hero .row, .cta .row { justify-content: center; }
.hero button.primary, .cta button.primary { padding-inline: 24px; background: var(--text); border-color: var(--text); color: var(--bg); box-shadow: 0 0 24px rgb(63 208 168 / .35); }

/* Product cards with a traffic picture */
.products { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); }
.products .cards { display: grid; gap: var(--space-m); width: 100%; }
@media (min-width: 880px) { .products .cards { grid-template-columns: 1fr 1fr; } }
.product { display: flex; flex-direction: column; align-items: center; gap: var(--space-s); padding: var(--space-l) var(--space-m); border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); text-align: center; }
.product h3 { font-size: 22px; }
.product > .label { color: var(--brand); }
.soon-card > .label { color: var(--accent); }
.badge-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-s); background: var(--brand-soft); color: var(--brand); }
.soon-card .badge-icon { background: rgb(242 180 90 / .12); color: var(--accent); }
.traffic { display: flex; flex-direction: column; align-items: center; margin: var(--space-m) 0 0; width: 100%; }
.tag { padding: 2px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: 13px/1.7 var(--mono); color: var(--text); }
.wire { position: relative; width: 0; height: 32px; border-inline-start: 2px dashed var(--brand); }
.soon-card .wire { border-color: var(--accent); }
/* The dot moves down from the users and up from your computer: the computer only calls out. */
.wire::after { content: ""; position: absolute; inset-inline-start: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: down 1.4s linear infinite; }
.wire.up::after { animation-name: up; }
.soon-card .wire::after { background: var(--accent); }
@keyframes down { from { top: 0; opacity: 0; } 30% { opacity: 1; } to { top: calc(100% - 8px); opacity: 1; } }
@keyframes up { from { top: calc(100% - 8px); opacity: 0; } 30% { opacity: 1; } to { top: 0; opacity: 1; } }
/* The traffic splits in two below Dalan (owner, 2026-11-18), like ngrok's gateway picture. */
.split { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; padding-block-end: 22px; }
.split::before { content: ""; position: absolute; top: 0; inset-inline: 25%; border-block-start: 2px dashed var(--brand); }
.soon-card .split::before { border-color: var(--accent); }
.split::after { content: ""; position: absolute; inset-inline: 0; bottom: 8px; height: 76px; border: 1px solid var(--brand-soft); border-radius: 14px; pointer-events: none; }
.soon-card .split::after { border-color: rgb(242 180 90 / .2); }
.branch { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.branch .box { position: relative; z-index: 1; max-width: 100%; padding: 8px 10px; font-size: 12px; }
.frame-label { margin-block-start: -20px; padding: 0 8px; background: var(--surface); color: var(--muted); font: 12px/1.6 var(--mono); position: relative; z-index: 1; }
.hub { animation: pulse 2.4s ease-out infinite; }
.soon-card .hub { animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(63 208 168 / .45); } 70% { box-shadow: 0 0 0 14px rgb(63 208 168 / 0); } 100% { box-shadow: 0 0 0 0 rgb(63 208 168 / 0); } }
@media (prefers-reduced-motion: reduce) { .wire::after { animation: none; top: 10px; } .hub { animation: none; } }
.hub-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-m); width: 100%; }
.hub { grid-column: 2; display: grid; place-items: center; width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 50%; background: var(--bg); color: var(--text); box-shadow: 0 0 0 6px var(--brand-soft); }
.hub .icon { width: 34px; height: 34px; }
.guards { grid-column: 3; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; font: 12px/1.5 var(--mono); color: var(--muted); text-align: start; }
.guards li { display: flex; align-items: flex-start; gap: 6px; }
.guards li .icon { margin-block-start: 2px; }
.guards .icon { width: 14px; height: 14px; color: var(--brand); }
.soon-card .guards .icon { color: var(--accent); }
.box { display: flex; align-items: center; gap: var(--space-s); padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); font: 13px/1.6 var(--mono); }
.box .icon { color: var(--brand); }

/* "Try it right now" with tabs per system */
.framed { position: relative; }
.try { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); text-align: center; }
.offers { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); text-align: center; }
.offers > .label { color: var(--brand); }
.offers h2 { font-size: var(--text-title); }
.offers .groups { display: grid; gap: var(--space-m); width: 100%; text-align: start; }
@media (min-width: 880px) { .offers .groups { grid-template-columns: 1fr 1fr; } }
.offers article { display: flex; flex-direction: column; gap: var(--space-s); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.offers ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.offers li { display: flex; align-items: flex-start; gap: var(--space-s); }
.offers li .icon { flex: none; width: 20px; height: 20px; color: var(--brand); }
.offers .soon-card li .icon { color: var(--accent); }
.offers li .soon { margin-inline-start: auto; flex: none; align-self: center; }
.try h2, .band h2, .security h2 { font-size: var(--text-title); }
.try > .label { color: var(--brand); }
.os-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.os-tabs button { min-height: 36px; padding: 4px 14px; border-radius: 999px; background: transparent; color: var(--muted); font: 13px/1.6 var(--mono); }
.os-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); border-color: var(--brand); }
.command { width: 100%; max-width: 680px; }
.try .note { max-width: 560px; }

/* Steps */
.band { display: flex; flex-direction: column; gap: var(--space-m); }
ol.steps { display: grid; gap: var(--space-m); margin: 0; padding: 0; list-style: none; }
@media (min-width: 880px) { ol.steps { grid-template-columns: repeat(3, 1fr); } }
.step { display: flex; flex-direction: column; gap: var(--space-s); min-width: 0; padding: var(--space-m) 20px 20px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.code { position: relative; margin-block-start: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--code-bg); color: var(--code-text); }
.code pre { margin: 0; padding: 40px 14px 14px; overflow-x: auto; font: 13px/1.7 ui-monospace, monospace; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.code button.copy { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; min-height: 28px; padding: 2px 10px; border-color: transparent; background: rgb(255 255 255 / .08); color: var(--code-text); font-size: 12px; }

/* Features: the three messages of DESIGN section 13 */
.features { display: grid; gap: var(--space-m); }
@media (min-width: 880px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features article { display: flex; flex-direction: column; gap: var(--space-s); padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-m); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.features .bubble { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--bg); color: var(--brand); }

/* Security list */
.security { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); text-align: center; }
.security ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px var(--space-l); width: 100%; margin: 0; padding: 0; list-style: none; text-align: start; }
.security li { display: flex; align-items: flex-start; gap: var(--space-s); line-height: 1.5; }
.security li .icon { width: 20px; height: 20px; margin-block-start: 2px; color: var(--brand); }
.security a.more { color: var(--brand); font: 600 13px/1.6 var(--mono); letter-spacing: var(--tracking); text-transform: uppercase; text-decoration: none; }

/* Closing call and footer */
.cta { display: flex; flex-direction: column; align-items: center; gap: var(--space-m); padding: var(--space-xl) var(--space-m); text-align: center; }
.cta h2 { font-size: clamp(30px, 5vw, 52px); line-height: 1.3; }
footer.site { position: relative; display: flex; flex-direction: column; gap: var(--space-l); padding-block: var(--space-l) 0; border-block-start: 1px solid var(--line); overflow: hidden; }
footer.site .columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-l); }
footer.site .column { gap: 6px; font: 14px/1.8 var(--mono); color: var(--muted); }
footer.site .column .label { color: var(--text); margin-block-end: 4px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }
.wordmark { margin-block-end: -.32em; font-size: clamp(90px, 22vw, 240px); font-weight: 900; line-height: 1; color: color-mix(in srgb, var(--text) 6%, var(--bg)); text-align: end; user-select: none; }
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand);
  color: var(--on-brand);
  font-weight: 700;
}
.showcase a { justify-content: flex-start; align-items: flex-start; }
.bots .avatar { color: var(--on-brand); }
.showcase .column { gap: 0; min-width: 0; overflow-wrap: anywhere; }
.line { display: flex; align-items: center; gap: 8px; }
.showcase-form textarea { min-height: 80px; }
.showcase-form { padding-inline: 12px; padding-block-end: 8px; }
.showcase-form summary { cursor: pointer; color: var(--brand); font-size: 14px; }
.scroller > .bots { flex: none; overflow: visible; }
:lang(fa) .page ol:not(.steps) { list-style-type: persian; }

/* CLI-35: the theme button, round, in the top bar of the site and of the bot list. */
button.theme { display: grid; place-items: center; flex: none; width: 36px; min-height: 36px; height: 36px; padding: 0; border-radius: 50%; background: transparent; color: var(--muted); }
button.theme:hover { color: var(--text); border-color: var(--brand); }
button.theme .icon { width: 18px; height: 18px; }
/* The menu and the links read as one row: the same space between all of them. */
@media (min-width: 641px) { header.site .menu + .links { margin-inline-start: calc(2px - var(--space-m)); } }
