/* ============================================================
   VPNVezdehod Manuals — Editorial Magazine Design
   Dark charcoal, Playfair Display headings, Onest body,
   orange (#FF6200) accents. Mobile-first responsive.
   ============================================================ */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700;800&family=Onest:wght@300;400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg:            #111115;
  --bg2:           #1a1a1e;
  --bg3:           #202025;
  --orange:        #FF6200;
  --orange-light:  #ff7a26;
  --text:          #d0d0d8;
  --text-muted:    #6a6a72;
  --text-light:    #f0f0f4;
  --rule:          rgba(255, 255, 255, 0.08);
  --rule-strong:   rgba(255, 255, 255, 0.15);

  --font-display:  'Manrope', 'Arial', sans-serif;
  --font-body:     'Onest', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --max-width:     1100px;
  --max-narrow:    720px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--orange);
  text-decoration: none;
}

::selection {
  background: var(--orange);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ============================================================
   SITE HEADER — editorial topbar
   ============================================================ */
.site-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--rule);
  padding: 0;
}

.site-header__brand {
  display: none; /* hidden — title contains the full name */
}

/* Repurpose the existing header structure as a single top bar */
.site-header {
  display: flex;
  align-items: stretch;
  position: relative;
}

.site-header__title {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header__title a {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-header__title a:hover {
  color: var(--orange);
}

/* Support link in header — inside the title bar, right side */
.site-header__support {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  text-decoration: none;
  transition: opacity 0.2s;
  margin-left: auto;
}

.site-header__support:hover {
  opacity: 0.7;
}

/* ============================================================
   LAYOUT CONTAINERS
   ============================================================ */
main {
  flex: 1;
  width: 100%;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--narrow {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================================
   INDEX INTRO — Editorial magazine header
   ============================================================ */
.index-intro {
  padding: 50px 0 40px;
  border-bottom: 3px solid var(--rule-strong);
  position: relative;
}

/* Eyebrow label via ::before on the wrapper */
.index-intro::before {
  content: 'Руководства пользователя';
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 18px;
}

/* Large editorial display title via ::after on the wrapper (above the <p>) */
/* We use ::after but visually position it before the <p> via flexbox trick */
.index-intro {
  display: flex;
  flex-direction: column;
}

.index-intro::after {
  content: 'Инструкции';
  order: -1;  /* place before the <p> element */
  font-family: var(--font-display);
  font-size: clamp(42px, 9vw, 90px);
  font-weight: 900;
  line-height: 0.92;
  color: var(--text-light);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

/* Subtitle / description paragraph */
.index-intro p {
  font-family: var(--font-body);
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  border-left: 3px solid var(--orange);
  padding-left: 20px;
  margin-top: 28px;
}

/* ============================================================
   PROXY BANNER — attention-grabbing link at top of index
   ============================================================ */
.proxy-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 28px;
  text-align: center;
  background: linear-gradient(135deg, #2a2a4a 0%, #1e3050 100%);
  border-left: 4px solid var(--orange);
  text-decoration: none;
  transition: filter 0.2s;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.proxy-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,98,0,0.08), transparent);
  animation: banner-shimmer 3s ease-in-out infinite;
}

@keyframes banner-shimmer {
  0%   { left: -100%; }
  50%  { left: 100%; }
  100% { left: 100%; }
}

.proxy-banner:hover {
  filter: brightness(1.1);
}

.proxy-banner__icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}

.proxy-banner__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 1;
}

.proxy-banner__text strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--orange);
}

.proxy-banner__text span {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   CATEGORIES WRAPPER
   ============================================================ */
.categories-wrapper {
  padding: 0 0 80px;
}

/* The wrapper acts as the categories-grid */
.categories-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* ============================================================
   CATEGORY SECTIONS — Editorial newspaper columns
   ============================================================ */

/* First category (.category-section:first-child) gets full-width feature treatment */
.category-section {
  padding: 44px 0;
  border-bottom: 1px solid var(--rule);
}

/* Category header */
.category-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

/* Icon becomes a small label pill — hide emoji, show protocol number via counter */
.categories-wrapper {
  counter-reset: category-counter;
}

.category-section {
  counter-increment: category-counter;
}

.category-icon {
  font-size: 0;        /* hide emoji */
  width: 0;
  height: 0;
  overflow: hidden;
  display: none;
}

/* Category label (e.g. "Протокол — 01") via pseudo on header */
.category-header::before {
  content: 'Раздел — ' counter(category-counter, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.category-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  line-height: 1;
  color: var(--text-light);
  letter-spacing: -0.02em;
  position: relative;
}

.category-subtitle {
  display: inline-block;
  margin-left: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.35em;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  vertical-align: middle;
  opacity: 0.8;
}

/* Orange thick underline beneath title */
.category-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin-top: 10px;
}

/* ============================================================
   MANUAL CARDS — editorial numbered list style
   ============================================================ */
.manuals-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  /* Counter for numbered items */
  counter-reset: manual-counter;
}

.manual-card {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: var(--text);
  background: transparent;
  position: relative;
  counter-increment: manual-counter;
  transition: color 0.2s;
}

.manual-card:last-child {
  border-bottom: none;
}

/* Hide the original arrow — replace with CSS counter number */
.manual-card__arrow {
  display: none;
}

/* Number badge via counter pseudo-element — matches article step-num style */
.manual-card::before {
  content: counter(manual-counter, decimal-leading-zero);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  background: linear-gradient(145deg, #FF7A1A 0%, #FF6200 50%, #E04E00 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%);
  box-shadow: 0 2px 6px rgba(255, 98, 0, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.manual-card__body {
  flex: 1;
  min-width: 0;
  position: relative;
}

.manual-card__title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  position: relative;
  display: inline;
}

/* Hover underline slides in from left */
.manual-card__title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Platform tags highlighted in titles */
.platform-tag {
  color: var(--orange);
  font-weight: 600;
}

.manual-card:hover .manual-card__title {
  color: var(--text-light);
}

.manual-card:hover .manual-card__title::after {
  width: 100%;
}

.manual-card:hover::before {
  opacity: 1;
}

.manual-card:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ============================================================
   DESKTOP LAYOUT — First category full-width feature,
   remaining categories in two-column grid
   ============================================================ */
@media (min-width: 768px) {
  .categories-wrapper {
    grid-template-columns: 1fr 1fr;
  }

  /* First child spans full width */
  .category-section:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
  }

  /* First child title gets larger display size */
  .category-section:first-child .category-title {
    font-size: clamp(32px, 6vw, 56px);
  }

  /* First child category header occupies left column */
  .category-section:first-child .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 0;
  }

  /* The manual grid fills the right column */
  .category-section:first-child .manuals-grid {
    align-self: start;
  }

  /* 2nd and 3rd category: left has right border */
  .category-section:nth-child(2) {
    padding-right: 48px;
    border-right: 1px solid var(--rule);
  }

  .category-section:nth-child(3) {
    padding-left: 48px;
  }

  /* Secondary categories (4th+) span full width and go into a multi-column row */
  .category-section:nth-child(n+4) {
    /* Will be handled individually below */
  }
}

@media (min-width: 900px) {
  .container,
  .container--narrow {
    padding: 0 30px;
  }

  .index-intro {
    padding: 50px 0 40px;
  }
}

/* ============================================================
   SECONDARY CATEGORIES — compact multi-column on desktop
   From the 4th category onward
   ============================================================ */
@media (min-width: 768px) {
  /* Group the secondary categories visually */
  .category-section:nth-child(n+4) {
    grid-column: auto;
  }

  /* Smaller title for secondary */
  .category-section:nth-child(n+4) .category-title {
    font-size: clamp(18px, 3vw, 24px);
    margin-bottom: 4px;
  }

  .category-section:nth-child(n+4) .category-title::after {
    width: 32px;
    height: 2px;
    margin-top: 8px;
    margin-bottom: 18px;
  }

  .category-section:nth-child(n+4) .manual-card__title {
    font-size: 13px;
  }

  .category-section:nth-child(n+4) .manual-card {
    padding: 8px 0;
  }
}

/* ============================================================
   SITE FOOTER — colophon style
   ============================================================ */
.site-footer {
  background: var(--bg2);
  border-top: 3px solid var(--rule-strong);
  padding: 0;
}

/* We hijack the footer spans for magazine colophon layout */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  max-width: 100%;
}

/* Inner layout */
.site-footer__brand,
.site-footer span:last-child {
  display: block;
}

/* Wrap the content */
.site-footer {
  padding: 36px 30px;
}

/* Footer brand title */
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--text-light);
  letter-spacing: -0.01em;
}

/* Colophon text */
.site-footer span:not(.site-footer__brand) {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* Niva section — above footer */
.niva-section {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(110deg, #1a1200 30%, #2a1e05 50%, #1a1200 70%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
}

.niva-section.loaded {
  animation: none;
  background: none;
}

.niva-section__img {
  display: inline-block;
  width: 600px;
  max-width: 90%;
  height: auto;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.niva-section__img:hover {
  opacity: 1;
}

/* Support link in footer */
.site-footer__support {
  display: block;
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  text-align: center;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.site-footer__support:hover {
  border-bottom-color: var(--orange);
}

.site-footer a {
  color: var(--orange);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   ARTICLE PAGE — BACK LINK
   ============================================================ */
.article-nav {
  padding: 1.5rem 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.back-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--orange);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-link:hover {
  color: var(--text-light);
}

.back-link:hover::after {
  width: 100%;
}

.back-link__arrow {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1;
}

.back-link:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ============================================================
   ARTICLE HEADER — editorial
   ============================================================ */
.article-header {
  padding: 2rem 0 1.5rem;
}

.article-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text-light);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

/* Orange underline accent below title */
.article-header__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--orange);
  margin-top: 18px;
}

.article-header__author {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-header__divider {
  border: none;
  border-top: 1px solid var(--rule-strong);
  margin: 0;
}

/* ============================================================
   ARTICLE CONTENT — clean editorial reading experience
   ============================================================ */
.article-content {
  padding: 2.5rem 0 4rem;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Headings */
.article-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
  color: var(--text-light);
  margin: 2.75rem 0 0.875rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 10px;
}

/* Orange underline on h3 */
.article-content h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--orange);
}

.article-content h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-light);
  margin: 2rem 0 0.65rem;
  letter-spacing: 0;
}

.article-content h3:first-child,
.article-content h4:first-child {
  margin-top: 0;
}

/* Paragraphs */
.article-content p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.article-content p:last-child {
  margin-bottom: 0;
}

/* Compact specs — consecutive p after h4 get tighter spacing */
.article-content h4 + p,
.article-content h4 + p + p,
.article-content h4 + p + p + p,
.article-content h4 + p + ul + p,
.article-content h4 + p + p + ul + p {
  margin-bottom: 0.4rem;
}

/* Step number badges — vivid orange gradient pills */
.article-content .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  padding: 0 0.55rem;
  margin-right: 0.7rem;
  background: linear-gradient(145deg, #FF7A1A 0%, #FF6200 50%, #E04E00 100%);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 0;
  /* Chamfered corner — clip bottom-right */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%);
  vertical-align: middle;
  position: relative;
  top: -1px;
  flex-shrink: 0;
  box-shadow:
    0 2px 8px rgba(255, 98, 0, 0.3),
    0 0 0 1px rgba(255, 98, 0, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

/* Inline links */
.article-content a {
  color: var(--text-light);
  text-decoration: none;
  border-bottom: 1px solid var(--orange);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}

.article-content a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange-light);
}

/* Strong */
.article-content strong {
  font-weight: 600;
  color: var(--text-light);
}

/* Em */
.article-content em {
  font-style: italic;
}

/* Underline */
.article-content u {
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 0.75rem 0 1.1rem 0;
  padding: 0;
  list-style: none;
}

.article-content li {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.45rem;
}

.article-content ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 400;
  font-size: 0.9rem;
}

/* ol items are converted to <p> with .step-num spans in build.js,
   so no CSS counter-based numbering is needed for ol li. */

/* Blockquote — editorial callout with orange left border */
.article-content blockquote {
  border-left: 3px solid var(--orange);
  padding: 0.875rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg2);
  font-family: var(--font-body);
  font-size: 0.975rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
}

.article-content blockquote strong {
  font-style: normal;
}

/* Inline code */
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--bg3);
  padding: 0.15em 0.45em;
  color: var(--orange-light);
  border-radius: 2px;
  word-break: break-all;
}

/* Pre block */
.article-content pre {
  background: var(--bg3);
  border-left: 3px solid var(--orange);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  word-break: break-all;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

/* Aside — info box */
.article-content aside {
  background: var(--bg2);
  border-left: 3px solid var(--orange-light);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.975rem;
  color: var(--text);
}

/* Horizontal Rule */
.article-content hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

/* Figures / Images — with loading shimmer */
.article-content figure {
  margin: 2rem 0;
  background: linear-gradient(110deg, #1a1200 30%, #2a1e05 50%, #1a1200 70%);
  background-size: 200% 100%;
  animation: img-shimmer 1.8s ease-in-out infinite;
  min-height: 60px;
}

@keyframes img-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Kill shimmer when image loaded — figure gets .loaded class via JS */
.article-content figure.loaded {
  animation: none;
  background: none;
}

.article-content figure img,
.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--rule-strong);
}

.article-content figcaption {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ============================================================
   RESPONSIVE — Mobile adjustments
   ============================================================ */
@media (max-width: 480px) {
  .index-intro p::before {
    font-size: clamp(32px, 12vw, 56px);
  }

  .site-footer {
    flex-direction: column;
    gap: 12px;
    padding: 24px 20px;
  }

  .container,
  .container--narrow {
    padding: 0 1rem;
  }

  .category-section {
    padding: 32px 0;
  }

  .category-title {
    font-size: clamp(24px, 8vw, 36px);
  }
}

@media (max-width: 767px) {
  .categories-wrapper {
    grid-template-columns: 1fr;
  }

  .category-section:nth-child(2),
  .category-section:nth-child(3) {
    padding-left: 0;
    padding-right: 0;
    border-right: none;
  }
}

/* ============================================================
   UTILITY
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   COPY BUTTON — on <code> elements in articles
   ============================================================ */
.article-content .code-wrap {
  display: block;
  margin: 0.75rem 0;
}

.article-content .code-wrap > code {
  display: block;
  padding: 14px 16px;
}

.article-content .copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.05em;
  transition: background 0.15s, color 0.15s;
}

.article-content .copy-btn:hover {
  background: rgba(255, 98, 0, 0.15);
  color: var(--orange);
}

.article-content .copy-btn:active {
  background: rgba(255, 98, 0, 0.25);
}

.article-content .copy-btn.copied {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
}

/* Pre blocks with copy button */
.article-content .pre-wrap {
  position: relative;
}

.article-content .pre-wrap .copy-btn {
  clip-path: none;
  margin-top: -1px;
}
