/* limitly: the website. Terminal look: anthracite, white and greys; colour only for the five tools.
   Hand-written, no framework. Everything is a class: the Content-Security-Policy forbids style="" attributes. */

@font-face {
  font-family: "JetBrains Mono";
  src: url(fonts/JetBrainsMono-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block; /* the terminal frames need the exact cell width from the first paint */
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(fonts/JetBrainsMono-Bold.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #161616;      /* the page */
  --surface: #191919; /* the terminal and the cards: the exact colour of the author's terminal */
  --raised: #202020;
  --line: #404040;    /* frames, rules and the dotted track of the bars */
  --ctl: #818181;     /* the outline of anything you can press (3:1 against the page) */
  --text: #eaecf0;
  --soft: #a3a3a3;
  --dim: #818181;     /* only on --bg or --surface: it fails AA on --raised */
  --claude: #d97757;
  --codex: #10a37f;
  --agy: #60a5fa;
  --grok: #facc15;
  --copilot: #f0489e;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--soft);
  font: 400 16px/1.65 var(--mono);
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--text); color: var(--bg); }
a { color: var(--text); text-decoration-color: var(--ctl); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
code, kbd { font: inherit; color: var(--text); }
strong { color: var(--text); font-weight: 700; }
h1, h2, h3 { color: var(--text); margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; background: var(--text); color: var(--bg); text-decoration: none; }
.skip:focus { top: 12px; }

/* the five tools as a signature: a thin segmented line and a row of dots (the only places colour appears outside a tool's own frame and name) */
.strip { display: flex; gap: 4px; height: 3px; }
.strip i { flex: 1; }
.top .strip { position: absolute; inset: 0 0 auto 0; }
.dots5 { display: inline-flex; gap: 5px; margin-right: 12px; vertical-align: 1px; }
.dots5 i { width: 7px; height: 7px; border-radius: 50%; }
.s-claude { background: var(--claude); } .s-codex { background: var(--codex); } .s-agy { background: var(--agy); } .s-grok { background: var(--grok); } .s-copilot { background: var(--copilot); }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 10; background: rgb(22 22 22 / 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__in { padding-top: 3px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand svg { display: block; height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); font-size: 14px; }
.nav a { color: var(--soft); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--text); }
.nav__gh { border: 1px solid var(--ctl); border-radius: 6px; padding: 5px 12px !important; color: var(--text) !important; }
.nav__gh:hover { background: var(--text); color: var(--bg) !important; border-color: var(--text); }

/* ---- hero ---- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.eyebrow { margin: 0 0 20px; font-size: 13px; color: var(--dim); letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(40px, 7.4vw, 72px); line-height: 1.05; letter-spacing: -0.02em; }
.h1__big { display: block; }
.h1__sub { display: block; margin-top: 18px; max-width: 40ch; font-size: clamp(16px, 2.2vw, 20px); line-height: 1.4; font-weight: 400; letter-spacing: 0; color: var(--soft); }
.caret { display: inline-block; width: 0.5em; height: 0.82em; margin-left: 0.1em; vertical-align: -0.04em; background: var(--text); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.lead { max-width: 62ch; margin: 28px 0 28px; font-size: 17px; }

.install { max-width: 780px; }
.install__label { margin: 0 0 8px; font-size: 13px; color: var(--dim); }
.install__box { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.install__cmd { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.install__cmd::before { content: "> "; color: var(--dim); }
.install__note { margin: 10px 0 0; font-size: 13px; color: var(--dim); }
.install__note a { color: var(--soft); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--ctl); border-radius: 6px; background: transparent; color: var(--text); font: 400 14px/1 var(--mono); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--primary { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.btn--primary:hover { background: transparent; color: var(--text); }
.btn--copy { min-height: 36px; padding: 0 14px; }
.btn--copy[data-state="done"] { background: var(--text); color: var(--bg); }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 28px 0 0; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--soft); }
.trust li::before { content: "·"; margin-right: 8px; color: var(--dim); }
.hero__term { margin-top: clamp(36px, 6vw, 64px); }

/* ---- terminal window ---- */
.term { width: min(100%, 864px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.term__bar { display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 14px; background: var(--raised); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--soft); }
.term__dots { display: inline-flex; gap: 7px; }
.term__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.term__body { container: term / inline-size; padding: 14px 16px 16px; overflow-x: auto; }
.term__in { --fs: 11px; --lh: 15px; --gap: 3px; color: var(--text); }
.term__prompt { margin: 0; font: 400 var(--fs) / var(--lh) var(--mono); white-space: pre; }

/* the frame of the app as text: drawn on a character grid, so no ligatures, no kerning, fixed line height.
   JetBrains Mono's full block is 1.32 em tall, so 12/16 and 15/20 leave no gaps between rows. */
.frame { margin: 0; font: 400 var(--fs) / var(--lh) var(--mono); font-variant-ligatures: none; font-kerning: none; font-feature-settings: "liga" 0, "calt" 0; white-space: pre; tab-size: 1; color: var(--text); }
.frame-lg, .frame-md { display: none; }
.frame-sm { display: block; }
@container term (min-width: 317px) { .term__in { --fs: 12px; --lh: 16px; --gap: 3px; } }
@container term (min-width: 461px) { .frame-sm { display: none; } .frame-md { display: block; } }
@container term (min-width: 576px) { .term__in { --fs: 15px; --lh: 20px; --gap: 4px; } }
@container term (min-width: 648px) { .frame-md { display: none; } .frame-lg { display: block; } .term__in { --fs: 12px; --lh: 16px; --gap: 3px; } }
@container term (min-width: 810px) { .term__in { --fs: 15px; --lh: 20px; --gap: 4px; } }

.b { font-weight: 700; }
/* bars: a run of full blocks and a partial block are boxes painted with the colour (the glyphs are drawn at fractional
   pixels and would show hairline seams), a little shorter than the row so consecutive bars keep the thin gap they have
   in the author's terminal. .s: blocks stacked in columns (History) fill the whole row. */
.f, .h { display: inline-block; vertical-align: top; height: calc(var(--lh) - var(--gap)); margin-top: calc(var(--gap) / 2); background: currentColor; overflow: hidden; }
.f.s { height: var(--lh); margin-top: 0; }
.h1 { width: 0.075em; margin-right: 0.525em; } .h2 { width: 0.150em; margin-right: 0.450em; } .h3 { width: 0.225em; margin-right: 0.375em; } .h4 { width: 0.300em; margin-right: 0.300em; } .h5 { width: 0.375em; margin-right: 0.225em; } .h6 { width: 0.450em; margin-right: 0.150em; } .h7 { width: 0.525em; margin-right: 0.075em; }
.k-hi { color: #f5f5f5; }
.k-soft { color: var(--soft); }
.k-dim { color: var(--dim); }
.k-line { color: var(--line); }
.k-frame { color: #525252; }
.a-claude { color: var(--claude); }
.a-codex { color: var(--codex); }
.a-agy { color: var(--agy); }
.a-grok { color: var(--grok); }
.a-copilot { color: var(--copilot); }
.g { display: inline-block; width: 0.6em; overflow: visible; height: var(--lh); line-height: var(--lh); vertical-align: top; text-align: center; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", "DejaVu Sans Mono", var(--mono); font-variant-emoji: text; }

/* ---- sections ---- */
.sec { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.sec__head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.sec__label { margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.sec h2 { font-size: clamp(26px, 4vw, 38px); line-height: 1.15; letter-spacing: -0.02em; }
.sec__lead { margin: 18px 0 0; font-size: 17px; }

/* a frame drawn with CSS (no glyph seams), the title sits on its border like the cards of the app */
.fcard { --card-bg: var(--bg); position: relative; margin: 0; padding: 30px 22px 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--card-bg); transition: background-color 0.25s; }
.fcard__title { position: absolute; top: 0; left: 16px; transform: translateY(-50%); margin: 0; padding: 0 8px; background: var(--card-bg); font-size: 14px; line-height: 1.2; }
.fcard__tag { position: absolute; top: 0; right: 16px; transform: translateY(-50%); padding: 0 8px; background: var(--card-bg); font-size: 13px; line-height: 1.2; color: var(--soft); }
.fcard--claude { border-color: var(--claude); } .fcard--claude .fcard__title, .fcard--claude .fcard__tag { color: var(--claude); } .fcard--claude .bar__f { background: var(--claude); } .fcard--claude:hover { --card-bg: color-mix(in srgb, var(--claude) 7%, var(--bg)); }
.fcard--codex { border-color: var(--codex); } .fcard--codex .fcard__title, .fcard--codex .fcard__tag { color: var(--codex); } .fcard--codex .bar__f { background: var(--codex); } .fcard--codex:hover { --card-bg: color-mix(in srgb, var(--codex) 7%, var(--bg)); }
.fcard--agy { border-color: var(--agy); } .fcard--agy .fcard__title, .fcard--agy .fcard__tag { color: var(--agy); } .fcard--agy .bar__f { background: var(--agy); } .fcard--agy:hover { --card-bg: color-mix(in srgb, var(--agy) 7%, var(--bg)); }
.fcard--grok { border-color: var(--grok); } .fcard--grok .fcard__title, .fcard--grok .fcard__tag { color: var(--grok); } .fcard--grok .bar__f { background: var(--grok); } .fcard--grok:hover { --card-bg: color-mix(in srgb, var(--grok) 7%, var(--bg)); }
.fcard--copilot { border-color: var(--copilot); } .fcard--copilot .fcard__title, .fcard--copilot .fcard__tag { color: var(--copilot); } .fcard--copilot .bar__f { background: var(--copilot); } .fcard--copilot:hover { --card-bg: color-mix(in srgb, var(--copilot) 7%, var(--bg)); }

.grid { display: grid; gap: 34px 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .grid--tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* the bars of the app as text: solid fill, dotted track */
.meter { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; font-size: 13px; color: var(--soft); }
.meter__label { flex: none; }
.meter__bar { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; line-height: 1; letter-spacing: 0; }
.bar__f, .bar__t { display: inline-block; height: 0.85em; vertical-align: -0.06em; color: transparent; overflow: hidden; }
.bar__f { background: var(--text); }
.bar__t { background: radial-gradient(circle at 1.5px 1.5px, var(--line) 0.8px, transparent 1.1px) 0 0 / 3px 3px; }
.meter__pct { flex: none; color: var(--text); }
.reads { margin: 0 0 6px; font-size: 12px; color: var(--dim); }
.reads__cmd { display: block; margin: 0 0 14px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; overflow-wrap: anywhere; }
.fcard__note { margin: 0; font-size: 14px; line-height: 1.55; }

/* ---- install ---- */
.tabs__panel { margin: 0 0 40px; }
.tabs__h { margin: 0 0 12px; font-size: 14px; color: var(--soft); }
.js .tabs__h { display: none; }
.js .tabs__panel[hidden] { display: none; }
.tabs__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tab { min-height: 36px; padding: 0 16px; border: 1px solid var(--ctl); border-radius: 6px; background: transparent; color: var(--soft); font: 400 14px/1 var(--mono); cursor: pointer; }
.tab:hover { color: var(--text); border-color: var(--text); }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.panel__note { max-width: 70ch; margin: 14px 0 0; font-size: 14px; }
.grid--two { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fcard--plain .fcard__body { font-size: 14px; }
.fcard--plain .fcard__body p:last-child { margin-bottom: 0; }

/* ---- footer ---- */
.foot { padding: 0 0 56px; font-size: 13px; color: var(--dim); }
.foot__in { padding-top: 36px; display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--soft); }
.foot__lic { flex-basis: 100%; max-width: 70ch; }

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

/* ---- features, privacy, keys: frames with the title on the border ---- */
.grid--feat { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--feat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .grid--feat { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid--three { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid--after { margin-top: 34px; }
.fcard--plain { transition: border-color 0.2s; }
.fcard--plain:hover { border-color: var(--ctl); }
.fcard--plain .fcard__body p { margin: 0 0 1em; }
.fcard--plain .fcard__body p:last-child { margin-bottom: 0; }
.fcard--plain kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; border: 1px solid var(--ctl); border-radius: 4px; text-align: center; font-size: 12px; line-height: 1.5; }
.kv { margin: 0; display: grid; gap: 10px; font-size: 14px; }
.kv > div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 8px 16px; align-items: baseline; }
.kv dt { margin: 0; color: var(--text); }
.kv dd { margin: 0; }
.kv kbd { display: inline-block; min-width: 1.6em; padding: 0 6px; border: 1px solid var(--ctl); border-radius: 4px; text-align: center; font-size: 12px; line-height: 1.5; }
.kv code { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 560px) { .kv > div { grid-template-columns: 1fr; gap: 2px; } }

/* ---- the tour ---- */
.tabs--tour .tabs__panel { margin: 0; }
.tour__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.tour__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px 32px; grid-template-columns: minmax(0, 1fr); font-size: 15px; }
@media (min-width: 760px) { .tour__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tour__list li { position: relative; padding-left: 22px; }
.tour__list li::before { content: ">"; position: absolute; left: 0; color: var(--dim); }
.tabs--tour .tabs__panel:not(:last-child) { margin-bottom: 56px; }
.js .tabs--tour .tabs__panel { margin-bottom: 0; }

/* ---- questions ---- */
.wrap--narrow { width: min(100% - 2 * var(--gutter), 820px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 2px; color: var(--text); font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--dim); font-weight: 400; }
.faq details[open] summary::after { content: "−"; color: var(--text); }
.faq summary:hover { color: #fff; }
.faq details p { margin: 0 0 20px; max-width: 64ch; font-size: 15px; }

/* ---- the last call ---- */
.final { padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line); }
.final h2 { max-width: 20ch; margin-bottom: 36px; font-size: clamp(30px, 5.4vw, 52px); line-height: 1.08; letter-spacing: -0.02em; }

/* ---- the live terminal of the hero ---- */
.term__pause { margin-left: auto; min-height: 24px; padding: 0 10px; border: 1px solid var(--ctl); border-radius: 4px; background: transparent; color: var(--soft); font: 400 12px/1 var(--mono); cursor: pointer; }
.term__pause:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.term__in { position: relative; }
.term__frames { transition: opacity 0.14s; }
.term__frames[data-state="hidden"] { visibility: hidden; }
.term__frames[data-state="fade"] { opacity: 0; }
.term__layer { position: absolute; inset: 0; font: 400 var(--fs) / var(--lh) var(--mono); pointer-events: none; }
.term__layer > [role="tablist"], .term__layer .rng, .term__layer .dsp { display: contents; }
.term__layer button { position: absolute; left: calc(var(--x) * 1ch); top: calc((var(--y) + 1) * var(--lh) - (max(var(--lh), 24px) - var(--lh)) / 2); width: calc(var(--w) * 1ch); height: max(var(--lh), 24px); padding: 0; border: 0; border-radius: 3px; background: transparent; color: transparent; font: inherit; cursor: pointer; pointer-events: auto; }
.term__layer button:hover { background: rgb(234 236 240 / 0.1); }
.term__layer button:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }

/* ---- header on small screens: the section links give way, GitHub stays ---- */
@media (max-width: 760px) { .nav__sec { display: none; } }
.nav a[aria-current="true"] { color: var(--text); }

/* ---- sections appear softly, once ---- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .term__frames { transition: none; }
}

/* inline code in prose stays on one line (so --version is never cut after its first hyphen) */
p code, li code, dd code { white-space: nowrap; }

/* ---- language link and the 404 page ---- */
.nav__lang { padding: 4px 8px !important; border-radius: 4px; font-size: 13px; letter-spacing: 0.06em; }
.nav__lang:hover { background: var(--text); color: var(--bg) !important; }
.notfound { padding: clamp(48px, 9vw, 112px) 0 clamp(64px, 10vw, 128px); }
.notfound h1 { margin-bottom: 28px; font-size: clamp(64px, 16vw, 144px); line-height: 1; letter-spacing: -0.04em; }
.notfound .term { width: min(100%, 640px); }
.nf__line { margin: 0; font-size: 15px; line-height: 26px; }
