@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap");

:root {
  --color-bg: #0a0e1a;
  --color-surface: rgba(5, 10, 18, 0.84);
  --color-surface-soft: rgba(17, 24, 39, 0.68);
  --color-accent: #1d9bf0;
  --color-accent-soft: rgba(29, 155, 240, 0.12);
  --color-text: #e2e8f0;
  --color-muted: #94a3b8;
  --color-border: rgba(255, 255, 255, 0.08);
  --font-body: "Inter", Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", Arial, sans-serif;
  --content-width: 1120px;
  --radius-card: 8px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.36);
  --bs-primary: #1d9bf0;
  --bs-primary-rgb: 29, 155, 240;
  --bs-body-bg: #0a0e1a;
  --bs-body-color: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    radial-gradient(circle at 18% 12%, rgba(29, 155, 240, 0.14), transparent 28%),
    radial-gradient(circle at 82% 10%, rgba(124, 111, 220, 0.14), transparent 30%),
    linear-gradient(rgba(10, 14, 26, 0.80), rgba(10, 14, 26, 0.94)),
    url("../img/DATA_8.jpg") center / cover fixed;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.76);
  outline-offset: 4px;
}

.web-stat-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 46px;
}

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 44px;
}

.top-nav a {
  min-width: 96px;
  padding: 10px 18px;
  border: 1px solid rgba(124, 111, 220, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(124, 111, 220, 0.58);
  color: #ffffff;
  font-size: 0.90rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 16px rgba(124, 111, 220, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.top-nav a:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 155, 240, 0.70);
  background: rgba(29, 155, 240, 0.36);
}

.article-shell {
  display: grid;
  gap: 24px;
}

.article-hero {
  text-align: center;
  padding: 30px 0 10px;
}

.status {
  display: inline-flex;
  width: fit-content;
  padding: 6px 11px;
  border: 1px solid rgba(29, 155, 240, 0.22);
  border-radius: var(--radius-pill);
  background: rgba(29, 155, 240, 0.08);
  color: var(--color-accent);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 920px;
  margin: 18px auto 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 0.96;
}

.article-hero h1 span {
  color: #7c6fdc;
}

.article-subtitle {
  max-width: 790px;
  margin: 22px auto 0;
  color: var(--color-muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.article-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.article-meta span,
.flow-strip span {
  padding: 7px 10px;
  border: 1px solid rgba(29, 155, 240, 0.24);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.12), rgba(125, 211, 252, 0.055)),
    rgba(5, 10, 18, 0.42);
  color: #d9f5ff;
  font-size: 0.78rem;
  font-weight: 800;
}

.article-card,
.article-cover,
.article-image,
.article-quote,
.article-comments {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.article-card,
.article-comments {
  padding: clamp(22px, 4vw, 34px);
}

.article-card h2,
.article-comments h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.article-card p,
.article-card li,
.article-comments p {
  color: var(--color-muted);
  line-height: 1.72;
}

.article-card code,
.article-card pre {
  color: #d9f5ff;
}

.article-cover,
.article-image {
  overflow: hidden;
}

.article-cover img,
.article-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-cover figcaption,
.article-image figcaption {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(29, 155, 240, 0.20);
  background:
    linear-gradient(90deg, rgba(245, 158, 11, 0.10), rgba(29, 155, 240, 0.06)),
    rgba(3, 8, 14, 0.82);
  color: var(--color-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.article-cover figcaption::before,
.article-image figcaption::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 2px;
  background: #f59e0b;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.26);
}

.flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.production-flow span {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.08);
  color: #ffe2b5;
}

.code-panel {
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid rgba(29, 155, 240, 0.24);
  border-radius: 10px;
  background: rgba(3, 8, 14, 0.86);
}

.code-title {
  padding: 10px 13px;
  border-bottom: 1px solid rgba(29, 155, 240, 0.18);
  color: #b7f7ff;
  font-size: 0.82rem;
  font-weight: 850;
}

.code-panel pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 0.90rem;
  line-height: 1.55;
}

.note-panel {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(57, 255, 136, 0.22);
  border-radius: 10px;
  background: rgba(57, 255, 136, 0.07);
  color: #d8ffe8;
  line-height: 1.62;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.result-grid div {
  padding: 18px;
  border: 1px solid rgba(29, 155, 240, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.10), rgba(124, 111, 220, 0.06)),
    rgba(3, 8, 14, 0.56);
  text-align: center;
}

.result-number {
  display: block;
  color: var(--color-accent);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1;
}

.result-grid p {
  margin: 8px 0 0;
  font-size: 0.88rem;
}

.lab-accordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: rgba(29, 155, 240, 0.18);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.18rem rgba(29, 155, 240, 0.20);
  --bs-accordion-active-color: #ffffff;
  --bs-accordion-active-bg: transparent;
}

.lab-accordion .accordion-item {
  overflow: hidden;
  border: 1px solid rgba(29, 155, 240, 0.16);
  border-radius: 10px;
  background: rgba(3, 8, 14, 0.50);
}

.lab-accordion .accordion-item + .accordion-item {
  margin-top: 10px;
}

.lab-accordion .accordion-button {
  background:
    linear-gradient(180deg, rgba(29, 155, 240, 0.18), rgba(29, 155, 240, 0.08)),
    rgba(3, 8, 14, 0.76);
  color: #d9f5ff;
  font-weight: 850;
}

.lab-accordion .accordion-button:not(.collapsed) {
  color: #ffffff;
  box-shadow: inset 3px 0 0 rgba(29, 155, 240, 0.78);
}

.lab-accordion .accordion-button::after {
  filter: invert(1) opacity(0.75);
}

.lab-accordion .accordion-body {
  color: var(--color-muted);
}

.improvement-list {
  margin-top: 18px;
}

.article-quote {
  padding: clamp(22px, 4vw, 34px);
  border-color: rgba(29, 155, 240, 0.28);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.45;
}

.article-neighbor-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.article-neighbor-nav a {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(29, 155, 240, 0.24);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.10), rgba(124, 111, 220, 0.08)),
    rgba(3, 8, 14, 0.70);
  color: var(--color-text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.article-neighbor-nav a:hover {
  transform: translateY(-2px);
  border-color: rgba(29, 155, 240, 0.58);
  background:
    linear-gradient(135deg, rgba(29, 155, 240, 0.16), rgba(124, 111, 220, 0.12)),
    rgba(3, 8, 14, 0.82);
}

.article-neighbor-nav span {
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-neighbor-nav strong {
  color: #ffffff;
  font-size: 0.96rem;
  line-height: 1.35;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(29, 155, 240, 0.38);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.82);
  color: var(--color-accent);
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #081018;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, var(--content-width));
    padding-top: 34px;
  }

  .top-nav a {
    min-width: 86px;
    padding: 9px 14px;
  }

  .article-hero h1 {
    font-size: clamp(2.2rem, 14vw, 3.4rem);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .article-card,
  .article-comments {
    padding: 20px;
  }

  .article-neighbor-nav {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    font-size: 0.85rem;
  }
}
