/* ---------- Reset ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}
body, h1, h2, h3, p, ul, address {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
address {
  font-style: normal;
}
/* ---------- Tokens ---------- */ 
:root {
  --navy: #002738;
  --blue: #004b85;
  --yellow: #ebe575;
  --tan: #d6b78d;
  --tan-light: #f7f1e8;
  --green: #597069;
  --brown: #705c45;
  --mint: #b8d0c3; /* region list bullets */
  --red: #d7263d; /* "Not Updated" chart label */
  --pale-blue: #f2fbff;
  --white: #ffffff;
  --sky: #d1f0ff; /* mobile menu */
  --rule: #a2c5cc; /* light dividers and input borders */
	
  /* Adobe Fonts kit xng5xkl (loaded in includes/header.php), with local fallbacks */
  --font-display: "rocky", "Georgia", "Times New Roman", serif;
  --font-label: "brother-1816", "Futura", "Avenir Next", sans-serif;
  --font-body: "neue-haas-grotesk-display", "Helvetica Neue", Helvetica, Arial, sans-serif;
	
  --max-width: 1280px;
  --gutter: 24px;
  --radius: 10px;
  --panel-btn-width: 200px; /* tan buttons + chart number box in the search panel */
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .035em;
  color: var(--navy);
  background: var(--pale-blue);
}
/* Neue Haas Grotesk text tracks at .035em of its own size. An em value is passed down
   as a fixed px amount, so set it on each element that holds body text rather than only
   on body. Brother 1816 labels and buttons set their own letter-spacing in their classes. */
p,
li,
address,
label,
button,
input,
textarea,
select {
  letter-spacing: .035em;
}
a {
  color: inherit;
}
/* Inline links in body copy: blue and underlined, navy on hover */
p a:not(.btn) {
  color: var(--blue);
}
p a:not(.btn):hover,
p a:not(.btn):focus-visible {
  color: var(--navy);
}
.container {
  max-width: calc(var(--max-width) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.eyebrow, .card-eyebrow {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: var(--navy);
}
.section-lede {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.45;
  max-width: 900px;
  margin: 16px auto 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 28px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  transition: filter .15s, background-color .15s;
}
.btn:hover {
  filter: brightness(0.94);
}
/* Larger size for primary actions (home Find a Chart, Buy Now) */
.btn-large {
  font-size: 18px;
  padding: 15px 36px;
  border-radius: 6px;
}
.btn-yellow {
  background: var(--yellow);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.btn-tan {
  background: var(--tan);
  color: var(--navy);
  width: 100%;
  max-width: var(--panel-btn-width);
  text-align: center;
}
.btn-outline {
  border-color: var(--yellow);
  color: var(--yellow);
}
.btn-outline:hover {
  background: rgba(235, 230, 118, .12);
  filter: none;
}
.btn-navy {
  background: var(--navy);
  color: var(--yellow);
}
.btn-navy:hover,
.btn-navy:focus-visible {
  background: var(--blue);
  filter: none;
}
.btn-outline-navy {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--white);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  position: relative;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  padding: 5px 0 4px;
}
.logo img {
  height: 76px;
  width: auto;
}
.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: stretch;
  gap: 8px 46px;
}
.main-nav a {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
}
.main-nav a:hover {
  color: var(--blue);
}
.menu-toggle {
  display: none;
}

/* Dropdown menus: same colors and rules as the mobile menu.
   To add one, copy the .nav-item block in includes/header.php. */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch; /* full header height, so the mouse can reach the menu without leaving it */
}
.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 32px;
  margin-right: -14px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--navy);
  cursor: pointer;
}
.nav-dropdown-toggle svg {
  display: block;
  width: 10px;
  height: 7px;
}
.nav-item:hover .nav-dropdown-toggle {
  color: var(--blue);
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: -24px; /* lines the text up with the top-level link; matches the left padding */
  z-index: 10;
  width: max-content;
  margin: 0;
  padding: 8px 28px 8px 24px;
  list-style: none;
  background: var(--sky);
  animation: nav-dropdown-fade .2s ease-out;
}
@keyframes nav-dropdown-fade {
  from {
    opacity: 0;
  }
}
.nav-item.is-open .nav-dropdown {
  display: block;
}
.nav-dropdown li {
  border-bottom: 1px solid var(--rule);
}
.nav-dropdown li:last-child {
  border-bottom: 0;
}
.main-nav .nav-dropdown a {
  display: block;
  padding: 12px 0;
  border-bottom: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  color: var(--navy);
}
.main-nav .nav-dropdown a:hover {
  color: var(--blue);
}
/* Open on hover only where there's a mouse and the full menu is showing */
@media (min-width: 960px) and (hover: hover) {
  .nav-item:hover .nav-dropdown {
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* Keep the boat (right of centre) in view as the hero is cropped */
  background: #0d3a66 url("../images/homehero-boat-in-ocean.webp") 70% 35% / cover no-repeat;
  color: var(--white);
  text-align: center;
  padding: 90px 0 240px;
}
/* Dashed band along the bottom edge of the hero */
.hero::after, .page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: url("../images/dashed-map-border.svg") repeat-x left center / auto 8px;
}
.hero .eyebrow {
  color: var(--yellow);
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.05;
  margin-top: 18px;
}
.hero-lede {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  margin-top: 22px;
}
.hero-cta {
  position: relative;
  display: inline-block;
  margin-top: 40px;
}
/* Sits to the left of the button, tucked under its edge; the button stays centred */
.compass {
  position: absolute;
  top: 0;
  right: calc(100% - 10px);
  width: 78px;
  height: 78px;
}
.hero-cta .btn {
  position: relative;
  z-index: 1;
}

/* ---------- Home background (below the hero) ---------- */
.home-main {
  display: flow-root; /* keeps the search panel's negative margin from pulling the background up under the hero */
  background: var(--pale-blue) url("../images/Bkgd-Chart-top.webp") center top / 100% auto no-repeat;
}
/* ---------- Search panel ---------- */
.search-panel-wrap {
  margin-top: -150px;
  position: relative;
  z-index: 2;
}
.search-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 53, 87, .12);
  padding: 40px 0;
}
.search-option {
  text-align: center;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.search-option + .search-option {
  border-left: 1.5px solid #c9d6de;
}
.search-option h2 {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.search-option p {
  margin: 6px 0 22px;
  max-width: 210px;
  line-height: 1.35;
}
.search-option .btn {
  margin-top: auto;
}
.chart-search {
  margin-top: auto;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--tan);
  border-radius: 4px;
  background: var(--tan-light);
  width: 100%;
  max-width: var(--panel-btn-width);
}
.chart-search input {
  flex: 1;
  width: 0;
  border: 0;
  background: transparent;
  padding: 10px 0 10px 14px;
  font: 700 13px var(--font-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.chart-search input::placeholder {
  color: #6d6e70;
}
.chart-search input:focus {
  outline: none;
}
.chart-search input:focus::placeholder {
  color: transparent;
}
.chart-search:focus-within {
  border-color: var(--navy);
}
.chart-search button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 6px 12px 6px 8px;
  color: var(--navy);
}
.chart-search svg {
  width: 20px;
  height: 20px;
  display: block;
}
/* ---------- Difference ---------- */
.difference {
  padding: 100px 0 80px;
  text-align: center;
  overflow-x: clip; /* hides the rotated badge's transparent corners at the page edge */
}
.difference-inner {
  position: relative;
}
/* Wide enough for two lines at the full 24px size (1480px and up); narrower below, beside the badge */
.difference .section-lede {
  max-width: 860px;
}
@media (max-width: 1479px) {
  .difference .section-lede {
    max-width: 820px;
  }
}
.checklist {
  display: inline-block;
  text-align: left;
  margin-top: 44px;
  font-family: var(--font-label);
  font-weight: 500;
  color: var(--navy);
}
.checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  letter-spacing: 0;
}
/* Paper-plane bullet (images/bullet-home.svg) */
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  background: url("../images/bullet-home.svg") no-repeat center / contain;
}
.badge {
  position: absolute;
  top: -110px;
  right: var(--gutter); /* lines up with the search panel's right edge */
  z-index: 3; /* above the search panel (z-index 2) */
  width: 210px;
  height: 210px;
  transform: rotate(15deg);
}
/* ---------- Feature cards ---------- */
.features {
  padding: 0 0 80px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.feature-photo {
  width: 100%;
  aspect-ratio: 459 / 266;
  object-fit: cover;
  border-radius: var(--radius);
}
.feature-card {
  flex: 1;
  border-radius: var(--radius);
  color: var(--white);
  text-align: center;
  padding: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.feature-card .card-eyebrow {
  font-size: 14px;
  color: #d7d0b4;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, calc(1.924rem + 0.323vw), 2.275rem); /* 32px phone → 35.4px at 1440 → 36.4px max */
  line-height: 1.05;
  margin-top: 6px;
}
.feature-card p:not(.card-eyebrow) {
  font-size: 18px;
  margin: 16px 0 28px;
}
.card-green {
  background: var(--green);
}
.card-brown {
  background: var(--brown);
}
.card-navy {
  /* Pages can swap the photo with --card-image (tall) and --card-image-wide (tablet) */
  background: var(--navy) var(--card-image, url("../images/yacht-in-ocean.webp")) center top / cover no-repeat;
  justify-content: flex-end;
  padding-bottom: 130px;
  min-height: 560px;
}
/* ---------- Need help ---------- */
.help {
  padding: 40px 0 100px;
  text-align: center;
}
.eyebrow-navy {
  color: var(--navy);
}
.help .section-title {
  margin-top: 4px;
}
.help .btn {
  margin-top: 36px;
}
/* ---------- Inner page heroes (Products, chart types) ---------- */
.page-hero {
  position: relative;
  background: #003448 no-repeat;
  color: var(--white);
  padding: 72px 0 80px;
}
.page-hero .eyebrow {
  color: var(--yellow);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  margin-top: 14px;
}
.page-hero-lede {
  font-size: clamp(1.125rem, calc(1.081rem + 0.188vw), 1.25rem);
  margin-top: 14px;
} /* 18px phone → 20px at 1440 */
/* Photo heroes (Products, Find a Chart): the photo fades to solid navy on the left,
   so the text sits on the plain side. Each page sets --hero-image. */
.page-hero--photo {
  background: #003448 var(--hero-image) right center / cover no-repeat;
}
/* Chart types: navy gradient over a chart image. Each page sets --hero-image
   (and optionally --hero-focus and --hero-zoom). */
.page-hero--chart {
  --hero-overlay: linear-gradient(90deg, #003448 32%, rgba(0, 52, 72, .75) 50%, rgba(0, 52, 72, .45) 72%, rgba(0, 52, 72, .3));
  overflow: hidden;
  padding: 110px 0 110px;
}
/* The chart sits on its own layer, zoomed in so its printed border falls outside the hero */
.page-hero--chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-overlay), var(--hero-image) var(--hero-focus, center) / cover no-repeat;
  transform: scale(var(--hero-zoom, 1.12));
}
.page-hero--chart .container {
  position: relative;
  z-index: 1;
}
.page-hero-intro {
  font-size: clamp(1.0625rem, calc(1.041rem + 0.094vw), 1.125rem); /* 17px phone → 18px at 1440 */
  line-height: 1.45;
  max-width: 800px;
  margin-top: 16px;
}
/* Chart map scaled to the full width, pinned to the bottom; its top fades into the light blue */
.bg-chart-bottom {
  background: var(--pale-blue) url("../images/Bkgd-Chart-bottom.webp") center bottom / 100% auto no-repeat;
}
/* ---------- Products page ---------- */
.products-main {
  padding: 64px 0 150px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr; /* every card matches the tallest one */
  gap: 34px 36px;
}
.product-card {
  display: flex;
  gap: 24px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(15, 53, 87, .10);
  padding: 22px;
  min-height: 210px; /* keeps thumbnails at least 166px tall (210 minus 22px padding top and bottom) */
}
.product-thumb {
  flex: 0 0 180px;
  overflow: hidden;
  background: #d5dbe0; /* shows when there's no thumbnail yet */
  border-radius: 4px;
}
/* The chart fills the box; on phones the wide box crops it from the centre */
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.product-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 8px;
}
.product-card h2 {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.product-card p {
  font-size: 16px;
  line-height: 1.25;
  margin: 6px 0 20px;
}
/* Buttons sit 20px below the description, sized to their text */
.product-card .btn-tan {
  width: auto;
  max-width: none;
  padding-inline: 22px;
}
/* iPad widths: nudge the photo 50px right so the boat sits further from the text */
@media (max-width: 1180px) {
  .page-hero--photo {
    background-position: right -50px center;
  }
}
@media (max-width: 959px) {
  .product-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}
@media (max-width: 720px) {
  .page-hero {
    padding: 56px 0 64px;
  }
  /* On phones the boat lands behind the text, so darken the photo there */
  .page-hero--photo {
    background-image: linear-gradient(90deg, rgba(0, 52, 72, .8) 35%, rgba(0, 52, 72, .4)), var(--hero-image);
    background-position: center, 86% center;
  }
  .page-hero-lede {
    max-width: 280px;
  }
  .products-main {
    padding: 40px 0 100px;
  }
  .product-grid {
    grid-auto-rows: auto;
  } /* cards size to their own content on phones */
  .product-card {
    flex-direction: column;
    gap: 18px;
    padding: 18px;
  }
  .product-thumb {
    flex-basis: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
  }
  .product-body {
    padding-top: 0;
  }
}
/* ---------- Chart type pages (NOAA, NGA, ...) ---------- */
.chart-type-main {
  padding: 56px 0 120px;
  text-align: center;
}
.chart-type-main .section-lede {
  font-size: clamp(1.0625rem, calc(1.041rem + 0.094vw), 1.125rem); /* 17px phone → 18px at 1440 */
  max-width: 1000px;
}
/* Grey placeholder until the interactive map is ready */
.map-placeholder {
  margin-top: 44px;
  aspect-ratio: 1108 / 579;
  background: #d5dbe0;
}
/* Three cards reuse the home page .feature-card styles */
.chart-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 30px;
}
.card-dark {
  background: var(--navy);
}
/* Chart-number search as a yellow outline box, to match the card buttons */
.chart-search--outline {
  background: #20475f;
  border-color: var(--yellow);
  max-width: 200px;
}
.chart-search--outline input::placeholder, .chart-search--outline button {
  color: var(--yellow);
}
.chart-search--outline input {
	color: var(--white);
}
.chart-search--outline:focus-within {
  border-color: var(--white);
}
.chart-type-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px 52px;
  margin-top: 100px;
}
.chart-type-cta .btn {
  font-size: 15px;
  padding: 14px 48px;
  border-radius: 6px;
}
@media (max-width: 1100px) {
  /* Fuller overlay: the text runs further across the chart at this width */
  .page-hero--chart {
    --hero-overlay: linear-gradient(90deg, #003448 45%, rgba(0, 52, 72, .82) 70%, rgba(0, 52, 72, .6));
  }
  .chart-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .page-hero--chart {
    --hero-overlay: linear-gradient(rgba(0, 52, 72, .88), rgba(0, 52, 72, .88));
    padding: 64px 0 72px;
  }
  .chart-type-main {
    padding: 40px 0 90px;
  }
  .map-placeholder {
    margin-top: 30px;
    aspect-ratio: 4 / 3;
  }
  .chart-options {
    gap: 18px;
    margin-top: 18px;
  }
  .chart-type-cta {
    margin-top: 60px;
  }
}
/* ---------- Find a Chart page ---------- */
.find-main {
  padding: 70px 0 90px;
}
/* Text on the left, map on the right */
.map-search {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.map-search h2,
.keyword-search h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, calc(1.618rem + 0.563vw), 2.25rem); /* 28px phone → 34px at 1440 → 36px max */
  line-height: 1.1;
}
.map-search p {
  font-size: 18px;
  line-height: 1.4;
  margin-top: 12px;
}
.map-search .map-placeholder {
  margin-top: 0;
  aspect-ratio: 863 / 571;
}
/* Dark keyword search bar */
.keyword-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  margin-top: 30px;
  padding: 32px 48px;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
}
.keyword-search p {
  font-size: 18px;
  margin-top: 4px;
}
.keyword-search-form {
  flex: 0 1 560px;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--yellow);
  border-radius: 4px;
  background: #004a63;
}
.keyword-search-form:focus-within {
  border-color: var(--white);
}
.keyword-search-form input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--white);
  font: 18px var(--font-body);
}
.keyword-search-form input:focus {
  outline: none;
}
.keyword-search-form button {
  padding: 8px 16px;
  border: 0;
  background: none;
  color: var(--yellow);
  cursor: pointer;
}
.keyword-search-form svg {
  display: block;
  width: 22px;
  height: 22px;
}
/* Cards reuse the home page .features-grid and .feature-card styles */
.find-cards {
  margin-top: 30px;
}
/* Desktop only: the Browse card's text sits lower than the home page Article card */
@media (min-width: 1101px) {
  .find-cards .card-navy {
    padding-bottom: 90px;
  }
}
/* Two buttons stacked in one card */
.btn-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
@media (max-width: 959px) {
  .map-search {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .keyword-search {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .keyword-search-form {
    flex-basis: auto;
  }
}
@media (max-width: 720px) {
  .find-main {
    padding: 40px 0 60px;
  }
  .map-search .map-placeholder {
    aspect-ratio: 4 / 3;
  }
  .keyword-search {
    padding: 28px 24px;
  }
  .find-cards {
    margin-top: 18px;
  }
}
/* ---------- Search by Region page ---------- */
.region-main {
  padding: 64px 0 100px;
}
/* Two columns; SHOM spans three rows so NHS, Imray and SEMAR stack beside it */
.region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}
.region-card {
  position: relative;
  padding: 34px 230px 50px 34px; /* right side leaves room for the thumbnail */
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 53, 87, .10);
}
.region-card--tall {
  grid-row: span 3;
}
/* Chart thumbnail pinned to the top-right corner */
.region-thumb {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 172px;
  height: 172px;
  object-fit: cover;
  border-radius: 4px;
}
.region-thumb--placeholder {
  background: #d5dbe0;
}
.region-card-header {
  padding-bottom: 24px;
  border-bottom: 1.5px solid var(--navy);
}
.region-card-header h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.875rem, calc(1.787rem + 0.375vw), 2.25rem); /* 30px phone → 34px at 1440 → 36px max */
  line-height: 1.1;
  color: var(--navy);
}
.region-card-header p {
  font-size: 18px;
  margin-top: 4px;
}
.region-list {
  margin-top: 28px;
}
/* Reaches a little past the divider, toward the thumbnail, as in the design */
.region-list--two-columns {
  columns: 2;
  column-gap: 28px;
  margin-right: -40px;
}
.region-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  line-height: 1.125em;
  letter-spacing: 0;
  break-inside: avoid;
}
/* Font Awesome Solid location-arrow, tinted mint */
.region-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 14px;
  background: var(--mint);
  -webkit-mask: url("../images/icon-location-arrow.svg") no-repeat center / contain;
  mask: url("../images/icon-location-arrow.svg") no-repeat center / contain;
}
.region-list a {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 15px;
  color: var(--blue);
  text-decoration: none;
}
.region-list a:hover,
.region-list a:focus-visible {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 0.08em; /* the font's own underline is hairline-thin */
  text-underline-offset: 0.18em;
}
/* Below 1320 the longest links no longer fit two cards side by side, so they stack */
@media (max-width: 1319px) {
  .region-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .region-card--tall {
    grid-row: auto;
  }
  /* Stacked full width, the tall card's long list fits in two columns again */
  .region-card--tall .region-list {
    columns: 2;
    column-gap: 28px;
  }
}
@media (max-width: 720px) {
  .region-card--tall .region-list {
    columns: 1;
  }
}
@media (max-width: 720px) {
  .region-main {
    padding: 40px 0 60px;
  }
  /* Smaller thumbnail; only the title area makes room for it */
  .region-card {
    padding: 26px 24px 36px;
  }
  .region-thumb {
    top: 16px;
    right: 16px;
    width: 88px;
    height: 88px;
  }
  .region-card-header {
    padding-right: 96px;
    min-height: 88px;
  }
  /* Too narrow for two columns on phones */
  .region-list--two-columns {
    columns: 1;
    margin-right: 0;
  }
}
/* ---------- Region chart list pages (Pacific Coast, ...) ---------- */
/* Map section reuses .map-search; the list reuses .region-list bullets */
.chart-list-card {
  margin-top: 56px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 53, 87, .10);
}
.chart-list-heading {
  padding: 26px 58px;
  background: var(--tan-light);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, calc(1.368rem + 0.563vw), 2rem); /* 24px phone → 30px at 1440 → 32px max */
  line-height: 1.15;
  color: var(--navy);
}
.chart-list {
  columns: 2;
  column-gap: 48px;
  margin: 0;
  padding: 36px 58px 46px;
}
@media (max-width: 959px) {
  .chart-list {
    columns: 1;
  }
}
@media (max-width: 720px) {
  .chart-list-card {
    margin-top: 36px;
  }
  .chart-list-heading {
    padding: 22px 24px;
  }
  .chart-list {
    padding: 26px 24px 32px;
  }
}
/* ---------- Chart page (individual chart) ---------- */
/* Yellow subtitle under the hero heading */
.page-hero-subtitle {
  margin-top: 16px;
}
.chart-detail-main {
  padding: 88px 0 100px;
}
.chart-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  align-items: stretch;
}
.chart-version {
  position: relative;
  padding: 40px 40px 56px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 53, 87, .10);
}
/* "100% Up-to-Date" badge hanging off the top-right corner */
.chart-version-badge {
  position: absolute;
  top: -28px;
  right: -22px;
  width: 175px;
  height: 175px;
  transform: rotate(8deg);
}
.chart-version-header h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, calc(1.868rem + 0.563vw), 2.5rem); /* 32px phone → 38px at 1440 → 40px max */
  line-height: 1.1;
  color: var(--navy);
}
.chart-version-label {
  margin-top: 8px;
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
}
.not-updated {
  color: var(--red);
}
/* "Learn More" with a hover/focus explanation box */
.tip {
  position: relative;
  display: inline-block;
  margin-left: 10px;
  text-transform: none;
  letter-spacing: .035em;
}
.tip-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: 14px var(--font-body);
  cursor: help;
}
/* Font Awesome Solid circle-info */
.tip-trigger::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("../images/icon-circle-info.svg") no-repeat center / contain;
  mask: url("../images/icon-circle-info.svg") no-repeat center / contain;
}
.tip-box {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 5; /* above the badge */
  width: 320px;
  padding: 18px 20px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(15, 53, 87, .18);
  color: var(--navy);
  font: 15px/1.4 var(--font-body);
  letter-spacing: .035em;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.tip:hover .tip-box,
.tip:focus-within .tip-box {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
/* Chart preview: click to open the zoom popup */
.chart-preview {
  position: relative;
  display: block;
  width: 100%;
  max-width: 442px;
  margin-top: 22px;
  padding: 0;
  border: 1px solid #8a9aa3;
  background: none;
  cursor: zoom-in;
}
.chart-preview img {
  width: 100%;
}
.chart-preview-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 39, 56, .75) url("../images/magnifying-glass.svg") no-repeat center / 30px;
  transform: translate(-50%, -50%);
  transition: background-color .15s;
}
.chart-preview:hover .chart-preview-icon,
.chart-preview:focus-visible .chart-preview-icon {
  background-color: var(--navy);
}
/* Buy Now with the note beside it */
.chart-buy {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.chart-buy .btn {
  flex-shrink: 0;
}
.chart-buy p {
  max-width: 200px;
  font-size: 13px;
  font-style: italic;
  line-height: 1.3;
}
.chart-agent {
  margin-top: 14px;
}
.chart-agent a {
  margin-left: 4px;
  color: var(--blue);
  font: 700 14px var(--font-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration-thickness: 0.08em; /* Brother 1816's own underline is hairline-thin */
  text-underline-offset: 0.18em;
}
.chart-specs {
  margin-top: 26px;
  font-size: 19px;
  line-height: 1.55;
}
.chart-notes {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1.5px solid var(--blue);
  line-height: 1.3;
}
.chart-notes p + p {
  margin-top: 16px;
}
/* Zoom popup */
.chart-zoom {
  width: min(1200px, 92vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.chart-zoom::backdrop {
  background: rgba(0, 39, 56, .8);
}
.chart-zoom-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.chart-zoom-frame {
  max-height: calc(92vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
}
.chart-zoom-frame img {
  display: block;
  width: 100%;
  cursor: zoom-in;
}
/* Zoomed in: show the chart at twice the popup width and pan around */
.chart-zoom.is-zoomed .chart-zoom-frame {
  cursor: grab;
  touch-action: none;
}
.chart-zoom.is-zoomed .chart-zoom-frame img {
  width: 200%;
  max-width: none;
  cursor: zoom-out;
}
.chart-zoom-hint {
  padding: 12px 20px;
  font-size: 14px;
  color: #5c6b73;
}
@media (max-width: 1100px) {
  .chart-versions {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
}
@media (max-width: 720px) {
  .chart-detail-main {
    padding: 56px 0 70px;
  }
  .chart-version {
    padding: 30px 24px 40px;
  }
  .chart-version-badge {
    top: -24px;
    right: -10px;
    width: 104px;
    height: 104px;
  }
  .chart-version-header h2 {
    padding-right: 80px;
  }
  /* Box spans the card instead of centring on the link, so it can't run off the screen */
  .chart-version-header {
    position: relative;
  }
  .tip {
    position: static;
    display: block;
    margin: 6px 0 0;
  }
  .tip-box {
    left: 0;
    right: 0;
    width: auto;
    transform: translateY(4px);
  }
  .tip:hover .tip-box,
  .tip:focus-within .tip-box {
    transform: translateY(0);
  }
  .chart-buy {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .chart-buy p {
    max-width: none;
  }
  .chart-specs {
    font-size: 17px;
  }
}
/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  border-top: 8px solid var(--blue);
  box-shadow: inset 0 3px 0 var(--white);
  padding: 60px 0;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
}
.footer-links {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 32px 32px;
  padding-right: 20px;
}
.footer-products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .25);
  padding-right: 40px;
}
.footer-products h3 {
  grid-column: 1 / -1;
}
.site-footer h3 {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b9c9d4;
  margin-bottom: 12px;
}
.site-footer li {
  margin-bottom: 4px;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
.footer-partners {
  grid-column: 1 / -1;
  display: flex;
  gap: 24px;
  border-top: 1px solid rgba(255, 255, 255, .25);
  padding-top: 28px;
}
.partner-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
}
.footer-brand {
  border-left: 1px solid rgba(255, 255, 255, .25);
  padding-left: 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.footer-brand img {
  width: 230px;
}
.footer-brand address {
  line-height: 1.6;
}
.copyright {
  color: #8ea3b2;
  font-size: 12px;
}
/* ---------- Responsive ---------- */
/* Below 1440 the boat crowds the one-line intro: wrap it and shift the photo */
@media (max-width: 1439px) {
  .hero {
    background-position: 40% 35%;
  }
  .hero-lede {
    max-width: 380px;
    margin-inline: auto;
  }
}
/* Below 1280 there isn't room beside the heading, so centre the badge above it */
@media (max-width: 1279px) {
  .badge {
    position: static;
    margin: 0 auto 40px;
    transform: none;
  }
}
@media (max-width: 1359px) {
  .footer-products {
    white-space: normal;
  }
}
@media (max-width: 1100px) {
  .search-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .search-option {
    position: relative;
  }
  .search-option:nth-child(3) {
    border-left: 0;
  }
  /* Horizontal rule between the rows, inset like the vertical ones and meeting them in a cross */
  .search-option:nth-child(-n+2) {
    padding-bottom: 40px;
  }
  .search-option:nth-child(n+3) {
    padding-top: 40px;
  }
  .search-option:nth-child(n+3)::before {
    content: "";
    position: absolute;
    top: 0;
    height: 1.5px;
    background: #c9d6de;
  }
  .search-option:nth-child(3)::before {
    left: 40px;
    right: 0;
  }
  .search-option:nth-child(4)::before {
    left: 0;
    right: 40px;
  }
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Full-width card: wide photo with the yacht off to the left, text centred over open water */
  .card-navy {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 420px;
    background-image: var(--card-image-wide, url("../images/yacht-in-ocean-horizontal.webp"));
    background-position: center;
    justify-content: center;
    padding-bottom: 50px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand {
    border-left: 0;
    padding-left: 0;
  }
}
/* Below 960 the full menu no longer fits on one line beside the logo */
@media (max-width: 959px) {
  .site-header .container {
    padding: 0 0 0 12px;
    align-items: stretch;
    gap: 0;
  }
  .logo {
    align-self: center;
    padding-block: 6px;
  }
  .logo img {
    height: 48px;
  }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 71px;
    border: 0;
    padding-top: 8px;
    background: var(--sky);
    color: var(--blue);
    font: 700 11px var(--font-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
  }
  .menu-icon, .menu-icon::before, .menu-icon::after {
    display: block;
    width: 36px;
    height: 3px;
    background: currentColor;
  }
  .menu-icon {
    position: relative;
    margin-top: 4px;
  }
  .menu-icon::before, .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-icon::before {
    top: -8px;
  }
  .menu-icon::after {
    top: 8px;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--sky);
  }
  .main-nav.is-open {
    display: flex;
  }
  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
  }
  .main-nav a:last-child {
    border-bottom: 0;
  }
  /* Dropdowns become accordions inside the mobile menu */
  .nav-item {
    flex-wrap: wrap;
    align-self: auto;
    border-bottom: 1px solid var(--rule);
  }
  .main-nav .nav-item > a {
    flex: 1;
    border-bottom: 0;
  }
  .nav-dropdown-toggle {
    width: 44px;
    height: 44px;
    margin-right: -16px;
  }
  .nav-dropdown-toggle svg {
    width: 12px;
    height: 8px;
  }
  .nav-item.is-open .nav-dropdown-toggle svg {
    transform: rotate(180deg);
  }
  .nav-dropdown {
    position: static;
    flex-basis: 100%;
    width: auto;
    padding: 0;
    border-top: 1px solid var(--rule);
    animation: none;
  }
  .nav-dropdown li {
    padding-left: 16px;
  }
}
@media (max-width: 720px) {
  :root {
    --gutter: 30px;
  }
  /* Hero */
  .hero {
    padding: 80px 0 85px;
    background-position: 22% 50%;
  }
  .hero .eyebrow {
    max-width: 240px;
    margin-inline: auto;
  }
  .hero-cta {
    margin-top: 32px;
  }
  .btn-yellow {
    min-width: 200px;
    padding: 14px 20px;
  }
  .compass {
    width: 80px;
    height: 80px;
    top: 8px;
    right: calc(100% - 16px);
  }
  /* Search panel sits below the hero instead of overlapping it */
  .search-panel-wrap {
    margin-top: 40px;
  }
  .search-panel {
    grid-template-columns: 1fr;
    row-gap: 0;
    margin-inline: 11px;
    padding: 3px 26px;
  }
  .search-option {
    padding: 40px 0;
  }
  .search-option:nth-child(n+3)::before {
    content: none;
  } /* phones use border-top instead */
  .search-option + .search-option {
    border-left: 0;
    border-top: 1.5px solid var(--rule);
  }
  /* Difference */
  .difference {
    padding: 50px 0 60px;
  }
  .badge {
    width: 210px;
    height: 210px;
    margin: 0 auto 30px;
  }
  /* Feature cards */
  .features {
    padding-bottom: 50px;
  }
  .features-grid, .feature-stack {
    gap: 18px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-photo {
    aspect-ratio: 315 / 223;
  }
  .feature-card {
    padding: 60px 30px;
  }
  .feature-card .card-eyebrow {
    color: #b5c9bf;
  }
  .feature-card h3 {
    line-height: 1.1;
    max-width: 250px;
  }
  .feature-card .btn {
    min-width: 200px;
    padding-block: 11px;
  }
  .card-navy {
    grid-row: auto;
    min-height: 530px;
    padding-bottom: 60px;
    background-image: var(--card-image, url("../images/yacht-in-ocean.webp"));
    background-position: center top;
    justify-content: flex-end;
  }
  /* Footer: everything stacked, partners and brand centred */
  .site-footer {
    padding: 57px 0 50px;
  }
  .site-footer h3 {
    color: #b5c9bf;
    margin-bottom: 10px;
  }
  .site-footer li {
    margin-bottom: 0;
    line-height: 21px;
  }
  .footer-grid {
    gap: 55px;
  }
  .footer-links, .footer-products {
    grid-template-columns: 1fr;
  }
  .footer-links {
    gap: 40px 0;
    padding-right: 0;
  }
  .footer-products {
    border-right: 0;
    padding-right: 0;
    white-space: normal;
  }
  .footer-partners {
    justify-content: center;
    gap: 48px;
    border-top: 1px solid var(--blue);
    border-bottom: 1px solid var(--blue);
    padding: 22px 0;
  }
  .footer-brand {
    gap: 40px;
  }
  .footer-brand img {
    width: 215px;
  }
  .footer-brand address {
    line-height: 21px;
  }
}