:root {
  --mc-bg: #FAFAFB;
  --mc-bg-soft: #F4F4F7;
  --mc-surface: #FFFFFF;
  --mc-border: #ECECF1;
  --mc-border-strong: #D8D8E0;
  --mc-text: #14151A;
  --mc-text-muted: #5C616E;
  --mc-text-faint: #8A8F9C;
  --mc-grad-from: #06B6D4;
  --mc-grad-to: #3B82F6;
  --mc-grad: linear-gradient(135deg, var(--mc-grad-from), var(--mc-grad-to));
  --mc-grad-soft: linear-gradient(135deg, #E0F7FA 0%, #DBEAFE 100%);
  --mc-shadow-sm: 0 1px 2px rgba(20, 21, 26, 0.04), 0 2px 6px rgba(20, 21, 26, 0.04);
  --mc-shadow-md: 0 4px 10px rgba(20, 21, 26, 0.06), 0 12px 28px rgba(20, 21, 26, 0.06);
  --mc-shadow-lg: 0 10px 24px rgba(20, 21, 26, 0.08), 0 24px 60px rgba(20, 21, 26, 0.08);
  --mc-radius-sm: 10px;
  --mc-radius-md: 14px;
  --mc-radius-lg: 20px;
  --mc-radius-pill: 999px;
  --mc-pad-sm: 0.75rem;
  --mc-pad-md: 1.25rem;
  --mc-pad-lg: 2rem;
  --mc-max-w: 1200px;
  --mc-article-w: 720px;
  --mc-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --mc-focus: 0 0 0 3px rgba(59, 130, 246, 0.45);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--mc-bg);
  color: var(--mc-text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--mc-text);
  text-decoration: none;
  transition: color 0.18s var(--mc-ease);
}
a:hover { color: var(--mc-grad-to); text-decoration: underline; }

:focus-visible {
  outline: none;
  box-shadow: var(--mc-focus);
  border-radius: var(--mc-radius-sm);
}

/* --- Skip link --- */
.mc-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--mc-text);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--mc-radius-sm);
  z-index: 100;
  font-weight: 600;
}
.mc-skip:focus,
.mc-skip:focus-visible {
  left: 1rem;
  top: 1rem;
  text-decoration: none;
  color: #fff;
}

/* --- Top nav --- */
.mc-topnav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(20, 21, 26, 0.06);
}
.mc-topnav__inner {
  max-width: var(--mc-max-w);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Brand mark — small gradient pill that sits next to the wordmark. */
.mc-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--mc-text);
  flex-shrink: 0;
}
.mc-brand:hover { text-decoration: none; opacity: 0.9; color: var(--mc-text); }
.mc-brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--mc-grad);
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.35);
  flex-shrink: 0;
}

/* Hamburger — pure CSS toggle for mobile. The checkbox is visually hidden
   but stays focusable; the label is the visible button. */
.mc-menu-toggle {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.mc-menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
  background: transparent;
  border: 0;
}
.mc-menu-button__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--mc-text);
  border-radius: 2px;
  transition: transform 0.22s var(--mc-ease), opacity 0.2s var(--mc-ease);
}
.mc-menu-toggle:focus-visible + .mc-menu-button {
  box-shadow: var(--mc-focus);
  border-radius: 6px;
}

/* Drawer (mobile) — slides open below the masthead via :checked. */
.mc-drawer {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0 0.25rem;
}
.mc-menu-toggle:checked ~ .mc-drawer { display: flex; }
/* Hamburger animates into a friendly "X" when open. */
.mc-menu-toggle:checked ~ .mc-menu-button .mc-menu-button__bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}
.mc-menu-toggle:checked ~ .mc-menu-button .mc-menu-button__bar:nth-child(2) {
  opacity: 0;
}
.mc-menu-toggle:checked ~ .mc-menu-button .mc-menu-button__bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.mc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.mc-nav__link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--mc-text-muted);
  padding: 0.5rem 0.75rem;
  border-radius: var(--mc-radius-pill);
  transition: color 0.18s var(--mc-ease), background-color 0.18s var(--mc-ease);
}
.mc-nav__link:hover {
  text-decoration: none;
  color: var(--mc-text);
  background: rgba(20, 21, 26, 0.05);
}

/* Search field. */
.mc-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--mc-bg-soft);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-pill);
  padding: 0.25rem 0.4rem 0.25rem 0.85rem;
  width: 100%;
}
.mc-search:focus-within {
  border-color: var(--mc-grad-to);
  box-shadow: var(--mc-focus);
}
.mc-search__label {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.mc-search__input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--mc-text);
  padding: 0.35rem 0;
  min-width: 0;
}
.mc-search__input::placeholder { color: var(--mc-text-faint); }
.mc-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-grad);
  cursor: pointer;
  transition: transform 0.18s var(--mc-ease), filter 0.18s var(--mc-ease);
}
.mc-search__btn:hover { filter: brightness(1.05); }
.mc-search__btn:active { transform: scale(0.96); }
/* Search icon — pure CSS magnifier. Circle + handle drawn with a single
   element + ::after. */
.mc-search__icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  position: relative;
}
.mc-search__icon::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  background: #fff;
  transform: rotate(45deg);
  border-radius: 1px;
}

/* --- Main wrap --- */
.mc-main {
  max-width: var(--mc-max-w);
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* --- Hero (home) --- */
.mc-hero { margin: 0.25rem 0 2rem; }
.mc-hero__wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  background: var(--mc-surface);
  border-radius: var(--mc-radius-lg);
  overflow: hidden;
  box-shadow: var(--mc-shadow-md);
  border: 1px solid var(--mc-border);
}
.mc-hero__content {
  padding: 1.75rem 1.5rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
}
.mc-hero__kicker {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-grad-to);
  background: rgba(59, 130, 246, 0.08);
  padding: 0.3rem 0.75rem;
  border-radius: var(--mc-radius-pill);
}
.mc-hero__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--mc-text);
}
.mc-hero__lede {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--mc-text-muted);
  max-width: 36rem;
  margin: 0;
}
.mc-hero__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}
.mc-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mc-hero__monogram {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  user-select: none;
}

/* --- Featured (home, top of grid) --- */
.mc-featured {
  margin: 0 0 1.25rem;
}
.mc-feat {
  background: var(--mc-surface);
  border-radius: var(--mc-radius-lg);
  border: 1px solid var(--mc-border);
  box-shadow: var(--mc-shadow-md);
  overflow: hidden;
  transition: transform 0.22s var(--mc-ease), box-shadow 0.22s var(--mc-ease), border-color 0.22s var(--mc-ease);
}
.mc-feat:hover {
  transform: translateY(-5px);
  box-shadow: var(--mc-shadow-lg);
  border-color: transparent;
}
.mc-feat__link {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  height: 100%;
  color: inherit;
}
.mc-feat__link:hover { text-decoration: none; color: inherit; }
.mc-feat__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}
.mc-feat__monogram {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(4rem, 10vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
.mc-feat__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.mc-feat__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--mc-text);
}
.mc-feat__dek {
  font-size: 0.9375rem;
  color: var(--mc-text-muted);
  margin: 0;
  line-height: 1.55;
}
.mc-feat__more {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--mc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: 0.25rem;
}

/* --- Card grid (home, category index, related) --- */
.mc-grid {
  display: grid;
  /* auto-fit + minmax so cards reflow cleanly with any item count.
     The breakpoint media queries pin specific column counts on desktop
     for a more deliberate look on dense home pages. */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.mc-card {
  display: flex;
  background: var(--mc-surface);
  border-radius: var(--mc-radius-md);
  border: 1px solid var(--mc-border);
  box-shadow: var(--mc-shadow-sm);
  overflow: hidden;
  transition: transform 0.22s var(--mc-ease), box-shadow 0.22s var(--mc-ease), border-color 0.22s var(--mc-ease);
}
.mc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--mc-shadow-lg);
  border-color: transparent;
}
.mc-card:hover .mc-card__img,
.mc-card:hover .mc-card__monogram {
  transform: scale(1.03);
}
.mc-card__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.mc-card__link:hover { text-decoration: none; color: inherit; }
.mc-card__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  background: var(--mc-bg-soft);
}
.mc-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s var(--mc-ease);
}
.mc-card__monogram {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.32s var(--mc-ease);
}
.mc-card__body {
  padding: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  flex: 1;
}
.mc-card__pill {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mc-grad-to);
  background: rgba(59, 130, 246, 0.08);
  padding: 0.25rem 0.625rem;
  border-radius: var(--mc-radius-pill);
  display: inline-block;
  align-self: flex-start;
}
/* Linkable pill — sits ABOVE the wrapping card link (not nested inside) so
   the visitor can deep-link straight into /category/<slug>. Same chrome as
   the plain pill plus an underline-on-hover affordance. */
.mc-card__pill--link {
  text-decoration: none;
  margin: 1rem 1.125rem 0;
  transition: background 160ms ease, color 160ms ease;
}
.mc-card__pill--link:hover {
  background: var(--mc-grad-to);
  color: #fff;
  text-decoration: none;
}
/* Card excerpt — short prose under the title. Hidden when the producer
   didn't derive one (no boilerplate placeholder strings). */
.mc-card__dek {
  font-size: 0.875rem;
  color: var(--mc-text-muted);
  margin: 0;
  line-height: 1.5;
}
.mc-card__title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--mc-text);
}
.mc-card__more {
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--mc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-top: auto;
}

/* --- Empty / "more" --- */
.mc-empty {
  background: var(--mc-surface);
  border-radius: var(--mc-radius-md);
  border: 1px dashed var(--mc-border-strong);
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--mc-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.mc-empty p { margin: 0; }
.mc-empty__cta {
  font-weight: 600;
  color: var(--mc-grad-to);
  padding: 0.5rem 1rem;
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-pill);
}
.mc-more {
  margin-top: 1.75rem;
  text-align: center;
}
.mc-more__link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
  transition: transform 0.18s var(--mc-ease), box-shadow 0.18s var(--mc-ease);
}
.mc-more__link:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(59, 130, 246, 0.34);
}

/* --- Article breadcrumbs --- */
.mc-crumbs {
  max-width: var(--mc-article-w);
  margin: 0 auto 1rem;
  font-size: 0.8125rem;
  color: var(--mc-text-faint);
}
.mc-crumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.mc-crumbs__item { display: inline-flex; align-items: center; }
.mc-crumbs__sep { color: var(--mc-border-strong); user-select: none; }
.mc-crumbs__link {
  color: var(--mc-text-muted);
  text-decoration: none;
  transition: color 0.18s var(--mc-ease);
}
.mc-crumbs__link:hover { color: var(--mc-grad-to); text-decoration: underline; }
.mc-crumbs__item--current { color: var(--mc-text); font-weight: 500; }

/* --- Article (detail) --- */
.mc-article {
  max-width: var(--mc-article-w);
  margin: 1rem auto 0;
  background: transparent;
}
.mc-art-hero {
  margin: 0 0 1.5rem;
  border-radius: var(--mc-radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  box-shadow: var(--mc-shadow-md);
}
.mc-art-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mc-art-hero__monogram {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
.mc-article__header { margin-bottom: 1.5rem; }
.mc-article__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--mc-text);
}

/* Article meta — category pill + "Updated <relative>" stamp. The pill picks
   up the gradient-soft fill so it reads as part of the modern_cards visual
   language; the time stamp stays muted ink. */
.mc-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0.625rem 0 0;
  font-size: 0.8125rem;
  color: var(--mc-text-muted);
}
.mc-article-meta .article-meta__category {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.75rem;
  border-radius: 999px;
  background: var(--mc-grad-soft);
  color: var(--mc-grad-to);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.mc-article-meta .article-meta__category:hover {
  background: var(--mc-grad);
  color: #fff;
  text-decoration: none;
}
.mc-article-meta .article-meta__time { color: var(--mc-text-muted); }
.mc-article-meta .article-meta__byline { color: var(--mc-text-muted); }
.mc-article-meta .article-meta__byline a {
  color: var(--mc-grad-to);
  font-weight: 600;
  text-decoration: none;
}
.mc-article-meta .article-meta__byline a:hover {
  color: var(--mc-grad-from);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mc-article-meta .article-meta__format {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--mc-grad-soft);
  color: var(--mc-grad-to);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.mc-article__body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--mc-text);
}
.mc-article__body > *:first-child { margin-top: 0; }
.mc-article__body > *:last-child { margin-bottom: 0; }
.mc-article__body h2 {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.75rem;
}
.mc-article__body h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}
.mc-article__body p { margin: 0 0 1.1rem; }
.mc-article__body ul,
.mc-article__body ol { margin: 0 0 1.1rem 1.25rem; padding: 0; }
.mc-article__body li { margin-bottom: 0.4rem; }
.mc-article__body a {
  color: var(--mc-grad-to);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.mc-article__body a:hover { color: var(--mc-grad-from); }
.mc-article__body blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 3px solid var(--mc-grad-from);
  color: var(--mc-text-muted);
  font-style: italic;
  background: rgba(6, 182, 212, 0.04);
  border-radius: 0 var(--mc-radius-sm) var(--mc-radius-sm) 0;
}
.mc-article__body code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(20, 21, 26, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.mc-article__body pre {
  background: #14151A;
  color: #F1F1F4;
  padding: 1rem;
  border-radius: var(--mc-radius-sm);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 1.25rem 0;
}
.mc-article__body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.mc-article__body img {
  border-radius: var(--mc-radius-sm);
  margin: 1.25rem 0;
}

/* --- Related (article footer) --- */
.mc-related {
  max-width: var(--mc-max-w);
  margin: 3rem auto 0;
}
.mc-related__heading {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-text-faint);
  margin: 0 0 1rem;
}
.mc-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* --- Category index hero --- */
.mc-cathero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  margin: 0.5rem 0 1.75rem;
  padding: 1.5rem;
  background: var(--mc-grad-soft);
  border-radius: var(--mc-radius-lg);
  border: 1px solid var(--mc-border);
}
.mc-cathero__kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-grad-to);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.3rem 0.75rem;
  border-radius: var(--mc-radius-pill);
}
.mc-cathero__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--mc-text);
}
.mc-cathero__lede {
  font-size: 1rem;
  color: var(--mc-text-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 36rem;
}
/* Author persona bio — only rendered on /author/<slug> when the seed
   row has a non-empty persona. Quiet prose block under the kicker / lede. */
.mc-author-bio { margin: 0.75rem 0 0; max-width: 36rem; }
.mc-author-bio p { margin: 0 0 0.5rem; font-size: 0.9375rem; line-height: 1.55; color: var(--mc-text-muted); }
.mc-author-bio p:last-child { margin-bottom: 0; }

/* Wave B — category-index hero image variant. Mirrors the
 * .mc-feat__link two-column treatment so the category index reads as a
 * sibling of the featured card on home: image left, text right at tablet+,
 * stacked single column on mobile. Image visual uses 16/10 to match the
 * home hero .mc-hero__visual. */
.mc-cathero--image {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--mc-surface);
  box-shadow: var(--mc-shadow-md);
}
.mc-cathero__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.mc-cathero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mc-cathero--image .mc-cathero__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 1.5rem;
}
@media (min-width: 760px) {
  .mc-cathero--image {
    grid-template-columns: 1.1fr 1fr;
  }
  .mc-cathero__visual {
    aspect-ratio: auto;
    height: 100%;
    min-height: 240px;
  }
  .mc-cathero--image .mc-cathero__body {
    padding: 2rem 2.25rem;
    justify-content: center;
  }
}

/* --- 404 --- */
.mc-404 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 4rem;
}
.mc-404__card {
  background: var(--mc-surface);
  border-radius: var(--mc-radius-lg);
  border: 1px solid var(--mc-border);
  box-shadow: var(--mc-shadow-md);
  padding: 2.5rem 1.75rem;
  width: 100%;
  max-width: 38rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.mc-404__card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--mc-grad);
  filter: blur(40px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}
.mc-404__card > * { position: relative; z-index: 1; }
.mc-404__numeral {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(5.5rem, 14vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 0;
  background: var(--mc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.mc-404__kicker {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin: 0;
}
.mc-404__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--mc-text);
}
.mc-404__lede {
  font-size: 1rem;
  color: var(--mc-text-muted);
  margin: 0;
  line-height: 1.55;
}
.mc-404__path {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(20, 21, 26, 0.06);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  word-break: break-all;
}
.mc-404__actions {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}
.mc-404__cta {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
}
.mc-404__cta:hover {
  text-decoration: none;
  color: #fff;
  filter: brightness(1.05);
}
.mc-404__cta--ghost {
  background: var(--mc-surface);
  color: var(--mc-text);
  border: 1px solid var(--mc-border);
  box-shadow: none;
}
.mc-404__cta--ghost:hover { color: var(--mc-text); border-color: var(--mc-border-strong); }
.mc-404__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.75rem;
}
.mc-404__chip {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mc-text-muted);
  padding: 0.3rem 0.7rem;
  border-radius: var(--mc-radius-pill);
  border: 1px solid var(--mc-border);
  background: var(--mc-surface);
  transition: color 0.18s var(--mc-ease), border-color 0.18s var(--mc-ease);
}
.mc-404__chip:hover {
  text-decoration: none;
  color: var(--mc-grad-to);
  border-color: var(--mc-grad-to);
}
.mc-404__search {
  width: 100%;
  max-width: 26rem;
  margin: 0.5rem 0 0;
}
.mc-404__search-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin: 0 0 0.5rem;
  text-align: center;
}
.mc-404__search-row {
  display: flex;
  gap: 0.4rem;
}
.mc-404__search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--mc-text);
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: 8px;
  transition: border-color 0.18s var(--mc-ease), box-shadow 0.18s var(--mc-ease);
}
.mc-404__search-input:focus {
  outline: none;
  border-color: var(--mc-grad-to);
  box-shadow: 0 0 0 3px rgba(82, 199, 199, 0.18);
}
.mc-404__search-button {
  padding: 0.6rem 1.1rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  background: var(--mc-grad);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.18s var(--mc-ease);
}
.mc-404__search-button:hover { filter: brightness(1.05); }

/* Recent-suggestions card grid following the 404 hero. Reuses .mc-grid +
 * .mc-card markup so the cards are visually identical to the home / category
 * surfaces. The header sits between the hero card and the grid as a small
 * editorial divider. */
.mc-404-grid {
  margin: 2.5rem 0 0;
  padding: 0 var(--mc-pad-x, 1rem);
}
.mc-404-grid__header {
  text-align: center;
  margin: 0 0 1.5rem;
}
.mc-404-grid__kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mc-grad-to);
  margin: 0 0 0.4rem;
}
.mc-404-grid__title {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--mc-text);
  margin: 0;
}

/* --- Footer --- */
.mc-footer { margin-top: 4rem; background: var(--mc-bg); }
.mc-footer__rule {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(6, 182, 212, 0.35) 25%,
    rgba(59, 130, 246, 0.35) 75%,
    transparent 100%
  );
}
.mc-footer__inner {
  max-width: var(--mc-max-w);
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.mc-footer__col--brand { display: flex; flex-direction: column; gap: 0.5rem; }
.mc-footer__name {
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 0;
  color: var(--mc-text);
  letter-spacing: -0.01em;
}
.mc-footer__about {
  font-size: 0.9375rem;
  color: var(--mc-text-muted);
  line-height: 1.55;
  margin: 0;
  max-width: 28rem;
}
.mc-footer__heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-text-faint);
  margin: 0 0 0.625rem;
}
.mc-footer__navlist,
.mc-footer__catlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mc-footer__navlist a,
.mc-footer__catlist a {
  font-size: 0.9375rem;
  color: var(--mc-text-muted);
}
.mc-footer__navlist a:hover,
.mc-footer__catlist a:hover { color: var(--mc-text); }
.mc-footer__base {
  max-width: var(--mc-max-w);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  border-top: 1px solid var(--mc-border);
}
.mc-footer__copy {
  font-size: 0.8125rem;
  color: var(--mc-text-faint);
  margin: 0;
  text-align: center;
}

/* --- Tablet (>= 720px) --- */
@media (min-width: 720px) {
  .mc-topnav__inner {
    padding: 0.875rem 1.5rem;
    flex-wrap: nowrap;
  }
  .mc-menu-button { display: none; }
  .mc-drawer {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0;
    width: auto;
    flex: 1;
    margin-left: 1rem;
  }
  .mc-nav { flex: 1; }
  .mc-search { width: clamp(180px, 28vw, 320px); flex-shrink: 0; }

  .mc-main { padding: 1.75rem 1.5rem 5rem; }

  .mc-hero__wrap {
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
  }
  .mc-hero__content {
    padding: 2.25rem 2rem;
    justify-content: center;
  }
  .mc-hero__visual { aspect-ratio: auto; height: 100%; min-height: 280px; }

  .mc-feat__link { grid-template-columns: 1.1fr 1fr; }
  .mc-feat__visual { aspect-ratio: auto; height: 100%; min-height: 240px; }
  .mc-feat__body { padding: 2rem 2.25rem; justify-content: center; }

  .mc-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .mc-related__grid { grid-template-columns: repeat(3, 1fr); }

  .mc-footer__inner {
    grid-template-columns: 2fr 1fr 1fr;
    padding: 3rem 1.5rem 1.25rem;
  }
}

/* --- Desktop (>= 1024px) --- */
@media (min-width: 1024px) {
  .mc-topnav__inner { padding: 1rem 2rem; }
  .mc-main { padding: 2rem 2rem 6rem; }
  .mc-hero__content { padding: 3rem 2.5rem; }
  .mc-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .mc-card__body { padding: 1.25rem 1.375rem; }
  .mc-card__title { font-size: 1.125rem; }
  .mc-feat__body { padding: 2.5rem 2.75rem; }
  .mc-footer__inner {
    grid-template-columns: 2.4fr 1fr 1fr;
    padding: 3.5rem 2rem 1.5rem;
  }
  .mc-footer__base { padding: 1.25rem 2rem 2.5rem; }
}

/* --- Gradient placeholder buckets ---

   Each card / hero / featured / article-hero element that lacks a real
   image picks one of these 16 classes deterministically (template.ts
   gradientClass(seed) -> mc-grad-N). The values are spaced around the
   hue wheel so adjacent cards in a grid land on visually distinct colors.

   The classes only set background-image so they compose cleanly with the
   layout selectors (mc-card__visual, mc-feat__visual, mc-hero__visual,
   mc-art-hero). All saturation/lightness values stay inside the
   brand-friendly range — no neons, no muddy greys.

   GRADIENT_BUCKETS in template.ts must equal the count of mc-grad-* rules
   below. Update both together. */
.mc-grad-0  { background-image: linear-gradient(135deg, hsl(195 78% 70%), hsl(225 70% 56%)); }
.mc-grad-1  { background-image: linear-gradient(135deg, hsl(15  78% 70%), hsl(45  70% 56%)); }
.mc-grad-2  { background-image: linear-gradient(135deg, hsl(135 60% 65%), hsl(170 65% 50%)); }
.mc-grad-3  { background-image: linear-gradient(135deg, hsl(280 65% 70%), hsl(320 65% 60%)); }
.mc-grad-4  { background-image: linear-gradient(135deg, hsl(35  85% 68%), hsl(10  78% 58%)); }
.mc-grad-5  { background-image: linear-gradient(135deg, hsl(210 75% 68%), hsl(255 65% 58%)); }
.mc-grad-6  { background-image: linear-gradient(135deg, hsl(165 60% 65%), hsl(200 70% 55%)); }
.mc-grad-7  { background-image: linear-gradient(135deg, hsl(330 70% 70%), hsl(0   75% 60%)); }
.mc-grad-8  { background-image: linear-gradient(135deg, hsl(50  80% 65%), hsl(85  60% 55%)); }
.mc-grad-9  { background-image: linear-gradient(135deg, hsl(255 70% 70%), hsl(290 65% 60%)); }
.mc-grad-10 { background-image: linear-gradient(135deg, hsl(180 65% 65%), hsl(215 70% 55%)); }
.mc-grad-11 { background-image: linear-gradient(135deg, hsl(105 55% 60%), hsl(140 60% 50%)); }
.mc-grad-12 { background-image: linear-gradient(135deg, hsl(295 60% 70%), hsl(335 65% 60%)); }
.mc-grad-13 { background-image: linear-gradient(135deg, hsl(25  80% 68%), hsl(60  75% 55%)); }
.mc-grad-14 { background-image: linear-gradient(135deg, hsl(225 70% 70%), hsl(265 65% 60%)); }
.mc-grad-15 { background-image: linear-gradient(135deg, hsl(75  60% 60%), hsl(115 60% 50%)); }

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .mc-card,
  .mc-feat,
  .mc-card__img,
  .mc-card__monogram,
  .mc-nav__link,
  .mc-search__btn,
  .mc-more__link,
  .mc-menu-button__bar {
    transition: none !important;
  }
  .mc-card:hover,
  .mc-feat:hover,
  .mc-more__link:hover {
    transform: none;
  }
  .mc-card:hover .mc-card__img,
  .mc-card:hover .mc-card__monogram {
    transform: none;
  }
  .mc-cats-card:hover { transform: none; }
}

/* --- Home "Browse by category" grid ---
 * Dedicated .mc-cats-* classes (not .mc-card-*) so they coexist with
 * the recent-post grid that follows. Same shadow + radius vocabulary as
 * .mc-card, but a gradient accent stripe + bigger kicker so the category
 * cards read as a distinct surface rather than another recent-post row.
 */
.mc-cats { margin: 0 0 2rem; }
.mc-cats__header { margin: 0 0 1rem; }
.mc-cats__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin: 0;
}
.mc-cats__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.mc-cats-card {
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-md);
  box-shadow: var(--mc-shadow-sm);
  overflow: hidden;
  position: relative;
  transition: transform 0.22s var(--mc-ease), box-shadow 0.22s var(--mc-ease), border-color 0.22s var(--mc-ease);
}
.mc-cats-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--mc-grad);
  opacity: 0.85;
}
.mc-cats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--mc-shadow-lg);
  border-color: transparent;
}
.mc-cats-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 1.25rem 1.125rem;
  text-decoration: none;
  color: var(--mc-text);
  height: 100%;
}
.mc-cats-card__link:hover { text-decoration: none; color: var(--mc-text); }
.mc-cats-card__kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mc-grad-to);
}
.mc-cats-card__name {
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
  margin: 0;
  color: var(--mc-text);
}
.mc-cats-card__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--mc-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mc-cats-card__cta {
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--mc-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: 0.02em;
}

/* ---------- Loader (poll-mode holding page + error fallback) ----------
 * Visual / lifestyle voice: white card on the page bg, generous radius and
 * soft shadow vocab matching the rest of modern_cards, brand-gradient
 * spinner ring (rotating arc that matches the cyan→blue brand pair),
 * Fraunces title, soft-gradient pill for the path, gradient CTA on error
 * recovery. Reduced-motion stops the rotation but keeps the card visible.
 */
body.is-loader {
  margin: 0;
  background: var(--mc-bg);
}
.mc-loader {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.mc-loader__card {
  width: 100%;
  max-width: 480px;
  background: var(--mc-surface);
  border: 1px solid var(--mc-border);
  border-radius: var(--mc-radius-lg);
  box-shadow: var(--mc-shadow-md);
  padding: 2.5rem 1.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mc-loader__card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--mc-grad);
  filter: blur(40px);
  opacity: 0.12;
  z-index: 0;
  pointer-events: none;
}
.mc-loader__card > * { position: relative; z-index: 1; }
.mc-loader__eyebrow {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mc-text-muted);
  margin: 0 0 1.25rem;
}
.mc-loader__spinner {
  display: inline-block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mc-grad);
  position: relative;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
  animation: mc-loader-pulse 1.6s ease-in-out infinite;
}
.mc-loader__spinner::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--mc-surface);
}
.mc-loader__spinner::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--mc-grad-from);
  border-right-color: var(--mc-grad-to);
  animation: mc-loader-spin 1s linear infinite;
}
@keyframes mc-loader-spin {
  to { transform: rotate(360deg); }
}
@keyframes mc-loader-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.92; }
}
.mc-loader__title {
  margin: 0 0 0.5rem;
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: clamp(1.375rem, 3vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
  color: var(--mc-text);
}
.mc-loader__body,
.mc-loader__hint {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--mc-text-muted);
}
.mc-loader__path {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-grad-soft);
  color: var(--mc-grad-to);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  word-break: break-all;
  max-width: 100%;
}
.mc-loader__card--error .mc-loader__spinner { display: none; }
.mc-loader__icon-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FEE5E2;
  color: #E74C3C;
  font-family: 'Fraunces', 'Inter', Georgia, serif;
  font-size: 1.625rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  box-shadow: 0 6px 16px rgba(231, 76, 60, 0.18);
}
.mc-loader__actions {
  margin-top: 1.25rem;
}
.mc-loader__cta {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--mc-radius-pill);
  background: var(--mc-grad);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.28);
  text-decoration: none;
  transition: filter 0.18s var(--mc-ease), transform 0.18s var(--mc-ease);
}
.mc-loader__cta:hover {
  text-decoration: none;
  color: #fff;
  filter: brightness(1.05);
  transform: translateY(-1px);
}
@media (max-width: 480px) {
  .mc-loader__card { padding: 2rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-loader__spinner,
  .mc-loader__spinner::after {
    animation: none;
  }
  .mc-loader__cta { transition: none; }
  .mc-loader__cta:hover { transform: none; }
}
