:root {
  color-scheme: dark;
  --bg: #08090d;
  --bg-soft: #0d0f15;
  --surface: #11131a;
  --surface-2: #171a23;
  --surface-3: #1d212c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #f4f5ef;
  --ink-soft: #d8dbe1;
  --muted: #969daa;
  --muted-2: #6f7684;
  --lime: #c7ff4a;
  --lime-deep: #8fd51f;
  --lime-soft: rgba(199, 255, 74, 0.12);
  --coral: #ff6b5f;
  --coral-soft: rgba(255, 107, 95, 0.12);
  --violet: #b79cff;
  --violet-soft: rgba(183, 156, 255, 0.13);
  --gold: #ffd166;
  --gold-soft: rgba(255, 209, 102, 0.13);
  --radius: 24px;
  --radius-sm: 16px;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  -webkit-text-size-adjust: 100%;
}

html.modal-open {
  overflow: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection,
body *::selection {
  background: var(--lime);
  color: #08090d;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--lime);
  color: #08090d;
  font-weight: 800;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1240px, calc(100% - 64px));
  margin-inline: auto;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(199, 255, 74, 0.11), transparent 62%),
    radial-gradient(760px 540px at 92% 4%, rgba(183, 156, 255, 0.09), transparent 60%),
    linear-gradient(180deg, #0a0b10 0%, #08090d 40%, #08090d 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}

.orb-lime {
  width: 480px;
  height: 480px;
  top: -190px;
  left: -120px;
  background: rgba(199, 255, 74, 0.18);
}

.orb-violet {
  width: 520px;
  height: 520px;
  top: 240px;
  right: -220px;
  background: rgba(139, 106, 255, 0.14);
}

.grid-plane {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 70%);
}

.site-header,
.admin-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(8, 9, 13, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--lime);
  color: #08090d;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 24px rgba(199, 255, 74, 0.22);
  transform: rotate(-4deg);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 21px;
}

.brand-word {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-word span {
  color: var(--lime);
}

.brand-tag {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.site-nav a:not(.btn):hover {
  color: var(--ink);
}

.site-nav .nav-admin {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.btn-primary {
  background: var(--lime);
  color: #08090d;
  box-shadow: 0 10px 34px rgba(199, 255, 74, 0.18);
}

.btn-primary:hover:not(:disabled) {
  background: #d4ff71;
  box-shadow: 0 14px 42px rgba(199, 255, 74, 0.26);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
}

.btn-sm {
  padding: 10px 16px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
}

.btn.is-loading {
  pointer-events: none;
}

.btn.is-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.text-btn {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.kicker {
  margin-bottom: 10px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.section-note {
  max-width: 380px;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(24, 27, 37, 0.92), rgba(13, 15, 21, 0.94));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-head h2,
.panel-head h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.panel-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.panel-chip {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(199, 255, 74, 0.24), transparent 58%),
    linear-gradient(145deg, #252a36, #14171e);
}

.avatar span {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--lime);
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar img.is-broken {
  display: none;
}

.avatar.lg {
  width: 92px;
  height: 92px;
  border-radius: 26px;
}

.avatar.lg span {
  font-size: 30px;
}

.avatar.md {
  width: 56px;
  height: 56px;
  border-radius: 17px;
}

.avatar.md span {
  font-size: 19px;
}

.avatar.sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.avatar.sm span {
  font-size: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: var(--lime);
  font-size: 30px;
  font-weight: 300;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: -0.03em;
}

.empty-state p {
  max-width: 420px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.empty-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 16px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-inline > span {
  color: var(--muted-2);
  font-size: 26px;
}

.select,
.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.select {
  width: auto;
  min-width: 142px;
  padding: 11px 36px 11px 14px;
  appearance: none;
  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 d='m1 1 5 5 5-5' fill='none' stroke='%23969daa' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.select option {
  background: #14171e;
  color: var(--ink);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.field > span em {
  color: var(--muted-2);
  font-style: normal;
  font-weight: 500;
}

.field input,
.field textarea {
  padding: 13px 14px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
  line-height: 1.55;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-2);
}

.field input:focus,
.field textarea:focus,
.select:focus {
  border-color: rgba(199, 255, 74, 0.55);
  background: rgba(199, 255, 74, 0.045);
  box-shadow: 0 0 0 4px rgba(199, 255, 74, 0.08);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 107, 95, 0.3);
  border-radius: 10px;
  background: var(--coral-soft);
  color: #ffa39b;
  font-size: 12px;
  line-height: 1.45;
}

.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 36px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #101218;
  color: var(--ink);
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.7);
}

.modal::backdrop {
  background: rgba(3, 4, 7, 0.78);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.modal[open] {
  animation: modal-in 0.26s cubic-bezier(0.2, 0.9, 0.26, 1) both;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(8, 9, 13, 0.62);
  color: var(--ink);
  backdrop-filter: blur(12px);
  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: rotate(90deg);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-shell {
  padding: 32px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(380px, calc(100vw - 44px));
  padding: 13px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(20, 23, 31, 0.96);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 0.24s ease both;
  backdrop-filter: blur(16px);
}

.toast::before {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(199, 255, 74, 0.6);
}

.toast.error::before {
  background: var(--coral);
  box-shadow: 0 0 12px rgba(255, 107, 95, 0.6);
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

.site-footer {
  margin-top: 84px;
  border-top: 1px solid var(--line);
  background: rgba(10, 11, 16, 0.6);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-block: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand strong {
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: -0.03em;
}

.footer-brand p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.footer-links {
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

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

.footer-note {
  color: var(--muted-2);
  font-size: 11px;
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 18px;
  border: 1px solid var(--coral);
  border-radius: 12px;
  background: #1c1010;
  color: #ffb0aa;
  font-size: 13px;
  text-align: center;
}

.pulse {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(199, 255, 74, 0.6);
  animation: pulse 2.2s infinite;
}

.pulse.small {
  width: 5px;
  height: 5px;
}

.pulse.paused {
  background: var(--muted-2);
  box-shadow: none;
  animation: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(199, 255, 74, 0.5);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(199, 255, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(199, 255, 74, 0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .container {
    width: min(1240px, calc(100% - 40px));
  }

  .site-nav a:not(.btn):not(:first-child) {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .section-note {
    max-width: 540px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
}

@media (max-width: 620px) {
  .container {
    width: calc(100% - 32px);
  }

  .brand-tag {
    display: none;
  }

  .brand-word {
    font-size: 18px;
  }

  .header-inner {
    min-height: 66px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a:not(.btn) {
    display: none;
  }

  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .modal {
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
  }

  .modal-shell {
    padding: 26px 20px 30px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

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

::-webkit-scrollbar-track {
  background: #0a0b10;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #0a0b10;
  border-radius: 999px;
  background: #2b303c;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4050;
}
