/* Norn Scientific site styles. Colours are tokens in :root; each page sets data-thread on <main>. */
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/gelasio-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/gelasio-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/gelasio-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }

/* Layout: the email signature at page scale. The three-bar mark stands left of the text, as in the signature;
   each thread (Science, Funding, People) takes one of the mark's colours and lights its own bar. */
:root {
  --paper: #F7F9F9;
  --surface: #FFFFFF;
  --text: #1E2328;
  --muted: #5A6470;
  --rule: #D7DFE2;
  --head: #1E3A4C;
  --ink: #1E3A4C;
  --teal: #2F6F73;
  --gold: #B8892B;
  --ink-text: #1E3A4C;
  --teal-text: #2F6F73;
  --gold-text: #8A6418;
  --band-bg: #1E3A4C;
  --band-fg: #F2F5F6;
  --btn-bg: #1E3A4C;
  --btn-fg: #FFFFFF;
  --focus: #B8892B;
  --coffee: #4B3526;
  --font-display: "Gelasio", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Verdana, Tahoma, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 4vw, 2.75rem);
  --acc: var(--ink);
  --acc-text: var(--ink-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1920; --surface: #16242C; --text: #E1E7EA; --muted: #9EABB4; --rule: #2A3B45; --head: #EEF2F3;
    --ink: #7FA8C4; --teal: #5FB0B3; --gold: #D2A447;
    --ink-text: #9DBFD6; --teal-text: #7CC3C6; --gold-text: #DDB35E;
    --band-bg: #1A2C37; --band-fg: #DDE5E9; --btn-bg: #9DBFD6; --btn-fg: #0F1920; --focus: #D2A447; --coffee: #7A5538;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1920; --surface: #16242C; --text: #E1E7EA; --muted: #9EABB4; --rule: #2A3B45; --head: #EEF2F3;
  --ink: #7FA8C4; --teal: #5FB0B3; --gold: #D2A447;
  --ink-text: #9DBFD6; --teal-text: #7CC3C6; --gold-text: #DDB35E;
  --band-bg: #1A2C37; --band-fg: #DDE5E9; --btn-bg: #9DBFD6; --btn-fg: #0F1920; --focus: #D2A447; --coffee: #7A5538;
  color-scheme: dark;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
[data-thread="science"] { --acc: var(--ink); --acc-text: var(--ink-text); }
[data-thread="funding"] { --acc: var(--teal); --acc-text: var(--teal-text); }
[data-thread="people"]  { --acc: var(--gold); --acc-text: var(--gold-text); --on-acc: #1E2328; }
:root[data-theme="dark"] [data-thread="people"] { --on-acc: var(--paper); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) [data-thread="people"] { --on-acc: var(--paper); } }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-display); color: var(--head); text-wrap: balance; margin: 0; font-weight: 600; }
h1 { font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); line-height: 1.2; }
h3 { font-size: var(--step-1); line-height: 1.25; }
p { margin: 0; }
a { color: var(--acc-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
em, i.latin { font-style: italic; }
.prose { max-width: 65ch; }
.muted { color: var(--muted); }
.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: var(--step--1);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--acc-text);
}
.reading {
  font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: 1.05rem; line-height: 1.5;
}
.reading .dot, .motto .dot { color: var(--gold); font-style: normal; padding-inline: 0.2em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 20; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); top: 8px; }


/* The mark: three bars, as in the email signature */
.mark { display: inline-flex; gap: var(--g, 3px); height: var(--h, 26px); flex-shrink: 0; }
.mark i { display: block; width: var(--w, 3px); height: 100%; background: var(--c); }
.mark i.s { --c: var(--ink); }
.mark i.f { --c: var(--teal); }
.mark i.p { --c: var(--gold); }
.mark[data-on] i { opacity: 0.22; }
.mark[data-on="science"] i.s, .mark[data-on="funding"] i.f, .mark[data-on="people"] i.p { opacity: 1; }

/* Header */
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--head); }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.95rem; }
.nav a { color: var(--text); text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current] { border-bottom-color: var(--acc); font-weight: 700; }
.nav a[data-thread] { --acc: var(--ink); }
.nav a[data-thread="funding"] { --acc: var(--teal); }
.nav a[data-thread="people"] { --acc: var(--gold); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); padding-block: clamp(40px, 7vw, 88px) clamp(40px, 6vw, 72px); }
.hero .mark { --w: clamp(6px, 0.9vw, 10px); --g: clamp(5px, 0.7vw, 8px); --h: 100%; align-self: stretch; }
.hero-text { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.motto { font-family: var(--font-display); font-style: italic; color: var(--muted); font-size: var(--step-1); }
.lede { font-size: 1.125rem; line-height: 1.6; max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn {
  display: inline-block; font: inherit; font-weight: 700; background: var(--btn-bg); color: var(--btn-fg);
  text-decoration: none; padding: 12px 20px; border-radius: 3px; border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.byline { font-size: 1rem; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .hero .mark i { transform-origin: top; animation: draw 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .mark i.f { animation-delay: 120ms; }
  .hero .mark i.p { animation-delay: 240ms; }
}
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Sections */
section { padding-block: clamp(36px, 6vw, 64px); }
section + section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

/* Threads */
.threads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.thread { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.thread p.desc { flex: 1; }
.eyebrow-row { display: flex; align-items: center; gap: 10px; }
.eyebrow-row .mark { --w: 3px; --g: 3px; --h: 15px; }

/* Figures: drawn from data in script, coloured by the thread */
.fig { margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.fig figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.fig .ax { stroke: var(--muted); stroke-opacity: 0.55; stroke-width: 1; fill: none; }
.fig .lbl { fill: var(--muted); font-family: var(--font-body); font-size: 10px; }
.fig .hkl { fill: var(--muted); font-family: var(--font-body); font-size: 9px; }
.fig .trace { stroke: var(--acc); stroke-width: 1.4; fill: none; stroke-linejoin: round; }
.fig .area { fill: var(--acc); fill-opacity: 0.09; stroke: none; }
.fig .bar { fill: var(--muted); }
.fig .bar.above { fill-opacity: 0.38; }
.fig .bar.below { fill-opacity: 0.16; }
.fig .hi { fill: var(--acc); }
.fig .funded { fill: var(--acc-text); font-family: var(--font-body); font-size: 10px; font-weight: 700; transition: opacity 250ms ease; }
.fig .cut { stroke: var(--acc); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fig .path-done { stroke: var(--acc); stroke-width: 2.2; fill: none; stroke-linecap: round; }
.fig .path-next { stroke: var(--acc); stroke-width: 2.2; fill: none; stroke-dasharray: 2 6; stroke-linecap: round; }
.fig .dot-done { fill: var(--acc); }
.fig .dot-next { fill: var(--paper); stroke: var(--acc); stroke-width: 1.6; }
.fig .ring { fill: none; stroke: var(--acc); stroke-width: 1.6; }
.fig .acc-lbl { fill: var(--acc-text); font-family: var(--font-body); font-size: 10.5px; font-weight: 700; }
.fig .me, .fig .here, .fig .path-done { transition: opacity 350ms ease; }

/* Crystal structure on the Science page */
.structure { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.structure canvas { display: block; width: 100%; max-width: 340px; aspect-ratio: 1 / 1; cursor: grab; touch-action: pan-y; }
.structure canvas:active { cursor: grabbing; }
.structure figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); max-width: 340px; }
.more { font-weight: 700; text-decoration: none; }
.more::after { content: " \2192"; }
.more:hover { text-decoration: underline; }

/* Norns */
.norns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.norn-names { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.norn { margin: 0; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--c); padding-top: 12px; min-width: 0; }
.norn.s { --c: var(--ink); }
.norn.f { --c: var(--teal); }
.norn.p { --c: var(--gold); }
.norn .n { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1.2; color: var(--c); }
.norn .t { font-size: 0.95rem; color: var(--muted); }
.norn svg { display: block; width: 100%; max-width: 220px; height: auto; margin-top: 10px; overflow: visible; }
.norn figcaption { font-size: 0.82rem; line-height: 1.4; color: var(--muted); margin-top: 4px; }
.norn .nf-ax { stroke: var(--muted); stroke-opacity: 0.45; stroke-width: 1; fill: none; }
.norn .nf-line { stroke: var(--c); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.norn .nf-dash { stroke: var(--c); stroke-width: 1.8; fill: none; stroke-dasharray: 4 4; stroke-linecap: round; }
.norn .nf-guide { stroke: var(--c); stroke-opacity: 0.45; stroke-width: 1; stroke-dasharray: 2 3; fill: none; }
.norn .nf-dot { fill: var(--c); }
.norn .nf-ring { fill: none; stroke: var(--c); stroke-width: 1.4; }
.norn .nf-band-wide { fill: var(--c); fill-opacity: 0.12; }
.norn .nf-band { fill: var(--c); fill-opacity: 0.24; }
.norn .nf-lbl { fill: var(--muted); font-family: var(--font-body); font-size: 9.5px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
.about .prose { display: flex; flex-direction: column; gap: 14px; }
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.facts li { border-top: 1px solid var(--rule); padding-block: 12px; }
.facts li:last-child { border-bottom: 1px solid var(--rule); }

/* Contact */
.contact-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: clamp(20px, 4vw, 36px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: end; }
.contact-card .prose { display: flex; flex-direction: column; gap: 12px; }
.contact-side { display: flex; flex-direction: column; gap: 6px; }

/* Coffee, in a beaker with a masking-tape label. Drawn in site.js. */
.cuppa { display: block; width: 104px; height: auto; overflow: visible; }
.contact-side .cuppa { margin: -8px 0 4px -10px; }
.cuppa-fig .cuppa { width: min(230px, 100%); }
.cuppa-fig figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); max-width: 30ch; }
.cuppa .glass { fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cuppa .tape { fill: #ECE2C6; }
.cuppa .tape-t { fill: #1E3A4C; font-family: var(--font-body); font-weight: 700; font-size: 3.9px; letter-spacing: 0.2px; }
.cuppa .coffee { fill: var(--coffee); }
.cuppa .crema { fill: var(--gold); fill-opacity: 0.85; }
.cuppa .grad { stroke: #fff; stroke-opacity: 0.55; stroke-width: 1.2; stroke-linecap: round; }
.cuppa .grad-t { fill: #fff; fill-opacity: 0.6; font-family: var(--font-body); font-size: 6px; }
.cuppa .glint { stroke: #fff; stroke-opacity: 0.28; stroke-width: 2; stroke-linecap: round; }
.cuppa .bench { stroke: var(--rule); stroke-width: 2; stroke-linecap: round; }
.cuppa .wisp { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cuppa .wisp.s { stroke: var(--ink); }
.cuppa .wisp.f { stroke: var(--teal); }
.cuppa .wisp.p { stroke: var(--gold); }
.contact-side .cuppa .grad-t { display: none; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.email { font-family: var(--font-display); font-size: var(--step-1); color: var(--head); user-select: all; overflow-wrap: anywhere; }
.copy { font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--acc-text); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.copy:hover { border-color: var(--acc); }
.status { font-size: 0.95rem; color: var(--muted); min-height: 1.5em; }

/* Stream page */
.page-head .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 340px); grid-template-areas: "mark text fig"; gap: clamp(18px, 3vw, 40px); align-items: center; padding-block: clamp(36px, 6vw, 72px) clamp(28px, 4vw, 48px); }
.page-head .mark { grid-area: mark; }
.page-head .hero-text { grid-area: text; }
.page-head .structure { grid-area: fig; }
.page-head .mark { --w: 6px; --g: 5px; --h: 100%; align-self: stretch; }
.page-head .hero-text { gap: 16px; }
.in-short { border-left: 3px solid var(--acc); padding: 4px 0 4px 18px; max-width: 62ch; display: flex; flex-direction: column; gap: 6px; }
.in-short .label { font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--acc-text); }

.for-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.for-list li { border-top: 1px solid var(--rule); padding-block: 12px; }

.services { display: flex; flex-direction: column; }
.service { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 8px 40px; border-top: 1px solid var(--rule); padding-block: 22px; }
.service:last-child { border-bottom: 1px solid var(--rule); }
.service .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.service .get { font-size: 0.95rem; }
.service .get b { color: var(--acc-text); }
.service .steps-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; }
.service .steps-list li::marker { color: var(--acc-text); font-weight: 700; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--acc); padding-top: 14px; min-width: 0; }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--acc-text); line-height: 1; }
.steps h3 { font-size: 1.05rem; }

.record { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-width: 70ch; }
.record li { border-top: 1px solid var(--rule); padding-block: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }
.record li:last-child { border-bottom: 1px solid var(--rule); }
.record .claim { flex: 1 1 32ch; min-width: 0; }
.record .src { font-size: 0.95rem; white-space: nowrap; }

.isnt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; }
.isnt div { display: flex; flex-direction: column; gap: 6px; }
.isnt h3 { font-size: 1.05rem; }

.faq { display: flex; flex-direction: column; max-width: 70ch; }
.faq details { border-top: 1px solid var(--rule); padding-block: 14px; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--head); list-style-position: outside; }
.faq details p { margin-top: 10px; }

.placeholder { padding-block: clamp(48px, 8vw, 96px); display: flex; flex-direction: column; gap: 16px; }

footer { border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--muted); }
footer .wrap { padding-block: 28px 40px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; align-items: center; }
footer .brand .wordmark { font-size: 0.9rem; }
.todo { border-bottom: 1px dashed var(--gold); }

/* Page heads without a figure */
.page-head.nofig .wrap { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark text"; }
.page-head .page-fig { grid-area: fig; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.page-fig svg { display: block; width: 100%; max-width: 300px; height: auto; overflow: visible; }
.page-fig figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); max-width: 300px; }
.toggle {
  align-self: flex-start; font: inherit; font-size: 0.95rem; font-weight: 700; color: var(--acc-text);
  background: transparent; border: 1px solid var(--acc); border-radius: 3px; padding: 6px 12px; cursor: pointer;
}
.toggle[aria-pressed="true"] { background: var(--acc); color: var(--on-acc, var(--paper)); }
.fig .page-bg { fill: var(--surface); stroke: var(--rule); }
.fig .key-line { fill: var(--acc); }
.fig .body-line { fill: var(--muted); fill-opacity: 0.32; }
.fig .head-line { fill: var(--head); }
@media (prefers-reduced-motion: no-preference) { .fig .body-line { transition: fill-opacity 300ms ease; } }
.fig.skim .body-line { fill-opacity: 0.05; }

/* Where are you now? (People) */
.where { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px 48px; align-items: center; }
.where .fig svg { max-width: 600px; }
.where .lbl { font-size: 13px; }
.where .acc-lbl { font-size: 13.5px; }
.where .here { fill: var(--acc-text); font-family: var(--font-body); font-size: 11.5px; font-style: italic; }
.stops { display: flex; flex-wrap: wrap; gap: 8px; }
.stops button {
  font: inherit; font-size: 0.95rem; color: var(--text); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.stops button[aria-pressed="true"] { border-color: var(--acc); background: var(--acc); color: var(--on-acc, var(--paper)); font-weight: 700; }
.stop-text { min-height: 4.5em; }

/* Career chart (About) */
.career { display: flex; flex-direction: column; gap: 10px; }
.career-row { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 4px 20px; align-items: center; }
.career-row .lab { font-size: 0.95rem; }
.track { position: relative; height: 14px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 1px; background: var(--rule); }
.track .seg { position: absolute; top: 2px; height: 10px; border-radius: 2px; }
.track .seg.s { background: var(--ink); }
.track .seg.f { background: var(--teal); }
.track .seg.p { background: var(--gold); }
.career-axis { position: relative; height: 22px; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.career-axis span { position: absolute; top: 4px; transform: translateX(-50%); }
.career-axis::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--muted); opacity: 0.5; }
.career-group { font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 10px; }
.career-group.s { color: var(--ink-text); }
.career-group.f { color: var(--teal-text); }
.career-group.p { color: var(--gold-text); }

/* About: lists */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.plain-list li { border-top: 1px solid var(--rule); padding-block: 10px; }
.plain-list li:last-child { border-bottom: 1px solid var(--rule); }
.tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
.tool { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); padding-top: 14px; min-width: 0; }
.tool h3 { font-size: 1.1rem; }
.tool .myth { font-size: 0.95rem; color: var(--muted); }
.pubs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-width: 75ch; }
.pubs li { border-top: 1px solid var(--rule); padding-block: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 20px; }
.pubs li:last-child { border-bottom: 1px solid var(--rule); }
.pubs .cite { flex: 1 1 40ch; min-width: 0; }

/* Science audiences: each expands */
.audiences { display: flex; flex-direction: column; }
.aud { border-top: 1px solid var(--rule); }
.aud:last-child { border-bottom: 1px solid var(--rule); }
.aud summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-block: 14px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.35; color: var(--head);
}
.aud summary::-webkit-details-marker { display: none; }
.aud summary::after { content: "+"; font-family: var(--font-body); font-weight: 700; font-size: 1.4rem; color: var(--acc-text); flex-shrink: 0; line-height: 1; }
.aud[open] summary::after { content: "\2212"; }
.aud summary:hover { color: var(--acc-text); }
.aud-body { display: flex; flex-direction: column; gap: 18px; padding-bottom: 24px; }
.aud-intro { max-width: 65ch; }
.aud-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; }
.aud-cols h3 { font-family: var(--font-body); font-weight: 700; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--acc-text); margin-bottom: 8px; }
.aud-cols ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.btn-alt {
  display: inline-block; font-weight: 700; color: var(--acc-text); text-decoration: none; border: 1px solid var(--acc);
  padding: 11px 18px; border-radius: 3px;
}
.btn-alt:hover { background: var(--acc); color: var(--paper); }

.book { font-size: 0.95rem; font-weight: 700; }
.book::after { content: " \2192"; font-weight: 400; }

/* Contact page */
.what-to-send { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.what-to-send > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.what-to-send ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; }

/* Privacy notice */
.notice { display: flex; flex-direction: column; gap: 28px; max-width: 68ch; }
.notice > div { display: flex; flex-direction: column; gap: 10px; }
.notice ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.draft-flag { border: 1px dashed var(--gold); border-radius: 3px; padding: 10px 14px; font-size: 0.95rem; color: var(--text); max-width: 68ch; }

footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
footer nav a { color: var(--muted); }

/* How I work */
.promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 40px; }
.promises li { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding-top: 14px; min-width: 0; }
.promises h3 { font-size: 1.05rem; }

/* Starting points: what clients typically say */
.starts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; }
.starts li { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; line-height: 1.45; color: var(--head); border-left: 3px solid var(--acc); padding: 2px 0 2px 16px; min-width: 0; }

/* Live signal in the tools service (was Verðandi's figure on the home page) */
.live-fig svg { max-width: 420px; }
.live-fig .now { fill: var(--acc); }

/* Code sample in the tools service */
.code {
  margin: 4px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem; line-height: 1.55; background: var(--surface); color: var(--text);
  border: 1px solid var(--rule); border-radius: 3px; padding: 12px 14px; overflow-x: auto; white-space: pre;
}
.code .err { color: var(--acc-text); font-weight: 700; }
.code-cap { font-size: 0.85rem; color: var(--muted); }

@media (max-width: 900px) {
  .promises, .what-to-send { grid-template-columns: minmax(0, 1fr); }
  .where, .two-col { grid-template-columns: minmax(0, 1fr); }
  .page-head .page-fig { max-width: 300px; }
  .threads { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .thread .fig { max-width: 420px; }
  .page-head .wrap { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark text" "mark fig"; }
  .structure canvas { max-width: 280px; }
  .norns, .about { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .for-list, .isnt, .steps, .starts, .tools, .aud-cols { grid-template-columns: minmax(0, 1fr); }
  .aud summary { font-size: 1.02rem; }
  .career-row { grid-template-columns: minmax(0, 1fr); }
  .career-axis { margin-left: 0 !important; }
  .service { grid-template-columns: minmax(0, 1fr); }
  .contact-card { grid-template-columns: minmax(0, 1fr); }
  .norn-names { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .norn svg { max-width: 260px; }
  .lede { font-size: 1.05rem; }
}

/* Production additions */
a.email { color: var(--head); text-decoration-thickness: 1px; }
a.email:hover { text-decoration-thickness: 2px; }
html { scroll-padding-top: 16px; }

/* Case studies: cards on the Science page, and the case study pages */
.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 36px; }
.case { display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--acc); padding-top: 14px; color: inherit; text-decoration: none; min-width: 0; }
.case svg { display: block; width: 120px; height: auto; margin-bottom: 4px; overflow: visible; }
.case h3 { font-size: 1.1rem; }
a.case:hover h3 { color: var(--acc-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.case p { font-size: 0.95rem; }
.case .soon { font-size: 0.95rem; font-weight: 700; color: var(--muted); }
.case.pending { border-top-style: dashed; }
.case .draft-flag { font-size: 0.85rem; }
.thumb .t-ink { fill: var(--acc); }
.thumb .t-line { stroke: var(--acc); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.thumb .t-faint { stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1.4; fill: none; stroke-linecap: round; }
.thumb .t-dot { fill: var(--muted); fill-opacity: 0.55; }
.crumb { font-size: 0.95rem; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--acc-text); text-decoration: underline; }
.case-note { font-size: 0.95rem; color: var(--muted); max-width: 62ch; }
.case-fig { max-width: 340px; }
.case-parts { display: flex; flex-direction: column; }
.case-part { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 8px 40px; border-top: 1px solid var(--rule); padding-block: 24px; }
.case-part:last-child { border-bottom: 1px solid var(--rule); }
.case-part h2 { font-size: var(--step-1); }
.case-part .body { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 65ch; }
.case-part ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.case-part .cite { font-size: 1rem; }
.tech summary { cursor: pointer; font-weight: 700; color: var(--acc-text); }
.tech ul { margin-top: 12px; font-size: 0.95rem; }
.ovl { text-decoration: overline; }
.tern-read { font-size: 0.9rem; color: var(--text); min-height: 2.9em; margin: 0; }
.fig .band { fill: var(--acc); }
.fig .band-lbl { fill: var(--text); font-family: var(--font-body); font-size: 8.5px; }
.fig .band-melt { fill: none; stroke: var(--acc); stroke-dasharray: 3 3; stroke-width: 1; }
.fig .slide { stroke: var(--muted); stroke-opacity: 0.6; stroke-width: 1.5; }
.fig .xtal-front { fill: var(--acc); }
.fig .xtal-top { fill: var(--acc); fill-opacity: 0.55; }
.fig .readout { fill: var(--head); font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.fig .needle { stroke: var(--acc); stroke-width: 1.4; stroke-dasharray: 2 3; }
.fig .tri { fill: none; stroke: var(--muted); stroke-opacity: 0.6; stroke-width: 1.2; }
.fig .rut { stroke: var(--acc); stroke-opacity: 0.22; stroke-width: 9; stroke-linecap: round; }
.fig .pt-mix { fill: var(--muted); fill-opacity: 0.6; }
.fig .pt-one { fill: var(--paper); stroke: var(--muted); stroke-width: 1.4; }
.fig .pt-new { fill: var(--acc); }
.fig .pt-hover { fill: none; stroke: var(--acc); stroke-width: 1.6; }
.fig .pulse { fill: none; stroke: var(--acc); stroke-width: 1.5; }
@media (prefers-reduced-motion: no-preference) { .fig .pt { transition: opacity 250ms ease; } }
@media (max-width: 900px) { .cases { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .case-part { grid-template-columns: minmax(0, 1fr); } }

/* Funding: how proposals are judged now, and the distributed peer review figure */
.now { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 56px; align-items: start; }
.now-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.now-list li { border-top: 1px solid var(--rule); padding-block: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.now-list li:last-child { border-bottom: 1px solid var(--rule); }
.now-list h3 { font-size: 1.05rem; }
.now-fig { position: sticky; top: 24px; max-width: 380px; }
.sources { font-size: 0.9rem; color: var(--muted); margin-top: 22px; max-width: 80ch; }
.fig .rv-same { fill: var(--acc); }
.fig .rv-near { fill: var(--acc); fill-opacity: 0.4; }
.fig .rv-far { fill: var(--paper); stroke: var(--acc); stroke-width: 1.6; }
.fig .rv-n { font-family: var(--font-body); font-size: 12px; font-weight: 700; }
.fig .rv-n.on-same { fill: var(--paper); }
.fig .rv-n.on-near, .fig .rv-n.on-far { fill: var(--head); }
.fig .page { fill: var(--surface); stroke: var(--muted); stroke-width: 1.2; }
.fig .page-line { stroke: var(--muted); stroke-opacity: 0.6; stroke-width: 1.4; stroke-linecap: round; }
.fig .spoke { stroke: var(--rule); stroke-width: 1; }
.fig .avg-track { stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 1; }
.fig .avg-mk { fill: var(--acc); }
@media (prefers-reduced-motion: no-preference) { .fig .rv-pop { transition: transform 300ms ease; } }
@media (max-width: 900px) { .now { grid-template-columns: minmax(0, 1fr); } .now-fig { position: static; } }

/* Fold-outs for extra detail, and the Science page figures */
.more-detail summary { cursor: pointer; font-weight: 700; color: var(--acc-text); font-size: 0.95rem; }
.more-detail[open] summary { margin-bottom: 8px; }
.more-detail ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.svc-fig { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.svc-fig svg { display: block; width: 100%; height: auto; overflow: visible; }
.svc-fig figcaption { font-size: 0.85rem; line-height: 1.45; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--acc); border-radius: 3px; overflow: hidden; align-self: flex-start; }
.seg button { font: inherit; font-size: 0.9rem; font-weight: 700; color: var(--acc-text); background: transparent; border: 0; padding: 5px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--acc); }
.seg button[aria-pressed="true"] { background: var(--acc); color: var(--on-acc, var(--paper)); }
.services-intro { max-width: 68ch; }
.fig .bar-pos { fill: var(--acc); }
.fig .bar-neg { fill: var(--paper); stroke: var(--acc); stroke-width: 1.5; }
.fig .el-lbl { fill: var(--head); font-family: var(--font-body); font-size: 11px; font-weight: 700; }
.fig .whisk { stroke: var(--head); stroke-width: 1; }
.fig .spec { stroke: var(--acc); stroke-width: 1.6; fill: none; stroke-linejoin: round; }
.fig .spec-fill { fill: var(--acc); fill-opacity: 0.08; stroke: none; }
.pub-group summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--head); padding-block: 10px; border-top: 1px solid var(--rule); }
.pub-group[open] summary { margin-bottom: 4px; }
.pub-group .pubs { margin-bottom: 12px; }

/* Teaching aid: NiO diffraction explorer (adapted from a standalone page; scoped to .xpl) */
:root { --xpl-fill: rgba(30, 58, 76, 0.08); --xpl-ref: #9AA4AD; --xpl-grid: #E8EDEF; --xpl-chip: #E6EEF2; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --xpl-fill: rgba(127, 168, 196, 0.13); --xpl-ref: #6E7B85; --xpl-grid: #1E2E37; --xpl-chip: #22323C; } }
:root[data-theme="dark"] { --xpl-fill: rgba(127, 168, 196, 0.13); --xpl-ref: #6E7B85; --xpl-grid: #1E2E37; --xpl-chip: #22323C; }
.xpl { --sample: var(--acc); --sample-fill: var(--xpl-fill); --ref: var(--xpl-ref); --shift: var(--gold-text); --grid: var(--xpl-grid);
  --chip: var(--xpl-chip); --chip-ink: var(--head); --ink: var(--text); --ink-2: var(--muted);
  --f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  display: flex; flex-direction: column; gap: 1rem; }
:root.big { font-size: 118.75%; }
.xpl .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 0.9rem 1rem; min-width: 0; }
.xpl .stage { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 1rem; }
.xpl .panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.4rem; }
.xpl .label { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--head); }
.xpl .legend { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--ink-2); }
.xpl .legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.xpl .sw { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--sample); }
.xpl .sw.ref { border-top: 1.5px dashed var(--ref); }
.xpl svg.plot { display: block; width: 100%; cursor: crosshair; touch-action: manipulation; }
#xpl-main { height: 310px; }
#zoom { height: 190px; }
.xpl svg text { font-family: var(--f-mono); font-size: 0.7rem; fill: var(--ink-2); }
.xpl svg .hkl { font-size: 0.72rem; }
.xpl svg .hkl.on { fill: var(--sample); font-weight: 600; }
.xpl svg .dl { font-size: 0.75rem; fill: var(--shift); font-weight: 600; }
.xpl .readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 0.9rem; margin: 0.6rem 0 0; }
.xpl .readouts div { min-width: 0; }
.xpl .readouts dt { font-size: 0.75rem; color: var(--ink-2); }
.xpl .readouts dd { margin: 0; font-family: var(--f-mono); font-size: 1.02rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--head); }
.xpl .readouts dd.sub { font-size: inherit; }
.xpl .readouts small { display: block; font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-2); white-space: nowrap; }
.xpl #dTT { color: var(--shift); }
.xpl .tag { display: inline-block; margin-left: 0.35rem; padding: 0 0.35rem; border-radius: 3px; background: var(--chip); color: var(--chip-ink); font-family: var(--font-body); font-size: 0.7rem; vertical-align: 2px; }
.xpl .controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.75rem; }
.xpl .ctl { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.xpl .ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.xpl .ctl-head label, .xpl .ctl-head .lab, .xpl legend { font-weight: 700; font-size: 0.9rem; color: var(--head); }
.xpl .val { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 0.95rem; white-space: nowrap; }
.xpl .val em { font-style: normal; color: var(--ink-2); font-size: 0.8rem; margin-left: 0.35rem; }
.xpl input[type=range] { width: 100%; accent-color: var(--sample); height: 28px; margin: 0; }
.xpl .scale { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.7rem; color: var(--ink-2); }
.xpl fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.xpl legend { padding: 0; margin-bottom: 0.35rem; }
.xpl .seg { display: flex; align-self: stretch; border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.xpl .seg label { flex: 1; text-align: center; cursor: pointer; position: relative; }
.xpl .seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.xpl .seg span { display: block; padding: 0.45rem 0.3rem; font-size: 0.85rem; line-height: 1.2; }
.xpl .seg span b { display: block; font-family: var(--f-mono); font-weight: 400; font-size: 0.7rem; color: var(--ink-2); }
.xpl .seg label + label { border-left: 1px solid var(--rule); }
.xpl .seg input:checked + span { background: var(--chip); color: var(--chip-ink); font-weight: 700; }
.xpl .seg input:checked + span b { color: var(--chip-ink); }
.xpl .seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.xpl .chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.xpl .chip { font-family: var(--f-mono); font-size: 0.8rem; padding: 0.3rem 0.55rem; border-radius: 3px; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer; min-height: 34px; }
.xpl .chip[aria-pressed="true"] { background: var(--sample); border-color: var(--sample); color: var(--paper); }
.xpl .actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.1rem; align-items: center; }
.xpl .btn { font: inherit; font-size: 0.9rem; padding: 0.4rem 0.85rem; border-radius: 3px; border: 1px solid var(--rule); background: transparent; color: var(--text); cursor: pointer; min-height: 36px; }
.xpl .btn:hover, .xpl .chip:hover { border-color: var(--acc); }
.xpl .check { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; cursor: pointer; }
.xpl .check input { accent-color: var(--sample); width: 18px; height: 18px; margin: 0; }
.xpl .notes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem; }
.xpl .notes h2 { margin: 0 0 0.5rem; font-size: 1rem; }
.xpl .eqs { display: flex; flex-direction: column; gap: 0.55rem; margin: 0; }
.xpl .eq { display: flex; justify-content: space-between; gap: 0.75rem; align-items: baseline; border-bottom: 1px solid var(--grid); padding-bottom: 0.45rem; }
.xpl .eq:last-child { border-bottom: 0; padding-bottom: 0; }
.xpl .eq span { font-size: 0.8rem; color: var(--ink-2); }
.xpl .eq code { font-family: var(--f-mono); font-size: 0.92rem; white-space: nowrap; }
.xpl .try { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 68ch; font-size: 0.95rem; }
.xpl .foot { font-size: 0.8rem; color: var(--ink-2); max-width: 90ch; margin: 0; }
.xpl .ol { text-decoration: overline; }
@media (max-width: 820px) { .xpl .stage, .xpl .notes, .xpl .controls { grid-template-columns: minmax(0, 1fr); } #xpl-main { height: 250px; } }
.example-link { display: flex; gap: 14px; align-items: center; border: 1px solid var(--rule); border-radius: 4px; padding: 10px 14px; text-decoration: none; color: inherit; background: var(--surface); max-width: 520px; }
.example-link svg { flex: 0 0 auto; width: 92px; height: auto; }
.example-link b { color: var(--head); display: block; }
.example-link span { font-size: 0.9rem; color: var(--muted); }
.example-link:hover b { color: var(--acc-text); text-decoration: underline; }

/* Science: "Where people usually start", each opening to how I'd approach it */
.starts-x { display: flex; flex-direction: column; gap: 10px; }
.sx { border-left: 3px solid var(--acc); padding: 2px 0 2px 16px; }
.sx summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-family: var(--font-display); font-style: italic; font-size: 1.05rem; line-height: 1.45; color: var(--head); }
.sx summary::-webkit-details-marker { display: none; }
.sx summary::after { content: "+"; font-family: var(--font-body); font-style: normal; font-weight: 700; font-size: 1.2rem; color: var(--acc-text); flex-shrink: 0; line-height: 1; }
.sx[open] summary::after { content: "\2212"; }
.sx summary:hover { color: var(--acc-text); }
.sx-body { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 16px; max-width: 70ch; font-size: 0.95rem; }
.sx-body ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; }
.sx-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 36px; align-items: start; max-width: none; }
.sx-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sx-read { font-size: 0.88rem; color: var(--muted); }
.fig .obs { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; fill: none; }
.fig .calc { stroke: var(--acc); stroke-width: 1.5; fill: none; stroke-linejoin: round; }
.fig .diff { stroke: var(--gold-text); stroke-width: 1.2; fill: none; stroke-linejoin: round; }
.fig .tick-a { stroke: var(--acc); stroke-width: 1.2; }
.fig .tick-b { stroke: var(--gold-text); stroke-width: 1.2; }
.fig .note { fill: var(--gold-text); font-family: var(--font-body); font-size: 9.5px; font-weight: 700; transition: opacity 300ms ease; }
@media (max-width: 900px) { .sx-split { grid-template-columns: minmax(0, 1fr); } }

/* People: topic areas and the week figure */
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.topic { display: flex; flex-direction: column; gap: 10px; border-top: 2px solid var(--acc); padding-top: 14px; min-width: 0; }
.topic h3 { font-size: 1.1rem; }
.topic ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 6px; font-size: 0.95rem; }
.topic-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; align-items: start; }
.topic-text { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.topic-wide .svc-fig { max-width: 480px; }
.week-read { margin: 0; font-size: 0.9rem; font-weight: 700; color: var(--head); min-height: 1.5em; }
.fig .wk-m { fill: var(--acc); }
.fig .wk-s { fill: var(--muted); fill-opacity: 0.32; }
.fig .wk-g { fill: var(--muted); fill-opacity: 0.62; }
.fig .wk-b { transition: fill 400ms ease, fill-opacity 400ms ease; }
.fig .wk-eve { fill: var(--muted); fill-opacity: 0.07; }
.fig .wk-end { stroke: var(--acc); stroke-width: 1.4; stroke-dasharray: 4 3; transition: opacity 400ms ease; }
@media (max-width: 900px) { .topics, .topic-wide { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fig .wk-b, .fig .wk-end { transition: none; } }

/* People: doctoral researcher / postdoc switch. data-role is set on <html> by a head script. */
[data-role="pgr"] [data-for="pd"], [data-role="pd"] [data-for="pgr"] { display: none !important; }
.role-switch { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
[data-role] .role-switch { display: flex; }
.role-lbl { font-weight: 700; color: var(--head); }
.role-seg button { font-size: 0.95rem; padding: 6px 14px; }

/* Portrait: About page head, and the home "Who you'll work with" avatar */
.portrait img { display: block; width: 100%; max-width: 300px; height: auto; border-radius: 4px; border: 1px solid var(--rule); background: var(--surface); }
.who { display: flex; align-items: center; gap: 16px; }
.who .avatar { display: block; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--rule); flex-shrink: 0; }
@media (max-width: 900px) {
  .page-head.has-portrait .wrap { grid-template-areas: "mark fig" "mark text"; }
  .page-head.has-portrait .portrait img { max-width: 160px; }
}
.page-head.has-portrait .portrait { align-self: start; }

/* Home threads: line up figure, eyebrow, title, reading, description and link across the three columns */
@media (min-width: 901px) {
  @supports (grid-template-rows: subgrid) {
    .threads { grid-template-rows: repeat(6, auto); row-gap: 12px; }
    .thread { display: grid; grid-row: span 6; grid-template-rows: subgrid; gap: 12px; align-content: start; }
    .thread > .more { justify-self: start; align-self: end; }
    .thread .eyebrow-row { align-self: end; padding-top: 6px; }
  }
}

/* Case study cards: same alignment, so the links (and "In preparation") sit on one line */
@media (min-width: 901px) {
  @supports (grid-template-rows: subgrid) {
    .cases { grid-template-rows: repeat(6, auto); row-gap: 8px; }
    .case { display: grid; grid-row: span 6; grid-template-rows: subgrid; gap: 8px; align-content: start; }
    .case > .more, .case > .soon { justify-self: start; }
  }
}

/* Case studies: operando, clinker and database figures */
.fig .op-lfp { fill: var(--acc); fill-opacity: 0.22; stroke: var(--acc); stroke-width: 1.4; stroke-linejoin: round; }
.fig .op-fp { fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linejoin: round; }
.fig .op-v { fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linejoin: round; }
.fig .op-vfaint { fill: none; stroke: var(--muted); stroke-opacity: 0.35; stroke-width: 1.2; }
.op-ctl { display: flex; align-items: center; gap: 10px; }
.op-ctl input[type="range"] { flex: 1; min-width: 0; accent-color: var(--acc); }
.op-play { font: inherit; font-size: 0.85rem; font-weight: 700; color: var(--acc-text); background: transparent; border: 1px solid var(--acc); border-radius: 3px; padding: 4px 12px; cursor: pointer; min-width: 4.5em; }
.fig .mg-1 { fill: var(--acc); }
.fig .mg-2 { fill: var(--acc); fill-opacity: 0.5; }
.fig .mg-3 { fill: var(--muted); fill-opacity: 0.3; }
.fig .mg-4 { fill: var(--muted); fill-opacity: 0.65; }
.fig .mg-5 { fill: var(--paper); stroke: var(--muted); stroke-width: 1; }
.fig .mg-6 { fill: var(--gold); }
.fig .mg-in { fill: var(--paper); font-family: var(--font-body); font-size: 10px; font-weight: 700; }
.fig .mg-sel { fill: none; stroke: var(--acc); stroke-width: 1.4; }
.fig .cs-pass { fill: var(--acc); }
.fig .cs-fail { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.thumb .t-gold { fill: var(--gold); }
@media (min-width: 901px) { @supports (grid-template-rows: subgrid) { .case { margin-bottom: 20px; } } }

/* Database case study figures */
.cs-fig { max-width: 520px; margin-top: 6px; }
.fig .bv-bond { stroke: var(--acc); stroke-linecap: round; }
.fig .bv-back { opacity: 0.45; }
.fig .bv-o { fill: var(--surface); stroke: var(--muted); stroke-width: 1.4; }
.fig .bv-m { fill: var(--acc); }
.fig .bv-mt { fill: var(--paper); font-family: var(--font-body); font-size: 10px; font-weight: 700; }
.fig .bv-band { fill: var(--acc); fill-opacity: 0.15; }
.fig .bv-ok { fill: var(--acc); }
.fig .bv-bad { fill: var(--gold); }
.bv-ctl { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; flex-wrap: wrap; }
.bv-ctl label { color: var(--muted); }
.bv-ctl input[type="range"] { flex: 1 1 160px; min-width: 0; accent-color: var(--acc); }
.bv-dist { font-weight: 700; color: var(--head); min-width: 5.5em; }
.fig .cen-pass { fill: var(--acc); fill-opacity: 0.09; }
.fig .cen-band { fill: var(--gold); fill-opacity: 0.35; }
.fig .cen-mean { stroke: var(--gold); stroke-width: 2; }
.fig .cen-era { fill: var(--muted); fill-opacity: 0.45; }
.fig .sp-1 { fill: var(--acc); }
.fig .sp-2 { fill: var(--acc); fill-opacity: 0.45; }
.fig .sp-3 { fill: var(--gold); }
.fig .sp-4 { fill: var(--muted); fill-opacity: 0.4; }
.rec { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); padding: 12px 14px; font-size: 0.9rem; display: flex; flex-direction: column; gap: 8px; }
.rec dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; margin: 0; }
.rec dt { color: var(--muted); }
.rec dd { margin: 0; color: var(--head); }
.rec .cmt { border-top: 1px dashed var(--rule); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.rec .cmt q { color: var(--muted); font-style: italic; }
.rec .cmt small { font-size: 0.8rem; color: var(--muted); }
.rec .cmt small.on { display: none; }
.rec .chips { display: none; flex-wrap: wrap; gap: 6px; }
.rec-fig.flags-on .chips { display: flex; }
.rec-fig.flags-on .cmt small.off { display: none; }
.rec-fig.flags-on .cmt small.on { display: inline; }
.chip { border: 1px solid var(--gold); color: var(--gold-text); border-radius: 3px; padding: 2px 8px; font-weight: 700; font-size: 0.8rem; }
.triage { list-style: none; margin: 6px 0 4px; padding: 0; display: flex; flex-direction: column; gap: 30px; max-width: 70ch; }
.triage li { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; position: relative; }
.triage .q { font-weight: 700; color: var(--head); background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; }
.triage .arr { text-align: center; color: var(--acc-text); font-weight: 700; }
.triage .a { border-left: 3px solid var(--acc); padding: 2px 0 2px 12px; }
.triage .eg { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.triage li + li::before { content: ""; position: absolute; left: 22px; top: -28px; height: 26px; border-left: 2px dashed var(--muted); opacity: 0.6; }
.triage li + li::after { content: "if not"; position: absolute; left: 32px; top: -24px; font-family: var(--font-body); font-size: 0.75rem; color: var(--muted); }
.triage.pre li { opacity: 0; transform: translateY(6px); }
.triage.in li { opacity: 1; transform: none; transition: opacity 400ms ease, transform 400ms ease; }
.triage.in li:nth-child(2) { transition-delay: 350ms; }
.triage.in li:nth-child(3) { transition-delay: 700ms; }
@media (max-width: 640px) { .triage li { grid-template-columns: minmax(0, 1fr); gap: 8px; } .triage .arr { display: none; } }

/* About: tool cards with runes */
.tool .runes { display: block; height: 22px; margin-bottom: 2px; }
.tool .runes svg { display: block; height: 22px; width: auto; overflow: visible; }
.tool .rune-path { fill: none; stroke: var(--acc); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool { padding-bottom: 4px; }
.tool p { font-size: 0.95rem; }
.tool .tool-status { margin-top: auto; font-size: 0.85rem; color: var(--muted); }

/* Science: ways to work with me */
.in-short .sectors { font-size: 0.95rem; }
.in-short .sectors .dot { color: var(--gold); padding-left: 0.3em; }
.in-short .label + .sectors { margin-top: -2px; }
.in-short p + .label { margin-top: 8px; }
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 28px; }
.way { display: flex; flex-direction: column; gap: 8px; border-top: 3px solid var(--acc); padding-top: 14px; min-width: 0; }
.way-when { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--acc-text); line-height: 1.35; }
.way h3 { font-size: 1.1rem; }
.way p { font-size: 0.95rem; }
.way .get b { color: var(--acc-text); }
.way-links { font-size: 0.9rem; line-height: 1.6; }
.way-links .dot { color: var(--gold); padding-left: 0.3em; }
/* Four across only where the labels fit on one line; two columns below that */
@media (min-width: 1180px) {
  .ways { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  @supports (grid-template-rows: subgrid) {
    .ways { grid-template-rows: repeat(5, auto); row-gap: 8px; }
    .way { display: grid; grid-row: span 5; grid-template-rows: subgrid; gap: 8px; align-content: start; }
    .way > .way-when { align-self: start; }
  }
}
@media (max-width: 640px) { .ways { grid-template-columns: minmax(0, 1fr); } }
.in-short .sectors .item, .way-links a { white-space: nowrap; }
.disclaimer { margin: 0; border-left: 3px solid var(--rule); padding: 4px 0 4px 16px; color: var(--muted); font-size: 0.92rem; max-width: 72ch; }
