/* ==========================================================================
   PromoWave Pro — Tide Sheet theme
   /css/main.css — hand-written, no framework
   ========================================================================== */

/* --- Design tokens -------------------------------------------------------- */

:root {
  /* Surfaces */
  --surface-sheet: #ffffff;
  --surface-tide: #f7f9fa;
  --surface-salt: #eef2f3;
  --hairline: #dce3e6;
  --accent: #14636b;
  --accent-soft: #e3f0f1;
  --text: #14181c;
  --text-salt: #171b20;
  --muted: #3a4248;

  /* Typography */
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "Azeret Mono", ui-monospace, "Cascadia Code", monospace;

  --body-size: 1.0625rem; /* 17px */
  --body-lh: 1.75;
  --measure: 68ch;

  /* Layout */
  --shell: 1000px;
  --margin-note: 220px;
  --gutter: 32px;
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-7: 4rem;     /* 64px */
  --space-8: 5rem;     /* 80px */
  --header-h: 72px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-mid: 240ms;
  --dur-slow: 480ms;

  /* Focus */
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 3px;
}

/* --- Reset & base --------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-size);
  font-weight: 400;
  line-height: var(--body-lh);
  color: var(--text);
  background: var(--surface-sheet);
  min-height: 100vh;
}

body:has(#cookie-banner:not([hidden])) {
  padding-bottom: 7rem;
}

body.has-cookie-banner {
  padding-bottom: 7rem;
}

img,
iframe {
  max-width: 100%;
  display: block;
}

img {
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: #0f4f56;
}

/* --- Accessibility -------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  z-index: 10001;
  padding: var(--space-1) var(--space-2);
  background: var(--accent);
  color: var(--surface-sheet);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0;
}

.skip-link:focus {
  top: var(--space-2);
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* --- Typography ----------------------------------------------------------- */

h1,
h2,
h3,
h4,
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.1rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--space-3);
  max-width: var(--measure);
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  color: var(--text);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

.text-muted {
  color: var(--muted);
}

.section-opener {
  width: 64px;
  height: 3px;
  background: var(--accent);
  border: 0;
  margin: 0 0 var(--space-4);
}

/* --- Surfaces ------------------------------------------------------------- */

.surface-sheet {
  background: var(--surface-sheet);
  color: var(--text);
}

.surface-tide {
  background: var(--surface-tide);
  color: var(--text);
}

.surface-salt {
  background: var(--surface-salt);
  color: var(--text-salt);
}

/* --- Shell & grid --------------------------------------------------------- */

.shell {
  width: min(100% - var(--space-4), var(--shell));
  margin-inline: auto;
}

.shell--wide {
  width: min(100%, calc(var(--shell) + var(--space-8)));
}

/* Inner pages: main column + 220px margin note column */
.page-with-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin-note);
  gap: var(--gutter);
  align-items: start;
}

.page-main {
  min-width: 0;
}

.page-main > p,
.page-main > ul,
.page-main > ol,
.page-main > blockquote {
  max-width: var(--measure);
}

/* 10-column grid helper */
.grid-10 {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--gutter);
}

.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
.col-7 { grid-column: span 7; }
.col-3 { grid-column: span 3; }

/* --- Header (one row, nav right-aligned) ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface-sheet);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: var(--header-h);
  padding-block: var(--space-2);
}

.brand {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  display: block;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 0.125rem;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.125rem var(--space-1);
}

.site-nav a {
  display: block;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.site-nav .nav-primary a {
  margin-left: var(--space-1);
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  font-weight: 600;
}

.site-nav .nav-primary a:hover {
  background: #0f4f56;
  border-color: #0f4f56;
  color: var(--surface-sheet);
}

.site-nav .nav-primary a[aria-current="page"] {
  background: #0f4f56;
  border-color: #0f4f56;
  color: var(--surface-sheet);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
}

/* --- Main content area ---------------------------------------------------- */

main {
  padding-block: var(--space-6);
}

main > .shell:first-child {
  padding-top: 0;
}

.section {
  padding-block: var(--space-5);
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

.section--tide {
  background: var(--surface-tide);
  margin-inline: calc(-50vw + 50%);
  padding-inline: calc(50vw - 50%);
  overflow-x: clip;
  max-width: 100vw;
}

.section--salt {
  background: var(--surface-salt);
  margin-inline: calc(-50vw + 50%);
  padding-inline: calc(50vw - 50%);
  overflow-x: clip;
  max-width: 100vw;
}

/* --- B-S1: Tide table ----------------------------------------------------- */

.tide-table-wrap {
  overflow-x: auto;
  margin-block: var(--space-4);
  -webkit-overflow-scrolling: touch;
}

.tide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.tide-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  padding-bottom: var(--space-2);
  color: var(--text);
}

.tide-table thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: var(--space-2) var(--space-2) var(--space-2) 0;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  vertical-align: bottom;
}

.tide-table tbody td {
  padding: var(--space-2) var(--space-2) var(--space-2) 0;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
  color: var(--text);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.tide-table tbody tr:last-child td {
  border-bottom: 1px solid var(--hairline);
}

.tide-table tbody tr:hover td {
  border-bottom-color: var(--accent);
}

.tide-table tbody tr:hover td:first-child {
  color: var(--accent);
}

.tide-table a {
  font-weight: 600;
}

.tide-table--short .tide-table tbody td {
  padding-block: var(--space-1);
}

/* Prose entries beneath full tide table */
.tide-entry {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--hairline);
}

.tide-entry:last-child {
  border-bottom: 0;
}

.tide-entry h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

/* --- B-S2: Margin note ---------------------------------------------------- */

.margin-note {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  padding-left: var(--space-3);
  max-width: var(--margin-note);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.margin-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.margin-note-block {
  margin-block: var(--space-2);
}

/* Paired paragraph + margin note row */
.note-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--margin-note);
  gap: var(--gutter);
  align-items: start;
  margin-bottom: var(--space-4);
}

.note-row > p {
  margin-bottom: 0;
}

/* Inline margin note column on inner pages */
.notes-column {
  position: sticky;
  top: calc(var(--header-h) + var(--space-3));
}

.notes-column .margin-note {
  margin-bottom: var(--space-4);
}

/* Motion: margin note fade (gated behind .js) */
.js .margin-note.reveal-note {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
  transition-delay: 120ms;
}

.js .margin-note.reveal-note.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- B-S3: Waterline rail ------------------------------------------------- */

.waterline-section {
  padding-block: var(--space-6);
}

.waterline-rail {
  position: relative;
  margin-bottom: var(--space-6);
  padding-top: var(--space-4);
}

.waterline-rail__track {
  position: relative;
  height: 2px;
  background: var(--hairline);
  transform-origin: left center;
}

.js .waterline-rail__track.draw-line {
  transform: scaleX(0);
}

.js .waterline-rail__track.draw-line.is-drawn {
  transform: scaleX(1);
  transition: transform var(--dur-slow) var(--ease-out);
}

.waterline-rail__track::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left center;
}

.js .waterline-rail__track.draw-line::after {
  transform: scaleX(0);
}

.js .waterline-rail__track.draw-line.is-drawn::after {
  transform: scaleX(1);
  transition: transform var(--dur-slow) var(--ease-out);
}

.waterline-rail__markers {
  display: grid;
  grid-template-columns: repeat(var(--marker-count, 5), 1fr);
  gap: var(--space-2);
  position: relative;
  margin-top: -9px;
}

.waterline-marker {
  text-align: center;
}

.waterline-marker__square {
  width: 12px;
  height: 12px;
  background: var(--surface-sheet);
  border: 2px solid var(--accent);
  margin: 0 auto var(--space-2);
}

.waterline-marker__label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: var(--space-1);
}

.waterline-marker__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-1);
}

.waterline-marker__prose {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 28ch;
  margin-inline: auto;
}

.waterline-marker__prose p {
  max-width: none;
  margin-bottom: var(--space-2);
  font-size: inherit;
}

/* --- B-S4: Folded sheet --------------------------------------------------- */

.folded-sheet {
  position: relative;
  margin-block: var(--space-5);
  padding-block: var(--space-4);
}

.folded-sheet > .shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
}

.folded-sheet > .shell::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    var(--hairline) 8%,
    var(--hairline) 92%,
    transparent 100%
  );
  transform: translateX(-50%);
}

.folded-sheet::before {
  display: none;
}

.folded-sheet__col {
  padding: 0 var(--space-4);
}

.folded-sheet__col:first-child {
  padding-left: 0;
  padding-right: var(--space-5);
}

.folded-sheet__col:last-child {
  padding-right: 0;
  padding-left: var(--space-5);
}

.folded-sheet__col p {
  max-width: none;
  font-size: 0.9375rem;
}

.folded-sheet__col h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-2);
}

/* --- Photography ---------------------------------------------------------- */

.photo-frame {
  border: 1px solid var(--hairline);
  overflow: hidden;
  background: var(--surface-tide);
  margin: 0;
}

.photo-frame img {
  width: 100%;
  object-fit: cover;
}

.photo-caption,
.photo-frame figcaption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--space-2) var(--space-2);
  margin: 0;
  border-top: 1px solid var(--hairline);
  background: var(--surface-sheet);
}

/* Hero: editorial, photo below H1 */
.hero-editorial {
  padding-block: var(--space-6) var(--space-4);
}

.hero-editorial h1 {
  max-width: 18ch;
  margin-bottom: var(--space-3);
}

.hero-editorial .hero-photo {
  margin-top: var(--space-4);
  aspect-ratio: 3 / 1;
}

.hero-editorial .hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Two-photo pair at unequal heights */
.photo-pair {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: var(--gutter);
  align-items: start;
  margin-block: var(--space-5);
}

.photo-pair__tall {
  margin-top: var(--space-6);
}

.photo-pair .photo-frame img {
  min-height: 280px;
  max-height: 420px;
}

.photo-pair__tall .photo-frame img {
  min-height: 360px;
  max-height: 520px;
}

/* Full-measure photograph */
.photo-full {
  margin-block: var(--space-5);
}

.photo-full .photo-frame img {
  max-height: 480px;
  width: 100%;
  object-fit: cover;
}

.photo-full .photo-caption {
  max-width: var(--measure);
  padding-left: 0;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-family: var(--font-display);
}

/* About: two-photo band */
.photo-band-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  margin-bottom: var(--space-5);
}

.photo-band-duo .photo-frame img {
  min-height: 240px;
  max-height: 360px;
  object-fit: cover;
}

/* Motion: photo fade (optional enhancement) */
.js .reveal-photo {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
}

.js .reveal-photo.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Map variants --------------------------------------------------------- */

.map-block {
  margin-block: var(--space-4);
}

.map-block iframe {
  width: 100%;
  border: 0;
  display: block;
}

.map-caption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-2) 0 0;
}

/* MAP-A — letterbox above prose (harbour.php) */
.map-a {
  margin-bottom: var(--space-5);
}

.map-a .map-frame {
  border: 1px solid var(--accent);
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-tide);
}

.map-a iframe {
  height: 280px;
  filter: saturate(0.75);
}

.map-a .map-caption {
  margin-top: var(--space-2);
}

/* MAP-B — low strip above footer */
.map-b {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.map-b .map-frame {
  border: 1px solid var(--hairline);
  overflow: hidden;
}

.map-b iframe {
  height: 180px;
  filter: saturate(0.8);
}

.map-b--inset .map-frame {
  width: min(100%, var(--shell));
  margin-inline: auto;
}

/* MAP-C — wide band (shoreline, plainly) */
.map-c {
  margin-block: var(--space-5);
}

.map-c .map-frame {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

.map-c iframe {
  height: 300px;
  filter: saturate(0.78);
}

.map-c .map-caption {
  padding: var(--space-2) 0;
}

/* MAP-D — compact card (legal, 404) */
.map-d {
  margin-block: var(--space-4);
  max-width: 420px;
}

.map-d .map-frame {
  border: 1px solid var(--accent);
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface-salt);
  padding: var(--space-1);
}

.map-d iframe {
  height: 200px;
  filter: saturate(0.75);
}

/* --- FAQ page (plainly.php) ----------------------------------------------- */

.faq-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--gutter);
  align-items: start;
}

.faq-jump-nav {
  position: sticky;
  top: calc(var(--header-h) + var(--space-3));
  padding-right: var(--space-2);
  border-right: 1px solid var(--hairline);
}

.faq-jump-nav__title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.faq-jump-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.faq-jump-nav li {
  margin-bottom: 0.25rem;
}

.faq-jump-nav a {
  display: block;
  padding: 0.375rem 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: var(--space-2);
  margin-left: calc(-1 * var(--space-2));
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}

.faq-jump-nav a:hover {
  color: var(--text);
}

.faq-jump-nav a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
}

.faq-content {
  min-width: 0;
}

.faq-group {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

.faq-group:first-child {
  padding-top: 0;
}

.faq-question {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.faq-answer {
  color: var(--text);
}

.faq-answer p {
  max-width: none;
  margin-bottom: var(--space-2);
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* --- Contact (harbour.php) ------------------------------------------------ */

.harbour-contact {
  max-width: var(--measure);
}

.harbour-contact address {
  font-style: normal;
  margin-bottom: var(--space-3);
  line-height: 1.75;
}

.harbour-contact .contact-line {
  margin-bottom: var(--space-2);
}

.harbour-contact .disclaimer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* --- Lists & misc content ------------------------------------------------- */

.content-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  max-width: var(--measure);
}

.content-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
}

.content-list li:first-child {
  border-top: 1px solid var(--hairline);
}

.hairline-list {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.hairline-list li {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
}

.signed-note {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
}

.if-close {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  font-size: 1.0625rem;
  max-width: var(--measure);
}

.if-close::first-letter {
  font-weight: 600;
  color: var(--accent);
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  background: var(--surface-sheet);
  border-top: 1px solid var(--hairline);
  padding-block: var(--space-6);
  margin-top: var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.footer-entity {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 var(--space-1);
}

.footer-address,
.footer-contact,
.footer-hours {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 var(--space-1);
}

.footer-hosted {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: var(--space-2) 0;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--muted);
  margin: var(--space-2) 0 var(--space-3);
  max-width: 36ch;
}

.footer-legal ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.footer-legal a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-copy {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* --- Cookie banner (white panel, bottom-right / full mobile) -------------- */

#cookie-banner {
  position: fixed;
  bottom: var(--space-3);
  right: var(--space-3);
  z-index: 10000;
  width: min(420px, calc(100vw - var(--space-4)));
  background: var(--surface-sheet);
  border: 1px solid var(--hairline);
  box-shadow: 0 8px 32px rgba(20, 24, 28, 0.08);
  padding: var(--space-3);
  display: none;
}

#cookie-banner.is-visible:not(.is-dismissed) {
  display: block;
}

#cookie-banner[aria-hidden="true"] {
  display: none;
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

#cookie-banner p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text);
  max-width: none;
}

#cookie-banner a {
  color: var(--accent);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.cookie-banner__actions button {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface-sheet);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out);
}

.cookie-banner__actions button:hover {
  background: #0f4f56;
  border-color: #0f4f56;
}

.cookie-banner__actions .cookie-btn--ghost {
  background: var(--surface-sheet);
  color: var(--accent);
}

.cookie-banner__actions .cookie-btn--ghost:hover {
  background: var(--accent-soft);
}

/* Cookie customise panel (inline, not blocking modal) */
#cookie-panel {
  display: none;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--hairline);
}

#cookie-panel.is-open {
  display: block;
}

#cookie-panel h2 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

.cookie-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.875rem;
}

.cookie-toggle:last-of-type {
  border-bottom: 0;
}

.cookie-toggle strong {
  display: block;
  font-weight: 600;
}

.cookie-toggle .text-muted {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.125rem 0 0;
}

.cookie-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  background: var(--surface-salt);
  border: 1px solid var(--hairline);
  cursor: pointer;
  transition: background 160ms cubic-bezier(.16, 1, .3, 1),
    border-color 160ms cubic-bezier(.16, 1, .3, 1);
}

.cookie-switch[aria-checked="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.cookie-switch[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.cookie-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--muted);
  transition: transform 160ms cubic-bezier(.16, 1, .3, 1),
    background 160ms cubic-bezier(.16, 1, .3, 1);
}

.cookie-switch[aria-checked="true"] .cookie-switch__thumb {
  transform: translateX(20px);
  background: var(--accent);
}

.cookie-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.cookie-panel__actions button {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface-sheet);
  cursor: pointer;
}

.cookie-panel__actions .cookie-btn--ghost {
  background: var(--surface-sheet);
  color: var(--accent);
}

/* Standalone manage panel on cookies.php */
.cookie-manage-block {
  margin-block: var(--space-4);
  padding: var(--space-4);
  background: var(--surface-tide);
  border: 1px solid var(--hairline);
  max-width: 480px;
}

.cookie-manage-block button {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface-sheet);
  cursor: pointer;
}

/* --- Legal & 404 ---------------------------------------------------------- */

.legal-content h2 {
  margin-top: var(--space-5);
}

.legal-content h2:first-of-type {
  margin-top: var(--space-3);
}

.page-meta {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: var(--space-4);
}

.error-page {
  padding-block: var(--space-7);
  max-width: var(--measure);
}

.error-page h1 {
  margin-bottom: var(--space-3);
}

.error-links {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.error-links li {
  margin-bottom: var(--space-1);
}

.error-links a {
  font-weight: 600;
}

/* --- Motion: reduced motion ----------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .margin-note.reveal-note,
  .js .reveal-photo,
  .js .waterline-rail__track.draw-line,
  .js .waterline-rail__track.draw-line::after {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 960px) {
  .page-with-notes,
  .note-row {
    grid-template-columns: 1fr;
  }

  .notes-column {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .margin-note {
    max-width: none;
  }

  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-jump-nav {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
  }

  .faq-jump-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
  }

  .faq-jump-nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 0.25rem 0.5rem;
    margin-left: 0;
  }

  .faq-jump-nav a.is-active {
    border-bottom-color: var(--accent);
  }

  .faq-group {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .folded-sheet > .shell {
    grid-template-columns: 1fr;
  }

  .folded-sheet > .shell::before {
    display: none;
  }

  .folded-sheet__col,
  .folded-sheet__col:first-child,
  .folded-sheet__col:last-child {
    padding: 0;
  }

  .folded-sheet__col + .folded-sheet__col {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--hairline);
  }

  .photo-pair,
  .photo-band-duo {
    grid-template-columns: 1fr;
  }

  .photo-pair__tall {
    margin-top: 0;
  }

  .waterline-rail__markers {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .waterline-marker__prose {
    max-width: none;
  }

  .grid-10 {
    grid-template-columns: 1fr;
  }

  .col-6,
  .col-4,
  .col-7,
  .col-3 {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-sheet);
    border-bottom: 1px solid var(--hairline);
    padding: var(--space-2) var(--space-2) var(--space-3);
  }

  .site-header.is-nav-open .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.625rem var(--space-2);
    border-bottom: 1px solid var(--hairline);
  }

  .site-nav a[aria-current="page"] {
    border-bottom-color: var(--hairline);
    border-left: 3px solid var(--accent);
  }

  .site-nav .nav-primary a {
    margin-left: 0;
    margin-top: var(--space-1);
    text-align: center;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  #cookie-banner {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: var(--space-3) var(--space-2);
  }

  .map-a iframe {
    height: 240px;
  }

  .map-c iframe {
    height: 220px;
  }
}

@media (min-width: 769px) {
  .map-a iframe {
    height: 440px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-5);
  }
}

/* --------------------------------------------------------------------------
   Layout & visibility fixes
   -------------------------------------------------------------------------- */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

main {
  overflow-x: clip;
  max-width: 100%;
}

.eyebrow,
.photo-caption,
.map-caption,
.breadcrumb,
.footer-address,
.footer-contact,
.footer-hours,
.footer-hosted,
.footer-tagline,
.footer-copy,
.footer-legal a,
.signed-note,
.harbour-contact .disclaimer,
.tide-table thead th {
  color: var(--muted);
}

:root {
  --muted: #4a545c;
}

.lead,
.page-main p,
.folded-sheet__col p,
.tide-table-wrap p,
.margin-note__text {
  color: var(--text);
}

.waterline-marker__prose {
  color: var(--text);
}

.text-muted {
  color: var(--muted);
}

.pad-section {
  padding-block: var(--space-3);
}

.pad-section p {
  margin-bottom: 0;
}

#cookie-banner {
  display: none;
}

#cookie-banner.is-visible:not(.is-dismissed) {
  display: block;
}

#cookie-banner.is-dismissed,
#cookie-banner[hidden] {
  display: none !important;
}

#cookie-banner[aria-hidden="true"]:not(.is-visible) {
  display: none;
}

#cookie-banner p,
#cookie-panel h2,
.cookie-toggle,
.cookie-toggle .text-muted {
  color: var(--text);
}

#cookie-banner p {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.cookie-banner__actions button:not(.cookie-btn--ghost),
.cookie-panel__actions button:not(.cookie-btn--ghost),
.cookie-manage-block button {
  color: #ffffff !important;
}

.cookie-banner__actions .cookie-btn--ghost,
.cookie-panel__actions .cookie-btn--ghost {
  color: var(--accent) !important;
  background: var(--surface-sheet);
}

.cookie-banner__actions .cookie-btn--ghost:hover,
.cookie-panel__actions .cookie-btn--ghost:hover {
  color: #0f4f56 !important;
}

.site-nav .nav-primary a,
.site-nav .nav-primary a:hover,
.site-nav .nav-primary a[aria-current="page"] {
  color: #ffffff !important;
}

.map-a iframe,
.map-b iframe,
.map-c iframe,
.map-d iframe,
.map-block iframe {
  filter: none;
  opacity: 1;
}

.map-a .map-frame,
.map-b .map-frame,
.map-c .map-frame,
.map-d .map-frame {
  background: var(--surface-tide);
}

.hero-photo img {
  max-height: 400px;
  width: 100%;
  object-fit: cover;
}

.photo-full .photo-frame img {
  max-height: 380px;
}

.photo-pair .photo-frame img {
  min-height: 200px;
  max-height: 340px;
}

.photo-pair__tall .photo-frame img {
  min-height: 240px;
  max-height: 380px;
}

.photo-band-duo .photo-frame img {
  min-height: 200px;
  max-height: 320px;
}

.page-with-notes {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--margin-note));
  max-width: 100%;
  box-sizing: border-box;
}

.page-with-notes .note-row {
  grid-template-columns: 1fr;
}

.page-with-notes .note-row > p {
  max-width: var(--measure);
}

.notes-column,
.page-main,
.note-row,
.shell,
.header-inner,
.footer-grid,
.faq-layout,
.faq-content,
.folded-sheet,
.photo-pair,
.photo-band-duo,
.waterline-rail,
.waterline-rail__markers,
.tide-table-wrap,
.map-block {
  min-width: 0;
  max-width: 100%;
}

.page-main p,
.folded-sheet__col p,
.tide-table-wrap,
.notes-column .margin-note,
.margin-note-block {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.waterline-rail__markers {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.js .margin-note.reveal-note {
  opacity: 1;
  transform: none;
}

.js .reveal-photo {
  opacity: 1;
  transform: none;
}

.js .waterline-rail__track.draw-line {
  transform: scaleX(1);
}

