/* ============================================================================
   The Pakistani Nuclear Story.
   Dark serif document with a sticky sidebar at desktop widths.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,500;0,8..60,600;0,8..60,700;1,8..60,400;1,8..60,500&display=swap');

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

:root {
  --bg:         #0f0f11;
  --bg-sb:      #0b0b0d;
  --text:       #d2ccbd;
  --bright:     #f4eddd;
  --mute:       #8a8374;
  --faint:      #57534a;
  --line:       #2a271f;
  --line-soft:  #1f1d17;

  --serif:      "Source Serif 4", Georgia, "Times New Roman", Times, serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --read:       700px;
  --sb-w:       280px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.68;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

::selection { background: var(--bright); color: var(--bg); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1f1d18; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2b2822; }
::-webkit-scrollbar-track { background: var(--bg); }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s ease, color .15s ease;
}
a:hover { text-decoration-color: var(--bright); color: var(--bright); }

p { margin-bottom: 1.05em; }
p:last-child { margin-bottom: 0; }

strong { color: var(--bright); font-weight: 500; }
em { font-style: italic; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--bright);
  font-weight: 500;
  letter-spacing: -0.008em;
  line-height: 1.2;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
}

/* ============================================================================
   Mobile top bar. Title plus hamburger. Only shown below 1080px.
   ============================================================================ */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 18;
  background: rgba(15, 15, 17, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}
.topbar-title {
  font-family: var(--serif);
  color: var(--bright);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.005em;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 16px;
}
.topbar-title:hover { color: var(--bright); }
.nav-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  transition: background .15s ease, border-color .15s ease;
}
.nav-toggle:hover { background: rgba(255,255,255,0.04); border-color: var(--mute); }
.nav-toggle svg { width: 20px; height: 20px; display: block; }

/* ============================================================================
   Backdrop behind the mobile drawer.
   ============================================================================ */
.sb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  z-index: 19;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.sb-backdrop.open { opacity: 1; pointer-events: auto; }

.sb-close {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--mute);
  background: transparent;
  transition: color .15s ease, border-color .15s ease;
  z-index: 2;
}
.sb-close:hover { color: var(--bright); border-color: var(--mute); }
.sb-close svg { width: 16px; height: 16px; display: block; }

/* ============================================================================
   Sidebar. Fixed left on desktop. Drawer on mobile.
   ============================================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sb-w);
  padding: 44px 32px 32px;
  background: var(--bg-sb);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 20;
}
.sb-head { margin-bottom: 28px; }
.sb-title {
  display: block;
  font-family: var(--serif);
  color: var(--bright);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-decoration: none;
  margin-bottom: 6px;
}
.sb-title:hover { color: var(--bright); }
.sb-subtitle {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--mute);
  line-height: 1.5;
}

.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex: 1;
}
.sb-nav .sb-group-label {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 0 6px;
}
.sb-nav .sb-group-label:first-child { padding-top: 0; }
.sb-nav a {
  display: block;
  padding: 7px 0;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--mute);
  text-decoration: none;
  line-height: 1.35;
  transition: color .14s ease, padding-left .14s ease;
}
.sb-nav a:hover { color: var(--bright); }
.sb-nav a.is-active {
  color: var(--bright);
  padding-left: 14px;
  position: relative;
}
.sb-nav a.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bright);
}

.sb-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 14px;
  color: var(--faint);
  line-height: 1.55;
}
.sb-foot a {
  color: var(--mute);
  text-decoration: underline;
  text-decoration-color: var(--line);
}
.sb-foot a:hover { color: var(--bright); text-decoration-color: var(--bright); }

/* ============================================================================
   Document frame. The reading column.
   Mobile first. Explicit padding values at every breakpoint.
   ============================================================================ */
.doc {
  max-width: var(--read);
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

@media (min-width: 1080px) {
  body { padding-left: var(--sb-w); }
  .doc {
    padding-left: 48px;
    padding-right: 48px;
    max-width: calc(var(--read) + 96px);
  }
  .topbar, .nav-toggle, .sb-close, .sb-backdrop { display: none !important; }
}

/* Below 1080, the sidebar becomes a drawer. */
@media (max-width: 1079px) {
  .topbar { display: flex; }
  .sb-backdrop { display: block; }
  .sb-close { display: flex; }
  .sidebar {
    width: min(320px, 86vw);
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4, 0, .2, 1);
    padding: 56px 28px 28px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.4);
  }
  .sidebar.open { transform: translateX(0); }
  body.sb-open { overflow: hidden; }
}

/* ============================================================================
   Page top (mobile nav)
   ============================================================================ */
.page-top { padding: 44px 0 0; }
.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  color: var(--bright);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.page-title a { text-decoration: none; color: var(--bright); }
.page-subtitle {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--mute);
  margin-bottom: 26px;
}
.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.page-nav a {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--mute);
  text-decoration: none;
  padding: 2px 0;
  transition: color .15s ease;
}
.page-nav a:hover,
.page-nav a.is-active { color: var(--bright); text-decoration: underline; text-decoration-color: var(--faint); }

/* ============================================================================
   Hero
   ============================================================================ */
.hero { padding: 72px 0 32px; }
.hero h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--bright);
  margin-bottom: 26px;
}
.hero .lede {
  font-size: 21px;
  line-height: 1.62;
  color: var(--text);
  margin-bottom: 36px;
}

.hero-figure {
  margin: 40px 0 48px;
  max-width: 100%;
  width: fit-content;
}
.hero-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 480px;
  width: auto;
}
/* Desktop and wide tablets: fill the column, keep natural aspect, no cropping.
   The figure stretches to 100% of the reading column so the image and the
   caption share the same width. */
@media (min-width: 720px) {
  .hero-figure,
  .section-figure,
  .closing-figure {
    width: 100%;
  }
  .hero-figure img,
  .section-figure img,
  .closing-figure img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: initial;
  }
}
.hero-figure figcaption {
  font-size: 14px;
  color: var(--mute);
  margin-top: 10px;
  line-height: 1.55;
  max-width: 100%;
}

.closing-figure {
  margin: 56px 0 0;
  max-width: 100%;
  width: fit-content;
}
.closing-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  width: auto;
}
.closing-figure figcaption {
  font-size: 14px;
  color: var(--mute);
  margin-top: 10px;
  line-height: 1.55;
}

.section-figure {
  margin: 20px 0 36px;
  max-width: 100%;
  width: fit-content;
}
.section-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 360px;
  width: auto;
}
.section-figure figcaption {
  font-size: 14px;
  color: var(--mute);
  margin-top: 10px;
  line-height: 1.55;
}

.pull {
  margin: 56px 0 8px;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--line);
  max-width: 100%;
}
.pull blockquote {
  font-size: 23px;
  line-height: 1.44;
  color: var(--bright);
  font-weight: 400;
  margin-bottom: 14px;
}
.pull cite {
  font-style: normal;
  color: var(--mute);
  font-size: 16px;
}

/* ============================================================================
   Sections
   ============================================================================ */
.section { padding: 48px 0 20px; }
.section h2 {
  font-size: 38px;
  color: var(--bright);
  margin-bottom: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.14;
}
.section .standfirst {
  font-size: 19px;
  color: var(--text);
  margin-bottom: 40px;
  line-height: 1.62;
}
.section .standfirst:last-child { margin-bottom: 0; }

/* ============================================================================
   Story, era picker, events
   ============================================================================ */
.era-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-bottom: 36px;
  font-size: 17px;
}
.era-nav button {
  font-family: var(--serif);
  color: var(--mute);
  padding: 4px 0;
  font-size: 17px;
  transition: color .15s ease;
}
.era-nav button:hover { color: var(--text); }
.era-nav button.is-active {
  color: var(--bright);
  text-decoration: underline;
  text-decoration-color: var(--bright);
  text-underline-offset: 5px;
}

.story-count {
  font-size: 15px;
  color: var(--faint);
  margin-bottom: 24px;
}

.story { display: block; }
.story.is-loading { opacity: 0.4; transition: opacity .2s ease; }

.event { margin-bottom: 44px; }
.event .year {
  font-size: 15px;
  color: var(--mute);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.event h3 {
  font-size: 27px;
  color: var(--bright);
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.22;
}
.event p {
  color: var(--text);
  font-size: 19px;
  line-height: 1.68;
  margin-bottom: 0;
}
.event .event-image {
  margin: 16px auto 18px;
  max-width: 100%;
  width: fit-content;
}
.event .event-image.contain { width: 100%; }
.event .event-image img {
  display: block;
  max-width: 100%;
  width: auto;
  max-height: 520px;
  height: auto;
}
.event .event-image.contain {
  background: #f3ecdc;
  padding: 32px;
  text-align: center;
  width: 100%;
}
.event .event-image.contain img {
  max-height: 280px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}
.event .event-image figcaption {
  font-size: 14px;
  color: var(--mute);
  margin-top: 8px;
  line-height: 1.5;
}
.event .people {
  margin-top: 14px;
  font-size: 16px;
  color: var(--mute);
}
.event .people a {
  text-decoration-color: var(--faint);
  color: var(--text);
  font-style: normal;
}
.event .people a:hover { color: var(--bright); text-decoration-color: var(--bright); }

.era-arrows {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.era-arrows button {
  font-family: var(--serif);
  color: var(--mute);
  font-size: 17px;
  text-align: left;
}
.era-arrows button:last-child { text-align: right; }
.era-arrows button:hover:not(:disabled) { color: var(--bright); }
.era-arrows button:disabled { opacity: 0; pointer-events: none; }
.era-arrows .arrow { color: var(--faint); margin: 0 6px; }
.era-arrows .era-label { color: inherit; }
.era-arrows .era-hint { display: block; font-size: 13px; color: var(--faint); margin-bottom: 2px; }

/* ============================================================================
   Scientists and Mentors as reading entries.
   ============================================================================ */
.people-list, #mentors-list, #sites-list, #operations-list { display: block; }
.person, .mentor, .site, .op, .net {
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 40px;
}
.person:first-child, .mentor:first-child, .site:first-child, .op:first-child, .net:first-child { padding-top: 20px; }
.person:last-child, .mentor:last-child, .site:last-child, .op:last-child, .net:last-child { border-bottom: 0; }

.person { display: flow-root; }
.person-title { margin-bottom: 16px; }
.person-portrait {
  float: left;
  width: 132px;
  margin: 6px 24px 12px 0;
}
.person-portrait img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  display: block;
}
.person-portrait.no-portrait { display: none; }
.person-title h3 {
  font-size: 30px;
  color: var(--bright);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
  line-height: 1.2;
}
.person-title .meta {
  color: var(--mute);
  font-size: 16px;
  margin-bottom: 6px;
}
.person-title .role {
  color: var(--text);
  font-size: 17px;
}
.person-bio-p {
  color: var(--text);
  font-size: 19px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.person-refs {
  margin-top: 14px;
  font-size: 16px;
  color: var(--mute);
}
.person-refs a {
  color: var(--text);
  font-style: normal;
  text-decoration-color: var(--faint);
}
.person-refs a:hover { color: var(--bright); text-decoration-color: var(--bright); }

/* Mentors. Portrait and title pinned beside each other. Paragraphs flow beneath. */
.mentor { padding: 32px 0; }
.mentor-head {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.mentor-portrait { flex: 0 0 112px; width: 112px; }
.mentor-portrait img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  display: block;
}
.mentor-portrait.no-portrait { display: none; }
.mentor-title { flex: 1; min-width: 0; padding-top: 4px; }
.mentor h3 {
  font-size: 25px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 5px;
  letter-spacing: -0.013em;
}
.mentor .meta {
  font-size: 16px;
  color: var(--mute);
  margin-bottom: 16px;
}
.mentor p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 12px;
}
.mentor p:last-child { margin-bottom: 0; }
.mentor .students {
  font-size: 16px;
  color: var(--mute);
  margin-top: 10px;
}
.mentor .students a {
  color: var(--text);
  font-style: normal;
  text-decoration-color: var(--faint);
}
.mentor .students a:hover { color: var(--bright); text-decoration-color: var(--bright); }

/* Sites */
.site { padding: 28px 0; }
.site h3 {
  font-size: 25px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.012em;
}
.site .meta {
  font-size: 16px;
  color: var(--mute);
  margin-bottom: 16px;
}
.site p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
}

/* Operations, network */
.op, .net { padding: 28px 0; }
.op .era-label, .net .country {
  font-size: 15px;
  color: var(--mute);
  margin-bottom: 10px;
}
.op .era-label.is-hidden { display: none; }
.op h3, .net h4 {
  font-size: 25px;
  color: var(--bright);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.013em;
  line-height: 1.22;
}
.net h4 { font-size: 23px; }
.op p, .net p {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
}

.network-sub {
  font-size: 13px;
  color: var(--mute);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 48px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.network-sub:first-of-type { margin-top: 32px; }

/* ============================================================================
   Doctrine
   ============================================================================ */
.doctrine h3 {
  font-size: 13px;
  color: var(--mute);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.doctrine h3:first-child { margin-top: 0; }
.doctrine p {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 16px;
}

.redline {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.redline:last-child { border-bottom: 0; }
.redline h4 {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--bright);
  font-weight: 500;
  margin-bottom: 4px;
}
.redline h4 .num {
  color: var(--mute);
  font-weight: 400;
  margin-right: 8px;
}
.redline p { font-size: 18px; color: var(--text); line-height: 1.6; }

/* ============================================================================
   Sources
   ============================================================================ */
.sources { list-style: none; padding: 0; }
.sources li {
  font-size: 17.5px;
  color: var(--text);
  line-height: 1.55;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.sources li:last-child { border-bottom: 0; }
.sources em { color: var(--bright); font-style: italic; }

/* ============================================================================
   Footer
   ============================================================================ */
.page-bottom {
  padding: 72px 0 80px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
}
.page-bottom p {
  color: var(--mute);
  font-size: 16px;
  line-height: 1.65;
}
.page-bottom .first { color: var(--text); font-style: normal; margin-bottom: 14px; }
.page-bottom .sig {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.page-bottom .sig a {
  color: var(--bright);
  text-decoration: underline;
  text-decoration-color: var(--faint);
}
.page-bottom .sig a:hover { text-decoration-color: var(--bright); }

/* ============================================================================
   Responsive. Tablet.
   ============================================================================ */
@media (max-width: 1079px) {
  body { font-size: 19px; padding-left: 0; }
  .doc { max-width: var(--read); padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 820px) {
  body { font-size: 18.5px; }
  .doc { padding-left: 28px; padding-right: 28px; }
}

/* ============================================================================
   Phone. Comfortable reading padding, no touching the edges.
   ============================================================================ */
@media (max-width: 640px) {
  body { font-size: 17.5px; line-height: 1.65; }
  .doc { padding-left: 24px; padding-right: 24px; }

  .page-top { padding: 28px 0 0; }
  .page-title { font-size: 17px; margin-bottom: 6px; }
  .page-subtitle { font-size: 15px; margin-bottom: 22px; }
  .page-nav { gap: 4px 18px; padding-bottom: 20px; }
  .page-nav a { font-size: 16px; padding: 4px 0; }

  .hero { padding: 40px 0 20px; }
  .hero h1 { font-size: 34px; line-height: 1.13; letter-spacing: -0.018em; margin-bottom: 22px; }
  .hero .lede { font-size: 18px; line-height: 1.6; margin-bottom: 28px; }
  .pull { margin-top: 36px; padding-left: 18px; }
  .pull blockquote { font-size: 20px; line-height: 1.42; }
  .pull cite { font-size: 15.5px; }
  .hero-figure { margin: 28px 0 32px; }
  .hero-figure img { max-height: 300px; }
  .hero-figure figcaption { font-size: 15px; line-height: 1.55; }
  .closing-figure { margin-top: 40px; }
  .closing-figure img { max-height: 300px; }
  .closing-figure figcaption { font-size: 15px; line-height: 1.55; }
  .section-figure img { max-height: 260px; }
  .section-figure figcaption { font-size: 15px; line-height: 1.55; }

  .section { padding: 32px 0 8px; }
  .section h2 { font-size: 30px; margin-bottom: 14px; letter-spacing: -0.02em; }
  .section .standfirst { font-size: 17px; margin-bottom: 32px; line-height: 1.58; }

  .era-nav { gap: 4px 16px; margin-bottom: 26px; font-size: 16px; }
  .era-nav button { font-size: 16px; padding: 6px 0; }
  .story-count { font-size: 14px; margin-bottom: 20px; }

  .event { margin-bottom: 36px; }
  .event .year { font-size: 15px; margin-bottom: 5px; }
  .event h3 { font-size: 23px; line-height: 1.23; margin-bottom: 10px; letter-spacing: -0.014em; }
  .event p { font-size: 17.5px; line-height: 1.64; }
  .event .event-image { margin: 14px auto 16px; }
  .event .event-image img { max-height: 380px; }
  .event .event-image.contain { padding: 22px; }
  .event .event-image.contain img { max-height: 220px; }
  .event .event-image figcaption { font-size: 14.5px; line-height: 1.55; }
  .event .people { font-size: 15.5px; margin-top: 12px; line-height: 1.55; }

  .era-arrows {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    padding-top: 24px;
    margin-top: 28px;
  }
  .era-arrows button {
    text-align: left;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .era-arrows button:first-child { border-bottom: 0; }
  .era-arrows button:last-child { text-align: left; border-top: 0; }
  .era-arrows button:disabled { display: none; }
  .era-arrows .arrow { display: inline-block; margin: 0 8px 0 0; }
  .era-arrows .era-hint { display: inline; font-size: 13px; margin-right: 6px; }
  .era-arrows .era-label { font-size: 16px; }

  .person { padding: 28px 0; }
  .person-title { margin-bottom: 14px; }
  .person-portrait { width: 104px; margin: 4px 16px 8px 0; }
  .person-portrait img { width: 104px; height: 104px; }
  .person-title h3 { font-size: 23px; line-height: 1.2; margin-bottom: 5px; }
  .person-title .meta { font-size: 14.5px; margin-bottom: 4px; line-height: 1.5; color: var(--faint); }
  .person-title .role { font-size: 15.5px; line-height: 1.45; }
  .person-bio-p { font-size: 17.5px; line-height: 1.62; margin-bottom: 12px; }
  .person-refs { font-size: 15.5px; line-height: 1.55; }

  .mentor { padding: 24px 0; }
  .mentor-head { gap: 16px; margin-bottom: 14px; }
  .mentor-portrait { flex: 0 0 96px; width: 96px; }
  .mentor-portrait img { width: 96px; height: 96px; }
  .mentor-title { padding-top: 2px; }
  .mentor h3 { font-size: 22px; line-height: 1.22; letter-spacing: -0.013em; }
  .mentor .meta { font-size: 15.5px; margin-bottom: 12px; line-height: 1.5; }
  .mentor p { font-size: 17px; line-height: 1.6; }
  .mentor .students { font-size: 15.5px; line-height: 1.55; }

  .site { padding: 22px 0; }
  .site h3 { font-size: 22px; letter-spacing: -0.013em; }
  .site .meta { font-size: 15.5px; margin-bottom: 12px; line-height: 1.5; }
  .site p { font-size: 17px; line-height: 1.6; }

  .op, .net { padding: 22px 0; }
  .op h3, .net h4 { font-size: 22px; margin-bottom: 10px; letter-spacing: -0.013em; }
  .op .era-label, .net .country { font-size: 15px; line-height: 1.5; }
  .op p, .net p { font-size: 17px; line-height: 1.62; }

  .network-sub { font-size: 16.5px; margin: 32px 0 4px; }

  .doctrine h3 { font-size: 16px; margin: 24px 0 10px; }
  .doctrine p { font-size: 17.5px; line-height: 1.64; }
  .redline { padding: 18px 0; }
  .redline h4 { font-size: 17px; }
  .redline p { font-size: 16.5px; line-height: 1.55; }

  .sources li { font-size: 16px; padding: 10px 0; line-height: 1.5; }

  .page-bottom { padding: 52px 0 60px; margin-top: 40px; }
  .page-bottom p { font-size: 15.5px; line-height: 1.6; }
  .page-bottom .sig { font-size: 15.5px; }
}

/* ============================================================================
   Narrow phone.
   ============================================================================ */
@media (max-width: 400px) {
  .doc { padding-left: 20px; padding-right: 20px; }
  .topbar { padding-left: 20px; padding-right: 20px; }
  body { font-size: 17px; }

  .hero h1 { font-size: 30px; line-height: 1.14; }
  .section h2 { font-size: 28px; }
  .event h3 { font-size: 21px; }
  .person-title h3 { font-size: 21px; }
  .mentor h3, .site h3, .op h3 { font-size: 20px; }

  .page-nav { gap: 4px 14px; }
  .page-nav a { font-size: 15px; }
  .era-nav { gap: 4px 14px; }
  .era-nav button { font-size: 15px; }

  .person-portrait { width: 92px; margin: 2px 14px 6px 0; }
  .person-portrait img { width: 92px; height: 92px; }
  .mentor-head { gap: 14px; }
  .mentor-portrait { flex: 0 0 82px; width: 82px; }
  .mentor-portrait img { width: 82px; height: 82px; }
}

/* Overflow safety on any word or link. */
body,
.doc,
.event,
.event p,
.person, .person-bio p,
.mentor p,
.site p,
.op p,
.net p,
.sources li {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
