/* wiki.slarp.gg (owner 12.10: «в очень красивом стиле наших интерфейсов … бери пример у красивых блогов»): the tokens
   of ai.slarp.gg (graphite surfaces, warm text, gold only on the one main button), a reading column of ~70
   characters, quiet sentence-case headings under one display H1, the answer first. The shell (header, footer, dock)
   comes from site/src/shell; this sheet styles only the wiki. Built by tools/build_wiki.py. */

:root {
  --bg: #121315;
  --surface: #1b1d20;
  --surface-2: #25282c;
  --surface-3: #303338;
  --text: #F4EFE4;
  --text-2: #DCD5C7;
  --muted: #B3AA98;
  --line: #282b2f;
  --line-strong: #36393e;
  --gold: #E9C87C;
  --gold-strong: #D9B45E;
  --gold-ink: #171310;
  --display: "Geologica", "Segoe UI", system-ui, sans-serif;
  --body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --radius: 14px;
  --radius-lg: 20px;
}

.wk-page *, .wk-page *::before, .wk-page *::after { box-sizing: border-box; }
body.wk-page { background: var(--bg); color: var(--text); font-family: var(--body); -webkit-font-smoothing: antialiased; }
:where(.wk-page) a { color: inherit; text-decoration: none; }
:where(.wk-page) img { display: block; max-width: 100%; }
:where(.wk-page) :is(button, input) { font: inherit; }
.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; }

.wk-main { display: block; padding: 8px 20px 72px; }

/* ---- the three columns: sections | the article | on this page */
.wk-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; gap: 48px; max-width: 1320px; margin: 0 auto; align-items: start; }
.wk-side, .wk-aside { position: sticky; top: calc(var(--shell-header-h, 72px) + 20px); max-height: calc(100vh - 110px); overflow: auto; scrollbar-width: thin; }
.wk-article { min-width: 0; max-width: 760px; }

/* ---- sections */
.wk-nav { margin-top: 18px; }
.wk-nav-group { border-top: 1px solid var(--line); padding: 10px 0; }
.wk-nav-group summary { cursor: pointer; list-style: none; font: 700 12px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 0; }
.wk-nav-group summary::-webkit-details-marker { display: none; }
.wk-nav-group summary::after { content: "+"; float: right; color: var(--muted); }
.wk-nav-group[open] summary::after { content: "–"; }
.wk-nav-group ul { list-style: none; margin: 6px 0 0; padding: 0; }
.wk-nav-group a { display: block; padding: 7px 10px; margin: 1px 0; border-radius: 10px; font-size: 14px; line-height: 1.35; color: var(--text-2); text-decoration: none; }
.wk-nav-group a:hover { background: var(--surface); color: var(--text); }
.wk-nav-group a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* ---- search */
.wk-search { position: relative; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 12px; }
.wk-search:focus-within { border-color: var(--muted); }
.wk-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; }
.wk-search input { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); outline: none; font-size: 15px; }
.wk-search input::placeholder { color: var(--muted); opacity: .8; }
.wk-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #17181b; border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px; box-shadow: 0 18px 48px rgba(0, 0, 0, .45); max-height: 420px; overflow: auto; }
.wk-search-results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.wk-search-results a:hover, .wk-search-results a[aria-selected="true"] { background: var(--surface-2); }
.wk-search-results b { display: block; font-size: 14px; font-weight: 600; }
.wk-search-results span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.wk-search-results p { margin: 10px 12px; color: var(--muted); font-size: 14px; }

/* ---- the article head */
.wk-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 18px 0 18px; padding: 0; font-size: 13px; color: var(--muted); }
.wk-crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.wk-crumbs a { text-decoration: none; }
.wk-crumbs a:hover { color: var(--text); }
.wk-kicker { margin: 0 0 10px; font: 700 12px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.wk-article h1, .wk-hero h1 { margin: 0; font: 800 clamp(30px, 4.2vw, 46px)/1.08 var(--display); letter-spacing: -.01em; text-transform: uppercase; text-wrap: balance; }
.wk-lead { margin: 18px 0 0; font-size: 19px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.wk-lead a { color: var(--gold); }
.wk-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.wk-meta a { color: var(--muted); }
.wk-tldr { margin: 28px 0 8px; padding: 18px 22px 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; }
.wk-tldr-title { margin: 0 0 8px; font: 700 13px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.wk-tldr ul { margin: 0; padding-left: 18px; }
.wk-tldr li { margin: 6px 0; line-height: 1.55; }

/* ---- prose */
.wk-prose { font-size: 17px; line-height: 1.72; color: var(--text-2); }
.wk-prose > * { margin: 0 0 18px; }
.wk-prose h2, .wk-faq > h2, .wk-sources h2, .wk-related h2 { position: relative; margin: 46px 0 14px; color: var(--text); font: 700 25px/1.25 var(--display); letter-spacing: -.005em; scroll-margin-top: 96px; }
.wk-prose h3 { margin: 30px 0 10px; color: var(--text); font: 700 19px/1.35 var(--display); }
.wk-anchor { position: absolute; left: -22px; top: 0; color: var(--muted); opacity: 0; text-decoration: none; font-weight: 400; }
.wk-prose h2:hover .wk-anchor { opacity: .7; }
.wk-prose strong { color: var(--text); font-weight: 600; }
.wk-prose a, .wk-faq-answer a, .wk-note a { color: var(--text); text-decoration: underline; text-decoration-color: rgba(233, 200, 124, .55); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.wk-prose a:hover, .wk-faq-answer a:hover { text-decoration-color: var(--gold); }
.wk-prose ul, .wk-prose ol { padding-left: 22px; }
.wk-prose li { margin: 8px 0; padding-left: 4px; }
.wk-prose li::marker { color: var(--muted); }
.wk-prose code { font: 14.5px/1 var(--mono); background: var(--surface-2); border-radius: 6px; padding: 2px 6px; color: var(--text); }
.wk-ref a { text-decoration: none !important; font-size: 12px; color: var(--gold); margin-left: 2px; }
.wk-code { background: #0e0f11; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow: auto; }
.wk-code code { background: none; padding: 0; font-size: 14px; line-height: 1.6; }
.wk-terms { display: grid; gap: 10px; }
.wk-terms div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.wk-terms dt { color: var(--text); font-weight: 700; margin-bottom: 4px; }
.wk-terms dd { margin: 0; }
.wk-note { background: rgba(233, 200, 124, .06); border: 1px solid rgba(233, 200, 124, .22); border-radius: 12px; padding: 14px 18px; }
.wk-note p { margin: 0; }
.wk-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.wk-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.wk-table th, .wk-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.wk-table thead th { background: var(--surface); color: var(--muted); font: 700 12px/1.3 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.wk-table tbody th { color: var(--text); font-weight: 600; }
.wk-table tbody tr:last-child > * { border-bottom: 0; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wk-prose .wk-chip, .wk-chip { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 14px; text-decoration: none; }
.wk-prose .wk-chip:hover { background: var(--surface-3); }

/* ---- FAQ, sources */
.wk-faq-item { border-top: 1px solid var(--line); }
.wk-faq-item:last-child { border-bottom: 1px solid var(--line); }
.wk-faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 0; }
.wk-faq-item summary::-webkit-details-marker { display: none; }
.wk-faq-item summary h3 { margin: 0; flex: 1; font: 600 17px/1.4 var(--body); color: var(--text); }
.wk-faq-item summary::after { content: ""; width: 9px; height: 9px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.wk-faq-item[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.wk-faq-answer { padding: 0 0 18px; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.wk-faq-answer > * { margin: 0 0 10px; }
.wk-sources ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.wk-sources li { margin: 6px 0; scroll-margin-top: 96px; }
.wk-sources a { color: var(--text-2); }

/* ---- the call to action and the next articles */
.wk-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 48px 0 0; padding: 22px 24px; background: linear-gradient(135deg, #1d1f23, #17181b); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
.wk-cta-title { margin: 0 0 4px; font: 700 20px/1.3 var(--display); }
.wk-cta p { margin: 0; color: var(--muted); line-height: 1.5; }
.wk-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }
.wk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 700 14px/1 var(--body); text-decoration: none; white-space: nowrap; }
.wk-btn:hover { background: var(--surface-3); }
.wk-btn-gold { background: var(--gold); color: var(--gold-ink); }
.wk-btn-gold:hover { background: var(--gold-strong); }
.wk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.wk-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s, background .15s; }
.wk-card:hover { border-color: var(--line-strong); background: #1f2124; }
.wk-card-kicker { font: 700 11px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-card-title { font: 700 16px/1.35 var(--display); color: var(--text); }
.wk-card-text { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---- on this page */
.wk-toc p { margin: 18px 0 10px; font: 700 12px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wk-toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); }
.wk-toc a { display: block; padding: 5px 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.wk-toc a:hover, .wk-toc a.is-current { color: var(--text); }

/* ---- the home page */
.wk-hero { max-width: 860px; margin: 36px auto 0; text-align: center; }
.wk-hero .wk-lead { margin-left: auto; margin-right: auto; max-width: 680px; }
.wk-hero .wk-search { max-width: 620px; margin: 28px auto 0; text-align: left; }
.wk-hero-small { margin-top: 48px; }
.wk-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1180px; margin: 48px auto 0; }
.wk-product { display: flex; flex-direction: column; gap: 10px; min-height: 200px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; transition: border-color .15s, transform .15s; }
.wk-product:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.wk-product-big { min-height: 230px; background: radial-gradient(120% 140% at 100% 0%, rgba(233, 200, 124, .09), transparent 55%), var(--surface); }
.wk-product-title { font: 800 26px/1.1 var(--display); text-transform: uppercase; }
.wk-product-more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--gold); }
.wk-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; max-width: 1180px; margin: 56px auto 0; }
.wk-column h2, .wk-home-about h2 { margin: 0 0 12px; font: 700 20px/1.3 var(--display); }
.wk-column ul { list-style: none; margin: 0; padding: 0; }
.wk-column a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--text-2); text-decoration: none; font-size: 15px; line-height: 1.4; }
.wk-column a:hover { color: var(--text); }
.wk-home-about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; max-width: 1180px; margin: 56px auto 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.wk-home-about p { margin: 0 0 12px; color: var(--text-2); line-height: 1.65; }
.wk-home-about a { color: var(--text); }
.wk-home-links { display: grid; gap: 12px; align-content: start; }
.wk-home-links .wk-card { background: var(--surface-2); }

/* ---- all articles under the article (phones: the side list is hidden there) */
.wk-nav-bottom { display: none; margin-top: 48px; }
.wk-nav-bottom h2 { margin: 0 0 8px; font: 700 20px/1.3 var(--display); }

/* ---- narrower screens */
@media (max-width: 1180px) {
  .wk-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .wk-aside { display: none; }
}
@media (max-width: 860px) {
  .wk-main { padding: 0 16px 96px; }
  .wk-layout { display: block; }
  .wk-side { position: static; max-height: none; overflow: visible; margin-top: 14px; }
  .wk-nav { display: none; }
  .wk-nav-bottom { display: block; }
  .wk-article { max-width: none; }
  .wk-lead { font-size: 17px; }
  .wk-prose { font-size: 16.5px; }
  .wk-prose h2, .wk-faq > h2, .wk-sources h2, .wk-related h2 { font-size: 22px; margin-top: 36px; }
  .wk-anchor { display: none; }
  .wk-cta { flex-direction: column; align-items: stretch; }
  .wk-cta-actions .wk-btn { flex: 1; }
  .wk-columns, .wk-home-about { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wk-products { grid-template-columns: 1fr; }
  .wk-product, .wk-product-big { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wk-product, .wk-card, .wk-faq-item summary::after { transition: none; }
  .wk-product:hover { transform: none; }
}
