/* Artann Laboratories — design system
   Ink is petrol, not black. Oxide red is sampled from the 1995 logo. */

:root {
  --ink:      #16232E;
  --ink-2:    #41525F;
  --ink-3:    #5B6C78;   /* AA on both white and --paper-2 */
  --paper:    #FFFFFF;
  --paper-2:  #F1F4F6;
  --paper-3:  #E4EAEE;
  --oxide:    #8C2110;
  --oxide-2:  #AE3418;
  --rule:     #D7DFE4;
  --rule-2:   #EAEFF2;

  --measure: 68ch;
  --wrap: 1180px;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--oxide); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--oxide-2); }

:focus-visible { outline: 2px solid var(--oxide); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- headings ---------- */

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;   /* e.g. "MicroChromatography" on a narrow screen */
}
h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.9rem); line-height: 1.15; margin: 0 0 .6em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem); line-height: 1.2; margin: 2.4em 0 .7em; }
h3 { font-size: 1.22rem; line-height: 1.3; font-weight: 600; margin: 2em 0 .5em; }
h4 { font-size: 1.05rem; font-weight: 600; margin: 1.8em 0 .4em; }

p { margin: 0 0 1.1em; }

/* ---------- header ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 210px; height: auto; display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-list > li { position: relative; list-style: none; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; margin: 0; padding: 0; list-style: none; gap: 2px; }

.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 13px;
  font-size: .93rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  border-radius: 3px; white-space: nowrap;
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link[aria-current="page"], .nav-link.is-section {
  color: var(--oxide);
  box-shadow: inset 0 -2px 0 var(--oxide);
  border-radius: 3px 3px 0 0;
}
.nav-link .chev { width: 9px; height: 9px; flex: none; opacity: .55; }

.has-menu > .menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 292px; padding: 8px;
  background: var(--paper);
  border: 1px solid var(--rule); border-radius: 4px;
  box-shadow: 0 12px 34px -14px rgba(22,35,46,.34);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s;
}
.has-menu:hover > .menu,
.has-menu:focus-within > .menu { opacity: 1; visibility: visible; transform: none; }
@media (prefers-reduced-motion: reduce) { .has-menu > .menu { transition: none; } }

.menu a {
  display: block; padding: 7px 10px;
  font-size: .9rem; color: var(--ink-2); text-decoration: none; border-radius: 3px;
}
.menu a:hover { background: var(--paper-2); color: var(--oxide); }
.menu .sub a { padding-left: 24px; font-size: .855rem; color: var(--ink-3); }
.menu .sub .sub a { padding-left: 38px; }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--rule); border-radius: 3px;
  padding: 8px 11px; cursor: pointer; color: var(--ink);
  font: inherit; font-size: .9rem;
}

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--rule); background: var(--paper); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,420px);
  gap: 64px; align-items: center;
  padding-block: clamp(48px, 7vw, 92px);
}
.hero h1 { max-width: 22ch; margin-bottom: .5em; }
.hero .lede { font-size: 1.09rem; color: var(--ink-2); max-width: 46ch; margin-bottom: 1.8em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-block; padding: 11px 20px;
  font-size: .95rem; font-weight: 500; text-decoration: none;
  border-radius: 3px; border: 1px solid var(--oxide);
  background: var(--oxide); color: #fff;
}
.btn:hover { background: var(--oxide-2); border-color: var(--oxide-2); color: #fff; }
.btn-ghost { background: none; color: var(--oxide); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--oxide); color: var(--oxide); }

/* the palpation field: the one bold element */
.sensor { margin: 0; }
.sensor-frame {
  position: relative;
  border: 1px solid var(--rule); border-radius: 3px;
  background: var(--paper-2); overflow: hidden;
  aspect-ratio: 4 / 3;
}
.sensor-frame canvas { display: block; width: 100%; height: 100%; }
.sensor figcaption {
  margin-top: 10px; font-size: .82rem; line-height: 1.5; color: var(--ink-3); max-width: 42ch;
}
.sensor figcaption b { color: var(--ink-2); font-weight: 500; }

/* ---------- facts ---------- */

.facts { border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.facts dl {
  margin: 0; padding-block: 30px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
}
/* scoped to the dl's children: a bare `.facts div` also hits .wrap */
.facts dl > div { border-left: 2px solid var(--oxide); padding-left: 14px; }
.facts dt {
  font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.facts dd { margin: 4px 0 0; font-size: .855rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- sections ---------- */

.section { padding-block: clamp(52px, 6vw, 84px); }
.section + .section { border-top: 1px solid var(--rule-2); }
.section-head { max-width: var(--measure); margin-bottom: 40px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--ink-2); margin-bottom: 0; }

/* a table of contents for the portfolio, not a card grid */
.index-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.index-list > li { border-bottom: 1px solid var(--rule); }
.index-list > li.row {
  display: grid; grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
  gap: 12px 44px; padding: 26px 0; align-items: start;
}
.index-title {
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.3; font-weight: 500; margin: 0;
}
.index-title a { color: var(--ink); text-decoration: none; }
.index-title a:hover { color: var(--oxide); text-decoration: underline; }
.index-desc { margin: 0; font-size: .93rem; color: var(--ink-2); line-height: 1.6; }
.index-subs { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.index-subs a {
  font-size: .8rem; color: var(--ink-3); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 2px; padding: 2px 8px;
}
.index-subs a:hover { color: var(--oxide); border-color: var(--oxide); }

/* ---------- interior page shell ---------- */

.page { padding-block: 44px 96px; }
.page .wrap {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 60px;
  align-items: start;
}
/* pages with no section tree are a single column, or the article would be
   placed into the narrow sidebar track */
.page.no-side .wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
.page-body { max-width: var(--measure); min-width: 0; }
.page-body.is-wide { max-width: 100%; }
.page-body.is-wide > .prose > p { max-width: var(--measure); }
.page-body > h1 { margin-bottom: .45em; }

.crumbs {
  margin: 0 0 14px; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: .82rem; color: var(--ink-3);
}
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--oxide); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }

.sidenav { position: sticky; top: 92px; font-size: .9rem; }
.sidenav h2 {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; color: var(--ink-3);
  margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
}
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li a {
  display: block; padding: 6px 0 6px 12px;
  color: var(--ink-2); text-decoration: none;
  border-left: 2px solid var(--rule-2); line-height: 1.4;
}
.sidenav li a:hover { color: var(--oxide); border-left-color: var(--rule); }
.sidenav li a[aria-current="page"] {
  color: var(--oxide); font-weight: 500; border-left-color: var(--oxide);
}
.sidenav .sub a { padding-left: 26px; font-size: .855rem; color: var(--ink-3); }
.sidenav .sub .sub a { padding-left: 40px; }

/* ---------- prose ---------- */

.prose > *:first-child { margin-top: 0; }
.prose h2:first-of-type { margin-top: 1.6em; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; }

.prose figure { margin: 34px 0; }
.prose figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-2);
}
.prose figcaption { margin-top: 10px; font-size: .84rem; line-height: 1.55; color: var(--ink-3); }
.figrow { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.figrow figure { margin: 0; }

/* reference lists (publications, patents, grants) */
.refs { margin: 0 0 1.4em; padding: 0; list-style: none; counter-reset: ref; }
.refs li {
  position: relative; counter-increment: ref;
  padding: 9px 0 9px 42px;
  font-size: .92rem; line-height: 1.58; color: var(--ink-2);
  border-bottom: 1px solid var(--rule-2);
  font-variant-numeric: tabular-nums;
}
.refs a { color: var(--ink); text-decoration-color: var(--rule); }
.refs a:hover { color: var(--oxide); text-decoration-color: currentColor; }
.refs li::before {
  content: counter(ref);
  position: absolute; left: 0; top: 9px;
  width: 28px; text-align: right;
  font-size: .78rem; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.prose ul:not(.refs):not(.index-subs) { padding-left: 1.15em; margin: 0 0 1.2em; }
.prose ul:not(.refs) li { margin-bottom: .45em; color: var(--ink-2); }

.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 26px 0; }
.prose th, .prose td {
  border: 1px solid var(--rule); padding: 8px 11px; text-align: left; vertical-align: top;
}
.prose th { background: var(--paper-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* ---------- team & partners ---------- */

.people { list-style: none; margin: 0; padding: 0; }
.people > li {
  display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 28px;
  padding: 30px 0; border-bottom: 1px solid var(--rule-2); align-items: start;
}
.people img { width: 128px; border-radius: 3px; border: 1px solid var(--rule); display: block; }
.people .noportrait {
  width: 128px; aspect-ratio: 1; border-radius: 3px;
  border: 1px dashed var(--rule); background: var(--paper-2);
}
.person-name { font-family: var(--serif); font-size: 1.14rem; font-weight: 600; margin: 0 0 .35em; }
.person-role { color: var(--oxide); font-weight: 500; }
.person-dates {
  font-family: var(--sans); font-size: .84rem; font-weight: 400;
  color: var(--ink-3); margin-left: .5em; font-variant-numeric: tabular-nums;
}
.person-memorial { margin-top: .7em !important; font-size: .88rem; }
.people p { margin: 0; font-size: .93rem; color: var(--ink-2); }

.partners { list-style: none; margin: 0; padding: 0; }
.partners > li {
  display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 30px;
  padding: 30px 0; border-bottom: 1px solid var(--rule-2); align-items: start;
}
.partners img { width: 150px; border: 1px solid var(--rule); border-radius: 3px; background: #fff; }
.partners p { margin: 0; font-size: .93rem; color: var(--ink-2); }

/* ---------- news ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li { position: relative; padding: 0 0 30px 30px; border-left: 1px solid var(--rule); }
.timeline > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline > li::before {
  content: ""; position: absolute; left: -5px; top: 7px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--oxide);
}
.timeline time {
  display: block; font-size: .82rem; font-weight: 600; color: var(--oxide);
  margin-bottom: 5px; font-variant-numeric: tabular-nums;
}
.timeline p { margin: 0 0 .6em; font-size: .95rem; color: var(--ink-2); }
.timeline p:last-child { margin-bottom: 0; }

.digest { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.digest > li { border-top: 1px solid var(--rule-2); padding: 18px 0; }
.digest time { font-size: .8rem; font-weight: 600; color: var(--oxide); font-variant-numeric: tabular-nums; }
.digest p { margin: 5px 0 0; font-size: .93rem; color: var(--ink-2); }

/* ---------- publications filter ---------- */

.filter {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 16px 0 20px; margin-bottom: 8px;
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 69px; background: var(--paper); z-index: 10;
}
.filter input {
  flex: 1 1 240px; min-width: 0;
  font: inherit; font-size: .93rem; padding: 9px 12px;
  border: 1px solid var(--rule); border-radius: 3px;
  background: var(--paper); color: var(--ink);
}
.filter input:focus { outline: 2px solid var(--oxide); outline-offset: -1px; border-color: var(--oxide); }
.filter-count { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.refs li[hidden] { display: none; }
.empty-note { color: var(--ink-3); font-size: .93rem; padding: 20px 0; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 56px; align-items: start; max-width: 880px;
}
.address { font-style: normal; font-size: 1.02rem; line-height: 1.8; color: var(--ink-2); }
.address .org { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); display: block; margin-bottom: .3em; }

/* ---------- memorial ---------- */

/* Quieter than the rest of the site: a portrait, dates, and prose set a little
   larger with nothing competing for attention. The portrait sits in its own
   column rather than floating, so the text keeps a readable measure. */
.memorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}
.memorial-text { max-width: 62ch; }
.memorial .portrait { margin: 0; }
.memorial .portrait img {
  display: block; width: 100%; height: auto;
  border-radius: 3px; border: 1px solid var(--rule);
}
.memorial .lifespan {
  font-family: var(--serif);
  font-size: 1.08rem; line-height: 1.5; color: var(--ink-2);
  margin: 0 0 1.8em; padding-bottom: 1.4em;
  border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
.memorial .lifespan span { font-family: var(--sans); font-size: .88rem; color: var(--ink-3); }
.memorial p { font-size: 1.03rem; line-height: 1.72; }
.memorial .source {
  margin-top: 2.4em; padding-top: 1.2em;
  border-top: 1px solid var(--rule-2);
  font-size: .85rem; line-height: 1.6; color: var(--ink-3);
}
.memorial .source a { color: var(--ink-3); }
.memorial .source a:hover { color: var(--oxide); }

@media (max-width: 860px) {
  .memorial { grid-template-columns: 1fr; gap: 30px; }
  .memorial .portrait { order: -1; max-width: 240px; }
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--rule);
  background: var(--ink); color: #A9BAC6;
  padding-block: 46px 34px; font-size: .89rem;
}
.foot a { color: #DCE6EC; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot h2 {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; color: #93A8B6;
  margin: 0 0 12px; letter-spacing: .03em;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: 7px; }
.foot img { width: 180px; filter: brightness(0) invert(1) opacity(.92); }
.foot .blurb { margin: 16px 0 0; max-width: 40ch; color: #93A8B6; line-height: 1.6; }
.colophon {
  margin-top: 34px; padding-top: 20px; border-top: 1px solid #2A3945;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .82rem; color: #93A8B6;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { max-width: 24ch; }
  .sensor { max-width: 440px; }
  .page .wrap { grid-template-columns: 1fr; gap: 0; }
  /* the section tree follows the article rather than burying it under 20 links */
  .page-body { order: 1; }
  .sidenav {
    order: 2; position: static;
    margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--rule);
  }
  .sidenav h2 { border-bottom: none; padding-bottom: 2px; }
  .facts dl { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 10px 24px 20px; max-height: 74vh; overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link { padding: 11px 0; font-size: 1rem; }
  .nav-link[aria-current="page"], .nav-link.is-section { box-shadow: none; }
  .has-menu > .menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; box-shadow: none; padding: 0 0 8px 12px;
    min-width: 0; border-left: 1px solid var(--rule);
  }
  .nav-link .chev { display: none; }
  .index-list > li.row { grid-template-columns: 1fr; gap: 8px; padding: 22px 0; }
  .people > li, .partners > li { grid-template-columns: 1fr; gap: 16px; }
  .people img, .people .noportrait, .partners img { width: 108px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .filter { position: static; }
}

@media (max-width: 420px) {
  .wrap { padding-inline: 16px; }
  .facts dl { grid-template-columns: 1fr; gap: 18px; }
  .brand img { width: 172px; }
}

@media print {
  .masthead, .sidenav, .filter, .hero .sensor { display: none; }
  body { font-size: 11pt; }
  .foot { background: none; color: #000; }
}
