:root {
  --paper: #faf7f0;
  --surface: #fff;
  --ink: #211c19;
  --muted: #6b625d;
  --line: #ded6cc;
  --accent: #f04e35;
  --focus: #9e321f;
  --accent-dark: #b52e1c;
  --focus-light: #fff0e8;
  --shadow: 0 12px 30px rgba(33, 28, 25, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

strong,
.catalog-card__category,
.metric {
  font-variant-numeric: tabular-nums;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 4px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 80ms linear;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px 48px;
  background: rgba(250, 247, 240, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--surface);
  background: var(--focus);
  border-radius: 4px;
  font-size: 20px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.topnav a,
.back-link {
  min-height: 44px;
  padding: 11px 12px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.topnav a:hover,
.back-link:hover,
.toc a:hover {
  color: var(--focus);
  background: var(--focus-light);
}

main {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  column-gap: 64px;
  row-gap: 40px;
  padding: 56px 0 88px;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  max-width: 720px;
}

.hero-portrait {
  width: 100%;
  max-width: 460px;
  margin: 0;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.hero-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

.hero-portrait figcaption {
  display: grid;
  gap: 3px;
  padding: 14px 16px 15px;
  border-top: 1px solid var(--line);
}

.hero-portrait figcaption strong {
  font-size: 16px;
  line-height: 1.3;
}

.hero-portrait figcaption span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}

h1 {
  max-width: 15ch;
  margin: 0;
  font-size: 60px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.lead {
  max-width: 66ch;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.65;
}

.hero-copy .primary-cta {
  margin-top: 28px;
}

.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  color: var(--surface);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-cta:hover {
  color: var(--surface);
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
}

.compact-cta {
  min-height: 44px;
  margin-left: 8px;
  padding: 10px 16px;
  color: var(--surface) !important;
}

.compact-cta:hover {
  color: var(--surface) !important;
}

.proof-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 88px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.home-hero .proof-row {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  margin: 0;
}

.proof-row > div {
  min-width: 0;
  padding: 24px;
}

.proof-row > div + div {
  border-left: 1px solid var(--line);
}

.proof-row strong {
  display: block;
  font-size: 24px;
  line-height: 1.18;
}

.proof-row span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.featured-section,
.portfolio-section,
.audit-section,
.expert-section,
.contact-section {
  scroll-margin-top: 96px;
  margin-bottom: 104px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

.section-heading h2 {
  max-width: 18ch;
  margin: 0;
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1.08;
}

[data-field="featuredCases"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 16px;
}

[data-field="caseGrid"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

[data-field="expertGrid"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.catalog-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 270px;
  flex-direction: column;
  padding: 24px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.catalog-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.catalog-card {
  border-top: 5px solid var(--accent);
  padding-top: 20px;
}

.catalog-card__footer strong {
  color: var(--accent-dark);
  font-size: 22px;
}

.catalog-card.tone-dark .catalog-card__footer strong {
  color: var(--surface);
}

.catalog-card.feature-main,
.catalog-card.feature-side {
  grid-column: span 1;
  grid-row: auto;
  min-height: 360px;
  padding: 28px;
  border-top: 7px solid var(--accent);
}

.feature-main .catalog-card__body h3,
.feature-side .catalog-card__body h3 {
  max-width: 15ch;
  font-size: 30px;
}

.catalog-card.feature-main {
  grid-column: span 1;
  grid-row: auto;
  min-height: 360px;
  padding: 28px;
}

.catalog-card.feature-side {
  grid-column: span 1;
  min-height: 360px;
}

.catalog-card.tone-dark {
  color: var(--surface);
  background: var(--focus);
  border-color: var(--focus);
}

.catalog-card.tone-orange {
  border-top: 5px solid var(--accent);
  padding-top: 20px;
}

.catalog-card__top,
.catalog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card__category {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}

.catalog-card__category {
  color: var(--accent-dark);
  text-align: left;
}

.tone-dark .catalog-card__category,
.tone-dark .catalog-card__body p {
  color: #f6ded6;
}

.catalog-card__body {
  margin: auto 0;
  padding: 26px 0;
}

.catalog-card__body h3 {
  max-width: 18ch;
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.15;
}

.feature-main .catalog-card__body h3 {
  max-width: 13ch;
  font-size: 42px;
  line-height: 1.08;
}

.feature-side .catalog-card__body h3 {
  font-size: 26px;
}

.catalog-card__footer {
  min-width: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tone-dark .catalog-card__footer {
  border-top-color: rgba(255, 255, 255, 0.28);
}

.catalog-card__footer strong {
  max-width: calc(100% - 44px);
  margin-right: auto;
  font-size: 14px;
  line-height: 1.25;
  text-align: left;
}

.catalog-card__arrow {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--surface);
  background: var(--ink);
  border-radius: 50%;
  font-size: 16px;
  transition: transform 160ms ease;
}

.tone-dark .catalog-card__arrow {
  color: var(--focus);
  background: var(--surface);
}

.catalog-card:hover .catalog-card__arrow {
  transform: translate(2px, -2px);
}

[data-field="caseFilters"] {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

[data-field="caseFilters"] button {
  min-height: 44px;
  padding: 9px 16px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

[data-field="caseFilters"] button:hover {
  color: var(--focus);
  border-color: var(--focus);
}

[data-field="caseFilters"] button[aria-pressed="true"] {
  color: var(--surface);
  background: var(--focus);
  border-color: var(--focus);
}

.audit-section {
  padding: 52px;
  color: var(--surface);
  background: var(--focus);
  border-radius: 4px;
}

.audit-section .section-heading {
  border-top-color: rgba(255, 255, 255, 0.3);
}

.audit-section .eyebrow {
  color: #ffb3a6;
}

.audit-section ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
  counter-reset: audit-step;
}

.audit-section li {
  position: relative;
  min-height: 72px;
  padding: 20px 0 20px 46px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  counter-increment: audit-step;
}

.audit-section li::before {
  position: absolute;
  top: 20px;
  left: 0;
  color: #ffb3a6;
  font-weight: 800;
  content: counter(audit-step, decimal-leading-zero);
}

.expert-section {
  padding: 48px;
  background: var(--focus-light);
  box-shadow: 0 0 0 100vmax var(--focus-light);
  clip-path: inset(0 -100vmax);
}

.expert-section .section-heading {
  border-top-color: #edc8ba;
}

.material-card {
  min-height: 250px;
  border-color: #edc8ba;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 64px;
  align-items: start;
  padding: 52px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.contact-section .section-heading {
  margin: 0;
}

.contact-section form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-section label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.contact-section label:nth-of-type(4),
.contact-section form > p {
  grid-column: 1 / -1;
}

.contact-section input,
.contact-section textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #aaa69d;
  border-radius: 4px;
  outline: none;
}

.contact-section textarea {
  min-height: 132px;
  resize: vertical;
}

.contact-section input:hover,
.contact-section textarea:hover {
  border-color: var(--muted);
}

.contact-section [aria-invalid="true"] {
  background: #fff5f2;
  border-color: var(--accent-dark);
  box-shadow: inset 4px 0 0 var(--accent);
}

.contact-section form > p {
  min-height: 24px;
  margin: 0;
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 700;
}

.contact-section button {
  justify-self: start;
}

.article-shell {
  padding: 32px 0 88px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  align-items: end;
  gap: 48px;
  padding: 36px 0 48px;
}

.article-hero h1 {
  max-width: 18ch;
  font-size: 52px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.read-time {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.result-panel {
  padding: 28px;
  color: var(--surface);
  background: var(--focus);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.result-panel span {
  color: #ffb3a6;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-panel strong {
  display: block;
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.28;
}

.article-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.article-summary-metrics > div {
  min-width: 0;
  padding: 22px;
}

.article-summary-metrics > div + div {
  border-left: 1px solid var(--line);
}

.article-summary-metrics strong,
.article-summary-metrics span {
  display: block;
}

.article-summary-metrics strong {
  color: var(--accent-dark);
  font-size: 28px;
  line-height: 1.15;
}

.inline-evidence {
  display: grid;
  gap: 18px;
  margin: 28px 0 30px;
}

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

.inline-evidence__figure {
  min-width: 0;
  margin: 0;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}

.article-evidence__image-button {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: zoom-in;
}

.article-evidence__image-button:hover,
.article-evidence__image-button:focus-visible {
  border-color: var(--accent-dark);
  outline: 3px solid rgba(174, 50, 29, 0.18);
  outline-offset: 2px;
}

.article-evidence__image-button img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  object-position: center;
}

.inline-evidence__caption {
  margin-top: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

.inline-evidence__label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.content-section.dark .inline-evidence__figure {
  color: var(--ink);
  background: var(--surface);
}

.content-section.dark .inline-evidence__caption {
  color: var(--muted);
}

.evidence-viewer {
  width: min(94vw, 1400px);
  max-width: none;
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 24px 80px rgba(31, 27, 24, 0.35);
}

.evidence-viewer::backdrop {
  background: rgba(31, 27, 24, 0.78);
}

.evidence-viewer__panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: 92vh;
  padding: 48px 24px 20px;
}

.evidence-viewer img {
  width: 100%;
  max-height: calc(92vh - 110px);
  object-fit: contain;
}

.evidence-viewer p {
  margin: 14px 36px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.evidence-viewer__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.article-summary-metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.article-summary-metrics {
  border-top: 6px solid var(--accent);
}

.article-summary-metrics strong {
  font-size: 34px;
}

.case-infographic {
  margin: 0 0 40px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.case-infographic__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.case-infographic__heading > span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-infographic__heading h2 {
  max-width: 20ch;
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  text-align: right;
}

.case-infographic__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.case-infographic__step {
  position: relative;
  min-width: 0;
  min-height: 160px;
  padding: 26px 24px 22px 50px;
}

.case-infographic__step + .case-infographic__step {
  border-left: 1px solid var(--line);
}

.case-infographic__step::before {
  position: absolute;
  top: 26px;
  left: 16px;
  color: var(--surface);
  background: var(--accent-dark);
  border-radius: 50%;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  content: attr(data-index);
}

.case-infographic__step > span,
.case-infographic__step strong {
  display: block;
}

.case-infographic__step > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-infographic__step strong {
  margin-top: 12px;
  font-size: 19px;
  line-height: 1.35;
}

.case-infographic__step:last-child {
  background: #fff0e8;
}

.article-audit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 40px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 4px;
}

.article-audit-cta p {
  margin: 0;
  color: var(--muted);
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 36px;
}

.toc {
  position: sticky;
  top: 96px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc a {
  display: block;
  min-height: 44px;
  padding: 11px 4px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
  text-decoration: none;
}

.article-content {
  display: grid;
  gap: 0;
  min-width: 0;
}

.content-section {
  padding: 36px 0;
  background: transparent;
  border-top: 1px solid var(--line);
}

.content-section.dark {
  padding: 36px;
  color: var(--surface);
  background: var(--focus);
  border-top: 0;
}

.content-section h2 {
  margin: 0 0 18px;
  font-size: 34px;
  letter-spacing: 0;
  line-height: 1.15;
}

.content-section__index {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.content-section {
  position: relative;
  padding-left: 68px;
}

.content-section__index {
  display: none;
}

.content-section::before {
  position: absolute;
  top: 38px;
  left: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--surface);
  background: var(--accent-dark);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  content: attr(data-step);
}

.content-section.dark {
  padding-left: 92px;
}

.content-section.dark::before {
  left: 24px;
  color: var(--accent-dark);
  background: var(--surface);
}

.content-section p,
.content-section li {
  color: #4d4540;
  font-size: 17px;
  line-height: 1.72;
}

.content-section.dark p,
.content-section.dark li {
  color: #fff0ea;
}

.content-section p {
  margin: 0 0 16px;
}

.content-section p:last-child {
  margin-bottom: 0;
}

.content-section ul,
.content-section ol {
  margin: 0;
  padding-left: 24px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.metric {
  min-width: 0;
  min-height: 120px;
  padding: 18px;
  background: #fff5f2;
  border: 1px solid #f4b5a9;
  border-radius: 4px;
}

.dark .metric {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1.2;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.dark .metric span {
  color: #f6ded6;
}

.next-block {
  margin-top: 32px;
  padding: 28px;
  color: var(--surface);
  background: var(--ink);
  border-radius: 4px;
}

.next-block > p {
  margin: 0;
  font-weight: 700;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mini-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--surface);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.article-shell > .article-audit-cta:last-child {
  margin-top: 32px;
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 48px;
  color: var(--surface);
  background: var(--ink);
}

.footer p {
  max-width: 68ch;
  margin: 8px 0 0;
  color: #d8cdc6;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.tone-dark:focus-visible,
.footer a:focus-visible,
.next-block a:focus-visible {
  outline-color: var(--accent);
}

.audit-section .primary-cta:focus-visible {
  outline: 3px solid var(--surface);
  outline-offset: 3px;
}

.contact-section input:focus-visible,
.contact-section textarea:focus-visible {
  border-color: var(--focus);
  outline: 3px solid rgba(181, 46, 28, 0.22);
  outline-offset: 1px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    padding: 12px 24px;
  }

  .topnav {
    flex-wrap: wrap;
  }

  main {
    width: min(100% - 48px, 1180px);
  }

  .home-hero,
  .article-hero,
  .article-layout,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .home-hero {
    gap: 36px;
    padding: 44px 0 72px;
  }

  .home-hero .hero-copy,
  .home-hero .proof-row,
  .home-hero .hero-portrait {
    grid-column: 1;
    grid-row: auto;
  }

  .home-hero .hero-portrait {
    max-width: 520px;
    justify-self: start;
  }

  h1 {
    font-size: 50px;
  }

  .proof-row {
    margin-bottom: 72px;
  }

  [data-field="featuredCases"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-card.feature-main,
  .catalog-card.feature-side {
    grid-column: span 1;
    grid-row: auto;
    min-height: 340px;
  }

  .catalog-card.feature-main {
    grid-column: span 2;
    min-height: 400px;
  }

  [data-field="caseGrid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-section ol {
    grid-template-columns: 1fr;
  }

  .contact-section {
    gap: 36px;
  }

  .article-hero h1 {
    font-size: 46px;
  }

  .result-panel {
    max-width: 620px;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 720px) {
  .inline-evidence--comparison {
    grid-template-columns: 1fr;
  }

  .inline-evidence__figure {
    padding: 9px;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 72px;
  }

  .topbar {
    position: sticky;
    align-items: center;
    flex-direction: row;
    gap: 12px;
    min-height: 64px;
    padding: 8px 14px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
    font-size: 14px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .topnav {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .secondary-nav {
    display: none;
  }

  .compact-cta {
    width: auto;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    white-space: nowrap;
  }

  main {
    width: min(100% - 28px, 1180px);
  }

  .evidence-viewer__panel {
    padding: 52px 12px 16px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0 64px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.05;
  }

  .lead {
    margin-top: 16px;
    font-size: 17px;
    line-height: 1.5;
  }

  .hero-copy .primary-cta,
  .audit-section > .primary-cta,
  .contact-section button {
    width: 100%;
  }

  .hero-copy .primary-cta {
    margin-top: 20px;
  }

  .proof-row {
    grid-template-columns: 1fr;
    margin: 0;
  }

  .proof-row > div {
    padding: 16px 18px;
  }

  .proof-row strong {
    font-size: 20px;
  }

  .proof-row span {
    font-size: 13px;
  }

  .proof-row > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .featured-section,
  .portfolio-section,
  .audit-section,
  .expert-section,
  .contact-section {
    margin-bottom: 72px;
    scroll-margin-top: 24px;
  }

  .section-heading h2 {
    font-size: 32px;
  }

  [data-field="featuredCases"],
  [data-field="caseGrid"],
  [data-field="expertGrid"] {
    grid-template-columns: 1fr;
  }

  .catalog-card,
  .catalog-card.feature-main,
  .catalog-card.feature-side {
    grid-column: span 1;
    min-height: 280px;
    padding: 22px;
  }

  .catalog-card.feature-main {
    min-height: 340px;
  }

  .feature-main .catalog-card__body h3,
  .feature-side .catalog-card__body h3 {
    font-size: 28px;
  }

  .catalog-card__footer {
    align-items: flex-end;
    flex-wrap: wrap;
  }

  .catalog-card__footer > span:first-child {
    flex-basis: 100%;
  }

  .catalog-card__footer strong {
    max-width: calc(100% - 46px);
    text-align: left;
  }

  [data-field="caseFilters"] button {
    flex: 1 1 auto;
  }

  .audit-section,
  .expert-section,
  .contact-section {
    padding: 28px 22px;
  }

  .contact-section form,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .contact-section label,
  .contact-section label:nth-of-type(4) {
    grid-column: 1;
  }

  .article-shell {
    padding: 20px 0 64px;
  }

  .article-hero {
    gap: 28px;
    padding: 24px 0 36px;
  }

  .article-hero h1 {
    font-size: 36px;
  }

  .article-audit-cta {
    align-items: stretch;
    flex-direction: column;
  }

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

  .article-summary-metrics > div {
    padding: 18px;
  }

  .article-summary-metrics > div + div {
    border-left: 0;
  }

  .article-summary-metrics > div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .article-summary-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .case-infographic {
    padding: 24px 18px;
  }

  .case-infographic__heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .case-infographic__heading h2 {
    font-size: 25px;
    text-align: left;
  }

  .case-infographic__track {
    grid-template-columns: 1fr;
  }

  .case-infographic__step {
    min-height: 0;
    padding: 22px 16px 22px 50px;
  }

  .case-infographic__step + .case-infographic__step {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .case-infographic__step::before {
    top: 22px;
  }

  .article-audit-cta .primary-cta {
    width: 100%;
  }

  .content-section {
    padding: 28px 0;
  }

  .content-section.dark {
    padding: 28px 20px;
  }

  .content-section {
    padding-left: 54px;
  }

  .content-section.dark {
    padding-left: 70px;
  }

  .content-section::before {
    top: 30px;
    width: 38px;
    height: 38px;
  }

  .content-section.dark::before {
    left: 18px;
  }

  .content-section h2 {
    font-size: 28px;
  }

  .content-section p,
  .content-section li {
    font-size: 16px;
  }

  .mini-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 32px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    transform: none !important;
  }
}
