/* Shared by every page. Page-specific rules stay in each page's own <style>. */
:root {
  --bg: #ffffff; --ink: #15212c; --muted: #5a6773; --line: #d3dae2; --open: #f1f4f7;
  --title: #003262; --accent: #003262; --kicker: #0a4178;
  --booked: #003262; --booked-ink: #ffffff; --booked-muted: #b7c8d9;
  --hero: #003262; --hero-2: #0a4178; --hero-muted: #b7c8d9; --nav-ink: #dce6ef;
  --gold: #fdb515; --error: #b3261e;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1823; --ink: #e7edf2; --muted: #98a6b3; --line: #2a3b4d; --open: #13243a;
    --title: #e7edf2; --accent: #fdb515; --kicker: #a9c0d6;
    --booked: #1d4a73; --booked-muted: #a9c0d6; --error: #ff8a80;
    --hero: #0a2238; --hero-2: #12345a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.title { font: 600 clamp(1.9rem, 3.5vw, 2.5rem)/1.1 var(--serif); color: var(--title); margin: 0; }

/* Preview banner */
.topnote { margin: 0; padding: .5rem 1.5rem; background: #fff4d1; color: #5a4300; font-size: .875rem; text-align: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font: 600 .95rem/1 var(--sans); padding: .8rem 1.2rem; border-radius: 4px; text-decoration: none; cursor: pointer; border: 0; }
.btn svg { flex: none; }
.btn-gold { background: var(--gold); color: #002343; }
.btn-gold:hover { background: #ffc740; }
.btn-ghost { background: none; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn-primary { background: var(--booked); color: #fff; box-shadow: 0 1px 2px rgba(0, 30, 60, .2); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-secondary { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { box-shadow: inset 0 0 0 1px var(--muted); }
.btn-write { font-size: 1rem; padding: .95rem 1.35rem; min-height: 48px; }

/* Masthead: brand, page links and the sign-up button. Below 820px the links drop to a second row. */
.masthead { position: sticky; top: 0; z-index: 10; background: var(--hero); color: #fff; }
.masthead-row { display: flex; align-items: center; gap: 2rem; min-height: 64px; }
.brand { font: 600 1.25rem var(--serif); color: #fff; text-decoration: none; white-space: nowrap; margin-right: auto; }
.brand-sub { font: 500 .8rem var(--sans); color: var(--hero-muted); margin-left: .5rem; }
.nav ul { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; line-height: 61px; border-bottom: 3px solid transparent; color: var(--nav-ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: #fff; }
.nav a[aria-current] { color: #fff; font-weight: 600; border-bottom-color: var(--gold); }
.masthead-cta { padding: .7rem 1.1rem; white-space: nowrap; }
.masthead-cta .short { display: none; }
@media (max-width: 820px) {
  .masthead-row { flex-wrap: wrap; gap: 0 .75rem; min-height: 0; }
  .brand { line-height: 56px; font-size: 1.2rem; }
  .brand-sub { display: none; }
  .masthead-cta { order: 2; padding: .7rem .95rem; }
  .masthead-cta .long { display: none; }
  .masthead-cta .short { display: inline; }
  .nav { order: 3; flex-basis: calc(100% + 3rem); margin: 0 -1.5rem; padding: 0 1.5rem; border-top: 1px solid rgba(255, 255, 255, .14); }
  .nav ul { gap: 1.75rem; }
  .nav a { line-height: 41px; font-size: .9rem; }
}

/* Title block on every page except home */
.page-head { padding-top: 2.75rem; }
.page-head-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; padding-bottom: 1.75rem; border-bottom: 2px solid var(--title); }
.page-head-inner > div:first-child { max-width: 40rem; }
.page-head h1 { font: 600 clamp(2.4rem, 5vw, 3rem)/1.05 var(--serif); letter-spacing: -0.015em; color: var(--title); margin: 0 0 .75rem; text-wrap: balance; }
.page-head .lede { margin: 0; color: var(--muted); font-size: 1.125rem; }
.crumb { margin: 0 0 .5rem; font-size: .9rem; font-weight: 500; }
.crumb a { color: var(--muted); text-underline-offset: 3px; }
@media (max-width: 640px) { .page-head { padding-top: 2rem; } }

/* Footer */
.site-footer { background: var(--hero); color: var(--hero-muted); padding: 3.5rem 0; font-size: .925rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 2.5rem; }
.site-footer .brand { display: inline-block; }
.site-footer p { margin: .5rem 0 0; }
.site-footer h2 { font: 600 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #fff; margin: .45rem 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--nav-ink); }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.site-footer .email { color: #fff; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .site-footer { padding: 2.75rem 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .site-footer h2 { display: none; }
  .site-footer ul { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
}

/* Forms */
label { display: grid; gap: .3rem; font-weight: 500; font-size: .9rem; }
.hint { font-weight: 400; font-size: .85rem; color: var(--muted); }
/* Kept to bare element selectors so a page can override them with one class. */
input, select, textarea { font: inherit; font-size: 1rem; font-weight: 400; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); width: 100%; }
textarea { line-height: 1.6; resize: vertical; }
input:disabled, textarea:disabled { opacity: .55; }
input[type=checkbox], input[type=radio] { accent-color: var(--booked); width: 1.1rem; height: 1.1rem; margin: 0; padding: 0; flex: none; }
label.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .95rem; line-height: 1.5; }
label.check input { margin-top: .2rem; }
.counter { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; margin: 0; font-size: .85rem; color: var(--muted); }
.counter .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.counter.over .count { color: var(--error); font-weight: 600; }
.error { color: var(--error); margin: 0; font-size: .9rem; }

/* Post cards: the blog index front page and the home page's latest posts */
.front { display: grid; }
.front.cols-1 { grid-template-columns: minmax(0, 44rem); }
.front.cols-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.front.cols-3 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.front > .col { display: grid; gap: 1.5rem; align-content: start; min-width: 0; }
.front > .col + .col { border-left: 1px solid var(--line); padding-left: 2rem; }
.front > .col:not(:last-child) { padding-right: 2rem; }
.col .story-pic + .story-pic { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.col-list { gap: 0; }
.col-label { font: 600 .75rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0; padding-bottom: .65rem; }
.story a { display: grid; gap: .85rem; color: var(--ink); text-decoration: none; }
.story a:hover :is(h2, h3) { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.story img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--open); }
.story :is(h2, h3) { font: 600 1.2rem/1.25 var(--serif); color: var(--title); margin: 0 0 .4rem; text-wrap: balance; }
.story .standfirst { margin: 0 0 .65rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.5; }
.story .meta { margin: 0; font-size: .85rem; color: var(--muted); }
.story .meta .author { color: var(--ink); font-weight: 500; }
.story-lead a { gap: 1rem; }
.story-lead h2 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.01em; margin-bottom: .6rem; }
.story-text { border-top: 1px solid var(--line); }
.story-text img { display: none; }
.story-text a { padding: .9rem 0 1rem; gap: 0; }
.story-text h3 { font-size: 1.05rem; line-height: 1.3; }
.story-text .meta, .story-row .meta { font-size: .8rem; }
.front-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.25rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.front-row > .story + .story { border-left: 1px solid var(--line); padding-left: 2rem; }
.front-row > .story:not(:last-child) { padding-right: 2rem; }
.story-row a { grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 1rem; align-items: start; }
.story-row img { order: 2; margin-top: .2rem; border-radius: 3px; }
.story-row h3 { font-size: 1.1rem; line-height: 1.28; }
@media (max-width: 760px) {
  .front.cols-1, .front.cols-2, .front.cols-3, .front-row { grid-template-columns: minmax(0, 1fr); }
  .front > .col + .col, .front-row > .story + .story { border-left: 0; padding-left: 0; }
  .front > .col:not(:last-child), .front-row > .story:not(:last-child) { padding-right: 0; }
  .front > .col { gap: 0; }
  .front-row { margin-top: 0; padding-top: 0; border-top: 0; }
  .story-lead { padding-bottom: 1.25rem; }
  .story-lead h2 { font-size: 1.6rem; line-height: 1.15; }
  .col-label { display: none; }
  .col .story-pic + .story-pic { padding-top: 0; }
  .story-pic, .story-text, .story-row { border-top: 1px solid var(--line); }
  .story-pic a, .story-text a, .story-row a { grid-template-columns: minmax(0, 1fr) 6rem; gap: .9rem; align-items: start; padding: 1rem 0; }
  .story-pic img, .story-text img, .story-row img { display: block; order: 2; margin-top: .2rem; border-radius: 3px; }
  .story-pic h3, .story-text h3, .story-row h3 { font-size: 1.05rem; line-height: 1.3; margin-bottom: .3rem; }
  .story-pic .meta { font-size: .8rem; }
}
