:root {
  --z0-bg: #0a0a0a;
  --z0-card: #0a0a0a;
  --z0-surface: #161618;
  --z0-surface-strong: #1e1e21;
  --z0-text: #fafafa;
  --z0-text-muted: #a1a1aa;
  --z0-text-faint: #52525b;
  --z0-border: #27272a;
  --z0-border-glow: rgba(250, 250, 250, 0.3);
  --z0-border-glow-strong: rgba(250, 250, 250, 0.5);
  --z0-primary: #fafafa;
  --z0-primary-fg: #18181b;
  --z0-glow: rgba(0, 255, 170, 0.5);
  --z0-glow-soft: rgba(0, 255, 170, 0.2);
  --z0-glow-subtle: rgba(0, 255, 170, 0.08);
  --z0-destructive: #7f1d1d;
  --z0-radius: 0.5rem;
  --z0-radius-lg: 0.75rem;
  --z0-radius-xl: 1rem;
  --z0-font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", "Courier New", monospace;
  --z0-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --z0-cat-web: #3b82f6;
  --z0-cat-crypto: #10b981;
  --z0-cat-forensics: #f59e0b;
  --z0-cat-pwn: #ef4444;
  --z0-cat-rev: #8b5cf6;
  --z0-cat-osint: #f97316;
  --z0-cat-misc: #06b6d4;
}

html {
  color-scheme: dark;
}

html, body {
  min-height: 100%;
}

body.z0-body {
  background: #000000 !important;
  background-color: #000000 !important;
  color: var(--z0-text) !important;
  font-family: var(--z0-font-sans) !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.z0-body,
:root,
[data-bs-theme="dark"],
[data-bs-theme="light"] {
  --bs-body-bg: #000000 !important;
  --bs-body-bg-rgb: 0, 0, 0 !important;
  --bs-body-color: #fafafa !important;
  --bs-body-color-rgb: 250, 250, 250 !important;
  --bs-dark: #000000 !important;
  --bs-dark-rgb: 0, 0, 0 !important;
  --bs-secondary-bg: #161618 !important;
  --bs-secondary-bg-rgb: 22, 22, 24 !important;
  --bs-tertiary-bg: #1e1e21 !important;
  --bs-tertiary-bg-rgb: 30, 30, 33 !important;
  --bs-border-color: #27272a !important;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.1) !important;
  --bs-emphasis-color: #fafafa !important;
  --bs-link-color: #fafafa !important;
  --bs-link-hover-color: #fafafa !important;
  --bs-heading-color: #fafafa !important;
  --bs-code-color: #22c55e !important;
}

html[data-bs-theme="dark"],
html[data-bs-theme="light"],
html {
  --bs-body-bg: #000000 !important;
  --bs-body-bg-rgb: 0, 0, 0 !important;
}

html[data-bs-theme="dark"] body,
html[data-bs-theme="light"] body,
body {
  background-color: #000000 !important;
}

::selection {
  background: rgba(0, 255, 170, 0.3);
  color: white;
}

/* ─── scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--z0-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }
* { scrollbar-width: thin; scrollbar-color: var(--z0-border) transparent; }

/* ─── layout ─── */
main {
  padding-top: 0 !important;
  margin-bottom: 0 !important;
  flex: 1 0 auto;
}

.z0-main {
  padding: 0 0 4rem;
  flex: 1 0 auto;
}

.container {
  max-width: 1400px;
}

/* ─── typography ─── */
a {
  color: var(--z0-text);
  text-decoration: none;
  transition: color 300ms, opacity 300ms;
}

a:hover, a:focus {
  color: var(--z0-text);
  opacity: 0.85;
}

.text-muted, .text-secondary {
  color: var(--z0-text-muted) !important;
}

hr {
  border-color: var(--z0-border);
  opacity: 1;
}

code, .font-mono {
  font-family: var(--z0-font-mono);
}

/* ─── animations ─── */
@keyframes z0-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes z0-fade-only {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes z0-glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--z0-glow-soft); }
  50%      { box-shadow: 0 0 16px var(--z0-glow); }
}

@keyframes z0-cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

@keyframes z0-typing {
  from { width: 0; }
  to   { width: 100%; }
}

.z0-fade-in {
  animation: z0-fade-in 400ms ease both;
}

/* stagger */
.z0-stagger > * {
  opacity: 0;
  animation: z0-fade-in 300ms ease both;
}
.z0-stagger > *:nth-child(1) { animation-delay: 0ms; }
.z0-stagger > *:nth-child(2) { animation-delay: 50ms; }
.z0-stagger > *:nth-child(3) { animation-delay: 100ms; }
.z0-stagger > *:nth-child(4) { animation-delay: 150ms; }
.z0-stagger > *:nth-child(5) { animation-delay: 200ms; }
.z0-stagger > *:nth-child(6) { animation-delay: 250ms; }
.z0-stagger > *:nth-child(7) { animation-delay: 300ms; }
.z0-stagger > *:nth-child(8) { animation-delay: 350ms; }

@media (prefers-reduced-motion: reduce) {
  .z0-fade-in, .z0-stagger > * { animation: none; opacity: 1; }
}

/* ─── terminal prompt ─── */
.z0-prompt::before {
  content: "z0d1ak@ctf:~$ ";
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 0.82rem;
  font-weight: 500;
}

.z0-prompt-arrow::before {
  content: "> ";
  color: rgba(250, 250, 250, 0.5);
  font-family: var(--z0-font-mono);
}

/* ─── navbar ─── */
.navbar.z0-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0;
  border-bottom: 1px solid transparent;
  background: transparent !important;
  transition: all 300ms;
}

body.modal-open .navbar.z0-navbar {
  z-index: 1020;
}

.navbar.z0-navbar.scrolled,
.navbar.z0-navbar {
  border-bottom-color: var(--z0-border-glow);
  background: rgba(0, 0, 0, 0.9) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.z0-navbar__frame {
  display: flex;
  align-items: center;
  width: 100%;
  height: 64px;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.z0-navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  margin-right: 1.25rem;
}

.z0-navbar-brand__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(250, 250, 250, 0.2);
  border-radius: 6px;
  background: rgba(250, 250, 250, 0.1);
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background 300ms, border-color 300ms;
}

.z0-navbar-brand:hover .z0-navbar-brand__glyph {
  background: rgba(250, 250, 250, 0.2);
  border-color: var(--z0-border-glow);
}

.z0-navbar-brand__copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.z0-navbar-brand__eyebrow {
  display: none;
}

.z0-navbar-brand__name {
  display: inline-flex;
  align-items: center;
  color: var(--z0-text);
  font-size: 1.15rem;
  font-weight: 700;
  position: relative;
}

.z0-navbar-brand__name img {
  max-height: 24px;
  width: auto;
}

.z0-navbar-nav {
  gap: 0.25rem;
}

.z0-navbar-divider {
  border-color: var(--z0-border);
  opacity: 1;
}

.navbar .nav-link,
.navbar .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem !important;
  border: none;
  border-radius: var(--z0-radius);
  color: var(--z0-text) !important;
  font-size: 0.84rem;
  font-weight: 500;
  background: transparent;
  transition: all 300ms;
}

.navbar .nav-link i,
.navbar .dropdown-toggle i {
  font-size: 0.8rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active,
.navbar .dropdown-toggle:hover,
.navbar .dropdown-toggle:focus {
  color: var(--z0-text) !important;
  background: rgba(250, 250, 250, 0.1);
}

.z0-navbar-toggler {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--z0-border) !important;
  border-radius: var(--z0-radius);
  background: transparent !important;
  box-shadow: none !important;
  color: var(--z0-text);
  transition: border-color 200ms ease, background 200ms ease;
}

.z0-navbar-toggler:hover,
.z0-navbar-toggler:focus {
  border-color: var(--z0-border-glow) !important;
  background: rgba(250, 250, 250, 0.04) !important;
  outline: none;
}

.z0-navbar-toggler .navbar-toggler-icon {
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='1.75' stroke-linecap='square'%3E%3Cline x1='3' y1='7' x2='21' y2='7'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='17' x2='21' y2='17'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: background-image 150ms ease;
}

.z0-navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='1.75' stroke-linecap='square'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='6' y1='18' x2='18' y2='6'/%3E%3C/svg%3E");
}

.z0-navbar-toggler[aria-expanded="true"] {
  border-color: rgba(34, 197, 94, 0.5) !important;
}

.badge-notification,
.bg-danger {
  background: #ef4444 !important;
  color: #fff !important;
}

/* ─── dropdown ─── */
.dropdown-menu.z0-dropdown-menu,
.dropdown-menu {
  padding: 0;
  border: 1px solid rgba(250, 250, 250, 0.2);
  border-radius: var(--z0-radius);
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.dropdown-item {
  border-radius: 0;
  color: var(--z0-text);
  font-size: 0.84rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(250, 250, 250, 0.06);
  transition: all 300ms;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  color: var(--z0-text);
  background: rgba(250, 250, 250, 0.1);
}

/* ─── hero / jumbotron ─── */
.jumbotron {
  padding: 0 !important;
  margin-bottom: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  text-align: center !important;
  color: var(--z0-text) !important;
}

.jumbotron .container {
  position: relative;
  padding: 3rem 1.5rem 2.5rem !important;
  border: none !important;
  border-bottom: 1px solid var(--z0-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-align: center !important;
}

.z0-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.z0-hero__eyebrow {
  margin: 0 0 0.5rem;
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.z0-hero__eyebrow::before {
  content: "> ";
  color: var(--z0-text-faint);
}

.jumbotron h1 {
  margin: 0;
  color: var(--z0-text);
  font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
}

.z0-hero__description {
  max-width: 640px;
  margin: 1rem 0 0;
  color: var(--z0-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* hero stat pills */
.z0-hero__stats {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.25rem;
}

.z0-hero__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--z0-border-glow);
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.05);
  color: var(--z0-text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--z0-font-mono);
}

.z0-hero__stat small {
  color: var(--z0-text-faint);
  font-weight: 400;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── page shell ─── */
.z0-page-shell {
  padding-top: 2rem;
  animation: z0-fade-only 500ms ease 100ms both;
}

/* ─── landing page ─── */
.z0-home {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100vh - 9.5rem);
  min-height: calc(100svh - 9.5rem);
  padding: 2rem 0;
  overflow: hidden;
  isolation: isolate;
}

.z0-home__backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(250, 250, 250, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, #000 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, #000 40%, transparent 85%);
}

.z0-home__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 82% 30%, rgba(34, 197, 94, 0.07), transparent 55%);
}

.z0-home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 3rem;
  width: 100%;
}

@media (min-width: 992px) {
  .z0-home-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 4rem;
  }
}

.z0-home-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  max-width: 680px;
  width: 100%;
}

.z0-home-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--z0-border-glow);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 0.8rem;
}

.z0-home-chip--small {
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
}

.z0-home-chip__prompt {
  color: #22c55e;
}

.z0-home-title {
  margin: 0;
  line-height: 0.98;
}

.z0-home-title__brand {
  color: var(--z0-text);
  font-size: clamp(3rem, 7vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.12);
}

.z0-home-title__sub {
  color: var(--z0-text-muted);
  font-family: var(--z0-font-mono);
  font-size: clamp(0.9rem, 1.35vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.z0-home-lead {
  margin: 0;
  color: var(--z0-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.z0-home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.z0-home-action {
  min-width: 12rem;
  padding-inline: 1.1rem;
}

.z0-home-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.z0-home-status-card {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--z0-radius-lg);
  background: rgba(255, 255, 255, 0.03);
}

.z0-home-status-card small {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.z0-home-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.75rem;
  width: 100%;
  max-width: 640px;
  text-align: left;
}

.z0-home-stack .z0-home-title {
  text-align: left;
}

.z0-home-stack .z0-home-title__brand {
  display: block;
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.z0-home-marker {
  margin: 0;
  color: var(--z0-text-muted);
  font-family: var(--z0-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

.z0-home-marker__prompt {
  color: var(--z0-text-faint);
  margin-right: 0.4rem;
}

.z0-home-marker__live {
  position: relative;
  margin-left: 0.25rem;
  padding-left: 0.9rem;
  color: #22c55e;
}

.z0-home-marker__live::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #22c55e;
  transform: translateY(-50%);
}

.z0-home-copy {
  max-width: 560px;
}

.z0-home-copy p {
  margin: 0 0 0.75rem;
  color: var(--z0-text-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.z0-home-copy p:last-child {
  margin-bottom: 0;
}

.z0-home-copy__hint {
  margin-top: 1.1rem !important;
  padding-top: 1rem;
  border-top: 1px dashed var(--z0-border);
  color: var(--z0-text-faint) !important;
  font-family: var(--z0-font-mono);
  font-size: 0.84rem !important;
}

.z0-home-copy__hint-prompt {
  color: #22c55e;
  margin-right: 0.5rem;
}

.z0-home-highlight {
  color: var(--z0-text);
  font-weight: 600;
  border-bottom: 1px solid #22c55e;
}

.z0-home-stack .z0-home-actions {
  justify-content: flex-start;
  margin-top: 0.25rem;
}

@media (max-width: 767.98px) {
  .z0-home-stack {
    align-items: stretch;
    text-align: left;
  }

  .z0-home-stack .z0-home-actions {
    justify-content: stretch;
  }
}

/* ─── home figure (tree graphic) ─── */
.z0-home-figure {
  position: relative;
  width: 100%;
  max-width: 480px;
  justify-self: center;
}

@media (min-width: 992px) {
  .z0-home-figure { justify-self: end; }
}

.z0-home-figure::before,
.z0-home-figure::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(250, 250, 250, 0.2);
  pointer-events: none;
}

.z0-home-figure::before {
  top: -4px;
  left: -4px;
  border-right: none;
  border-bottom: none;
}

.z0-home-figure::after {
  bottom: -4px;
  right: -4px;
  border-left: none;
  border-top: none;
}

.z0-home-figure__frame {
  position: relative;
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius-lg);
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
}

.z0-home-figure__header {
  display: flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--z0-border);
  background: rgba(250, 250, 250, 0.015);
}

.z0-home-figure__path {
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.z0-home-figure__path::before {
  content: "❯ ";
  color: #22c55e;
  margin-right: 0.1rem;
}

.z0-home-figure__body {
  margin: 0;
  padding: 1.2rem 1.4rem 1.4rem;
  color: var(--z0-text-muted);
  font-family: var(--z0-font-mono);
  font-size: 0.82rem;
  line-height: 1.75;
  white-space: pre;
  overflow-x: auto;
}

.z0-fig-prompt { color: #22c55e; font-weight: 600; }
.z0-fig-cmd    { color: var(--z0-text); }
.z0-fig-branch { color: var(--z0-text-faint); }
.z0-fig-dir    { color: var(--z0-text); }
.z0-fig-muted  { color: var(--z0-text-faint); font-size: 0.76rem; }

@media (max-width: 991.98px) {
  .z0-home-figure { max-width: 100%; margin-top: 1.5rem; }
}

@media (max-width: 575.98px) {
  .z0-home-figure__body { font-size: 0.76rem; padding: 1rem 1.1rem 1.15rem; }
}

.z0-home-status-card strong {
  color: var(--z0-text);
  font-size: 0.98rem;
  font-weight: 600;
}

.z0-home-routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.z0-home-route {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--z0-radius-lg);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: border-color 300ms, background 300ms;
}

.z0-home-route strong {
  display: block;
  color: var(--z0-text);
  font-size: 0.88rem;
  font-weight: 600;
}

.z0-home-route code {
  padding: 0;
  background: transparent;
  color: var(--z0-text-faint);
  font-size: 0.72rem;
}

.z0-home-route span:last-child {
  display: none;
}

.z0-home-route:hover {
  border-color: var(--z0-border-glow-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--z0-text);
}

/* ─── panels ─── */
.z0-panel {
  padding: 1.5rem;
  border: 1px solid var(--z0-border-glow);
  border-radius: var(--z0-radius-xl);
  background: var(--z0-bg);
  transition: border-color 300ms, box-shadow 300ms;
}

.z0-panel:hover {
  border-color: var(--z0-border-glow-strong);
}

/* shared border reset */
.card,
main .container > .row > [class*="col-"] > form,
.z0-table-shell,
.z0-score-graph,
.modal-content,
.challenge-desc,
.challenge-connection-info,
.challenge-hints details,
.challenge-files .btn-file,
.nav-pills,
.nav-tabs,
.alert,
.table {
  border-color: var(--z0-border);
}

/* ─── forms ─── */
main form {
  padding: 1.5rem;
  border: 1px solid var(--z0-border-glow);
  border-radius: var(--z0-radius-xl);
  background: var(--z0-bg);
}

.form-label,
label,
b {
  color: var(--z0-text);
  font-weight: 600;
  font-size: 0.88rem;
}

.form-control,
.form-select,
.custom-select,
.form-control-file,
.btn,
.input-group-text,
textarea {
  border-radius: var(--z0-radius) !important;
}

input, select {
  padding: 0.6rem !important;
  height: auto !important;
}

.form-control,
.form-select,
.custom-select,
textarea,
input[type="date"],
input[type="time"] {
  min-height: 2.75rem;
  border: 1px solid var(--z0-border) !important;
  background: #000000 !important;
  background-color: #000000 !important;
  color: var(--z0-text) !important;
  font-family: var(--z0-font-sans);
  box-shadow: none !important;
  transition: all 300ms;
}

.form-control::placeholder,
textarea::placeholder {
  color: var(--z0-text-faint);
}

.form-control:focus,
.form-select:focus,
.custom-select:focus,
textarea:focus {
  border-color: var(--z0-text);
  background: #000000;
  color: var(--z0-text);
  box-shadow: 0 0 0 2px rgba(250, 250, 250, 0.15), 0 0 10px var(--z0-glow) !important;
  outline: none;
}

.form-text {
  color: var(--z0-text-faint) !important;
  font-size: 0.78rem;
  display: none !important;
}

.input-group-text {
  background: var(--z0-surface);
  border: 1px solid var(--z0-border);
  color: var(--z0-text-muted);
}

/* ─── buttons ─── */
.btn {
  min-height: 2.5rem;
  font-weight: 500;
  font-size: 0.88rem;
  transition: all 300ms;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  border: 1px solid var(--z0-text);
  background: var(--z0-text);
  color: var(--z0-primary-fg);
}

.btn-primary:hover,
.btn-primary:focus {
  background: rgba(250, 250, 250, 0.9);
  color: var(--z0-primary-fg);
  box-shadow: 0 0 10px var(--z0-glow);
  transform: none;
}

.btn-secondary,
.btn-dark,
.btn-info,
.btn-outline-secondary,
.btn-outline-info,
.btn-outline-success,
.btn-outline-danger,
.btn-file {
  border: 1px solid var(--z0-border-glow) !important;
  background: transparent !important;
  color: var(--z0-text) !important;
}

.btn-secondary:hover,
.btn-dark:hover,
.btn-info:hover,
.btn-outline-secondary:hover,
.btn-outline-info:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-file:hover {
  background: rgba(250, 250, 250, 0.1) !important;
  color: var(--z0-text) !important;
  box-shadow: 0 0 10px var(--z0-glow-soft);
  transform: none;
}

.btn-success {
  border: 1px solid #10b981;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  border: 1px solid #ef4444;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.btn-link {
  color: var(--z0-text-muted);
  min-height: auto;
  border: none;
}

.btn-link:hover {
  color: var(--z0-text);
  transform: none;
}

.btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.5;
  transition: opacity 300ms;
}

.btn-close:hover {
  opacity: 1;
}

/* ─── badges ─── */
.badge,
.challenge-tag,
.bg-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(250, 250, 250, 0.1) !important;
  color: var(--z0-text) !important;
  font-weight: 500;
  font-size: 0.75rem;
}

.badge.bg-primary,
.badge.rounded-pill.bg-primary {
  background: rgba(250, 250, 250, 0.1) !important;
  border-color: rgba(250, 250, 250, 0.2);
  color: var(--z0-text) !important;
}

.badge.text-bg-light {
  background: rgba(250, 250, 250, 0.08) !important;
  color: var(--z0-text-muted) !important;
}

/* ─── alerts ─── */
.alert {
  padding: 1rem 1.25rem;
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius);
  background: var(--z0-bg);
  color: var(--z0-text);
  font-size: 0.88rem;
}

.alert-success { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.08); }
.alert-info { border-color: rgba(59, 130, 246, 0.4); background: rgba(59, 130, 246, 0.08); }
.alert-warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.08); }
.alert-danger { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.08); }

/* ─── modal ─── */
.modal {
  z-index: 1060;
}

.modal-backdrop {
  z-index: 1055;
  background: #000000;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop.show {
  opacity: 0.8;
}

.modal-dialog {
  margin: 4.5rem auto 2rem;
}

.z0-challenge-modal.modal-dialog-centered {
  min-height: calc(100% - 2.75rem);
  margin: 1.375rem auto;
}

@media (min-width: 576px) {
  .modal-dialog:not(.modal-sm):not(.modal-lg):not(.modal-xl) {
    max-width: 720px;
  }
}

.challenge-window .modal-content,
.z0-modal-content,
.modal-content {
  border: 1px solid rgba(250, 250, 250, 0.35);
  border-radius: var(--z0-radius-xl);
  background: #141418;
  color: var(--z0-text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(250, 250, 250, 0.04), 0 0 40px rgba(0, 255, 170, 0.06);
}

.modal-header {
  border-bottom: 1px solid var(--z0-border);
  padding: 1.25rem 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--z0-border);
  padding: 1rem 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.z0-modal-close {
  filter: invert(1) grayscale(1);
  opacity: 0.7;
}

.z0-modal-close:hover {
  opacity: 1;
}

/* ─── tabs / pills ─── */
.z0-challenge-tabs,
.nav-pills {
  gap: 0;
  padding: 0;
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius);
  background: transparent;
  overflow: hidden;
}

.nav-tabs {
  border-bottom-color: var(--z0-border);
}

.nav-tabs .nav-link,
.nav-pills .nav-link,
.z0-scoreboard-pills button {
  padding: 0.6rem 0.85rem;
  border: none !important;
  border-radius: 0 !important;
  background: transparent;
  color: var(--z0-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 300ms;
}

.nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover,
.z0-scoreboard-pills button:hover {
  color: var(--z0-text);
  background: rgba(250, 250, 250, 0.06);
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active,
.z0-scoreboard-pills button.active {
  border: none !important;
  background: rgba(250, 250, 250, 0.1);
  color: var(--z0-text);
}

/* ─── challenge modal ─── */
.challenge-name,
.z0-challenge-name {
  margin-bottom: 0.25rem;
  font-size: clamp(1.5rem, 1.4rem + 0.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.challenge-value,
.z0-challenge-value {
  color: var(--z0-text-muted);
  font-family: var(--z0-font-mono);
  font-size: 0.88rem;
  font-weight: 500;
}

.challenge-attribution {
  display: block;
  margin-bottom: 1rem;
}

.challenge-desc,
.challenge-connection-info,
.challenge-hints details {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius);
  background: transparent;
  color: var(--z0-text-muted);
  line-height: 1.7;
}

.challenge-desc {
  margin: 1rem 0;
}

.cm-instance-card {
  margin: 1rem 0 0;
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.06), transparent 40%),
    #141418;
}

.cm-instance-card .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 1.4rem 1.5rem;
}

.cm-instance-card .card-title {
  margin-bottom: 0;
  color: var(--z0-text);
  font-size: 1rem;
  font-weight: 600;
}

.cm-instance-card .card-subtitle {
  color: var(--z0-text-muted) !important;
  font-size: 0.9rem;
  line-height: 1.6;
}

.cm-instance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
}

#cm-panel-connection-info {
  display: inline-block;
  margin-top: 0.9rem;
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  word-break: break-word;
}

.cm-instance-error {
  margin: 0;
  color: #f87171;
  font-size: 0.88rem;
}

@media (max-width: 575.98px) {
  .z0-challenge-modal.modal-dialog-centered {
    min-height: calc(100% - 1.5rem);
    margin: 0.75rem auto;
  }
}

.challenge-desc h1,
.challenge-desc h2,
.challenge-desc h3,
.challenge-desc h4 {
  color: var(--z0-text);
}

.challenge-desc code,
.challenge-connection-info code {
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--z0-border);
  border-radius: 4px;
  background: var(--z0-surface);
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 0.88em;
}

.challenge-desc pre {
  padding: 0.85rem 1rem;
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius);
  background: var(--z0-surface);
  overflow-x: auto;
  font-family: var(--z0-font-mono);
}

.z0-hint-item + .z0-hint-item { margin-top: 0.65rem; }

.challenge-hints summary {
  cursor: pointer;
  color: var(--z0-text);
  font-weight: 500;
  transition: color 300ms;
}

.challenge-hints summary:hover { color: #22c55e; }

.z0-challenge-files .file-button-wrapper { margin-bottom: 0.65rem; }
.z0-challenge-input { min-height: 2.75rem; }
.z0-challenge-submit { min-height: 2.75rem; }

/* ─── challenge board ─── */
.z0-challenge-board {
  padding-top: 0.5rem;
}

.z0-category-block:first-of-type {
  padding-top: 1rem !important;
}

.z0-category-header {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--z0-border);
}

.z0-category-header__hash {
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  opacity: 0.9;
}

.z0-category-header__name {
  margin: 0;
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: lowercase;
}

.z0-category-header__rule {
  flex: 1;
  height: 1px;
  min-width: 1.5rem;
  background: repeating-linear-gradient(
    to right,
    var(--z0-border) 0,
    var(--z0-border) 4px,
    transparent 4px,
    transparent 8px
  );
  transform: translateY(-3px);
}

.z0-category-header__count {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 0.95rem;
  font-weight: 600;
}

.z0-category-header__count-label {
  color: var(--z0-text-faint);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 575.98px) {
  .z0-category-header__name { font-size: 1.2rem; }
  .z0-category-header__count-label { display: none; }
}

/* override SCSS challenge button colors */
[data-bs-theme="dark"] .challenge-button,
[data-bs-theme="light"] .challenge-button,
.challenge-button {
  border: 1px solid var(--z0-border-glow) !important;
  background: var(--z0-bg) !important;
  background-color: var(--z0-bg) !important;
  box-shadow: none !important;
}

[data-bs-theme="dark"] .challenge-button:hover,
[data-bs-theme="light"] .challenge-button:hover,
.challenge-button:hover {
  background: var(--z0-bg) !important;
  background-color: var(--z0-bg) !important;
}

[data-bs-theme="dark"] .challenge-button.challenge-solved,
[data-bs-theme="light"] .challenge-button.challenge-solved,
.challenge-button.challenge-solved {
  background: var(--z0-bg) !important;
  background-color: var(--z0-bg) !important;
}

[data-bs-theme="dark"] .challenge-button.challenge-solved:hover,
[data-bs-theme="light"] .challenge-button.challenge-solved:hover {
  background: var(--z0-bg) !important;
  background-color: var(--z0-bg) !important;
}

.z0-challenge-card.challenge-button {
  position: relative;
  overflow: hidden;
  min-height: 148px;
  border: 1px solid var(--z0-border) !important;
  border-radius: var(--z0-radius-lg) !important;
  background: #0d0d10 !important;
  box-shadow: none !important;
  transition: border-color 220ms ease, background-color 220ms ease;
}

.z0-challenge-card.challenge-button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #22c55e;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.z0-challenge-card.challenge-button::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(250, 250, 250, 0.35);
  border-right: 1px solid rgba(250, 250, 250, 0.35);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 220ms ease, transform 220ms ease, border-color 220ms ease;
  pointer-events: none;
}

.z0-challenge-card.challenge-button:hover {
  border-color: rgba(34, 197, 94, 0.55) !important;
  background: #101114 !important;
}

.z0-challenge-card.challenge-button:hover::before {
  transform: scaleY(1);
}

.z0-challenge-card.challenge-button:hover::after {
  opacity: 1;
  transform: translate(0, 0);
  border-color: #22c55e;
}

.z0-challenge-card.challenge-button:focus-visible {
  outline: none;
  border-color: rgba(34, 197, 94, 0.75) !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18) !important;
}

.z0-challenge-card .challenge-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: inherit;
  margin: 0 !important;
  padding: 1.1rem 1.15rem 1rem;
  text-align: left;
  gap: 0.75rem;
}

.z0-challenge-card__cat {
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 220ms ease;
}

.z0-challenge-card.challenge-button:hover .z0-challenge-card__cat {
  color: #22c55e;
}

.z0-challenge-card .challenge-inner .z0-challenge-card__name {
  margin: 0;
  color: var(--z0-text);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.z0-challenge-card .challenge-inner .z0-challenge-card__value {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  margin: 0;
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
}

.z0-challenge-card__value-unit {
  color: var(--z0-text-faint);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.challenge-button.challenge-solved {
  border-color: rgba(16, 185, 129, 0.45) !important;
  background: #0c110f !important;
}

.challenge-button.challenge-solved::before {
  background: #10b981;
  transform: scaleY(1);
  opacity: 0.8;
}

.challenge-button.challenge-solved .z0-challenge-card__cat {
  color: #10b981;
}

.challenge-button.challenge-solved .z0-challenge-card__name::after {
  content: " ✓";
  color: #10b981;
  font-weight: 700;
}

.challenge-button.challenge-solved:hover {
  border-color: rgba(16, 185, 129, 0.75) !important;
  background: #0d130f !important;
}

.challenge-button.challenge-solved:hover::before {
  opacity: 1;
}

.challenge-button.challenge-solved:hover::after {
  border-color: #10b981;
}

/* ─── tables ─── */
.z0-score-graph,
.z0-table-shell {
  padding: 0;
  border: 1px solid var(--z0-border-glow);
  border-radius: var(--z0-radius-xl);
  background: var(--z0-bg);
  overflow: hidden;
}

.z0-table-shell {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.z0-table-shell .table {
  margin-bottom: 0;
  width: 100%;
  min-width: 520px;
  table-layout: auto;
}

.z0-table-shell .table td,
.z0-table-shell .table th {
  white-space: nowrap;
}

.z0-table-shell .table td:first-child,
.z0-table-shell .table th:first-child {
  white-space: normal;
  max-width: 320px;
}

/* ─── users page ─── */
main form.z0-users-search {
  display: flex !important;
  gap: 0.5rem !important;
  align-items: stretch !important;
  margin: 0 0 2rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.z0-users-search__field {
  flex: 0 0 auto;
  width: 11rem;
  min-width: 0;
}

.z0-users-search__input {
  flex: 1 1 auto;
  min-width: 0;
}

.z0-users-search__btn {
  flex: 0 0 auto;
  min-width: 3rem;
  padding-inline: 1rem;
}

/* scoreboard: flatten the graph card to match the table treatment below */
.z0-page-shell--scoreboard .z0-score-graph {
  margin-bottom: 2rem;
  padding: 1.25rem 0;
  border: 0;
  border-top: 1px solid var(--z0-border);
  border-bottom: 1px solid var(--z0-border);
  border-radius: 0;
  background: transparent;
}

.z0-page-shell--scoreboard .z0-scoreboard-shell {
  margin-left: 0;
  margin-right: 0;
}

.z0-page-shell--scoreboard .z0-scoreboard-pills {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0.5rem;
}

.z0-page-shell--scoreboard .z0-scoreboard-pills .nav-link {
  border: 1px solid var(--z0-border) !important;
  border-radius: var(--z0-radius) !important;
  padding: 0.45rem 0.9rem !important;
  background: transparent;
  color: var(--z0-text-muted);
  font-family: var(--z0-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.z0-page-shell--scoreboard .z0-scoreboard-pills .nav-link:hover {
  color: var(--z0-text);
  border-color: var(--z0-border-glow) !important;
  background: transparent;
}

.z0-page-shell--scoreboard .z0-scoreboard-pills .nav-link.active {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
}

.z0-page-shell--scoreboard .col-md-12 {
  padding-left: 0;
  padding-right: 0;
}

/* users page: minimal flat table (no card, consistent with toolbar above) */
.z0-page-shell .z0-table-shell {
  border: 0;
  border-top: 1px solid var(--z0-border);
  border-bottom: 1px solid var(--z0-border);
  border-radius: 0;
  background: transparent;
}

.z0-page-shell .z0-table-shell .table {
  background: transparent;
}

.z0-page-shell .z0-table-shell .table thead th {
  background: transparent;
  border-bottom: 1px solid var(--z0-border);
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.z0-page-shell .z0-table-shell .table tbody tr {
  background: transparent !important;
}

.z0-page-shell .z0-table-shell .table tbody tr + tr td {
  border-top: 1px solid rgba(39, 39, 42, 0.6);
}

.z0-page-shell .z0-table-shell .table tbody td {
  background: transparent;
  border-top: 0;
}

.z0-users-status {
  margin-bottom: 1rem;
  text-align: left;
}

.z0-users-status__line {
  margin: 0;
  color: var(--z0-text);
  font-family: var(--z0-font-mono);
  font-size: 0.9rem;
}

.z0-users-status__line strong {
  color: #22c55e;
  font-weight: 600;
}

.z0-users-status__sub {
  margin: 0.25rem 0 0;
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.z0-users-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding-top: 1.5rem;
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.82rem;
}

.z0-users-pagination__label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--z0-text-faint);
}

.z0-users-pagination__nav {
  padding: 0.25rem 0.55rem;
  color: var(--z0-text-muted);
  letter-spacing: 0.1em;
  transition: color 200ms ease;
}

.z0-users-pagination__nav:hover {
  color: #22c55e;
}

.z0-users-pagination__select {
  width: auto;
  min-height: 0 !important;
  padding: 0.3rem 1.75rem 0.3rem 0.75rem !important;
  font-size: 0.84rem !important;
}

@media (max-width: 575.98px) {
  main form.z0-users-search {
    flex-wrap: wrap;
  }

  .z0-users-search__field {
    width: 100%;
    flex: 1 1 100%;
  }

  .z0-users-search__input {
    flex: 1 1 calc(100% - 3.6rem);
  }
}

.z0-score-graph {
  padding: 1rem;
}

.table {
  margin-bottom: 0;
  color: var(--z0-text);
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(250, 250, 250, 0.03);
  --bs-table-striped-color: var(--z0-text);
  --bs-table-border-color: var(--z0-border);
  --bs-table-hover-bg: rgba(250, 250, 250, 0.05);
  --bs-table-hover-color: var(--z0-text);
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
}

.table thead th {
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom-width: 1px;
  background: var(--z0-surface);
}

.table tbody th,
.table tbody td {
  border-top-color: var(--z0-border);
  vertical-align: middle;
  font-size: 0.88rem;
}

/* ─── progress bar ─── */
.progress {
  background: var(--z0-surface);
  border: 1px solid var(--z0-border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.progress-bar {
  transition: width 500ms ease;
}

/* ─── pagination ─── */
.page-select,
select.page-select {
  background: #000 !important;
  border: 1px solid var(--z0-border) !important;
  color: var(--z0-text) !important;
  border-radius: var(--z0-radius) !important;
  padding: 0.35rem 0.5rem !important;
  font-size: 0.84rem !important;
}

/* ─── card ─── */
.card {
  border: 1px solid var(--z0-border-glow);
  border-radius: var(--z0-radius-xl);
  background: var(--z0-bg);
}

.card-header {
  background: var(--z0-surface);
  border-bottom-color: var(--z0-border);
}

.card-footer {
  background: transparent;
  border-top-color: var(--z0-border);
}

/* ─── profile ─── */
.z0-profile-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.75rem;
}

.z0-solves-section h3,
.z0-awards-section h3 {
  color: #22c55e;
  font-family: var(--z0-font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.z0-solves-section h3::before,
.z0-awards-section h3::before {
  content: "# ";
  color: var(--z0-text-faint);
}

/* ─── footer ─── */
.footer,
.footer.z0-footer {
  position: relative !important;
  bottom: auto !important;
  height: auto !important;
  line-height: normal !important;
  z-index: auto !important;
  padding: 2rem 0 3rem !important;
  background: transparent !important;
  border-top: 1px solid var(--z0-border) !important;
  margin-top: auto !important;
}

.footer.z0-footer small {
  color: var(--z0-text-faint);
  font-family: var(--z0-font-mono);
  font-size: 0.72rem;
}

/* ─── box-shadow reset ─── */
.card, .nav-pills, .nav-tabs, .accordion-item,
.dropdown-menu, .modal-content, .btn,
.form-control, .form-select, .custom-select {
  box-shadow: none;
}

/* ─── spinner ─── */
.spinner { color: var(--z0-text-faint); }

/* ─── error page ─── */
.z0-error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
}

.z0-error-code {
  font-family: var(--z0-font-mono);
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 700;
  color: var(--z0-text);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.06;
}

.z0-error-title {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--z0-text);
  margin-bottom: 0.75rem;
}

.z0-error-description {
  color: var(--z0-text-muted);
  font-size: 0.9rem;
  max-width: 400px;
  line-height: 1.6;
  display: none !important;
}

.z0-hero__eyebrow,
.z0-hero__description {
  display: none !important;
}

/* ─── accordion ─── */
.accordion-item {
  background: transparent;
  border-color: var(--z0-border);
}

.accordion-button {
  background: transparent;
  color: var(--z0-text);
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background: rgba(250, 250, 250, 0.05);
  color: var(--z0-text);
}

.accordion-button::after {
  filter: invert(1);
}

/* ─── tooltip ─── */
.tooltip-inner {
  background: var(--z0-surface-strong);
  border: 1px solid var(--z0-border);
  border-radius: 4px;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-family: var(--z0-font-mono);
}

/* ─── snackbar ─── */
.z0-snackbar {
  border: 1px solid var(--z0-border);
  border-radius: var(--z0-radius);
  background: var(--z0-bg);
  color: var(--z0-text);
}

/* ─── responsive ─── */
@media (max-width: 991.98px) {
  .z0-navbar__frame {
    flex-wrap: wrap;
    justify-content: space-between;
    height: auto;
    min-height: 64px;
    padding: 0 0.25rem;
  }

  .z0-navbar-brand {
    margin-right: 0;
  }

  .navbar-collapse {
    flex-basis: 100%;
    margin: 0 -0.25rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--z0-border);
    background: transparent;
  }

  .navbar-collapse .z0-navbar-nav {
    gap: 0.15rem;
    padding: 0 0.25rem;
  }

  .navbar-collapse .nav-link {
    padding: 0.65rem 0.75rem !important;
  }

  .z0-navbar-divider.d-lg-none {
    margin: 0.5rem 0.25rem;
  }
}

@media (max-width: 767.98px) {
  .z0-main { padding-top: 0; }

  .jumbotron .container {
    padding: 2rem 1rem 1.75rem;
  }

  .z0-panel, main form {
    padding: 1.25rem;
  }

  .z0-home {
    min-height: calc(100vh - 8rem);
    min-height: calc(100svh - 8rem);
    padding: 1.5rem 0 2.5rem;
  }

  .z0-home-center {
    gap: 1.25rem;
  }

  .z0-home-title__brand {
    font-size: 2.5rem;
  }

  .z0-home-actions {
    flex-direction: column;
    width: 100%;
  }

  .z0-home-action {
    width: 100%;
    min-width: 0;
  }

  .z0-home-status-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .z0-home-routes {
    grid-template-columns: minmax(0, 1fr);
  }
}
