:root {
  --mx-ink: #121826;
  --mx-muted: #647084;
  --mx-line: #d9e0ea;
  --mx-soft: #f6f8fb;
  --mx-panel: #ffffff;
  --mx-indigo: #4850d8;
  --mx-cyan: #07b6d6;
  --mx-emerald: #059669;
  --mx-amber: #d97706;
  --mx-night: #07111f;
  /* JBL-inspired accent — primary call-to-action color */
  --mx-orange: #ff6a00;
  --mx-orange-dark: #e85800;
  --mx-orange-soft: #fff1e6;
}

/* ----------------------------- Form fields ----------------------- */
/* Unified styling for Django form widgets that flow through to native
   <input>, <textarea>, and <select> tags. Pairs with Tailwind utility
   classes from FIELD_CSS / _INPUT in forms.py. */
.mx-input,
input.mx-input,
textarea.mx-input,
select.mx-input {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.6rem 0.85rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  width: 100%;
}
.mx-input:hover {
  border-color: #94a3b8;
}
.mx-input:focus {
  border-color: var(--mx-orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14);
  outline: none;
}
.mx-input::placeholder { color: #94a3b8; }
.mx-input[disabled] {
  background-color: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

/* Native pulldowns get a custom chevron */
select.mx-input,
.mx-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 14px;
  padding-right: 2.25rem;
}

/* File input — make Django's file widget look intentional */
input[type="file"].mx-input,
.mx-file {
  background: #fafbfc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.65rem 0.85rem;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
input[type="file"].mx-input:hover,
.mx-file:hover {
  background: #fff;
  border-color: var(--mx-orange);
}
input[type="file"].mx-input::file-selector-button,
.mx-file::file-selector-button {
  background: linear-gradient(135deg, var(--mx-orange) 0%, var(--mx-orange-dark) 100%);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  margin-right: 0.85rem;
  padding: 0.45rem 0.95rem;
  transition: filter 0.18s ease, transform 0.18s ease;
}
input[type="file"].mx-input::file-selector-button:hover,
.mx-file::file-selector-button:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

/* Drop-zone styling reused by client + engineer uploads */
.mx-dropzone {
  background: #fafbfc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  cursor: pointer;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.mx-dropzone:hover { border-color: #94a3b8; }
.mx-dropzone.is-dragging {
  background: #fff7ed;
  border-color: var(--mx-orange);
}

/* ----------------------------- Tooltip ---------------------------- */
.mx-step-help { position: relative; display: inline-flex; }
.mx-step-help .mx-step-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  background: #0f172a;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.01em;
  padding: 9px 12px;
  border-radius: 8px;
  width: 220px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
  z-index: 30;
  white-space: normal;
}
.mx-step-help .mx-step-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #0f172a;
}
.mx-step-help:hover .mx-step-tip,
.mx-step-help:focus-within .mx-step-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* ----------------------------- Ticker ----------------------------- */
/* Top-page announcement marquee */
.mx-ticker {
  align-items: stretch;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  overflow: hidden;
}
.mx-ticker-label {
  align-items: center;
  background: linear-gradient(135deg, var(--mx-orange) 0%, var(--mx-orange-dark) 100%);
  color: #fff;
  display: flex;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 800;
  gap: 0.45rem;
  letter-spacing: 0.05em;
  padding: 0.7rem 1rem;
}
.mx-ticker-label i { font-size: 0.8rem; }
.mx-ticker-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%);
}
.mx-ticker-track {
  align-items: center;
  animation: mx-ticker-scroll 38s linear infinite;
  display: inline-flex;
  gap: 3rem;
  padding: 0 1.5rem;
  white-space: nowrap;
}
.mx-ticker-track:hover { animation-play-state: paused; }
.mx-ticker-item {
  align-items: center;
  display: inline-flex;
  font-size: 0.85rem;
  height: 2.7rem;
  line-height: 1.2;
}
@keyframes mx-ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ----------------------------- Footer ----------------------------- */
.mx-footer {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 106, 0, 0.18), transparent 38%),
    radial-gradient(circle at 88% 80%, rgba(7, 182, 214, 0.12), transparent 35%),
    linear-gradient(180deg, #07111f 0%, #0b1322 60%, #0a1020 100%);
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  overflow: hidden;
}
.mx-footer::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent 0%, #000 60%);
}
.mx-footer > * { position: relative; z-index: 1; }

.mx-footer-title {
  color: var(--mx-orange);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.mx-footer-link {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  font-weight: 500;
  transition: color 0.18s ease, transform 0.18s ease;
}
.mx-footer-link:hover {
  color: #fff;
  transform: translateX(2px);
}
.mx-pulse-dot {
  animation: mx-pulse 2s ease-in-out infinite;
}
@keyframes mx-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.55; }
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-color: rgba(79, 70, 229, 0.28) transparent;
  scrollbar-width: thin;
}

body {
  font-family: "M PLUS Rounded 1c", sans-serif;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.98)),
    radial-gradient(circle at 12px 12px, rgba(79, 70, 229, 0.08) 1px, transparent 1px);
  background-size: auto, 24px 24px;
  color: var(--mx-ink);
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(79, 70, 229, 0.22);
  border-radius: 999px;
}

[x-cloak] {
  display: none !important;
}

.mx-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(217, 224, 234, 0.9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 8px 24px rgba(15, 23, 42, 0.04);
  position: relative;
}
/* Subtle accent bar under the header */
.mx-header::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1.5px;
  width: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 106, 0, 0.45) 20%,
    rgba(79, 70, 229, 0.45) 50%,
    rgba(7, 182, 214, 0.45) 80%,
    transparent 100%);
  opacity: 0.8;
  pointer-events: none;
}

.mx-brand {
  align-items: center;
  display: inline-flex;
  gap: 0.6rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mx-brand:hover {
  opacity: 0.85;
  transform: translateX(-1px);
}

.mx-brand-logo {
  display: block;
  height: 1.95rem;
  width: auto;
}

.mx-brand-tag {
  align-items: center;
  background: linear-gradient(135deg, var(--mx-orange-soft) 0%, #ffe4cf 100%);
  border-radius: 999px;
  color: var(--mx-orange-dark);
  display: none;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .mx-brand-tag { display: inline-flex; }
}

.mx-nav-link {
  align-items: center;
  color: #475569;
  display: inline-flex;
  font-weight: 600;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  position: relative;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.mx-nav-link:hover {
  background: rgba(255, 106, 0, 0.06);
  color: var(--mx-orange-dark);
}

.mx-nav-link.is-active {
  background: rgba(255, 106, 0, 0.08);
  color: var(--mx-orange-dark);
}
.mx-nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 2px;
  background: var(--mx-orange);
  border-radius: 2px;
}

.mx-nav-secondary {
  color: #64748b;
}
.mx-nav-secondary:hover {
  background: rgba(15, 23, 42, 0.04);
  color: #1e293b;
}

.mx-button-primary,
.mx-button-secondary,
.mx-button-quiet {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 0.66rem 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Primary = JBL-inspired orange (call-to-action) */
.mx-button-primary {
  background: linear-gradient(135deg, var(--mx-orange) 0%, var(--mx-orange-dark) 100%);
  box-shadow: 0 14px 30px rgba(255, 106, 0, 0.28);
  color: #fff;
}

.mx-button-primary:hover {
  background: linear-gradient(135deg, var(--mx-orange-dark) 0%, #c94a00 100%);
  box-shadow: 0 18px 34px rgba(255, 106, 0, 0.34);
  transform: translateY(-1px);
}

/* Accent = indigo for secondary CTAs (e.g. inside dark hero) */
.mx-button-accent {
  align-items: center;
  background: var(--mx-indigo);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 0.66rem 1rem;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.mx-button-accent:hover {
  background: #3a40b8;
  transform: translateY(-1px);
}

/* Secondary = stronger contrast outlined button */
.mx-button-secondary {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  color: #1e293b;
}

.mx-button-secondary:hover {
  background: #fff;
  border-color: var(--mx-orange);
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.18);
  color: var(--mx-orange-dark);
  transform: translateY(-1px);
}

.mx-button-quiet {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.mx-button-quiet:hover {
  background: #fff;
  color: var(--mx-ink);
}

.mx-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 224, 234, 0.9);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(18, 24, 38, 0.06);
}

.mx-section-dark {
  background:
    radial-gradient(circle at 15% 15%, rgba(7, 182, 214, 0.16), transparent 32%),
    linear-gradient(135deg, #07111f 0%, #0b1220 58%, #0f172a 100%);
  color: #fff;
  position: relative;
}

.mx-section-dark::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.048) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.048) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.mx-section-dark > * {
  position: relative;
  z-index: 1;
}

.mx-section-muted {
  background:
    linear-gradient(180deg, rgba(246, 248, 251, 1), rgba(255, 255, 255, 1));
}

.mx-dark-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.mx-card-link {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mx-card-link:hover {
  border-color: rgba(79, 70, 229, 0.36);
  box-shadow: 0 24px 50px rgba(18, 24, 38, 0.09);
  transform: translateY(-2px);
}

.mx-eyebrow {
  color: var(--mx-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mx-section-title {
  color: var(--mx-ink);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
}

.mx-muted {
  color: var(--mx-muted);
}

.mx-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
}

.mx-status::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 0.45rem;
  width: 0.45rem;
}

.mx-status-open {
  background: rgba(5, 150, 105, 0.1);
  color: var(--mx-emerald);
}

.mx-status-closed {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
}

.mx-chip {
  background: #eef2f7;
  border-radius: 8px;
  color: #526176;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
}

.mx-tag {
  background: rgba(79, 70, 229, 0.08);
  border-radius: 8px;
  color: var(--mx-indigo);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
}

/* Availability strip — 3-month receive schedule */
.mx-availability {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mx-availability__title {
  color: #64748b;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mx-availability__strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.mx-availability__cell {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.25rem;
  text-align: center;
  transition: transform 0.15s ease;
}
.mx-availability__cell:hover {
  transform: translateY(-1px);
}
.mx-availability__month {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.mx-availability__symbol {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.mx-availability__cell--open {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.mx-availability__cell--open .mx-availability__symbol { color: #059669; }
.mx-availability__cell--open .mx-availability__month  { color: #047857; }
.mx-availability__cell--limited {
  background: #fffbeb;
  border-color: #fde68a;
}
.mx-availability__cell--limited .mx-availability__symbol { color: #d97706; }
.mx-availability__cell--limited .mx-availability__month  { color: #b45309; }
.mx-availability__cell--closed {
  background: #fef2f2;
  border-color: #fecaca;
}
.mx-availability__cell--closed .mx-availability__symbol { color: #dc2626; }
.mx-availability__cell--closed .mx-availability__month  { color: #b91c1c; }
.mx-availability__cell--none .mx-availability__symbol { color: #cbd5e1; }
.mx-availability__cell--none .mx-availability__month  { color: #94a3b8; }
/* Compact size for cards */
.mx-availability--sm .mx-availability__cell { padding: 0.35rem 0.2rem; }
.mx-availability--sm .mx-availability__month { font-size: 0.62rem; }
.mx-availability--sm .mx-availability__symbol { font-size: 1.05rem; }

.mx-fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1), transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
}

.mx-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.mx-hero {
  color: #fff;
  min-height: calc(100svh - 68px);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.24), transparent 30%),
    radial-gradient(circle at 86% 74%, rgba(217, 119, 6, 0.16), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #0d1626 52%, #111827 100%);
}

.mx-hero::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  inset: 0;
  position: absolute;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.15), #000 48%, rgba(0, 0, 0, 0.5));
}

.mx-hero::after {
  background: linear-gradient(180deg, transparent 0%, rgba(6, 12, 24, 0.18) 72%, #f6f8fb 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.mx-hero-content {
  position: relative;
  z-index: 1;
}

.mx-hero-kicker {
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 0.6rem;
}

.mx-hero-kicker::before {
  background: #22d3ee;
  border-radius: 999px;
  content: "";
  height: 0.55rem;
  width: 0.55rem;
}

.mx-hero-title {
  font-size: clamp(1.55rem, 3.1vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.34;
  max-width: 22ch;
  /* Auto-balance two-line layout: the browser picks the prettiest
     wrap point so we get 2 even lines instead of 1 long + 1 short. */
  text-wrap: balance;
}

.mx-hero-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.9;
  max-width: 39rem;
}

.mx-hero-proof {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.76);
}

.mx-product-board {
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 8px;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.34);
  color: #e5eefb;
  overflow: hidden;
}

.mx-plan-card {
  background: #fff;
  border: 1px solid rgba(217, 224, 234, 0.92);
  border-radius: 8px;
  box-shadow: 0 26px 58px rgba(18, 24, 38, 0.12);
  padding: 1.2rem;
}

.mx-plan-card-dark {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(226, 232, 240, 0.14);
  color: #e5eefb;
}

.mx-pulse-line {
  align-items: end;
  display: grid;
  gap: 0.28rem;
  grid-template-columns: repeat(18, 1fr);
  height: 4rem;
}

.mx-pulse-line span {
  background: linear-gradient(180deg, #22d3ee, #4850d8);
  border-radius: 999px;
  display: block;
  min-height: 0.45rem;
  opacity: 0.88;
}

.mx-board-bar {
  align-items: center;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.1);
  display: flex;
  gap: 0.45rem;
  padding: 0.8rem 1rem;
}

.mx-board-dot {
  background: rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  height: 0.6rem;
  width: 0.6rem;
}

.mx-ui-panel {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(217, 224, 234, 0.92);
  border-radius: 8px;
  box-shadow: 0 28px 64px rgba(18, 24, 38, 0.1);
  overflow: hidden;
}

.mx-ui-panel-dark {
  background: #0b1220;
  border-color: rgba(226, 232, 240, 0.12);
  color: #e5eefb;
}

.mx-ui-row {
  align-items: center;
  border-bottom: 1px solid rgba(217, 224, 234, 0.75);
  display: flex;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
}

.mx-ui-row:last-child {
  border-bottom: 0;
}

.mx-avatar {
  align-items: center;
  background: #eef2ff;
  border-radius: 8px;
  color: var(--mx-indigo);
  display: flex;
  flex: 0 0 auto;
  font-weight: 700;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.mx-meter {
  background: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  height: 0.48rem;
  overflow: hidden;
}

.mx-meter span {
  background: var(--mx-indigo);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.mx-arrangement-grid {
  display: grid;
  grid-template-columns: 1.05fr repeat(4, minmax(4.7rem, 1fr));
  min-width: 620px;
}

.mx-arrangement-grid > div {
  border-bottom: 1px solid rgba(226, 232, 240, 0.13);
  border-right: 1px solid rgba(226, 232, 240, 0.13);
  min-height: 3.8rem;
  padding: 0.7rem;
}

.mx-track-name {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  font-weight: 700;
}

.mx-track-color {
  border-radius: 6px;
  height: 0.8rem;
  width: 0.8rem;
}

.mx-block {
  border-radius: 6px;
  height: 2rem;
  margin-top: 0.18rem;
}

.mx-price-line {
  align-items: center;
  border-bottom: 1px solid rgba(217, 224, 234, 0.78);
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.mx-plan-step {
  border-left: 2px solid var(--mx-line);
  padding-left: 1.25rem;
  position: relative;
}

.mx-plan-step::before {
  background: var(--mx-indigo);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--mx-line);
  content: "";
  height: 1rem;
  left: -0.56rem;
  position: absolute;
  top: 0.2rem;
  width: 1rem;
}

@media (max-width: 720px) {
  .mx-header-nav {
    gap: 0.7rem;
  }

  .mx-nav-secondary {
    display: none;
  }

  .mx-hero {
    min-height: 820px;
  }

  .mx-hero::before {
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.24), #000 50%, rgba(0, 0, 0, 0.42));
  }

  .mx-hero-title {
    max-width: 14ch;
  }
}

/* ============================================================ */
/* RELEASE-style Portfolio carousel (Swiper Coverflow)           */
/* ============================================================ */
.mx-release-section {
  background: #f8fafc;
  background-image: radial-gradient(rgba(0,192,195,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) {
  .mx-release-section { padding: 56px 0 80px; }
}

.mx-release-swiper-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 24px;
  position: relative;
  perspective: 1200px;
}

.mx-release-swiper {
  overflow: visible;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Specificity bump (.swiper.foo > .foo) so we win over Swiper's
   default .swiper-slide { width: 100% } even when its CSS loads after. */
.mx-release-swiper .mx-release-slide,
.swiper.mx-release-swiper > .swiper-wrapper > .mx-release-slide {
  backface-visibility: hidden;
  width: 630px;
  flex-shrink: 0;
}
@media (max-width: 1024px) {
  .mx-release-swiper .mx-release-slide,
  .swiper.mx-release-swiper > .swiper-wrapper > .mx-release-slide { width: 480px; }
}
@media (max-width: 768px) {
  .mx-release-swiper .mx-release-slide,
  .swiper.mx-release-swiper > .swiper-wrapper > .mx-release-slide { width: 320px; }
  .mx-release-swiper { max-width: 92vw; }
}

.mx-release-slide-content {
  width: 100%;
  text-align: center;
}

.mx-release-obj {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  background: #0f172a;
}

.mx-release-link {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #0f172a;
  text-decoration: none;
  transition: transform 0.4s ease;
  overflow: hidden;
}

/* Thumbnail <img> swapped in instead of CSS background so we can detect
   YouTube's 120x90 "no maxres" placeholder and fall back to hqdefault. */
.mx-release-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #0f172a;
}

.mx-release-link::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0, 192, 195, 0.85);
  z-index: 2;
  pointer-events: none;
}

/* Corner frames — exactly the reference style */
.mx-release-frame,
.mx-release-frame-in {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
}

.mx-release-frame::before,
.mx-release-frame::after,
.mx-release-frame-in::before,
.mx-release-frame-in::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: #00c0c3;
  border-style: solid;
  border-width: 0;
}

.mx-release-frame::before {
  top: 8px;
  left: 8px;
  border-top-width: 2px;
  border-left-width: 2px;
}
.mx-release-frame::after {
  top: 8px;
  right: 8px;
  border-top-width: 2px;
  border-right-width: 2px;
}
.mx-release-frame-in::before {
  bottom: 8px;
  left: 8px;
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.mx-release-frame-in::after {
  bottom: 8px;
  right: 8px;
  border-bottom-width: 2px;
  border-right-width: 2px;
}

.mx-release-play-btn {
  width: 64px;
  height: 64px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 192, 195, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  padding-left: 4px; /* optical center of play triangle */
  z-index: 4;
  transition: all 0.3s ease;
  opacity: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 8px 24px rgba(0, 192, 195, 0.35);
}
.swiper-slide-active .mx-release-link:hover .mx-release-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

/* Slide label below the thumbnail */
.mx-release-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.mx-release-name {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin: 0;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-release-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #00919b;
  background: rgba(0, 192, 195, 0.1);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.mx-release-badge:hover {
  background: rgba(0, 192, 195, 0.18);
}

/* Side slides are slightly dimmed so center stands out */
.mx-release-slide:not(.swiper-slide-active) .mx-release-link {
  filter: brightness(0.7);
}
.mx-release-slide:not(.swiper-slide-active) .mx-release-label {
  opacity: 0;
  pointer-events: none;
}

/* Dot navigation (SVG-style circle dots) */
.mx-release-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 28px;
  gap: 10px;
}
.mx-release-nav-dot {
  width: 22px;
  height: 22px;
  position: relative;
  cursor: pointer;
  display: block;
}
.mx-release-nav-dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}
.mx-release-nav-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  transition: all 0.3s ease;
}
.mx-release-nav-dot.active::before { background: #00c0c3; }
.mx-release-nav-dot.active::after { border-color: #00c0c3; }

/* ============================================================ */
/* Top page arrangement mock — uniform pill bars (Direction Sheet) */
/* ============================================================ */
.mx-arr-mock {
  border-collapse: separate;
  border-spacing: 0;
}
.mx-arr-mock td {
  vertical-align: middle;
  border-top: 1px dashed rgba(15, 23, 42, 0.06);
}
.mx-arr-mock thead th {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
/* Every placement bar — same height, same shape, regardless of row. */
.mx-arr-bar {
  display: block;
  width: 100%;
  height: 18px;
  border-radius: 6px;
  box-shadow: inset 0 -2px 0 rgba(15, 23, 42, 0.06);
}

/* ============================================================ */
/* Portfolio Modal — opens on slide click, plays video + CTA */
/* ============================================================ */
.mx-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.mx-modal.is-open {
  display: flex;
  animation: mx-modal-fade-in 0.2s ease;
}
@keyframes mx-modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.mx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mx-modal-panel {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  animation: mx-modal-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes mx-modal-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.mx-modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.mx-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}
.mx-modal-frame {
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.mx-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.mx-modal-body {
  background: #fff;
  border-radius: 0 0 14px 14px;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}
.mx-modal-info {
  min-width: 0;
}
.mx-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem;
  word-break: break-word;
}
.mx-modal-engineer {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}
.mx-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.mx-modal-actions .mx-button-primary {
  min-height: 44px;
}
@media (min-width: 640px) {
  .mx-modal-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}
@media (max-width: 640px) {
  .mx-modal-close {
    top: -2.5rem;
    right: 0.5rem;
  }
  .mx-modal-actions .mx-button-primary { width: 100%; }
}
body.mx-modal-open {
  overflow: hidden;
}

/* ---------------- Portfolio modal stage / fallback ---------------- */
.mx-modal-stage {
  width: 100%;
  height: 100%;
  position: relative;
}
.mx-modal-player-mount,
.mx-modal-stage > iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}
.mx-modal-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 106, 0, 0.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(0, 192, 195, 0.12), transparent 55%),
    linear-gradient(180deg, #0b1322 0%, #0a1020 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  text-align: center;
}
.mx-modal-fallback-inner {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}
.mx-modal-fallback-icon {
  color: #f43f5e;
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}
.mx-modal-fallback-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.5;
}
.mx-modal-fallback-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================ */
/* Premium engineer card — animated gold border + subtle shimmer */
/* ============================================================ */
.mx-premium-card {
  position: relative;
  /* Faint background tint so the gradient border is visible against
     the card body even before the animation runs. */
  background-color: #fffbeb;
}
.mx-premium-card::before {
  /* The actual animated rim. We paint a gradient on the wrapper,
     then mask out the interior so only a ~2px border shows through. */
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    120deg,
    #fde68a 0%,
    #facc15 25%,
    #fbbf24 50%,
    #f59e0b 75%,
    #fde68a 100%
  );
  background-size: 220% 220%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: mx-premium-shimmer 4.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.mx-premium-card::after {
  /* Diagonal glaze that sweeps across once per cycle. */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 220%;
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: 0.6;
  animation: mx-premium-glaze 4.5s ease-in-out infinite;
  z-index: 2;
}
.mx-premium-card > * {
  position: relative;
  z-index: 3;
}
@keyframes mx-premium-shimmer {
  0%   { background-position:   0%   0%; }
  100% { background-position: 220% 220%; }
}
@keyframes mx-premium-glaze {
  0%, 30%   { background-position: -120% -120%; opacity: 0; }
  50%        { opacity: 0.6; }
  70%, 100%  { background-position: 120% 120%;  opacity: 0; }
}
/* Hover lift is preserved from .mx-card-link */

/* ============================================================ */
/* Toast — site-branded variant (replaces the bare Tailwind one) */
/* ============================================================ */
.mx-toast-stack {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 1000;
  display: flex;
  flex-direction: column-reverse;  /* newest on top of the visual stack */
  gap: 0.6rem;
  width: min(94vw, 380px);
  pointer-events: none;
}
.mx-toast {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 0.65rem 0.7rem;
  align-items: center;
  padding: 0.85rem 1rem 0.95rem;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow:
    0 14px 40px rgba(15, 23, 42, 0.12),
    0 2px 6px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
  pointer-events: auto;
  font-family: inherit;
}
.mx-toast::before {
  /* Left accent stripe — color encodes severity */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mx-orange);
}
.mx-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
  background: var(--mx-orange);
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.25);
}
.mx-toast-body {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.55;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.mx-toast-close {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: #94a3b8;
  font-size: 0.85rem;
  padding: 0.25rem;
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  align-self: start;
  margin-top: -2px;
}
.mx-toast-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.mx-toast-progress {
  position: absolute;
  left: 4px;          /* sit on top of the accent stripe */
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mx-orange), var(--mx-orange-dark));
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 80ms linear;
}

/* Severity variants */
.mx-toast--success::before { background: #10b981; }
.mx-toast--success .mx-toast-icon { background: #10b981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28); }
.mx-toast--success .mx-toast-progress { background: linear-gradient(90deg, #10b981, #059669); }

.mx-toast--error::before { background: #ef4444; }
.mx-toast--error .mx-toast-icon { background: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.28); }
.mx-toast--error .mx-toast-progress { background: linear-gradient(90deg, #ef4444, #dc2626); }

.mx-toast--warning::before { background: #f59e0b; }
.mx-toast--warning .mx-toast-icon { background: #f59e0b; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28); }
.mx-toast--warning .mx-toast-progress { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* Info uses the brand orange (matches buttons / accents) */
.mx-toast--info::before { background: var(--mx-orange); }
.mx-toast--info .mx-toast-icon { background: var(--mx-orange); }

/* Alpine transition classes */
.mx-toast-enter {
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 280ms ease-out;
}
.mx-toast-enter-start {
  transform: translateY(28px) scale(0.96);
  opacity: 0;
}
.mx-toast-enter-end {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.mx-toast-leave {
  transition: transform 220ms ease-in,
              opacity 200ms ease-in;
}
.mx-toast-leave-start {
  transform: translateX(0);
  opacity: 1;
}
.mx-toast-leave-end {
  transform: translateX(120%);
  opacity: 0;
}
