/* draft-preview.css — Réplique fidèle de site/styles.css pour la preview interne */

/* === DESIGN TOKENS (copiés de site/styles.css) === */
:root {
  --paper: #f1dfbd;
  --paper-deep: #e4c99a;
  --paper-light: #fbf0d4;
  --ink: #1e1812;
  --ink-soft: #4b3a2b;
  --muted: #705c43;
  --rule: #7e6348;
  --rule-soft: rgba(77, 52, 31, 0.28);
  --red: #9f221d;
  --red-dark: #761712;
  --shadow-ink: rgba(43, 26, 10, 0.15);
  --page-width: 1180px;
  --gutter: clamp(14px, 2vw, 26px);
  --serif: Georgia, "Times New Roman", Times, serif;
  --display: "Times New Roman", Georgia, serif;
  --utility: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }

html {
  background: #211811;
  color: var(--ink);
}

body {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.5;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,246,214,0.42), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(126,82,42,0.2), transparent 30%),
    linear-gradient(135deg, #3a281c, #15100b);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(43,26,10,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,26,10,0.05) 1px, transparent 1px);
  background-size: 7px 7px, 11px 11px;
  mix-blend-mode: multiply;
}

.private-preview-notice {
  position: relative;
  z-index: 140;
  margin: 0;
  padding: 5px 12px;
  background: var(--red);
  color: var(--paper-light);
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

img { display: block; max-width: 100%; }

/* === NEWSPAPER PAGE === */
.newspaper-page {
  width: min(var(--page-width), calc(100% - 20px));
  margin: 10px auto;
  padding: clamp(16px, 3vw, 34px);
  background:
    linear-gradient(rgba(255,255,255,0.12), rgba(78,49,21,0.06)),
    radial-gradient(circle at 20% 20%, rgba(255,250,222,0.65), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(140,88,42,0.18), transparent 24%),
    var(--paper);
  border: 1px solid #c9a36e;
  box-shadow: 0 22px 70px rgba(0,0,0,0.34);
}

/* === MASTHEAD === */
.masthead {
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  padding: 8px 0 10px;
}

.masthead__topline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-family: var(--utility);
  font-size: clamp(0.66rem, 1.5vw, 0.82rem);
  font-weight: 700;
  text-transform: uppercase;
}
.masthead__topline > :first-child { justify-self: start; }
.masthead__topline > :nth-child(2) { justify-self: center; }
.masthead__topline > :last-child { justify-self: end; }

.masthead__main {
  display: grid;
  grid-template-columns: minmax(100px, 150px) 1fr minmax(100px, 150px);
  gap: var(--gutter);
  align-items: center;
  margin: 14px 0 12px;
}

.masthead__title-block { text-align: center; }

.masthead h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  font-weight: 900;
  line-height: 0.82;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 1px 1px 0 rgba(255,247,219,0.65);
}
.masthead-title span {
  display: inline;
}
.masthead-title__red { color: var(--red); }
.masthead-title__small,
.masthead-title__main { color: var(--ink); }

.masthead__title-block p {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--utility);
  font-size: clamp(0.95rem, 2.2vw, 1.4rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* AI Credit & Pixel Stamp */
.ai-credit, .pixel-stamp {
  min-height: 108px;
  padding: 10px;
  border: 2px solid var(--rule);
  background: rgba(255,244,211,0.48);
  text-align: center;
  overflow-wrap: anywhere;
}
.ai-credit span, .ai-credit em, .pixel-stamp span {
  display: block; color: var(--ink-soft); font-size: 0.76rem;
}
.ai-credit strong, .pixel-stamp strong {
  display: block; margin: 6px 0; color: var(--ink); font-size: 1.25rem; line-height: 1.05;
}
.ai-credit em {
  color: var(--red); font-family: var(--utility); font-style: normal; font-weight: 700;
}

.pixel-stamp {
  border-radius: 50% 50% 10px 10px / 22% 22% 10px 10px;
  position: relative;
}
.pixel-stamp__avatar {
  width: 52px; height: 52px; margin: 0 auto 4px;
  display: grid; place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink); border-radius: 50%;
  color: var(--paper-light); background: var(--ink);
  font-family: var(--utility); font-weight: 900; font-size: 0.9rem;
}
.pixel-stamp__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.pixel-stamp__avatar--fallback {
  overflow: visible;
}

/* Edition Meta */
.edition-meta {
  display: flex; justify-content: space-between; gap: 12px;
  padding-top: 8px; border-top: 1px solid var(--ink);
  font-family: var(--utility);
  font-size: clamp(0.66rem, 1.5vw, 0.82rem);
  font-weight: 700; text-transform: uppercase;
}
.edition-meta time { color: var(--red); }

.edition-archives {
  display: grid;
  grid-template-columns: minmax(88px, auto) 1fr minmax(88px, auto);
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--utility);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.edition-archives a { color: var(--red-dark); text-decoration: none; border-bottom: 2px solid transparent; }
.edition-archives a:hover, .edition-archives a:focus-visible { border-bottom-color: var(--red); }
.edition-archives a[aria-disabled="true"] { color: var(--muted); pointer-events: none; opacity: 0.52; }
.edition-archives__select {
  width: min(100%, 520px); max-width: 520px; justify-self: center;
  padding: 5px 8px; border: 1px solid var(--rule-soft);
  background: rgba(255, 250, 227, 0.5); color: var(--ink);
  font-family: var(--utility); font-size: 0.78rem; font-weight: 700; cursor: pointer;
}
.manifesto-link-wrap { margin: 12px 0 2px; text-align: center; }
.manifesto-link {
  display: inline-block; padding: 4px 16px;
  border: 2px double var(--red); background: rgba(199, 45, 59, 0.06);
  color: var(--red-dark); font-family: var(--display); font-size: 0.85rem;
  font-weight: 900; letter-spacing: 0.05em; text-decoration: none;
  text-transform: uppercase; transform: rotate(-0.5deg);
}

/* Draft stamp bar (preview-specific) */
.draft-stamp-bar {
  text-align: center; margin-top: 10px;
}
.draft-stamp {
  display: inline-block;
  padding: 6px 14px;
  color: var(--red);
  border: 2px double var(--red);
  font-family: var(--display);
  font-size: 1.1rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.05em;
  transform: rotate(-1deg);
  box-shadow: 2px 2px 0 rgba(199,45,59,0.15);
}

/* === LAYOUT GRID (SECTION 1: TOP) === */
.layout-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.85fr) minmax(0, 1.8fr) minmax(200px, 0.9fr);
  gap: var(--gutter);
  margin-top: 18px;
}

.side-column { display: grid; align-content: start; gap: 16px; }

/* === SECTION LABEL === */
.section-label {
  width: max-content; max-width: 100%;
  margin: 0 0 10px; padding: 3px 8px;
  color: var(--paper-light); background: var(--red); border: 1px solid var(--red-dark);
  font-family: var(--utility); font-size: 0.75rem; font-weight: 900;
  line-height: 1.1; text-transform: uppercase;
}

/* === CARD STYLES === */
.editorial-card, .daily-number, .pixel-note, .notebook-card, .quote-block, .nav-list-card {
  border: 1px solid var(--rule-soft);
  background: rgba(255,246,218,0.48);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset;
}
.editorial-card, .daily-number, .pixel-note, .nav-list-card { padding: 14px; }
.editorial-card h2, .pixel-note h2 {
  margin: 0 0 10px; font-size: clamp(1.05rem, 2.2vw, 1.42rem); line-height: 1.05;
}
.editorial-card p, .pixel-note p { margin: 0 0 10px; }
.module--utility p:not(.section-label) { font-size: 1.03rem; line-height: 1.46; }
.signature {
  color: var(--red); font-family: var(--utility); font-weight: 700; text-align: right;
}

/* Detail link / Read more */
.detail-link {
  display: inline-block; margin-top: 4px; padding: 0;
  border: 0; border-bottom: 2px solid var(--red);
  background: transparent; color: var(--red-dark);
  font-family: var(--utility); font-size: 0.74rem; font-weight: 900;
  line-height: 1.3; text-transform: uppercase; cursor: pointer; text-decoration: none;
}
.detail-link:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* Daily Number */
.daily-number strong {
  display: block; color: var(--red); font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 5.8rem); line-height: 0.9;
}
.daily-number span { display: block; color: var(--ink-soft); font-style: italic; font-weight: 700; }

/* Hero Story (Prominent & Strong QG of the frontpage) */
.hero-story {
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--rule-soft);
  background: linear-gradient(rgba(255,250,227,0.88), rgba(244,222,181,0.64)), var(--paper-light);
  box-shadow: 0 12px 30px var(--shadow-ink);
}
.hero-story__stamp {
  width: max-content; max-width: 100%;
  margin: 0 auto 18px auto; padding: 6px 14px;
  color: var(--red); background: transparent; border: 2px double var(--red);
  font-family: var(--display); font-size: 1.15rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.05em;
  transform: rotate(-1deg); box-shadow: 2px 2px 0 rgba(199,45,59,0.15);
}
.hero-story__title-main {
  margin: 0 0 14px 0; color: var(--ink); font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 2.75rem); line-height: 0.9;
  text-align: center; text-transform: uppercase; text-wrap: balance;
  text-shadow: 1px 1px 0 rgba(255, 247, 219, 0.7);
}
.hero-story__title-main::after {
  content: ""; display: block; width: min(320px, 70%); height: 5px;
  margin: 16px auto 0; background: var(--red);
}
.hero-story__dek {
  max-width: 750px; margin: 18px auto;
  color: var(--ink-soft); font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 700; line-height: 1.35; text-align: center;
}
.hero-story__body {
  color: var(--ink); font-size: 1.1rem; line-height: 1.55;
  text-align: justify;
}
.hero-story__body p { margin: 0 0 14px; }

/* Brief List */
.brief-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.brief-list li { padding-bottom: 10px; border-bottom: 1px solid var(--rule-soft); }
.brief-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.brief-list strong, .brief-list span { display: block; }
.brief-list strong { color: var(--ink); font-size: 0.95rem; text-transform: uppercase; }
.brief-list span { color: var(--ink-soft); font-size: 0.93rem; }
.brief-list--compact { list-style: disc; padding-left: 18px; }
.brief-list--compact li { border-bottom: 0; padding-bottom: 4px; }

/* Notebook card */
.notebook-card {
  padding: 16px 16px 18px;
  background:
    linear-gradient(90deg, rgba(128,31,23,0.15) 1px, transparent 1px) 30px 0 / 100% 100%,
    repeating-linear-gradient(0deg, rgba(94,64,39,0.15), rgba(94,64,39,0.15) 1px, transparent 1px, transparent 28px),
    rgba(255, 246, 218, 0.58);
}
.notebook-card ul { margin: 0 0 14px; padding: 0 0 0 22px; }
.notebook-card li { margin: 8px 0; font-size: 1.02rem; line-height: 1.42; }
.notebook-card li::marker { color: var(--red); content: "✓ "; font-weight: 900; }
.notebook-card strong { color: var(--red); font-family: var(--utility); font-size: 0.78rem; text-transform: uppercase; }

/* SECTION 2: SECONDARY GRID (Modules spéciaux & soutien) */
.lower-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter); margin-top: var(--gutter);
  padding-top: var(--gutter); border-top: 2px solid var(--ink);
}
.lower-grid[hidden], .footer-modules-grid[hidden], .classifieds-grid[hidden] { display: none; }
.lower-grid[data-columns="1"], .footer-modules-grid[data-columns="1"] { grid-template-columns: minmax(0, 1fr); }
.lower-grid[data-columns="2"], .footer-modules-grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* === SECTION 3: PETITES ANNONCES (CLASSIFIEDS) === */
.classifieds-grid {
  margin-top: var(--gutter);
  padding-top: var(--gutter);
  border-top: 2px solid var(--ink);
}
.classifieds-card {
  padding: 18px;
  border: 1px dashed var(--rule);
  background: rgba(255, 244, 211, 0.4);
  font-family: var(--utility);
}
.classifieds-card h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  text-align: center;
  text-transform: uppercase;
  margin: 0 0 16px 0;
  color: var(--red);
  border-bottom: 2px double var(--rule-soft);
  padding-bottom: 8px;
}
.classifieds-card__items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 768px) {
  .classifieds-card__items {
    grid-template-columns: 1fr;
  }
}
.classifieds-item {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--ink-soft);
  padding: 12px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px dotted var(--rule-soft);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* === SECTION 4: FOOTER GRID (3-column grid for navigation & quote) === */
.footer-modules-grid {
  margin-top: var(--gutter);
  padding-top: var(--gutter);
  border-top: 2px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.hero-image-button {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  border: 1px solid var(--rule-soft); background: transparent;
  color: var(--paper-light); cursor: zoom-in;
}
.hero-image-button img { display: block; width: 100%; height: auto; transition: transform 0.25s ease; }
.hero-image-button span {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 8px;
  background: rgba(30, 24, 18, 0.78); font-family: var(--utility);
  font-size: 0.68rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase;
}
.hero-image-button:hover img, .hero-image-button:focus-visible img { transform: scale(1.015); }
.hero-image-button:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Quote banner styling (premium quote final) */
.quote-block {
  margin: 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(159, 34, 29, 0.05), rgba(126, 82, 42, 0.08));
  border: 2px double var(--red);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100%;
}
.quote-block p {
  margin: 0 0 10px 0;
  color: var(--red-dark);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.25;
}
.quote-block p::before { content: "\201C"; color: var(--red); font-family: var(--display); font-size: 1.8rem; }
.quote-block p::after { content: "\201D"; color: var(--red); font-family: var(--display); font-size: 1.8rem; }
.quote-block cite { color: var(--ink-soft); font-family: var(--utility); font-size: 0.74rem; text-transform: uppercase; font-weight: bold; }

/* Navigation list cards */
.nav-list-card {
  background: rgba(255, 244, 211, 0.3);
  border: 1px solid var(--rule-soft);
}
.nav-list-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-item-block {
  border-bottom: 1px dotted var(--rule-soft);
  padding-bottom: 8px;
}
.nav-item-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.nav-item-title {
  font-weight: 900;
  color: var(--red-dark);
  font-family: var(--display);
  font-size: 1.06rem;
  margin-bottom: 2px;
}
.nav-item-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--rule-soft);
}
.nav-item-title a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}
.nav-item-body {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* Footer */
.newspaper-footer {
  display: flex; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 10px; border-top: 3px double var(--ink);
  color: var(--ink); font-family: var(--utility);
  font-size: clamp(0.72rem, 1.6vw, 0.9rem); font-weight: 900;
  text-align: center; text-transform: uppercase;
}
.newspaper-footer p { margin: 0; }
.newspaper-footer a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px dashed var(--rule-soft); }

/* === MODAL === */
.detail-modal[hidden] { display: none; }
.detail-modal {
  position: fixed; z-index: 10; inset: 0;
  display: grid; place-items: center; padding: 18px;
}
.detail-modal__backdrop {
  position: absolute; inset: 0; background: rgba(25,17,10,0.66);
}
.detail-modal__panel {
  position: relative; width: min(680px, 100%);
  max-height: min(78vh, 720px); overflow: auto;
  padding: clamp(16px, 2.4vw, 26px);
  border: 3px double var(--ink);
  background: radial-gradient(circle at 12% 0%, rgba(255,250,222,0.78), transparent 30%), var(--paper-light);
  box-shadow: 0 22px 70px rgba(0,0,0,0.42);
}
.detail-modal__panel h2 {
  margin: 0 34px 14px 0; font-family: var(--display);
  font-size: clamp(1.45rem, 3.6vw, 2.35rem); line-height: 1.02; text-transform: uppercase;
}
.detail-modal__content p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(0.96rem, 1.8vw, 1.04rem);
  line-height: 1.52;
  white-space: pre-line;
  text-align: justify;
}
.detail-modal__close {
  position: absolute; top: 10px; right: 10px;
  width: 34px; height: 34px; border: 2px solid var(--ink);
  color: var(--paper-light); background: var(--ink);
  font-family: var(--utility); font-size: 1.35rem; font-weight: 900;
  line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.detail-modal__close:hover { background: var(--red); border-color: var(--red); }
.detail-modal--image .detail-modal__panel { width: min(1200px, 96vw); max-height: 94vh; background: #17110d; }
.detail-modal--image .detail-modal__panel h2 { color: var(--paper-light); font-size: 1rem; font-family: var(--utility); }
.detail-modal--image .detail-modal__content img {
  display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; object-fit: contain;
}

/* === PREVIEW-SPECIFIC ADDITIONS === */

/* Lab bar — discret, style atelier */
.lab-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 14px; gap: 12px; flex-wrap: wrap;
  background: var(--ink); color: var(--paper-light);
  font-family: var(--utility); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.lab-bar__tag { color: var(--red); letter-spacing: 0.05em; }
.lab-bar__controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lab-bar .detail-link { color: var(--paper-light); border-bottom-color: var(--rule); font-size: 0.68rem; }
.lab-bar .detail-link:hover { color: white; border-bottom-color: var(--red); }
.lab-select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--paper-light);
}
.lab-select-label span {
  color: var(--paper-deep);
}
.lab-select {
  max-width: min(52vw, 300px);
  border: 1px solid var(--rule);
  background: #2b1e15;
  color: var(--paper-light);
  font-family: var(--utility);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}
.lab-bar__message {
  color: var(--paper-deep);
  font-size: 0.64rem;
  text-transform: none;
}
.lab-bar__message.is-warning {
  max-width: min(100%, 620px);
  padding: 3px 6px;
  border: 1px solid var(--red);
  color: var(--paper-light);
  background: rgba(178, 47, 39, 0.28);
}

/* Metadata panel */
.lab-metadata {
  width: min(var(--page-width), calc(100% - 20px));
  margin: 20px auto; font-family: var(--utility); font-size: 0.78rem;
}
.lab-metadata__body {
  border: 1px solid var(--rule-soft); background: var(--paper-light);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.lab-metadata__row {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  border-bottom: 1px dotted var(--rule-soft); padding-bottom: 6px;
}
.lab-metadata__row:last-child { border-bottom: 0; padding-bottom: 0; }
.lab-badge { padding: 1px 6px; font-weight: 900; }
.lab-badge--draft { color: var(--red); border: 1px solid var(--red); background: rgba(159,34,29,0.08); }

/* Metrics badges (annotations de rédaction) */
.metrics-badge {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: var(--utility); font-size: 0.62rem; color: var(--muted);
  border-top: 1px dotted var(--rule-soft); padding-top: 5px; margin-top: 6px;
}
.metrics-ok { color: #3a6e3a; }
.metrics-alert { color: var(--red); font-weight: 900; }

/* Special module markers and style borders */
.module--special {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.module--special:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-ink);
}

/* Unmapped modules indicator */
.unmapped-warning {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--utility);
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--red);
  border: 1px dashed var(--red);
  background: rgba(159, 34, 29, 0.05);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Visual Illustration Placeholder (Stylized QG template) */
.image-placeholder {
  border: 2px dotted var(--rule);
  background: radial-gradient(circle at 50% 50%, rgba(228, 201, 154, 0.45), rgba(241, 223, 189, 0.25));
  padding: clamp(14px, 3vw, 24px);
  text-align: center;
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 4px;
  box-shadow: inset 0 0 10px rgba(77, 52, 31, 0.05);
}
.image-placeholder__tag {
  background: var(--red);
  color: var(--paper-light);
  font-family: var(--utility);
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
}
.image-placeholder__title {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: bold;
}
.image-placeholder__prompt {
  font-family: var(--serif);
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: 600px;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.25);
  padding: 8px 12px;
  border-left: 2px solid var(--rule);
  text-align: justify;
}

/* Expandable Content Styling */
.expandable-content {
  animation: slideDown 0.3s ease-out forwards;
  overflow: hidden;
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 1000px; }
}

/* === LECTURE vs REVIEW MODE TOGGLING === */
.mode-lecture .metrics-badge,
.mode-lecture .lab-metadata,
.mode-lecture .unmapped-warning,
.mode-lecture .draft-stamp-bar,
.mode-lecture .unmapped-grid {
  display: none !important;
}

.mode-review .metrics-badge,
.mode-review .lab-metadata,
.mode-review .unmapped-warning,
.mode-review .draft-stamp-bar {
  display: block !important;
}

/* Unmapped Grid in Review mode */
.mode-review .unmapped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gutter);
  margin-top: var(--gutter);
  padding: 16px;
  border: 2px dashed var(--red);
  background: rgba(159, 34, 29, 0.05);
}

/* === RESPONSIVE (from public site) === */
@media (max-width: 920px) {
  .layout-grid, .lower-grid, .footer-modules-grid { grid-template-columns: 1fr; }
  .masthead__main {
    grid-template-columns: minmax(92px, 118px) minmax(0, 1fr) minmax(92px, 118px);
    gap: 10px;
    margin: 10px 0;
  }
  .masthead__title-block {
    min-width: 0;
    text-align: center;
  }
  .masthead h1 {
    font-size: clamp(2.1rem, 8.8vw, 4rem);
  }
  .masthead-title span {
    display: block;
  }
  .masthead-title__small {
    font-size: 0.55em;
    line-height: 0.95;
  }
  .masthead-title__red,
  .masthead-title__main {
    line-height: 0.83;
  }
  .masthead__title-block p {
    font-size: clamp(0.7rem, 1.8vw, 0.95rem);
    letter-spacing: 0.06em;
  }
  .ai-credit, .pixel-stamp {
    min-height: 0;
    padding: 8px 6px;
  }
  .ai-credit strong, .pixel-stamp strong {
    font-size: 0.86rem;
  }
  .ai-credit span, .ai-credit em, .pixel-stamp span {
    font-size: 0.63rem;
  }
  .side-column--left { order: 2; }
  .side-column--left + section { order: 1; }
  .side-column--right { order: 3; }
  .hero-story__body { column-count: 1; }
}

@media (max-width: 640px) {
  .newspaper-page { width: 100%; margin: 0; padding: 14px; border-left: 0; border-right: 0; }
  .detail-modal { z-index: 200; align-items: end; padding: 8px; }
  .detail-modal__panel {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 18px 16px 22px;
  }
  .detail-modal__content p { font-size: 1rem; line-height: 1.5; text-align: left; }
  .detail-modal__close { width: 42px; height: 42px; top: 8px; right: 8px; }
  .detail-modal--image .detail-modal__panel { max-height: 96vh; max-height: 96dvh; }
  .newspaper-footer { display: grid; justify-content: stretch; text-align: center; }
  .lab-bar { align-items: flex-start; gap: 8px; }
  .lab-bar__controls { width: 100%; gap: 8px; }
  .lab-select-label { width: 100%; justify-content: space-between; }
  .lab-select { flex: 1; max-width: none; min-width: 0; }
  .lab-bar__message { width: 100%; }
  .masthead { padding-top: 6px; }
  .masthead__topline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    text-align: center;
    font-size: 0.55rem;
    line-height: 1.1;
  }
  .masthead__topline > * { justify-self: center !important; }
  .masthead__topline span:not(:last-child)::after {
    content: " ·";
    color: var(--red);
  }
  .masthead h1 {
    font-size: clamp(2.65rem, 18vw, 4.15rem);
    line-height: 0.82;
    text-align: center;
  }
  .masthead-title__small {
    font-size: 0.5em;
    line-height: 0.95;
  }
  .masthead-title__red,
  .masthead-title__main {
    line-height: 0.82;
  }
  .masthead__main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "credit"
      "pixel";
    justify-items: center;
    gap: 5px;
    margin: 6px 0;
  }
  .masthead__title-block {
    grid-area: title;
    width: 100%;
    text-align: center;
  }
  .masthead__title-block p {
    max-width: 34rem;
    margin-inline: auto;
    font-size: 0.66rem;
    line-height: 1.15;
    letter-spacing: 0.05em;
  }
  .ai-credit {
    grid-area: credit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    max-width: 360px;
    min-height: 0;
    padding: 3px 8px;
    border-style: dashed;
    line-height: 1.05;
  }
  .ai-credit span { font-size: 0.55rem; }
  .ai-credit em { display: none; }
  .ai-credit strong { margin: 0; font-size: 0.68rem; }
  .pixel-stamp {
    grid-area: pixel;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    max-width: 100%;
    min-height: 0;
    padding: 3px 8px;
    border-style: dashed;
    border-radius: 999px;
  }
  .pixel-stamp strong { margin: 0; font-size: 0.64rem; }
  .pixel-stamp__avatar { width: 24px; height: 24px; margin: 0; font-size: 0.52rem; }
  .pixel-stamp span { display: none; }
  .edition-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 2px 8px;
    padding-top: 5px;
    font-size: 0.56rem;
    line-height: 1.12;
  }
  .edition-meta time {
    flex-basis: 100%;
  }
  .edition-meta span:not(:last-child)::after {
    content: " ·";
    color: var(--red);
  }
  .newspaper-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 8px;
    font-size: 0.58rem;
    line-height: 1.15;
  }
  .newspaper-footer p:not(:last-child)::after {
    content: " ·";
    color: var(--red);
  }
  .hero-story h2 { font-size: clamp(1.42rem, 6.8vw, 1.65rem); }
  .detail-modal { padding: 12px; }
  .detail-modal__panel { max-height: 82vh; }
}

@media (max-width: 480px) {
  .masthead h1 {
    font-size: clamp(2.35rem, 17vw, 3.6rem);
  }
  .masthead__title-block p {
    font-size: 0.58rem;
  }
  .ai-credit {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .ai-credit span,
  .ai-credit em {
    flex: 0 0 auto;
  }
  .ai-credit strong {
    flex: 0 0 auto;
  }
  .masthead__topline {
    font-size: 0.5rem;
    gap: 2px 6px;
  }
  .edition-meta {
    font-size: 0.51rem;
    gap: 2px 6px;
  }
  .newspaper-footer {
    font-size: 0.52rem;
    gap: 2px 6px;
  }
}
