/* GraphLog — тема по умолчанию тёмная; светлая включается при prefers-color-scheme: light */
:root {
  color-scheme: dark;
  --bg: #0a0e17;
  --bg-soft: #0e131f;
  --panel: #121a28;
  --panel-2: #0f1623;
  --ink: #eaf0fa;
  --ink-dim: #c3cede;
  --muted: #8d9bb2;
  --line: #222d40;
  --line-soft: #1a2231;
  --green: #3fd37f;
  --amber: #f7b63c;
  --accent: #5b9bf5;
  --accent-ink: #0a0e17;
  --danger-bg: #2a1518;
  --danger-line: #5a2a2f;
  --danger-ink: #f3a9a9;
  --info-bg: #10233a;
  --info-line: #244a73;
  --info-ink: #a6cdf5;
  --notice-bg: #241d0e;
  --notice-line: #5c4a1e;
  --notice-ink: #f1d79a;
  --code-bg: #0b111d;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1020px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-soft: #eef2f8;
    --panel: #ffffff;
    --panel-2: #fbfcfe;
    --ink: #121a28;
    --ink-dim: #2a3444;
    --muted: #5c6a80;
    --line: #e2e8f1;
    --line-soft: #eef2f7;
    --green: #1f9d57;
    --amber: #c98610;
    --accent: #2f6fd6;
    --accent-ink: #ffffff;
    --danger-bg: #fdecec;
    --danger-line: #f2bcbc;
    --danger-ink: #a11f1f;
    --info-bg: #eef4fc;
    --info-line: #cadcf3;
    --info-ink: #1d4f86;
    --notice-bg: #fff7e6;
    --notice-line: #f0d79a;
    --notice-ink: #825c0e;
    --code-bg: #0f1623;
    --shadow: 0 1px 2px rgba(20,35,65,.06), 0 14px 34px rgba(20,35,65,.08);
    --shadow-sm: 0 1px 2px rgba(20,35,65,.07);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* мягкое свечение фона вверху страницы */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 620px;
  background:
    radial-gradient(900px 420px at 18% -8%, rgba(91,155,245,.16), transparent 60%),
    radial-gradient(760px 420px at 92% -12%, rgba(63,211,127,.12), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
@media (prefers-color-scheme: light) {
  body::before {
    background:
      radial-gradient(900px 420px at 18% -10%, rgba(47,111,214,.10), transparent 60%),
      radial-gradient(760px 420px at 92% -14%, rgba(31,157,87,.08), transparent 62%);
  }
}
main, header, footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Шапка ─────────────────────────────── */
header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: .2px; }
.logo:hover { text-decoration: none; }
.logo i { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.logo i b { display: block; width: 5px; border-radius: 2px; }
.logo i b:nth-child(1) { height: 9px;  background: var(--green); }
.logo i b:nth-child(2) { height: 14px; background: var(--green); }
.logo i b:nth-child(3) { height: 20px; background: var(--amber); }
nav { display: flex; align-items: center; gap: 4px; }
nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
nav a:hover { color: var(--ink); text-decoration: none; background: var(--line-soft); }
nav a.btn {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 600;
  padding: 8px 16px;
  margin-left: 6px;
}
nav a.btn:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); color: var(--accent-ink); }

/* ── Hero ──────────────────────────────── */
.hero { padding: 72px 0 52px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .3px;
  color: var(--ink-dim);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; margin: 0 0 20px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 800; }
.hero h1 .accent { background: linear-gradient(92deg, var(--green), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { color: var(--muted); font-size: clamp(16px, 2.3vw, 19px); margin: 0 0 28px; max-width: 46ch; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn-lg {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 650; font-size: 16px;
  padding: 13px 22px; border-radius: 11px;
  box-shadow: var(--shadow-sm);
}
.btn-lg:hover { text-decoration: none; background: color-mix(in srgb, var(--accent) 88%, #fff); transform: translateY(-1px); }
.btn-ghost { color: var(--ink-dim); font-weight: 550; font-size: 15px; }
.btn-ghost:hover { color: var(--ink); text-decoration: none; }

/* макет личного кабинета */
.dash {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.dash-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.dash-bar .tl { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dash-bar .tl:nth-child(1) { background: #e5685f; }
.dash-bar .tl:nth-child(2) { background: #e9b949; }
.dash-bar .tl:nth-child(3) { background: #54c07a; }
.dash-bar .tt { margin-left: 8px; font-size: 12px; color: var(--muted); }
.dash-body { padding: 20px; }
.dash-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.dash-head .site { font-weight: 650; font-size: 15px; }
.dash-head .demo-tag { font-size: 11px; color: var(--muted); border: 1px dashed var(--line); padding: 2px 8px; border-radius: 999px; }
.stat-row { display: flex; gap: 22px; margin: 12px 0 18px; }
.stat .n { font-size: 26px; font-weight: 800; letter-spacing: -.01em; line-height: 1; }
.stat .n.today { color: var(--amber); }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 5px; }
.chart { width: 100%; height: 132px; display: block; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .bar { fill: var(--green); transform-box: fill-box; transform-origin: bottom; animation: grow .6s cubic-bezier(.22,.8,.3,1) backwards; }
.chart .bar.last { fill: var(--amber); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.dash-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.dash-foot .cnt { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.dash-foot .cnt img { image-rendering: pixelated; image-rendering: crisp-edges; border-radius: 3px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.legend .g::before { background: var(--green); }
.legend .a::before { background: var(--amber); }

/* ── Плашка «регистрация приостановлена» ─ */
.notice {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--notice-ink);
  border-radius: var(--radius); padding: 15px 18px; margin: 8px 0 64px; font-size: 15px;
}
.notice svg { flex: none; margin-top: 2px; }

/* ── Секции ────────────────────────────── */
.section { padding: 8px 0 20px; }
.section-head { max-width: 58ch; margin: 0 0 28px; }
.section-head h2 { font-size: clamp(23px, 3.4vw, 30px); letter-spacing: -.02em; margin: 0 0 8px; font-weight: 750; }
.section-head p { color: var(--muted); margin: 0; font-size: 16px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 72px; }
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card .ico {
  width: 42px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent); margin-bottom: 14px;
}
.card h3 { margin: 0 0 7px; font-size: 17px; font-weight: 650; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ── Установка ─────────────────────────── */
.install { margin-bottom: 72px; }
.code-card { background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.code-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 16px; border-bottom: 1px solid rgba(255,255,255,.07); }
.code-top .fname { font: 12px/1 ui-monospace, Consolas, "Courier New", monospace; color: #8aa0c0; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06); color: #cfe0f5;
  border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  padding: 6px 11px; font-size: 13px; font-weight: 550; cursor: pointer;
  transition: background .15s ease;
}
.copy-btn:hover { background: rgba(255,255,255,.12); }
.copy-btn.ok { color: #7ee2a6; border-color: rgba(126,226,166,.5); }
pre { margin: 0; padding: 18px 16px; overflow-x: auto; }
pre code { font: 13.5px/1.6 ui-monospace, Consolas, "Courier New", monospace; color: #dce6f3; white-space: pre; }
pre code .tag { color: #7fb4ff; }
pre code .attr { color: #8ad6a6; }
pre code .val { color: #f0c475; }
.install .hint { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* ── FAQ ───────────────────────────────── */
.faq { margin-bottom: 72px; }
.faq details {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0; margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 48px 16px 18px;
  font-weight: 600; font-size: 15.5px; position: relative; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 18px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > p { margin: 0; padding: 0 18px 18px; color: var(--muted); font-size: 14.5px; }

/* ── Подвал ────────────────────────────── */
footer { border-top: 1px solid var(--line-soft); padding: 28px 0 40px; color: var(--muted); font-size: 13.5px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
footer .node { font: 12.5px/1 ui-monospace, Consolas, monospace; color: var(--muted); }

/* ── Вход ──────────────────────────────── */
.auth { min-height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; padding: 48px 24px 64px; }
.box {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 30px; box-shadow: var(--shadow);
}
.box .lock {
  width: 44px; height: 44px; border-radius: 12px; margin: 0 0 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.box h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
.box .sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.box label { display: block; font-size: 13.5px; font-weight: 550; margin: 16px 0 7px; color: var(--ink-dim); }
.box input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; background: var(--bg-soft); color: var(--ink);
}
.box input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.box button {
  width: 100%; margin-top: 22px; padding: 12px; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 650; cursor: pointer;
  transition: background .15s ease;
}
.box button:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.box button:disabled { opacity: .6; cursor: default; }
.box .row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-top: 16px; }
.box .row .small { color: var(--muted); }
.err { display: none; background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--danger-ink); border-radius: 10px; padding: 10px 13px; font-size: 14px; margin-top: 18px; }
.info { display: none; background: var(--info-bg); border: 1px solid var(--info-line); color: var(--info-ink); border-radius: 10px; padding: 10px 13px; font-size: 14px; margin-top: 18px; }

/* ── 404 ───────────────────────────────── */
.nf { text-align: center; padding: 110px 0 120px; }
.nf .big { font-size: clamp(72px, 16vw, 120px); font-weight: 850; line-height: 1; letter-spacing: -.04em; margin: 0; background: linear-gradient(92deg, var(--green), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { color: var(--muted); font-size: 17px; margin: 14px 0 0; }

/* ── Адаптив ───────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 48px 0 40px; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .cards { grid-template-columns: 1fr; margin-bottom: 56px; }
  .hero { padding: 36px 0 32px; }
  nav a.nav-link { display: none; }
  .stat-row { gap: 18px; }
  .notice { margin-bottom: 48px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .cta-row { gap: 12px; }
  .btn-lg { width: 100%; justify-content: center; }
}

/* ── Уважение к reduced-motion ─────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .chart .bar { transform: none !important; }
}
