/* Ards Historical Society — site styles */
:root {
  --lough: #1f4e5a;      /* Strangford Lough blue-green: header, links */
  --lough-deep: #163a43;
  --sandstone: #b8865a;  /* Scrabo sandstone: accents, rules */
  --paper: #fbfaf7;
  --ink: #1e2328;
  --muted: #55606a;
  --mist: #e7eceb;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --lough: #8cc3cf;
    --lough-deep: #0f2a31;
    --sandstone: #d9a77a;
    --paper: #161b1e;
    --ink: #e9ecee;
    --muted: #a8b2ba;
    --mist: #222a2e;
    color-scheme: dark;
  }
}

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

html { font-size: 112.5%; } /* 18px base: easier reading */

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: "Crimson Pro", Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; }

a { color: var(--lough); text-underline-offset: .18em; }
a:hover { color: var(--sandstone); }
:focus-visible { outline: 3px solid var(--sandstone); outline-offset: 3px; }

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

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--paper); padding: .5rem 1rem;
}
.skip:focus { left: 1rem; }

/* Header */
.site-header { background: var(--lough-deep); color: #f3efe8; }
.brand {
  max-width: 64rem; margin: 0 auto; padding: 1.25rem 1.25rem .75rem;
  display: flex; align-items: flex-end; gap: 1rem;
  color: inherit; text-decoration: none;
}
.brand:hover { color: inherit; }
.brand svg { width: 5.5rem; height: auto; color: #d9a77a; flex-shrink: 0; }
.brand-name {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 2rem; line-height: 1.1; font-weight: 600;
}
.brand-tag { display: block; font-size: .9rem; opacity: .8; font-family: system-ui, sans-serif; font-weight: 400; }

nav { border-top: 1px solid rgba(255,255,255,.15); }
nav ul {
  list-style: none; margin: 0 auto; padding: 0 .75rem;
  max-width: 64rem; display: flex; flex-wrap: wrap;
}
nav a {
  display: block; padding: .7rem .6rem; color: #f3efe8;
  text-decoration: none; font-size: .95rem;
  border-bottom: 3px solid transparent;
}
nav a:hover { color: #fff; border-bottom-color: rgba(217,167,122,.6); }
nav a[aria-current="page"] { border-bottom-color: #d9a77a; color: #fff; }

/* Main */
main { max-width: 64rem; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.prose { max-width: 40rem; }
.lead { font-size: 1.2rem; color: var(--muted); }

.poster { margin: 1.5rem 0; max-width: 44rem; }
.poster img { border: 1px solid var(--mist); }
.poster figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 52rem) { .split { grid-template-columns: 3fr 2fr; align-items: start; } }

.panel {
  background: var(--mist); padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--sandstone);
}
.panel h2 { margin-top: 0; font-size: 1.3rem; }

dl.roles { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; }
dl.roles dt { color: var(--muted); }
dl.roles dd { margin: 0; }

table.fees { border-collapse: collapse; width: 100%; max-width: 24rem; }
table.fees th, table.fees td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--mist); }
table.fees td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* Publications */
.books { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.75rem; }
.books li { display: grid; grid-template-columns: 8rem 1fr; gap: 1.25rem; align-items: start; }
.books img { width: 8rem; border: 1px solid var(--mist); }
.books h3 { margin-bottom: .25rem; }
.books p { margin: .2rem 0; }
.status { font-size: .9rem; color: var(--muted); font-style: italic; }

/* Links */
.link-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.link-list li { padding: .6rem 0; border-bottom: 1px solid var(--mist); }

.button {
  display: inline-block; background: var(--lough); color: var(--paper);
  padding: .65rem 1.2rem; text-decoration: none; border-radius: 3px; font-weight: 600;
}
.button:hover { background: var(--sandstone); color: var(--paper); }

.video { aspect-ratio: 16 / 9; width: 100%; max-width: 44rem; background: var(--mist); border: 0; }

/* Footer */
footer { border-top: 4px solid var(--sandstone); background: var(--mist); }
.footer-inner {
  max-width: 64rem; margin: 0 auto; padding: 1.5rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: .95rem; color: var(--muted);
}
.footer-inner a { color: var(--ink); }

table.fees th { font-weight: 400; }

@media (max-width: 30rem) {
  .brand svg { width: 3.5rem; }
  .brand-name { font-size: 1.5rem; }
  h1 { font-size: 2rem; }
  .books li { grid-template-columns: 5.5rem 1fr; gap: 1rem; }
  .books img { width: 5.5rem; }
  nav a { padding: .55rem .5rem; }
}

/* Talks table */
table.talks { border-collapse: collapse; width: 100%; margin-top: 1rem; }
table.talks caption {
  text-align: left; font-family: "Crimson Pro", Georgia, serif;
  font-size: 1.3rem; font-weight: 600; margin-bottom: .5rem;
}
.panel table.talks { margin-top: 0; }
table.talks th { text-align: left; font-size: .9rem; color: var(--muted); font-weight: 400; padding: 0 0 .4rem; }
table.talks td { padding: .55rem 0; border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent); vertical-align: top; }
table.talks td:first-child { white-space: nowrap; padding-right: 1.25rem; color: var(--muted); font-variant-numeric: tabular-nums; }
