/* ============================================================
   MyCeleb Reporter — Magazine Layout CSS  v1.1
   Changes in v1.1:
   ✓ Removed left sidebar — replaced with top header
   ✓ Fixed single post layout (article fills column, no gap)
   ✓ Styled comments section on-brand
   ✓ Fixed mobile responsiveness (no horizontal overflow)
   ✓ Featured image now at top of article card
   ============================================================ */

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Prevent horizontal scroll globally */
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  background: var(--color-surface-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* Belt AND braces */
}

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

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

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul, ol { list-style: none; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: 9999;
  font-weight: var(--fw-semi);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-2); }

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   TOP HEADER
   ============================================================ */
.mcr-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-sidebar-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.mcr-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: 0 var(--space-6);
  height: 64px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

/* Logo */
.mcr-header__logo {
  flex-shrink: 0;
}

.mcr-header__logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.mcr-header__logo img {
  height: 40px;
  width: auto;
}

.mcr-header__site-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-black);
  color: white;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Primary nav */
.mcr-header__nav {
  flex: 1;
  display: flex;
  align-items: center;
}

.mcr-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mcr-nav__list li a {
  display: block;
  padding: var(--space-2) var(--space-3);
  color: rgba(255,255,255,0.75);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.mcr-nav__list li a:hover,
.mcr-nav__list li.current-menu-item > a,
.mcr-nav__list li.current_page_item > a {
  background: rgba(255,255,255,0.12);
  color: white;
}

/* Dropdown */
.mcr-nav__list li {
  position: relative;
}

.mcr-nav__list li ul {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-sidebar-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  min-width: 200px;
  padding: var(--space-2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: var(--z-modal);
  list-style: none;
}

.mcr-nav__list li:hover > ul,
.mcr-nav__list li:focus-within > ul {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.mcr-nav__list li ul a {
  width: 100%;
  border-radius: var(--radius-md);
}

/* Header right actions */
.mcr-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.mcr-header__search-btn {
  color: rgba(255,255,255,0.7);
}
.mcr-header__search-btn:hover {
  color: white;
  background: rgba(255,255,255,0.12);
}

/* Hamburger (mobile only) */
.mcr-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: white;
}

.mcr-hamburger__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.mcr-header__hamburger[aria-expanded="true"] .mcr-hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mcr-header__hamburger[aria-expanded="true"] .mcr-hamburger__bar:nth-child(2) {
  opacity: 0;
}
.mcr-header__hamburger[aria-expanded="true"] .mcr-hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Category strip removed */

/* ============================================================
   PAGE WRAPPER (replaces .mcr-layout)
   ============================================================ */
.mcr-page {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  outline: none;
}

/* ============================================================
   ICONS
   ============================================================ */
.mcr-icon { width: 20px; height: 20px; flex-shrink: 0; }
.mcr-icon--sm { width: 14px; height: 14px; }

/* ============================================================
   ICON BUTTONS (44×44 touch targets)
   ============================================================ */
.mcr-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  touch-action: manipulation;
}
.mcr-btn-icon:hover { background: var(--color-surface-3); color: var(--color-primary); }
.mcr-btn-icon:active { transform: scale(0.95); }

/* ============================================================
   CATEGORY BADGE
   ============================================================ */
.mcr-badge {
  display: inline-block;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--badge-color, var(--color-primary));
  background: rgba(79, 70, 229, 0.12);
  transition: background var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}
.mcr-badge:hover {
  background: rgba(79, 70, 229, 0.2);
  text-decoration: none;
}

/* ============================================================
   HERO ARTICLE (homepage)
   ============================================================ */
.mcr-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin: var(--space-6);
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--color-sidebar-bg);
}

.mcr-hero__image-link {
  position: absolute;
  inset: 0;
  display: block;
}

.mcr-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.mcr-hero:hover .mcr-hero__image { transform: scale(1.02); }

.mcr-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,20,.85) 0%, rgba(10,10,20,.3) 50%, transparent 100%);
  pointer-events: none;
}

.mcr-hero__content {
  position: relative;
  z-index: 1;
  padding: var(--space-8);
  color: white;
}

.mcr-hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.mcr-hero__date { font-size: var(--text-sm); color: rgba(255,255,255,.7); }

.mcr-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
  max-width: 70ch;
}
.mcr-hero__title a { color: white; }
.mcr-hero__title a:hover { text-decoration: underline; }

.mcr-hero__excerpt {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,.82);
  max-width: 60ch;
  margin-bottom: var(--space-4);
}

.mcr-hero__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.mcr-hero__views {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.7);
}

.mcr-hero__actions { display: flex; gap: var(--space-1); }
.mcr-hero__actions .mcr-btn-icon { color: rgba(255,255,255,.8); }
.mcr-hero__actions .mcr-btn-icon:hover { background: rgba(255,255,255,.15); color: white; }

/* ============================================================
   THREE-COLUMN GRID (homepage)
   ============================================================ */
.mcr-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding: 0 var(--space-6) var(--space-8);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 768px) {
  .mcr-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1100px) {
  .mcr-grid {
    grid-template-columns: 2fr 1.5fr 1.5fr;
  }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.mcr-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-border);
}

.mcr-section__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

.mcr-section__more {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: var(--fw-medium);
  transition: color var(--transition-fast);
}
.mcr-section__more:hover { color: var(--color-primary-dark); text-decoration: underline; }

/* ============================================================
   CARDS (featured / related)
   ============================================================ */
.mcr-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  margin-bottom: var(--space-4);
}
.mcr-card:last-child { margin-bottom: 0; }
.mcr-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mcr-card:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.mcr-card--featured {
  display: flex;
  flex-direction: row;
}

.mcr-card__image-link {
  flex-shrink: 0;
  display: block;
  width: 120px;
  overflow: hidden;
}

.mcr-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.mcr-card:hover .mcr-card__image { transform: scale(1.04); }

.mcr-card__body {
  flex: 1;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.mcr-card__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mcr-card__date { font-size: var(--text-xs); color: var(--color-text-muted); }

.mcr-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}
.mcr-card__title a:hover { color: var(--color-primary); text-decoration: none; }

.mcr-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mcr-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: var(--space-2);
}

.mcr-card__views {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
  font-variant-numeric: tabular-nums;
}

.mcr-card__actions { display: flex; gap: var(--space-1); }

/* Related cards (3-up grid) */
.mcr-card--related {
  flex-direction: column;
  margin-bottom: 0;
}
.mcr-card--related .mcr-card__image-link {
  width: 100%;
  aspect-ratio: 3/2;
}
.mcr-card--related .mcr-card__title { font-size: var(--text-base); }

/* ============================================================
   LIST ITEMS (centre column)
   ============================================================ */
.mcr-subsection { margin-bottom: var(--space-6); }

.mcr-list-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.mcr-list-item:last-child { border-bottom: none; }

.mcr-list-item__thumb-link {
  flex-shrink: 0;
  display: block;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.mcr-list-item__thumb { width: 56px; height: 56px; object-fit: cover; }

.mcr-list-item__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.mcr-list-item__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mcr-list-item__date { font-size: var(--text-xs); color: var(--color-text-muted); }

.mcr-list-item__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
  color: var(--color-text-primary);
}
.mcr-list-item__title a:hover { color: var(--color-primary); text-decoration: none; }

.mcr-list-item__avatar { width: 24px; height: 24px; border-radius: var(--radius-full); object-fit: cover; }
.mcr-list-item__author { display: inline-block; margin-top: var(--space-1); }

/* Audio bar */
.mcr-list-item__audio { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-1); }
.mcr-audio-play {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.mcr-audio-play:hover { background: var(--color-primary-dark); }
.mcr-audio-play:active { transform: scale(0.92); }
.mcr-audio-bar {
  flex: 1;
  height: 3px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  opacity: 0.4;
}
.mcr-audio-duration {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ============================================================
   POPULAR POSTS (right sidebar on homepage)
   ============================================================ */
.mcr-popular-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.mcr-popular-card:last-child { margin-bottom: 0; }
.mcr-popular-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.mcr-popular-card__image-link { display: block; overflow: hidden; aspect-ratio: 16/9; }
.mcr-popular-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.mcr-popular-card:hover .mcr-popular-card__image { transform: scale(1.04); }

.mcr-popular-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.mcr-popular-card__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mcr-popular-card__date { font-size: var(--text-xs); color: var(--color-text-muted); }

.mcr-popular-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
}
.mcr-popular-card__title a:hover { color: var(--color-primary); text-decoration: none; }

.mcr-popular-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mcr-popular-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.mcr-popular-card__views {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}
.mcr-popular-card__actions { display: flex; gap: var(--space-1); }

/* ============================================================
   SINGLE POST — HERO IMAGE (full-bleed, behind content card)
   ============================================================ */

/* Hero: centred, wider than content, rounded corners */
.mcr-single-hero {
  position: relative;
  width: min(calc(var(--content-max-width) + 80px), calc(100% - 48px));
  margin: 0 auto;
  height: 480px;
  overflow: hidden;
  display: block;
  border-radius: 16px;
}

.mcr-single-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Overlay removed */
.mcr-single-hero__overlay {
  display: none;
}

/* ============================================================
   SINGLE POST WRAP — content card overlaps the hero
   ============================================================ */

/* Outer wrapper: single column, just centres and constrains width */
.mcr-single-wrap {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-10);
}

/* When a hero is present, pull the card up to overlap */
.mcr-single-wrap.has-hero {
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

/* Main article column (full width inside wrap) */
.mcr-single-main {
  width: 100%;
}

/* ============================================================
   ARTICLE BODY GRID — entry content wraps around floated sidebar
   ============================================================ */

/* Float container — clearfix so the card stretches around the float */
.mcr-article__body-grid {
  display: block;
}
.mcr-article__body-grid::after {
  content: '';
  display: table;
  clear: both;
}

/* The main content column fills remaining space naturally */
.mcr-article__body-main {
  display: block;
  /* no explicit width — it flows around the float */
}

/* ============================================================
   ARCHIVE & PAGE LAYOUT — content + widgetized sidebar
   ============================================================ */
.mcr-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-6);
  padding: var(--space-6);
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

/* Page content area inside the sidebar layout */
.mcr-page-content {
  min-width: 0;
}

/* Sidebar column — always present, rendered empty until widgets are added */
.mcr-page-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.mcr-page-sidebar .widget {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.mcr-page-sidebar .widget-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--space-3);
  color: var(--color-text-primary);
}

/* ============================================================
   ARTICLE CARD
   ============================================================ */
.mcr-article {
  /* Ensure it fills the grid column — no max-width constraint here */
  min-width: 0;
  width: 100%;
}

.mcr-article__body {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
}

/* Featured image — full width, top of card, no padding, no margin */
.mcr-article__hero-image {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
  line-height: 0;
}

.mcr-article__hero-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  display: block;
}

.mcr-article__hero-caption {
  padding: var(--space-2) var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  background: var(--color-surface-2);
  line-height: var(--leading-normal);
}

/* Breadcrumb */
.mcr-breadcrumb {
  padding: var(--space-3) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.mcr-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.mcr-breadcrumb__list a { color: var(--color-primary); font-weight: var(--fw-medium); }
.mcr-breadcrumb__list a:hover { text-decoration: underline; }
[aria-current="page"] { color: var(--color-text-secondary); }

/* Article header */
.mcr-article__header {
  padding: var(--space-6) var(--space-6) var(--space-4);
}

.mcr-article__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.mcr-article__date { font-size: var(--text-sm); color: var(--color-text-muted); }

.mcr-article__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl));
  font-weight: var(--fw-black);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.mcr-article__lead {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.mcr-article__byline {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.mcr-article__author {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
}

.mcr-article__author-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-border);
}

.mcr-article__reading-time,
.mcr-article__views {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-variant-numeric: tabular-nums;
}

.mcr-article__actions {
  display: flex;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

/* Article body */
.mcr-article__content {
  padding: var(--space-6);
  font-size: var(--text-lg);
  line-height: var(--leading-loose);
  color: var(--color-text-primary);
  /* Override WordPress/Gutenberg block constraints */
  max-width: none !important;
  width: 100% !important;
}

/* Override Gutenberg block alignments that may constrain width */
.mcr-article__content .wp-block-group,
.mcr-article__content .wp-block-columns,
.mcr-article__content .wp-block-cover {
  max-width: none;
}

/* Ensure .entry-content itself isn't constrained */
.mcr-article .entry-content {
  max-width: none !important;
  width: 100% !important;
}

/* Drop cap on first paragraph */
.mcr-article__content > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 4em;
  font-weight: var(--fw-black);
  float: left;
  line-height: 0.7;
  margin-right: var(--space-1);
  margin-top: var(--space-0);
  color: var(--color-accent);
}

.mcr-article__content p { margin-bottom: var(--space-5); }

.mcr-article__content h2,
.mcr-article__content h3,
.mcr-article__content h4 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
  margin: var(--space-8) 0 var(--space-4);
  color: var(--color-text-primary);
}
.mcr-article__content h2 { font-size: var(--text-2xl); }
.mcr-article__content h3 { font-size: var(--text-xl); }
.mcr-article__content h4 { font-size: var(--text-lg); }

.mcr-article__content img {
  border-radius: var(--radius-lg);
  margin: var(--space-6) auto;
}

.mcr-article__content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }

.mcr-article__content blockquote {
  border-left: 4px solid var(--color-primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  background: var(--color-surface-3);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-xl);
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-text-secondary);
}

/* ============================================================
   SINGLE POST SIDEBAR — collapsible, widgetized
   ============================================================ */

.mcr-single-sidebar {
  float: right;
  width: 280px;
  /* Right margin matches the outer content padding (--space-6 = 1.5rem)
     Left margin is a little less to keep it close to the text */
  margin: 0 var(--space-6) var(--space-5) var(--space-4);
  /* Sticky-like behaviour via position sticky still works on floats in modern browsers */
  position: sticky;
  top: calc(var(--header-h, 64px) + var(--space-4));
  display: flex;
  flex-direction: column;
}

/* Toggle button — hidden on desktop, shown on mobile */
.mcr-sidebar-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--color-text-primary);
  transition: background var(--transition-fast);
  margin-bottom: var(--space-2);
}
.mcr-sidebar-toggle:hover { background: var(--color-surface-2); }

.mcr-sidebar-toggle__icon {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
/* Rotates arrow when collapsed */
.mcr-sidebar-toggle[aria-expanded="false"] .mcr-sidebar-toggle__icon {
  transform: rotate(180deg);
}

/* Inner content wrapper — animated collapse */
.mcr-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow: hidden;
  transition: max-height var(--transition-slow) ease, opacity var(--transition-base);
  max-height: 9000px; /* large enough to not clip content */
  opacity: 1;
}
.mcr-sidebar-inner.is-collapsed {
  max-height: 0;
  opacity: 0;
}

/* Widget cards inside the sidebar */
.mcr-single-sidebar .widget {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.mcr-single-sidebar .widget-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--space-3);
  color: var(--color-text-primary);
}

/* Empty state placeholder */
.mcr-sidebar-empty {
  background: var(--color-surface-2);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Related */
.mcr-related { padding: var(--space-6); border-top: 1px solid var(--color-border); }
.mcr-related__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-4);
}
.mcr-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
}

/* ============================================================
   COMMENTS — fully styled to match theme
   ============================================================ */

.mcr-comments-wrap {
  padding: var(--space-2);
  margin:0 20px 40px 20px;
}

/* Comments title */
.mcr-comments__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: wrap;
}
@keyframes mcr-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.mcr-comment-form__title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-6);
  padding: 5px 5px 5px 20px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(
    270deg,
    #d68515,   /* amber gold */
    #D64F15,   /* burnt orange */
    #FFC16C,   /* soft peach gold */
    #D64F15,   /* burnt orange */
    #d68515    /* back to amber gold for seamless loop */
  );
  background-size: 300% 300%;
  animation: mcr-gradient-shift 10s ease infinite;
}
.mcr-comments__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 var(--space-2);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
}

.mcr-comments__post-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-regular);
  color: var(--color-text-secondary);
}

/* Comment list */
.mcr-comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mcr-comment-list .children {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0 var(--space-6);
  border-left: 3px solid var(--color-primary-light);
  padding-left: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Individual comment */
.mcr-comment {
  list-style: none;
}

.mcr-comment__body {
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: box-shadow var(--transition-fast);
}
.mcr-comment__body:hover {
  box-shadow: var(--shadow-sm);
}

/* Alternate comment background */
.mcr-comment:nth-child(even) .mcr-comment__body {
  background: var(--color-surface);
}

.mcr-comment__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3);
}

.mcr-comment__avatar {
  flex-shrink: 0;
}

.mcr-comment__avatar-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-border);
  display: block;
}

.mcr-comment__meta {
  flex: 1;
  min-width: 0;
}

.mcr-comment__author {
  display: block;
  font-weight: var(--fw-semi);
  font-size: var(--text-base);
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.mcr-comment__author a {
  color: var(--color-primary);
  font-weight: var(--fw-semi);
}
.mcr-comment__author a:hover { text-decoration: underline; }

.mcr-comment__date {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.mcr-comment__moderation {
  font-size: var(--text-sm);
  color: var(--color-warning);
  font-style: italic;
  margin-top: var(--space-2);
}

.mcr-comment__content {
  padding: 0 var(--space-4) var(--space-3) calc(48px + var(--space-4) + var(--space-3));
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
}

.mcr-comment__content p {
  margin-bottom: var(--space-3);
}
.mcr-comment__content p:last-child {
  margin-bottom: 0;
}

.mcr-comment__content a {
  color: var(--color-primary);
  text-decoration: underline;
}

.mcr-comment__footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-3) calc(48px + var(--space-4) + var(--space-3));
  border-top: 1px solid var(--color-border);
}

.mcr-comment__reply a,
.mcr-comment__edit a {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-primary);
  transition: color var(--transition-fast);
}
.mcr-comment__reply a:hover,
.mcr-comment__edit a:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.mcr-comment__edit a {
  color: var(--color-text-muted);
}

.mcr-comments__closed {
  text-align: center;
  padding: var(--space-6);
  color: var(--color-text-muted);
  font-style: italic;
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

/* Comment navigation */
.mcr-comment-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-border);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
}
.mcr-comment-nav a { color: var(--color-primary); font-weight: var(--fw-medium); }

/* ---- Comment Form ---- */


.mcr-comment-form__heading {
  display: block;
}

.mcr-comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.mcr-comment-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 600px) {
  .mcr-comment-form__row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.mcr-comment-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.mcr-comment-form__field--full {
  grid-column: 1 / -1;
}

.mcr-comment-form__label {
  font-size: var(--text-sm);
  font-weight: var(--fw-semi);
  color: var(--color-text-secondary);
}

.mcr-comment-form__label .required {
  color: var(--color-error);
  margin-left: 2px;
}

.mcr-comment-form__input,
.mcr-comment-form__textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-height: 44px;
  appearance: none;
  -webkit-appearance: none;
}

.mcr-comment-form__input:focus,
.mcr-comment-form__textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}

.mcr-comment-form__input::placeholder,
.mcr-comment-form__textarea::placeholder {
  color: var(--color-text-muted);
}

.mcr-comment-form__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: var(--leading-relaxed);
}

.mcr-comment-form__field--checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
}

.mcr-comment-form__check-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
  line-height: var(--leading-relaxed);
}

.mcr-comment-form__check-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.mcr-comment-form__submit-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.mcr-comment-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-8);
  background: var(--color-primary);
  color: white;
  font-size: var(--text-base);
  font-weight: var(--fw-semi);
  font-family: var(--font-body);
  border-radius: var(--radius-lg);
  min-height: 48px;
  transition: background var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
  border: none;
}
.mcr-comment-form__submit:hover { background: var(--color-primary-dark); }
.mcr-comment-form__submit:active { transform: scale(0.97); }

/* cancel reply link */
#cancel-comment-reply-link {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
#cancel-comment-reply-link:hover { color: var(--color-error); }

/* ============================================================
   SINGLE SIDEBAR WIDGETS
   ============================================================ */
.mcr-single-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}

.mcr-widget {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.mcr-sidebar-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.mcr-sidebar-card:last-child { margin-bottom: 0; }
.mcr-sidebar-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.mcr-sidebar-card__image-link { display: block; overflow: hidden; aspect-ratio: 16/9; }
.mcr-sidebar-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.mcr-sidebar-card:hover .mcr-sidebar-card__image { transform: scale(1.04); }

.mcr-sidebar-card__body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.mcr-sidebar-card__meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.mcr-sidebar-card__date { font-size: var(--text-xs); color: var(--color-text-muted); }

.mcr-sidebar-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
}
.mcr-sidebar-card__title a:hover { color: var(--color-primary); text-decoration: none; }
.mcr-sidebar-card__excerpt { font-size: var(--text-xs); color: var(--color-text-secondary); line-height: var(--leading-relaxed); }

.mcr-sidebar-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.mcr-sidebar-card__actions { display: flex; gap: var(--space-1); }

/* ============================================================
   AUDIO PLAYER
   ============================================================ */
.mcr-audio-card { padding: var(--space-2); }
.mcr-audio-card__meta { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.mcr-audio-card__title { font-family: var(--font-heading); font-size: var(--text-base); font-weight: var(--fw-bold); margin-bottom: var(--space-3); }
.mcr-audio-card__title a:hover { color: var(--color-primary); text-decoration: none; }

.mcr-audio-player {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.mcr-audio-player__play {
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.mcr-audio-player__play:hover { background: var(--color-primary-dark); }
.mcr-audio-player__play:active { transform: scale(0.92); }

.mcr-audio-player__bar {
  flex: 1;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  position: relative;
  min-width: 0;
}
.mcr-audio-player__progress { height: 100%; width: 30%; background: var(--color-primary); border-radius: var(--radius-full); }
.mcr-audio-player__time { font-size: var(--text-xs); color: var(--color-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mcr-audio-player__thumb { width: 32px; height: 32px; border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0; }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.mcr-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,20,.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.mcr-search-overlay[hidden] { display: none; }

.mcr-search-overlay__close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}
.mcr-search-overlay__close:hover { background: rgba(255,255,255,.3); }

.mcr-search-overlay .search-form {
  width: 100%;
  max-width: 600px;
  display: flex;
  gap: var(--space-2);
}

.mcr-search-overlay .search-field {
  flex: 1;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-xl);
  border: none;
  border-radius: var(--radius-lg);
  background: white;
  color: var(--color-text-primary);
  min-height: 56px;
  font-family: var(--font-body);
}

.mcr-search-overlay .search-submit {
  padding: var(--space-4) var(--space-6);
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-lg);
  font-size: var(--text-base);
  font-weight: var(--fw-semi);
  min-height: 56px;
  transition: background var(--transition-fast);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.mcr-search-overlay .search-submit:hover { background: var(--color-primary-dark); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.mcr-toasts {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  max-width: calc(100vw - var(--space-12));
}

.mcr-toast {
  background: var(--color-text-primary);
  color: white;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  opacity: 0;
  transform: translateY(8px);
  animation: toastIn 250ms ease-out forwards;
}
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   PAGINATION
   ============================================================ */
.mcr-pagination {
  padding: var(--space-8) var(--space-6);
  display: flex;
  justify-content: center;
}
.mcr-pagination__list {
  display: flex;
  gap: var(--space-1);
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
}
.mcr-pagination__list a,
.mcr-pagination__list .current {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.mcr-pagination__list a:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  text-decoration: none;
}
.mcr-pagination__list .current {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.mcr-footer {
  background: var(--color-sidebar-bg);
  color: rgba(255,255,255,.7);
  padding: var(--space-12) var(--space-6) var(--space-6);
}

.mcr-footer__inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .mcr-footer__inner { grid-template-columns: 2fr 3fr; }
}
@media (min-width: 1100px) {
  .mcr-footer__inner { grid-template-columns: 1.5fr 3fr 2fr; align-items: start; }
}

.mcr-footer__site-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: white;
}
.mcr-footer__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.5);
  margin-top: var(--space-2);
  line-height: var(--leading-relaxed);
}
.mcr-footer__logo img { height: 40px; width: auto; }

.mcr-footer__widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-6);
}

.mcr-footer__nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  list-style: none;
}
.mcr-footer__nav-list a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  transition: color var(--transition-fast);
}
.mcr-footer__nav-list a:hover { color: white; text-decoration: none; }

.mcr-footer__bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,.1);
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,.4);
}
.mcr-footer__copy a,
.mcr-footer__credits a { color: rgba(255,255,255,.6); }
.mcr-footer__copy a:hover,
.mcr-footer__credits a:hover { color: white; text-decoration: none; }

.widget-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: rgba(255,255,255,.8);
  margin-bottom: var(--space-3);
}

/* ============================================================
   ENTRY CONTENT (WP defaults)
   ============================================================ */
.entry-content ul,
.entry-content ol { padding-left: var(--space-6); margin-bottom: var(--space-5); }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: var(--space-2); line-height: var(--leading-relaxed); }

.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: var(--space-6); font-size: var(--text-sm); }
.entry-content th,
.entry-content td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--color-border); }
.entry-content th { font-weight: var(--fw-semi); background: var(--color-surface-2); }

.entry-content code {
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: .875em;
}
.entry-content pre {
  background: var(--color-sidebar-bg);
  color: white;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--space-5);
}
.entry-content pre code { background: none; border: none; padding: 0; color: inherit; }

/* ============================================================
   ARCHIVE PAGE
   ============================================================ */
.mcr-archive {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-6);
  width: 100%;
}

.mcr-archive__header {
  padding: var(--space-8) 0 var(--space-6);
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--space-6);
}

.mcr-archive__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--fw-black);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.mcr-archive__desc {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

.mcr-archive__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 640px) {
  .mcr-archive__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .mcr-archive__grid { grid-template-columns: 1fr 1fr 1fr; }
}

.mcr-no-posts {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

.mcr-search-term {
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

.mcr-empty-state {
  text-align: center;
  padding: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.mcr-skeleton {
  background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-border) 50%, var(--color-surface-2) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mcr-skeleton { animation: none; background: var(--color-surface-2); }
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

/* Tablet (768px) */
@media (max-width: 1023px) {
  .mcr-single-layout {
    padding: var(--space-4);
  }

  /* Archive/page sidebar layout: stack on tablet */
  .mcr-with-sidebar {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {

  /* Header */
  .mcr-header__inner {
    padding: 0 var(--space-4);
    gap: var(--space-3);
    height: 56px;
  }

  .mcr-header__nav {
    /* Hidden on mobile — toggled by hamburger */
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--color-sidebar-bg);
    padding: var(--space-4);
    z-index: calc(var(--z-header) - 1);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    display: none;
    border-top: 1px solid rgba(255,255,255,.1);
  }

  .mcr-header__nav.is-open {
    display: block;
  }

  .mcr-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }

  .mcr-nav__list li a {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-md);
  }

  /* Show hamburger */
  .mcr-header__hamburger {
    display: flex;
  }

  /* Hero */
  .mcr-hero {
    margin: var(--space-4);
    border-radius: var(--radius-lg);
    min-height: 260px;
  }
  .mcr-hero__content { padding: var(--space-5); }

  /* Grid */
  .mcr-grid {
    padding: 0 var(--space-4) var(--space-6);
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  /* Single post layout */
  .mcr-single-wrap {
    padding: 0 var(--space-4) var(--space-8);
  }
  .mcr-single-wrap.has-hero {
    margin-top: -80px;
  }
  .mcr-single-hero {
    height: 280px;
  }

  /* Sidebar mobile handled entirely by plugin CSS (icon rail) */

  /* Article content padding */
  .mcr-article__header,
  .mcr-article__content,
  .mcr-related,
  .mcr-comments-wrap,
  .mcr-breadcrumb {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .mcr-article__title {
    font-size: var(--text-2xl);
  }

  /* Comment content indent — remove on small screens */
  .mcr-comment__content,
  .mcr-comment__footer {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .mcr-comment-form__row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .mcr-footer {
    padding: var(--space-8) var(--space-4) var(--space-4);
  }

  .mcr-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .mcr-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  /* Toasts */
  .mcr-toasts {
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
  }

  /* Card layout stacked on very small screens */
  .mcr-card--featured {
    flex-direction: column;
  }
  .mcr-card__image-link {
    width: 100%;
    height: 160px;
  }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .mcr-header,
  .mcr-single-sidebar,
  .mcr-article__actions,
  .mcr-footer,
  .mcr-btn-icon { display: none !important; }

  .mcr-single-layout { display: block; }
  .mcr-article__content { font-size: 12pt; line-height: 1.5; color: black; }
}