/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V5 */
/* Hallmark · genre: editorial · macrostructure: Map / Diagram · theme: custom cotton field · enrichment: tactile photography + CSS swatches · nav: N6 · footer: Ft1 · contrast: pass (40–41) · slop: pass (42–45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30) · mobile: pass (34,49,50–57) */

html,
body {
  overflow-x: clip;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
}

:where(h1, h2, h3) { min-width: 0; overflow-wrap: anywhere; }

:where(nav a, .button, .text-link, .read-link, .site-footer a, .index-meta a) { white-space: nowrap; }

:where(h1, h2, h3, h4, h5, h6, h1 em, h2 em, h3 em) {
  font-family: var(--font-display);
  font-style: normal;
}

:where(a, button, input, select):focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

:where(input, select, textarea) { outline: 2px solid transparent; }

:where(a, button, select, .entry-card) {
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}

.utility,
.card-index,
.article-kicker,
.decoder-number,
.decoder-panel label,
.journey-track b,
.promise-strip,
.site-footer {
  font-family: var(--font-outlier);
}

.card-index,
.article-kicker,
.decoder-number,
.decoder-panel label,
.journey-track b,
.promise-strip,
.site-footer,
.cotton-map-visual figcaption { font-family: var(--font-body); }

.site-header {
  background: var(--color-paper);
  border-bottom: 4px double var(--color-ink);
}

.header-main {
  min-height: 8.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand-lockup {
  grid-column: 2;
  justify-self: center;
}

.header-actions {
  justify-self: end;
}

.navigation {
  border: 0;
}

.navigation > .wrap {
  justify-content: center;
}

.main-nav,
.topic-nav {
  justify-content: center;
}

.cotton-map-hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(22rem, 0.85fr);
  background: var(--color-ink-2);
  color: var(--color-paper);
}

.cotton-map-copy {
  padding-block: var(--space-xl) var(--space-2xl);
  padding-inline: max(var(--space-lg), calc((100vw - 80rem) / 2));
  padding-inline-end: var(--space-xl);
  min-width: 0;
}

.cotton-map-copy h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--color-paper);
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.cotton-map-copy h1 span {
  color: var(--color-paper-3);
}

.hero-deck {
  max-width: 34rem;
  margin-block: var(--space-md) var(--space-lg);
  color: var(--color-rule);
  font-family: var(--font-body);
  font-size: var(--text-md);
}

.cotton-map {
  list-style: none;
  margin: var(--space-xl) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: var(--rule-thin) solid var(--color-rule-2);
}

.cotton-map li {
  position: relative;
  min-width: 0;
  padding: var(--space-md) var(--space-xs) var(--space-sm) 0;
  border-bottom: var(--rule-thin) solid var(--color-rule-2);
}

.cotton-map li:not(:last-child)::after {
  content: "→";
  position: absolute;
  inset-inline-end: var(--space-xs);
  color: var(--color-paper-3);
}

.cotton-map b,
.cotton-map span {
  display: block;
}

.cotton-map b {
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
  font-weight: 500;
}

.cotton-map span {
  margin-top: var(--space-2xs);
  color: var(--color-rule);
  font-size: var(--text-xs);
}

.cotton-map-visual {
  position: relative;
  min-width: 0;
  min-height: 40rem;
  margin: 0;
}

.cotton-map-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06);
}

.cotton-map-visual figcaption {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  padding: var(--space-sm);
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-outlier);
  font-size: var(--text-xs);
}

.entry-section .eyebrow,
.quality-intro .eyebrow,
.decoder-copy .eyebrow,
.library-heading .eyebrow,
.journey-copy .eyebrow,
.evidence-band .eyebrow,
.latest-section .eyebrow {
  display: none;
}

.section-heading,
.split-heading,
.quality-layout,
.decoder-section,
.journey-section {
  min-width: 0;
}

.section-heading h2,
.quality-intro h2,
.decoder-copy h2,
.journey-copy h2,
.evidence-band h2 {
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}

.entry-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.entry-card--wide {
  grid-column: span 7;
}

.entry-card:not(.entry-card--wide) {
  grid-column: span 5;
}

.entry-card:last-child {
  grid-column: 8 / -1;
}

.entry-card {
  border-radius: var(--radius-card);
}

.entry-card:hover,
.entry-card:focus-visible {
  transform: translateY(-1px);
}

.decoder-panel select,
.button,
.header-cta {
  min-height: 44px;
  border-radius: var(--radius-control);
  white-space: nowrap;
}

.decoder-panel select {
  border-width: var(--rule-thin);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.decoder-panel select:hover {
  background: var(--color-paper-2);
}

.journey-section {
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
}

.journey-track {
  grid-template-columns: 1fr;
  border-top: var(--rule-thin) solid var(--color-ink);
}

.journey-track::before {
  display: none;
}

.journey-track li {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  align-items: center;
  padding-block: var(--space-sm);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}

.journey-track b {
  width: auto;
  height: auto;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-accent);
}

.journey-track span {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) auto;
  align-items: end;
  gap: var(--space-xl);
  background: var(--color-paper);
  color: var(--color-ink);
  border-top: 4px double var(--color-ink);
}

.site-footer .brand-lockup {
  justify-self: start;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-md);
}

.site-footer nav::before {
  display: none;
}

.site-footer a {
  white-space: nowrap;
}

.site-footer .copyright {
  grid-column: 1 / -1;
  color: var(--color-muted);
  border-color: var(--color-rule);
}

:where(a, button, input, select):active { transform: translateY(1px); }
:where(button, input, select):disabled,
[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; filter: saturate(0.55); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }

.article-heading-main h1 {
  font-size: clamp(2.75rem, 5.8vw, 5.75rem);
  line-height: 0.98;
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover,
  .site-footer a:hover {
    color: var(--color-accent);
  }
}

@media (max-width: 60rem) {
  .header-main {
    min-height: 5rem;
    grid-template-columns: 1fr auto;
  }

  .brand-lockup {
    grid-column: 1;
    justify-self: start;
  }

  .cotton-map-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .cotton-map-copy {
    padding-inline: var(--space-lg);
  }

  .cotton-map-visual {
    min-height: 26rem;
  }

  .entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-card--wide,
  .entry-card:not(.entry-card--wide),
  .entry-card:last-child {
    grid-column: auto;
  }

  .article-heading {
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
  }

  .article-byline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-xs) var(--space-lg);
  }

  .article-rail {
    display: grid;
    grid-template-columns: minmax(7rem, 0.35fr) minmax(0, 1fr);
    gap: var(--space-xs) var(--space-md);
    margin-bottom: var(--space-xl);
    padding-block: var(--space-sm);
    border-bottom: var(--rule-thin) solid var(--color-rule);
  }

  .article-rail p { margin: 0; }
}

@media (max-width: 40rem) {
  .listing-heading h1 {
    font-size: clamp(3rem, 15vw, 3.75rem);
    line-height: 0.98;
  }

  .article-heading-main h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .article-byline { grid-template-columns: minmax(0, 1fr); }
  .article-excerpt { margin-top: var(--space-md); }
}

@media (max-width: 40rem) {
  .cotton-map-copy {
    padding: var(--space-xl) var(--space-sm);
  }

  .cotton-map-copy h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
    line-height: 1;
  }

  .cotton-map {
    grid-template-columns: 1fr;
  }

  .cotton-map li {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: var(--space-sm);
  }

  .cotton-map li:not(:last-child)::after {
    content: "↓";
  }

  .cotton-map span {
    margin: 0;
  }

  .cotton-map-visual {
    min-height: 20rem;
  }

  .entry-grid,
  .journey-section,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

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