/* Metriqa Docs — стили в mint-палитре Kayaniq Group */
:root {
  --bg: #ffffff;
  --bg-mint: #f0fdf4;
  --bg-mint-soft: #f7fcf8;
  --bg2: #f8fafc;
  --bg3: #f1f5f9;
  --mint: #86efac;
  --mint-mid: #4ade80;
  --mint-strong: #22c55e;
  --mint-deep: #15803d;
  --text: #0f172a;
  --text2: #475569;
  --text3: #94a3b8;
  --border: rgba(15,23,42,0.08);
  --border2: rgba(15,23,42,0.12);
  --accent: #16a34a;
  --green: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --code-bg: #0c1a14;
  --code-text: #e2e8f0;
  --code-comment: #86efac;
  --code-keyword: #4ade80;
  --code-string: #fbbf24;
  --radius: 12px;
  --mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.docs-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.docs-header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 14px 24px;
}
.docs-logo {
  font-size: 17px; font-weight: 700; letter-spacing: -0.5px;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.docs-logo::before {
  content: 'M';
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--mint-mid), var(--mint-strong));
  color: #fff; font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
}
.docs-logo-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  background: var(--mint-strong); color: #fff; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.docs-nav { display: flex; gap: 22px; font-size: 14px; }
.docs-nav a {
  color: var(--text2); text-decoration: none; font-weight: 500;
}
.docs-nav a:hover, .docs-nav a.active { color: var(--mint-deep); }
.docs-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.docs-back {
  font-size: 13px; color: var(--text2); text-decoration: none;
  padding: 7px 14px; border-radius: 100px; border: 1px solid var(--border2);
  font-weight: 500;
}
.docs-back:hover { border-color: var(--mint-strong); color: var(--mint-deep); }

/* Layout */
.docs-layout {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 240px 1fr;
  gap: 48px; padding: 32px 24px 80px;
}
@media (max-width: 900px) { .docs-layout { grid-template-columns: 1fr; gap: 16px; } }

.docs-sidebar {
  position: sticky; top: 88px; align-self: start;
  font-size: 13.5px;
}
.docs-sidebar h4 {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--mint-deep);
  margin: 24px 0 8px;
}
.docs-sidebar h4:first-child { margin-top: 0; }
.docs-sidebar ul { list-style: none; padding: 0; margin: 0; }
.docs-sidebar li { margin-bottom: 4px; }
.docs-sidebar a {
  display: block; padding: 7px 12px; border-radius: 8px;
  color: var(--text2); text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.docs-sidebar a:hover { color: var(--mint-deep); background: var(--bg-mint); }
.docs-sidebar a.active {
  background: var(--bg-mint); color: var(--mint-deep); font-weight: 600;
  border-left: 3px solid var(--mint-strong);
  padding-left: 9px;
}

/* Content */
.docs-content { max-width: 760px; }
.docs-content h1 {
  font-size: 38px; font-weight: 800; letter-spacing: -1.2px;
  margin: 0 0 16px; line-height: 1.15;
}
.docs-content h2 {
  font-size: 25px; font-weight: 700; letter-spacing: -0.5px;
  margin: 44px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.docs-content h2:first-of-type { margin-top: 36px; }
.docs-content h3 {
  font-size: 18px; font-weight: 700; margin: 26px 0 10px;
}
.docs-content p { margin: 0 0 14px; color: var(--text); line-height: 1.7; }
.docs-content a {
  color: var(--mint-deep);
  text-decoration: underline;
  text-decoration-color: rgba(34,197,94,0.4);
  text-underline-offset: 2px;
}
.docs-content a:hover { text-decoration-color: var(--mint-strong); }

.docs-lead {
  font-size: 17px; color: var(--text2); line-height: 1.6;
  margin-bottom: 32px;
}

/* Code */
.docs-content code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-mint); padding: 2px 7px; border-radius: 5px;
  color: var(--mint-deep);
  font-weight: 500;
}
.docs-content pre {
  background: var(--code-bg); color: var(--code-text);
  padding: 18px 22px; border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  margin: 16px 0;
  border: 1px solid rgba(34,197,94,0.2);
}
.docs-content pre code {
  background: none; padding: 0; color: inherit; font-size: inherit;
}
.docs-content pre .comment { color: var(--code-comment); font-style: italic; }
.docs-content pre .keyword { color: var(--code-keyword); }
.docs-content pre .string { color: var(--code-string); }

/* Tables */
.docs-content table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.docs-content th, .docs-content td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.docs-content th {
  background: var(--bg-mint);
  font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--mint-deep);
}
.docs-content tr:hover td { background: var(--bg-mint-soft); }
.docs-content tr:last-child td { border-bottom: none; }

/* Lists */
.docs-content ul, .docs-content ol {
  margin: 0 0 16px; padding-left: 24px;
}
.docs-content li { margin-bottom: 6px; line-height: 1.7; }
.docs-content ul li::marker { color: var(--mint-strong); }

/* Callouts */
.callout {
  padding: 16px 20px; border-radius: var(--radius);
  margin: 18px 0; font-size: 14px;
  border-left: 4px solid;
}
.callout-info {
  background: var(--bg-mint); border-color: var(--mint-strong); color: var(--text);
}
.callout-warning {
  background: #fffbeb; border-color: var(--amber); color: var(--text);
}
.callout-success {
  background: var(--bg-mint); border-color: var(--mint-strong); color: var(--text);
}
.callout-danger {
  background: #fef2f2; border-color: var(--red); color: var(--text);
}
.callout strong { font-weight: 700; }
.callout a { color: var(--mint-deep); }

/* Method labels for API */
.method {
  display: inline-block; font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: 6px; margin-right: 8px;
  vertical-align: middle;
}
.method-get { background: rgba(34,197,94,0.15); color: var(--mint-deep); }
.method-post { background: rgba(34,197,94,0.25); color: var(--mint-deep); }
.method-patch { background: rgba(245,158,11,0.15); color: var(--amber); }
.method-delete { background: rgba(239,68,68,0.15); color: var(--red); }

/* Compatibility cards */
.compat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin: 18px 0;
}
.compat-card {
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s, transform 0.15s;
}
.compat-card:hover {
  border-color: var(--mint-strong);
  transform: translateY(-2px);
}
.compat-card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--mint-mid), var(--mint-strong));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; margin-bottom: 12px;
}
.compat-card h4 { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.compat-card .sub { font-size: 12px; color: var(--text3); font-family: var(--mono); }

/* Footer */
.docs-footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text3); font-size: 13px;
  margin-top: 40px;
  background: var(--bg-mint-soft);
}
.docs-footer a { color: var(--text2); text-decoration: none; margin: 0 8px; font-weight: 500; }
.docs-footer a:hover { color: var(--mint-deep); }

/* Hero блок для index */
.docs-hero {
  padding: 56px 36px;
  background: linear-gradient(135deg, var(--bg-mint), #ecfccb);
  border-radius: 20px;
  text-align: center;
  margin-bottom: 36px;
  border: 1px solid var(--mint);
  position: relative;
  overflow: hidden;
}
.docs-hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--mint) 0%, transparent 70%);
  opacity: 0.4;
  border-radius: 50%;
}
.docs-hero h1 {
  font-size: 34px;
  margin: 0 0 10px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}
.docs-hero p {
  font-size: 16px;
  color: var(--text2);
  margin: 0;
  position: relative;
  z-index: 1;
}

.docs-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.docs-card {
  padding: 24px 26px; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: block;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.docs-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--mint-strong), var(--mint-deep));
  opacity: 0;
  transition: opacity 0.15s;
}
.docs-card:hover {
  border-color: var(--mint-strong);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(34,197,94,0.1);
}
.docs-card:hover::before { opacity: 1; }
.docs-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}
.docs-card h3 { font-size: 16px; margin: 0 0 6px; font-weight: 700; }
.docs-card p { font-size: 13px; color: var(--text2); margin: 0; line-height: 1.55; }
