/*
 * Bindery Index shared design system.
 * Keep these page-level styles in one source file so every generated route
 * receives the same responsive, accessible visual language.
 */

/* Theme tokens: warm paper, dark ink, and quiet editorial surfaces. */
:root {
  color-scheme: light;
  --canvas: #fcfbfa;
  --surface: #f4f3f1;
  --surface-raised: #ffffff;
  --ink: #171716;
  --muted: #686762;
  --line: #e5e3df;
  --line-strong: #cfcdc7;
  --accent: #a74635;
  --accent-soft: #f1e4df;
  --focus: #b14a37;
  --nav-active-surface: #e9e7e2;
  --nav-active-ink: #5b5852;
  --nav-active-border: #d2d0ca;
  --scrollbar-track: #efeeeb;
  --scrollbar-thumb: #77746e;
  --scrollbar-thumb-hover: #5e5b55;
  --scrollbar-thumb-active: #484640;
  --shadow: 0 22px 60px rgb(30 27 23 / 7%);
  --gutter: clamp(1.1rem, 4.8vw, 4.5rem);
  --card-row-gap: clamp(1.5rem, 2.2vw, 2rem);
  --card-column-gap: clamp(1rem, 1.5vw, 1.35rem);
  --content-width: 1360px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  isolation: isolate;
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.65;
}


img {
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

/* Shared type scale: Manrope gives display text a close, open sans-serif feel. */
h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Manrope", "Inter", Arial, sans-serif;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(3rem, 7.25vw, 6.6rem);
  text-wrap: balance;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  text-wrap: balance;
}

h3 {
  font-size: 1.2rem;
}

.skip {
  position: absolute;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  text-decoration: none;
}

.skip:focus {
  transform: translateY(0);
}

/* Site header and navigation. */
.mast {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

@supports (backdrop-filter: blur(12px)) {
  .mast {
    background: color-mix(in srgb, var(--canvas) 92%, transparent);
    backdrop-filter: blur(14px);
  }
}

.mast-inner {
  position: relative;
  display: flex;
  width: min(100%, var(--content-width));
  min-height: 76px;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  padding-right: 1.35rem;
  border-right: 1px solid var(--line);
  color: var(--ink);
  font-family: "Manrope", "Inter", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  object-fit: contain;
}

#site-nav {
  position: absolute;
  z-index: 12;
  top: calc(100% - 1px);
  right: var(--gutter);
  left: var(--gutter);
  display: grid;
  gap: 0.25rem;
  max-height: min(72vh, 30rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  background: var(--surface-raised);
  box-shadow: 0 0 0 transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.35rem);
  transition: opacity 180ms ease,
    border-color 260ms ease,
    box-shadow 260ms ease,
    transform 220ms cubic-bezier(0.2, 0, 0, 1),
    visibility 0s linear 260ms;
}

#site-nav.is-open {
  border-color: var(--line);
  box-shadow: 0 18px 42px rgb(0 0 0 / 18%);
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

#site-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

#site-nav a {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.91rem;
  font-weight: 600;
}

#site-nav a[aria-current] {
  background: var(--nav-active-surface);
  color: var(--nav-active-ink);
}

#site-nav a[aria-current]::after {
  width: 0.4rem;
  height: 0.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

#site-nav a:hover {
  color: var(--ink);
}

#site-nav a[aria-current]:hover {
  color: var(--nav-active-ink);
}

.footer-links a:hover {
  color: var(--ink);
}

.menu {
  position: relative;
  display: inline-flex;
  min-width: 6.2rem;
  min-height: 2.8rem;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-left: auto;
  padding: 0.55rem 1rem 0.55rem 2.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 700 0.7rem "Inter", Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.menu::before,
.menu::after {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  width: 1rem;
  height: 1px;
  background: currentColor;
  content: "";
  transform: translateY(-50%);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.menu::before {
  box-shadow: 0 -0.3rem 0 currentColor, 0 0.3rem 0 currentColor;
}

.menu::after {
  opacity: 0;
}

.menu[aria-expanded="true"]::before {
  box-shadow: none;
  transform: translateY(-50%) rotate(45deg);
}

.menu[aria-expanded="true"]::after {
  opacity: 1;
  transform: translateY(-50%) rotate(-45deg);
}

.menu:focus-visible,
#site-nav a:focus-visible {
  outline-offset: 3px;
}

/* Shared page frame and editorial labels. */
main {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(4rem, 8vw, 7rem);
}

.kicker,
.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-transform: uppercase;
}

.back {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
}

.back:hover {
  color: var(--ink);
}

/* Keep the section label on its own line after the inline back link. */
.listing > .back + .kicker,
.legal > .back + .kicker {
  display: block;
  width: fit-content;
  margin-top: 0.65rem;
  margin-bottom: 0.75rem;
}

.deck {
  max-width: 55ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.7;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent);
}

.button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 0.87rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: transparent;
  color: var(--ink);
}

/* Keep the home introduction prominent without letting it dominate the first screen. */
.intro {
  display: grid;
  gap: 2.25rem;
  align-items: end;
  padding: clamp(2.6rem, 5.1vw, 4.8rem) 0 clamp(2.2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  max-width: 900px;
}

.intro .kicker {
  margin-bottom: 0.9rem;
}

.intro h1 {
  max-width: 12.5ch;
  margin-bottom: 1rem;
  font-size: clamp(2.8rem, 6vw, 5.4rem);
}

.intro-copy > p:not(.kicker) {
  max-width: 55ch;
  margin-bottom: 1.2rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.13rem);
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
}

.intro-aside {
  padding: 1.4rem 1.5rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--surface);
}

.intro-aside .eyebrow {
  margin-bottom: 0.7rem;
}

.intro-aside > p {
  max-width: 32ch;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.intro-count {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.78rem;
}

.intro-count strong {
  color: var(--ink);
  font-family: "Manrope", "Inter", Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.lead-grid {
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.3rem, 3vw, 2.2rem);
}

.article-card {
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.featured {
  display: block;
  padding: 0.8rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.article-card .cover-frame {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin-bottom: 1.1rem;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--surface);
}

.article-card .cover-frame img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
}

/* This cover contains artwork on a paper-colored canvas, so its card view zooms to the artwork. */
.cover-frame--crop img {
  transform: scale(2.28);
}

.article-card .eyebrow {
  margin: 0 0 0.55rem;
}

.article-card h2 {
  max-width: 19ch;
  margin-bottom: 0.65rem;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
}

.article-card p {
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.readline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
}

.featured h2 {
  max-width: 15ch;
  font-size: clamp(1.7rem, 3.25vw, 2.75rem);
}

.featured p {
  max-width: 45ch;
}

.index-note {
  align-self: stretch;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
}

.index-note h2 {
  max-width: 12ch;
  font-size: clamp(1.7rem, 2.5vw, 2.2rem);
}

.index-note p {
  max-width: 38ch;
  color: var(--muted);
  font-size: 0.93rem;
}

.index-note a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.index-note a:hover {
  color: var(--accent);
}

/* Home-only reading modules balance stories with practical, non-article guidance. */
.home-knowledge,
.home-routes,
.editorial-method {
  margin-top: clamp(2.75rem, 6vw, 5rem);
}

.module-heading {
  max-width: 55rem;
  margin-bottom: clamp(1.15rem, 2.5vw, 1.8rem);
}

.module-heading .eyebrow {
  margin-bottom: 0.6rem;
}

.module-heading h2,
.editorial-method h2 {
  max-width: 19ch;
  margin-bottom: 0.7rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.module-heading > p:last-child {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--muted);
}

.knowledge-grid {
  display: grid;
  gap: 0.75rem;
}

.knowledge-step {
  min-width: 0;
  padding: 1.2rem 1.25rem 1.35rem;
  border-top: 1px solid var(--line-strong);
  background: linear-gradient(180deg, var(--surface) 0%, transparent 100%);
}

.knowledge-step > span {
  display: block;
  margin-bottom: 1.15rem;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.knowledge-step h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
}

.knowledge-step p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* The problem guide is a keyboard-friendly route from a situation to one article. */
.home-problem-guide {
  margin-top: clamp(2.75rem, 6vw, 5rem);
}

.problem-route-list {
  border-top: 1px solid var(--line-strong);
}

.problem-route {
  border-bottom: 1px solid var(--line-strong);
}

.problem-route summary {
  display: grid;
  min-height: 4.25rem;
  grid-template-columns: 2.5rem minmax(0, 1fr) 1.5rem;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
}

.problem-route summary::-webkit-details-marker {
  display: none;
}

.problem-route summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.problem-number {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.problem-question {
  font-family: "Manrope", "Inter", Arial, sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.problem-toggle {
  position: relative;
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
}

.problem-toggle::before,
.problem-toggle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.55rem;
  height: 1px;
  background: currentColor;
  content: "";
  transform: translate(-50%, -50%);
  transition: transform 240ms cubic-bezier(0.23, 1, 0.32, 1), opacity 180ms ease;
}

.problem-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.problem-route[open]:not([data-closing="true"]) .problem-toggle::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0) scaleX(0.08);
}

.problem-answer-clip {
  height: 0;
  overflow: hidden;
}

.problem-route[open]:not([data-closing="true"]) .problem-answer-clip {
  height: auto;
}

.problem-answer {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 0.72fr);
  grid-template-areas:
    "label label"
    "copy link";
  align-items: center;
  gap: 0.35rem clamp(1rem, 4vw, 3.5rem);
  padding: 0.25rem 2.25rem 1.35rem 3.25rem;
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.23, 1, 0.32, 1);
}

.problem-route[open]:not([data-closing="true"]) .problem-answer {
  opacity: 1;
}

.problem-answer .eyebrow {
  grid-area: label;
  margin: 0;
  color: var(--accent);
}

.problem-answer > p:not(.eyebrow) {
  grid-area: copy;
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.problem-answer > a {
  display: inline-flex;
  min-height: 2.75rem;
  grid-area: link;
  align-items: center;
  justify-self: start;
  gap: 0.35rem;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.45;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.2em;
}

.problem-answer > a:hover {
  color: var(--accent);
}

.home-routes {
  padding-top: clamp(1.8rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.home-route-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
}

.home-route {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: var(--surface);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.home-route:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--surface-raised);
}

.home-route .eyebrow {
  margin-bottom: 1.3rem;
}

.home-route strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: "Manrope", "Inter", Arial, sans-serif;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.route-description {
  display: block;
  margin-bottom: 1.1rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.route-link {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: auto;
  font-size: 0.78rem;
  font-weight: 600;
}

.editorial-method {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--surface);
}

.editorial-method .eyebrow {
  margin-bottom: 0.65rem;
}

.editorial-method h2 {
  margin-bottom: 0;
}

.editorial-method-copy > p {
  max-width: 62ch;
  color: var(--muted);
}

.editorial-method .intro-actions {
  gap: 0.7rem 1.25rem;
}

/* Story grids and category routes share card spacing across the site. */
.latest {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3.5rem, 6vw, 5rem);
}

.home-latest {
  padding: clamp(2.6rem, 5vw, 4.2rem) 0 0;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem 1rem;
  margin-bottom: 1.6rem;
}

.section-heading .eyebrow {
  margin-bottom: 0;
}

.section-heading h2 {
  width: 100%;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
}

.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--card-row-gap) var(--card-column-gap);
}

.card-grid > .article-card:not(.featured) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-grid > .article-card:not(.featured) h2 {
  font-size: clamp(1.35rem, 2vw, 1.72rem);
}

.card-grid > .article-card:not(.featured) p {
  flex: 1;
}

.section-band {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.2rem;
  padding: clamp(1.4rem, 3.5vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--surface);
}

.section-band .eyebrow {
  margin-bottom: 0.55rem;
}

.section-band h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.section-band p {
  max-width: 45ch;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.compact-list {
  border-top: 1px solid var(--line-strong);
}

.compact-list a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
}

.compact-list a:hover {
  color: var(--accent);
}

.compact-list span {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.listing {
  padding-top: clamp(2rem, 4.5vw, 4rem);
}

.listing h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
  font-size: clamp(3rem, 7vw, 5.8rem);
}

.listing .card-grid {
  margin-top: clamp(2.2rem, 4.5vw, 4rem);
}

/* Make all category routes easy to find without restoring them to the global nav. */
.archive-section-index {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1rem, 2.8vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
}

.archive-section-index h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.archive-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.65rem;
}

.archive-section-link {
  display: flex;
  min-height: 6.25rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface-raised);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease;
}

.archive-section-link:hover {
  border-color: var(--line-strong);
  color: var(--accent);
}

.archive-section-link strong {
  font-size: 0.88rem;
}

.archive-section-link span {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

/* Article pages keep the reading column calm and the source rail easy to find. */
.article {
  max-width: 1120px;
  margin: 0 auto;
  padding-top: clamp(1.8rem, 4vw, 3.5rem);
}

.article-heading {
  max-width: 900px;
  padding: clamp(1.4rem, 3.5vw, 2.8rem) 0 0.5rem;
}

.article-heading .kicker {
  margin-bottom: 1rem;
}

.article-heading h1 {
  max-width: 14ch;
  font-size: clamp(2.8rem, 6.3vw, 5.9rem);
}

.standfirst {
  max-width: 58ch;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
  line-height: 1.65;
}

.byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* Let the original image determine the frame instead of adding a 3:2 matte.
   Both limits scale the image proportionally; portrait covers stay manageable. */
.article figure {
  width: fit-content;
  max-width: 100%;
  margin: clamp(1.8rem, 4vw, 3rem) auto;
}

.article figure img {
  display: block;
  margin-inline: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(80vh, 840px);
  border-radius: clamp(1.1rem, 2vw, 1.7rem);
}

.article figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.article-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.article-copy {
  max-width: 740px;
  font-size: 1.03rem;
  line-height: 1.82;
}

.article-copy p {
  margin: 0 0 1.35rem;
}

.article-copy h2 {
  margin: 2.5rem 0 0.85rem;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.18;
}

.article-copy a,
.sources a {
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.18em;
}

.article-copy a:hover,
.sources a:hover {
  color: var(--accent);
}

.field-note {
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.field-note span,
.side-rail > span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.field-note p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

.side-rail {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.side-rail a {
  display: block;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

.side-rail a:hover {
  color: var(--accent);
}

.sources {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-strong);
}

.sources h2 {
  margin-top: 0;
}

.sources ol {
  padding-left: 1.3rem;
}

.sources li {
  margin: 0.65rem 0;
  padding-left: 0.2rem;
}

/* Publishing and utility pages use the same hierarchy with a narrower measure. */
.legal {
  max-width: 900px;
  min-height: 55vh;
  padding-top: clamp(2rem, 4.5vw, 4rem);
}

.legal h1 {
  max-width: 13ch;
  margin-bottom: clamp(1.7rem, 4vw, 3rem);
  font-size: clamp(3rem, 7vw, 5.8rem);
}

/* Information pages use open prose, aligned with the page heading.
   Keep the reading measure without introducing a separate card surface. */
.legal-copy {
  max-width: 70ch;
  font-size: 1rem;
  line-height: 1.8;
}

.legal-copy p:last-child {
  margin-bottom: 0;
}

.legal > p:not(.kicker) {
  max-width: 56ch;
  color: var(--muted);
}

/* Site footer. */
footer {
  display: grid;
  width: min(100%, var(--content-width));
  gap: 1.5rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--line);
}

.foot-brand {
  margin-bottom: 0.75rem;
}

footer > div:first-child p {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  align-content: start;
}

.copyright {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

/* Larger viewports give the feature and reading rail more room. */
@media (min-width: 700px) {
  .intro {
    grid-template-columns: minmax(0, 1.7fr) minmax(250px, 0.55fr);
    gap: clamp(2rem, 5vw, 5.5rem);
  }

  .lead-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
    align-items: stretch;
  }

  .featured {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    column-gap: clamp(1.1rem, 2.6vw, 2rem);
    align-content: center;
    align-items: center;
    padding: clamp(0.85rem, 1.6vw, 1.35rem);
  }

  .featured .cover-frame {
    grid-row: 1 / 5;
    grid-column: 1;
    height: 100%;
    min-height: 250px;
    margin: 0;
    border-radius: 1.1rem;
  }

  .featured > .eyebrow,
  .featured > h2,
  .featured > p,
  .featured > .readline {
    grid-column: 2;
  }

  .featured h2 {
    align-self: end;
  }

  .featured > p {
    align-self: start;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-method {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
  }


  .listing .card-grid > .article-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    column-gap: 1.6rem;
    align-content: center;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 1.5rem;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
  }

  .listing .card-grid > .article-card:first-child .cover-frame {
    grid-row: 1 / 5;
    grid-column: 1;
    height: 100%;
    margin: 0;
  }

  .listing .card-grid > .article-card:first-child > .eyebrow,
  .listing .card-grid > .article-card:first-child > h2,
  .listing .card-grid > .article-card:first-child > p,
  .listing .card-grid > .article-card:first-child > .readline {
    grid-column: 2;
  }

  .section-band {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
  }

  .section-band:nth-of-type(even) > div:first-child {
    order: 2;
  }

  .section-band:nth-of-type(even) > div:last-child {
    order: 1;
  }


  .article-layout {
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .side-rail {
    position: sticky;
    top: 6.25rem;
  }

  footer {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .copyright {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1200px) {
  .mast-inner {
    min-height: 78px;
    gap: clamp(1.25rem, 3vw, 2.5rem);
  }

  #site-nav {
    position: static;
    display: flex;
    width: max-content;
    max-height: none;
    align-items: center;
    gap: 0.2rem;
    margin-left: auto;
    overflow: visible;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  #site-nav a {
    min-height: 2.8rem;
    padding: 0.65rem clamp(0.75rem, 1.15vw, 1.1rem);
    border-radius: 999px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  #site-nav a[aria-current] {
    background: var(--nav-active-surface);
    color: var(--nav-active-ink);
    box-shadow: inset 0 0 0 1px var(--nav-active-border);
  }

  .menu {
    display: none;
  }
}

@media (min-width: 1020px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-route-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .article-copy {
    font-size: 1.08rem;
  }

  footer {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) auto;
    align-items: start;
  }

  .footer-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .copyright {
    grid-column: auto;
    justify-self: end;
    padding-top: 0.5rem;
  }
}

@media (min-width: 1280px) {
  .section-band:nth-of-type(even) > div:first-child,
  .section-band:nth-of-type(even) > div:last-child {
    order: initial;
  }
}

/* Motion is limited to short, low-key feedback and removed for reduced-motion users. */
@media (hover: hover) and (pointer: fine) {
  .article-card:not(.featured) .cover-frame img {
    transition: transform 220ms ease;
  }

  .article-card:not(.featured):hover .cover-frame:not(.cover-frame--crop) img {
    transform: scale(1.012);
  }

  .article-card:not(.featured):hover .cover-frame--crop img {
    transform: scale(2.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}

/* Shared values consumed by the scroll-reveal Web Animations keyframes. */
.viewport-reveal {
  --viewport-reveal-x: 0px;
  --viewport-reveal-y: 28px;
  --viewport-reveal-tilt: 1.4deg;
  --viewport-reveal-scale: 0.988;
  --viewport-reveal-origin: 50% 78%;
  transform-origin: var(--viewport-reveal-origin);
  will-change: transform, opacity, filter;
}

.viewport-reveal--content {
  --viewport-reveal-y: 18px;
  --viewport-reveal-tilt: 0.7deg;
  --viewport-reveal-scale: 0.996;
  --viewport-reveal-origin: 50% 84%;
}

.viewport-reveal--from-left {
  --viewport-reveal-x: -24px;
  --viewport-reveal-y: 18px;
  --viewport-reveal-origin: 72% 78%;
}

.viewport-reveal--from-right {
  --viewport-reveal-x: 24px;
  --viewport-reveal-y: 18px;
  --viewport-reveal-origin: 28% 78%;
}

/* Keep alternating card motion inside the mobile content gutter. */
@media (max-width: 680px) {
  .intro {
    gap: 1.5rem;
    padding: clamp(2rem, 8vw, 3rem) 0 clamp(1.8rem, 6vw, 2.6rem);
  }

  .intro h1 {
    margin-bottom: 0.85rem;
    font-size: clamp(2.35rem, 7.5vw, 3.05rem);
  }

  .intro-copy > p:not(.kicker) {
    margin-bottom: 1rem;
  }

  .problem-route summary {
    grid-template-columns: 2rem minmax(0, 1fr) 1.5rem;
    gap: 0.55rem;
  }

  .problem-answer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "label"
      "copy"
      "link";
    gap: 0.4rem;
    padding: 0 0 1.15rem 2.55rem;
  }

  .problem-answer > a {
    margin-top: 0.15rem;
  }

  .viewport-reveal--from-left,
  .viewport-reveal--from-right {
    --viewport-reveal-x: 0px;
    --viewport-reveal-origin: 50% 78%;
  }
}

/* The script does not initialize hidden animations for reduced-motion users;
   this rule also protects content if the preference changes while open. */
@media (prefers-reduced-motion: reduce) {
  .viewport-reveal,
  .viewport-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    will-change: auto;
  }
}

/* Keep the paper palette legible when the device requests a dark appearance. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #151514;
    --surface: #1d1d1b;
    --surface-raised: #20201e;
    --ink: #f2f0ec;
    --muted: #b4b1aa;
    --line: #353431;
    --line-strong: #4a4844;
    --accent: #e5a293;
    --accent-soft: #382722;
    --focus: #f0a28f;
    --nav-active-surface: #292826;
    --nav-active-ink: #d2d0ca;
    --nav-active-border: #44423e;
    --scrollbar-track: #151514;
    --scrollbar-thumb: #4a4945;
    --scrollbar-thumb-hover: #65635d;
    --scrollbar-thumb-active: #807d75;
    --shadow: 0 22px 60px rgb(0 0 0 / 20%);
  }

  .button:hover {
    color: var(--ink);
  }

}

/* Keep native scrolling with a monochrome scrollbar that fits each theme. */
html {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

html::-webkit-scrollbar {
  width: 0.75rem;
  height: 0.75rem;
}

html::-webkit-scrollbar-track,
html::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  min-height: 2.5rem;
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
  background-color: var(--scrollbar-thumb);
  transition: background-color 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  html::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover);
  }
}

html::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-active);
}

@media (forced-colors: active) {
  html {
    scrollbar-color: auto;
  }

  html::-webkit-scrollbar-track,
  html::-webkit-scrollbar-corner {
    background: Canvas;
  }

  html::-webkit-scrollbar-thumb {
    border-color: Canvas;
    background-color: CanvasText;
  }
}

/* Contact addresses stay selectable text; emphasis must not imply a link. */
.contact-email {
  color: var(--accent);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-copy > section + section {
  margin-top: 2.25rem;
}

/* Plain navigation remains available when scripts are disabled. */
.no-script-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.5rem var(--gutter) 1rem;
}
.no-script-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.article-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.article-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* Expand touch areas without changing desktop link typography. */
@media (max-width: 1199px) {
  .footer-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding-block: 0.6rem;
  }
}
