:root {
  --bg: #f6f9fc;
  --panel: #ffffff;
  --panel-soft: #eef7fb;
  --line: #dce7f1;
  --line-strong: #bad1e4;
  --text: #102033;
  --muted: #64758a;
  --muted-strong: #40566d;
  --cyan: #0ea5c6;
  --cyan-strong: #087895;
  --green: #257146;
  --amber: #9a6500;
  --shadow: 0 1px 2px rgba(15, 35, 55, 0.04), 0 14px 36px rgba(28, 82, 124, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.brand,
.topbar nav,
.language-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #e8f7ff;
  color: var(--cyan-strong);
  font-weight: 900;
}

.brand strong {
  font-size: 16px;
}

.language-switcher {
  margin-left: auto;
}

.language-switcher a {
  min-width: 38px;
  text-align: center;
}

.topbar nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted-strong);
  font-weight: 800;
}

.topbar nav a:hover,
.language-switcher a.active {
  background: var(--panel-soft);
  color: var(--cyan-strong);
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar strong {
  color: var(--muted-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted-strong);
  font-weight: 750;
}

.sidebar a:hover,
.sidebar a.active {
  background: var(--panel-soft);
  color: var(--cyan-strong);
}

.content {
  min-width: 0;
}

.document {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
ul,
ol {
  max-width: 820px;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin: 30px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 20px;
  letter-spacing: 0;
}

h3 {
  margin: 20px 0 8px;
  font-size: 16px;
  letter-spacing: 0;
}

p,
li {
  color: var(--muted-strong);
}

.lead {
  margin-top: 12px;
  color: var(--muted-strong);
  font-size: 16px;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.doc-meta span,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.doc-meta span {
  padding: 7px 10px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 850;
}

.notice {
  max-width: 820px;
  margin: 18px 0 22px;
  padding: 12px 14px;
  color: var(--amber);
  font-weight: 750;
}

.catalog-section {
  margin-top: 26px;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.document-card:hover {
  border-color: var(--line-strong);
  background: #f5fbff;
}

.document-card strong,
.document-card span,
.document-card small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-card span {
  color: var(--muted-strong);
}

.document-card small {
  align-self: end;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.button-link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--cyan);
  color: #ffffff;
  font-weight: 900;
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar,
  .topbar nav {
    align-items: stretch;
    flex-direction: column;
  }

  .shell {
    padding: 16px;
  }

  .document {
    padding: 20px;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}
