/* Dr Karen H Simpson Expert Reports Ltd
   Layout: a calm, document-like site. Fixed-width reading column, name and menu
   at the top, one boxed "How to instruct" panel as the only card on the home page. */

@font-face { font-family: "Spectral"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/spectral-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/spectral-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --paper: #f8f7fa;      /* page ground, faint plum bias */
  --surface: #ffffff;    /* panels */
  --ink: #221d29;        /* body text */
  --muted: #5d5568;      /* secondary text */
  --plum: #4a2f63;       /* brand colour, carried over from the old site */
  --plum-soft: #ece6f2;  /* tinted fills */
  --brass: #8a6a2c;      /* small accents only */
  --rule: #dcd6e3;
  --focus: #8a6a2c;
  --serif: "Spectral", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --measure: 66ch;
  --wrap: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17141b; --surface: #211d27; --ink: #ece8f1; --muted: #b3aabe;
    --plum: #c9b2e2; --plum-soft: #2c2536; --brass: #d4b06a; --rule: #3a3343; --focus: #d4b06a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #17141b; --surface: #211d27; --ink: #ece8f1; --muted: #b3aabe;
  --plum: #c9b2e2; --plum-soft: #2c2536; --brass: #d4b06a; --rule: #3a3343; --focus: #d4b06a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--plum); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; }
.skip:focus { left: 1rem; z-index: 20; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 2rem; padding-block: 1.1rem; }
.brand { flex: 1 1 12rem; min-width: 0; text-decoration: none; color: var(--ink); display: grid; gap: .1rem; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; line-height: 1.15; color: var(--plum); }
.brand-sub { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.menu-toggle { display: none; font: inherit; font-weight: 600; font-size: .95rem; background: none; color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; padding: .45rem .8rem; cursor: pointer; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; padding-block: .35rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { color: var(--plum); border-bottom-color: var(--brass); }

@media (max-width: 760px) {
  .menu-toggle { display: inline-block; }
  .nav { flex-basis: 100%; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); }
  .nav li { border-bottom: 1px solid var(--rule); }
  .nav a { display: block; padding-block: .75rem; border-bottom: 0; }
  .nav a[aria-current="page"] { border-bottom: 0; box-shadow: inset 3px 0 0 var(--brass); padding-left: .75rem; }
}
.no-js .nav { display: block; }
.no-js .menu-toggle { display: none; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; text-wrap: balance; color: var(--ink); margin: 0; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); color: var(--plum); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: var(--measure); }
.prose { display: grid; gap: 1rem; max-width: var(--measure); }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

main { display: block; }
.section { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: grid; gap: .5rem; margin-bottom: 1.5rem; }

/* Page title band (inner pages) */
.page-title { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) 0; display: grid; gap: .6rem; }

/* Home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.hero-intro { display: grid; gap: 1.1rem; min-width: 0; }
.hero-person { display: flex; gap: 1.25rem; align-items: center; }
.portrait { width: 7.5rem; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; border: 1px solid var(--rule); flex: none; }
.postnominals { font-size: .95rem; color: var(--muted); letter-spacing: .02em; }
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-intro { display: contents; }
  .hero-person { order: 1; }
  .instruct { order: 2; }
  .hero-intro > :not(.hero-person) { order: 3; }
}
@media (max-width: 420px) { .hero-person { flex-direction: column; align-items: flex-start; } }

/* The one boxed panel */
.instruct { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--plum); border-radius: 4px; padding: 1.5rem; display: grid; gap: 1rem; min-width: 0; }
.instruct h2 { font-size: 1.35rem; }
.instruct ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.instruct li { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr); gap: .5rem; line-height: 1.5; }
.instruct li::before { content: ""; width: .5rem; height: .5rem; margin-top: .55rem; background: var(--brass); border-radius: 50%; }
.instruct .no::before { background: transparent; border: 2px solid var(--muted); width: .55rem; height: .55rem; }

/* Facts list */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.facts div { display: grid; gap: .2rem; border-left: 2px solid var(--rule); padding-left: 1rem; }
.facts dt { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--plum); }
.facts dd { margin: 0; color: var(--muted); font-size: .95rem; }

/* Two-column text sections */
.split { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1rem 3rem; }
.split > * { min-width: 0; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Expertise groups */
.groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem; }
.groups section { display: grid; gap: .6rem; align-content: start; }
.groups ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; color: var(--ink); }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.25rem; max-width: var(--measure); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .9rem; }
.steps li::before { content: counter(step); font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--plum); width: 2.25rem; height: 2.25rem; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; background: var(--surface); }
.steps h3 { margin-bottom: .2rem; }

/* Report types table */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: .98rem; }
th, td { text-align: left; vertical-align: top; padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--rule); }
th { font-family: var(--serif); font-weight: 600; color: var(--plum); font-size: 1.02rem; }
thead th { font-family: var(--sans); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Documents */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; max-width: var(--measure); }
.docs a { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.docs a:hover { border-color: var(--plum); }
.docs span { font-weight: 400; font-size: .85rem; color: var(--muted); white-space: nowrap; }

/* Timeline of roles */
.roles { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; max-width: var(--measure); }
.roles li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; font-variant-numeric: tabular-nums; }
.roles .yr { color: var(--muted); font-size: .95rem; }
@media (max-width: 420px) { .roles li { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Books */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 1.75rem; }
.book { display: grid; gap: .6rem; align-content: start; margin: 0; }
.book img { width: 100%; aspect-ratio: 3 / 5; object-fit: cover; object-position: top; border: 1px solid var(--rule); background: var(--surface); }
.book figcaption { font-size: .9rem; line-height: 1.45; }
.book strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 1rem; }

/* Contact blocks */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem; }
.contact { display: grid; gap: .6rem; align-content: start; }
.contact dl { margin: 0; display: grid; gap: .35rem; }
.contact dl div { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .75rem; align-items: baseline; }
.contact dt { color: var(--muted); font-size: .9rem; }
.contact dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.copy { font: inherit; font-size: .78rem; font-weight: 600; margin-left: .4rem; padding: .1rem .5rem; color: var(--plum); background: var(--plum-soft); border: 1px solid transparent; border-radius: 3px; cursor: pointer; vertical-align: 1px; }
.copy:hover { border-color: var(--plum); }
address { font-style: normal; }

/* Footer */
.site-footer { margin-top: 2rem; background: var(--surface); border-top: 1px solid var(--rule); font-size: .9rem; color: var(--muted); }
.site-footer .wrap { padding-block: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2.5rem; }
.site-footer h2 { font-family: var(--sans); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: .5rem; }
.site-footer p { line-height: 1.6; }
.site-footer a { color: var(--ink); }
.footer-base { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 1rem; }

@media (prefers-reduced-motion: no-preference) {
  .nav a, .docs a, .copy { transition: border-color .15s ease, color .15s ease; }
}

/* Selected publications */
.prose ul.pubs { list-style: none; padding: 0; gap: .75rem; }
.pubs li { padding-left: 1rem; border-left: 2px solid var(--rule); line-height: 1.55; }
