:root {
  --obsidian: #08080a; --onyx: #040406; --carbon: #121317; --graphite: #1c1d22;
  --slate: #2e3038; --smoke: #464853; --ash: #5e616e; --steel: #777a88; --fog: #9194a1;
  --mist: #acafb9; --silver: #c7c9d1; --bone: #e2e3e9; --white: #ffffff; --copper: #cc9166;
  --sage: #8fb59a; --rose: #c98a8a;
  --gild: linear-gradient(103deg, rgb(174,147,87), rgb(255,240,204) 40%, rgb(174,147,87) 70%, rgba(189,157,79,0));
  --serif: "Playfair Display", "DM Serif Display", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--obsidian); color: var(--bone); }
body { font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--copper); text-decoration: none; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: 1216px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* навигация */
nav.top { position: sticky; top: 0; z-index: 10; background: rgba(8,8,10,.86);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--graphite); }
nav.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font: 500 22px/1 var(--serif); color: var(--white); letter-spacing: .01em; }
.logo span { color: var(--copper); }
nav.top .spacer { flex: 1; }

/* кнопки и пилюли */
.btn { border-radius: 9999px; padding: 10px 20px; font-size: 14px; font-weight: 500; border: 0; }
.btn-primary { background: var(--white); color: #000; }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--white); }
.btn-ghost.subtle { border-color: var(--steel); color: var(--silver); }
.btn:disabled { opacity: .5; cursor: default; }
.pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--steel);
  border-radius: 9999px; padding: 4px 10px; font-size: 12px; font-weight: 500; color: var(--white); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--steel); }
.pill.ok { border-color: rgba(143,181,154,.5); color: var(--sage); } .pill.ok .dot { background: var(--sage); }
.pill.bad { border-color: rgba(201,138,138,.5); color: var(--rose); } .pill.bad .dot { background: var(--rose); }
.pill.warn { border-color: rgba(204,145,102,.5); color: var(--copper); } .pill.warn .dot { background: var(--copper); }

/* типографика */
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: -.02em; color: var(--copper); margin: 0 0 16px; }
.eyebrow.muted { color: var(--fog); }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: .01em; color: var(--white); margin: 0; }
h1 { font-size: clamp(52px, 9vw, 88px); line-height: 1; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.13; }
.sub { color: var(--fog); font-size: 18px; font-weight: 300; margin: 12px 0 0; }
.pos { color: var(--sage); } .neg { color: var(--rose); }

section { margin-top: 96px; }
section:first-of-type { margin-top: 64px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap; }

/* герой */
.hero { display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: stretch; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; margin-top: 48px; }
.stat .num { font: 400 32px/1 var(--serif); color: var(--white); }
.stat .cap { font-size: 14px; color: var(--fog); margin-top: 8px; }

.card { background: var(--onyx); border: 1px solid var(--graphite); border-radius: 10px; padding: 24px; }
.chart-card { display: flex; flex-direction: column; min-height: 360px; }
.chart-card header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.chart-card .big { font: 400 28px/1 var(--serif); color: var(--white); margin-top: 8px; }
.chart { flex: 1; margin-top: 16px; position: relative; min-height: 240px; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ash); font-size: 14px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--carbon); border: 1px solid var(--slate);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; color: var(--bone); white-space: nowrap; transform: translate(-50%, -120%); }

/* таблицы */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 400; color: var(--fog); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--graphite); white-space: nowrap; }
td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--graphite); color: var(--bone); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.pair { display: inline-flex; align-items: center; gap: 10px; color: var(--white); font-weight: 500; }
.coin { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--slate); display: grid; place-items: center;
  font-size: 10px; color: var(--silver); box-shadow: rgba(255,255,255,.2) 0 0 0 1px inset; }
.side { font-size: 12px; font-weight: 500; }
.empty-row td { color: var(--ash); text-align: center; padding: 32px 0; }
.note { color: var(--ash); font-size: 13px; margin-top: 16px; }

footer { margin: 160px 0 48px; padding-top: 24px; border-top: 1px solid var(--graphite); color: var(--ash); font-size: 13px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* вход */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-box { width: 100%; max-width: 420px; }
.login-box h1 { font-size: clamp(44px, 10vw, 64px); }
.login form { margin-top: 40px; display: flex; gap: 8px; border: 1px solid var(--white); border-radius: 9999px; padding: 6px 6px 6px 20px; }
.login input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--white); font: 400 16px var(--sans); }
.login input::placeholder { color: var(--steel); }
.login form:focus-within { box-shadow: 0 0 0 3px rgba(204,145,102,.25); }
.login .msg { min-height: 24px; margin-top: 16px; font-size: 14px; color: var(--rose); }
.flush { margin: 0; }
.sub.small { font-size: 14px; }

@media (max-width: 640px) {
  nav.top .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; padding-bottom: 12px; gap: 10px 8px; }
  nav.top .spacer { display: none; }
  nav.top .logo { flex: 1; }
  nav.top .pill { order: 3; }
  nav.top .btn { padding: 8px 14px; }
  .stats { gap: 24px 16px; margin-top: 32px; }
  section { margin-top: 72px; }
}
html, body { overflow-x: hidden; }
