/* llms.txt RU — shared styles */

:root {
  --bg: #FAF8F3;
  --bg-alt: #F2EEE3;
  --ink: #0E0E0C;
  --ink-soft: #3A3A36;
  --muted: #56564F;
  --line: #E2DED1;
  --line-strong: #C9C3B1;
  --accent: #0A46E4;
  --accent-ink: #FFFFFF;
  --accent-soft: #E4ECFE;
  --yellow: #F5D547;
  --green: #1F8A4C;
  --red: #D94F2B;
  --card: #FFFFFF;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Geist', sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

[data-theme="dark"] {
  --bg: #0E0E0C;
  --bg-alt: #17171A;
  --ink: #F5F2E8;
  --ink-soft: #CEC9B8;
  --muted: #CEC7B5;
  --line: #26251F;
  --line-strong: #3A3A30;
  --accent: #7DA8FF;
  --accent-ink: #0A0A0A;
  --accent-soft: #1A2544;
  --card: #17171A;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus-visible {
  top: 16px;
  outline-color: color-mix(in oklab, var(--accent) 55%, white);
}

/* ——— Type ——— */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(42px, 6vw, 84px); letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 3.6vw, 48px); letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -0.02em; font-weight: 500; }
h4 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
h1[id], h2[id], h3[id], h4[id] { scroll-margin-top: 96px; }

p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: 0.93em; }
code {
  background: color-mix(in oklab, var(--bg-alt) 92%, var(--card));
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
pre {
  background: var(--ink);
  color: #F5F2E8;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }

/* ——— Layout ——— */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: 880px; }

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}
.logo-mark[data-color="accent"] { background: var(--accent); color: var(--accent-ink); }
.site-nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.site-nav a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.site-nav a.is-active { color: var(--ink); font-weight: 500; }
.header-cta {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .06s, background .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 88%, black); color: var(--accent-ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: color-mix(in oklab, var(--ink) 85%, var(--accent)); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-alt); border-color: var(--ink); color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 16px 28px; font-size: 15px; }

/* ——— Tag/pill ——— */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.tag-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.tag-accent { color: var(--accent); background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 30%, transparent); }

/* ——— Card ——— */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--line-strong); }

/* ——— Footer ——— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  margin-top: 120px;
  font-size: 14px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-col h4,
.footer-col .footer-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-soft); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.footer-bottom a {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: currentColor;
}
.footer-bottom a:hover {
  color: var(--accent);
  text-decoration-thickness: 2px;
}

.meta-note {
  color: var(--muted);
  font-size: 12px;
}

/* ——— Theme toggle ——— */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--bg-alt); color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="light"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ——— Utility ——— */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  font-weight: 500;
}
.divider { height: 1px; background: var(--line); margin: 0; border: none; }
.kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--ink-soft);
}

/* Noise texture overlay for hero, applied optionally */
.noise { position: relative; }
.noise::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: .6;
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 18px 50px -20px rgba(0,0,0,.25), 0 4px 12px -4px rgba(0,0,0,.08);
  z-index: 100;
  width: 260px;
  display: none;
  font-size: 13px;
}
.tweaks-panel.is-active { display: block; }
.tweaks-panel h4,
.tweaks-panel .panel-title {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 500;
}
.nav-group-title,
.toc-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.card-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
  line-height: 1.3;
}
.tweaks-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; gap: 12px; }
.tweaks-row + .tweaks-row { border-top: 1px solid var(--line); }
.tweaks-row label { color: var(--ink-soft); font-size: 12px; }
.swatch-row { display: flex; gap: 6px; }
.swatch {
  width: 22px; height: 22px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: transform .1s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-active { border-color: var(--ink); }
.tweaks-select {
  font-family: var(--sans);
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
}

@media (max-width: 860px) {
  .container { padding: 0 20px; }
  .site-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
