/* Meridian Tourism Research Institute: site styles (p1 final).
   System: DESIGN_SYSTEM.md. One family (Schibsted Grotesk), black, white and greys; the
   photographs carry the color. Black is used as whole bands: the header, the headline panel,
   the founding directors on the home page and the footer. */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111111;
  --black: #0e0f0f;
  --grey: #5c5c5c;                       /* 6.7:1 on white */
  --rule: #d8d8d8;
  --fog: #b5b5b5;                        /* secondary text on black, 9:1 */
  --line-dark: rgb(255 255 255 / 0.24);
  --pad: clamp(20px, 3.4vw, 56px);
  --gap: clamp(16px, 1.7vw, 28px);
  --section: clamp(80px, 9vw, 144px);
  --inline: max(var(--pad), calc((100% - 1680px) / 2));
  --bar: 88px;
  --h2: clamp(30px, 3.3vw, 50px);
  --lede: clamp(19px, calc(1.2vw + 9px), 26px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 18px/1.55 "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, address, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
h1, h2, h3 { font-weight: 560; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.6vw, 72px); line-height: 1; letter-spacing: -0.036em; }
h2 { font-size: var(--h2); line-height: 1.04; letter-spacing: -0.03em; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
p { text-wrap: pretty; }
main { padding-bottom: var(--section); }
main.home { padding-bottom: 0; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 0.15s, color 0.15s; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
::selection { background: var(--ink); color: #fff; }

.skip {
  position: absolute; left: 16px; top: -120px; z-index: 30;
  padding: 12px 18px; background: #fff; color: var(--ink); font-weight: 600;
}
.skip:focus { top: 16px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nb { white-space: nowrap; }
.wrap { padding-inline: var(--inline); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* small parts */
.links { display: flex; flex-wrap: wrap; gap: 0 36px; font-size: 17px; font-weight: 520; }
.more { margin-top: 20px; font-size: 17px; font-weight: 520; }
.links a, .more a { display: inline-flex; align-items: center; min-height: 44px; }
.date, .checked { font-size: 15px; line-height: 1.4; color: var(--grey); }
.src { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--grey); }
.updated { margin-top: 48px; font-size: 14px; color: var(--grey); }
figcaption { padding-top: 12px; font-size: 13px; line-height: 1.4; color: var(--grey); }
sup.ref { font-size: 0.64em; line-height: 0; vertical-align: 0.55em; }
sup.ref a { padding: 0 1px 0 2px; font-weight: 600; text-decoration: none; }
sup.ref a:hover { text-decoration: underline; }
.prose { max-width: 40em; }
.prose p + p, .prose p + ul, .prose ul + p, .prose h3 + p { margin-top: 1em; }
.prose h3 + p { margin-top: 10px; }
.prose .more { margin-top: 20px; }

/* header: a solid black bar */
.site-header {
  position: relative; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 24px;
  min-height: var(--bar); padding-inline: var(--inline);
  background: var(--black); color: #fff;
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 44px; }
.nav ul { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 44px); }
.nav a, .menu summary {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 16px; font-weight: 500; color: #fff;
  text-decoration: underline 1px transparent; text-underline-offset: 8px;
}
.nav a:hover, .nav a[aria-current="page"] { text-decoration-color: #fff; }
.nav a[aria-current="page"] { text-decoration-thickness: 2px; }
.menu { display: none; }

/* home: the headline on a black panel that hangs from the header, over the forest in the
   photograph, so the ship and the town stay in view beside it */
.hero { position: relative; overflow: hidden; }
.hero-band { position: absolute; inset: 0 0 auto; z-index: 1; }
.hero h1 {
  grid-column: 7 / -1; position: relative;
  padding: clamp(18px, 1.8vw, 30px) 0 clamp(34px, 3.2vw, 54px);
  color: #fff; font-size: clamp(40px, 5.4vw, 88px); line-height: 0.98; letter-spacing: -0.042em;
}
.hero h1::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: -100vw;
  left: calc(-1 * clamp(24px, 2.6vw, 44px)); background: var(--black);
}
.hero-media img { width: 100%; height: clamp(520px, calc(100vh - var(--bar)), 57.3vw); object-fit: cover; object-position: 50% 100%; }
.hero-media figcaption { padding-inline: var(--inline); }

.intro { padding-block: calc(var(--section) * 0.8) calc(var(--section) * 0.62); }
.lede { grid-column: 1 / span 8; font-size: var(--lede); font-weight: 440; line-height: 1.38; letter-spacing: -0.012em; }
.intro .links { grid-column: 1 / -1; margin-top: 24px; }

/* home: what we do, the four lines of work as links into what-we-do.html */
.whatwedo { padding-bottom: var(--section); }
.whatwedo > h2 { margin-bottom: clamp(24px, 2.6vw, 44px); }
.work-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 28px; }
.work-list li { padding-top: 16px; border-top: 1px solid var(--ink); }
.work-list h3 { font-size: clamp(22px, 1.9vw, 28px); font-weight: 540; line-height: 1.12; letter-spacing: -0.024em; }
.work-list h3 a { text-decoration-color: transparent; }
.work-list h3 a:hover { text-decoration-color: currentColor; }
.work-list p { margin-top: 8px; font-size: 16px; line-height: 1.45; color: var(--grey); }

/* home: what we're following (a lead item, then a list) */
.following { padding-bottom: var(--section); }
.following > h2 { margin-bottom: clamp(32px, 3.4vw, 56px); }
.lead-item, .updates li { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.lead-item { padding: 22px 0 clamp(44px, 4.4vw, 72px); border-top: 2px solid var(--ink); }
.lead-item .date, .updates .date { grid-column: 1 / span 2; padding-top: 0.35em; }
.lead-item h3 { grid-column: 3 / span 4; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 540; }
.lead-item .entry, .updates .entry { grid-column: 7 / span 5; }
.lead-item .entry p:not(.src) { font-size: clamp(19px, calc(0.7vw + 13px), 23px); line-height: 1.45; letter-spacing: -0.008em; }
.lead-item .entry p + p:not(.src) { margin-top: 0.7em; }
.lead-item .src { margin-top: 16px; }
.updates { border-bottom: 1px solid var(--ink); }
.updates li { padding: 20px 0 28px; border-top: 1px solid var(--ink); }
.updates h3 { grid-column: 3 / span 4; font-size: 24px; letter-spacing: -0.02em; }
.updates .entry p:not(.src) { font-size: 18px; line-height: 1.5; }

/* visitor charges and caps: the figures are the display type */
.charges { padding-bottom: var(--section); }
.charges-head { row-gap: 14px; align-items: end; margin-bottom: clamp(32px, 3.4vw, 56px); }
.charges-head h2 { grid-column: 1 / span 6; }
.charges-head .note { grid-column: 7 / span 5; font-size: 17px; line-height: 1.5; }
.charges-head .checked { grid-column: 7 / span 5; }
.charges .more { margin-top: 24px; }

.data { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data thead th {
  padding: 0 var(--gap) 12px 0; border-bottom: 1px solid var(--ink);
  font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--grey); text-align: left; vertical-align: bottom;
}
.data tbody td, .data tbody th { padding: 20px var(--gap) 24px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.data th:last-child, .data td:last-child { padding-right: 0; }
.data .fig { font-size: clamp(30px, 2.9vw, 46px); font-weight: 480; line-height: 1; letter-spacing: -0.035em; white-space: nowrap; }
.data tbody th { font-size: 18px; font-weight: 560; line-height: 1.3; }
.data .region { display: block; margin-top: 3px; font-size: 14px; font-weight: 400; color: var(--grey); }
.data .measure { font-size: 16px; line-height: 1.5; }
.data .add { display: block; margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--grey); }
.data .since { font-size: 15px; line-height: 1.4; }
.data .srcs { font-size: 14px; line-height: 1.45; color: var(--grey); }
.data .measure .srcs { display: block; margin-top: 8px; }
.data .m-label { display: none; }
.compact col.c-fig { width: 21%; }
.compact col.c-place { width: 21%; }
.compact col.c-measure { width: 42%; }
.compact col.c-since { width: 16%; }
.full col.c-fig { width: 16%; }
.full col.c-place { width: 15%; }
.full col.c-measure { width: 35%; }
.full col.c-since { width: 13%; }
.full col.c-src { width: 21%; }
.full .fig { font-size: clamp(26px, 2.4vw, 38px); }

/* a full-bleed photograph between sections */
.band-photo img { width: 100%; }
.band-photo figcaption { padding-inline: var(--inline); }

/* home: research agenda index */
.agenda { padding-block: clamp(64px, 7vw, 112px) var(--section); row-gap: 28px; align-items: start; }
.agenda-head { grid-column: 1 / span 4; }
.agenda-head .more { margin-top: 16px; }
.agenda-list { grid-column: 5 / -1; border-top: 1px solid var(--ink); }
.agenda-list li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.agenda-list h3 { font-size: clamp(24px, 2.3vw, 34px); font-weight: 520; line-height: 1.1; letter-spacing: -0.028em; }
.agenda-list h3 a { text-decoration-color: transparent; }
.agenda-list h3 a:hover { text-decoration-color: currentColor; }
.agenda-list p { font-size: 16px; color: var(--grey); }

/* home: founding directors, a black band */
.board { padding-block: var(--section); background: var(--black); color: #fff; }
.board h2 { grid-column: 1 / -1; margin-bottom: clamp(36px, 4vw, 64px); }
.names {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap); row-gap: clamp(16px, 1.8vw, 28px);
  font-size: clamp(24px, 2.6vw, 38px); line-height: 1.1; letter-spacing: -0.026em; font-weight: 460;
}
.names li { padding-top: 16px; border-top: 1px solid var(--line-dark); }

/* home: contact */
.contact { padding-block: var(--section); row-gap: 18px; align-items: baseline; }
.contact h2 { grid-column: 1 / span 4; }
.contact-note { grid-column: 5 / -1; font-size: var(--lede); line-height: 1.38; letter-spacing: -0.012em; }
.mail { grid-column: 5 / -1; font-size: clamp(30px, 4.2vw, 64px); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; }
.mail a { text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.mail a:hover { text-decoration-thickness: 3px; }

/* inner pages */
.page-head { padding-block: clamp(56px, 6.4vw, 112px) clamp(40px, 4.4vw, 76px); row-gap: clamp(20px, 2.2vw, 34px); }
.page-head h1 { grid-column: 1 / span 10; }
.page-head .lead { grid-column: 1 / span 8; font-size: var(--lede); font-weight: 440; line-height: 1.4; letter-spacing: -0.012em; }
.page-head .lead-more { grid-column: 1 / span 7; max-width: 40em; }
.page-head .links { grid-column: 1 / -1; }
.sec { padding-top: var(--section); }
.page-head + .sec, .band-photo + .sec { padding-top: calc(var(--section) * 0.6); }
.sec > h2 { margin-bottom: clamp(24px, 2.6vw, 44px); }
.sec-grid { row-gap: 36px; align-items: start; }
.split { row-gap: 24px; align-items: start; }
.split > h2 { grid-column: 1 / span 4; margin-bottom: 0; }
.sec-body { grid-column: 5 / -1; }
.col-text { grid-column: 1 / span 7; }
.col-wide { grid-column: 1 / span 9; }
.col-side { grid-column: 9 / -1; }

/* research */
.compare { border-top: 1px solid var(--ink); }
.compare > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); column-gap: var(--gap); padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
.compare dt { font-size: 20px; font-weight: 560; line-height: 1.3; letter-spacing: -0.015em; }
.compare dd { max-width: 38em; font-size: 17px; line-height: 1.55; }
.qlist { margin-top: 36px; max-width: 36em; }
.qlist li { font-size: 21px; font-weight: 500; line-height: 1.35; letter-spacing: -0.014em; }
.qlist li + li { margin-top: 14px; }
.case { font-size: clamp(19px, calc(0.5vw + 13px), 21px); line-height: 1.5; letter-spacing: -0.006em; }
.case + p { margin-top: 1.2em; }
.qpair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px var(--gap); margin-top: 36px; }
.qpair li { padding-top: 14px; border-top: 2px solid var(--ink); font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: -0.012em; }
.cases { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; }
.cases > div { padding-top: 16px; border-top: 1px solid var(--ink); max-width: 36em; }
.cases h3 + p { margin-top: 10px; }
.after-cases { margin-top: 40px; }
.qnum { margin-top: 28px; counter-reset: q; }
.qnum li { counter-increment: q; display: grid; grid-template-columns: 1.8em minmax(0, 1fr); padding: 12px 0; border-top: 1px solid var(--rule); font-size: 19px; font-weight: 500; line-height: 1.4; }
.qnum li::before { content: counter(q) "."; color: var(--grey); }
.tracker-meta .checked { margin-top: 4px; }
.tracker-meta .more { margin-top: 4px; }
.table-block { margin-top: clamp(32px, 3.4vw, 52px); }
.refs { columns: 2 22em; column-gap: calc(var(--gap) * 2); font-size: 16px; line-height: 1.5; }
.refs li { break-inside: avoid; margin-bottom: 14px; padding-left: 1.6em; text-indent: -1.6em; }
.notes { columns: 2 24em; column-gap: calc(var(--gap) * 2); font-size: 14.5px; line-height: 1.5; }
.notes li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); break-inside: avoid; margin-bottom: 12px; }
.notes li:target { background: #eeeeee; }
.notes p { overflow-wrap: break-word; }
.notes .back { font-weight: 600; text-decoration: none; }
.notes .back:hover { text-decoration: underline; }
.pair { row-gap: 56px; align-items: start; }
.pair > section { grid-column: span 6; max-width: 34em; }
.pair h2, .about-cols h2 { font-size: clamp(26px, 2.4vw, 36px); margin-bottom: 16px; }
.pair p + p { margin-top: 1em; }

/* about */
.about-cols { row-gap: 56px; align-items: start; }
.about-cols > section { padding-top: 18px; border-top: 1px solid var(--ink); }
.about-cols .work { grid-column: 1 / span 5; }
.about-cols .directors { grid-column: 7 / -1; }
.dirs { columns: 2; column-gap: var(--gap); margin-top: 4px; }
.dirs li { padding: 6px 0; font-size: clamp(21px, 1.8vw, 26px); font-weight: 460; line-height: 1.25; letter-spacing: -0.02em; }

/* what we do: research is a split section; courses, events and advising are each built differently */
.courses .cases { grid-column: 1 / span 8; margin-top: clamp(32px, 3.4vw, 52px); }
.courses .more { grid-column: 1 / -1; margin-top: 20px; }
.events { margin-top: var(--section); padding-block: var(--section); background: var(--black); color: #fff; }
.events h2 { grid-column: 1 / -1; margin-bottom: clamp(24px, 2.6vw, 44px); }
.events .note { grid-column: 1 / span 6; margin-top: 24px; color: var(--fog); }
.events .more { grid-column: 1 / -1; margin-top: 20px; }
@media (min-width: 1024px) {
  .events h2 { grid-column: 1 / span 4; grid-row: 1 / span 3; margin-bottom: 0; }
  .events .lede, .events .more { grid-column: 5 / -1; }
  .events .note { grid-column: 5 / span 6; }
}
.advising { row-gap: 48px; align-items: start; }
.advise-main { grid-column: 1 / span 6; }
.advise-main h2 { margin-bottom: clamp(20px, 2.2vw, 36px); }
.advise-side { grid-column: 8 / -1; padding-top: 18px; border-top: 1px solid var(--ink); }
.asks { margin-top: 12px; }
.asks li { padding: 14px 0 16px; border-top: 1px solid var(--rule); font-size: 19px; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; }

/* get involved: the four audiences two across in equal halves, then the other ways in as rows; from 1024 px
   the second audience column, every .ways body and the contact email share one edge at column 7 */
.audiences { row-gap: clamp(40px, 4vw, 64px); padding-bottom: clamp(56px, 6vw, 96px); }
.audiences > section { grid-column: span 6; padding-top: 26px; border-top: 1px solid var(--ink); }
.audiences h2 { margin-bottom: 14px; font-size: clamp(24px, 2.2vw, 34px); }
.audiences p { max-width: 34em; }
.audiences .more { margin-top: 14px; }
.ways > section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 14px; padding: 26px 0 clamp(40px, 4vw, 64px); border-top: 1px solid var(--ink); }
.ways > section:last-child { padding-bottom: 0; }
.ways h2 { grid-column: 1 / span 6; font-size: clamp(24px, 2.2vw, 34px); }
.ways .body { grid-column: 7 / -1; max-width: 38em; }
.ways .body p + p { margin-top: 1em; }
.ways .body .more { margin-top: 14px; }
.contact-mail { font-size: clamp(26px, 3vw, 44px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 500; }
.contact-mail a { text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.contact-mail + p { margin-top: 18px; }

/* transparency and privacy */
.facts { grid-column: 1 / span 9; width: 100%; border-collapse: collapse; }
.facts th, .facts td { padding: 16px var(--gap) 18px 0; border-top: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.facts tr:first-child > * { border-top-color: var(--ink); }
.facts tr:last-child > * { border-bottom: 1px solid var(--rule); }
.facts td:last-child { padding-right: 0; }
.facts th { width: 34%; font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--grey); }
.facts td { font-size: 18px; line-height: 1.5; }
.purpose { margin-top: 16px; padding-left: 20px; border-left: 2px solid var(--ink); }
.credits-body h3 { margin: 40px 0 12px; }
.credits-body > h3:first-child { margin-top: 0; }
.credits li { overflow-wrap: anywhere; }
.credits li + li { margin-top: 14px; }

/* footer: black */
.site-footer { padding: clamp(56px, 6vw, 96px) var(--inline) 40px; background: var(--black); color: #fff; }
.site-footer a { color: #fff; }
.foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 32px; align-items: start; }
.foot .brand { grid-column: 1 / span 4; }
.foot .brand img { height: 40px; }
.foot address { grid-column: 6 / span 3; font-size: 16px; line-height: 1.6; color: var(--fog); }
.foot address a { color: #fff; }
.foot nav { grid-column: 9 / -1; }
.foot nav ul { display: grid; grid-template-columns: repeat(2, max-content); column-gap: 48px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 500; text-decoration-color: transparent; text-underline-offset: 7px; }
.foot nav a:hover { text-decoration-color: #fff; }
.legal { margin-top: clamp(40px, 4.4vw, 72px); padding-top: 24px; border-top: 1px solid var(--line-dark); font-size: 14px; line-height: 1.55; color: var(--fog); }
.legal p { max-width: 80ch; }
.legal p + p { margin-top: 8px; }

/* ---------- 1279 and below ---------- */
@media (max-width: 1279px) {
  .lede, .page-head .lead, .courses .cases { grid-column: 1 / span 9; }
  .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .full col.c-fig { width: 15%; }
  .full col.c-measure { width: 34%; }
  .full col.c-since { width: 14%; }
}

/* ---------- 1023 and below ---------- */
@media (max-width: 1023px) {
  .hero h1 { grid-column: 6 / -1; }
  .lede, .page-head h1, .page-head .lead, .page-head .lead-more, .col-text, .col-wide, .col-side, .facts, .split > h2, .sec-body { grid-column: 1 / -1; }
  .courses .cases, .events .note, .advise-main, .advise-side { grid-column: 1 / -1; }
  .lead-item .date, .updates .date { grid-column: 1 / -1; padding-top: 0; margin-bottom: 10px; }
  .lead-item h3, .updates h3 { grid-column: 1 / span 5; }
  .lead-item .entry, .updates .entry { grid-column: 6 / -1; }
  .charges-head h2, .charges-head .note, .charges-head .checked { grid-column: 1 / -1; }
  .agenda-head, .agenda-list { grid-column: 1 / -1; }
  .names { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact h2, .contact-note, .mail { grid-column: 1 / -1; }
  .about-cols .work, .about-cols .directors { grid-column: 1 / -1; }
  .ways h2 { grid-column: 1 / -1; }
  .ways .body { grid-column: 1 / span 10; }
  .pair > section { grid-column: 1 / -1; }
  .foot .brand, .foot address { grid-column: span 6; }
  .foot nav { grid-column: 1 / -1; }
  .foot nav ul { grid-template-columns: repeat(6, max-content); column-gap: 28px; }
  .full col.c-fig { width: 17%; }
  .full col.c-place { width: 17%; }
  .full col.c-measure { width: 32%; }
  .full col.c-since { width: 14%; }
  .full col.c-src { width: 20%; }
}

/* ---------- phones: menu, stacked hero, stacked tables ---------- */
@media (max-width: 879px) {
  :root { --bar: 68px; }
  body { font-size: 17px; }
  .site-header { padding-block: 12px; }
  .brand img { height: 36px; }
  .menu { display: block; }
  .menu summary { padding-inline: 4px; cursor: pointer; list-style: none; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] summary { text-decoration-color: #fff; }
  .menu .when-open, .menu[open] .when-closed { display: none; }
  .menu[open] .when-open { display: inline; }
  .nav { display: none; flex-basis: 100%; padding-block: 8px 20px; }
  .site-header:has(.menu[open]) .nav { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a { display: flex; min-height: 56px; border-top: 1px solid var(--line-dark); font-size: 24px; letter-spacing: -0.02em; text-underline-offset: 6px; }

  .hero-band { position: relative; background: var(--black); }
  .hero h1 { grid-column: 1 / -1; padding: 8px 0 32px; font-size: clamp(36px, 10.4vw, 52px); }
  .hero h1::before { content: none; }
  .hero-media img { height: auto; aspect-ratio: 1 / 1; }

  .lead-item h3, .lead-item .entry, .updates h3, .updates .entry { grid-column: 1 / -1; }
  .lead-item h3, .updates h3 { margin-bottom: 12px; }
  .updates h3 { font-size: 21px; }
  .names { grid-template-columns: 1fr; }
  .compare > div { grid-template-columns: 1fr; row-gap: 6px; }
  .qpair, .cases { grid-template-columns: 1fr; }
  .dirs { columns: 1; }
  .work-list { grid-template-columns: 1fr; }
  .audiences > section { grid-column: 1 / -1; }
  .ways .body { grid-column: 1 / -1; }
  .refs, .notes { columns: 1; }
  .facts, .facts tbody, .facts tr, .facts th, .facts td { display: block; width: auto; }
  .facts th { padding: 14px 0 2px; }
  .facts td { padding: 0 0 14px; border-top: 0; }
  .facts tr:first-child td { border-top: 0; }
  .facts tr:last-child th { border-bottom: 0; }
  .foot .brand, .foot address { grid-column: 1 / -1; }
  .foot nav ul { grid-template-columns: repeat(2, max-content); column-gap: 40px; }

  .data, .data tbody, .data colgroup { display: block; }
  .data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data tbody tr { display: block; padding: 18px 0 22px; border-bottom: 1px solid var(--rule); }
  .data tbody tr:first-child { border-top: 1px solid var(--ink); }
  .data tbody td, .data tbody th { display: block; padding: 0; border: 0; }
  .data tbody th { margin-top: 10px; }
  .data .region { display: inline; margin-left: 6px; }
  .data .measure, .data .since, .data .srcs { margin-top: 6px; }
  .data .m-label { display: inline; }
}

/* 700 to 799: five nav links beside the full-size logo; the gap grows from 14 px at 700 to 20 px at 768,
   meeting the 20 px it has at 800, so the links stay on one line */
@media (min-width: 880px) and (max-width: 1040px) {
  .nav ul { gap: clamp(14px, calc(8.8vw - 47.6px), 20px); }
}

@media (max-width: 359px) {
  :root { --pad: 16px; }
  .site-header { column-gap: 12px; }
  .brand img { height: 32px; }
}

/* Phones: keep every agenda item on the same two-line pattern. */
@media (max-width: 599px) {
  .agenda-list li { display: block; }
  .agenda-list p { margin-top: 6px; }
}


/* ==========================================================================
   MTRI Phase 2 Extension: Journal, Working Papers, Interactive Tracker & API
   ========================================================================== */

:root {
  --tint: #f5f5f3;
  --tint-strong: #ebebea;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

/* Note: Schibsted Grotesk's OpenType tnum table widens punctuation (, and .),
   so keep its native geometric proportional kerning on display figures. */

/* ---------- Homepage: Institute Metrics Strip ---------- */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  margin-top: clamp(36px, 4vw, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--ink);
  grid-column: 1 / -1;
}
.metric-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.metric-fig {
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.036em;
}
.metric-label {
  font-size: 15px;
  line-height: 1.4;
  color: var(--grey);
  max-width: 24ch;
}

/* ---------- Homepage & Hub: Featured Working Papers ---------- */
.journal-home {
  padding-bottom: var(--section);
}
.sec-head {
  row-gap: 14px;
  align-items: end;
  margin-bottom: clamp(32px, 3.4vw, 52px);
}
.sec-head h2 {
  grid-column: 1 / span 6;
}
.sec-head .sec-sub {
  grid-column: 7 / span 6;
  font-size: 17px;
  line-height: 1.5;
  color: var(--grey);
}

.paper-lead {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  padding: 28px 0 clamp(40px, 4vw, 64px);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.paper-lead-meta {
  grid-column: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.paper-lead-body {
  grid-column: 4 / -1;
}
.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--grey);
}
.paper-lead-body h3 {
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 540;
  line-height: 1.06;
  letter-spacing: -0.032em;
  max-width: 28ch;
}
.paper-lead-body h3 a,
.paper-card h3 a,
.journal-row h3 a {
  text-decoration-color: transparent;
}
.paper-lead-body h3 a:hover,
.paper-card h3 a:hover,
.journal-row h3 a:hover {
  text-decoration-color: currentColor;
}
.paper-lead-body .deck {
  margin-top: 16px;
  font-size: clamp(18px, 1.3vw, 21px);
  line-height: 1.48;
  color: var(--ink);
  max-width: 44em;
}
.paper-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--grey);
}
.paper-stats-inline strong {
  color: var(--ink);
  font-weight: 600;
}

.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 36px;
  padding-top: 32px;
}
.paper-card {
  display: flex;
  flex-direction: column;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
}
.paper-card .kicker {
  margin-bottom: 10px;
}
.paper-card h3 {
  font-size: clamp(21px, 1.8vw, 26px);
  font-weight: 540;
  line-height: 1.16;
  letter-spacing: -0.022em;
}
.paper-card p {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
}
.paper-card .card-foot {
  margin-top: auto;
  padding-top: 16px;
  font-size: 14px;
  color: var(--grey);
}

/* ---------- Black Architectural Band: Open Data & AI Readability ---------- */
.open-infra {
  padding-block: var(--section);
  background: var(--black);
  color: #fff;
}
.open-infra h2 {
  grid-column: 1 / span 5;
}
.open-infra-body {
  grid-column: 6 / -1;
}
.open-infra-body .lede-dark {
  font-size: var(--lede);
  line-height: 1.38;
  letter-spacing: -0.012em;
  color: #fff;
}
.open-infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}
.open-infra-grid h3 {
  font-size: 19px;
  font-weight: 560;
  color: #fff;
}
.open-infra-grid p {
  margin-top: 8px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--fog);
}
.open-infra-grid code,
.inline-code {
  font-family: var(--mono);
  font-size: 0.88em;
  padding: 2px 5px;
  background: rgb(255 255 255 / 0.1);
}
body .inline-code-light {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 2px 6px;
  background: var(--tint);
  border: 1px solid var(--rule);
}
.open-infra .links {
  margin-top: 28px;
}
.open-infra .links a {
  color: #fff;
  text-decoration-color: rgb(255 255 255 / 0.55);
}
.open-infra .links a:hover {
  text-decoration-color: #fff;
}

/* ---------- Journal Hub & Interactive Filter Controls ---------- */
.controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-btn,
.action-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 0;
  font: 500 15px/1.2 "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.filter-btn:hover,
.action-btn:hover {
  border-color: var(--ink);
}
.filter-btn[aria-pressed="true"],
.filter-btn.is-active,
.action-btn.is-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.search-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.text-input,
.select-input {
  appearance: none;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 400 15.5px/1.3 "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  transition: border-color 0.15s, background-color 0.15s;
}
.calc-inputs .select-input {
  width: 100%;
}
.calc-inputs,
.calc-output,
.field-group,
.snippet-card,
.inspector-box {
  min-width: 0;
}
.select-input {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.text-input {
  min-width: 240px;
}
.text-input::placeholder {
  color: var(--grey);
}
.results-status {
  font-size: 14.5px;
  color: var(--grey);
  padding: 8px 0;
}

.journal-list {
  border-bottom: 1px solid var(--ink);
}
.journal-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 12px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--rule);
}
.journal-row:first-child {
  border-top: 0;
}
.journal-row[hidden],
.data tbody tr[hidden] {
  display: none !important;
}
.journal-row-meta {
  grid-column: 1 / span 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.journal-row-main {
  grid-column: 4 / span 7;
}
.journal-row-main h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 540;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.journal-row-main p {
  margin-top: 10px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--grey);
}
.journal-row-side {
  grid-column: 11 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 14px;
  color: var(--grey);
}
.journal-row-side .big-stat {
  font-size: 24px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ---------- Standalone Working Paper / Article Layout ---------- */
.breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--grey);
}
.breadcrumb a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.article-head {
  padding-block: clamp(40px, 4.8vw, 84px) clamp(32px, 3.6vw, 56px);
  row-gap: 20px;
}
.article-head h1 {
  grid-column: 1 / span 11;
  font-size: clamp(34px, 4.2vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.035em;
}
.article-subtitle {
  grid-column: 1 / span 9;
  font-size: clamp(19px, 1.4vw, 24px);
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--grey);
}
.article-byline {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--ink);
  font-size: 15px;
  color: var(--grey);
}
.article-byline strong {
  color: var(--ink);
  font-weight: 560;
}
.article-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.article-formats a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 520;
  color: var(--ink);
}

.key-figs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 20px;
  padding-block: 28px 32px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(40px, 4.4vw, 68px);
}
.key-fig-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.key-fig-val {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 480;
  line-height: 1;
  letter-spacing: -0.035em;
}
.key-fig-desc {
  font-size: 15px;
  line-height: 1.45;
  color: var(--grey);
}

.article-layout {
  row-gap: 48px;
  align-items: start;
}
.article-rail {
  grid-column: 1 / span 3;
  position: sticky;
  top: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 6px;
}
.rail-block {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--grey);
}
.rail-block:first-child {
  border-top-color: var(--ink);
}
.rail-block h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.rail-toc li + li {
  margin-top: 8px;
}
.rail-toc a {
  display: inline-block;
  padding-block: 4px;
  text-decoration: none;
}
.rail-toc a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.article-main {
  grid-column: 4 / span 8;
}
.dirs li .dir-name {
  display: block;
  font-weight: 520;
  color: var(--ink);
}
.dirs li .dir-role {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--grey);
  margin-top: 2px;
}
.dirs li .dir-mail {
  display: inline-block;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--grey);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.article-section + .article-section {
  margin-top: clamp(36px, 3.8vw, 56px);
}
.article-section h2 {
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.14;
  letter-spacing: -0.024em;
  margin-bottom: 18px;
}
.article-section p {
  font-size: 18.5px;
  line-height: 1.62;
  max-width: 41em;
}
.article-section p + p {
  margin-top: 1.15em;
}

.article-table-wrap {
  margin-block: clamp(36px, 4vw, 56px);
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-block: 16px 8px;
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}
.article-table caption {
  text-align: left;
  font-size: 15px;
  font-weight: 560;
  color: var(--ink);
  margin-bottom: 14px;
}
.article-table th {
  padding: 8px 16px 10px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 13.5px;
  font-weight: 560;
  color: var(--grey);
  text-align: left;
  vertical-align: bottom;
}
.article-table td {
  padding: 13px 16px 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.45;
  vertical-align: top;
}
.article-table tr:last-child td {
  border-bottom: 0;
}
.article-table td:first-child {
  font-weight: 540;
}

.cite-panel {
  margin-top: clamp(48px, 5vw, 72px);
  padding: 24px;
  background: var(--tint);
  border-top: 2px solid var(--ink);
}
.cite-panel h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
.cite-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  max-width: 60ch;
}
.cite-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Data & API Page: Calculator & Live Endpoint Inspector ---------- */
.calc-section {
  padding: clamp(28px, 3vw, 44px);
  background: var(--tint);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: clamp(40px, 4.2vw, 64px);
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.calc-inputs {
  grid-column: 1 / span 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px var(--gap);
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-group.full-span {
  grid-column: 1 / -1;
}
.field-group label {
  font-size: 14px;
  font-weight: 560;
  color: var(--ink);
}
.calc-output {
  grid-column: 8 / -1;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--ink);
}
.calc-output .kicker {
  margin-bottom: 8px;
}
.calc-num {
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.036em;
}
.calc-usd {
  margin-top: 6px;
  font-size: 16px;
  color: var(--grey);
}
.calc-statute {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  line-height: 1.5;
  color: var(--grey);
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}
.api-table th,
.api-table td {
  padding: 16px var(--gap) 18px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: baseline;
}
.api-table thead th {
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 550;
  color: var(--grey);
}
.api-path {
  font-family: var(--mono);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}

.inspector-box {
  margin-top: 36px;
  border: 1px solid var(--ink);
  background: var(--black);
  color: #fff;
}
.inspector-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-dark);
}
.inspector-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ep-btn {
  appearance: none;
  min-height: 44px;
  padding: 6px 12px;
  background: transparent;
  color: var(--fog);
  border: 1px solid var(--line-dark);
  border-radius: 0;
  font: 500 13.5px/1.2 var(--mono);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.ep-btn:hover {
  color: #fff;
  border-color: #fff;
}
.ep-btn.is-active {
  background: #fff;
  color: var(--black);
  border-color: #fff;
}
.inspector-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fog);
}
.code-pre {
  margin: 0;
  padding: 20px;
  max-height: 400px;
  overflow: auto;
  font: 400 13.5px/1.55 var(--mono);
  color: #e8e8e6;
  white-space: pre;
}

.snippet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 32px;
}
.snippet-card {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}
.snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.snippet-card pre {
  margin: 0;
  padding: 16px;
  background: var(--tint);
  border: 1px solid var(--rule);
  overflow-x: auto;
  font: 400 13px/1.55 var(--mono);
}

/* Curriculum & Protocol lists on What We Do */
.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px var(--gap);
  margin-top: 32px;
}
.syllabus-item {
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.syllabus-item .kicker {
  display: block;
  margin-bottom: 6px;
}
.syllabus-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.syllabus-item p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--grey);
}

/* Category badge in tracker */
.cat-tag {
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 560;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grey);
}

/* Clean semantic spacing & layout helpers (strict CSP style-src 'self') */
.mt-1 { margin-top: 1em; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.board-ruled { border-top: 1px solid var(--line-dark); }
.sec-compact-top { padding-top: calc(var(--section) * 0.55); }
.article-body-wrap { padding-top: clamp(32px, 3.6vw, 56px); }
.article-notes-sec { padding-top: clamp(44px, 4.5vw, 68px); }
.h2-sub { font-size: clamp(22px, 2vw, 28px); margin-bottom: 20px; }
.h2-med { font-size: clamp(24px, 2.4vw, 34px); margin-bottom: 24px; }
.calc-section .h2-med { margin-bottom: 0; }
.calc-desc { margin-top: 8px; color: var(--grey); max-width: 52em; }
.calc-inputs .text-input { min-width: 0; width: 100%; }
.calc-statute-tight { margin-top: 10px; padding-top: 10px; }
.notes-single { columns: 1; }
.syllabus-wrap { grid-column: 1 / -1; margin-top: 40px; }
.syllabus-heading { font-size: 22px; }

/* ---------- Responsive Refinements ---------- */
@media (max-width: 1023px) {
  .metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sec-head h2,
  .sec-head .sec-sub,
  .paper-lead-meta,
  .paper-lead-body,
  .open-infra h2,
  .open-infra-body,
  .article-rail,
  .article-main,
  .calc-inputs,
  .calc-output {
    grid-column: 1 / -1;
  }
  .article-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .rail-block {
    flex: 1 1 220px;
  }
  .paper-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .journal-row-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
  .journal-row-main {
    grid-column: 1 / span 9;
  }
  .journal-row-side {
    grid-column: 10 / -1;
  }
  .snippet-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 879px) {
  .paper-grid,
  .key-figs,
  .open-infra-grid,
  .syllabus-grid,
  .calc-inputs {
    grid-template-columns: 1fr;
  }
  .journal-row-main,
  .journal-row-side {
    grid-column: 1 / -1;
  }
  .text-input {
    width: 100%;
    min-width: 0;
  }
  .search-box {
    width: 100%;
  }
  .api-table,
  .api-table tbody,
  .api-table tr,
  .api-table td,
  .api-table th {
    display: block;
    width: auto;
  }
  .api-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .api-table tbody tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
  }
  .api-table tbody td {
    padding: 4px 0;
    border: 0;
  }
  .api-path {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 599px) {
  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media print {
  .site-header,
  .site-footer,
  .controls-bar,
  .cite-actions,
  .article-rail,
  .skip {
    display: none !important;
  }
  body {
    font-size: 11pt;
    color: #000;
  }
  .article-main,
  .article-head h1,
  .article-subtitle {
    grid-column: 1 / -1 !important;
    max-width: none !important;
  }
}
