/* A3E site chrome: the one header, footer and form baseline every page shares.
   Loaded after styles.css so it wins on header/footer; self-contained so pages
   without styles.css get the same chrome. Edit here, not per page. */
.site-header, .site-footer, .a3e-form-scope {
  --c-bg: #0a0714;
  --c-bg-2: #120c24;
  --c-card: rgba(255, 255, 255, 0.035);
  --c-line: rgba(147, 51, 234, 0.22);
  --c-text: #e8e6f3;
  --c-muted: #a3a0b8;
  --c-dim: #77738f;
  --c-purple: #7c3aed;
  --c-purple-2: #a78bfa;
  --c-cyan: #00d4ff;
  --c-gold: #ffd700;
  --c-grad: linear-gradient(135deg, #7c3aed 0%, #4f46e5 50%, #00d4ff 100%);
  --f-display: 'Orbitron', 'Inter', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(8, 5, 20, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--c-line);
  font-family: var(--f-body);
}
.site-header.is-sticky { position: sticky; }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.45), rgba(124, 58, 237, 0.6), rgba(255, 215, 0, 0.35), transparent);
  pointer-events: none;
}
.site-header .header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.site-header .brand, .site-footer .brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); flex-shrink: 0;
}
.site-header .logo-img, .site-footer .logo-img {
  width: 34px; height: 34px; object-fit: contain; display: block;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.28)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.5));
}
.site-header .brand-name, .site-footer .brand-name {
  font-family: var(--f-display); font-size: 13px; font-weight: 700; letter-spacing: 2px; color: var(--c-text); white-space: nowrap;
}
.site-header .brand-a3e, .site-footer .brand-a3e {
  background: linear-gradient(135deg, var(--c-gold), var(--c-purple-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.site-header .nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.site-header .nav a {
  color: var(--c-muted); text-decoration: none; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase; padding: 8px 10px; border-radius: 8px;
  transition: color .15s, background-color .15s; text-shadow: none !important;
}
.site-header .nav a:hover { color: #fff !important; background: rgba(124, 58, 237, 0.16); }
.site-header .nav a[aria-current="page"] { color: #fff; background: rgba(124, 58, 237, 0.22); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35); }
.site-header .nav a.nav-cta {
  color: #fff; background: var(--c-grad); margin-left: 6px; padding: 8px 14px;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}
.site-header .nav a.nav-cta:hover { filter: brightness(1.1); background: var(--c-grad); }
.site-header .nav-toggle {
  display: none; width: 42px; height: 42px; padding: 10px 9px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--c-line);
}
.site-header .nav-toggle span { display: block; height: 2px; margin: 4px 0; background: var(--c-text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 1060px) {
  .site-header .nav { display: none; }
  .site-header .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: 64px; left: 0; right: 0; padding: 12px 16px 18px;
    background: #0a0714; border-bottom: 1px solid var(--c-line);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45); max-height: calc(100vh - 64px); overflow-y: auto;
  }
  .site-header .nav.open a { padding: 13px 12px; font-size: 14px; }
  .site-header .nav.open a.nav-cta { margin: 8px 0 0; text-align: center; }
  .site-header .nav-toggle { display: block; }
}
@media (max-width: 420px) {
  .site-header .brand-name { font-size: 11px; letter-spacing: 1.4px; }
  .site-header .header-inner { padding: 0 16px; }
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  margin-top: 64px; padding: 56px 0 28px; position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 7, 20, 0) 0%, rgba(14, 9, 32, 0.96) 22%);
  border-top: 1px solid var(--c-line); font-family: var(--f-body); color: var(--c-muted);
}
.site-footer::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-cyan), var(--c-purple), transparent); opacity: .5;
}
.site-footer .footer-grid {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px;
}
.site-footer .footer-motto { margin: 14px 0 6px; font-size: 13px; color: var(--c-muted); font-family: var(--f-body); letter-spacing: 0; }
.site-footer .footer-fine { margin: 0; font-size: 12.5px; color: var(--c-dim); line-height: 1.6; }
.site-footer .footer-fine a { color: var(--c-muted); }
.site-footer .footer-col { display: flex; flex-direction: column; gap: 9px; }
.site-footer .footer-col h4 {
  margin: 4px 0 6px; font-family: var(--f-display); font-size: 11px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase; color: var(--c-text);
}
.site-footer .footer-col a { color: var(--c-muted); text-decoration: none; font-size: 13.5px; }
.site-footer .footer-col a:hover { color: #fff; }
.site-footer .footer-bottom {
  max-width: 1200px; margin: 40px auto 0; padding: 20px 24px 0; border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--c-dim);
}
.site-footer .footer-bottom p { margin: 0; font-size: 12px; color: var(--c-dim); line-height: 1.6; }
.site-footer .footer-bottom a { color: var(--c-muted); }
@media (max-width: 900px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .site-footer .footer-grid { padding: 0 16px; gap: 26px 20px; }
  .site-footer .footer-bottom { padding: 18px 16px 0; }
}

/* ── Form baseline ──────────────────────────────────────
   Zero-specificity (:where) so any page rule wins; this only dresses
   controls a page left at browser defaults. */
:where(body) :where(select, textarea, input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=submit], [type=button], [type=hidden], [type=color])) {
  font: inherit; color: #e8e6f3; background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(147, 51, 234, 0.32); border-radius: 10px; padding: 10px 12px; min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
:where(body) :where(select, textarea, input):focus-visible {
  outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.28);
}
:where(body) :where(select) {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  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 1l5 5 5-5' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
}
:where(body) :where(select option) { background: #140d2a; color: #e8e6f3; }
:where(body) :where(input[type=checkbox], input[type=radio]) { accent-color: #7c3aed; width: 16px; height: 16px; }
:where(body) :where(input[type=file]) {
  font: inherit; font-size: 13px; color: #a3a0b8; width: 100%; padding: 10px;
  border: 1px dashed rgba(147, 51, 234, 0.45); border-radius: 12px; background: rgba(124, 58, 237, 0.06); cursor: pointer;
}
:where(body) :where(input[type=file])::file-selector-button {
  font: inherit; font-weight: 600; font-size: 13px; color: #fff; cursor: pointer; margin-right: 12px;
  padding: 8px 14px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #7c3aed, #4f46e5);
}
:where(body) ::placeholder { color: #77738f; opacity: 1; }

/* Links a page left at browser default blue are unreadable on the dark base. */
:where(a) { color: #7dd3fc; }
:where(a:hover) { color: #bae6fd; }

/* Long tokens (DNS records, domains, schema names) and wide tables must not push a phone screen sideways. */
:where(body) { overflow-wrap: break-word; }
:where(main, article, section) :where(code, kbd, samp) { overflow-wrap: anywhere; }
:where(main, article, section) :where(pre) { max-width: 100%; overflow-x: auto; }
:where(main, article, section) :where(img, video) { max-width: 100%; height: auto; }
@media (max-width: 700px) {
  :where(main, article, section) :where(table) { display: block; max-width: 100%; overflow-x: auto; }
}
