/* Spacing when injected before site footer (Series, About) */
.mz-wd-page-footer {
  margin-top: 2rem;
  padding-bottom: 0.5rem;
}

.mz-wd {
  --mz-wd-c-bg: var(--mz-surface-raised, #11282f);
  --mz-wd-c-border: var(--mz-border, rgba(31, 108, 126, 0.5));
  --mz-wd-c-fill: var(--mz-orange, #f06d3f);
  --mz-wd-c-glow: rgba(240, 109, 63, 0.35);
  --mz-wd-c-ink: var(--mz-ink, #e2f0f2);
  --mz-wd-c-muted: var(--mz-muted, #7eb8c3);
  --mz-wd-c-stage: #2a4f58;
  --mz-wd-c-past: #1f6c7e;
  --mz-wd-c-active: var(--mz-zombie, #7cb342);
  --mz-wd-max: var(--mz-max-width, 1120px);
  max-width: var(--mz-wd-max);
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

.mz-wd__inner {
  background: linear-gradient(180deg, rgba(25, 82, 92, 0.35) 0%, var(--mz-wd-c-bg) 45%);
  border: 1px solid var(--mz-wd-c-border);
  border-radius: var(--mz-radius, 14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  position: relative;
  overflow: hidden;
}

.mz-wd__inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(ellipse at top right, rgba(240, 109, 63, 0.1) 0%, transparent 58%);
  pointer-events: none;
}

.mz-wd__head {
  position: relative;
  text-align: center;
  margin-bottom: 1.5rem;
}

.mz-wd__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--mz-wd-c-active);
  margin: 0 0 0.4rem;
  font-family: "Quicksand", "Segoe UI", sans-serif;
  font-weight: 600;
}

.mz-wd__title {
  margin: 0 0 0.4rem;
  font-family: "Quicksand", "Segoe UI", sans-serif;
  color: var(--mz-wd-c-fill);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
}

.mz-wd__intro {
  margin: 0;
  max-width: 42em;
  margin-left: auto;
  margin-right: auto;
  color: var(--mz-wd-c-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.mz-wd__project {
  position: relative;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--mz-wd-c-border);
}

.mz-wd__project:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0.25rem;
}

.mz-wd__project-top {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.mz-wd__project-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mz-wd-c-ink);
  font-family: "Quicksand", "Segoe UI", sans-serif;
}

.mz-wd__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
}

.mz-wd__chip {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--mz-wd-c-ink);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--mz-wd-c-border);
}

.mz-wd__chip--strong {
  background: rgba(31, 108, 126, 0.35);
  color: #fff0e8;
}

.mz-wd__chip--eta {
  color: #c8e8f0;
}

.mz-wd__track {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.mz-wd__bar-wrap {
  position: relative;
  height: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.mz-wd__bar {
  position: relative;
  height: 100%;
  max-width: 100%;
  border-radius: 999px;
  min-width: 0;
  transition: width 1.1s cubic-bezier(0.2, 0.85, 0.2, 1);
  background: linear-gradient(90deg, #b74a28, var(--mz-wd-c-fill) 50%, #ffb090);
  box-shadow: 0 0 20px var(--mz-wd-c-glow);
}

.mz-wd__stages {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.25rem;
  margin: 0;
  padding: 0;
  counter-reset: mzst;
}

.mz-wd__stage {
  --dot: 0.55rem;
  position: relative;
  flex: 1 1 auto;
  min-width: 7.5rem;
  padding: 0.4rem 0.45rem 0.5rem 1.45rem;
  background: var(--mz-wd-c-stage);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--mz-wd-c-muted);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.mz-wd__stage::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 50%;
  width: var(--dot);
  height: var(--dot);
  margin-top: calc(-0.5 * var(--dot));
  border-radius: 50%;
  background: #3d6d7a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.mz-wd__stage.is-past {
  color: #b5d0d6;
  background: rgba(19, 58, 64, 0.65);
}

.mz-wd__stage.is-past::before {
  background: var(--mz-wd-c-past);
  box-shadow: 0 0 6px rgba(31, 108, 126, 0.8);
}

.mz-wd__stage.is-active {
  color: var(--mz-wd-c-ink);
  border-color: rgba(124, 179, 66, 0.45);
  background: linear-gradient(145deg, rgba(19, 58, 64, 0.95) 0%, #163d44 100%);
  box-shadow: 0 0 0 1px rgba(124, 179, 66, 0.2);
}

.mz-wd__stage.is-active::before {
  background: var(--mz-wd-c-active);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 12px rgba(124, 179, 66, 0.6);
  animation: mz-wd-pulse 2.2s ease-in-out infinite;
}

.mz-wd__stage.is-past.is-active {
  /* Completed — finished glow */
  border-color: rgba(124, 179, 66, 0.4);
}

@keyframes mz-wd-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

.mz-wd__stage-label {
  display: block;
  font-weight: 600;
}

@media (min-width: 800px) {
  .mz-wd__stages {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.4rem;
  }
}

@media (max-width: 520px) {
  .mz-wd {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .mz-wd__bar,
  .mz-wd__stage {
    transition: none !important;
  }

  .mz-wd__stage.is-active::before {
    animation: none;
  }
}

/* Block editor preview (also loaded as editor style for the Writing Desk block) */
.mz-wd-block-preview {
  box-sizing: border-box;
  border: 1px solid rgba(31, 108, 126, 0.4);
  padding: 1rem 1.1rem 1.15rem;
  border-radius: 10px;
  background: rgba(15, 34, 40, 0.06);
}

.mz-wd-block-preview__kicker {
  margin: 0 0 0.4rem;
  font-weight: 800;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #19525c;
}

.mz-wd-block-preview__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #0c2228;
}

/* In-page block wrapper (Gutenberg) */
.mz-wd-block {
  margin: 1.5rem 0;
}
