/* ======================================================
   Tuman VPN — Battery Stability Guide
   Editorial Diagnostic Manual
   ====================================================== */

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

:root {
  /* — Color palette — */
  --color-bg: #070709;
  --color-bg-soft: #0c0e12;

  --color-text: #ece9e3;
  --color-text-warm: #d4cfc6;
  --color-text-muted: #8b8680;
  --color-text-dim: rgba(232, 230, 227, 0.38);

  --color-accent: #5cb88a;
  --color-accent-bright: #7ed5a5;
  --color-accent-deep: #358d67;
  --color-accent-glow: rgba(92, 184, 138, 0.18);
  --color-blue: #6bb6e0;

  --color-high: #e85d4f;
  --color-high-soft: rgba(232, 93, 79, 0.12);
  --color-mid: #e6a23c;
  --color-mid-soft: rgba(230, 162, 60, 0.10);
  --color-low: #6c7480;
  --color-low-soft: rgba(108, 116, 128, 0.08);

  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-surface: rgba(255, 255, 255, 0.025);
  --color-surface-soft: rgba(255, 255, 255, 0.045);

  /* — Typography — */
  --font-display: 'PT Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, monospace;

  /* — Layout — */
  --container-max: 920px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* — Atmospheric backdrop: drifting fog matches main site — */
body::before {
  content: '';
  position: fixed;
  inset: -10%;
  z-index: -2;
  background:
    radial-gradient(ellipse 70% 50% at 30% 10%, rgba(53, 141, 103, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 0%, rgba(45, 110, 156, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(53, 141, 103, 0.05) 0%, transparent 60%);
  animation: fog-drift 32s ease-in-out infinite alternate;
  filter: blur(20px);
}

@keyframes fog-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(2%, -1%) scale(1.04); }
  100% { transform: translate(-2%, 1.5%) scale(1.02); }
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* — Container — */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1.75rem 2rem 4rem;
  position: relative;
}

/* (removed decorative crosshair — was overlapping language selector) */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--color-accent-bright);
}

/* — Header — */
.header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3rem;
}

.header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text);
}

.header__logo::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 14px var(--color-accent-glow);
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.header__logo:hover {
  color: var(--color-text);
}

.header__lang {
  display: flex;
  gap: 0.125rem;
}

.header__lang a {
  padding: 0.375rem 0.625rem;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.header__lang a:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.header__lang a.active {
  color: var(--color-text);
  background: var(--color-surface-soft);
  border-color: var(--color-border);
}

/* — Detected device banner — */
.detected-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.375rem;
  background: linear-gradient(135deg, rgba(92, 184, 138, 0.08) 0%, rgba(107, 182, 224, 0.04) 100%);
  border: 1px solid rgba(92, 184, 138, 0.22);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.detected-banner.visible {
  display: flex;
  animation: fadeInUp 0.5s ease-out;
}

.detected-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 184, 138, 0.5), transparent);
}

.detected-banner__text {
  font-size: 0.875rem;
  color: var(--color-text-warm);
}

.detected-banner__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(92, 184, 138, 0.16);
  border: 1px solid rgba(92, 184, 138, 0.32);
  border-radius: 9999px;
  color: var(--color-accent-bright);
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.detected-banner__link::after {
  content: '\2192';
  display: inline-block;
  transition: transform 0.2s ease;
}

.detected-banner__link:hover {
  background: rgba(92, 184, 138, 0.26);
  border-color: rgba(92, 184, 138, 0.5);
  color: var(--color-accent-bright);
}

.detected-banner__link:hover::after {
  transform: translateX(3px);
}

/* — HERO: clean left-aligned editorial — */
.hero {
  margin-bottom: 3rem;
  padding-top: 0.5rem;
  max-width: 640px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.6vw, 3.125rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  font-size: 1.0625rem;
  color: var(--color-text-warm);
  line-height: 1.55;
  max-width: 52ch;
  font-weight: 400;
}

@media (max-width: 720px) {
  .hero__subtitle {
    font-size: 1rem;
  }
}

/* — Explainer (collapsible) — */
.explainer-details {
  margin-bottom: 3rem;
}

.explainer-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-warm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  list-style: none;
  transition: all 0.2s ease;
}

.explainer-summary::-webkit-details-marker { display: none; }

.explainer-summary::before {
  content: '+';
  display: inline-block;
  width: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 400;
  transition: transform 0.2s ease;
}

.explainer-details[open] .explainer-summary::before {
  content: '\2212';
}

.explainer-summary:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-soft);
  color: var(--color-text);
}

.explainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-border);
}

.explainer__card {
  position: relative;
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.explainer__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.625rem;
  color: var(--color-text);
}

.explainer__text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

@media (max-width: 720px) {
  .explainer {
    grid-template-columns: 1fr;
  }
}

/* — Section divider — */
.section-divider {
  height: 1px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  margin: 2.5rem 0 2rem;
}

/* — Section — */
.section {
  margin-bottom: 3rem;
}

.section__title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.section__title::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--color-text-dim);
  flex-shrink: 0;
}

.section__title::after {
  content: '';
  display: block;
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* — OEM device grid — */
.oem-grid {
  counter-reset: oem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 720px) {
  .oem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .oem-grid {
    grid-template-columns: 1fr;
  }
}

/* — OEM card — editorial card with index numeral — */
.oem-card {
  counter-increment: oem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 152px;
  padding: 1.25rem 1.25rem 1.125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top-width: 2px;
  border-radius: var(--radius-lg);
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.32s ease;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Editorial italic numeral in top-right corner */
.oem-card::before {
  content: counter(oem, decimal-leading-zero);
  position: absolute;
  top: 0.875rem;
  right: 1.125rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-text-dim);
  z-index: 1;
  transition: color 0.3s ease;
}

/* Hover glow */
.oem-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--color-accent-glow), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  border-radius: var(--radius-lg);
}

.oem-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-strong);
  background: var(--color-surface-soft);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(92, 184, 138, 0.05);
}

.oem-card:hover::before {
  color: var(--color-accent-bright);
}

.oem-card:hover::after {
  opacity: 1;
}

.oem-card.highlighted {
  border-color: rgba(92, 184, 138, 0.32);
  background: rgba(92, 184, 138, 0.04);
}

.oem-card.highlighted::before {
  color: var(--color-accent);
}

.oem-card__info {
  position: relative;
  z-index: 2;
  padding-right: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.oem-card__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.oem-card__severity-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Severity meter — segmented bar above the label */
.oem-card__severity-label::before {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 1px;
  background-image: linear-gradient(90deg,
    currentColor 0%, currentColor calc(var(--fill, 30%) - 1px),
    rgba(255, 255, 255, 0.08) calc(var(--fill, 30%) - 1px),
    rgba(255, 255, 255, 0.08) 100%);
}

/* Severity colors + meter fill */
.oem-card[data-severity="high"] {
  border-top-color: rgba(232, 93, 79, 0.55);
}

.oem-card[data-severity="high"] .oem-card__severity-label {
  color: var(--color-high);
  --fill: 100%;
}

.oem-card[data-severity="high"] .oem-card__severity-label::before {
  box-shadow: 0 0 10px rgba(232, 93, 79, 0.45);
}

.oem-card[data-severity="mid"] {
  border-top-color: rgba(230, 162, 60, 0.45);
}

.oem-card[data-severity="mid"] .oem-card__severity-label {
  color: var(--color-mid);
  --fill: 65%;
}

.oem-card[data-severity="mid"] .oem-card__severity-label::before {
  box-shadow: 0 0 8px rgba(230, 162, 60, 0.3);
}

.oem-card[data-severity="low"] {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.oem-card[data-severity="low"] .oem-card__severity-label {
  color: var(--color-low);
  --fill: 30%;
}

/* Staggered fade-in */
.oem-card:nth-child(1)  { animation-delay: 0.04s; }
.oem-card:nth-child(2)  { animation-delay: 0.08s; }
.oem-card:nth-child(3)  { animation-delay: 0.12s; }
.oem-card:nth-child(4)  { animation-delay: 0.16s; }
.oem-card:nth-child(5)  { animation-delay: 0.20s; }
.oem-card:nth-child(6)  { animation-delay: 0.24s; }
.oem-card:nth-child(7)  { animation-delay: 0.28s; }
.oem-card:nth-child(8)  { animation-delay: 0.32s; }
.oem-card:nth-child(9)  { animation-delay: 0.36s; }
.oem-card:nth-child(10) { animation-delay: 0.40s; }
.oem-card:nth-child(11) { animation-delay: 0.44s; }
.oem-card:nth-child(12) { animation-delay: 0.48s; }
.oem-card:nth-child(13) { animation-delay: 0.52s; }
.oem-card:nth-child(14) { animation-delay: 0.56s; }
.oem-card:nth-child(15) { animation-delay: 0.60s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* — Always-on tip box — */
.tip {
  position: relative;
  padding: 1.5rem 1.75rem 1.625rem;
  background: linear-gradient(135deg, rgba(53, 141, 103, 0.09) 0%, rgba(53, 141, 103, 0.02) 100%);
  border: 1px solid rgba(92, 184, 138, 0.2);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
  font-size: 0.9375rem;
  color: var(--color-text-warm);
  line-height: 1.6;
  overflow: hidden;
}

.tip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 184, 138, 0.5), transparent);
}

.tip::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(92, 184, 138, 0.07), transparent 60%);
  pointer-events: none;
}

.tip__title {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.tip br {
  display: none;
}

.tip strong {
  display: block;
  width: fit-content;
  margin-top: 1.375rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
  background: rgba(92, 184, 138, 0.08);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  border: 1px solid rgba(92, 184, 138, 0.18);
  position: relative;
  z-index: 1;
}

/* ======================================================
   GUIDE PAGE STYLES
   ====================================================== */

/* — Back link —
   Hidden by default. Shown only when the head referrer-visibility script
   has flagged this page as a same-origin entry (i.e. the user navigated
   from the landing or another page on this site). See "Referrer-based
   visibility" near the bottom of this file. */
.back-link {
  display: none;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 2.25rem;
  padding: 0.5rem 1.125rem 0.5rem 0.875rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-text-warm);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 9999px;
  transition: all 0.22s ease;
  text-transform: none;
}

.back-link::before {
  content: '\2190';
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1;
  color: currentColor;
  transition: transform 0.22s ease;
}

.back-link:hover {
  background: var(--color-surface-soft);
  border-color: rgba(92, 184, 138, 0.3);
  color: var(--color-text);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.back-link:hover::before {
  transform: translateX(-2px);
}

/* — Guide header — */
.guide-header {
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.guide-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.guide-header__severity {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.guide-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 0.625rem;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.guide-header__badge::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 3px;
  border-radius: 1px;
}

.guide-header__badge.high {
  background: rgba(232, 93, 79, 0.08);
  border-color: rgba(232, 93, 79, 0.3);
  color: var(--color-high);
}

.guide-header__badge.high::before {
  background: var(--color-high);
  box-shadow: 0 0 10px rgba(232, 93, 79, 0.45);
}

.guide-header__badge.mid {
  background: rgba(230, 162, 60, 0.08);
  border-color: rgba(230, 162, 60, 0.28);
  color: var(--color-mid);
}

.guide-header__badge.mid::before {
  background: linear-gradient(90deg, var(--color-mid) 0%, var(--color-mid) 65%, rgba(255,255,255,0.08) 65%);
}

.guide-header__badge.low {
  background: rgba(108, 116, 128, 0.08);
  border-color: rgba(108, 116, 128, 0.25);
  color: var(--color-text-warm);
}

.guide-header__badge.low::before {
  background: linear-gradient(90deg, var(--color-low) 0%, var(--color-low) 30%, rgba(255,255,255,0.08) 30%);
}

/* — Steps — */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  gap: 1.25rem;
  padding: 1.375rem 1.5rem 1.375rem 1.375rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.45s ease-out forwards;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--color-accent-deep), transparent);
  opacity: 0.6;
}

.step:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-soft);
}

.step:nth-child(1) { animation-delay: 0.05s; }
.step:nth-child(2) { animation-delay: 0.10s; }
.step:nth-child(3) { animation-delay: 0.15s; }
.step:nth-child(4) { animation-delay: 0.20s; }
.step:nth-child(5) { animation-delay: 0.25s; }
.step:nth-child(6) { animation-delay: 0.30s; }

.step__number {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent-bright);
  background: rgba(92, 184, 138, 0.08);
  border: 1px solid rgba(92, 184, 138, 0.25);
  border-radius: 50%;
  margin-top: 1px;
  letter-spacing: -0.02em;
}

.step__content {
  flex: 1;
  min-width: 0;
}

.step__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.375rem;
  color: var(--color-text);
}

.step__description {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.step__auto {
  display: inline-block;
  margin-left: 0.375rem;
  padding: 0.125rem 0.5rem;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(92, 184, 138, 0.12);
  border: 1px solid rgba(92, 184, 138, 0.25);
  border-radius: var(--radius-sm);
}

/* — Screenshot — */
.screenshot {
  display: block;
  max-width: 280px;
  width: auto;
  height: auto;
  margin-top: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  opacity: 0.88;
  cursor: zoom-in;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.screenshot:hover {
  opacity: 1;
  transform: scale(1.015);
  border-color: var(--color-border-strong);
}

@media (max-width: 640px) {
  .screenshot {
    max-width: 220px;
  }
}

/* — Lightbox — */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
  animation: lightboxFade 0.25s ease-out;
}

@keyframes lightboxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: white;
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* — Disclaimer — */
.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(230, 162, 60, 0.05);
  border: 1px solid rgba(230, 162, 60, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: rgba(240, 198, 116, 0.85);
  margin-bottom: 1.5rem;
}

.disclaimer::before {
  content: 'i';
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(230, 162, 60, 0.4);
  border-radius: 50%;
  color: var(--color-mid);
  margin-top: 1px;
}

/* — Warning — */
.warning {
  position: relative;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(230, 162, 60, 0.08) 0%, rgba(230, 162, 60, 0.02) 100%);
  border: 1px solid rgba(230, 162, 60, 0.22);
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  color: var(--color-text-warm);
  line-height: 1.6;
  margin: 1.5rem 0;
  overflow: hidden;
}

.warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230, 162, 60, 0.45), transparent);
}

.warning__title {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-mid);
  margin-bottom: 0.5rem;
}

.warning__title::before {
  content: '!';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--color-mid);
  border-radius: 50%;
  color: var(--color-mid);
}

/* — Help CTA (still doesn't help?) — */
.help-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.25rem 1.5rem;
  margin-top: 3rem;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.015) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.help-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(92, 184, 138, 0.35), transparent);
}

.help-cta__text {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-warm);
  line-height: 1.4;
  max-width: 38ch;
  margin: 0;
}

.help-cta__button {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.5rem 0.75rem 1.625rem;
  background: linear-gradient(135deg, rgba(92, 184, 138, 0.18) 0%, rgba(107, 182, 224, 0.08) 100%);
  border: 1px solid rgba(92, 184, 138, 0.35);
  border-radius: 9999px;
  color: var(--color-accent-bright);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 0.22s ease;
  text-decoration: none;
}

.help-cta__button::after {
  content: '\2192';
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.22s ease;
}

.help-cta__button:hover {
  background: linear-gradient(135deg, rgba(92, 184, 138, 0.28) 0%, rgba(107, 182, 224, 0.14) 100%);
  border-color: rgba(92, 184, 138, 0.55);
  color: var(--color-accent-bright);
  box-shadow: 0 8px 30px rgba(92, 184, 138, 0.12);
  transform: translateY(-1px);
}

.help-cta__button:hover::after {
  transform: translateX(3px);
}

/* — Footer — */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-text-dim);
}

/* — Responsive — */
@media (max-width: 720px) {
  .container {
    padding: 1.5rem 1.25rem 3rem;
  }
  .header {
    margin-bottom: 2rem;
  }
  .hero {
    margin-bottom: 2rem;
  }
  .step {
    padding: 1.125rem 1.25rem 1.125rem 1.125rem;
    gap: 1rem;
  }
  .step__number {
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .help-cta {
    padding: 1.75rem 1rem;
  }
  .help-cta__text {
    font-size: 1rem;
  }
}

/* — Vendor-page-only spacing overrides —
   On vendor pages the explainer accordion is immediately followed by the
   device's guide-header, with no section divider between them. The default
   3rem bottom margin on .explainer-details leaves the device title feeling
   orphaned. Tighten the gap when (and only when) a guide-header follows the
   explainer directly. Landing pages have an <hr> + section between, so they
   are unaffected. */
.explainer-details:has(+ .guide-header) {
  margin-bottom: 1.5rem;
}

/* — Referrer-based visibility —
   The head <script> in each page sets `.from-same-origin` on <html> when
   document.referrer matches window.location.origin. Two opposite signals
   share that one class:

     1. Back link — only meaningful when there is somewhere on this site to
        go back to. Default state hides it (see .back-link rule above).
        Same-origin entry shows it.

     2. Hero + explainer — the framing for users with no other context.
        Vendor pages (marked with body.vendor-page) hide it on same-origin
        entry, because the user already saw the same framing on the
        landing they came from. Landing pages don't have body.vendor-page
        so landing→landing navigation (e.g. EN/RU language switch) keeps
        the landing's hero visible. */
html.from-same-origin .back-link {
  display: inline-flex;
}

html.from-same-origin body.vendor-page .hero,
html.from-same-origin body.vendor-page .explainer-details {
  display: none;
}

