:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.5;
  --bg: #0d111b;
  --surface: #111827;
  --border: #2a3444;
  --text: #e7ecf3;
  --muted: #a8b0c2;
  --gold-start: #d4a017;
  --gold-end: #f0c14b;
  --accent: var(--gold-start);
  --blue: #3b82f6;
  --ok: #4ade80;
  --warn: #fbbf24;
  --error: #f87171;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

@keyframes veil-rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  animation: veil-rise-in 0.35s ease both;
}

.hero {
  animation-delay: 0.05s;
}

.nav-signout {
  background: none;
  border: 0;
  color: #f6d57a;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  padding: 0;
}

.nav-signout:hover {
  text-decoration: underline;
}

.nav [aria-current="page"] {
  color: #e7ecf3;
  font-weight: 600;
  text-decoration: none;
}

a { color: #f6d57a; }

.layout {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: rgba(212, 160, 23, 0.25);
}

.card + .card { margin-top: 1rem; }

h1 { font-size: 1.35rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
p, .lede { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: #c8d0dc;
}

input, textarea, select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #3a4658;
  background: var(--bg);
  color: inherit;
  font-size: 0.98rem;
}

input.code {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.field { margin-bottom: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  color: #17130a;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(212, 160, 23, 0.25);
}

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

.btn:disabled { opacity: 0.6; cursor: wait; }
.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: none;
}
.btn--ghost:hover:not(:disabled) {
  border-color: rgba(212, 160, 23, 0.45);
  color: #f6d57a;
  transform: none;
}
.btn--danger { background: #dc2626; }
.btn--sm { padding: 0.45rem 0.75rem; font-size: 0.85rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.status { margin-top: 1rem; min-height: 1.25rem; font-size: 0.9rem; }
.status.error { color: var(--error); }
.status.ok { color: var(--ok); }
.status.warn { color: var(--warn); }

.hint { font-size: 0.85rem; color: #9aa4b4; margin-top: 0.35rem; }

.credential {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px dashed #3a4658;
  background: #11161d;
}

.credential code {
  display: block;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { color: var(--muted); font-weight: 600; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--ok { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.badge--off { background: rgba(248, 113, 113, 0.15); color: var(--error); }

.hidden { display: none !important; }

.layout--wide { max-width: 960px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: block;
}

.brand__name {
  display: block;
  font-size: 1.1rem;
}

.brand__byline {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.nav--header { margin-bottom: 0; }

.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f6d57a;
}

.hero h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

.hero__lede { font-size: 1rem; max-width: 52ch; }

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

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

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
}

.card--flat {
  box-shadow: none;
  background: rgba(23, 29, 38, 0.85);
}

.steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.steps li { margin-bottom: 0.5rem; }

.steps strong { color: var(--text); }

.trust-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.trust-list li { margin-bottom: 0.35rem; }

.site-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer a { color: #f6d57a; }

.price-card { display: flex; flex-direction: column; gap: 0.5rem; }
.price-card--featured { border: 1px solid rgba(246, 213, 122, 0.45); box-shadow: 0 0 0 1px rgba(246, 213, 122, 0.12); }
.price-card__amount { margin: 0; font-size: 2rem; font-weight: 700; color: var(--text); }
.price-card__unit { font-size: 0.95rem; font-weight: 500; color: var(--muted); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.stat-tile {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.stat-tile__value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}

.credential__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.credential__row code {
  flex: 1;
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}

.invite-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  border: 1px dashed #3a4658;
  background: #11161d;
}

.invite-box textarea {
  min-height: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  resize: vertical;
}

@media (max-width: 600px) {
  .btn-row { flex-direction: column; }
  .btn { width: 100%; }
}
