/*
 * Scrollbars as on a Mac: a thin rounded thumb on no track, out of sight
 * until the pointer is over the scrolling area, a little wider and darker
 * under the pointer or while dragged. The art workbench's (dev/art/art.css),
 * coloured by the theme: --ink is the paper's ink on the map and the dark
 * sidebar's text in the evening. The colour is written on each rule, not
 * kept in a :root variable, which would hold :root's ink everywhere.
 * Chrome and Safari take ::-webkit-scrollbar (Chrome ignores it on an
 * element that sets scrollbar-color, hence the @supports); Firefox the
 * standard properties. Areas with scrollbar-width: none stay bare.
 * Every page of the host loads it: the app and the phone through host.css,
 * the debug window and the e2e page by their main.tsx, the docs site by
 * dev/docs/build.ts (before its docs.css).
 */
@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
    background: transparent;
  }
  ::-webkit-scrollbar-track,
  ::-webkit-scrollbar-corner {
    background: transparent;
  }
  ::-webkit-scrollbar-thumb {
    background-color: transparent;
    border: 2px solid transparent;
    border-radius: 10px;
    background-clip: padding-box;
  }
  :hover::-webkit-scrollbar-thumb {
    background-color: color-mix(in srgb, var(--ink) 28%, transparent);
  }
  ::-webkit-scrollbar-thumb:hover,
  ::-webkit-scrollbar-thumb:active {
    border-width: 1px;
    background-color: color-mix(in srgb, var(--ink) 48%, transparent);
  }
}
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  :hover {
    scrollbar-color: color-mix(in srgb, var(--ink) 28%, transparent) transparent;
  }
}

/* The documentation site's look: design/docs-site, concept 3, "In the app's own look" (2026-11-23, the owner's
   pick). The app's paper and Nunito by day, its evening panel at night (by the visitor's system), the list of pages
   drawn as the app's Settings, each command on the Terminal's black. */
@font-face { font-family: "Nunito Variable"; font-style: normal; font-weight: 200 1000; font-display: swap; src: url("/nunito.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --ground: #f6ecd2; --surface: #fffaf0; --ink: #2a1f2d; --ink-strong: #1d1520; --ink-2: #6b5a63; --rule: #e3d3ad;
  --mark-from: #d3972d; --mark-to: #c98a22; /* the name's gradient: from the colour of the icon's right edge (site/icon.svg, 3/4 down its ramp) to its darkest stop, the same in both themes */
  --accent: #a8731a; --accent-soft: rgba(227, 170, 63, 0.22); --link: #8a5c10;
  --terminal-ground: #0c0c0c; --terminal-ink: #e8e2d4; --terminal-dim: #9a917f;
  --font-sans: "Nunito Variable", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #1a1b26; --surface: #202331; --ink: #d5dcff; --ink-strong: #ffffff; --ink-2: #8f96bd; --rule: #2f3549;
    --accent: #7aa2f7; --accent-soft: rgba(122, 162, 247, 0.18); --link: #9ab8fa;
    --terminal-ground: #0b0d12; --terminal-ink: #c9cdd6; --terminal-dim: #737aa2;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ground); }
svg { width: 1em; height: 1em; flex: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The commands and text for one computer: the other's are hidden (docs.js sets data-os before the first paint). */
:root[data-os="unix"] .only-windows, :root[data-os="windows"] .only-unix { display: none; }

.site { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 100vh; background: var(--ground); color: var(--ink); font: 16px/1.6 var(--font-sans); }

/* The list of pages, as the app's Settings. The name and the search stay put; only the list under them scrolls. */
.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 18px 0 0; background: var(--surface); }
.side-list { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 28px; }
.brand { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 22px 16px; color: var(--ink-strong); text-decoration: none; font-size: 18px; font-weight: 800; }
.brand-mark { width: 30px; height: 30px; } /* the icon rounds itself, 7 of 30 */
/* The name in the icon's mustard (the owner: "заголовок \"Allems docs\" покрасим таким же желтым градиентом, как у иконки"),
   going on from the icon's right edge with no jump back to its light end: design/docs-name-gradient, concept 1. */
.brand-name { background: linear-gradient(135deg, var(--mark-from), var(--mark-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 16px 14px; padding: 8px 12px; border-radius: 10px; background: var(--ground); color: var(--ink-2); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 0; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--ink); font: inherit; font-size: 15px; }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font: 700 11.5px var(--font-mono); color: var(--ink-2); }
.no-match { margin: 4px 22px; color: var(--ink-2); font-size: 14.5px; }
.group { margin-top: 10px; }
.group-name { margin: 0; padding: 8px 22px 4px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.group a { display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 12px; padding: 9px 22px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.group a .icon { display: grid; color: var(--ink-2); font-size: 20px; }
.group a:hover { background: var(--accent-soft); color: var(--ink-strong); }
.group a[aria-current] { background: var(--accent-soft); color: var(--ink-strong); font-weight: 800; }
.group a[aria-current] .icon { color: var(--accent); }
.group a:focus-visible { outline-offset: -2px; }

/* The page. */
.main { min-width: 0; }
.head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 40px; background: var(--ground); font-size: 18px; font-weight: 800; color: var(--ink-strong); }
.head .path { color: var(--ink-2); font-weight: 800; text-decoration: none; }
.head a.path:hover { color: var(--ink-strong); }
.head .path + .path::before { content: "› "; }
.menu-button { display: none; }
.read { max-width: 760px; padding: 18px 40px 88px; }
.doc h1 { margin: 6px 0 12px; font-size: 38px; font-weight: 900; line-height: 1.12; letter-spacing: -0.015em; color: var(--ink-strong); }
.doc .lead { margin: 0 0 18px; font-size: 18.5px; color: var(--ink-2); }
.doc p { margin: 0 0 14px; }
.doc h2 { margin: 46px 0 12px; font-size: 24px; font-weight: 900; line-height: 1.2; color: var(--ink-strong); }
/* The sections' headings in the name's gradient, held to their words' width (design/docs-headings-gradient, concept 2):
   the page's title and the small headings stay in ink. A maker after a heading (.by) keeps its own ink. */
.doc h2 { width: fit-content; background: linear-gradient(135deg, var(--mark-from), var(--mark-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 800; color: var(--ink-strong); }
.doc strong { color: var(--ink-strong); font-weight: 800; }
.doc a { color: var(--link); text-underline-offset: 3px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 22px; }
.doc li { margin: 4px 0; }
.doc li > p { margin: 0 0 6px; }
.doc li::marker { color: var(--ink-2); }
.doc code { font-family: var(--font-mono); }
.doc :not(pre) > code, .doc kbd { padding: 1px 5px; border-radius: 5px; background: var(--accent-soft); font-size: 0.86em; }
.doc kbd { font-family: var(--font-sans); font-weight: 700; }
.doc table { width: 100%; margin: 0 0 18px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.doc th { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.doc blockquote { margin: 0 0 14px; padding: 0 0 0 16px; border-left: 2px solid var(--accent); color: var(--ink-2); }
.doc blockquote p { margin: 0 0 8px; }
.by { margin-left: 6px; color: var(--ink-2); font-size: 0.62em; font-weight: 700; }

/* A page's pictures (docs/pictures/, design/docs-pictures, concept 2, "Flat areas, words on it"): inline SVG in the
   site's colours and the app's own for the faces' states (src/palette.css, host/web/sidebar/tokens.css), so they follow
   the day and the evening by themselves. The app is shown with the map hidden: the docs show no simulation (the owner:
   "Визуализацию в виде домов не «спойлерим», картинками рассказываем только о версии без симуляции"). */
:root {
  --fig-line: #6b5a63; --fig-faint: #c9b78f; --fig-soft: #e9dcb9; --fig-panel: #fffaf0; --fig-map: #eadfc2;
  --fig-ok: #3fae62; --fig-ask: #3f8f8a; --fig-arc: #a8731a; --fig-arc-head: #e3aa3f; --fig-bubble: #efe3c4; --fig-mine: #e3d3ad;
  --fig-face-1: #8fb8a8; --fig-face-2: #c7a0c9; --fig-face-3: #e0b46a; --fig-face-4: #9bb0d9;
  --fig-face-state: #a3a6ad; /* the states picture's one face, a grey of no hue (design/docs-faces-neutral, concept 2) */
  --fig-red: #d9483f; --fig-danger: #852020; --fig-ask-ink: #2b6f6a; --fig-tick-ink: #41382f;
  /* the model's line and what the context is made of (design/docs-pictures-line-made, concept 2): the efforts' and the
     plan's colours, the context's parts and the ink on each, as the app has them (ContextHistory.css) */
  --fig-effort-high: #8a5d00; --fig-effort-xhigh: #a6461a; --fig-effort-max: #c02f2f;
  --fig-plan-ink: #12417f; --fig-plan-line: #2e7de9;
  --fig-made-0: color-mix(in srgb, var(--ink-strong) 62%, transparent);
  --fig-made-1: color-mix(in srgb, var(--ink-strong) 42%, transparent);
  --fig-made-2: color-mix(in srgb, var(--ink-strong) 24%, transparent);
  --fig-made-3: #7cc4ff; --fig-made-4: #2e7de9; --fig-made-5: #e3aa3f; --fig-made-6: #3fae62;
  --fig-made-ink-0: var(--fig-panel); --fig-made-ink-1: var(--fig-panel); --fig-made-ink-2: var(--ink-strong);
  --fig-made-ink-3: var(--ink-strong); --fig-made-ink-4: var(--fig-panel); --fig-made-ink-5: var(--ink-strong);
  --fig-made-ink-6: var(--ink-strong);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fig-line: #8f96bd; --fig-faint: #444b66; --fig-soft: #2b3044; --fig-panel: #202331; --fig-map: #161824;
    --fig-ok: #54d17a; --fig-ask: #5fc4bb; --fig-arc: #e3aa3f; --fig-arc-head: #ffe7a8; --fig-bubble: #2a2e42; --fig-mine: #33395a;
    --fig-face-1: #4f7f70; --fig-face-2: #7d5a87; --fig-face-3: #9a7330; --fig-face-4: #4e6290;
    --fig-face-state: #4b4f5e;
    --fig-red: #ff6b6b; --fig-danger: #ffb3b3; --fig-ask-ink: #5fc4bb; --fig-tick-ink: #8f96bd;
    --fig-effort-high: #f0c453; --fig-effort-xhigh: #ff9e64; --fig-effort-max: #ff6b6b;
    --fig-plan-ink: #c2d8ff; --fig-plan-line: #7aa2f7;
    --fig-made-3: #7cc4ff; --fig-made-4: #7aa2f7; --fig-made-5: #f0c453; --fig-made-6: #54d17a;
    --fig-made-ink-4: var(--ink-strong);
  }
}
.fig { margin: 22px 0; }
.fig svg { display: block; width: 100%; height: auto; }
.fig svg text { font-family: var(--font-sans); }
.fig svg .mono { font-family: var(--font-mono); }
.doc .faces { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 18px 0 22px; padding: 0; list-style: none; }
.doc .faces li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.doc .faces strong { display: block; font-size: 15.5px; }
.faces svg { width: 76px; height: 76px; overflow: visible; }
@media (max-width: 560px) { .doc .faces { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The phone list's five ticks with their words (design/docs-pictures-more, concept 2): the tick as the list draws it,
   larger, the words text under it as the faces' are. */
.doc .ticks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin: 18px 0 22px; padding: 0; list-style: none; }
.doc .ticks li { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }
.doc .ticks strong { display: block; font-size: 15.5px; }
.ticks svg { width: 14px; height: 40px; overflow: visible; }
@media (max-width: 560px) { .doc .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The computer the commands are for, as the agent's tabs. */
.os-line { display: flex; align-items: flex-end; gap: 12px; margin: 26px 0 18px; border-bottom: 1px solid var(--rule); }
.os { display: flex; gap: 2px; }
.os button { min-height: 34px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); cursor: pointer; font-size: 13.5px; font-weight: 700; }
.os button:hover { color: var(--ink); }
.os button[aria-pressed="true"] { color: var(--ink-strong); border-bottom-color: var(--accent); }

/* A command, on the Terminal's black. */
.cmd { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 13px 10px 13px 16px; border-radius: 10px; background: var(--terminal-ground); color: var(--terminal-ink); }
.cmd pre { flex: 1; margin: 0; overflow-x: auto; font-size: 14.5px; line-height: 1.5; --ink: var(--terminal-ink); } /* its scrollbar's thumb in the Terminal's ink, not the paper's, on the black */
.cmd code[data-prompt]::before { content: attr(data-prompt) " "; color: var(--terminal-dim); }
.copy { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; background: none; color: var(--terminal-dim); cursor: pointer; font-size: 17px; transition: transform .12s, color .12s; }
.copy:hover { color: var(--terminal-ink); transform: scale(1.08); }
.copy.is-done { color: var(--terminal-ink); }
.copy svg:last-child { display: none; }
.copy.is-done svg:first-child { display: none; }
.copy.is-done svg:last-child { display: block; }

/* The pages before and after. */
.neighbours { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; }
.neighbours a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; margin: 0 -14px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.neighbours a:hover { background: var(--accent-soft); }
.neighbours .next { margin-left: auto; text-align: right; align-items: flex-end; }
.neighbours .dir { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.neighbours .name { font-size: 17px; font-weight: 800; color: var(--ink-strong); }

.close-pages { display: none; place-items: center; position: absolute; top: 10px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 22px; }
@media (max-width: 860px) {
  .site { display: block; }
  .side { display: none; }
  .pages-open .side { display: flex; position: fixed; inset: 0; z-index: 10; height: auto; }
  .pages-open .close-pages { display: grid; }
  .head { height: 52px; padding: 0 4px 0 16px; font-size: 16px; }
  .menu-button { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; background: none; color: var(--ink); font-size: 22px; cursor: pointer; }
  .read { padding: 8px 16px 64px; }
  .doc h1 { font-size: 32px; }
  .doc .lead { font-size: 17.5px; }
}
@media (prefers-reduced-motion: reduce) { .copy { transition: none; } }
