:root {
  --bg: #07090d;
  --panel: #101720;
  --panel-strong: #151e29;
  --text: #edf3f7;
  --muted: #9aaab5;
  --line: rgba(255, 255, 255, 0.12);
  --red: #f51d2a;
  --teal: #39d8d4;
  --amber: #ffb14a;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(7, 9, 13, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

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

.brand-name {
  display: grid;
  gap: 2px;
  font-weight: 800;
  line-height: 1;
}

.brand-name span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

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

.menu-toggle {
  display: none;
  position: relative;
  z-index: 31;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 160ms ease, opacity 160ms ease;
}

.nav a,
.button,
button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.nav a:hover,
.button:hover,
button:hover {
  border-color: rgba(57, 216, 212, 0.55);
  background: rgba(57, 216, 212, 0.1);
}

.button.primary,
button.primary {
  color: #11161d;
  border-color: var(--teal);
  background: var(--teal);
}

.button.danger,
button.danger {
  border-color: rgba(245, 29, 42, 0.45);
  background: rgba(245, 29, 42, 0.12);
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 132px clamp(18px, 5vw, 72px) 54px;
  overflow: hidden;
  background: #07090d;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.98) 0%, rgba(7, 9, 13, 0.76) 42%, rgba(7, 9, 13, 0.28) 74%),
    linear-gradient(0deg, rgba(7, 9, 13, 0.98) 0%, rgba(7, 9, 13, 0.08) 34%);
}

.hero::after {
  z-index: 2;
  background: radial-gradient(circle at 70% 42%, rgba(57, 216, 212, 0.12), transparent 36%);
  mix-blend-mode: screen;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 780px;
}

.kicker {
  color: var(--teal);
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
}

h1 {
  margin-top: 12px;
  font-size: clamp(48px, 8vw, 112px);
  max-width: 12ch;
}

.lead {
  margin: 22px 0 0;
  max-width: 680px;
  color: #d7e2e8;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
}

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

.section {
  padding: 76px clamp(18px, 5vw, 72px);
}

.section.alt {
  background: #0c1118;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-title h2 {
  font-size: clamp(32px, 4vw, 58px);
}

.section-title p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.branches-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature,
.news-card,
.admin-panel,
.login-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.feature {
  min-height: 230px;
  padding: 24px;
  display: grid;
  align-content: end;
  position: relative;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 13, 0.86), rgba(7, 9, 13, 0.24));
}

.feature > * {
  position: relative;
}

.feature h3,
.news-card h3 {
  font-size: 24px;
}

.feature p,
.news-card p,
.admin-note {
  color: var(--muted);
  line-height: 1.55;
}

.feature.industry {
  background: url("/assets/mining-laser.jpg") center / cover;
}

.feature.security {
  background: url("/assets/surface-ship.jpg") center / cover;
}

.feature.salvage {
  background: url("/assets/salvage.webp") center / cover;
}

.feature.culture {
  background: url("/assets/cave-rest.jpg") center / cover;
}

.branch-hologram {
  position: relative;
  display: none;
  width: min(100%, 1280px);
  margin: 0 auto;
  border: 1px solid rgba(57, 216, 212, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background: #02070b;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55), 0 0 34px rgba(57, 216, 212, 0.12);
}

.branch-hologram::before {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

.branch-hologram::before {
  left: 50%;
  bottom: -4%;
  width: 42%;
  height: 28%;
  transform: translateX(-50%);
  background:
    radial-gradient(ellipse at center bottom, rgba(57, 216, 212, 0.42), rgba(57, 216, 212, 0.12) 36%, transparent 72%),
    linear-gradient(90deg, transparent 0%, rgba(57, 216, 212, 0.18) 49.5%, rgba(210, 255, 255, 0.30) 50%, rgba(57, 216, 212, 0.18) 50.5%, transparent 100%);
  filter: blur(1.4px);
  opacity: 0.58;
  animation: hologram-pulse 3.4s ease-in-out infinite;
}

.branch-hologram::after {
  content: none;
}

.branch-hologram img {
  width: 100%;
  aspect-ratio: 1086 / 549;
  object-fit: contain;
}

.branch-hotspot {
  position: absolute;
  width: clamp(96px, 13vw, 172px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: transparent;
  border: 1px solid rgba(57, 216, 212, 0.18);
  background: radial-gradient(circle, rgba(57, 216, 212, 0.12), rgba(57, 216, 212, 0.025) 58%, transparent 72%);
  transform: translate(-50%, -50%) scale(1);
  transition: transform 180ms ease, filter 180ms ease;
}

.branch-hotspot::before {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 2px solid rgba(57, 216, 212, 0.34);
  box-shadow: 0 0 18px rgba(57, 216, 212, 0.18);
}

.branch-hotspot span {
  position: absolute;
  left: 50%;
  bottom: -30px;
  padding: 4px 9px;
  color: var(--text);
  background: rgba(5, 10, 15, 0.82);
  border: 1px solid rgba(57, 216, 212, 0.28);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.branch-hotspot:hover,
.branch-hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.18);
  background: radial-gradient(circle, rgba(57, 216, 212, 0.22), rgba(57, 216, 212, 0.045) 58%, transparent 72%);
  box-shadow: 0 0 28px rgba(57, 216, 212, 0.35), inset 0 0 18px rgba(57, 216, 212, 0.14);
  filter: drop-shadow(0 0 14px rgba(57, 216, 212, 0.58));
  outline: none;
}

.branch-hotspot:hover span,
.branch-hotspot:focus-visible span {
  opacity: 1;
  transform: translate(-50%, 0);
}

.hotspot-industrie {
  left: 21.4%;
  top: 24%;
}

.hotspot-salvage {
  left: 78.3%;
  top: 24.5%;
}

.hotspot-securite {
  left: 21.5%;
  top: 75.5%;
}

.hotspot-cohesion {
  left: 78.4%;
  top: 75%;
}

.branch-card {
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.branch-card:hover,
.branch-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(57, 216, 212, 0.55);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5), 0 0 22px rgba(57, 216, 212, 0.12);
  outline: none;
}

.branch-detail-shell {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.72), var(--bg) 390px),
    url("/assets/opus-branches-hologram.png") center top / cover no-repeat fixed;
}

@media (min-width: 901px) {
  .branch-hologram {
    display: block;
  }

  .branch-cards {
    display: none;
  }
}

@keyframes hologram-pulse {
  0%,
  100% {
    opacity: 0.34;
    transform: translateX(-50%) scaleX(0.92) scaleY(0.88);
  }

  45% {
    opacity: 0.72;
    transform: translateX(-50%) scaleX(1.06) scaleY(1.08);
  }

  68% {
    opacity: 0.52;
  }
}

@media (prefers-reduced-motion: reduce) {
  .branch-hologram::before {
    animation: none;
  }
}

.ratio {
  display: grid;
  grid-template-columns: 7fr 3fr;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.ratio div {
  display: grid;
  place-items: center;
  color: #11161d;
  font-size: clamp(22px, 4vw, 44px);
  font-weight: 900;
}

.ratio .industrial {
  background: var(--teal);
}

.ratio .military {
  background: var(--red);
}

.page-shell {
  padding: 132px clamp(18px, 5vw, 72px) 72px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.45), var(--bg) 360px),
    url("/assets/surface-ship.jpg") center top / cover no-repeat fixed;
}

.events-shell {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.55), var(--bg) 380px),
    url("/assets/salvage.webp") center top / cover no-repeat fixed;
}

.page-title {
  max-width: 900px;
  margin-bottom: 34px;
}

.page-title h1 {
  max-width: none;
  font-size: clamp(42px, 6vw, 82px);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.events-list {
  display: grid;
  gap: 18px;
}

.events-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.news-link {
  display: block;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.news-link:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 216, 212, 0.55);
  background: var(--panel-strong);
}

.news-body {
  padding: 20px;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  color: #101820;
  background: var(--amber);
  border-radius: 999px;
  padding: 5px 9px;
  font-weight: 850;
}

.read-more,
.back-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  color: var(--teal);
  font-weight: 850;
}

.event-card {
  display: grid;
  grid-template-columns: minmax(240px, 36%) minmax(0, 1fr);
  min-height: 260px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.event-link {
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.event-link:hover {
  transform: translateY(-3px);
  border-color: rgba(57, 216, 212, 0.55);
  background: var(--panel-strong);
}

.event-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.event-content {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(20px, 3vw, 34px);
}

.event-content h2 {
  font-size: clamp(28px, 3vw, 44px);
}

.event-content time,
.event-location {
  color: #d7e2e8;
  font-weight: 800;
}

.event-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.article-shell {
  min-height: 100vh;
  padding: 118px clamp(18px, 4vw, 64px) 72px;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.72), var(--bg) 390px),
    url("/assets/orbital-station.jpg") center top / cover no-repeat fixed;
}

.article-detail {
  width: min(100%, 920px);
  margin: 0 auto;
}

.article-hero {
  width: 100%;
  height: clamp(220px, 40vw, 460px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.article-content {
  padding-top: clamp(22px, 3vw, 34px);
}

.article-content h1 {
  max-width: 860px;
  font-size: clamp(34px, 4.8vw, 64px);
  line-height: 1.03;
}

.article-excerpt {
  max-width: 780px;
  color: #d7e2e8;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.5;
}

.article-text {
  max-width: 780px;
  color: #c4d0d7;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.75;
}

.article-video {
  width: min(100%, 780px);
  margin: 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020407;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.article-video iframe,
.article-video video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-content .meta {
  max-width: 780px;
}

.event-detail-shell {
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.72), var(--bg) 390px),
    url("/assets/salvage.webp") center top / cover no-repeat fixed;
}

.event-detail-meta {
  display: grid;
  gap: 6px;
  max-width: 780px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.event-detail-meta strong {
  color: var(--teal);
}

.event-attendance {
  display: block;
  max-width: 420px;
  margin: 20px 0 26px;
}

.event-attendance div {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(65, 213, 211, 0.28);
  border-radius: 8px;
  background: rgba(65, 213, 211, 0.08);
}

.event-attendance strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.event-attendance span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 132px clamp(18px, 5vw, 72px) 72px;
  background:
    linear-gradient(rgba(57, 216, 212, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 216, 212, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 48% 45%, rgba(57, 216, 212, 0.20), transparent 18%),
    radial-gradient(circle at 32% 62%, rgba(45, 116, 180, 0.28), transparent 28%),
    radial-gradient(circle at 68% 38%, rgba(245, 29, 42, 0.10), transparent 24%),
    #03060b;
  background-size: 128px 128px, 128px 128px, auto, auto, auto, auto;
  overflow: hidden;
  position: relative;
}

.not-found-page::before,
.not-found-page::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.not-found-page::before {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 38% 54%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
    radial-gradient(circle at 56% 18%, rgba(255, 255, 255, 0.60) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 66%, rgba(255, 255, 255, 0.42) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.50) 0 1px, transparent 2px);
  opacity: 0.75;
}

.not-found-page::after {
  width: 120vw;
  height: 70vh;
  left: -10vw;
  top: 18vh;
  border-top: 2px solid rgba(57, 216, 212, 0.75);
  border-radius: 50%;
  transform: rotate(-9deg);
  box-shadow: 0 -1px 18px rgba(57, 216, 212, 0.22);
}

.not-found-panel {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(260px, 1fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.not-found-alert {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 118px;
  padding: 18px;
  border-left: 4px solid var(--red);
  color: var(--red);
  background:
    linear-gradient(90deg, rgba(245, 29, 42, 0.24), rgba(245, 29, 42, 0.05)),
    repeating-linear-gradient(0deg, rgba(245, 29, 42, 0.10), rgba(245, 29, 42, 0.10) 1px, transparent 1px, transparent 7px);
  box-shadow: 0 0 30px rgba(245, 29, 42, 0.16);
}

.not-found-alert span,
.not-found-alert em,
.not-found-status span {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.not-found-alert strong {
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.82;
  font-weight: 950;
}

.not-found-alert em {
  font-style: normal;
}

.not-found-panel h1 {
  max-width: none;
  color: var(--red);
  font-size: clamp(38px, 5vw, 72px);
}

.not-found-panel p {
  max-width: 620px;
  color: #ff525c;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.not-found-copy {
  display: grid;
  gap: 12px;
}

.not-found-radar {
  position: absolute;
  right: 26%;
  bottom: -48px;
  width: 132px;
  aspect-ratio: 1;
  border: 3px solid rgba(57, 216, 212, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(57, 216, 212, 0.24);
}

.not-found-radar::before,
.not-found-radar::after,
.not-found-radar span {
  content: "";
  position: absolute;
  border: 1px solid rgba(57, 216, 212, 0.65);
  border-radius: 50%;
}

.not-found-radar::before {
  inset: 18px;
}

.not-found-radar::after {
  inset: 38px;
}

.not-found-radar span {
  inset: 58px;
  background: var(--teal);
  box-shadow: 0 0 16px var(--teal);
}

.not-found-status {
  display: grid;
  gap: 14px;
  color: var(--teal);
}

@media (max-width: 900px) {
  .not-found-panel {
    max-width: 620px;
    text-align: center;
    justify-items: center;
  }

  .not-found-panel .hero-actions {
    justify-content: center;
  }
}

.login-page,
.admin-page {
  padding: 118px clamp(18px, 4vw, 56px) 56px;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.98), rgba(7, 9, 13, 0.78)),
    url("/assets/mining-laser.jpg") center / cover;
}

.login-page {
  display: grid;
  align-items: center;
}

.login-shell {
  width: min(100%, 980px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.login-intro {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

.login-intro img {
  width: clamp(66px, 8vw, 104px);
  height: clamp(66px, 8vw, 104px);
  object-fit: contain;
  flex: 0 0 auto;
}

.login-intro h1 {
  max-width: 720px;
  font-size: clamp(42px, 6vw, 82px);
}

.login-intro p {
  max-width: 560px;
  margin: 18px 0 0;
  color: #d7e2e8;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
}

.login-box {
  max-width: 100%;
  padding: 26px;
}

.login-box h2,
.admin-panel h2 {
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.08;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 22px;
  align-items: end;
  margin-bottom: 24px;
}

.admin-hero h1 {
  max-width: none;
  font-size: clamp(38px, 5vw, 66px);
}

.admin-hero p {
  max-width: 680px;
  margin: 16px 0 0;
  color: #d7e2e8;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-metrics div {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 23, 32, 0.82);
}

.admin-metrics strong {
  font-size: 22px;
}

.admin-metrics span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-tabs {
  display: inline-flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 23, 32, 0.82);
}

.admin-tabs button {
  border-color: transparent;
  background: transparent;
}

.admin-tabs button.active {
  color: #11161d;
  border-color: var(--teal);
  background: var(--teal);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: grid;
}

.admin-panel {
  padding: 22px;
}

.editor-panel {
  position: sticky;
  top: 96px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: #dce7ed;
  font-weight: 750;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  font: inherit;
}

select {
  color-scheme: dark;
  background-color: #1b242e;
}

select option {
  color: #edf3f7;
  background: #151e29;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(57, 216, 212, 0.42);
  border-color: rgba(57, 216, 212, 0.7);
}

textarea {
  min-height: 145px;
  resize: vertical;
}

.image-preview {
  display: grid;
  gap: 8px;
}

.image-preview img {
  width: 100%;
  height: clamp(160px, 24vw, 260px);
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.image-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.status {
  min-height: 22px;
  color: var(--teal);
  font-weight: 750;
}

.admin-news {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 270px);
  overflow: auto;
  padding-right: 4px;
}

.admin-item {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-item img {
  width: 148px;
  height: 94px;
  object-fit: cover;
  border-radius: 6px;
}

.admin-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.admin-item p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.45;
}

.admin-item .meta {
  justify-content: flex-start;
  margin: 8px 0;
}

.admin-item .button {
  display: inline-flex;
  align-items: center;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #07090d;
}

.footer a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

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

.legal-page {
  min-height: 100vh;
  padding: 150px clamp(18px, 5vw, 72px) 72px;
  background:
    linear-gradient(180deg, rgba(7, 9, 13, 0.72), var(--bg) 420px),
    url("/assets/orbital-station.jpg") center top / cover no-repeat fixed;
}

.legal-panel {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 13, 19, 0.88);
  box-shadow: var(--shadow);
}

.legal-panel h1 {
  margin-bottom: 26px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
}

.legal-panel article {
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.legal-panel h2 {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: clamp(22px, 3vw, 30px);
}

.legal-panel p {
  max-width: 780px;
  margin: 0 0 10px;
  color: #c4d0d7;
  line-height: 1.7;
}

.cookie-banner {
  position: fixed;
  left: clamp(14px, 3vw, 28px);
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(65, 213, 211, 0.32);
  border-radius: 8px;
  background: rgba(8, 13, 19, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.cookie-banner strong {
  color: var(--text);
  font-size: 16px;
}

.cookie-banner p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-actions a {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}

.cookie-actions button {
  min-width: 112px;
}

@media (max-width: 900px) {
  .site-header,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .grid,
  .branches-grid,
  .login-shell,
  .not-found-panel,
  .cookie-banner,
  .admin-hero,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    justify-content: stretch;
  }

  .cookie-actions a,
  .cookie-actions button {
    flex: 1 1 160px;
    text-align: center;
  }

  .events-list.compact,
  .event-card {
    grid-template-columns: 1fr;
  }

  .event-card img {
    height: 220px;
    min-height: 0;
  }

  .article-shell,
  .page-shell,
  .events-shell,
  .event-detail-shell {
    background-attachment: scroll;
  }

  .article-content h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  .editor-panel {
    position: static;
  }

  .admin-news {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .admin-item {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .admin-actions {
    grid-column: 1 / -1;
  }

  .admin-item img {
    width: 110px;
    height: 78px;
  }
}

@media (max-width: 760px) {
  body.nav-open {
    overflow: hidden;
  }

  body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(2px);
  }

  .site-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .site-header .brand {
    flex: 1 1 auto;
  }

  .brand {
    min-width: 0;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    min-width: 0;
    font-size: 14px;
  }

  .brand-name span {
    font-size: 10px;
  }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
  }

  .nav-open .menu-toggle {
    position: fixed;
    top: 14px;
    right: 18px;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 30;
    width: min(82vw, 330px);
    height: 100vh;
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 96px 18px 24px;
    background: rgba(10, 15, 22, 0.98);
    border-left: 1px solid var(--line);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.45);
    transform: translateX(100%);
    transition: transform 200ms ease;
  }

  .nav-open .nav {
    transform: translateX(0);
  }

  .nav a,
  .nav button {
    width: 100%;
    justify-content: center;
    text-align: center;
    min-height: 48px;
  }

  .nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 14px;
  }

  .hero,
  .page-shell,
  .article-shell,
  .login-page,
  .admin-page {
    padding-top: 166px;
  }

  .login-page,
  .admin-page {
    padding-inline: 14px;
  }

  .login-intro {
    display: grid;
    gap: 14px;
  }

  .login-intro h1,
  .admin-hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item img {
    width: 100%;
    height: 160px;
  }

  .form-row,
  .ratio {
    grid-template-columns: 1fr;
  }
}
