/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V5 */
/* Hallmark · genre: editorial · macrostructure: Index-First · theme: custom mineral index · enrichment: photography · nav: N9 · footer: Ft4 · 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-display);
}

: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, .header-index-link, .route-card, .editorial-card) {
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out);
}

.site-header {
  background: var(--color-paper);
  border-color: var(--color-rule);
  grid-template-columns: auto 1fr;
}

.navigation { justify-items: end; }
.navigation nav { justify-content: flex-end; }
.header-index-link { display: none; }

.brand-lockup b,
.main-nav,
.topic-nav,
.header-index-link,
.eyebrow,
.route-number,
.route-card > p,
.route-card b,
.filters label,
.index-meta,
.article-record,
.reading-rail,
.footer-grid {
  font-family: var(--font-outlier);
}

.brand-lockup b,
.main-nav,
.topic-nav,
.header-index-link,
.eyebrow,
.route-card > p,
.route-card b,
.filters label,
.article-record,
.reading-rail,
.footer-grid { font-family: var(--font-body); }

.home-intro {
  min-height: auto;
  padding-block: var(--space-2xl) var(--space-3xl);
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: var(--space-2xl);
  align-items: end;
}

: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; }

.home-intro h1 {
  max-width: 12ch;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-style: normal;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  min-width: 0;
}

.home-intro h1 em {
  color: var(--color-accent);
  font-style: normal;
}

.intro-deck,
.section-head > p,
.path-intro > p,
.method-note > div:last-child > p,
.hub-intro,
.article-excerpt,
.article-body {
  font-family: var(--font-body);
}

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

.intro-image {
  min-height: 30rem;
}

.intro-image img {
  min-height: 27rem;
  filter: saturate(0.72) contrast(1.05);
}

.route-index {
  padding-block: var(--space-xl) var(--space-3xl);
}

.section-label,
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.section-label .eyebrow,
.section-head .eyebrow,
.latest-field-notes .eyebrow,
.method-note .eyebrow {
  display: none;
}

.section-label h2,
.section-head h2,
.path-intro h2,
.method-note h2,
.hub-heading h1,
.article-heading h1,
.article-body h2 {
  font-family: var(--font-display);
  font-style: normal;
}

.route-grid {
  display: block;
  border-top: var(--rule-thin) solid var(--color-ink);
}

.route-card {
  min-height: 0;
  display: grid;
  grid-template-columns: 3rem 4.5rem minmax(10rem, 0.7fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: var(--rule-thin) solid var(--color-rule);
  background: transparent;
  color: var(--color-ink);
}

.route-card:hover,
.route-card:focus-visible {
  background: var(--color-paper-2);
  color: var(--color-ink);
  transform: none;
}

.route-number {
  align-self: center;
}

.route-mark {
  width: 3rem;
  height: 3rem;
  margin: 0;
  border-radius: var(--radius-card);
  color: var(--color-accent);
  font-family: var(--font-outlier);
  font-size: var(--text-md);
}

.route-card > p,
.route-card h3,
.route-card small,
.route-card b {
  margin: 0;
  padding: 0;
  color: inherit;
}

.route-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.route-card b,
.header-index-link,
.path-intro a,
.method-note a {
  white-space: nowrap;
}

.index-meta a { overflow-wrap: anywhere; text-align: right; }

.stone-index,
.field-path,
.site-footer {
  background: var(--color-ink);
  color: var(--color-paper);
}

.stone-index :where(h2, h3),
.field-path :where(h2, h3),
.site-footer :where(a, b) {
  color: var(--color-paper);
}

.stone-index :where(p, small, label),
.field-path :where(p, span),
.site-footer :where(p, small, span) {
  color: var(--color-rule);
}

.filters input,
.filters select,
.filters button,
.index-search input,
.index-search button {
  min-height: 44px;
  border-width: var(--rule-thin);
  border-color: var(--color-rule-2);
  border-radius: var(--radius-control);
}

.filters input:hover,
.filters select:hover,
.index-search input:hover {
  background: var(--color-paper-2);
}

.finish-strip,
.stone-grid,
.editorial-feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-shell {
  max-width: 76rem;
}

.article-layout {
  grid-template-columns: 12rem minmax(0, 42rem);
  justify-content: center;
}

.article-body {
  max-width: 65ch;
  font-size: var(--text-base);
  line-height: 1.72;
}

.site-footer {
  font-size: var(--text-sm);
}

.footer-grid {
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(8rem, 0.5fr));
}

: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); }

@media (hover: hover) and (pointer: fine) {
  .route-card:hover b,
  .index-meta a:hover,
  .path-intro a:hover,
  .method-note a:hover {
    color: var(--color-accent);
  }
}

@media (max-width: 60rem) {
  .home-intro,
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .route-card {
    grid-template-columns: 2.5rem 3rem minmax(0, 1fr) auto;
  }

  .route-card small {
    grid-column: 3 / -1;
  }

  .intro-image {
    min-height: 24rem;
  }

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

  .article-record {
    max-width: none;
  }

  .reading-rail {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-xs) var(--space-lg);
    padding-block: var(--space-sm);
    border-bottom: var(--rule-thin) solid var(--color-rule);
  }

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

@media (max-width: 40rem) {
  .wrap,
  .article-shell {
    width: min(100% - 2rem, var(--wrap));
  }

  .home-intro {
    padding-block: var(--space-xl);
    gap: var(--space-xl);
  }

  .home-intro h1 {
    font-size: clamp(2.75rem, 14vw, 4.1rem);
  }

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

  .hub-heading h1,
  .listing-shell h1 {
    font-size: clamp(3rem, 15vw, 4rem);
    line-height: 0.94;
  }

  .article-excerpt { margin-top: var(--space-md); }

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

  .reading-rail p { grid-column: 1 / -1; }

  .index-meta { align-items: flex-start; flex-direction: column; }
  .index-meta a { white-space: nowrap; text-align: left; }

  .route-card {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    gap: var(--space-sm);
  }

  .route-mark {
    display: none;
  }

  .route-card small {
    grid-column: 2 / -1;
  }

  .finish-strip,
  .stone-grid,
  .editorial-feed,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro-image,
  .intro-image img {
    min-height: 18rem;
  }
}

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