* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --bg: #000000;
  --surface: #080808;
  --surface-2: #0d0d0d;
  --text: #ffffff;
  --muted: #c7c7c7;
  --muted-soft: #9d9d9d;
  --line: rgba(255, 255, 255, 0.28);
  --line-strong: rgba(255, 255, 255, 0.48);
  --violet-a: rgba(122, 92, 255, 0.22);
  --violet-b: rgba(184, 86, 255, 0.16);
}

body.theme-black {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  background-image:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.025), transparent 18%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.04), transparent 26%);
}

.layout {
  width: min(1160px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 40px 0 84px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
}

.nav-row,
.footer-row,
.cta-row,
.nav-links,
.footer-links {
  display: flex;
  align-items: center;
}

.nav-row,
.footer-row {
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links,
.footer-links,
.cta-row {
  gap: 18px;
  flex-wrap: wrap;
}

.nav-links a,
.footer-links a,
.button-link {
  color: var(--text);
  text-decoration: none;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 8px;
}

.hero-card,
.legal-card {
  border: 3px dashed rgba(255, 255, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
  padding: 42px;
  margin-bottom: 36px;
}

.hero-card-small {
  padding-top: 30px;
  padding-bottom: 30px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.hero.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-soft);
  font-size: 11px;
}

h1,
h2 {
  margin: 0;
  font-family: "IBM Plex Serif", Georgia, serif;
}

h1 {
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  max-width: 12ch;
  text-wrap: balance;
  letter-spacing: -0.03em;
}

.hero-break {
  display: block;
}

.hero-break-wide {
  max-width: 13ch;
}

h2 {
  font-size: 30px;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.72;
  margin-top: 18px;
  text-wrap: pretty;
  font-size: 18px;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-lead {
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  justify-content: center;
}

.hero-side {
  display: grid;
  gap: 16px;
  min-width: 340px;
  max-width: 360px;
}

.feature-card,
.plan-card {
  border: 3px dashed rgba(255, 255, 255, 0.34);
  padding: 20px;
  background: rgba(255, 255, 255, 0.018);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  justify-content: center;
}

.hero-badges span {
  padding: 9px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 3px dashed rgba(255, 255, 255, 0.28);
}

.hero-stat,
.hero-preview {
  border: 3px dashed rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.018);
  padding: 20px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.hero-stat strong {
  display: block;
  font-size: 24px;
  line-height: 1.28;
  margin-bottom: 12px;
  text-wrap: balance;
}

.hero-preview {
  display: grid;
  gap: 12px;
}

.preview-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.preview-tag {
  padding: 13px 14px;
  color: var(--muted);
  border: 3px dashed rgba(255, 255, 255, 0.24);
}

.mini-card {
  border: 3px dashed rgba(255, 255, 255, 0.32);
  padding: 18px;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.feature-card p,
.plan-card p,
.footer-copy,
.form-note,
.section-note,
.legal-copy p {
  color: var(--muted);
  line-height: 1.72;
}

.feature-step {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted-soft);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--line);
}

.ghost-link {
  background: rgba(255, 255, 255, 0.03);
}

.price-box,
.panel,
.notice,
input,
button {
  border: 3px dashed rgba(255, 255, 255, 0.3);
}

.price-box,
.panel,
.notice {
  background: var(--surface);
}

.price-box {
  min-width: 280px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.price-box div,
.dashboard-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

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

.section-block {
  margin-bottom: 40px;
}

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

.strip-card,
.step-card {
  border: 3px dashed rgba(255, 255, 255, 0.3);
  padding: 22px;
  background: rgba(255, 255, 255, 0.016);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

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

.steps-grid-tight {
  gap: 16px;
}

.instruction-block {
  margin-top: 8px;
}

.interactive-steps .step-card {
  min-height: 100%;
  display: grid;
  align-content: start;
  animation: instruction-pulse 10s ease-in-out infinite;
  transform-origin: center;
  padding: 18px;
  gap: 8px;
}

.interactive-steps .step-card:nth-child(2) {
  animation-delay: 2.5s;
}

.interactive-steps .step-card:nth-child(3) {
  animation-delay: 5s;
}

.interactive-steps .step-card:nth-child(4) {
  animation-delay: 7.5s;
}

.compact-tariffs {
  margin-top: 14px;
}

.instruction-link-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.instruction-inline-note {
  color: var(--muted);
  line-height: 1.6;
}

.interactive-steps .step-number {
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
}

.interactive-steps strong {
  font-size: 16px;
  line-height: 1.35;
}

.interactive-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.interactive-steps .download-links {
  margin-top: 10px;
  gap: 8px;
}

.interactive-steps .download-links a {
  min-height: 40px;
  padding: 8px 12px;
}

.interactive-steps .compact-tariffs {
  margin-top: 10px;
}

.interactive-steps .compact-tariffs .plan-btn {
  min-height: 42px;
}

.interactive-steps .instruction-link-actions {
  margin-top: 10px;
}

@keyframes instruction-pulse {
  0%, 18%, 100% {
    transform: scale(1);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.016);
    box-shadow: none;
  }
  6%, 12% {
    transform: scale(1.025);
    border-color: rgba(190, 160, 255, 0.74);
    background:
      linear-gradient(135deg, rgba(122, 92, 255, 0.18), transparent 55%),
      linear-gradient(225deg, rgba(184, 86, 255, 0.14), transparent 60%),
      rgba(255, 255, 255, 0.03);
    box-shadow: 0 18px 44px rgba(90, 56, 180, 0.24);
  }
}

.step-number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 3px dashed rgba(255, 255, 255, 0.28);
  margin-bottom: 14px;
  color: var(--muted);
}

.step-card a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

.download-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.download-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 3px dashed rgba(255, 255, 255, 0.28);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.02);
}

.download-links a:hover {
  border-color: rgba(190, 160, 255, 0.6);
  background:
    linear-gradient(135deg, var(--violet-a), transparent 55%),
    linear-gradient(225deg, var(--violet-b), transparent 60%),
    rgba(255, 255, 255, 0.03);
}

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

.section-head > div {
  max-width: 640px;
}

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

.plan-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 100%;
}

.plan-link-card {
  text-decoration: none;
  color: var(--text);
}

.plan-name,
.plan-price {
  display: block;
}

.plan-name {
  color: var(--muted-soft);
  margin-bottom: 6px;
}

.plan-price {
  font-size: 34px;
  margin-bottom: 6px;
}

.plan-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  margin-top: 8px;
  border: 3px dashed rgba(255, 255, 255, 0.28);
}

.dashboard-grid {
  align-items: stretch;
  margin-bottom: 44px;
}

.dashboard-account-grid {
  align-items: start;
  margin-bottom: 24px;
}

.server-health-panel {
  margin-bottom: 40px;
}

.auth-grid {
  margin-bottom: 40px;
}

.panel {
  padding: 32px;
  min-width: 0;
}

.equal-panel {
  height: 100%;
  display: grid;
  align-content: start;
}

.section-head-compact {
  margin-bottom: 16px;
}

#account-info .dashboard-row,
#dashboard-info .dashboard-row {
  align-items: flex-start;
}

.server-health-compact {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 3px dashed rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.02);
}

.server-status-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 18px;
  background: #53d769;
  box-shadow: 0 0 0 6px rgba(83, 215, 105, 0.16);
}

.server-health-compact.is-yellow .server-status-dot {
  background: #ffd60a;
  box-shadow: 0 0 0 6px rgba(255, 214, 10, 0.16);
}

.server-health-compact.is-red .server-status-dot {
  background: #ff453a;
  box-shadow: 0 0 0 6px rgba(255, 69, 58, 0.16);
}

.server-status-copy {
  display: grid;
  gap: 4px;
}

.server-status-copy strong {
  font-size: 18px;
  line-height: 1.2;
}

.server-status-copy span {
  color: var(--muted);
  line-height: 1.5;
}

#password-form {
  margin-top: 4px;
}

#password-result {
  margin-top: 14px;
}

.panel-highlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: 0 24px 80px rgba(255, 255, 255, 0.04);
}

.panel-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.single-center {
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
}

.stack {
  display: grid;
  gap: 14px;
}

input {
  width: 100%;
  padding: 15px 16px;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  border-radius: 0;
  line-height: 1.4;
}

input::placeholder {
  color: #8b8b8b;
}

select {
  width: 100%;
  padding: 15px 16px;
  background: var(--surface-2);
  color: var(--text);
  outline: none;
  border-radius: 0;
  line-height: 1.4;
  border: 3px dashed rgba(255, 255, 255, 0.3);
}

button {
  padding: 15px 16px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.ghost {
  min-width: 120px;
}

.notice {
  padding: 15px 16px;
  color: var(--muted);
  line-height: 1.6;
}

.hidden {
  display: none;
}

.tariff-list {
  display: grid;
  gap: 12px;
}

.status-bar {
  padding: 13px 14px;
  margin-bottom: 14px;
  border: 3px dashed rgba(255, 255, 255, 0.28);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  line-height: 1.5;
}

.status-bar.loading {
  color: #f0f0f0;
}

.status-bar.success {
  color: #d7ffd9;
  border-color: rgba(110, 255, 110, 0.45);
}

.status-bar.error {
  color: #ffd1d1;
  border-color: rgba(255, 120, 120, 0.5);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: section-reveal 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay-1 {
  animation-delay: 90ms;
}

.reveal-delay-2 {
  animation-delay: 180ms;
}

.reveal-delay-3 {
  animation-delay: 270ms;
}

.reveal-delay-4 {
  animation-delay: 360ms;
}

.divider {
  height: 1px;
  border-top: 3px dashed rgba(255, 255, 255, 0.24);
  margin: 24px 0;
}

.subhead {
  font-size: 22px;
}

.link-box {
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
}

.link-panel {
  display: grid;
  gap: 12px;
}

.link-copy-trigger {
  width: 100%;
  text-align: left;
  font: inherit;
  line-height: 1.6;
}

.copy-btn {
  width: fit-content;
  min-width: 160px;
}

.muted {
  color: var(--muted);
}

.legal-copy {
  max-width: 72ch;
}

.legal-copy a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

.full-width {
  width: 100%;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-width: 260px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 3px dashed rgba(255, 255, 255, 0.32);
  background: rgba(8, 8, 8, 0.94);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  line-height: 1.55;
}

.toast.success {
  border-color: rgba(110, 255, 110, 0.45);
}

.toast.error {
  border-color: rgba(255, 120, 120, 0.5);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  z-index: 0;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  padding: 28px;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  background: linear-gradient(180deg, rgba(20, 20, 20, 0.98), rgba(10, 10, 10, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.consent-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  line-height: 1.6;
  margin: 18px 0 22px;
}

.consent-check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.consent-check a {
  color: var(--text);
}

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

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

.admin-user-card {
  display: grid;
  gap: 16px;
}

.admin-user-head,
.admin-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

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

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 3px dashed rgba(255, 255, 255, 0.28);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

.admin-link-panel {
  align-items: stretch;
}

.site-footer {
  border-top: 3px dashed rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.02);
}

.feature-card:hover,
.plan-card:hover,
.hero-stat:hover,
.hero-preview:hover,
.mini-card:hover,
.strip-card:hover,
.step-card:hover {
  border-color: rgba(190, 160, 255, 0.6);
  background:
    linear-gradient(135deg, var(--violet-a), transparent 55%),
    linear-gradient(225deg, var(--violet-b), transparent 60%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 44px rgba(90, 56, 180, 0.22);
  transform: translateY(-2px);
}

@keyframes section-reveal {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 800px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .price-box {
    min-width: 0;
  }

  .hero-side,
  .section-head,
  .nav-row,
  .footer-row {
    display: grid;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .feature-strip,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .download-links {
    grid-template-columns: 1fr;
  }

  .layout {
    width: min(100vw - 20px, 1160px);
  }

  .hero-card,
  .panel,
  .legal-card {
    padding: 22px;
  }

  .hero-card,
  .legal-card,
  .feature-card,
  .plan-card,
  .hero-stat,
  .hero-preview,
  .mini-card,
  .strip-card,
  .step-card,
  .price-box,
  .panel,
  .notice,
  input,
  button,
  .status-bar,
  .modal-card,
  .site-footer,
  .hero-badges span,
  .preview-tag,
  .step-number,
  .download-links a {
    border-width: 2px;
  }

  h1 {
    max-width: none;
  }

  .lead,
  .section-head > div,
  .hero-copy {
    max-width: none;
  }

  .toast {
    right: 10px;
    left: 10px;
    bottom: 10px;
    max-width: none;
    min-width: 0;
  }
}
