/* F6 — дизайн-система. Чёрное поле, крупная белая типографика в верхнем
   регистре, тонкие линии, один сигнальный акцент. */

:root {
  --bg: #050506;
  --bg-soft: #0b0b0d;
  --bg-raise: #121215;
  --fg: #ffffff;
  --muted: #9a9aa2;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.34);
  --accent: #ff3b2f;
  --ok: #35d39b;
  --warn: #ffc53d;
  --radius: 2px;
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 78%);
}

.clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 96px;
}

/* НАВИГАЦИЯ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 6, 0.82);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand__mark {
  width: 18px;
  height: 18px;
  background: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.nav a {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s ease;
}

.nav a:hover {
  color: var(--fg);
}

/* ТИПОГРАФИКА */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.display {
  margin: 0;
  font-size: clamp(34px, 6.4vw, 86px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-transform: uppercase;
}

.display--sm {
  font-size: clamp(26px, 3.6vw, 46px);
  letter-spacing: -0.02em;
}

h2.section {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.lede {
  max-width: 62ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.accent {
  color: var(--accent);
}

/* СЕКЦИИ */

.hero {
  padding: clamp(56px, 9vw, 120px) 0 clamp(36px, 5vw, 64px);
}

.section-block {
  padding: clamp(40px, 6vw, 76px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

/* СЕТКИ И КАРТОЧКИ */

.grid {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--two {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.grid--flush {
  border: 0;
  background: transparent;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--bg-soft);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

a.card:hover {
  background: var(--bg-raise);
  transform: translateY(-2px);
}

.card__index {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.card__title {
  margin: 0;
  color: var(--fg);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.card__text {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.panel {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.panel--tight {
  padding: 18px;
}

/* МЕТКИ */

.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--accent {
  border-color: var(--accent);
  color: var(--accent);
}

.badge--ok {
  border-color: var(--ok);
  color: var(--ok);
}

.badge--warn {
  border-color: var(--warn);
  color: var(--warn);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* КНОПКИ И ПОЛЯ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #050506;
  cursor: pointer;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--fg);
}

.btn--ghost:hover {
  border-color: var(--fg);
  background: transparent;
  color: var(--fg);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 22px;
}

.toolbar > * {
  flex: 1 1 180px;
}

.toolbar > .btn {
  flex: 0 0 auto;
}

/* ТАБЛИЦЫ */

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: left;
  text-transform: uppercase;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12.5px;
  vertical-align: top;
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* СТАТИСТИКА */

.stats {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat {
  padding: 18px;
  background: var(--bg-soft);
}

.stat__value {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat__label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.meter {
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.meter > i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

/* СЛУЖЕБНОЕ */

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.between {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.error {
  color: var(--accent);
}

.footer {
  padding: 34px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .nav {
    gap: 14px;
  }

  .nav {
    font-size: 11px;
  }

  .toolbar > * {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
