/* kaikichat.com: the look of the Kaiki Chat app. Monochrome, monospace,
   dark unless the visitor's system prefers light. No web fonts: nothing is
   loaded from elsewhere. */
:root {
  --bg: #0a0a0a; --surface: #0f0f0f; --raised: #151515; --line: #242424;
  --text: #d6d6d6; --strong: #f2f2f2; --muted: #8d8d8d; --faint: #5a5a5a;
  --on-strong: #0a0a0a;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f5f5; --surface: #efefef; --raised: #e8e8e8; --line: #d6d6d6;
    --text: #2c2c2c; --strong: #0d0d0d; --muted: #6b6b6b; --faint: #a5a5a5;
    --on-strong: #f5f5f5;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.7 "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { width: min(100% - 32px, 980px); margin: 0 auto; }

/* Header: the brand as in the app's sidebar. */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark { font-size: 25px; font-weight: 700; letter-spacing: -3px; color: var(--strong); }
.mark span { color: var(--faint); margin: 0 2px; }
.brand b { display: block; color: var(--strong); font-size: 15px; letter-spacing: -.2px; }
.brand small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 12px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--strong); }
.nav .github { display: inline-flex; align-items: center; gap: 7px; }
.nav .github svg { display: block; }
.lang select { font: inherit; font-size: 11px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; cursor: pointer; }
.lang select:hover { border-color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Hero: the first screen of the app's onboarding. */
.hero { padding: 72px 0 88px; max-width: 720px; }
.demo { margin: -32px 0 72px; }
.demo img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #0a0a0a; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
h1 { color: var(--strong); font-size: clamp(30px, 5.2vw, 46px); line-height: 1.18; letter-spacing: -1px; font-weight: 700; margin: 18px 0 20px; text-wrap: balance; }
.lead { font-size: 15px; color: var(--muted); max-width: 640px; margin: 0 0 32px; }
.flow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 36px; font-size: 12px; }
.flow span { padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--text); background: var(--surface); }
.flow span.agent { border-style: dashed; color: var(--strong); }
.flow i { font-style: normal; color: var(--faint); }
.flow span.agent.mine { border: 1px solid var(--strong); border-style: solid; color: var(--strong); font-weight: 700; }
.flow .friends { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 10px 8px; border: 1px dashed var(--line); border-radius: 6px; background: none; }
.flow .friends small { flex-basis: 100%; font-size: 10px; color: var(--muted); letter-spacing: .4px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-block; padding: 13px 20px; border-radius: 4px; font-weight: 600; font-size: 13px; text-decoration: none; background: var(--strong); color: var(--on-strong); border: 1px solid var(--strong); }
.button.secondary { background: transparent; color: var(--strong); border-color: var(--line); }
.button.secondary:hover { border-color: var(--muted); }

/* The hero's downloads: the head script marks the visitor's system on
   <html data-os>, and only that system's button stays; any other system, or
   no script, sees both. */
.hero .actions { align-items: stretch; }
.hero .button { display: inline-flex; flex-direction: column; justify-content: center; }
.button.download { padding-block: 8px; }
.button.download small { font-size: 10px; font-weight: 400; opacity: .7; }
html[data-os="mac"] .download.linux, html[data-os="linux"] .download.mac { display: none; }
.actions .more { align-self: center; color: var(--muted); font-size: 12px; }
.actions .more:hover { color: var(--strong); }

/* Sections. */
section.part { border-top: 1px solid var(--line); padding: 64px 0; }
h2 { color: var(--strong); font-size: 22px; letter-spacing: -.4px; margin: 12px 0 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.grid.pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 22px; }

/* How it works: three steps on one line, read along it. */
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; border-top: 1px solid var(--line); }
.path li { position: relative; padding-top: 28px; }
.path li::before { content: ""; position: absolute; top: -4px; inset-inline-start: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--strong); }
.step { display: block; font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: -1px; color: var(--strong); margin-bottom: 18px; }
.path h3 { color: var(--strong); font-size: 14px; margin: 0 0 10px; }
.path p { margin: 0; color: var(--muted); font-size: 13px; }

/* Why it is safe: a row per promise, its name beside what it means. */
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 36px; padding: 24px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { padding-bottom: 0; }
.facts dt { color: var(--strong); font-size: 15px; font-weight: 700; }
.facts dd { margin: 0; color: var(--muted); font-size: 13px; }

/* A text to copy, in a dashed box. */
.message { background: var(--surface); border: 1px dashed var(--line); border-radius: 6px; padding: 18px 20px; font-size: 12px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }

/* Downloads: a tile per platform; a tile without a link is not out yet. */
.platform { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; }
.platform b { color: var(--strong); display: block; font-size: 14px; }
.platform small { color: var(--muted); font-size: 12px; }
.platform em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; border: 1px solid var(--line); border-radius: 3px; padding: 4px 8px; color: var(--muted); white-space: nowrap; }
a.platform[href]:hover { border-color: var(--muted); }
a.platform[href] em { background: var(--strong); color: var(--on-strong); border-color: var(--strong); }
.note { color: var(--muted); font-size: 12px; margin: 22px 0 0; }

/* Footer. */
footer { border-top: 1px solid var(--line); padding: 28px 0 48px; font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); }

/* The privacy page: one column of text. */
.page { max-width: 680px; padding: 48px 0 72px; }
.page h1 { font-size: clamp(28px, 4.6vw, 38px); }
.page h2 { font-size: 15px; margin: 34px 0 8px; }
.page p { color: var(--muted); margin: 0 0 12px; }

@media (max-width: 720px) {
  .bar { flex-wrap: wrap; padding: 20px 0; }
  .nav { gap: 14px; flex-wrap: wrap; }
  .nav .optional { display: none; }
  .nav .github span { display: none; }
  .hero { padding: 40px 0 56px; }
  .demo { margin: -24px 0 44px; }
  .grid.pairs { grid-template-columns: 1fr; }
  .path { grid-template-columns: 1fr; gap: 32px; border-top: 0; border-inline-start: 1px solid var(--line); padding-inline-start: 24px; }
  .path li { padding-top: 0; }
  .path li::before { top: 9px; inset-inline-start: -28px; }
  .step { font-size: 24px; margin-bottom: 12px; }
  .facts > div { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  section.part { padding: 44px 0; }
}

/* The agent's text: long lines wrap, the copy row sits under it. */
.agent-text { font-size: 12px; line-height: 1.7; max-height: 420px; overflow: auto; margin: 0 0 18px; }
.copy-row { align-items: center; }
.copy-row .copied { margin: 0; }
.grid.spaced { margin-top: 16px; }

/* Right-to-left languages: the diagram's arrows point the other way. */
[dir="rtl"] .flow i { display: inline-block; transform: scaleX(-1); }

/* Arabic script joins its letters, and CJK needs no tightening: letter
   spacing off there, and a typeface made for Arabic and Persian. */
html:is(:lang(ar), :lang(fa), :lang(ja), :lang(zh), :lang(ko)) :not(.mark) { letter-spacing: 0; }
html:is(:lang(ar), :lang(fa)) body { font-family: "SF Arabic", "Geeza Pro", "Noto Sans Arabic", Tahoma, sans-serif; font-size: 15px; }
html:is(:lang(ar), :lang(fa)) :is(.message, select) { font-family: inherit; font-size: 13px; }
