:root {
  --pu-bg: #0b1020;
  --pu-bg-2: #0e1628;
  --pu-card: #141e34;
  --pu-card-hover: #1a2744;
  --pu-text: rgba(255, 255, 255, 0.92);
  --pu-muted: rgba(255, 255, 255, 0.62);
  --pu-border: rgba(255, 255, 255, 0.08);
  --pu-accent: #8fdc4a;
  --pu-accent-hover: #a4ef5f;
  --pu-accent-text: #0b1020;
  --pu-accent-soft: rgba(143, 220, 74, 0.14);
  --header-h: 72px;
  --footer-h: 56px;
  --section-y: 72px;
  --max-w: 1280px;
  --content-max: 1040px;
  --nav-bp: 991px;
  --scrollbar-track: #0e1628;
  --scrollbar-thumb: rgba(143, 220, 74, 0.38);
  --scrollbar-thumb-hover: rgba(143, 220, 74, 0.62);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--pu-text);
  background: var(--pu-bg);
  line-height: 1.65;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

body.nav-open { overflow: hidden; }

/* ── Scrollbars ── */

html,
.site-main,
.mobile-nav,
.lightbox-thumbs {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(var(--max-w), 100%);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ── Fixed header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pu-border);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand .pu-unit,
.footer-brand .pu-unit,
.pu-unit {
  color: var(--pu-accent);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.desktop-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--pu-muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.desktop-nav a:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.06);
}

.desktop-nav a.active,
.desktop-nav a[aria-current="page"] {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.35);
}

.nav-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  padding: 6px 28px 6px 10px;
  border: 0;
  border-radius: 999px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8b0c4' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--pu-muted);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--pu-text);
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-toggle.active,
.nav-dropdown.open .nav-dropdown-toggle.active {
  color: var(--pu-accent);
  background-color: var(--pu-accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238fdc4a' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.35);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 300;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--pu-border);
  border-radius: 12px;
  background: rgba(26, 31, 44, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--pu-muted);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-dropdown-menu a:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-menu a.active {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.35);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lang-picker {
  position: relative;
  flex-shrink: 0;
}

.lang-picker-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--pu-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23a8b0c4' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--pu-text);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.lang-picker-toggle:hover,
.lang-picker-toggle:focus,
.lang-picker.open .lang-picker-toggle {
  border-color: var(--pu-accent-soft);
  background-color: rgba(255, 255, 255, 0.08);
}

.lang-picker-label {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
}

.lang-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 300;
  min-width: 100%;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--pu-border);
  border-radius: 8px;
  background: rgba(26, 31, 44, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.lang-picker-menu li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--pu-text);
  cursor: pointer;
  white-space: nowrap;
}

.lang-picker-menu li:hover,
.lang-picker-menu li.active {
  background: rgba(143, 220, 74, 0.12);
  color: var(--pu-accent);
}

.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;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pu-border);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pu-text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 190;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(143, 220, 74, 0.06), transparent 55%),
    rgba(11, 16, 32, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 24px 20px max(20px, env(safe-area-inset-bottom, 0px));
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.nav-open .mobile-nav {
  display: flex;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 0 auto;
  padding-bottom: 12px;
}

.mobile-nav-links a {
  position: relative;
  padding: 14px 18px 14px 22px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pu-muted);
  border: 0;
  background: transparent;
  transition: color 0.2s, background 0.2s, transform 0.15s;
}

.mobile-nav-links a::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--pu-accent);
  transform: translateY(-50%);
  transition: height 0.2s;
}

.mobile-nav-links a:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-links a.active,
.mobile-nav-links a[aria-current="page"] {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.28);
}

.mobile-nav-links a.active::before,
.mobile-nav-links a[aria-current="page"]::before {
  height: 18px;
}

.mobile-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-nav-group-toggle {
  position: relative;
  width: 100%;
  padding: 14px 44px 14px 22px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--pu-muted);
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.mobile-nav-group-toggle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--pu-accent);
  transform: translateY(-50%);
  transition: height 0.2s;
}

.mobile-nav-group-toggle::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.2s;
  opacity: 0.7;
}

.mobile-nav-group.is-open .mobile-nav-group-toggle::after {
  transform: translateY(-35%) rotate(-135deg);
}

.mobile-nav-group-toggle:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-group-toggle.active {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.28);
}

.mobile-nav-group-toggle.active::before {
  height: 18px;
}

.mobile-nav-group-links {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 4px 12px;
}

.mobile-nav-group.is-open .mobile-nav-group-links {
  display: flex;
}

.mobile-nav-group-links a {
  padding: 12px 18px 12px 22px;
  font-size: 0.98rem;
}

.mobile-nav-legal {
  padding: 14px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(20, 30, 52, 0.95), rgba(14, 22, 40, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mobile-nav-bottom {
  flex-shrink: 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background:
    linear-gradient(to top, rgba(11, 16, 32, 0.98) 78%, rgba(11, 16, 32, 0));
}

.mobile-nav .lang-picker {
  width: 100%;
  overflow: visible;
}

.mobile-nav .lang-picker-toggle {
  width: 100%;
  justify-content: center;
  border-radius: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
  background-color: rgba(255, 255, 255, 0.04);
}

.mobile-nav .lang-picker-menu {
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  right: 0;
  transform: none;
  min-width: 0;
}

.mobile-nav-legal-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.mobile-nav-legal-links a {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--pu-muted);
  border: 0;
  background: transparent;
  transition: color 0.2s, background 0.2s;
}

.mobile-nav-legal-links a:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav-legal-links a[aria-current="page"] {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  box-shadow: inset 0 0 0 1px rgba(143, 220, 74, 0.35);
}

.mobile-nav-legal-sep {
  color: rgba(255, 255, 255, 0.16);
  user-select: none;
  font-size: 0.9rem;
}

@media (max-width: 991px) {
  .desktop-nav { display: none; }
  .header-actions .lang-picker { display: none; }
  .nav-toggle { display: flex; }
}

@media (min-width: 992px) {
  .mobile-nav { display: none !important; }
}

/* ── Fixed footer ── */

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--footer-h);
  background: rgba(11, 16, 32, 0.95);
  border-top: 1px solid var(--pu-border);
  display: flex;
  align-items: center;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  width: 100%;
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--pu-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand-text {
  white-space: nowrap;
}

.footer-meta {
  text-align: center;
  padding: 6px 14px;
  border-left: 1px solid var(--pu-border);
  border-right: 1px solid var(--pu-border);
  white-space: nowrap;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.18);
  user-select: none;
}

.footer-bar a:hover,
.footer-link:hover {
  color: var(--pu-accent);
}

@media (max-width: 720px) {
  .site-footer {
    height: auto;
    min-height: var(--footer-h);
    padding: 12px 0;
  }

  .footer-bar {
    flex-direction: column;
    gap: 10px;
    padding: 0 16px;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-meta {
    width: 100%;
    max-width: 320px;
    padding: 10px 0;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--pu-border);
    border-bottom: 1px solid var(--pu-border);
  }
}

/* ── Main scroll area ── */

.site-main {
  flex: 1;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (max-width: 991px) {
  html,
  body {
    height: auto;
    min-height: 100dvh;
  }

  .site-main {
    flex: 1 0 auto;
    overflow: visible;
    padding-bottom: 0;
  }

  .site-footer {
    position: static;
    flex-shrink: 0;
  }

  .mobile-nav {
    inset: var(--header-h) 0 0 0;
  }
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--pu-accent);
  color: var(--pu-accent-text);
  border-color: var(--pu-accent);
}

.btn-primary:hover {
  background: var(--pu-accent-hover);
  border-color: var(--pu-accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--pu-text);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
  border-color: var(--pu-text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ── Section utilities ── */

.section {
  padding: var(--section-y) 0;
}

.section[id] {
  scroll-margin-top: var(--header-h);
}

.section-alt {
  background: var(--pu-bg-2);
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  border: 1px solid rgba(143, 220, 74, 0.25);
  margin-bottom: 16px;
}

.section-head .badge,
.content-block > .badge:first-child {
  display: inline-block;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pu-accent);
  margin-bottom: 14px;
}

.section-head.center .badge::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: var(--pu-accent);
  opacity: 0.85;
}

.content-block > .badge:first-child::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--pu-accent);
  opacity: 0.85;
}

.section-head.center .badge {
  margin-bottom: 0;
}

.section-head.center .section-title {
  margin-top: 20px;
}

.section-title {
  margin: 0 0 16px;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-title .hl { color: var(--pu-accent); }

.section-lead {
  margin: 0;
  color: var(--pu-muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.section-head {
  margin-bottom: 48px;
}

.section-head.center {
  text-align: center;
}

.section-head.center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ── Hero ── */

.hero-section {
  padding: 40px 0 var(--section-y);
  background:
    radial-gradient(800px 500px at 15% 20%, rgba(120, 120, 255, 0.1), transparent 55%),
    radial-gradient(600px 400px at 85% 30%, rgba(143, 220, 74, 0.08), transparent 50%),
    linear-gradient(180deg, var(--pu-bg), var(--pu-bg-2));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .hero-section { padding: 48px 0 var(--section-y); }
}

.hero-content h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-content .lead {
  margin: 0 0 28px;
  color: var(--pu-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-brand,
.intro-brand {
  position: relative;
  width: 100%;
  padding: 0;
  justify-content: center;
}

.hero-brand-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(320px, 80%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(143, 220, 74, 0.1) 0%, rgba(143, 220, 74, 0.04) 45%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.intro-brand-glow {
  position: absolute;
  inset: 0;
  margin: auto;
  width: min(100%, 320px);
  height: min(100%, 320px);
  max-width: 320px;
  max-height: 320px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(143, 220, 74, 0.06) 0%, rgba(143, 220, 74, 0.025) 45%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero-brand .hero-logo,
.intro-brand .intro-logo {
  position: relative;
  z-index: 1;
  display: block;
  height: auto;
}

.hero-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  margin: 0 auto;
}

.hero-brand .hero-logo {
  filter:
    drop-shadow(0 0 12px rgba(143, 220, 74, 0.18))
    drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.intro-brand .intro-logo {
  filter:
    drop-shadow(0 0 6px rgba(143, 220, 74, 0.09))
    drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
}

.hero-brand .hero-logo {
  width: min(280px, 62vw);
}

.hero-brand-out .hero-logo {
  width: min(190px, 42.2vw);
}

.intro-brand .intro-logo {
  width: 100%;
  height: auto;
  margin: 0;
}

.hero-circuit img {
  display: block;
  width: min(100%, 380px);
  height: auto;
  aspect-ratio: 510 / 428;
  object-fit: contain;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .hero-brand {
    justify-content: center;
  }

  .hero-brand-glow {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
  }

  .hero-brand .hero-logo {
    width: min(300px, 30vw);
  }

  .intro-logo-wrap {
    width: min(100%, 360px);
  }

  .intro-brand .intro-logo {
    width: 100%;
  }

  .intro-brand-glow {
    width: min(100%, 340px);
    height: min(100%, 340px);
    max-width: 340px;
    max-height: 340px;
  }

  .hero-circuit {
    justify-content: flex-end;
  }

  .hero-circuit img {
    width: min(100%, 420px);
    margin: 0;
  }

  .hero-section:has(.hero-brand-out) .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 100px;
  }

  .hero-section:has(.hero-brand-out) .hero-content {
    max-width: 520px;
  }

  .hero-brand-out {
    justify-content: flex-end;
    justify-self: end;
    width: auto;
  }

  .hero-brand-out .hero-logo-wrap {
    width: auto;
    max-width: min(231px, 21.8vw);
    margin: 0;
    justify-content: flex-end;
  }

  .hero-brand-out .hero-brand-glow {
    left: auto;
    right: 0;
    transform: translate(12%, -50%);
  }

  .hero-brand-out .hero-logo {
    display: block;
    width: min(204px, 19vw);
    object-fit: contain;
    object-position: right center;
  }
}

@media (max-width: 991px) {
  .hero-content { text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-circuit { margin-top: 8px; }
}

.page-hero {
  padding: 40px 0 var(--section-y);
  background: linear-gradient(180deg, var(--pu-bg-2), var(--pu-bg));
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page-hero .lead {
  margin: 12px auto 0;
  color: var(--pu-muted);
}

body[data-page="impressum"] .page-hero,
body[data-page="privacy"] .page-hero {
  padding: 32px 0 32px;
}

body[data-page="impressum"] .section,
body[data-page="privacy"] .section {
  padding-top: 0;
}

@media (max-width: 991px) {
  body[data-page="impressum"] .page-hero,
  body[data-page="privacy"] .page-hero {
    padding: 20px 0 28px;
  }
}

/* ── About split (legacy) ── */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 992px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}

.about-visual img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--pu-border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* ── Intro block (Projektvorstellung) ── */

.intro-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: stretch;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--pu-card) 42%);
  border: 1px solid var(--pu-border);
  border-top: 4px solid var(--pu-accent);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.intro-block-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  min-width: 0;
}

.intro-text {
  width: 100%;
  max-width: 58ch;
  color: var(--pu-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.intro-text p:first-child {
  color: var(--pu-text);
  font-size: 1.12rem;
  line-height: 1.6;
}

.intro-text p {
  margin: 0 0 1em;
}

.intro-text p:last-child {
  margin-bottom: 0;
}

.intro-actions {
  width: 100%;
  max-width: 58ch;
}

.intro-visual {
  margin: 0;
  padding: 0;
}

.intro-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  margin: 0;
  padding: 0;
}

.intro-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 340px);
  margin: 0 auto;
}

@media (min-width: 992px) {
  .intro-block {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr);
    gap: 32px;
    padding: 32px;
  }

  .intro-visual {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
  }

  .intro-brand {
    align-self: stretch;
    min-height: 100%;
  }
}

/* ── Feature / service cards ── */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.info-card {
  background: var(--pu-card);
  border: 1px solid var(--pu-border);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  height: 100%;
}

.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 220, 74, 0.3);
  background: var(--pu-card-hover);
}

.info-card .card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pu-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.info-card p {
  margin: 0;
  color: var(--pu-muted);
  font-size: 0.92rem;
}

.type-plate {
  margin-top: 28px;
  max-width: 420px;
  padding: 20px 24px;
  border: 1px solid rgba(143, 220, 74, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--pu-card) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.type-plate-label {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pu-accent);
}

.type-plate-list {
  margin: 0;
}

.type-plate-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 0;
  border-top: 1px solid var(--pu-border);
}

.type-plate-row:first-child {
  border-top: none;
  padding-top: 0;
}

.type-plate-row:last-child {
  padding-bottom: 0;
}

.type-plate-row dt {
  margin: 0;
  color: var(--pu-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.type-plate-row dd {
  margin: 0;
  color: var(--pu-text);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: right;
}

/* ── Download cards ── */

.download-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--pu-border);
  background: var(--pu-card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.download-card:hover {
  border-color: rgba(143, 220, 74, 0.35);
  background: var(--pu-card-hover);
  transform: translateY(-2px);
}

.download-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--pu-accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pu-accent);
}

.download-card-icon svg {
  width: 24px;
  height: 24px;
}

.download-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.download-card-title {
  font-weight: 600;
  color: var(--pu-text);
}

.download-card-desc {
  font-size: 0.88rem;
  color: var(--pu-muted);
  line-height: 1.4;
}

.download-card-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pu-muted);
}

.download-card:hover .download-card-badge {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
}

.download-list--app {
  max-width: 100%;
}

.release-card-body + .download-list.release-download {
  margin-top: 33px;
}

.release-download .download-card {
  padding: 14px 16px;
}

.download-install-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--pu-muted);
}

#release {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ── Process steps ── */

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
}

.step-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--pu-card);
  border: 1px solid var(--pu-border);
  border-radius: 20px;
}

.step-num {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--pu-accent);
  color: var(--pu-accent-text);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card p {
  margin: 0;
  color: var(--pu-muted);
  font-size: 0.92rem;
}

/* ── Gallery showcase ── */

.gallery-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
  max-width: min(100%, var(--content-max));
  margin: 0 auto;
}

.gallery-showcase > .gallery-thumbs {
  display: none;
}

.gallery-preview {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.gallery-preview-frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.gallery-nav {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pu-border);
  background: var(--pu-card);
  color: var(--pu-text);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.gallery-nav:hover {
  border-color: var(--pu-accent);
  color: var(--pu-accent);
  transform: scale(1.04);
}

.gallery-preview-stage {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-device-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--pu-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, var(--pu-card) 100%);
}

.gallery-device-frame--wide {
  width: fit-content;
  max-width: 100%;
  padding: 12px;
}

.gallery-slide img {
  display: block;
  width: auto;
  max-width: min(100%, 360px);
  max-height: 480px;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.gallery-slide .gallery-device-frame--wide img {
  width: auto;
  max-width: min(100%, 720px);
  max-height: min(420px, 50vh);
  height: auto;
  border-radius: 12px;
}

.gallery-preview-expand {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.82);
  border: 1px solid var(--pu-border);
  color: var(--pu-accent);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, transform 0.2s;
}

.gallery-preview-expand:hover {
  border-color: rgba(143, 220, 74, 0.35);
  transform: scale(1.04);
}

.gallery-preview-meta {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 0 4px;
  text-align: center;
}

.gallery-preview-counter {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pu-accent);
}

.gallery-preview-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.gallery-preview-desc {
  margin: 0;
  color: var(--pu-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.gallery-thumb {
  flex: 0 0 132px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--pu-border);
  border-radius: 16px;
  background: var(--pu-card);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.gallery-thumb:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 220, 74, 0.25);
}

.gallery-thumb.is-active {
  border-color: var(--pu-accent);
  box-shadow: 0 0 0 1px rgba(143, 220, 74, 0.25), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  background: var(--pu-bg-2);
}

.gallery-thumb--landscape img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.gallery-thumb-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--pu-muted);
}

.gallery-thumb.is-active .gallery-thumb-label {
  color: var(--pu-text);
}

.gallery-empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
  color: var(--pu-muted);
  font-size: 0.95rem;
}

@media (min-width: 768px) {
  .gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  .gallery-thumb {
    flex: unset;
    width: auto;
  }
}

@media (min-width: 992px) {
  .gallery-slide img {
    max-width: min(100%, 400px);
    max-height: 520px;
  }

  .gallery-slide .gallery-device-frame--wide img {
    max-width: min(100%, 840px);
    max-height: min(480px, 55vh);
  }
}

@media (max-width: 576px) {
  .gallery-preview-frame {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    transform: translateY(-50%);
    background: rgba(11, 16, 32, 0.88);
  }

  .gallery-nav:hover {
    transform: translateY(-50%) scale(1.04);
  }

  .gallery-nav--prev { left: 8px; }
  .gallery-nav--next { right: 8px; }
}

/* ── Release timeline ── */

.release-timeline {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 8px 0 0;
}

.release-timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    var(--pu-accent) 0%,
    rgba(143, 220, 74, 0.35) 45%,
    rgba(143, 220, 74, 0.08) 100%
  );
  border-radius: 999px;
  z-index: 0;
}

.release-card {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  padding: 18px 0;
}

.release-card--left {
  justify-content: flex-start;
}

.release-card--right {
  justify-content: flex-end;
}

.release-card-axis {
  position: absolute;
  left: 50%;
  top: 36px;
  transform: translateX(-50%);
  z-index: 2;
}

.release-card-dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--pu-accent);
  background: var(--pu-bg-2);
  box-shadow: 0 0 0 4px var(--pu-bg-2);
}

.release-card.is-current .release-card-dot {
  background: var(--pu-accent);
  box-shadow:
    0 0 0 4px var(--pu-bg-2),
    0 0 18px rgba(143, 220, 74, 0.45);
}

.release-card-panel {
  width: min(100%, calc(50% - 36px));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, var(--pu-card) 100%);
  border: 1px solid var(--pu-border);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s, transform 0.2s;
}

.release-card--left .release-card-panel {
  margin-right: auto;
  text-align: left;
}

.release-card--right .release-card-panel {
  margin-left: auto;
  text-align: left;
}

.release-card.is-current .release-card-panel {
  border-color: rgba(143, 220, 74, 0.42);
  box-shadow:
    0 0 0 1px rgba(143, 220, 74, 0.18),
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.release-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.release-card-version {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.release-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(143, 220, 74, 0.14);
  border: 1px solid rgba(143, 220, 74, 0.35);
  color: var(--pu-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.release-card-body ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--pu-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.release-card-body li {
  margin-bottom: 8px;
}

.release-card-body li:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  .release-timeline::before {
    left: 7px;
    transform: none;
  }

  .release-card {
    padding: 14px 0 14px 28px;
    justify-content: stretch;
  }

  .release-card-axis {
    left: 7px;
    top: 28px;
    transform: none;
  }

  .release-card--left .release-card-panel,
  .release-card--right .release-card-panel {
    width: 100%;
    margin: 0;
  }
}

/* ── Release panel (subpages) ── */

.release-panel {
  background: var(--pu-card);
  border: 1px solid var(--pu-border);
  border-radius: 20px;
  padding: 28px 32px;
}

.release-panel h3 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.release-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--pu-muted);
}

.release-panel li { margin-bottom: 8px; }

.section-head.center .release-panel {
  text-align: left;
}

#wc-release .release-panel {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

/* ── CTA band ── */

.cta-section {
  text-align: center;
  padding: var(--section-y) 0;
  background: linear-gradient(135deg, var(--pu-bg-2), var(--pu-bg));
  border-top: 1px solid var(--pu-border);
}

.cta-section h2 {
  margin: 0 0 24px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
}

/* ── Module tiles ── */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.module-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 24px;
  background: var(--pu-card);
  border: 1px solid var(--pu-border);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.module-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(143, 220, 74, 0.35);
}

.module-tile img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}

.module-tile .tile-name {
  font-size: 1.15rem;
  font-weight: 700;
}

.module-tile .tile-label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pu-muted);
}

/* ── Content blocks ── */

.content-block + .content-block { margin-top: 40px; }

.content-block h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.content-block p,
.content-block ul {
  margin: 0;
  color: var(--pu-muted);
}

.content-block ul { padding-left: 1.2rem; }

.guide-body h3 {
  margin: 28px 0 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pu-text);
}

.guide-body h3:first-child {
  margin-top: 0;
}

.guide-body table {
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.guide-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 16px 0;
  border-radius: 10px;
  border: 1px solid var(--pu-border);
}

.bom-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.bom-table-wrap table {
  width: 100%;
  table-layout: fixed;
  font-size: 0.84rem;
}

.bom-table-wrap th,
.bom-table-wrap td {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.bom-table-wrap th:nth-child(1),
.bom-table-wrap td:nth-child(1) {
  width: 6%;
  text-align: center;
}

.bom-table-wrap th:nth-child(2),
.bom-table-wrap td:nth-child(2) {
  width: 22%;
}

.bom-table-wrap th:nth-child(3),
.bom-table-wrap td:nth-child(3) {
  width: 11%;
}

.bom-table-wrap th:nth-child(4),
.bom-table-wrap td:nth-child(4) {
  width: 36%;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--pu-muted);
}

.bom-table-wrap th:nth-child(5),
.bom-table-wrap td:nth-child(5) {
  width: 8%;
  text-align: center;
}

.bom-table-wrap th:nth-child(6),
.bom-table-wrap td:nth-child(6) {
  width: 17%;
  text-align: left;
}

.bom-table-wrap .bom-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--pu-muted);
  line-height: 1.45;
}

.bom-table-wrap .bom-sub a {
  word-break: break-all;
}

.guide-body th,
.guide-body td {
  padding: 8px 10px;
  border: 1px solid var(--pu-border);
  text-align: left;
  vertical-align: top;
}

.guide-body th {
  color: var(--pu-muted);
  font-weight: 600;
}

.guide-body h1,
.guide-body h2 {
  margin: 28px 0 12px;
  font-weight: 600;
  color: var(--pu-text);
}

.guide-body h1 {
  margin-top: 0;
  font-size: 1.55rem;
}

.guide-body h2 {
  font-size: 1.2rem;
}

.guide-body p,
.guide-body li {
  color: var(--pu-muted);
  line-height: 1.65;
}

.guide-body ul,
.guide-body ol {
  margin: 12px 0;
  padding-left: 1.25rem;
}

.guide-body hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--pu-border);
}

.guide-body a {
  color: var(--pu-accent);
}

.guide-body a:hover {
  text-decoration: underline;
}

.guide-body code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.guide-body pre {
  margin: 16px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--pu-border);
  background: rgba(0, 0, 0, 0.25);
}

.guide-body pre code {
  padding: 0;
  background: none;
}

.md-viewer-shell {
  width: 90%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.md-viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 24px;
}

.md-viewer-back,
.md-viewer-download {
  font-size: 0.9rem;
  color: var(--pu-accent);
}

.md-viewer-back:hover,
.md-viewer-download:hover {
  text-decoration: underline;
}

.md-viewer-status,
.md-viewer-error {
  margin: 0;
  color: var(--pu-muted);
}

.md-viewer-error {
  color: #f0a8a8;
}

/* ── Markdown lightbox ── */

.md-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.97);
  flex-direction: column;
  align-items: center;
  padding: calc(var(--header-h) + 12px) 0 24px;
  box-sizing: border-box;
}

.md-lightbox.open {
  display: flex;
}

.md-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-height: calc(100dvh - var(--header-h) - 48px);
  margin: 0 auto;
  border: 1px solid var(--pu-border);
  border-radius: 16px;
  background: var(--pu-bg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.md-lightbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--pu-border);
  background: var(--pu-card);
}

.md-lightbox-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pu-text);
}

.md-lightbox-download {
  font-size: 0.88rem;
  color: var(--pu-accent);
  white-space: nowrap;
}

.md-lightbox-download:hover {
  text-decoration: underline;
}

.md-lightbox-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 20px 24px 28px;
  -webkit-overflow-scrolling: touch;
}

.md-lightbox .lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3;
}

@media (max-width: 576px) {
  .md-lightbox {
    padding: calc(var(--header-h) + 8px) 0 12px;
  }

  .md-lightbox-panel {
    width: 90%;
    max-height: calc(100dvh - var(--header-h) - 24px);
    border-radius: 12px;
  }

  .md-lightbox-body {
    padding: 16px 16px 22px;
  }
}

/* ── External link dialog ── */

.external-link-dialog {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.external-link-dialog.open {
  display: flex;
}

.external-link-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.external-link-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 24px;
  border: 1px solid var(--pu-border);
  border-radius: 16px;
  background: var(--pu-bg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.external-link-dialog-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pu-text);
}

.external-link-dialog-text {
  margin: 0 0 22px;
  color: var(--pu-muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.external-link-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.external-link-dialog-actions .btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 576px) {
  .external-link-dialog {
    padding: 16px;
  }

  .external-link-dialog-panel {
    padding: 20px 18px;
    border-radius: 12px;
  }

  .external-link-dialog-actions {
    flex-direction: column-reverse;
  }

  .external-link-dialog-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

.content-block .download-list {
  padding-left: 0;
}

.legal-document h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.12rem;
  color: var(--pu-text);
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document p,
.legal-document li {
  color: var(--pu-muted);
  line-height: 1.65;
}

.legal-document a {
  color: var(--pu-accent);
}

.legal-document a:hover {
  text-decoration: underline;
}

.legal-document code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.legal-updated {
  margin: 0 0 1.25rem;
  font-size: 0.85rem;
  color: var(--pu-muted);
}

.tech-document [id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.doc-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doc-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.doc-hero {
  text-align: center;
}

.doc-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.doc-hero .lead {
  margin: 12px auto 0;
  max-width: 640px;
  color: var(--pu-muted);
}

.doc-content {
  min-width: 0;
}

#modul-api:not(.doc-ready) .doc-content {
  visibility: hidden;
}

#modul-api.doc-ready .doc-content {
  visibility: visible;
}

#modul-api .doc-content {
  overflow-anchor: none;
  padding-bottom: 0;
}

#modul-api {
  padding-bottom: 82px;
}

#modul-api + #release {
  padding-top: 48px;
}

#release .release-card-dot {
  background: var(--pu-bg);
  box-shadow: 0 0 0 4px var(--pu-bg);
}

#release .release-card.is-current .release-card-dot {
  box-shadow:
    0 0 0 4px var(--pu-bg),
    0 0 18px rgba(143, 220, 74, 0.45);
}

#modul-api .doc-layout {
  margin-top: 0;
}

#wc-intro .doc-layout {
  margin-top: 0;
}

#modul-api .doc-section-head {
  margin-bottom: 8px;
}

#wc-intro .doc-section-head {
  margin-bottom: 8px;
}

#modul-api .doc-section-head .section-lead {
  max-width: 52ch;
}

#wc-tech,
#wc-hardware,
#wc-type-plate,
#wc-download,
#wc-guide,
#wc-release {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

#wc-guide .guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 28px;
}

#wc-type-plate .type-plate {
  margin-top: 0;
}

#wc-type-plate .type-plate-label {
  margin-bottom: 28px;
}

/* waterControl — hardware block diagram */

.hardware-sensor-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(143, 220, 74, 0.45);
  border-radius: 0 10px 10px 0;
  background: rgba(143, 220, 74, 0.06);
  color: var(--pu-muted);
  font-size: 0.92rem;
}

.hardware-sensor-note strong {
  color: var(--pu-text);
  font-weight: 600;
}

.hardware-sensor-note a {
  color: var(--pu-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hardware-sensor-note a:hover {
  color: var(--pu-accent-hover);
}

.hw-block-diagram {
  margin: 24px 0 0;
  padding: 0;
}

.hw-block-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 6px 4px;
  padding: 20px 18px;
  border: 1px solid var(--pu-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, var(--pu-card) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.hw-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 88px;
  max-width: 140px;
  flex: 1 1 88px;
  padding: 12px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.hw-block-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pu-text);
}

.hw-block-detail {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--pu-muted);
}

.hw-block-in {
  border-color: rgba(255, 255, 255, 0.12);
}

.hw-block-core {
  border-color: rgba(143, 220, 74, 0.45);
  background: var(--pu-accent-soft);
  box-shadow: 0 0 0 1px rgba(143, 220, 74, 0.08);
}

.hw-block-core .hw-block-name {
  color: var(--pu-accent);
}

.hw-block-out {
  border-color: rgba(255, 255, 255, 0.14);
}

.hw-block-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(143, 220, 74, 0.72);
  user-select: none;
}

@media (max-width: 720px) {
  .hw-block-flow {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .hw-block {
    max-width: none;
    flex: 1 1 auto;
  }

  .hw-block-arrow {
    width: auto;
    height: 1rem;
    transform: rotate(90deg);
  }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .hw-block {
    min-width: 76px;
    flex: 1 1 76px;
    padding: 10px 8px;
  }

  .hw-block-name {
    font-size: 0.78rem;
  }

  .hw-block-detail {
    font-size: 0.68rem;
  }
}

.doc-toc {
  margin: 0;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--pu-border);
  background: var(--pu-card);
}

.doc-toc-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pu-accent);
}

.doc-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-toc li + li {
  margin-top: 4px;
}

.doc-toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--pu-muted);
  font-size: 0.88rem;
  line-height: 1.35;
  transition: color 0.15s, background 0.15s;
}

.doc-toc a:hover {
  color: var(--pu-text);
  background: rgba(255, 255, 255, 0.05);
}

.doc-toc a.is-active {
  color: var(--pu-accent);
  background: var(--pu-accent-soft);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--pu-accent);
}

@media (min-width: 992px) {
  .doc-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .doc-layout .doc-section-head {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 24px;
  }

  .doc-layout .doc-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .doc-layout .doc-content,
  .doc-layout .doc-body {
    grid-column: 2;
    grid-row: 2;
  }

  #modul-api .doc-section-head {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 24px;
  }

  #modul-api .doc-sidebar {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  #modul-api .doc-content {
    grid-column: 2;
    grid-row: 2;
  }

  .doc-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
  }
}

@media (max-width: 991px) {
  .doc-sidebar {
    display: none;
  }
}

.tech-document h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  color: var(--pu-text);
}

.tech-document ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--pu-muted);
}

.tech-document ol li + li {
  margin-top: 6px;
}

.tech-document .api-endpoint {
  margin: 1rem 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--pu-border);
  background: var(--pu-card);
}

.tech-document .api-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.tech-document .api-method {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--pu-accent-soft);
  color: var(--pu-accent);
}

.tech-document .api-path {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88rem;
  color: var(--pu-text);
  word-break: break-all;
}

.tech-document .api-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pu-muted);
}

.tech-document .api-badge-required {
  color: var(--pu-accent);
}

.tech-document .api-badge-optional {
  color: rgba(255, 255, 255, 0.45);
}

.tech-document pre.api-code {
  margin: 12px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--pu-border);
  overflow-x: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.tech-document pre.api-code code {
  padding: 0;
  background: none;
  font-size: inherit;
}

.tech-document .api-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 0;
  font-size: 0.86rem;
}

.tech-document .api-table th,
.tech-document .api-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pu-border);
  text-align: left;
  vertical-align: top;
}

.tech-document .api-table th {
  color: var(--pu-text);
  font-weight: 600;
  font-size: 0.8rem;
}

.tech-document .api-table td {
  color: var(--pu-muted);
}

.tech-document .api-table code {
  font-size: 0.88em;
}

@media (max-width: 576px) {
  .tech-document .api-badge {
    margin-left: 0;
  }

  .tech-document .api-table {
    display: block;
    overflow-x: auto;
  }
}

/* ── PDF ── */

.pdf-viewer {
  margin-top: 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--pu-border);
}

.pdf-viewer iframe {
  display: block;
  width: 100%;
  height: min(65vh, 600px);
  border: 0;
}

.pdf-actions { margin-top: 16px; }

/* ── Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.97);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 12px) 16px 32px;
  gap: 16px;
  touch-action: pan-y pinch-zoom;
}

.lightbox.open {
  display: flex;
  touch-action: manipulation;
}

.lightbox-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  min-height: 0;
  pointer-events: none;
}

.lightbox-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  pointer-events: auto;
  touch-action: pan-x;
}

.lightbox-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  width: 100%;
  height: 100%;
  align-items: center;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  box-sizing: border-box;
}

.lightbox-main .lightbox-counter,
.lightbox-main .lightbox-title,
.lightbox-main .lightbox-desc {
  pointer-events: auto;
}

.lightbox-slide img {
  flex-shrink: 1;
  min-height: 0;
  width: auto;
  height: auto;
  max-width: min(100%, 520px);
  max-height: calc(100dvh - var(--header-h) - 220px);
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.lightbox-slide img.is-landscape {
  max-width: min(calc(100vw - 120px), 1280px);
  max-height: calc(100dvh - var(--header-h) - 180px);
}

.lightbox-counter {
  margin: 14px 0 0;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pu-accent);
}

.lightbox-title {
  margin: 8px 0 0;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: var(--pu-text);
  max-width: min(100%, 520px);
}

.lightbox.open.lightbox-has-landscape .lightbox-title,
.lightbox.open.lightbox-has-landscape .lightbox-desc {
  max-width: min(calc(100vw - 120px), 1280px);
}

.lightbox-desc {
  margin: 6px 0 0;
  flex-shrink: 0;
  color: var(--pu-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
  max-width: min(100%, 520px);
}

.lightbox-thumbs {
  display: none;
}

.lightbox-thumb {
  flex: 0 0 72px;
  padding: 4px;
  border: 1px solid var(--pu-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-family: inherit;
}

.lightbox-thumb.is-active {
  border-color: var(--pu-accent);
  box-shadow: 0 0 0 1px rgba(143, 220, 74, 0.35);
}

.lightbox-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--pu-border);
  background: var(--pu-card);
  color: var(--pu-text);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  top: 16px;
  right: 16px;
}

.lightbox .gallery-nav--prev,
.lightbox .gallery-nav--next {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
}

.lightbox .gallery-nav--prev { left: 16px; }
.lightbox .gallery-nav--next { right: 16px; }

.lightbox .gallery-nav--prev:hover,
.lightbox .gallery-nav--next:hover {
  transform: translateY(-50%) scale(1.04);
}

@media (max-width: 576px) {
  .lightbox .gallery-nav--prev { left: 8px; }
  .lightbox .gallery-nav--next { right: 8px; }

  .lightbox .gallery-nav--prev:hover,
  .lightbox .gallery-nav--next:hover {
    transform: translateY(-50%) scale(1.04);
  }
}

/* ── Reveal on scroll / initial viewport ── */

@keyframes pu-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.pu-reveal.is-visible {
  animation: pu-rise 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .pu-reveal.is-visible {
    animation: none;
  }
}
