
:root {
  --bg: #f7f8f4;
  --panel: #ffffff;
  --ink: #17181a;
  --muted: #5f6168;
  --line: #e4e6df;
  --lime: #d8f05a;
  --lime-deep: #b6d12a;
  --dark: #202022;
  --code-bg: #1c1d1f;
  --code-ink: #e8ebd9;
  --sidebar: 280px;
  --top: 64px;
  --accent: #2f3810;
  --shadow: 0 18px 40px #20202214;
  --radius: 18px;
  --font: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, #eef6c8 0%, transparent 42%),
    linear-gradient(180deg, #fbfcf7 0%, var(--bg) 40%, #eef1e4 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
code, pre { font-family: var(--mono); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 22px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.04em; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search {
  width: min(360px, 42vw);
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px;
}
.search input {
  border: 0; outline: none; width: 100%; background: transparent; font: inherit; font-size: .9rem;
}
.lang, .btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--lime); border-color: transparent; }
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: calc(100vh - var(--top)); }
.sidebar {
  position: sticky; top: var(--top); height: calc(100vh - var(--top));
  overflow: auto; padding: 22px 16px 40px;
  border-right: 1px solid var(--line); background: rgba(255,255,255,.55);
}
.nav-group { margin: 0 0 22px; }
.nav-group h4 {
  margin: 0 10px 8px; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #7a7d74;
}
.nav-group a {
  display: block; padding: 9px 12px; border-radius: 12px; color: var(--muted); font-size: .92rem;
}
.nav-group a:hover, .nav-group a.active {
  background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
}
.nav-group a.active { background: #f3f8d8; box-shadow: inset 0 0 0 1px #d7e68a; }
.content { padding: 34px 42px 80px; max-width: 920px; }
.crumb { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
h1 { font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -.05em; line-height: 1.1; margin: 0 0 14px; }
h2 { font-size: 1.45rem; letter-spacing: -.03em; margin: 42px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 1.08rem; margin: 28px 0 10px; }
p, li { color: #3d3f45; line-height: 1.7; }
p { margin: 0 0 14px; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 68ch; }
.callout {
  margin: 18px 0 22px; padding: 14px 16px; border-radius: 14px;
  background: #f4f8df; border: 1px solid #dde8a8; color: #3d4718; font-size: .92rem;
}
.callout.warn { background: #fff7e8; border-color: #f0d49a; color: #6a4c12; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin: 22px 0; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; font-size: .92rem; }
table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: .9rem;
}
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3f4ef; color: #555; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
pre {
  background: var(--code-bg); color: var(--code-ink); border-radius: 16px;
  padding: 16px 18px; overflow: auto; font-size: .84rem; line-height: 1.55; margin: 14px 0 22px;
}
code { font-size: .88em; }
:not(pre) > code {
  background: #eef1e5; border-radius: 6px; padding: 1px 6px; color: #2d3218;
}
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; }
.pager a {
  flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.pager a span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.footer-note { margin-top: 40px; color: #85888f; font-size: .82rem; }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: var(--top) auto 0 0; width: min(86vw, 320px);
    transform: translateX(-105%); transition: transform .2s ease; z-index: 30; background: #fff;
  }
  .sidebar.open { transform: none; box-shadow: 20px 0 50px #0002; }
  .menu-btn { display: inline-flex; }
  .content { padding: 24px 18px 60px; }
  .cards { grid-template-columns: 1fr; }
  .search { width: 100%; max-width: 220px; }
}

@media (max-width: 960px) {
  .topbar{padding:0 12px;gap:8px;flex-wrap:nowrap}
  .brand span{font-size:1rem}
  .top-actions{gap:6px;flex:1;justify-content:flex-end;min-width:0}
  .search{width:min(42vw,160px);padding:7px 10px}
  .search input{font-size:.8rem}
  .lang,.btn{padding:7px 10px;font-size:.75rem;white-space:nowrap}
  .btn.primary{display:none}
  .content{padding:20px 16px 56px;max-width:100%;overflow-wrap:anywhere}
  .content pre{font-size:.75rem;padding:12px;border-radius:12px}
  .content table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;font-size:.8rem}
  .content th,.content td{padding:10px 10px;white-space:nowrap}
  .cards{grid-template-columns:1fr}
  .pager{flex-direction:column}
  .sidebar{padding:16px 12px 32px}
  .nav-group a{padding:11px 12px}
}
@media (max-width: 520px) {
  .search{display:none}
  .brand img{width:26px;height:26px}
  h1{font-size:1.7rem}
}

