.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transition: height .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.site-header__inner {
  display: flex;
  width: min(100% - 64px,1280px);
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem,5vw,3.5rem);
}
.site-header__link {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: .55rem;
  color: rgba(255,255,255,.76);
  font-size: 1rem;
  font-weight: 700;
  transition: color .18s ease;
}
.site-header__link::after {
  position: absolute;
  right: 0;
  bottom: .25rem;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: #ff6900;
  content: "";
  opacity: 0;
  transform: scaleX(.25);
  transition: opacity .18s ease, transform .18s ease;
}
.site-header__link:hover,
.site-header__link:focus-visible,
.site-header__link.is-active { color: #ff6900; }
.site-header__link.is-active::after { opacity: 1; transform: scaleX(1); }
.site-header__back img { width: 1.75rem; height: 1.75rem; }
.site-header__bulb { width: 1.75rem; height: 1.75rem; color: #ff6900; filter: drop-shadow(0 0 8px rgba(255,105,0,.28)); }
.site-header__bulb-rays,.brand-bulb__rays { transform-box: fill-box; transform-origin: center; animation: site-bulb-flicker 2.8s steps(1,end) infinite; }
.site-header__home { width: 44px; justify-content: center; }
.site-header__home::after { display: none; }
.site-header__theme { margin-left: clamp(.25rem,2vw,1.25rem); }
.site-header__theme {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 0 1rem;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 800;
  transition: color .18s ease,border-color .18s ease,background-color .18s ease,transform .18s ease;
}
.site-header__theme:hover,
.site-header__theme:focus-visible { border-color: rgba(255,105,0,.7); color: #ff6900; outline: none; }
.site-header__theme .material-symbols-outlined { display: inline-flex; align-items: center; align-self: center; line-height: 1; transform: translateY(0); }
.site-header__theme .material-symbols-outlined { font-size: 1.25rem; }
.site-header__theme [data-theme-label] { display: inline-flex; align-items: center; line-height: 1; }
.site-footer {
  position: relative;
  z-index: 20;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 4rem 0;
  background: rgba(0,0,0,.4);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.site-footer__inner {
  display: grid;
  width: min(100% - 64px,1280px);
  margin: 0 auto;
  grid-template-columns: minmax(16rem,1fr) auto minmax(7rem,1fr);
  gap: 2rem;
  align-items: end;
}
.site-footer__brand { min-width: 0; }
.site-footer__logo {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid rgba(255,105,0,.4);
  border-radius: 999px;
  background: rgba(255,105,0,.08);
}
.site-footer__logo img { width: 2.2rem; height: 2.2rem; }
.site-footer__title { color: #fff; font-size: 1.65rem; font-weight: 800; }
.site-footer__brand p {
  margin-top: .75rem;
  color: rgba(255,255,255,.42);
  font: .72rem/1.6 "JetBrains Mono",monospace;
}
.site-footer__legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; }
.site-footer__legal a {
  color: rgba(255,255,255,.58);
  font: .72rem "JetBrains Mono",monospace;
  transition: color .18s ease;
}
.site-footer__legal a:hover,
.site-footer__legal a:focus-visible { color: #ff6900; }
.site-footer__actions { display: flex; justify-content: flex-end; gap: .75rem; }
.site-footer__actions a {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.04);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.site-footer__actions a:hover,
.site-footer__actions a:focus-visible { border-color: #ff6900; color: #ff6900; }
.legal-body {
  position: relative;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at top right,#1a1e2e,#0a0c14 58%);
  color: #fff;
}
.legal-main {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: calc(100vh - 15rem);
  place-items: center;
  padding: 9rem 2rem 5rem;
}
.legal-panel {
  width: min(100%,52rem);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 24px;
  padding: clamp(2rem,6vw,4rem);
  background: rgba(255,255,255,.05);
  box-shadow: 0 28px 90px rgba(0,0,0,.2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.legal-kicker { color: #ff6900; font: 700 .72rem "JetBrains Mono",monospace; letter-spacing: .15em; text-transform: uppercase; }
.legal-panel h1 { margin-top: 1.2rem; font-size: clamp(2.75rem,8vw,5.5rem); font-weight: 800; letter-spacing: -.055em; line-height: 1; }
.legal-panel>p:last-child { margin-top: 1.5rem; color: rgba(255,255,255,.68); font-size: 1.1rem; line-height: 1.7; }
html[data-theme="light"] .site-header {
  border-color: rgba(29,27,32,.1);
  background: rgba(255,255,255,.76);
  box-shadow: 0 18px 60px rgba(40,28,18,.08);
}
html[data-theme="light"] .site-header__link { color: rgba(29,27,32,.7); }
html[data-theme="light"] .site-header__link:hover,
html[data-theme="light"] .site-header__link:focus-visible,
html[data-theme="light"] .site-header__link.is-active { color: #ff6900; }
html[data-theme="light"] .site-header__theme { border-color: rgba(29,27,32,.12); background: rgba(255,255,255,.78); color: #1d1b20; }
html[data-theme="light"] .site-footer {
  border-color: rgba(29,27,32,.1);
  background: rgba(255,255,255,.72);
}
html[data-theme="light"] .site-footer__title { color: #1d1b20; }
html[data-theme="light"] .site-footer__brand p,
html[data-theme="light"] .site-footer__legal a { color: rgba(29,27,32,.56); }
html[data-theme="light"] .site-footer__actions a {
  border-color: rgba(29,27,32,.1);
  color: rgba(29,27,32,.7);
  background: rgba(255,255,255,.72);
}
html[data-theme="light"] .legal-body { background: radial-gradient(circle at top right,#fff,#f7f7f5 58%,#eceef1); color: #1d1b20; }
html[data-theme="light"] .legal-panel { border-color: rgba(29,27,32,.1); background: rgba(255,255,255,.8); box-shadow: 0 24px 70px rgba(40,28,18,.1); }
html[data-theme="light"] .legal-panel>p:last-child { color: rgba(29,27,32,.68); }
@media (max-width: 767px) {
  .site-header { height: 4.5rem; }
  .site-header__inner { width: min(100% - 32px,1280px); justify-content: space-between; gap: .75rem; }
  .site-header__link { font-size: .9rem; }
  .site-header__back img { width: 1.55rem; height: 1.55rem; }
  .site-header__theme { width: 44px; min-width: 44px; height: 44px; min-height: 44px; margin-left: 0; padding: 0; }
  .site-header__theme [data-theme-label] { display: none; }
  .site-footer__inner { width: min(100% - 40px,1280px); grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .site-footer__brand { display: grid; justify-items: center; }
  .site-footer__actions { justify-content: center; }
  .legal-main { padding: 7.5rem 1.25rem 4rem; }
}
@media (max-width: 420px) {
  .site-header__inner { width: min(100% - 20px,1280px); gap: .35rem; }
  .site-header__link { font-size: .78rem; }
  .site-header__back { gap: .3rem; }
  .site-header__bulb { width: 1.4rem; height: 1.4rem; }
  .site-header__theme { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header__link,
  .site-header__link::after,
  .site-footer__legal a,
  .site-footer__actions a { transition: none; }
  .site-header__bulb-rays,.brand-bulb__rays { animation: none; }
}
@keyframes site-bulb-flicker { 0%,5%{opacity:.28}7%{opacity:1}10%{opacity:.38}14%,25%{opacity:.84}27%{opacity:.2}30%,47%{opacity:.96}50%{opacity:.32}54%,72%{opacity:.74}75%{opacity:1}78%{opacity:.24}82%,100%{opacity:.78} }

.site-circuits {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
}
.site-circuits--home { position: fixed; z-index: -1; }
.site-circuits svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.site-circuit-base,
.site-circuit-flow { fill: none; vector-effect: non-scaling-stroke; }
.site-circuit-base { stroke: #ff6900; stroke-width: 10.4; opacity: .26; }
.site-circuit-flow {
  stroke: #ff6900;
  stroke-width: 8.6;
  stroke-linecap: round;
  stroke-dasharray: 260 120;
  opacity: .72;
  filter: drop-shadow(0 0 10px rgba(255,105,0,.38));
  animation: site-circuit-flow 3.2s linear infinite;
}
.site-circuit-flow.is-alt { animation-delay: -1.4s; }
html[data-theme="light"] .site-circuit-base { stroke: #8f99a4; opacity: .24; }
html[data-theme="light"] .site-circuit-flow { stroke: #8f99a4; opacity: .55; filter: drop-shadow(0 0 6px rgba(112,123,136,.18)); }
@keyframes site-circuit-flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -760; } }
@media (max-width: 640px) {
  .site-circuit-base { stroke-width: 7; }
  .site-circuit-flow { stroke-width: 5.8; stroke-dasharray: 180 110; }
}
@media (prefers-reduced-motion: reduce) {
  .site-circuit-flow { animation: none; }
}
