/**
 * Editorial Lab - Experimental Design System
 *
 * A warm, archive-style aesthetic with serif typography and metadata-first design.
 * ALL selectors MUST be scoped under .editorial-lab to prevent CSS bleed.
 *
 * Token naming convention: --ed-*
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */

.editorial-lab {
  /* Colours - Warm, archive-style palette */
  --ed-bg: #f3eedf;
  --ed-bg-alt: #ebe5d3;
  --ed-text: #24211d;
  --ed-text-muted: #5c5650;
  --ed-accent: #c86a57;
  --ed-accent-hover: #a85545;
  --ed-border: #d4cdb8;
  --ed-border-light: #e5dfd0;
  --ed-border-dark: #b8ad96;

  /* Typography */
  --ed-font-serif: 'Cormorant', 'Georgia', serif;
  --ed-font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Spacing Scale */
  --ed-space-xs: 0.25rem;
  --ed-space-sm: 0.5rem;
  --ed-space-md: 1rem;
  --ed-space-lg: 1.5rem;
  --ed-space-xl: 2rem;
  --ed-space-2xl: 3rem;
  --ed-space-3xl: 4rem;

  /* Layout */
  --ed-max-width: 1200px;
  --ed-content-width: 65ch;
  --ed-sidebar-width: 220px;
  --ed-rail-width: 180px;

  /* Transitions */
  --ed-transition: 150ms ease-in-out;

  /* Image Frame Tokens (Eames-inspired, warm adaptation) */
  --ed-frame: var(--ed-text);
  --ed-matte: var(--ed-bg-alt);
  --ed-caption-size: 0.625rem;
  --ed-caption-tracking: 0.15em;

  /* Tag Tokens */
  --ed-tag-height: 2.125rem;
  --ed-tag-pad-x: 0.75rem;
  --ed-tag-gap: 0.5rem;
  --ed-tag-radius: 0.125rem;
  --ed-tag-bg: var(--ed-bg-alt);
  --ed-tag-bg-subtle: color-mix(in oklab, var(--ed-bg-alt) 80%, white);
  --ed-tag-bg-active: var(--ed-text);
  --ed-tag-bg-accent: color-mix(in oklab, var(--ed-accent) 14%, var(--ed-bg-alt));
  --ed-tag-text: var(--ed-text-muted);
  --ed-tag-text-strong: var(--ed-text);
  --ed-tag-text-inverse: var(--ed-bg);
  --ed-tag-border: var(--ed-border);
  --ed-tag-border-strong: var(--ed-border-dark);
  --ed-tag-border-accent: color-mix(in oklab, var(--ed-accent) 35%, var(--ed-border));

  /* Apply base styles */
  background-color: var(--ed-bg);
  color: var(--ed-text);
  font-family: var(--ed-font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Skip Link (Accessibility)
   ========================================================================== */

.editorial-lab .ed-skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--ed-accent);
  color: white;
  padding: var(--ed-space-sm) var(--ed-space-md);
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 4px 4px;
}

.editorial-lab .ed-skip-link:focus {
  top: 0;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.editorial-lab .ed-shell {
  max-width: var(--ed-max-width);
  margin-inline: auto;
  padding-inline: var(--ed-space-lg);
}

.editorial-lab .ed-content {
  max-width: var(--ed-content-width);
}

.editorial-lab .ed-main {
  padding-block: var(--ed-space-2xl);
  min-height: calc(100vh - 200px);
}

/* ==========================================================================
   Typography
   ========================================================================== */

/* Page title - Large serif */
.editorial-lab .ed-title {
  font-family: var(--ed-font-serif);
  font-size: clamp(2.5rem, 2rem + 3vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ed-text);
  margin: 0 0 var(--ed-space-lg) 0;
}

/* Section title */
.editorial-lab .ed-section-title {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.75rem, 1.5rem + 1.5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ed-text);
  margin: var(--ed-space-2xl) 0 var(--ed-space-lg) 0;
}

/* Subtitle */
.editorial-lab .ed-subtitle {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.25rem, 1.125rem + 0.75vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ed-text-muted);
  margin: 0 0 var(--ed-space-md) 0;
}

/* Card/item title */
.editorial-lab .ed-item-title {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.375rem, 1.25rem + 0.75vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ed-text);
  margin: 0 0 var(--ed-space-sm) 0;
}

/* Introduction/lead text */
.editorial-lab .ed-intro {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ed-text-muted);
  margin: 0 0 var(--ed-space-xl) 0;
  max-width: var(--ed-content-width);
}

/* Kicker/eyebrow text */
.editorial-lab .ed-kicker {
  font-family: var(--ed-font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin: 0 0 var(--ed-space-sm) 0;
}

/* Label text (metadata) */
.editorial-lab .ed-label {
  font-family: var(--ed-font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  margin: 0 0 var(--ed-space-xs) 0;
}

/* Body text */
.editorial-lab .ed-body {
  font-family: var(--ed-font-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ed-text);
}

/* Small/caption text */
.editorial-lab .ed-small {
  font-family: var(--ed-font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ed-text-muted);
}

/* ==========================================================================
   Links
   ========================================================================== */

.editorial-lab .ed-link {
  color: var(--ed-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color var(--ed-transition);
}

.editorial-lab .ed-link:hover {
  color: var(--ed-accent-hover);
}

/* Link with arrow */
.editorial-lab .ed-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--ed-space-xs);
  color: var(--ed-accent);
  text-decoration: none;
  font-family: var(--ed-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  transition:
    gap var(--ed-transition),
    color var(--ed-transition);
}

.editorial-lab .ed-link-arrow::after {
  content: '\2192';
  transition: transform var(--ed-transition);
}

.editorial-lab .ed-link-arrow:hover {
  color: var(--ed-accent-hover);
  gap: var(--ed-space-sm);
}

.editorial-lab .ed-link-arrow:hover::after {
  transform: translateX(2px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.editorial-lab .ed-hero {
  padding: var(--ed-space-3xl) 0;
  border-bottom: 1px solid var(--ed-border);
  margin-bottom: var(--ed-space-2xl);
}

/* ==========================================================================
   Card Components
   ========================================================================== */

/* Base card */
.editorial-lab .ed-card {
  background: transparent;
  border-bottom: 1px solid var(--ed-border);
  padding: var(--ed-space-xl) 0;
}

.editorial-lab .ed-card:last-child {
  border-bottom: none;
}

/* Case study card - Three column layout */
.editorial-lab .ed-case {
  display: grid;
  grid-template-columns: var(--ed-sidebar-width) 1fr var(--ed-rail-width);
  gap: var(--ed-space-xl);
  padding: var(--ed-space-xl) 0;
  border-bottom: 1px solid var(--ed-border);
}

.editorial-lab .ed-case:last-child {
  border-bottom: none;
}

/* Case metadata column */
.editorial-lab .ed-case__meta {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-md);
}

/* Case body column */
.editorial-lab .ed-case__body {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-md);
}

.editorial-lab .ed-case__summary {
  color: var(--ed-text-muted);
  line-height: 1.7;
}

.editorial-lab .ed-case__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--ed-space-md);
}

/* Case rail column (decorative) */
.editorial-lab .ed-case__rail {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-sm);
}

/* Case card title link */
.editorial-lab .ed-case__title-link {
  color: var(--ed-text);
  text-decoration: none;
  transition: color var(--ed-transition);
}

.editorial-lab .ed-case__title-link:hover {
  color: var(--ed-accent);
}

/* Case card hover state */
.editorial-lab .ed-case {
  transition: background-color var(--ed-transition);
}

.editorial-lab .ed-case:hover {
  background-color: var(--ed-bg-alt);
}

.editorial-lab .ed-case:hover .ed-rail-block {
  background: var(--ed-accent);
  opacity: 0.15;
}

/* Portfolio list container */
.editorial-lab .ed-portfolio-list {
  padding: var(--ed-space-xl) 0;
}

.editorial-lab .ed-portfolio-list__header {
  margin-bottom: var(--ed-space-xl);
  padding-bottom: var(--ed-space-lg);
  border-bottom: 2px solid var(--ed-border-dark);
}

.editorial-lab .ed-portfolio-list__header .ed-section-title {
  margin-top: 0;
  margin-bottom: var(--ed-space-sm);
}

.editorial-lab .ed-portfolio-list__header .ed-intro {
  margin-bottom: 0;
}

.editorial-lab .ed-portfolio-list__items {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Rail Decorations
   ========================================================================== */

.editorial-lab .ed-rail-block {
  width: 100%;
  height: 60px;
  background: var(--ed-bg-alt);
  border: 1px solid var(--ed-border);
}

.editorial-lab .ed-rail-note {
  font-family: var(--ed-font-sans);
  font-size: 0.6875rem;
  color: var(--ed-text-muted);
  font-style: italic;
}

/* ==========================================================================
   Eames-Inspired Image System
   ========================================================================== */

/* Base image frame - warm archival aesthetic */
.editorial-lab .ed-image {
  background: var(--ed-matte);
  border: 1px solid var(--ed-border);
  padding: var(--ed-space-xs);
}

.editorial-lab .ed-image__inner {
  border: 1px solid var(--ed-border-dark);
  overflow: hidden;
  background: var(--ed-bg);
}

.editorial-lab .ed-image img {
  display: block;
  width: 100%;
  height: 100%;
  transition:
    filter var(--ed-transition),
    transform var(--ed-transition);
}

/* Detail variant: 1:1 square, grayscale default (artifacts, specimens) */
.editorial-lab .ed-image--detail .ed-image__inner {
  aspect-ratio: 1;
}

.editorial-lab .ed-image--detail img {
  -o-object-fit: cover;
     object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
}

.editorial-lab .ed-image--detail:hover img {
  filter: grayscale(0%) contrast(1);
}

/* Blueprint variant: Wide panoramic (service maps, journey maps) */
.editorial-lab .ed-image--blueprint .ed-image__inner {
  aspect-ratio: 21/9;
}

.editorial-lab .ed-image--blueprint img {
  -o-object-fit: contain;
     object-fit: contain;
  background: var(--ed-bg);
  padding: var(--ed-space-lg);
}

/* Action variant: 3:2 ratio (workshop photos, process shots) */
.editorial-lab .ed-image--action .ed-image__inner {
  aspect-ratio: 3/2;
}

.editorial-lab .ed-image--action img {
  -o-object-fit: cover;
     object-fit: cover;
  filter: grayscale(100%) contrast(1.1) brightness(0.95);
}

.editorial-lab .ed-image--action:hover img {
  filter: grayscale(0%) contrast(1) brightness(1);
}

/* Technical caption with figure reference */
.editorial-lab .ed-image__caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--ed-space-xs) var(--ed-space-xs) 0;
  font-family: var(--ed-font-sans);
  font-size: var(--ed-caption-size);
  text-transform: uppercase;
  letter-spacing: var(--ed-caption-tracking);
  color: var(--ed-text-muted);
}

.editorial-lab .ed-image__text {
  max-width: 70%;
}

.editorial-lab .ed-image__ref {
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}

/* Eames "ESU" tight grid for image galleries */
.editorial-lab .ed-image-grid {
  display: grid;
  gap: 1px;
  background: var(--ed-border-dark);
  border: 1px solid var(--ed-border-dark);
}

.editorial-lab .ed-image-grid > * {
  background: var(--ed-bg);
}

.editorial-lab .ed-image-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.editorial-lab .ed-image-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

/* Image grid responsive */
@media (max-width: 768px) {
  .editorial-lab .ed-image-grid--2col,
  .editorial-lab .ed-image-grid--3col {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Metadata Display
   ========================================================================== */

.editorial-lab .ed-meta {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-xs);
}

.editorial-lab .ed-meta__value {
  font-family: var(--ed-font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--ed-text);
}

/* Large year display */
.editorial-lab .ed-year {
  font-family: var(--ed-font-serif);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 300;
  line-height: 1;
  color: var(--ed-text);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   Pull Quotes
   ========================================================================== */

.editorial-lab .ed-pullquote {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.375rem, 1.125rem + 1vw, 1.75rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.4;
  color: var(--ed-text);
  border-left: 3px solid var(--ed-accent);
  padding-left: var(--ed-space-lg);
  margin: var(--ed-space-xl) 0;
}

.editorial-lab .ed-pullquote cite {
  display: block;
  font-family: var(--ed-font-sans);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 500;
  color: var(--ed-text-muted);
  margin-top: var(--ed-space-sm);
}

/* ==========================================================================
   Rules & Dividers
   ========================================================================== */

.editorial-lab .ed-rule {
  border: none;
  border-top: 1px solid var(--ed-border);
  margin: var(--ed-space-2xl) 0;
}

.editorial-lab .ed-rule--thick {
  border-top-width: 2px;
  border-color: var(--ed-border-dark);
}

/* ==========================================================================
   Article/Project Layout
   ========================================================================== */

/* Project hero */
.editorial-lab .ed-project-hero {
  padding: var(--ed-space-3xl) 0;
  border-bottom: 1px solid var(--ed-border);
}

.editorial-lab .ed-project-hero__grid {
  display: grid;
  grid-template-columns: 1fr var(--ed-sidebar-width);
  gap: var(--ed-space-2xl);
}

/* Project metadata column */
.editorial-lab .ed-project-meta {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-md);
}

.editorial-lab .ed-project-meta__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-xs);
}

.editorial-lab .ed-project-meta__item {
  font-family: var(--ed-font-sans);
  font-size: 0.875rem;
  color: var(--ed-text-muted);
}

/* Project head (title + intro) */
.editorial-lab .ed-project-head {
  max-width: var(--ed-content-width);
}

.editorial-lab .ed-project-head .ed-title {
  margin-bottom: var(--ed-space-lg);
}

/* Project body with sidebar */
.editorial-lab .ed-project-body {
  padding: var(--ed-space-2xl) 0;
}

.editorial-lab .ed-project-body__grid {
  display: grid;
  grid-template-columns: 1fr var(--ed-sidebar-width);
  gap: var(--ed-space-2xl);
}

/* Project notes sidebar */
.editorial-lab .ed-project-notes {
  position: sticky;
  top: var(--ed-space-xl);
  align-self: start;
}

/* Prose container */
.editorial-lab .ed-prose {
  max-width: var(--ed-content-width);
}

.editorial-lab .ed-prose p {
  margin-bottom: var(--ed-space-lg);
}

.editorial-lab .ed-prose h2 {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 500;
  margin: var(--ed-space-2xl) 0 var(--ed-space-md) 0;
  color: var(--ed-text);
}

.editorial-lab .ed-prose h3 {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.25rem, 1.125rem + 0.5vw, 1.5rem);
  font-weight: 500;
  margin: var(--ed-space-xl) 0 var(--ed-space-sm) 0;
  color: var(--ed-text);
}

/* Lead paragraph */
.editorial-lab .ed-lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.6;
  color: var(--ed-text);
  margin-bottom: var(--ed-space-xl);
}

/* Aside/field notes */
.editorial-lab .ed-aside {
  font-family: var(--ed-font-sans);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--ed-text-muted);
  padding: var(--ed-space-md);
  background: var(--ed-bg-alt);
  border-left: 2px solid var(--ed-accent);
}

.editorial-lab .ed-aside__title {
  font-weight: 600;
  margin-bottom: var(--ed-space-sm);
  color: var(--ed-text);
}

/* ==========================================================================
   Grid Utilities
   ========================================================================== */

.editorial-lab .ed-grid {
  display: grid;
  gap: var(--ed-space-lg);
}

.editorial-lab .ed-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.editorial-lab .ed-grid--3col {
  grid-template-columns: repeat(3, 1fr);
}

.editorial-lab .ed-grid--sidebar-left {
  grid-template-columns: var(--ed-sidebar-width) 1fr;
}

.editorial-lab .ed-grid--sidebar-right {
  grid-template-columns: 1fr var(--ed-sidebar-width);
}

/* ==========================================================================
   Header & Footer Components
   ========================================================================== */

.editorial-lab .ed-header {
  padding: var(--ed-space-lg) 0;
  border-bottom: 1px solid var(--ed-border);
}

.editorial-lab .ed-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editorial-lab .ed-mark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}

.editorial-lab .ed-mark:hover .ed-mark__name {
  color: var(--ed-text);
}

.editorial-lab .ed-mark:hover .ed-mark__brand {
  color: var(--ed-accent);
}

.editorial-lab .ed-mark__name {
  font-family: var(--ed-font-sans);
  font-size: clamp(0.75rem, 0.625rem + 0.5vw, 0.875rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
  transition: color var(--ed-transition);
}

.editorial-lab .ed-mark__brand {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ed-text);
  transition: color var(--ed-transition);
}

.editorial-lab .ed-mark__x {
  color: var(--ed-accent);
}

.editorial-lab .ed-nav {
  display: flex;
  gap: var(--ed-space-lg);
}

.editorial-lab .ed-nav__link {
  font-family: var(--ed-font-sans);
  font-size: 0.875rem;
  color: var(--ed-text-muted);
  text-decoration: none;
  transition: color var(--ed-transition);
}

.editorial-lab .ed-nav__link:hover {
  color: var(--ed-accent);
}

.editorial-lab .ed-footer {
  padding: var(--ed-space-2xl) 0;
  border-top: 1px solid var(--ed-border);
  margin-top: auto;
}

.editorial-lab .ed-footer__text {
  font-family: var(--ed-font-sans);
  font-size: 0.8125rem;
  color: var(--ed-text-muted);
}

/* ==========================================================================
   Lists
   ========================================================================== */

.editorial-lab .ed-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--ed-space-lg) 0;
}

.editorial-lab .ed-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: var(--ed-space-sm);
}

.editorial-lab .ed-list li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--ed-accent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.editorial-lab .ed-button {
  display: inline-flex;
  align-items: center;
  gap: var(--ed-space-sm);
  padding: var(--ed-space-sm) var(--ed-space-lg);
  font-family: var(--ed-font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ed-bg);
  background: var(--ed-accent);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ed-transition);
}

.editorial-lab .ed-button:hover {
  background: var(--ed-accent-hover);
  color: var(--ed-bg);
}

.editorial-lab .ed-button--outline {
  background: transparent;
  color: var(--ed-accent);
  border: 1px solid var(--ed-accent);
}

.editorial-lab .ed-button--outline:hover {
  background: var(--ed-accent);
  color: var(--ed-bg);
}

/* ==========================================================================
   Tag System
   Archive-style taxonomy tags - quiet, structural, editorial
   ========================================================================== */

/* Base taxonomy tag */
.editorial-lab .ed-tag {
  display: inline-flex;
  align-items: center;
  min-height: var(--ed-tag-height);
  padding-inline: var(--ed-tag-pad-x);
  border: 1px solid var(--ed-tag-border);
  border-radius: var(--ed-tag-radius);
  background: var(--ed-tag-bg);
  color: var(--ed-tag-text);
  font-family: var(--ed-font-sans);
  font-size: 0.8125rem;
  line-height: 1;
  white-space: nowrap;
}

/* Filter chip - interactive variant */
.editorial-lab .ed-tag--filter {
  cursor: pointer;
  transition:
    background var(--ed-transition),
    color var(--ed-transition),
    border-color var(--ed-transition);
}

.editorial-lab .ed-tag--filter:hover {
  border-color: var(--ed-tag-border-strong);
  color: var(--ed-tag-text-strong);
}

.editorial-lab .ed-tag--filter[aria-pressed='true'],
.editorial-lab .ed-tag--filter.is-active {
  background: var(--ed-tag-bg-active);
  border-color: var(--ed-tag-bg-active);
  color: var(--ed-tag-text-inverse);
}

/* Spec label - technical/archival (mono, uppercase) */
.editorial-lab .ed-tag--spec {
  min-height: auto;
  padding: 0.35rem 0.5rem;
  background: var(--ed-tag-bg-subtle);
  border-color: var(--ed-tag-border);
  color: var(--ed-tag-text);
  font-family: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* State tag - rare accent for status indicators */
.editorial-lab .ed-tag--state {
  background: var(--ed-tag-bg-accent);
  border-color: var(--ed-tag-border-accent);
  color: var(--ed-accent);
}

/* Tag group container */
.editorial-lab .ed-tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ed-tag-gap);
  align-items: flex-start;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* Tablet and below (1024px) */
@media (max-width: 1024px) {
  .editorial-lab {
    --ed-sidebar-width: 180px;
    --ed-rail-width: 140px;
  }

  .editorial-lab .ed-case {
    grid-template-columns: var(--ed-sidebar-width) 1fr;
  }

  .editorial-lab .ed-case__rail {
    display: none;
  }

  .editorial-lab .ed-project-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--ed-space-lg);
  }

  .editorial-lab .ed-project-body__grid {
    grid-template-columns: 1fr;
  }

  .editorial-lab .ed-project-notes {
    position: static;
    order: -1;
    margin-bottom: var(--ed-space-lg);
  }
}

/* Mobile (768px) */
@media (max-width: 768px) {
  .editorial-lab {
    --ed-space-lg: 1.25rem;
    --ed-space-xl: 1.5rem;
    --ed-space-2xl: 2rem;
    --ed-space-3xl: 2.5rem;
  }

  .editorial-lab .ed-shell {
    padding-inline: var(--ed-space-md);
  }

  .editorial-lab .ed-case {
    grid-template-columns: 1fr;
    gap: var(--ed-space-md);
  }

  .editorial-lab .ed-case__meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--ed-space-lg);
    padding-bottom: var(--ed-space-md);
    border-bottom: 1px solid var(--ed-border);
  }

  .editorial-lab .ed-case__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ed-space-sm);
  }

  .editorial-lab .ed-grid--2col,
  .editorial-lab .ed-grid--3col {
    grid-template-columns: 1fr;
  }

  .editorial-lab .ed-grid--sidebar-left,
  .editorial-lab .ed-grid--sidebar-right {
    grid-template-columns: 1fr;
  }

  .editorial-lab .ed-year {
    font-size: 2rem;
  }

  .editorial-lab .ed-nav {
    gap: var(--ed-space-md);
  }
}

/* Small mobile (480px) */
@media (max-width: 480px) {
  .editorial-lab .ed-title {
    font-size: 2rem;
  }

  .editorial-lab .ed-section-title {
    font-size: 1.5rem;
  }

  .editorial-lab .ed-header__inner {
    flex-direction: column;
    gap: var(--ed-space-md);
    align-items: flex-start;
  }
}

/* ==========================================================================
   Client Logos Section
   ========================================================================== */

.editorial-lab .ed-logos {
  padding: var(--ed-space-2xl) 0;
  border-top: 1px solid var(--ed-border);
  margin-top: var(--ed-space-2xl);
}

.editorial-lab .ed-logos__header {
  margin-bottom: var(--ed-space-xl);
}

.editorial-lab .ed-logos__header .ed-section-title {
  margin-top: var(--ed-space-xs);
  margin-bottom: 0;
}

.editorial-lab .ed-logos__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ed-space-md);
}

.editorial-lab .ed-logos__item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ed-space-md);
  min-height: 80px;
}

.editorial-lab .ed-logos__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.editorial-lab .ed-logos__img {
  max-height: 48px;
  max-width: 100%;
  width: auto;
  -o-object-fit: contain;
     object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition:
    filter var(--ed-transition),
    opacity var(--ed-transition);
}

.editorial-lab .ed-logos__item:hover .ed-logos__img,
.editorial-lab .ed-logos__link:hover .ed-logos__img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Logos responsive */
@media (max-width: 1024px) {
  .editorial-lab .ed-logos__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .editorial-lab .ed-logos__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .editorial-lab .ed-logos__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--ed-space-sm);
  }

  .editorial-lab .ed-logos__item {
    padding: var(--ed-space-sm);
    min-height: 60px;
  }

  .editorial-lab .ed-logos__img {
    max-height: 32px;
  }
}

/* ==========================================================================
   Page Navigation (Footer-style, bidirectional)
   ========================================================================== */

.editorial-lab .ed-page-nav {
  padding: var(--ed-space-xl) 0;
  border-top: 1px solid var(--ed-border);
  margin-top: var(--ed-space-2xl);
}

.editorial-lab .ed-page-nav__inner {
  display: flex;
  justify-content: flex-end;
}

.editorial-lab .ed-page-nav__inner--dual {
  justify-content: space-between;
}

.editorial-lab .ed-page-nav__link {
  display: flex;
  flex-direction: column;
  gap: var(--ed-space-xs);
  text-decoration: none;
  padding: var(--ed-space-md) 0;
}

.editorial-lab .ed-page-nav__link--prev {
  align-items: flex-start;
}

.editorial-lab .ed-page-nav__link--next {
  align-items: flex-end;
  text-align: right;
}

.editorial-lab .ed-page-nav__title {
  font-family: var(--ed-font-serif);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  color: var(--ed-text);
  display: inline-flex;
  align-items: center;
  gap: var(--ed-space-sm);
}

.editorial-lab .ed-page-nav__desc {
  font-family: var(--ed-font-sans);
  font-size: 0.875rem;
  color: var(--ed-text-muted);
}

.editorial-lab .ed-page-nav__arrow {
  color: var(--ed-accent);
  transition: transform var(--ed-transition);
}

.editorial-lab .ed-page-nav__link--next:hover .ed-page-nav__arrow--next {
  transform: translateX(4px);
}

.editorial-lab .ed-page-nav__link--prev:hover .ed-page-nav__arrow--prev {
  transform: translateX(-4px);
}

/* Mobile: Stack vertically when both links present */
@media (max-width: 600px) {
  .editorial-lab .ed-page-nav__inner--dual {
    flex-direction: column;
    gap: var(--ed-space-lg);
  }

  .editorial-lab .ed-page-nav__link--next {
    align-items: flex-start;
    text-align: left;
  }
}
