/* Unison Medicines — "A new era of infection control"
   Palette and typefaces carried over from the Claude Design print layout. */
:root {
  --ink: #3A3A38;
  --ink-soft: #4C5563;
  --navy: #43546A;
  --navy-deep: #2E3B4E;
  --slate: #64778E;
  --slate-2: #4F5F76;
  --mist: #C9CFD8;
  --rule: #DDE1E7;
  --band: #EDEFF3;
  --paper: #F6F7F9;
  --gold: #CBA524;
  --gold-ink: #8A6614;
  --night: #1C2029;
  --night-2: #252A35;
  --cream: #F2EFE9;
  --cream-2: #C9C6C0;
  --serif-display: 'Cormorant Garamond', Georgia, serif;
  --serif: 'Spectral', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --col: 640px;      /* reading column */
  --rail: 200px;     /* right margin rail (desktop) */
  --gap: 48px;
  --gutter: clamp(16px, 4.5vw, 32px);
  --header-h: 98px;
}
@media (max-width: 899px) { :root { --header-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: none; }
a { color: var(--gold-ink); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; color: var(--navy-deep); padding: 8px 14px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--night); color: var(--cream); }
.bar { display: flex; align-items: center; gap: 20px; height: 54px; padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 26px; width: auto; filter: brightness(0) invert(1); display: block; }
.essay-title { font-family: var(--serif-display); font-style: italic; font-weight: 400; font-size: 19px; color: var(--cream-2); text-decoration: none; padding-left: 20px; border-left: 1px solid rgba(255,255,255,.18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.essay-title:hover { color: var(--cream); }
.here { display: none; }
.pdf { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-decoration: none; border: 1px solid rgba(203,165,36,.55); padding: 7px 14px; transition: background .15s, color .15s; }
.pdf svg { width: 14px; height: 14px; }
.pdf:hover { background: var(--gold); color: var(--night); }
.menu-btn { display: none; }

.chapters { border-top: 1px solid rgba(255,255,255,.09); background: var(--night); }
.chapters ul { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: 1440px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chapters ul::-webkit-scrollbar { display: none; }
.chapters li { flex: none; }
.chapters a { display: flex; align-items: baseline; gap: 7px; height: 42px; padding: 12px 11px 0; font-size: 13.5px; color: #A9AFBA; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.chapters a .n { font-family: var(--serif-display); font-size: 16px; font-weight: 500; color: #7D8594; font-variant-numeric: lining-nums; }
.chapters a:hover { color: var(--cream); }
.chapters a[aria-current="page"] { color: var(--cream); border-bottom-color: var(--gold); }
.chapters a[aria-current="page"] .n { color: var(--gold); }
.chapters .pdf-item { display: none; }
.progress { height: 2px; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transform-origin: left; }

/* menu overlay (phones / tablets) */
.menu { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--night); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.menu[hidden] { display: none; }
.menu-inner { max-width: 640px; margin: 0 auto; padding: 20px var(--gutter) 40px; }
.menu-label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8A93A2; margin: 6px 0 10px; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu li a { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: baseline; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); text-decoration: none; color: var(--cream); font-family: var(--serif-display); font-size: 21px; line-height: 1.25; }
.menu li a .n { color: #7D8594; font-size: 19px; font-variant-numeric: lining-nums; }
.menu li a[aria-current="page"] { color: var(--gold); }
.menu-pdf { display: block; margin-top: 22px; padding: 14px 16px; text-align: center; border: 1px solid rgba(203,165,36,.6); color: var(--gold); text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }

@media (max-width: 1099px) { .essay-title { font-size: 17px; } }
@media (max-width: 899px) {
  .chapters { display: none; }
  .essay-title { display: none; }
  .bar { height: 54px; gap: 12px; }
  .brand img { height: 22px; }
  .here { display: block; flex: 1; min-width: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #A9AFBA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.18); }
  .pdf { margin-left: 0; padding: 7px 9px; }
  .pdf span { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; flex: none; background: none; border: 1px solid rgba(255,255,255,.28); color: var(--cream); font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 8px 11px; cursor: pointer; }
  .menu-ic { width: 14px; height: 10px; border-top: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; position: relative; }
  .menu-ic::after { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1.5px solid currentColor; }
  .menu-btn[aria-expanded="true"] .menu-ic { border-color: transparent; }
  .menu-btn[aria-expanded="true"] .menu-ic::after { top: 3px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-ic::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1.5px solid currentColor; transform: rotate(-45deg); }
}
@media (max-width: 429px) { .here { visibility: hidden; } }
@media (max-width: 340px) { .menu-btn span:last-child { display: none; } }
body.menu-open { overflow: hidden; }

/* ------------------------------------------------------------ hero (landing) */
.hero { position: relative; background: var(--night); color: var(--cream); overflow: hidden; }
.hero-bar { position: absolute; left: 0; top: 0; width: 12px; height: 62%; background: var(--gold); }
@media (min-width: 1000px) { .hero-inner { max-width: calc(var(--col) + var(--rail) + var(--gap) + 2 * var(--gutter)); } }
@media (max-width: 600px) { .hero-bar { width: 6px; } }
.hero-inner { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: clamp(56px, 10vw, 112px) var(--gutter) clamp(52px, 8vw, 88px); }
.hero-kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #8A93A2; }
.hero-title { font-family: var(--serif-display); font-weight: 300; font-size: clamp(46px, 9vw, 84px); line-height: 1.02; letter-spacing: -.005em; color: var(--cream); margin: 22px 0 0; max-width: 13ch; }
.hero-sub { font-family: var(--serif); font-weight: 300; font-size: clamp(19px, 2.6vw, 24px); line-height: 1.5; color: var(--cream-2); max-width: 32ch; margin: 28px 0 0; }
.hero-by { margin-top: 30px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.hero-date { margin-top: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8A93A2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.btn { display: inline-block; padding: 13px 20px; background: var(--gold); color: var(--night); text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border: 1px solid var(--gold); }
.btn:hover { background: #D9B638; }
.btn.ghost { background: transparent; color: var(--cream); border-color: rgba(255,255,255,.35); }
.btn.ghost:hover { border-color: var(--cream); }

/* ------------------------------------------------------------ essay layout */
.essay { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) 24px; }
@media (min-width: 1000px) {
  .essay { max-width: calc(var(--col) + var(--rail) + var(--gap) + 2 * var(--gutter)); }
  .essay > .opener, .essay > .prose, .essay > .toc, .essay > .refs { max-width: var(--col); }
}
.rule { height: 3px; width: 96px; background: var(--navy); }

.opener { padding: clamp(56px, 9vw, 104px) 0 clamp(28px, 4vw, 40px); }
.ch-num { font-family: var(--serif-display); font-weight: 300; font-size: clamp(84px, 14vw, 128px); line-height: .9; color: var(--mist); letter-spacing: -.01em; font-variant-numeric: lining-nums; }
.ch-kicker { position: absolute; left: -9999px; }
.ch-title { font-family: var(--serif-display); font-weight: 400; font-size: clamp(36px, 6vw, 52px); line-height: 1.08; color: var(--navy-deep); margin: 18px 0 30px; max-width: 20ch; text-wrap: balance; }
.ch-title.quiet { font-weight: 300; color: var(--slate); margin-top: 0; }
.ch-sub { margin: 30px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); }
.lede { font-family: var(--serif); font-weight: 300; font-size: clamp(19px, 2.5vw, 22px); line-height: 1.55; color: var(--ink-soft); margin: 30px 0 0; text-wrap: pretty; }
.ch-sub + .lede { margin-top: 16px; }
.lede.tail { font-size: clamp(18px, 2.3vw, 20px); margin-top: 20px; }
.lede-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lede-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 2.3vw, 20px); line-height: 1.5; color: var(--ink-soft); }
.lede-list .mk { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--gold-ink); padding-top: 5px; }

.prose { padding-top: 8px; border-top: 1px solid var(--rule); }
.prose > p, .prose li > div { font-family: var(--serif); font-size: 18px; line-height: 1.72; color: var(--ink); text-wrap: pretty; }
.prose > p { margin: 0 0 1.15em; }
.prose > p:first-child { margin-top: 28px; }
@media (max-width: 520px) { .prose > p, .prose li > div { font-size: 17px; line-height: 1.68; } }
.prose i, .prose em { font-style: italic; }
.prose a, .lede a, .opener a { color: var(--gold-ink); text-decoration: none; border-bottom: 1px solid rgba(138,102,20,.38); }
.prose a:hover, .lede a:hover { border-bottom-color: var(--gold-ink); }
sup { font-size: .62em; line-height: 0; position: relative; vertical-align: baseline; top: -.55em; font-family: var(--sans); font-weight: 500; color: var(--slate); }
.prose a.cite, .lede a.cite, a.cite { color: var(--slate); border: 0; text-decoration: none; padding: 0 1px; border-radius: 2px; }
a.cite:hover, a.cite[aria-expanded="true"] { color: var(--gold-ink); background: rgba(203,165,36,.14); }
.prose a.figref { border-bottom-style: dotted; }

.list { list-style: none; margin: 0 0 1.2em; padding: 0; }
.list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; margin: 0 0 .65em; }
.list .mk { font-size: 12px; font-weight: 600; color: var(--gold-ink); padding-top: 6px; }
.list li > div { margin: 0; }
.list li > div > .margin { font-family: var(--sans); }

h2.sub { margin: 2.3em 0 1em; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); font-style: italic; line-height: 1.5; }
h2.sub a { color: inherit; text-decoration: none; border: 0; }
h2.sub a:hover::after { content: " #"; color: var(--mist); }

.eq { font-family: var(--serif); font-size: 18px; color: var(--navy); text-align: center; padding: 14px 8px 18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 6px 0 1.4em; }

blockquote.pull { margin: 1.6em 0; padding: 0; }
blockquote.pull.first { padding-top: 26px; border-top: 1px solid var(--rule); }
blockquote.pull p { font-family: var(--serif); font-weight: 300; font-size: clamp(21px, 2.8vw, 24px); line-height: 1.55; color: var(--navy); margin: 0; text-wrap: pretty; }

/* margin stats & notes: right rail on desktop, inline cards on smaller screens */
.margin { margin: 4px 0 1.3em; padding: 2px 0 2px 16px; border-left: 2px solid var(--gold); }
.stat-n { font-family: var(--sans); font-size: 26px; font-weight: 300; color: var(--navy); line-height: 1.15; }
.stat-l { font-size: 13px; line-height: 1.5; color: var(--slate-2); max-width: 34ch; }
.note { font-size: 13px; line-height: 1.55; color: var(--slate-2); }
.note-mark { color: var(--gold-ink); font-weight: 600; }
@media (min-width: 1000px) {
  .prose .margin { float: right; clear: right; width: var(--rail); margin: 6px calc(-1 * (var(--rail) + var(--gap))) 18px 0; padding: 0; border-left: 0; }
  .stat-n { font-size: 24px; }
  .stat-l, .note { font-size: 12px; }
}

/* ------------------------------------------------------------ figures */
.fig { margin: 30px 0 34px; clear: both; }
.fig-frame { overflow: hidden; }
.fig-frame.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-inner { font-family: var(--sans); transform-origin: 0 0; }
.fig-inner img { max-width: none; }
.fig figcaption { font-size: 14px; line-height: 1.55; color: var(--slate-2); margin-top: 12px; max-width: 600px; text-wrap: pretty; }
.fig-label { font-weight: 600; color: var(--navy); }
.fig figcaption a { color: var(--gold-ink); text-decoration: none; }
@media (min-width: 1000px) {
  .prose > .fig.wide { margin-right: calc(-1 * (var(--rail) + var(--gap))); }
  .fig figcaption { font-size: 13px; }
}
.fig-enlarge { margin-top: 10px; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); background: #fff; border: 1px solid var(--rule); padding: 8px 12px; cursor: pointer; }
.fig-enlarge::before { content: "⤢  "; }
.fig-enlarge[hidden] { display: none; }

.lightbox { position: fixed; inset: 0; z-index: 80; background: #fff; display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--rule); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); }
.lb-close { background: none; border: 1px solid var(--rule); font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--navy); padding: 8px 12px; cursor: pointer; }
.lb-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 18px 14px 28px; }
.lb-body .fig-inner { zoom: 1 !important; }
.lb-hint { font-size: 12px; color: var(--slate); padding: 0 14px 10px; }

/* ------------------------------------------------------------ contents (landing) */
.toc { padding: 44px 0 20px; }
.toc-label { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--slate); margin-bottom: 18px; }
.toc .rule { margin-bottom: 18px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: baseline; padding: 15px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.toc li:first-child a { border-top: 0; }
.toc .n { font-family: var(--serif-display); font-size: 22px; color: var(--mist); font-variant-numeric: lining-nums; }
.toc .t { font-family: var(--serif-display); font-size: 22px; line-height: 1.3; color: var(--navy-deep); }
.toc li a:hover .t { color: var(--gold-ink); }
.toc-pdf { font-family: var(--serif); font-size: 17px; color: var(--ink-soft); margin: 22px 0 0; }
.toc-pdf a { color: var(--gold-ink); }

/* ------------------------------------------------------------ references */
.refs { padding: 30px 0 20px; border-top: 1px solid var(--rule); margin-top: 20px; }
.refs-h { font-size: 11px; font-weight: 400; letter-spacing: .22em; text-transform: uppercase; color: var(--slate); margin: 14px 0 18px; }
.refs .rule { margin-bottom: 26px; }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 8px 6px; margin: 0 -6px; font-size: 14px; line-height: 1.55; color: var(--navy); border-radius: 2px; }
.ref-list .rn { text-align: right; font-weight: 600; color: var(--gold-ink); font-size: 12px; padding-top: 2px; }
.ref-list .rt { overflow-wrap: anywhere; }
.ref-list a { color: var(--gold-ink); text-decoration: none; border-bottom: 1px solid rgba(138,102,20,.38); }
.ref-list li:target { background: rgba(203,165,36,.16); }

/* ------------------------------------------------------------ citation pop-up */
.cite-pop { position: absolute; z-index: 60; width: min(420px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--rule); border-top: 2px solid var(--navy); box-shadow: 0 10px 30px rgba(28,32,41,.16); padding: 14px 16px 12px; font-size: 13.5px; line-height: 1.5; color: var(--navy); max-height: 55vh; overflow-y: auto; }
.cite-pop[hidden] { display: none; }
.cite-pop .cp-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.cite-pop .cp-n { font-weight: 600; color: var(--gold-ink); font-size: 12px; padding-top: 1px; text-align: right; }
.cite-pop .cp-t { overflow-wrap: anywhere; }
.cite-pop a { color: var(--gold-ink); text-decoration: none; border-bottom: 1px solid rgba(138,102,20,.38); }
.cite-pop .cp-all { display: inline-block; margin-top: 4px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border: 0; }
@media (max-width: 640px) {
  .cite-pop { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 50vh; border-left: 0; border-right: 0; padding: 16px var(--gutter) calc(14px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------ prev/next + footer */
.prevnext { max-width: calc(var(--col) + 2 * var(--gutter)); margin: 30px auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 1000px) { .prevnext { max-width: calc(var(--col) + var(--rail) + var(--gap) + 2 * var(--gutter)); padding-right: calc(var(--rail) + var(--gap) + var(--gutter)); } }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; background: #fff; border: 1px solid var(--rule); text-decoration: none; transition: border-color .15s; }
.pn:hover { border-color: var(--gold); }
.pn.next { text-align: right; grid-column: 2; }
.pn-k { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--slate); }
.pn.next .pn-k::after { content: " →"; }
.pn.prev .pn-k::before { content: "← "; }
.pn-t { font-family: var(--serif-display); font-size: 20px; line-height: 1.25; color: var(--navy-deep); }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .pn.next { grid-column: 1; } .pn.prev { order: 2; } }

.site-footer { margin-top: 64px; background: var(--night); color: #A9AFBA; padding: 40px var(--gutter) 30px; }
.foot-inner { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.foot-inner img { height: 24px; width: auto; filter: brightness(0) invert(1); opacity: .9; }
.foot-meta { font-size: 13px; flex: 1; min-width: 220px; }
.foot-inner a { color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.foot-copy { max-width: 1040px; margin: 22px auto 0; font-size: 12px; color: #7D8594; }

/* ------------------------------------------------------------ print */
@media print {
  .site-header, .menu, .prevnext, .site-footer, .fig-enlarge, .cite-pop, .hero-actions { display: none !important; }
  body { background: #fff; }
}
