:root {
  color-scheme: dark;
  --ib-bg: #05080c;
  --ib-bg-soft: #0a1017;
  --ib-surface: #0f1720;
  --ib-surface-2: #141f2a;
  --ib-surface-3: #1a2834;
  --ib-panel-light: #f4f7f8;
  --ib-text: #f5f8fa;
  --ib-text-soft: #b6c2ca;
  --ib-text-muted: #83929d;
  --ib-ink: #0a1118;
  --ib-line: rgba(176, 203, 218, .16);
  --ib-line-strong: rgba(176, 203, 218, .3);
  --ib-border: rgba(176, 203, 218, .22);
  --ib-yellow: #f4c400;
  --ib-yellow-hover: #ffda32;
  --ib-cyan: #4de1ff;
  --ib-cyan-soft: rgba(77, 225, 255, .12);
  --ib-violet: #8e7cff;
  --ib-success: #48d597;
  --ib-warning: #ffbf47;
  --ib-error: #ff6b73;
  --ib-info: #60a5fa;
  --ib-radius-sm: 8px;
  --ib-radius-md: 14px;
  --ib-radius-lg: 22px;
  --ib-shadow-sm: 0 10px 30px rgba(0, 0, 0, .18);
  --ib-shadow-lg: 0 32px 90px rgba(0, 0, 0, .34);
  --ib-shadow-xl: 0 38px 100px rgba(0, 0, 0, .44);
  --ib-glow-cyan: 0 0 0 1px rgba(77, 225, 255, .18), 0 20px 70px rgba(18, 180, 216, .1);
  --ib-max: 1240px;
  --ib-space-1: 4px;
  --ib-space-2: 8px;
  --ib-space-3: 12px;
  --ib-space-4: 16px;
  --ib-space-5: 24px;
  --ib-space-6: 32px;
  --ib-space-7: 48px;
  --ib-space-8: 72px;
  --ib-ease: cubic-bezier(.2, .8, .2, 1);
  --ib-speed-fast: 160ms;
  --ib-speed: 240ms;
  --ib-font-display: "Space Grotesk", Manrope, sans-serif;
  --ib-font-body: Manrope, Arial, sans-serif;
  --ib-font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ib-bg); }
body { margin: 0; background: var(--ib-bg); color: var(--ib-text); font: 16px/1.6 Manrope, Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: "Space Grotesk", Manrope, sans-serif; line-height: 1.06; }
::selection { background: var(--ib-cyan); color: var(--ib-ink); }

:focus-visible {
  outline: 3px solid var(--ib-cyan);
  outline-offset: 3px;
}

.ib-container { width: min(calc(100% - 40px), var(--ib-max)); margin-inline: auto; }
.ib-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--ib-cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.ib-kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.ib-muted { color: var(--ib-text-muted); }
.ib-hidden, .hidden { display: none !important; }

.ib-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--ib-radius-sm);
  background: var(--ib-yellow);
  color: var(--ib-ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s var(--ib-ease), box-shadow .2s var(--ib-ease), background .2s var(--ib-ease), border-color .2s var(--ib-ease);
}
.ib-btn:hover { transform: translateY(-2px); background: var(--ib-yellow-hover); box-shadow: 0 12px 34px rgba(244, 196, 0, .22); }
.ib-btn:active { transform: translateY(0) scale(.98); }
.ib-btn:disabled { cursor: wait; opacity: .55; transform: none; box-shadow: none; }
.ib-btn-secondary { background: var(--ib-surface-2); color: var(--ib-text); border-color: var(--ib-line-strong); }
.ib-btn-secondary:hover { background: var(--ib-surface-3); box-shadow: none; }
.ib-btn-ghost { background: transparent; color: var(--ib-text); border-color: var(--ib-line); }
.ib-btn-ghost:hover { background: rgba(255, 255, 255, .05); box-shadow: none; }
.ib-btn-danger { background: var(--ib-error); color: #160407; }

.ib-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--ib-line);
  border-radius: 999px;
  background: var(--ib-surface-2);
  color: var(--ib-text-soft);
  font-size: 12px;
  font-weight: 800;
}
.ib-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ib-cyan); box-shadow: 0 0 12px var(--ib-cyan); }

.ib-field { display: grid; gap: 8px; color: var(--ib-text-soft); font-size: 14px; font-weight: 700; }
.ib-field em { color: var(--ib-text-muted); font-style: normal; font-weight: 500; }
.ib-input,
.ib-select,
.ib-textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ib-line-strong);
  border-radius: var(--ib-radius-sm);
  background: #0a1118;
  color: var(--ib-text);
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.ib-textarea { min-height: 130px; resize: vertical; }
.ib-input::placeholder, .ib-textarea::placeholder { color: #667680; }
.ib-input:hover, .ib-select:hover, .ib-textarea:hover { border-color: rgba(176, 203, 218, .48); }
.ib-input:focus, .ib-select:focus, .ib-textarea:focus { border-color: var(--ib-cyan); box-shadow: 0 0 0 4px rgba(77, 225, 255, .12); background: #0d1720; }
[aria-invalid="true"] { border-color: var(--ib-error) !important; box-shadow: 0 0 0 4px rgba(255, 107, 115, .12) !important; }

.ib-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(77, 225, 255, .3);
  border-left: 4px solid var(--ib-cyan);
  border-radius: var(--ib-radius-sm);
  background: rgba(77, 225, 255, .08);
  color: var(--ib-text-soft);
  font-size: 14px;
}
.ib-alert-error { border-color: rgba(255, 107, 115, .34); border-left-color: var(--ib-error); background: rgba(255, 107, 115, .08); color: #ffd9dc; }
.ib-alert-success { border-color: rgba(72, 213, 151, .34); border-left-color: var(--ib-success); background: rgba(72, 213, 151, .08); color: #d5ffea; }

.ib-card {
  border: 1px solid var(--ib-line);
  border-radius: var(--ib-radius-md);
  background: var(--ib-surface);
  box-shadow: var(--ib-shadow-sm);
}

@media (max-width: 640px) {
  .ib-container { width: min(calc(100% - 28px), var(--ib-max)); }
  .ib-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
