/* Shared finishing layer: preserve the established palette and page composition. */
:root {
  --header-height: 96px;
  --reading-offset: calc(var(--header-height) + 24px);
  --z-navigation: 30;
  --motion-feedback: 180ms;
  --motion-surface: 240ms;
  --reading-measure: 68ch;
}
html { scroll-padding-top: var(--reading-offset); }
html:not(.js) { scroll-padding-top: 24px; }
html.js .site-header { position: sticky; top: 0; z-index: var(--z-navigation); }
.site-header { isolation: isolate; }
.header-inner { min-height: var(--header-height); }
body.menu-open .site-header { z-index: var(--z-navigation); }
.main-nav > a:not(.button) { position: relative; }
.main-nav > a[aria-current="page"] { color: var(--olive); }
.main-nav > a:not(.button)::after {
  content: "";
  position: absolute;
  height: 2px;
  inset-inline: 0;
  bottom: 10px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion-feedback) var(--ease-out);
}
.main-nav > a[aria-current="page"]::after { transform: scaleX(1); }
.breadcrumb { flex-wrap: wrap; row-gap: 6px; line-height: 1.6; }
.article-toc { top: var(--reading-offset); }
.article-content > section, .form-status { scroll-margin-top: 24px; }
h1, h2, h3 { text-wrap: balance; }
.hero-intro, .page-hero-aside > p, .product-hero-aside > p,
.intro-editorial p, .question-list p, .step p, .about-story p,
.article-content p, .legal-page p { text-wrap: pretty; }
.intro-editorial p, .article-content p, .question-list p, .legal-page p { max-width: var(--reading-measure); }
.eyebrow { font-variant-numeric: tabular-nums; }
.product-note { flex-wrap: wrap; row-gap: 8px; }
.catalog-name { overflow-wrap: anywhere; }
.catalog-row { transition: background-color var(--motion-feedback) ease; }
.catalog-row:focus-within { background: var(--surface); }
.catalog-result-count { font-variant-numeric: tabular-nums; }
.catalog-tools { border: 1px solid var(--line); }
.catalog-reset { min-height: 44px; }
.editorial-link { transition: background-color var(--motion-surface) ease; }
.editorial-link:focus-visible { outline-offset: 6px; }
.editorial-link > div, .resource-feature > p { min-width: 0; }
.link-arrow { flex-shrink: 0; }
.spec-list > div { align-items: baseline; }
.spec-list dd { line-height: 1.65; }
.question-list > li { align-items: baseline; }
.question-list h3 { line-height: 1.4; }
.resource-feature { border: 1px solid var(--line); }
.resource-feature:nth-child(2) { border-color: var(--yellow); }
.resource-feature .text-link { margin-top: auto; }
.document-roles { gap: 16px; }
.document-roles > div { border: 1px solid var(--line); padding: 22px 24px; background: var(--surface); }
.document-roles h3 { color: var(--olive); }
.document-roles p { max-width: var(--reading-measure); }
.brief-template dt, .brief-template dd { line-height: 1.65; }
.brief-template dd { margin: 0; }
.faq-list summary { transition: color var(--motion-feedback) ease; }
.faq-list details[open] summary { color: var(--olive); }
.faq-list details[open] { border-bottom-color: var(--olive); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field label { font-size: 14px; }
.field input, .field select, .field textarea { transition: border-color var(--motion-feedback) ease, background-color var(--motion-feedback) ease; }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); }
.field-help, .form-privacy, .security-status { line-height: 1.65; }
.form-status:not(:empty) { border-radius: 2px; }
.form-status[data-state="pending"] { border-color: var(--line); }
.button:not(:disabled), .catalog-reset, .menu-toggle { transition: transform 120ms var(--ease-out), background-color var(--motion-feedback) ease, border-color var(--motion-feedback) ease; }
.footer-links a { min-height: 40px; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.footer-links .eyebrow { line-height: 1.6; }
.footer-bottom { line-height: 1.7; }
.dark :is(a, button):focus-visible { outline-color: var(--yellow); }
.button-yellow:focus-visible { outline-offset: 6px; }
@media (hover:hover) and (pointer:fine) {
  .main-nav > a:not(.button):hover { text-decoration: none; }
  .main-nav > a:not(.button):hover::after { transform: scaleX(1); }
  .editorial-link:hover, .catalog-row:hover { background: var(--surface); }
  .related-section .editorial-link:hover { background: var(--paper); }
  .faq-list summary:hover { color: var(--olive); }
  .button:not(:disabled):hover .arrow, .text-link:hover .arrow { transform: translate(3px,-3px); }
  .footer-links a:hover { color: var(--yellow); }
}
/* This is a reading indicator, not a replacement for the browser's scrolling. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion:no-preference) {
    html.js .site-header::after {
      content: "";
      position: absolute;
      inset-inline: var(--gutter);
      bottom: 0;
      height: 2px;
      background: var(--olive);
      pointer-events: none;
      transform-origin: left;
      animation: reading-progress linear both;
      animation-duration: auto;
      animation-timeline: scroll(root block);
    }
  }
}
@keyframes reading-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width:767px) {
  :root { --header-height: 80px; }
  .main-nav { top: var(--header-height); max-height: calc(100dvh - var(--header-height)); overflow-y: auto; overscroll-behavior: contain; }
  html:not(.js) .main-nav { max-height: none; overflow: visible; }
  .main-nav > a:not(.button)::after { display: none; }
  .main-nav > a[aria-current="page"] { text-decoration: underline; }
  .article-toc { position: static; }
  .editorial-link p { font-size: 14px; }
  .catalog-name { font-size: 15px; }
  .catalog-row .text-link { font-size: 12px; min-height: 44px; }
  .catalog-footnote, .article-toc > p:last-child { font-size: 12px; line-height: 1.65; }
  .footer-links a { font-size: 13px; min-height: 44px; }
  .footer-links > div:last-child a { width: auto; display: block; padding-right: 0; }
  .footer-links > div:last-child { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .footer-links > div:last-child .eyebrow { grid-column: 1/-1; margin-bottom: 8px; }
  .footer-links > div:last-child a:last-child { grid-column: 1/-1; }
  .document-roles > div { padding: 20px; }
  .form-grid { gap: 20px; }
  .field-help, .form-privacy { font-size: 13px; }
}
@media (max-width:380px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .catalog-row .text-link { min-height: 44px; }
  .footer-links > div:last-child { column-gap: 17px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  .site-header::after { display: none; }
  .main-nav > a::after, .editorial-link, .catalog-row,
  .faq-list summary, .button, .catalog-reset, .menu-toggle,
  .field input, .field select, .field textarea { transition: none; }
}
