/* Shared styles for all pages: colours, type, nav, footer, page headings. */
:root {
  --navy: #1a2744;
  --accent: #8a581e;
  --accent-soft: #f6ecdc;
  --text: #1e1e1e;
  --muted: #5a5a5a;
  --rule: #e4e1dc;
  --bg: #faf9f7;
  --link: #1a4fb5;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; font-size: 16.5px; line-height: 1.65; color: var(--text); background: var(--bg); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* nav */
header { background: var(--navy); position: sticky; top: 0; z-index: 10; }
nav { max-width: 1040px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; height: 52px; gap: 6px; }
.brand { font-family: 'EB Garamond', serif; font-size: 18px; color: #fff; margin-right: auto; white-space: nowrap; }
.brand:hover { text-decoration: none; }
nav ul { list-style: none; display: flex; gap: 2px; }
nav ul a { color: rgba(255,255,255,.8); font-size: 15px; font-weight: 500; padding: 5px 11px; border-radius: 4px; white-space: nowrap; }
nav ul a:hover { color: #fff; background: rgba(255,255,255,.1); text-decoration: none; }
nav ul a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 880px; }

/* inner-page headings */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-family: 'EB Garamond', serif; font-size: 34px; font-weight: 600; color: var(--navy); line-height: 1.15; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 720px; }
h2 { font-family: 'EB Garamond', serif; font-size: 25px; font-weight: 600; color: var(--navy); margin-bottom: 12px; line-height: 1.25; }
h3.sub { font-size: 13px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--muted); margin: 22px 0 6px; }
section { padding: 28px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: none; }

/* generic row list: text left, short label right */
.rows { list-style: none; }
.rows li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 8px 0; border-bottom: 1px solid #efede9; align-items: baseline; }
.rows li:last-child { border-bottom: none; }
.rows .right { font-size: 14px; color: var(--muted); white-space: nowrap; }
.rows .note { display: block; font-size: 14.5px; color: var(--muted); }

footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; padding: 22px 0 40px; margin-top: 20px; }

@media (max-width: 760px) {
  nav { padding: 0 12px; }
  .brand { display: none; }
  nav ul { width: 100%; justify-content: space-between; }
  nav ul a { padding: 5px 6px; font-size: 14px; }
  .page-head { padding-top: 28px; }
  .rows li { grid-template-columns: 1fr; gap: 2px; }
}

/* Readable navigation, keyboard access, and anchor destinations. */
[id] { scroll-margin-top: 76px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 100; background: #fff; padding: 8px 14px; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.intro-impact { margin-top: 12px; }
.research-history { margin-top: 6px; }
.research-history summary { color: var(--link); cursor: pointer; padding: 8px 0; font-size: 15px; }
.research-history .lineage { margin-top: 10px; }
.topic-links { height: auto; padding: 0; margin: 14px 0 0; justify-content: flex-start; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; }
@media (max-width: 480px) {
  header nav { height: auto; min-height: 52px; padding: 8px 12px; }
  header nav ul { flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
  header nav ul a { display: inline-block; padding: 5px 7px; }
  .wrap { padding: 0 18px; }
  .intro .meta a { display: inline-block; margin-bottom: 4px; }
  [id] { scroll-margin-top: 112px; }
}
