/* --- Variables and Global Resets --- */
:root {
  --bg-dark: #0a091a;
  --bg-offset: #0e0d21;
  --surface: rgba(22, 21, 46, 0.5);
  --text-primary: #e0e0ff;
  --text-secondary: #c4c4ee;
  --accent-1: #524af2;
  --accent-2: #a855f7;
  --border-color: rgba(255, 255, 255, 0.08);
  --silver-gradient: linear-gradient(180deg, #ffffff, #e0e0ff);
  --focus-ring: #ffffff;
  --focus-ring-shadow: rgba(168, 85, 247, 0.55);
  --shutdown-banner-height: 0px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px;
  scroll-padding-bottom: 120px;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.8;
  font-size: 16px;
}

main:focus {
  outline: none;
}

section,
[id] {
  scroll-margin-top: 110px;
  scroll-margin-bottom: 120px;
}

.gradient-text {
  background: var(--silver-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Header, Footer, Buttons --- */
.shutdown-banner {
  position: fixed;
  inset: 0 0 auto;
  z-index: 220;
  width: 100%;
  color: #ffffff;
  background: rgba(204, 112, 24, 0.44);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.shutdown-banner[hidden],
html.shutdown-banner-dismissed .shutdown-banner {
  display: none;
}

html.shutdown-banner-visible .shutdown-banner:not([hidden]) {
  display: block;
}

.shutdown-banner__link {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 20px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.32);
}

.shutdown-banner__inner {
  width: min(100%, 960px);
  min-height: 28px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 44px;
}

.shutdown-banner__link:hover .shutdown-banner__inner span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.shutdown-banner__icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: #ffffff;
  filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.35));
}

.shutdown-banner__close {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: max(12px, calc((100vw - 960px) / 2));
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: transparent;
  border: none;
  border-radius: 8px;
  filter: drop-shadow(0 1px 8px rgba(0, 0, 0, 0.65));
  cursor: pointer;
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.shutdown-banner__close:hover {
  color: #fff7ed;
  opacity: 0.82;
  transform: translateY(-50%) scale(1.04);
}

.shutdown-banner__close:active {
  transform: translateY(-50%) scale(0.96);
}

.main-header {
  position: fixed;
  top: calc(20px + var(--shutdown-banner-height));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 960px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .shutdown-banner {
    padding: 0;
  }

  .shutdown-banner__inner {
    min-height: 34px;
    gap: 8px;
    padding: 0 34px;
  }

  .shutdown-banner__link {
    align-items: center;
    font-size: 0.72rem;
    line-height: 1.3;
    min-height: 34px;
    padding: 5px 10px;
  }

  .shutdown-banner__icon {
    width: 16px;
    height: 16px;
    margin-top: 0;
  }

  .shutdown-banner__close {
    width: 30px;
    height: 30px;
    right: 8px;
  }
}

.logo {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: text-shadow 0.3s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.logo:hover {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.main-footer {
  padding: 50px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, transparent, rgba(10, 9, 26, 0.6));
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.footer-links a:hover {
  color: var(--accent-1);
  background: rgba(82, 74, 242, 0.1);
  transform: translateY(-2px) scale(1.05);
}

.footer-links svg {
  width: 22px;
  height: 22px;
}
.footer-links svg:not([fill='none']) {
  fill: currentColor;
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.footer-legal a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
}

.footer-legal a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.footer-legal a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-1);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-legal a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .footer-links {
    gap: 12px;
  }

  .footer-links a {
    padding: 8px;
  }

  .footer-links svg {
    width: 20px;
    height: 20px;
  }
}

/* -- Call to Action Button (e.g., GitHub Button) -- */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 28px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  text-decoration: none;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  border-radius: 99px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.4s ease,
    opacity 0.4s ease;
  text-align: center;
  align-self: flex-start;
  border: none;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  /* Ensure pointer cursor */
  min-height: 44px;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.cta-button svg {
  width: 20px;
  height: 20px;
}

.cta-button--disabled,
.cta-button--disabled:hover {
  background: rgba(160, 160, 204, 0.2);
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

/* -- Copy Button (Crypto Addresses) -- */
.copy-btn {
  background-color: var(--surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
  flex-shrink: 0;
  position: relative;
}

.copy-btn:hover {
  background-color: var(--accent-1);
  color: var(--text-primary);
  transform: scale(1.05);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

.copied-message {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background-color: var(--accent-2);
  color: var(--text-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  white-space: nowrap;
  z-index: 1000;
}

.copied-message.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.7);
  }

  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(168, 85, 247, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0);
  }
}

.copy-btn.pulsing {
  animation: pulse 0.6s ease-out;
}

/* --- Shared Layout & Base Animations --- */
.content-section {
  padding: 120px 20px;
}

@media (max-width: 768px) {
  .content-section {
    padding: 80px 16px;
  }
}

.container {
  max-width: 960px;
  margin: 0 auto;
}

/* REMOVED text-align: center */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

.section-header {
  margin-bottom: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: 40px;
  }
}

.section-header h2 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.2;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.parallax-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200vw;
  height: 200vh;
  z-index: -1;
  background: conic-gradient(
    from 180deg at 50% 50%,
    var(--accent-1) 0%,
    var(--accent-2) 30%,
    #0a091a 60%,
    var(--accent-1) 100%
  );
  animation: rotateBg 40s linear infinite;
  filter: blur(150px);
  opacity: 0.2;
}

@keyframes rotateBg {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* --- Cookie Notice (shared across all pages) --- */
.cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  width: calc(100% - 40px);
  max-width: 600px;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 12px 12px 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translate(-50%, 20px);
  animation: slideIn 0.5s 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
  pointer-events: auto;
}

.cookie-notice--hiding {
  animation: slideOut 0.35s cubic-bezier(0.16, 0, 0.3, 1) forwards;
  pointer-events: none;
}

.cookie-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cookie-notice svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--accent-2);
}

.cookie-notice p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  animation: none;
  opacity: 1;
}

.cookie-button {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: var(--text-primary);
  border: none;
  border-radius: 99px;
  padding: 8px 20px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  flex-shrink: 0;
  animation: none;
  opacity: 1;
  min-height: 44px;
}

.cookie-button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
  from {
    transform: translate(-50%, 20px);
    opacity: 0;
  }

  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translate(-50%, 0);
    opacity: 1;
  }

  to {
    transform: translate(-50%, 20px);
    opacity: 0;
  }
}

/* --- Global Navigation: Side Drawer & Overlay --- */
/* Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 500;
}

.nav-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Drawer */
.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(90vw, 360px);
  background: var(--surface);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.45);
  transform: translateX(105%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 600;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
  will-change: transform;
  display: flex;
  flex-direction: column;
}

.nav-drawer.is-open {
  transform: translateX(0);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

/* List */
.nav-list {
  list-style: none;
  padding: 12px 8px 110px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.nav-list > li {
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  transition: background 0.25s ease;
}

/* Highlight the entire submenu group (toggle + children) when open */
.nav-list > li.has-submenu.is-open {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-list a,
.submenu-toggle,
.submenu-disabled {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-decoration: none;
  color: var(--text-primary);
  background: transparent;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 13px 18px;
  border-radius: 11px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
  text-align: left;
  justify-content: flex-start;
  min-height: 44px;
}

.nav-list a:hover,
.submenu-toggle:hover {
  background: rgba(255, 255, 255, 0.09);
}

.submenu-disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
  opacity: 0.75;
}

.submenu-disabled svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-list a[aria-current='page'] {
  color: #ffffff;
  background: rgba(82, 74, 242, 0.24);
  border: 1px solid rgba(224, 224, 255, 0.18);
}

.nav-list a:active,
.submenu-toggle:active {
  transform: scale(0.98);
}

.nav-list a svg,
.submenu-toggle > svg {
  width: 21px;
  height: 21px;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-list a span:not(.toggle-icon),
.submenu-toggle > span:not(.toggle-icon) {
  flex: 1;
  letter-spacing: 0.01em;
}

/* Submenu toggle indicator */
.submenu-toggle {
  justify-content: flex-start;
}

.submenu-toggle .toggle-icon {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.submenu-toggle:hover .toggle-icon {
  opacity: 1;
}

.submenu-toggle .toggle-icon svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.has-submenu.is-open .submenu-toggle .toggle-icon svg {
  transform: rotate(90deg);
}

/* Submenu - Clean Panel System */
.has-submenu .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    max-height 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
    padding 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.has-submenu.is-open .submenu {
  max-height: 500px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 4px;
  padding: 0;
  transition:
    max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ensure hidden submenus don't take space */
.has-submenu .submenu[hidden] {
  display: none;
}

/* Submenu items styling */
.has-submenu .submenu li {
  margin: 2px 0;
}

.has-submenu .submenu li:first-child {
  margin-top: 0;
}

.has-submenu .submenu li:last-child {
  margin-bottom: 0;
}

.has-submenu .submenu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 9px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.has-submenu .submenu li a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.has-submenu .submenu li a:active {
  transform: scale(0.98);
}

.has-submenu .submenu li a svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.has-submenu .submenu li a:hover svg {
  opacity: 1;
}

/* Submenu item animations - refined fade and slide */
.has-submenu .submenu li {
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition:
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 0.3s ease;
}

/* Opening: elegant staggered cascade with bounce */
.has-submenu.is-open .submenu li {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.3s ease;
}

.has-submenu.is-open .submenu li:nth-child(1) {
  transition-delay: 0.06s;
}

.has-submenu.is-open .submenu li:nth-child(2) {
  transition-delay: 0.12s;
}

.has-submenu.is-open .submenu li:nth-child(3) {
  transition-delay: 0.18s;
}

.has-submenu.is-open .submenu li:nth-child(4) {
  transition-delay: 0.24s;
}

/* Closing: smooth simultaneous fade out */
.has-submenu:not(.is-open) .submenu li {
  transition-delay: 0s;
  transition:
    opacity 0.25s cubic-bezier(0.4, 0, 1, 1),
    transform 0.3s cubic-bezier(0.6, 0, 1, 1);
  transform: translateY(-6px) scale(0.98);
}

/* Nav Footer */
.nav-footer {
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  margin-top: auto;
  z-index: 10;
  padding: 18px 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, transparent, rgba(10, 9, 26, 0.5) 30%, var(--bg-dark));
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.nav-footer-links {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.nav-footer-links a {
  color: var(--text-secondary);
  transition:
    color 0.2s ease,
    transform 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
  min-width: 44px;
  min-height: 44px;
}

.nav-footer-links a:hover {
  color: var(--accent-1);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.nav-footer-links svg {
  width: 22px;
  height: 22px;
}
.nav-footer-links svg:not([fill='none']) {
  fill: currentColor;
}

.nav-footer-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  font-weight: 400;
  opacity: 0.85;
}

/* Hamburger to X - FIXED */
.hamburger-menu {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
}

.hamburger-menu .line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition:
    transform 0.3s cubic-bezier(0.2, 1, 0.3, 1),
    opacity 0.2s ease,
    box-shadow 0.3s ease;
  position: absolute;
}

.hamburger-menu:hover .line {
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.hamburger-menu .line:nth-child(1) {
  transform: translateY(-6px);
}

.hamburger-menu .line:nth-child(2) {
  transform: translateY(0);
}

.hamburger-menu .line:nth-child(3) {
  transform: translateY(6px);
}

.hamburger-menu.active .line:nth-child(1) {
  transform: translateY(0) rotate(45deg);
}

.hamburger-menu.active .line:nth-child(2) {
  opacity: 0;
  transform: translateY(0) scale(0.8);
}

.hamburger-menu.active .line:nth-child(3) {
  transform: translateY(0) rotate(-45deg);
}

/* Version Footer (injected by version.js) */
.version-footer {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  flex-wrap: wrap;
  font-family: monospace;
}

.version-footer-svg {
  display: flex;
  align-items: center;
}

.version-footer-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.version-footer-link:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.version-footer-sep {
  opacity: 0.5;
}

.version-footer-msg {
  font-style: italic;
  opacity: 0.8;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Scroll lock */
.body-lock {
  overflow: hidden;
}

/* --- Accessibility: Visually Hidden (screen-reader only) --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.visually-hidden:focus,
.visually-hidden:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  width: auto;
  height: auto;
  padding: 10px 16px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: #ffffff;
  background: var(--bg-dark);
  border: 2px solid var(--focus-ring);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  box-shadow:
    0 0 0 4px var(--focus-ring-shadow),
    0 8px 24px rgba(0, 0, 0, 0.45);
}

/* --- Accessibility: Focus Visible --- */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--focus-ring-shadow);
}

.main-header.header-hidden:focus-within {
  transform: translateX(-50%) translateY(0);
}

.nav-drawer :focus-visible,
.dns-modal-overlay :focus-visible,
.cookie-notice :focus-visible,
.tts-floating-bubble :focus-visible {
  position: relative;
  z-index: 2;
}

/* --- Accessibility: Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
