@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1a1814;
  --paper: #f3efe6;
  --foam: #fbfaf6;
  --sky: #d5e4e6;
  --canal: #1f5f5b;
  --canal-deep: #164845;
  --clay: #9a4f32;
  --muted: #5a564e;
  --line: #ddd4c6;
  --route: #c9bfae;
  --font-display: "Source Serif 4", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --wide: 68rem;
}

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

html,
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--paper);
  color: var(--ink);
  overflow-wrap: break-word;
}

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

a {
  color: var(--canal-deep);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--clay);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--canal);
  color: var(--foam);
  padding: 0.5rem 0.8rem;
  z-index: 40;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

.wrap {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
}

/* Light typographic masthead — not a dark bar */
.mast {
  position: relative;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.mast-inner {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  padding: 0.6rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand .logo {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.tagline {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--foam);
  border-radius: 0.4rem;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-toggle .bars {
  display: block;
  width: 1.05rem;
  height: 2px;
  background: var(--ink);
  position: relative;
}

.menu-toggle .bars::before,
.menu-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.05rem;
  height: 2px;
  background: var(--ink);
}

.menu-toggle .bars::before {
  top: -5px;
}

.menu-toggle .bars::after {
  top: 5px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--canal);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.28em;
}

/* Sky-coloured disclaimer strip, every page */
.disclaimer {
  background: var(--sky);
  color: var(--ink);
  border-bottom: 1px solid #c5d5d8;
}

.disclaimer p {
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto;
  padding: 0.7rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.disclaimer a {
  color: var(--canal-deep);
  font-weight: 600;
}

/* Hero is a full-width photograph with a caption shelf below, not an overlay */
.hero {
  margin: 0;
}

.hero img,
.article-figure img,
.mast-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero img {
  max-height: 34rem;
}

.hero-shelf {
  background: var(--foam);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0 2rem;
}

.hero-shelf .kicker,
.page-head .kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0;
  max-width: 40rem;
}

/* Horizontal route on desktop, vertical timetable on small screens */
.route {
  list-style: none;
  margin: 2.25rem 0 0;
  padding: 1.5rem 0 0.25rem;
  border-top: 1px dashed var(--route);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  position: relative;
}

.route::before {
  content: "";
  position: absolute;
  top: 1.5rem;
  left: 0.55rem;
  right: 0.55rem;
  height: 2px;
  background: var(--route);
  pointer-events: none;
}

.route li {
  position: relative;
  min-width: 0;
  padding-top: 1.1rem;
}

.route li::before {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--canal);
  box-shadow: 0 0 0 3px var(--foam);
  z-index: 1;
}

.route a {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.route .stop {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--canal-deep);
}

.route .sum {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.route a:hover .stop {
  color: var(--clay);
}

/* Inner-page head */
.page-head {
  padding: 2rem 0 0;
}

.crumb {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.crumb a {
  color: var(--canal-deep);
}

.article-figure,
.mast-figure {
  margin: 1.5rem 0 0;
}

.article-figure figcaption,
.mast-figure figcaption,
.hero figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Long-form notes */
.prose {
  padding: 1.75rem 0 3rem;
}

.prose p,
.prose li {
  margin: 0 0 1rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 1.8rem 0 0.7rem;
}

.prose a {
  font-weight: 600;
}

.more-notes {
  margin: 0 0 3rem;
  padding: 1.25rem 0 0;
  border-top: 1px dashed var(--route);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.more-notes a {
  text-decoration: none;
  font-weight: 600;
}

.more-notes a::before {
  content: "→ ";
  color: var(--clay);
}

/* Footer is a mid canal band, not a midnight navy bar */
.site-footer {
  background: var(--canal);
  color: var(--foam);
  padding: 2rem 0 2.4rem;
}

.site-footer a {
  color: var(--foam);
}

.site-footer a:hover {
  color: #ffe7d4;
}

.footer-inner {
  width: min(100% - 2rem, var(--wide));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.footer-inner p {
  margin: 0;
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal {
  flex-basis: 100%;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #d7e4e3;
  margin-top: 0.4rem;
}

.lost {
  padding: 3rem 0 4rem;
}

.lost .numeral {
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--canal);
  margin: 0 0 0.5rem;
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--canal);
  color: var(--foam);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.3rem;
}

.button:hover {
  background: var(--canal-deep);
  color: var(--foam);
}

@media (max-width: 799px) {
  .menu-toggle {
    display: flex;
  }

  .mast-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
    padding: 0.25rem 0 0.75rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
  }

  .route {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 0.5rem;
    gap: 0;
  }

  .route::before {
    display: none;
  }

  .route li {
    padding: 0.85rem 0 0.85rem 1.35rem;
    border-left: 2px solid var(--route);
  }

  .route li::before {
    left: -0.4rem;
    top: 1.15rem;
  }

  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 399px) {
  .wordmark {
    font-size: 1.02rem;
  }

  .tagline {
    font-size: 0.64rem;
  }

  .disclaimer p {
    font-size: 0.84rem;
  }
}
