:root {
  /* Primer-inspired semantic surfaces with APHR teal as the accent family. */
  --fg-default: #1f2328;
  --fg-muted: #59636e;
  --fg-subtle: #8c959f;
  --fg-on-emphasis: #ffffff;
  --canvas-default: #ffffff;
  --canvas-subtle: #f6f8fa;
  --canvas-inset: #eff2f5;
  --canvas-translucent: rgb(246 248 250 / 96%);
  --border-muted: #e6ebef;
  --border-default: #d0d7de;
  --border-strong: #afb8c1;
  --accent-fg: #1f666a;
  --accent-fg-hover: #174f52;
  --accent-bg-subtle: #eef7f7;
  --accent-bg-muted: #e3f1f1;
  --accent-border-muted: #9fcacc;
  --accent-border-emphasis: #1f666a;
  --attention-fg: #9a6700;
  --attention-bg-subtle: #fff8c5;
  --attention-border-muted: rgb(212 167 44 / 40%);
  --tooltip-bg: #25292e;
  --overlay-backdrop: rgb(31 35 40 / 28%);
  --focus: rgb(31 102 106 / 32%);
  --shadow: 0 8px 24px rgb(31 35 40 / 8%);
  --shadow-drawer: -12px 0 32px rgb(31 35 40 / 12%);
  --content-width: 860px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;

  /* Stable aliases shared with report.css and legacy generated pages. */
  --ink: var(--fg-default);
  --muted: var(--fg-muted);
  --line: var(--border-default);
  --line-muted: var(--border-muted);
  --panel: var(--canvas-default);
  --soft: var(--canvas-subtle);
  --teal: var(--accent-fg);
  --teal-hover: var(--accent-fg-hover);
  --teal-soft: var(--accent-bg-subtle);
  --amber: var(--attention-fg);
  --amber-soft: var(--attention-bg-subtle);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-3);
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--panel);
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-shell {
  min-height: calc(100vh - 48px);
  min-height: calc(100svh - 48px);
}

.site-main {
  width: 100%;
  max-width: calc(var(--content-width) + var(--space-4) + var(--space-4));
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-6);
}

/* Shared application chrome */

.global-topbar {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: var(--canvas-default);
  border-bottom: 1px solid var(--line);
}

.global-breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.global-breadcrumb a {
  color: var(--ink);
  text-decoration: none;
}

.global-breadcrumb .crumb {
  min-width: 0;
}

.global-breadcrumb .crumb:first-child,
.global-breadcrumb .crumb-separator {
  flex: 0 0 auto;
}

.global-breadcrumb .crumb:not(:first-child) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-breadcrumb a:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.global-breadcrumb .crumb-current {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

.global-breadcrumb .crumb-separator {
  color: var(--fg-subtle);
  font-size: 16px;
}

.content-menu-button {
  appearance: none;
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.content-menu-button:hover {
  background: var(--canvas-inset);
  border-color: var(--border-strong);
}

.content-menu-button::after {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  padding: 5px 8px;
  background: var(--tooltip-bg);
  border-radius: 4px;
  color: var(--fg-on-emphasis);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.content-menu-button:hover::after,
.content-menu-button:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.content-label {
  display: none;
}

.hamburger {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 12px;
}

.hamburger::before,
.hamburger::after,
.hamburger span {
  position: absolute;
  left: 0;
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  content: "";
}

.hamburger::before {
  top: 0;
}

.hamburger span {
  top: 5px;
}

.hamburger::after {
  bottom: 0;
}

.site-nav-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.site-nav-shell.is-open {
  pointer-events: auto;
}

.site-nav-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-backdrop);
  opacity: 0;
  transition: opacity 160ms ease;
}

.site-nav-shell.is-open .site-nav-backdrop {
  opacity: 1;
}

.site-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(360px, 90vw);
  height: 100dvh;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-drawer);
  transform: translateX(calc(100% + 40px));
  transition: transform 180ms ease;
}

.site-nav-shell.is-open .site-nav-panel {
  transform: translateX(0);
}

.site-nav-header {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--canvas-subtle);
  border-bottom: 1px solid var(--line);
}

.site-nav-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.site-nav-close {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.site-nav-close:hover {
  background: var(--canvas-inset);
}

.site-toc-links {
  display: grid;
  gap: 2px;
  padding: 12px;
}

.site-toc-links a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.site-toc-links a:hover {
  background: var(--canvas-inset);
  color: var(--teal);
}

/* Shared content axis and identity */

.brand-strip,
.site-header,
.timeline-section,
.featured-product-section,
.acknowledgments-section,
.site-footer {
  width: 100%;
  max-width: var(--content-width);
  margin-right: auto;
  margin-left: auto;
}

.brand-strip {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(48px, 64px) minmax(0, 380px);
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, var(--space-3));
  margin-top: var(--space-1);
  padding: var(--space-3) 0 var(--space-1);
  border-top: 1px solid var(--line-muted);
}

.brand-logo {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-nsf-steer img {
  width: 260px;
}

.brand-logo-peer img {
  width: 64px;
  height: 64px;
}

.brand-logo-stairlab img {
  width: 380px;
}

.site-header {
  padding: var(--space-1) 0 0;
  background: var(--canvas-default);
  text-align: left;
}

.site-header::after,
.report-header::after {
  display: none;
}

.eyebrow,
.site-eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-eyebrow {
  margin: 0 0 8px;
}

.site-title {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.site-subtitle {
  max-width: 700px;
  margin: var(--space-1) 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.top-link:hover {
  color: var(--teal-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.note {
  max-width: 860px;
  margin: var(--space-3) auto;
  padding: 12px var(--space-2);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

/* Homepage and event indexes */

.timeline-section {
  margin-top: var(--space-4);
}

.featured-product-section {
  margin-top: var(--space-4);
}

.section-heading,
.acknowledgments-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0 0 var(--space-1);
  background: var(--canvas-default);
  text-align: left;
}

.section-heading::after,
.acknowledgments-header::after {
  height: 1px;
  flex: 1 1 auto;
  background: var(--line-muted);
  content: "";
}

.section-heading h2,
.acknowledgments-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.timeline-empty {
  margin: 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-muted);
  color: var(--muted);
  font-size: 14px;
  text-align: left;
}

.timeline-list {
  position: relative;
  display: grid;
  max-width: none;
  margin: 0;
  padding-left: 120px;
}

.timeline-list::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 96px;
  width: 1px;
  background: var(--line-muted);
  content: "";
}

.timeline-item {
  position: relative;
}

.timeline-index {
  position: absolute;
  top: var(--space-2);
  left: -120px;
  width: 104px;
  min-height: 24px;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--panel);
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--panel);
}

.timeline-date {
  width: 80px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-align: right;
}

.timeline-date span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-weight: 400;
}

.timeline-body {
  display: grid;
  gap: 4px;
  padding: var(--space-2) 0;
  background: var(--canvas-default);
  border-bottom: 1px solid var(--line-muted);
}

.timeline-item.is-latest .timeline-dot {
  background: var(--accent-fg);
  border-color: var(--accent-fg);
}

.timeline-item.is-latest .timeline-kicker {
  color: var(--accent-fg);
  font-weight: 600;
}

.timeline-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.timeline-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.timeline-meta span {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: 400;
}

.timeline-meta span:not(:last-child)::after {
  margin: 0 var(--space-1);
  color: var(--fg-subtle);
  content: "\00b7";
}

.timeline-link {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.timeline-link:hover {
  color: var(--teal-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.timeline-link span {
  transition: transform 120ms ease;
}

.timeline-link:hover span {
  transform: translateX(2px);
}

.featured-product-list {
  display: grid;
  max-width: none;
  margin: 0;
}

.featured-product {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2);
  background: var(--canvas-default);
  border: 1px solid var(--border-default);
  border-radius: 6px;
}

.featured-product h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.featured-product p {
  max-width: 760px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Acknowledgments use the same compact row language as activity. */

.acknowledgments-section {
  margin-top: var(--space-6);
}

.acknowledgments-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.acknowledgment-row {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-muted);
}

.acknowledgment-row:last-child {
  border-bottom: 0;
}

.acknowledgment-title,
.acknowledgment-copy {
  margin: 0;
}

.acknowledgment-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.acknowledgment-copy {
  max-width: 70ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.acknowledgment-copy a {
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
}

.acknowledgment-copy a:hover {
  color: var(--teal-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.newscatcher-logo {
  display: block;
  width: 164px;
  max-width: 100%;
  opacity: 0.84;
  transition: opacity 120ms ease;
}

.newscatcher-logo:hover {
  opacity: 1;
}

.newscatcher-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.newscatcher-copy .acknowledgment-title {
  margin-bottom: 2px;
}

/* Legacy index primitives retained for existing generated pages. */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.tag {
  display: inline-block;
  width: max-content;
  margin-bottom: 12px;
  padding: 3px 7px;
  background: var(--canvas-default);
  border: 1px solid var(--border-default);
  border-radius: 2em;
  color: var(--teal);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.meta,
.desc {
  line-height: 1.55;
}

.meta {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.desc {
  margin: 0 0 18px;
  color: var(--ink);
}

.button {
  display: inline-block;
  margin-top: auto;
  padding: 8px 12px;
  background: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  color: var(--fg-on-emphasis);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  background: var(--teal-hover);
  border-color: var(--teal-hover);
}

.button.secondary {
  background: var(--panel);
  color: var(--teal);
}

.button.secondary:hover {
  background: var(--canvas-inset);
}

.product-header {
  margin-bottom: 24px;
  padding: 22px 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.product-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-title {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 2em;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.site-footer {
  margin-top: var(--space-6);
  padding: var(--space-3) 0 var(--space-1);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

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

.site-footer-credit {
  margin: 0;
}

/* Site visit counter */

.site-counter {
  display: flex;
  width: auto;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.site-counter[hidden] {
  display: none;
}

.site-counter img {
  display: inline-block;
  width: auto;
  height: 16px;
  opacity: 0.8;
}

/* Keyboard and motion preferences */

:where(a, button):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus);
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: var(--space-2);
  }

  .global-topbar {
    min-height: 48px;
    padding: 0 16px;
  }

  .global-breadcrumb {
    gap: 5px;
    font-size: 13px;
  }

  .global-breadcrumb .optional-crumb {
    display: none;
  }

  .content-menu-button .content-label {
    display: none;
  }

  .site-main {
    padding: var(--space-3) var(--space-2) var(--space-5);
  }

  .brand-strip {
    grid-template-columns: minmax(0, 240px) 56px minmax(0, 340px);
    gap: 20px;
    padding-top: var(--space-3);
  }

  .brand-logo-nsf-steer img {
    width: 240px;
  }

  .brand-logo-peer img {
    width: 56px;
    height: 56px;
  }

  .brand-logo-stairlab img {
    width: 340px;
  }

  .site-header {
    padding-top: 0;
  }

  .site-title {
    font-size: 30px;
  }

  .site-subtitle {
    font-size: 15px;
  }

  .timeline-section,
  .featured-product-section {
    margin-top: var(--space-3);
  }

  .timeline-list {
    padding-left: var(--space-3);
  }

  .timeline-list::before {
    left: 4px;
  }

  .timeline-index {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    width: auto;
    min-height: 22px;
    align-items: center;
    margin: var(--space-2) 0 0 -24px;
    padding-left: var(--space-3);
  }

  .timeline-dot {
    top: 6px;
    right: auto;
    left: 0;
    box-shadow: 0 0 0 3px var(--panel);
  }

  .timeline-date {
    display: flex;
    width: auto;
    gap: 4px;
    text-align: left;
  }

  .timeline-date span {
    display: inline;
    margin: 0;
  }

  .timeline-body {
    padding: var(--space-1) 0 var(--space-2);
  }

  .timeline-title {
    font-size: 17px;
  }

  .featured-product {
    padding: 16px;
  }

  .acknowledgments-section {
    margin-top: 40px;
  }

  .acknowledgment-row {
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
    padding: 14px 0;
  }

  .newscatcher-logo {
    width: min(156px, 100%);
    margin-bottom: 2px;
  }

  .product-title {
    font-size: 26px;
  }

  .site-footer {
    margin-top: 40px;
    line-height: 1.5;
  }
}

@media (max-width: 708px) {
  .brand-strip {
    grid-template-columns: minmax(0, 232px) 56px;
    justify-content: start;
    column-gap: clamp(16px, 6vw, 28px);
    row-gap: var(--space-2);
  }

  .brand-logo {
    justify-content: flex-start;
  }

  .brand-logo-nsf-steer img {
    width: min(232px, 100%);
  }

  .brand-logo-stairlab {
    grid-column: 1 / -1;
  }

  .brand-logo-stairlab img {
    width: min(340px, 100%);
  }
}
