/* Метрика — тёмный строгий стиль (07.11.2026). Профиль «Метрика»: тёмная тема + акцент «лайм» —
   кандидат в канон гайдбука (D:\Claude\docs\guidebook, разделы 23 и 29), вносится отдельной правкой. */
:root {
  --bg: #0A0C0F; --bg-top: #101318; --surface: #13161A; --surface-2: #181C21; --raise: #1E2329;
  --line: #262B32; --line-soft: #1C2026;
  --text: #E9EDF2; --text-2: #A3ADB8; --text-3: #7D8894;
  --lime: #B6F23A; --lime-hi: #D9FF66; --lime-ink: #0B0D10; --lime-soft: rgba(182, 242, 58, .12); --lime-line: rgba(182, 242, 58, .38);
  --bad: #FF6B6B; --warn: #F5B84B;
  --s1: #B6F23A; --s2: #5AC8FA; --s3: #B18CFF; --s4: #F5B84B; --s5: #FF7A9A;
  --r: 14px; --r-sm: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  --font-d: "Segoe UI Variable Display", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: radial-gradient(1200px 500px at 15% -10%, #141922 0%, transparent 60%), var(--bg); color: var(--text);
  font: 15px/1.5 var(--font); min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) 48px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 5; background: rgba(10, 12, 15, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 60px; padding-bottom: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }
.brand b { font: 700 18px/1 var(--font-d); letter-spacing: .01em; }
.brand b span { color: var(--lime); }
.top nav { display: flex; gap: 4px; margin-left: 18px; }
.top nav a { color: var(--text-2); padding: 6px 12px; border-radius: var(--r-sm); font-size: 14px; }
.top nav a.on { color: var(--text); background: var(--surface-2); }
.top nav a:hover { color: var(--text); text-decoration: none; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.btn { font: inherit; font-size: 13px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 12px; cursor: pointer; }
.btn:hover { border-color: var(--text-3); }
.btn-main { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); font-weight: 600; }
.btn-main:hover { background: var(--lime-hi); border-color: var(--lime-hi); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

/* заголовок раздела */
.head { padding: 32px 0 8px; display: grid; gap: 8px; }
.head h1 { font: 600 30px/1.15 var(--font-d); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.lead { margin: 0; color: var(--text-2); max-width: 70ch; font-size: 16px; }
.lead b, .note b { color: var(--text); font-weight: 600; }
.cap { margin: 0; color: var(--text-3); font-size: 13px; }

/* вкладки */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 24px; }
.tab { font: inherit; font-size: 14px; background: none; border: 0; color: var(--text-2); padding: 10px 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected=true] { color: var(--text); border-bottom-color: var(--lime); }
.page { display: grid; gap: 22px; }
.page[hidden] { display: none; }

/* плитки */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.tile { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; display: grid; gap: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.tile.main { border-color: var(--lime-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px var(--lime-soft), 0 10px 40px -18px rgba(182, 242, 58, .35); }
.tile .lbl { color: var(--text-3); font-size: 13px; }
.tile .big { font: 600 34px/1.1 var(--font-d); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile.main .big { color: var(--lime); }
.tile .sub { color: var(--text-3); font-size: 13px; }

/* карточки и сетка */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 20px; min-width: 0;
  display: grid; gap: 10px; align-content: start; }
.card h2 { font: 600 16px/1.3 var(--font-d); margin: 0; }
.note { margin: 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.sec-h { font: 600 18px/1.3 var(--font-d); margin: 8px 0 0; }
.empty { border: 1px dashed var(--line); border-radius: var(--r); padding: 28px; color: var(--text-2); text-align: center; }
.chip { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.chip.no { color: var(--bad); border-color: rgba(255, 107, 107, .35); }
ul.list { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* таблицы */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.t th { text-align: right; font-weight: 500; color: var(--text-3); padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; }
.t td { text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.t th:first-child, .t td:first-child { text-align: left; }
.t tr:hover td { background: rgba(255, 255, 255, .02); }
.t tr.sum td { font-weight: 600; border-top: 1px solid var(--line); }
.ok { color: var(--lime); }
.bad { color: var(--bad); }
.bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--raise); vertical-align: middle; margin-left: 8px; }
.bar.hit { background: var(--lime); }

/* графики */
.chart { position: relative; min-height: 280px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .ax { fill: var(--text-3); font-size: 12px; }
.chart .grid-l { stroke: var(--line-soft); }
.chart .base-l { stroke: var(--line); }
.chart .goal-l { stroke: var(--lime); stroke-dasharray: 4 4; opacity: .6; }
.tip { position: absolute; pointer-events: none; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 10px; font-size: 12px; white-space: nowrap; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .7); z-index: 3; }
.tip .d { color: var(--text-3); margin-bottom: 2px; }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* вход */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth form { width: min(100%, 380px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px 28px; display: grid; gap: 14px; box-shadow: 0 30px 80px -40px rgba(182, 242, 58, .25); }
.auth .logo { width: 64px; height: 64px; }
.auth h1 { font: 600 22px/1.2 var(--font-d); margin: 4px 0 0; }
.auth label { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.auth input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; }
.auth input:focus { border-color: var(--lime-line); outline: none; box-shadow: 0 0 0 3px var(--lime-soft); }
.auth .err { color: var(--bad); font-size: 13px; margin: 0; }
.auth .btn-main { padding: 11px; font-size: 15px; }

@media (max-width: 640px) {
  .top nav { display: none; }
  .head h1 { font-size: 24px; }
  .tile .big { font-size: 28px; }
  .hide-n { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
