/* ==========================================================================
   OCEAN SOURCE: site styles
   Sections 1 to 17 are the production CSS from design/ui-reference.html,
   copied unchanged except the chart motif (chart tokens in 1 and 2, the
   chart rules and strip offsets in 9, the note in 15): the chart is now a
   real place, generated by tools/make_chart.py (see design/ui-spec.md
   section 5). The reference sheet styles and the .is-* demo state
   classes (the reference's section 18) are not shipped. Section 18 below
   holds the few additions this page needs, composed from the same tokens.

    1. Tokens, light ("day chart")
    2. Tokens, dark ("night chart")
    3. Base
    4. Layout primitives
    5. Typography
    6. Neatline (graduated chart border)
    7. Links and buttons
    8. Header and navigation
    9. Hero and chart motif
   10. Audience router
   11. Services
   12. Track record
   13. Publications
   14. Bio and facts
   15. Contact band
   16. Footer
   17. Motion
   18. Additions for this page
   ========================================================================== */


/* 1. TOKENS, LIGHT ------------------------------------------------------- */
:root {
  color-scheme: light dark;

  /* Colour. Contrast ratios are against --color-bg unless noted. */
  --color-bg:            #F7F9F9;  /* chart paper: cool white, never cream */
  --color-surface:       #FFFFFF;  /* rarely used: inputs, raised panels */
  --color-shoal:         #E4EEF2;  /* 0 to 10 m tint: contact band, hover fill */
  --color-shoal-deep:    #D2E3EB;  /* 0 to 5 m tint: pressed fill, selection */
  --color-text:          #132337;  /* chart ink. 15.0:1 on bg, 13.5:1 on shoal */
  --color-text-muted:    #46576A;  /* 7.0:1 on bg, 6.3:1 on shoal */
  --color-border:        #CDD6DD;  /* hairlines between rows (decorative) */
  --color-border-strong: #7A8A99;  /* section rules, component edges. 3.4:1 */
  --color-accent:        #A3175A;  /* chart magenta: primary action, track line */
  --color-accent-hover:  #86124A;
  --color-accent-text:   #A3175A;  /* magenta used as text. 7.0:1 on bg, 6.3:1 on shoal */
  --color-on-accent:     #FFFFFF;  /* 7.4:1 on accent, 9.6:1 on accent-hover */
  --color-focus:         #1D5FAF;  /* chart blue focus ring. 6.0:1 on bg, 5.4:1 on shoal */

  /* Chart motif colours (decorative, aria-hidden, intentionally low contrast) */
  --chart-tint-20:  var(--color-shoal);       /* 10 to 20 m */
  --chart-tint-10:  var(--color-shoal-deep);  /* 0 to 10 m */
  --chart-land:     #ECE9E1;  /* land: a restrained buff, as charts tint land */
  --chart-contour:  #8AA7BC;
  --chart-sounding: #8CA2B4;
  --chart-label:    #6A8499;
  --chart-track:    var(--color-accent);
  --chart-neatline: var(--color-text);

  /* Type */
  --font-serif: "Source Serif 4", "Source Serif Pro", Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --font-sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-h1:    clamp(2.25rem, 1.6rem + 3.2vw, 4rem);         /* 36 to 64px */
  --text-h2:    clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);       /* 28 to 40px */
  --text-h3:    clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);   /* 18 to 20px */
  --text-lead:  clamp(1.1875rem, 1.1rem + 0.45vw, 1.375rem);  /* 19 to 22px */
  --text-body:  clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem); /* 17 to 18px */
  --text-small: 0.875rem;   /* 14px */
  --text-label: 0.8125rem;  /* 13px */
  --text-nav:   0.9375rem;  /* 15px */

  /* Space: 4px base */
  --space-1: 0.25rem;  /*   4 */
  --space-2: 0.5rem;   /*   8 */
  --space-3: 0.75rem;  /*  12 */
  --space-4: 1rem;     /*  16 */
  --space-5: 1.5rem;   /*  24 */
  --space-6: 2rem;     /*  32 */
  --space-7: 3rem;     /*  48 */
  --space-8: 4rem;     /*  64 */
  --space-9: 6rem;     /*  96 */
  --section-space: clamp(4rem, 2.75rem + 5.5vw, 7.5rem); /* 64 to 120px between sections */
  --row-space:     clamp(1.25rem, 1rem + 0.8vw, 1.75rem); /* 20 to 28px inside list rows */
  --gutter:        clamp(1rem, 0.4rem + 2.6vw, 2.5rem);   /* 16 to 40px page side gutter */

  /* Shape: crisp, chart-like. No shadows anywhere. */
  --radius: 2px;
  --rule: 1px;

  /* Widths */
  --page-max:     76rem;  /* 1216px content width */
  --measure:      36rem;  /* running text, about 65 to 70 characters */
  --hero-measure: 38rem;  /* hero text column */
  --header-height: 4.5rem;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 150ms;
}

/* 2. TOKENS, DARK -------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:            #0E1924;  /* night chart: deep navy, not grey-black */
    --color-surface:       #13212F;
    --color-shoal:         #132737;
    --color-shoal-deep:    #183248;
    --color-text:          #E2E9EF;  /* 14.5:1 on bg, 12.5:1 on shoal */
    --color-text-muted:    #A2B2C0;  /* 8.2:1 on bg, 7.0:1 on shoal */
    --color-border:        #263849;
    --color-border-strong: #617789;  /* 3.8:1 */
    --color-accent:        #C02A72;  /* deeper berry fill: a pale pink button reads as candy */
    --color-accent-hover:  #C8327C;  /* brightens on hover */
    --color-accent-text:   #F08DBB;  /* magenta lifted for text and underlines. 7.8:1 on bg, 6.7:1 on shoal */
    --color-on-accent:     #FFFFFF;  /* 5.5:1 on accent, 5.0:1 on accent-hover */
    --color-focus:         #86BAF2;  /* 8.7:1 on bg */

    --chart-track:    #E57AAC;
    --chart-land:     #1E2325;  /* a step above the navy, greyed toward buff */
    --chart-neatline: #8A9DAE;  /* near-white bars glow on navy; step down */
    --chart-contour:  #3F5D75;
    --chart-sounding: #4D6880;
    --chart-label:    #5F7D96;
  }
}


/* 3. BASE ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  font-size: var(--text-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  font-kerning: normal;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }

img, svg { display: block; max-width: 100%; }

::selection { background: var(--color-shoal-deep); color: var(--color-text); }

/* One focus style for everything interactive. Never remove it. */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

/* Anchored sections clear the sticky header on wide screens. */
[id] { scroll-margin-top: var(--space-4); }
@media (min-width: 64rem) {
  [id] { scroll-margin-top: calc(var(--header-height) + var(--space-4)); }
}

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
  font: 600 var(--text-small)/1.2 var(--font-sans);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }


/* 4. LAYOUT PRIMITIVES --------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* A content section: generous space above, a ruled frame, heading close under the rule. */
.section { padding-top: var(--section-space); }

.section__frame {
  border-top: var(--rule) solid var(--color-border-strong);
  padding-top: var(--space-6);
}

/* Side-head grid: heading and short intro in a left "legend" column, content on the right.
   Stacks below 64rem. */
.sidehead {
  display: grid;
  gap: var(--space-6);
}
.sidehead__intro {
  margin-top: var(--space-4);
  max-width: 24rem;
  color: var(--color-text-muted);
}
@media (min-width: 64rem) {
  .sidehead {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
  .sidehead__head {
    grid-column: 1 / span 4;
    align-self: start;
    position: sticky;  /* the heading stays in view beside long lists */
    top: calc(var(--header-height) + var(--space-6));
  }
  .sidehead__body { grid-column: 5 / span 8; }
}

/* Full-width section heading (router and other non side-head sections) */
.section-head { max-width: 40rem; margin-bottom: var(--space-7); }
.section-head__intro { margin-top: var(--space-4); color: var(--color-text-muted); }

/* Ruled rows: used by services, records and publications */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > * { padding-block: var(--row-space); }
.rows > * + * { border-top: var(--rule) solid var(--color-border); }
.rows > :first-child { padding-top: 0; }
.rows > :last-child { padding-bottom: 0; }

.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1em; }


/* 5. TYPOGRAPHY ---------------------------------------------------------- */
/* Serif for reading and headings; Archivo for the interface and for data. */
.h1, h1 {
  font-family: var(--font-serif);
  font-size: var(--text-h1);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h2, h2 {
  font-family: var(--font-serif);
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.h3, h3 {
  font-family: var(--font-sans);
  font-size: var(--text-h3);
  font-weight: 600;
  font-stretch: 92%;  /* a touch condensed: chart lettering, not a generic grotesk */
  line-height: 1.3;
  letter-spacing: 0;
}

p { text-wrap: pretty; }

.lead {
  font-size: var(--text-lead);
  line-height: 1.5;
}

.small {
  font-family: var(--font-sans);
  font-size: var(--text-small);
  line-height: 1.45;
}

/* Labels: field names, dates, notes. Sentence case, never all caps. */
.label {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  font-stretch: 87.5%;
  line-height: 1.3;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text-muted);
}

/* Journal names and other titles of works: italic, as in a reference list */
cite { font-style: italic; }


/* 6. NEATLINE ------------------------------------------------------------ */
/* The graduated border of a nautical chart: a frame line, alternating
   filled and open segments, a second frame line, then fine ticks.
   Used twice: very top of the page and very bottom. Nowhere else. */
.neatline {
  --ink: var(--chart-neatline);
  height: 10px;
  background:
    linear-gradient(var(--ink), var(--ink)) left 0 / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 40px, transparent 40px 80px) left 1px / 100% 4px no-repeat,
    linear-gradient(var(--ink), var(--ink)) left 5px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 8px) left 7px / 100% 3px no-repeat;
}
.neatline--bottom { transform: scaleY(-1); }


/* 7. LINKS AND BUTTONS --------------------------------------------------- */
/* Text links: ink text, magenta underline. Hover thickens the line and tints the text. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: var(--color-accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--dur-fast) var(--ease),
              text-decoration-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--color-accent-text); text-decoration-thickness: 2px; }
a:active { color: var(--color-accent-hover); }

/* Standalone text link, e.g. a secondary action beside a button */
.text-link {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.005em;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  padding-block: var(--space-2);  /* taller hit area without changing layout */
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem;            /* 44px target */
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;  /* stays visible in forced-colors mode */
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}
.button:active { transform: translateY(1px); }

.button--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}
.button--primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-on-accent);
}

.button--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.button--secondary:hover {
  background: var(--color-shoal);
  border-color: var(--color-text);
  color: var(--color-text);
}
.button--secondary:active { background: var(--color-shoal-deep); }

.button--compact { padding-inline: 1rem; font-size: var(--text-nav); }


/* 8. HEADER AND NAVIGATION ----------------------------------------------- */
/* Below 64rem: two rows (wordmark + button, then wrapping links), not sticky.
   From 64rem: one sticky row. No menu button, no JavaScript. */
.site-header {
  background: var(--color-bg);
  border-bottom: var(--rule) solid var(--color-border);
}

.site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "mark cta"
    "nav  nav";
  align-items: center;
  column-gap: var(--space-5);
  padding-top: var(--space-3);
}

.wordmark {
  grid-area: mark;
  justify-self: start;
  padding-block: var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
}
.wordmark:hover { color: var(--color-text); }

.site-header__cta { grid-area: cta; }

.site-nav { grid-area: nav; }

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
}

.site-nav__link {
  display: inline-block;
  padding-block: 0.8125rem;  /* 44px tall target */
  font-family: var(--font-sans);
  font-size: var(--text-nav);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.005em;
  color: var(--color-text-muted);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}
.site-nav__link:hover {
  color: var(--color-text);
  text-decoration-color: var(--color-accent-text);
}
.site-nav__link:active { color: var(--color-accent-text); }
/* Optional: if a scroll-spy script sets aria-current, show the same underline */
.site-nav__link[aria-current] {
  color: var(--color-text);
  text-decoration-color: var(--color-accent-text);
}

@media (min-width: 64rem) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 10;
  }
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "mark nav cta";
    min-height: var(--header-height);
    padding-top: 0;
  }
  .site-nav__list {
    justify-content: flex-end;
    column-gap: var(--space-6);
  }
}


/* 9. HERO AND CHART MOTIF ------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: var(--rule) solid var(--color-border);
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 1.5rem + 6vw, 8rem) clamp(1.5rem, 0.5rem + 4vw, 7rem);
}

.hero__content { max-width: var(--hero-measure); }

.hero__title { font-size: var(--text-h1); }

.hero__lead {
  margin-top: var(--space-5);
  max-width: 34rem;
  font-size: var(--text-lead);
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-7);
}

/* Chart window. Small screens: a strip under the hero text, fading in from the top.
   The SVG is never scaled: it is drawn at 960 x 640 and the window crops it,
   so soundings stay at their intended size on every screen. */
.hero__chart {
  position: relative;
  height: 15rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 4rem);
          mask-image: linear-gradient(to bottom, transparent, #000 4rem);
}
/* The strip is offset to show the channel and the course beating across it:
   the three tacks, each with its fix, and the anchorage. On phones it is
   anchored from the left so the fixes sit at the same place at every width;
   the max() keeps the right edge of the drawing at the screen edge. */
.hero__chart .chart {
  position: absolute;
  left: max(-31.25rem, 100% - 960px);
  top: -9rem;
}
@media (min-width: 45rem) {
  .hero__chart { height: 18rem; }
  .hero__chart .chart { left: auto; right: 0; top: -7rem; }
}
/* Wide screens: the window sits to the right of the text column and bleeds off the
   right edge. Its left edge starts 2rem inside the text column, inside the fade. */
@media (min-width: 64rem) {
  .hero__chart {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    height: auto;
    width: calc(100% - max(var(--gutter), (100% - var(--page-max)) / 2) - var(--hero-measure) + 2rem);
    max-width: 960px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10rem);
            mask-image: linear-gradient(to right, transparent, #000 10rem);
  }
  .hero__chart .chart { right: 0; top: 0; }
}

/* The chart drawing (shared by the hero and the contact band) */
.chart {
  width: 960px;
  height: 640px;
  max-width: none;
  overflow: visible;
}
.chart__tint--10 { fill: var(--chart-tint-10); }
.chart__tint--20 { fill: var(--chart-tint-20); }

/* Depth contours follow old chart convention: each depth has its own line pattern.
   10 m solid, 20 m dashed, 50 m dotted, 100 m dash-dot, 200 m dash-dot-dot. */
.chart__contour { fill: none; stroke: var(--chart-contour); stroke-width: 1; }
.chart__contour--20  { stroke-dasharray: 5 3; }
.chart__contour--50  { stroke-dasharray: 0.5 3.5; stroke-linecap: round; stroke-width: 1.5; }
.chart__contour--100 { stroke-dasharray: 7 2.5 0.5 2.5; stroke-linecap: round; }
.chart__contour--200 { stroke-dasharray: 12 3 0.5 3 0.5 3; stroke-linecap: round; }

/* Land: a quiet tint with a shoreline, from OpenStreetMap */
.chart__land {
  fill: var(--chart-land);
  fill-rule: evenodd;
  stroke: var(--chart-label);
  stroke-width: 0.75;
  stroke-linejoin: round;
}

/* Soundings: hydrographic italic, in whole metres (the source grid's
   precision does not support the subscript decimals of a surveyed chart) */
.chart__soundings {
  font-family: var(--font-serif);
  font-size: 11px;
  font-style: italic;
  fill: var(--chart-sounding);
  text-anchor: middle;
}

/* Place names: land names upright, as charts letter them */
.chart__name {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 0.04em;
  fill: var(--chart-label);
  text-anchor: middle;
  dominant-baseline: central;
}

/* Contour labels break their line with a halo in the page colour */
.chart__label {
  font-family: var(--font-serif);
  font-size: 10px;
  font-style: italic;
  font-weight: 500;
  fill: var(--chart-label);
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke;
  stroke: var(--color-bg);
  stroke-width: 5px;
  stroke-linejoin: round;
}

/* The one magenta element in the drawing: a plotted track with position fixes */
.chart__track {
  fill: none;
  stroke: var(--chart-track);
  stroke-width: 1.5;
  stroke-dasharray: 9 5;
}
.chart__track-mask { fill: none; stroke: #fff; stroke-width: 14; }
.chart__fix circle { fill: var(--color-bg); stroke: var(--chart-track); stroke-width: 1.5; }
.chart__fix .chart__fix-dot { fill: var(--chart-track); stroke: none; }


/* 10. AUDIENCE ROUTER ---------------------------------------------------- */
.section--router { padding-top: clamp(3rem, 2rem + 4vw, 5rem); }

/* A framed grid of linked cells with shared hairlines, like the panels of a chart
   legend. Borders: the list draws top and left, each cell draws right and bottom. */
.router {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: var(--rule) solid var(--color-border-strong);
  border-left: var(--rule) solid var(--color-border-strong);
}
.router > li {
  display: flex;
  border-right: var(--rule) solid var(--color-border-strong);
  border-bottom: var(--rule) solid var(--color-border-strong);
}

.router__card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  color: var(--color-text);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease);
}
.router__card:hover { background: var(--color-shoal); color: var(--color-text); }
.router__card:active { background: var(--color-shoal-deep); }
.router__card:focus-visible { outline-offset: -4px; }  /* inset: cells share edges */

.router__who {
  font-size: var(--text-h3);
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.router__card:hover .router__who { text-decoration-color: var(--color-accent-text); }

.router__need {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.router__go {
  margin-top: auto;
  padding-top: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-accent-text);
}
.router__go svg { flex: none; transition: transform var(--dur-fast) var(--ease); }
.router__card:hover .router__go svg { transform: translateY(2px); }

@media (min-width: 45rem) {
  .router { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* an odd last card spans the row instead of leaving a hole */
  .router > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .router__card { min-height: 12rem; }
}
@media (min-width: 64rem) {
  /* one row, as many columns as cards (3 or 4) */
  .router { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .router > li:last-child:nth-child(odd) { grid-column: auto; }
  .router__card { min-height: 14rem; }
}


/* 11. SERVICES ----------------------------------------------------------- */
.service {
  display: grid;
  gap: var(--space-2) var(--space-6);
}
.service__body > * + * { margin-top: var(--space-3); }
.service__text { max-width: var(--measure); }
.service__examples { max-width: var(--measure); }

@media (min-width: 45rem) {
  .service { grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); }
  .service__title { padding-top: 0.15em; }  /* optical alignment with the serif first line */
}


/* 12. TRACK RECORD ------------------------------------------------------- */
/* An engagement or role as a small metadata record:
   title and meta on one line, a description, then optional key/value fields. */
.record__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-5);
}
.record__desc { margin-top: var(--space-3); max-width: var(--measure); }

.record__fields {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);  /* fixed so values align across records */
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-4);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.record__fields > div { display: contents; }
.record__fields dt { padding-top: 0.1em; }  /* labels are 13px against 15px values */

.record__points {
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
  max-width: var(--measure);
}
.record__points > li { position: relative; padding-left: 1.25rem; }
.record__points > li + li { margin-top: var(--space-2); }
/* marker: a short scale tick */
.record__points > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 0.625rem;
  height: 1px;
  background: var(--color-text-muted);
}

/* Subsection heading inside a section, e.g. a second group of records */
.subhead {
  margin-top: var(--space-8);
  margin-bottom: var(--space-5);
  padding-top: var(--space-4);
  border-top: var(--rule) solid var(--color-border-strong);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-muted);
}


/* 13. PUBLICATIONS ------------------------------------------------------- */
/* A reference list: year column in tabular figures, linked title,
   journal in italic, DOI as quiet data. One link per entry (the title). */
.pub {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: var(--space-4);
  align-items: first baseline;
}
@media (min-width: 45rem) {
  .pub { grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: var(--space-5); }
}

.pub__year {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--color-text-muted);
}

.pub__title {
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.4;
  text-decoration-color: color-mix(in srgb, var(--color-accent-text) 45%, transparent);
}
.pub__title:hover { text-decoration-color: var(--color-accent-text); }

.pub__meta {
  margin-top: var(--space-1);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
}
.pub__journal { font-size: 1rem; color: var(--color-text-muted); }
.pub__doi { overflow-wrap: anywhere; }


/* 14. BIO AND FACTS ------------------------------------------------------ */
.bio > * + * { margin-top: var(--space-7); }

/* Optional single statement in the bio, set larger. Not a testimonial. */
.statement {
  max-width: 30ch;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: var(--space-5) var(--space-6);
  padding-top: var(--space-5);
  border-top: var(--rule) solid var(--color-border);
}
.facts dd {
  margin-top: var(--space-1);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}


/* 15. CONTACT BAND ------------------------------------------------------- */
/* The one tinted band on the page: shallow-water blue, with a second, quieter
   chart fragment on wide screens. */
.contact {
  position: relative;
  overflow: hidden;
  margin-top: var(--section-space);
  padding-block: clamp(3.5rem, 2.5rem + 4.5vw, 6.5rem);
  background: var(--color-shoal);  /* the band is the 10 to 20 m tint; its chart may add only the 0 to 10 m tint */
}

.contact__content { position: relative; z-index: 1; max-width: 38rem; }

.contact__title { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); }

.contact__text { margin-top: var(--space-5); max-width: 34rem; }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-7);
}

.contact__note { margin-top: var(--space-5); color: var(--color-text-muted); }

.contact__chart { display: none; }
@media (min-width: 64rem) {
  .contact__chart {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 46%;
    max-width: 640px;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12rem);
            mask-image: linear-gradient(to right, transparent, #000 12rem);
  }
  .contact__chart .chart { position: absolute; right: 0; top: 0; width: 640px; height: 560px; }
}


/* 16. FOOTER ------------------------------------------------------------- */
.site-footer { padding-top: var(--space-7); }

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5) var(--space-7);
  padding-bottom: var(--space-7);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--color-text-muted);
}

.site-footer__name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}
.site-footer__line { margin-top: var(--space-1); }

.site-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
}
.site-footer__links a {
  display: inline-block;
  padding-block: var(--space-2);
  color: var(--color-text);
}


/* 17. MOTION ------------------------------------------------------------- */
/* One orchestrated moment: on load, the magenta track is plotted across the hero
   chart and each position fix appears as the line reaches it. Nothing else moves
   on its own. With reduced motion the finished chart is shown, no animation. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .hero__chart .chart__track-mask {
    stroke-dasharray: 1 1;    /* path has pathLength="1" */
    stroke-dashoffset: 1;
    animation: chart-plot 2.4s linear 0.5s forwards;
  }
  .hero__chart .chart__fix {
    opacity: 0;
    animation: chart-fix 0.3s var(--ease) forwards;
    animation-delay: calc(0.5s + 2.4s * var(--at));
  }
}
@keyframes chart-plot { to { stroke-dashoffset: 0; } }
@keyframes chart-fix  { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .button:active, .router__card:hover .router__go svg { transform: none; }
}


/* 18. ADDITIONS FOR THIS PAGE -------------------------------------------- */
/* Parts of the copy with no ready-made component in the reference, and a few
   fits for this copy. All composed from the tokens and components above: no
   new colours, no shadows, no icons, no new uses of magenta.

   18.1 Section anchors
   18.2 Header
   18.3 Hero: eyebrow, intro line, client strip, spacing, chart edge
   18.4 Audience sections
   18.5 Track record
   18.6 Contact band
   18.7 Footer */

/* 18.1 Section anchors. Land the section rule just below the header rather
   than the section's top padding, so a jump from the router or nav opens on
   the heading. The router's top padding differs (section 10, and 18.3 from
   64rem), so it gets its own value. */
.section[id] { scroll-margin-top: calc(var(--space-4) - var(--section-space)); }
.section--router[id] { scroll-margin-top: calc(var(--space-4) - clamp(3rem, 2rem + 4vw, 5rem)); }
@media (min-width: 64rem) {
  .section[id] { scroll-margin-top: calc(var(--header-height) + var(--space-4) - var(--section-space)); }
  .section--router[id] { scroll-margin-top: calc(var(--header-height) + var(--space-4) - var(--space-7)); }
}

/* 18.2 Header, two-row layout. The wordmark and the full "Start a
   conversation" button need 308px side by side with a 16px gap (316px with
   24px), so the tighter gap keeps them on one line at 360px even where a
   desktop scrollbar takes 15px. The one-row header from 64rem keeps 24px. */
.site-header__inner { column-gap: var(--space-4); }
@media (min-width: 64rem) {
  .site-header__inner { column-gap: var(--space-5); }
}

/* 18.3 Hero */
.hero__eyebrow { margin-bottom: var(--space-4); }

.hero__intro {
  margin-top: var(--space-4);
  max-width: var(--measure);
  color: var(--color-text-muted);
}

/* Client strip: names as plain text (no logos), in Archivo ink like the
   values in .record__fields. Label above the names on small screens; a fixed
   label column from 45rem. Kept to 34rem so it stays clear of the chart. */
.hero__clients {
  display: grid;
  gap: var(--space-3);
  max-width: 34rem;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: var(--rule) solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.hero__clients dd { margin-top: var(--space-1); }
.hero__clients dd > span { white-space: nowrap; }  /* break between names, not inside one */
/* UX brief: below 600px only the "Recent clients" row is shown. */
.hero__clients-earlier { display: none; }
@media (min-width: 37.5rem) {
  .hero__clients-earlier { display: block; }
}
@media (min-width: 45rem) {
  .hero__clients > div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    column-gap: var(--space-5);
  }
  .hero__clients dt { padding-top: 0.1em; }  /* 13px label against 15px names */
  .hero__clients dd { margin-top: 0; }
}

/* The hero carries more copy than the reference (eyebrow, intro line, client
   strip), so from 64rem its spacing is tightened to keep the router close to
   the first screen at 1280 by 800 (build notes, decision 8). */
@media (min-width: 64rem) {
  .hero__inner { padding-block: var(--space-7) var(--space-6); }
  .hero__actions { margin-top: var(--space-6); }
  .hero__clients { margin-top: var(--space-5); }
  .section--router { padding-top: var(--space-7); }

  /* This h1 fills its whole 38rem column, so it reaches into the 2rem where
     the chart window overlaps the text column. Keep the computed left edge
     and the 10rem fade, but hold that first 2rem fully transparent so no
     sounding shows behind the headline. */
  .hero__chart {
    -webkit-mask-image: linear-gradient(to right, transparent 2rem, #000 12rem);
            mask-image: linear-gradient(to right, transparent 2rem, #000 12rem);
  }
}

/* 18.4 Audience sections (#biotech, #research).
   Side-head layout: label and h2 on the left. On the right: body, two h3
   lists in the tick-marker style (they reuse .record__points), the vendor
   line where present, then the CTA lead and a standalone .text-link. The
   filled button stays reserved for the header, hero and contact band. */
.sidehead__label { margin-bottom: var(--space-3); }

.audience > * { max-width: var(--measure); }
.audience__subhead { margin-top: var(--space-6); }
.audience__note { margin-top: var(--space-6); }
.audience__cta {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: var(--rule) solid var(--color-border);
}
.audience__cta > * + * { margin-top: var(--space-2); }
.audience__cta .text-link { display: inline-block; }

/* Bold lead-ins in "Relevant work". The variable fonts stop at 600; ask for
   it rather than a synthetic bold. */
strong { font-weight: 600; }

/* 18.5 Track record. All three groups open with a subhead, so the first one
   drops its rule and space (the section rule is directly above, as in .rows). */
.sidehead__body > .subhead:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
/* Earlier roles: the role is a field directly under the title. */
.record__head + .record__fields { margin-top: var(--space-3); }
/* "Read the paper" under a record description */
.record__more { margin-top: var(--space-3); }

/* 18.6 Contact band. Near 64rem the 46% chart window would start inside the
   38rem text column; cap its width so it never does. From about 1200px wide
   the cap no longer binds and the spec's 46% applies. */
@media (min-width: 64rem) {
  .contact__chart {
    width: min(46%, 100% - max(var(--gutter), (100% - var(--page-max)) / 2) - 38rem);
  }
}

/* 18.7 Footer: the copyright line under the tagline, then the chart credit
   (same small muted text; the DOI may break anywhere at 360px). */
.site-footer__copy { margin-top: var(--space-3); }
.site-footer__credit {
  margin-top: var(--space-1);
  max-width: var(--measure);
  overflow-wrap: anywhere;
}
