:root {
  --bg: #0b0f19;
  --bg-elevated: #121826;
  --bg-card: #151c2c;
  --bg-card-hover: #1a2336;
  --border: #243044;
  --border-subtle: #1c2638;
  --text: #e8edf7;
  --text-muted: #9aa8c0;
  --text-dim: #6b7a94;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --success: #22c55e;
  --telegram: #2aabee;
  --telegram-hover: #1e96d4;
  --radius: 12px;
  --radius-sm: 8px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header-h: 64px;
  --max: 1120px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 48, 68, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 48, 68, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; position: relative; z-index: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 1rem; background: var(--accent); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { top: 0.75rem; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-h);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(59, 130, 246, 0.25);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 6px;
  border: 2px solid rgba(255,255,255,0.85); border-radius: 3px;
  border-top-color: transparent; border-left-color: transparent; transform: rotate(-45deg);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.02em; }
.brand-product { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.nav { display: flex; gap: 0.25rem; }
.nav-link {
  color: var(--text-muted); padding: 0.4rem 0.85rem; border-radius: 6px;
  font-size: 0.9rem; font-weight: 500; text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: transparent; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 1px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 0.65rem 1.15rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s; white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--text-dim); text-decoration: none; }
.btn-telegram { background: var(--telegram); color: #fff; font-size: 0.85rem; padding: 0.5rem 0.9rem; }
.btn-telegram:hover { background: var(--telegram-hover); text-decoration: none; color: #fff; }
.hero { padding: 4.5rem 0 3.5rem; position: relative; }
.hero-inner { text-align: center; max-width: 720px; margin-inline: auto; }
.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-hover); background: var(--accent-soft);
  padding: 0.35rem 0.75rem; border-radius: 999px; margin: 0 0 1.25rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.85rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 1rem; }
.hero-lead { font-size: 1.1rem; color: var(--text-muted); margin: 0 auto 2rem; max-width: 540px; }
.universal-search {
  display: flex; gap: 0.75rem; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem; box-shadow: var(--shadow); max-width: 560px; margin-inline: auto;
}
.universal-search input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text);
  font-family: inherit; font-size: 0.95rem; padding: 0.65rem 0.85rem; outline: none;
}
.universal-search input::placeholder { color: var(--text-dim); }
.universal-search .btn { flex-shrink: 0; }
.hero-note { margin: 1.25rem 0 0; font-size: 0.8rem; color: var(--text-dim); }
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-elevated); border-block: 1px solid var(--border-subtle); }
.section-header { text-align: center; margin-bottom: 2.5rem; max-width: 560px; margin-inline: auto; }
.section-header h2 { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.section-header p { margin: 0; color: var(--text-muted); font-size: 1rem; }
.categories { display: flex; flex-direction: column; gap: 2.5rem; }
.category { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 1.5rem 1.5rem 1.25rem; }
.category-header { margin-bottom: 1.25rem; }
.category-header h3 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 650; }
.category-header p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem; }
.tool-card {
  background: var(--bg); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem;
  transition: border-color 0.15s, background 0.15s;
}
.tool-card:hover { border-color: var(--border); background: var(--bg-card-hover); }
.tool-card h4 { margin: 0; font-size: 0.95rem; font-weight: 600; }
.tool-card p { margin: 0; font-size: 0.82rem; color: var(--text-muted); flex: 1; line-height: 1.45; }
.tool-card .card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.35rem; gap: 0.5rem; }
.badge {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 4px; background: rgba(107, 122, 148, 0.2); color: var(--text-dim);
}
.badge.available { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.tool-card .btn { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
.tool-card .btn:disabled, .tool-card .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.api-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; max-width: 640px; margin-inline: auto;
}
.api-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.method { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.25rem 0.5rem; border-radius: 4px; font-family: var(--mono); }
.method.get { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.endpoint { font-family: var(--mono); font-size: 0.95rem; color: var(--text); }
.api-desc { margin: 0 0 1rem; color: var(--text-muted); font-size: 0.9rem; }
.code-block {
  background: var(--bg); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem; overflow-x: auto; margin: 0 0 1rem; font-family: var(--mono);
  font-size: 0.82rem; line-height: 1.5; color: var(--text-muted);
}
.code-block code { font-family: inherit; }
.api-result {
  margin-top: 1rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem; font-family: var(--mono); font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; color: var(--text-muted);
}
.api-result.ok { border-color: rgba(34, 197, 94, 0.4); }
.api-result.err { border-color: rgba(239, 68, 68, 0.4); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; }
.about-grid h2 { margin: 0 0 1rem; font-size: 1.5rem; }
.about-grid p { color: var(--text-muted); margin: 0 0 1rem; font-size: 0.95rem; }
.about-points { display: grid; gap: 0.85rem; }
.point {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
  padding: 1rem 1.15rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.point strong { font-size: 0.9rem; }
.point span { font-size: 0.82rem; color: var(--text-muted); }
.site-footer { border-top: 1px solid var(--border-subtle); padding: 2rem 0; margin-top: 1rem; }
.footer-inner { text-align: center; }
.footer-brand { font-weight: 600; margin-bottom: 0.35rem; }
.footer-note, .footer-copy { margin: 0.25rem 0; font-size: 0.8rem; color: var(--text-dim); }
@media (max-width: 820px) {
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border); flex-direction: column; padding: 0.75rem;
  }
  .nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .about-grid { grid-template-columns: 1fr; }
  .universal-search { flex-direction: column; }
}
@media (max-width: 480px) {
  .header-inner { gap: 0.5rem; }
  .brand-product { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
}
