/* ITR Messenger Wiki — minimal Yandex-style documentation */
:root {
  --sidebar-width: 240px;
  --content-max-width: 860px;
  --text: #333;
  --text-secondary: #666;
  --link: #0066cc;
  --link-hover: #004499;
  --border: #e5e5e5;
  --sidebar-bg: #f8f8f8;
  --code-bg: #f4f4f4;
  --placeholder-bg: #eaeaea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}

.wrapper {
  display: flex;
  min-height: 100vh;
}

/* Header */
.page-header {
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.page-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}
.page-header a {
  color: var(--text);
  text-decoration: none;
}
.page-header a:hover {
  color: var(--link);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 16px 0;
}
.sidebar nav {
  position: sticky;
  top: 0;
}
.sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar li {
  margin: 0;
}
.sidebar a {
  display: block;
  padding: 6px 20px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.sidebar a:hover {
  background: rgba(0,0,0,0.04);
  color: var(--link);
}
.sidebar a.active {
  font-weight: 600;
  color: var(--link);
  border-left: 3px solid var(--link);
  margin-left: -3px;
  padding-left: 23px;
}
.sidebar .nav-section {
  padding: 8px 20px 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

/* Main content */
.main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 48px;
}
.main h1 {
  font-size: 1.75rem;
  margin: 0 0 1rem;
  font-weight: 600;
}
.main h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.main h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  font-weight: 600;
}
.main p {
  margin: 0 0 1rem;
}
.main ul, .main ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}
.main li {
  margin-bottom: 0.25rem;
}
.main a {
  color: var(--link);
  text-decoration: none;
}
.main a:hover {
  text-decoration: underline;
  color: var(--link-hover);
}

/* Code */
pre, code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
}
pre {
  margin: 1rem 0;
  padding: 16px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow-x: auto;
}
code {
  padding: 2px 6px;
  background: var(--code-bg);
  border-radius: 3px;
}
pre code {
  padding: 0;
  background: none;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 14px;
}
th, td {
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--border);
}
th {
  background: var(--sidebar-bg);
  font-weight: 600;
}

/* Placeholder for screenshots */
.screenshot-placeholder {
  background: var(--placeholder-bg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 32px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin: 1rem 0;
}

/* FAQ */
.faq-item {
  margin-bottom: 1.5rem;
}
.faq-item strong {
  display: block;
  margin-bottom: 0.25rem;
}

@media (max-width: 768px) {
  .wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar nav {
    position: static;
  }
  .main {
    padding: 24px 20px;
  }
}
