:root {
  --paper: #f4f2eb;
  --ink: #161713;
  --muted: #66675f;
  --line: #cfcec5;
  --accent: #b9f227;
  --accent-dark: #587900;
  --panel: #e9e7df;
  --code: #20211d;
  --code-ink: #f7f6ef;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.65; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .page, footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; }
.wordmark { color: var(--ink); font-family: "SFMono-Regular", Consolas, monospace; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.wordmark span { color: var(--accent-dark); }
.site-header nav { display: flex; gap: 24px; }
.site-header nav a { color: var(--muted); font-size: 0.86rem; text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a.active { color: var(--ink); box-shadow: inset 0 -3px var(--accent); }

.page { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 64px; padding: 64px 0 100px; }
.sidebar { position: sticky; top: 32px; align-self: start; font-size: 0.84rem; }
.sidebar > p { margin: 0 0 14px; color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sidebar nav a { padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.sidebar nav a:hover { color: var(--ink); padding-left: 5px; }

.manual { min-width: 0; }
.manual-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 4px solid var(--ink); }
.manual-label, .version { color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; }
h1 { margin: 4px 0 0; font-size: clamp(2.8rem, 7vw, 5rem); letter-spacing: -0.06em; line-height: 1; }
.manual section { padding: 42px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
h2 { margin: 0 0 24px; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
h2::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--accent); border: 1px solid var(--ink); }
h3 { margin: 32px 0 12px; font-size: 0.95rem; }
p { max-width: 760px; margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }
p code, td code, dd code { padding: 0.12em 0.3em; background: var(--panel); font-size: 0.88em; }
pre { margin: 0 0 22px; padding: 20px 22px; overflow-x: auto; background: var(--code); color: var(--code-ink); font-size: 0.82rem; line-height: 1.65; }
pre span { color: var(--accent); }

.translation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; margin: 28px 0; padding: 24px; background: var(--code); color: var(--code-ink); }
.translation div { min-width: 0; }
.translation span { display: block; margin-bottom: 8px; color: #aaa99f; font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; }
.translation code { display: block; overflow: hidden; color: var(--accent); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.translation b { color: var(--accent); font-size: 1.4rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; text-align: left; }
th, td { padding: 13px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th:last-child, td:last-child { border-right: 0; }
thead th { background: var(--panel); font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; }
tbody th { font-weight: 650; }
.compatibility-table { width: max-content; min-width: 100%; }
.compatibility-table td { text-align: center; }
.compatibility-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.compatibility-table thead th:first-child { z-index: 2; background: var(--panel); }
.compatibility-table .status-ok { background: #e5f3df; }
.compatibility-table .status-partial { background: #fff0cc; }
.compatibility-table .status-no { background: #fae5e2; }

.downloads { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 0.84rem; }
.downloads a { font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.78rem; }
.method-note { margin-top: -8px; color: var(--muted); font-size: 0.84rem; }
.after-install { padding: 20px 24px 1px; border-left: 4px solid var(--accent); background: var(--panel); }
.release-links { display: flex; gap: 20px; margin-top: 24px; font-size: 0.84rem; }

footer { display: flex; justify-content: space-between; padding: 24px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-family: "SFMono-Regular", Consolas, monospace; font-size: 0.72rem; }

@media (max-width: 760px) {
  .header-inner, .page, footer { width: min(100% - 28px, 1120px); }
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 14px 0; }
  .site-header nav { gap: 14px; }
  .site-header nav a.external { display: none; }
  .page { grid-template-columns: 1fr; gap: 34px; padding-top: 34px; }
  .sidebar { position: static; }
  .sidebar > p { display: none; }
  .sidebar nav { flex-direction: row; gap: 16px; overflow-x: auto; border-bottom: 1px solid var(--line); }
  .sidebar nav a { flex: 0 0 auto; border: 0; }
  .sidebar nav a:hover { padding-left: 0; }
  .manual-header { align-items: start; }
  .translation { grid-template-columns: 1fr; }
  .translation b { transform: rotate(90deg); }
  .after-install { padding-inline: 16px; }
}

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