:root {
  --bg: #110c1c;
  --bg-tint: #1a1228;
  --surface: #1d1632;
  --surface-2: #261d40;
  --surface-hi: #2f244e;
  --line: #2e2547;
  --line-soft: #221a37;
  --text: #ece4d2;
  --text-soft: #b8a9cc;
  --text-faint: #7a6c93;
  --amber: #e6a857;
  --amber-hi: #f0b667;
  --lilac: #b89ce6;
  --plum: #9a6fd1;
  --ok: #7fb988;
  --danger: #e07856;
  --font-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(154, 111, 209, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 95% 10%, rgba(230, 168, 87, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 70% 100%, rgba(184, 156, 230, 0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

::selection { background: var(--amber); color: var(--bg); }

a { color: var(--lilac); }
a:hover { color: var(--amber); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}
.wrap-narrow { max-width: 760px; }

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 30px 0 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, var(--surface-hi), var(--surface-2));
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 20px;
  position: relative;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 22px -10px rgba(154, 111, 209, 0.45);
  flex: 0 0 auto;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(230, 168, 87, 0.14);
  border-radius: 6px;
  pointer-events: none;
}

.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 20px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: #1a1228;
  box-shadow: 0 8px 24px -8px rgba(230, 168, 87, 0.55), 0 1px 0 rgba(255,255,255,0.2) inset;
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--amber-hi);
  color: #1a1228;
  box-shadow: 0 12px 32px -8px rgba(230, 168, 87, 0.7), 0 1px 0 rgba(255,255,255,0.25) inset;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--lilac);
  color: var(--text);
  background: rgba(184, 156, 230, 0.06);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(224, 120, 86, 0.35);
}
.btn-danger:hover { background: rgba(224, 120, 86, 0.08); color: var(--danger); }

.arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  transition: transform 0.2s;
}
.btn:hover .arrow { transform: translateX(3px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
}

.page-title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 380;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--text);
}
.page-title em, .em {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

.lede {
  font-size: 17px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 56ch;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line-soft); }

.panel {
  background: linear-gradient(170deg, var(--surface), var(--bg-tint));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.7);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.panel-body { padding: 24px; }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}
.dot.busy { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.dot.bad { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.field { display: grid; gap: 7px; }

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.01em;
}

.input,
.field input[type="text"],
.field input[type="password"],
.field input[type="search"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  background: rgba(17, 12, 28, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font: inherit;
  font-size: 14.5px;
  color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.input::placeholder,
.field input::placeholder { color: var(--text-faint); }
.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--plum);
  background: rgba(154, 111, 209, 0.06);
  box-shadow: 0 0 0 3px rgba(154, 111, 209, 0.22);
}

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(184, 156, 230, 0.10);
  color: var(--lilac);
  border: 1px solid rgba(154, 111, 209, 0.35);
}
.tag.live { color: var(--ok); background: rgba(127, 185, 136, 0.10); border-color: rgba(127, 185, 136, 0.3); }

.notice {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  padding: 13px 16px;
  font-size: 14px;
  line-height: 1.5;
}
.notice.ok { border-color: rgba(127, 185, 136, 0.4); color: var(--ok); background: rgba(127, 185, 136, 0.07); }
.notice.err { border-color: rgba(224, 120, 86, 0.4); color: var(--danger); background: rgba(224, 120, 86, 0.07); }

.mono { font-family: var(--font-mono); }
.faint { color: var(--text-faint); }
.soft { color: var(--text-soft); }

.site-footer {
  border-top: 1px solid var(--line-soft);
  margin-top: 80px;
  padding: 28px 0 44px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-text { font-size: 13.5px; color: var(--text-faint); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a {
  font-size: 13.5px;
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--amber); }

.fade-in { animation: fadeUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.25s; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@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;
  }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .site-nav { padding: 22px 0 18px; }
  .panel-body { padding: 18px; }
}
