:root {
  --bg: #f4f5f1;
  --ink: #182428;
  --muted: #596971;
  --accent: #245cdc;
  --line: #cbd4d5;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Arial, Helvetica, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
::selection { background: #d3e0ff; color: var(--ink); }
.wrap { width: min(1160px, calc(100% - 96px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; top: 12px; left: 12px; background: var(--accent); color: #fff; padding: 14px; z-index: 100; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }

/* Laboratory identity and navigation. Product pages use their own styles. */
.site-header { border-bottom: 1px solid var(--line); position: relative; z-index: 20; background: var(--bg); }
.header-inner { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 13px; font-size: 27px; font-weight: 600; line-height: 1; letter-spacing: -.045em; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; color: var(--accent); }
.brand-caption { display: block; font: 9px/1.5 var(--mono); letter-spacing: .045em; color: var(--muted); margin-top: 7px; }
.main-nav { display: flex; gap: 30px; align-items: center; font-size: 14px; }
.main-nav a { padding: 13px 0; }
.main-nav a:hover { color: var(--accent); }
.menu-toggle { display: none; background: transparent; border: 1px solid var(--line); width: 44px; height: 44px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; }
.menu-toggle span { width: 19px; height: 1px; background: var(--ink); transition: transform .2s; }

/* A project directory with a quiet, secondary resource column. */
.directory { display: grid; grid-template-columns: minmax(0, 1fr) 278px; gap: 64px; padding-block: 44px 56px; }
.directory-content { min-width: 0; }
.eyebrow, .section-note, .project-category, .direction-stage { font: 11px/1.6 var(--mono); letter-spacing: .025em; }
.eyebrow { color: var(--accent); margin-bottom: 17px; }
h1 { font: 400 clamp(38px, 3.5vw, 49px)/1.1 var(--serif); letter-spacing: -.035em; }
.lab-intro > p:last-child { font-size: 16px; line-height: 1.75; color: var(--muted); max-width: 620px; margin-top: 21px; }
.lab-intro { margin-bottom: 38px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--ink); }
.section-heading h2 { font-size: 20px; line-height: 1.4; font-weight: 500; letter-spacing: -.02em; }
.section-note { color: var(--muted); white-space: nowrap; }
.project-entry { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 25px; padding-top: 26px; }
.project-image { align-self: start; background: #0c100e; border: 1px solid #26382c; padding: 5px; }
.project-image img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.project-title { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.project-title h3 { font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -.025em; }
.project-title a:hover { color: var(--accent); }
.project-category { color: var(--muted); }
.project-description { font-size: 15px; line-height: 1.75; margin-top: 12px; color: var(--muted); max-width: 530px; }
.project-stage { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.65; margin-top: 16px; color: var(--accent); }
.stage-dot { width: 5px; height: 5px; flex-shrink: 0; background: var(--accent); }
.project-note { font-size: 13px; line-height: 1.7; color: var(--muted); margin-top: 4px; }
.project-link { display: inline-flex; align-items: center; gap: 20px; color: var(--accent); font-size: 14px; line-height: 1.5; min-height: 44px; margin-top: 10px; }
.project-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.projects .project-entry + .project-entry { margin-top: 26px; border-top: 1px solid var(--line); }
.directions { margin-top: 39px; }
.section-description { font-size: 14px; line-height: 1.75; color: var(--muted); margin-top: 18px; }
.direction-list { list-style: none; padding: 0; margin: 7px 0 0; }
.direction-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 25px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.direction-list h3 { font-size: 18px; line-height: 1.4; font-weight: 500; letter-spacing: -.015em; }
.direction-list p { font-size: 14px; line-height: 1.75; color: var(--muted); margin-top: 7px; max-width: 530px; }
.direction-stage { color: var(--muted); padding-top: 3px; flex-shrink: 0; }

.lab-sidebar { border-left: 1px solid var(--line); padding-left: 28px; align-self: start; margin-top: 4px; }
.sidebar-section h2 { font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -.01em; }
.resource-link { display: block; padding: 23px 0; border-bottom: 1px solid var(--line); }
.resource-title { display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 17px; line-height: 1.4; }
.resource-title > span { color: var(--accent); }
.resource-description { display: block; font-size: 14px; line-height: 1.75; color: var(--muted); margin-top: 8px; }
.resource-host { display: block; font: 11px/1.8 var(--mono); color: var(--accent); margin-top: 8px; }
.resource-link:hover .resource-title { color: var(--accent); }
.contact-section { margin-top: 30px; }
.contact-section p { font-size: 14px; line-height: 1.75; color: var(--muted); margin-top: 12px; }
.contact-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; color: var(--accent); line-height: 1.5; min-height: 44px; margin-top: 7px; }
.contact-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.footer-field { font: 11px/1.6 var(--mono); }
.site-footer > a { padding-block: 10px; }
.site-footer > a:hover { color: var(--accent); }
.error-page { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 22px; }
.error-page .eyebrow { margin: 0; }
.error-page > p:not(.eyebrow) { color: var(--muted); font-size: 16px; line-height: 1.7; max-width: 490px; }
.error-link { color: var(--accent); padding-block: 12px; font-size: 14px; }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 64px); }
  .directory { grid-template-columns: minmax(0, 1fr) 250px; gap: 38px; }
  .lab-sidebar { padding-left: 24px; }
  .project-entry { grid-template-columns: 80px minmax(0, 1fr); gap: 20px; }
  .project-title { gap: 10px; }
}
@media (max-width: 800px) {
  .wrap { width: calc(100% - 48px); }
  .header-inner { min-height: 80px; }
  .brand { font-size: 25px; }
  .brand-mark { width: 38px; height: 38px; }
  .directory { grid-template-columns: 1fr; gap: 38px; padding-block: 32px 40px; }
  .lab-intro { margin-bottom: 32px; }
  .project-entry { grid-template-columns: 88px minmax(0, 1fr); gap: 22px; }
  .directions { margin-top: 34px; }
  .lab-sidebar { margin-top: 0; border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 24px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 36px; }
  .contact-section { margin-top: 0; }
  .resource-link:last-child { border-bottom: 0; padding-bottom: 0; }
  .footer-field { display: none; }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { gap: 16px; }
  .brand { gap: 10px; }
  .brand-caption { font-size: 9px; letter-spacing: .01em; }
  .js .menu-toggle { display: flex; flex-shrink: 0; }
  .js .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--line); align-items: stretch; flex-direction: column; gap: 0; }
  .js .main-nav.is-open { display: flex; }
  .main-nav a { padding-block: 14px; border-bottom: 1px solid var(--line); }
  .main-nav a:last-child { border: 0; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  html:not(.js) .header-inner { padding-block: 18px; flex-wrap: wrap; gap: 14px; }
  html:not(.js) .main-nav { gap: 25px; }
  html:not(.js) .main-nav a { border: 0; padding-block: 5px; }
  .directory { padding-top: 29px; gap: 32px; }
  h1 { font-size: 38px; }
  .eyebrow { margin-bottom: 15px; }
  .lab-intro > p:last-child { margin-top: 18px; }
  .section-heading { padding-bottom: 14px; }
  .section-heading h2 { font-size: 19px; }
  .section-note { font-size: 11px; }
  .project-entry { grid-template-columns: 64px minmax(0, 1fr); column-gap: 17px; row-gap: 0; padding-top: 22px; }
  .project-image { padding: 3px; }
  .project-details { display: contents; }
  .project-title { display: block; grid-column: 2; align-self: center; }
  .project-title h3 { font-size: 27px; }
  .project-category { display: block; margin-top: 7px; }
  .project-description, .project-stage, .project-note, .project-link { grid-column: 1 / -1; }
  .project-description { font-size: 15px; margin-top: 18px; }
  .project-stage { margin-top: 14px; }
  .project-link { justify-self: start; margin-top: 8px; }
  .directions { margin-top: 30px; }
  .direction-list li { gap: 16px; padding-block: 20px; }
  .direction-list h3 { font-size: 17px; }
  .direction-stage { font-size: 11px; }
  .lab-sidebar { display: block; }
  .resource-link { padding-block: 20px; }
  .resource-link:last-child { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  .contact-section { margin-top: 26px; }
  .site-footer { font-size: 12px; padding-block: 15px; }
  .error-page { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
