:root {
  color-scheme: light;
  font-family: "Inter", system-ui, sans-serif;
  font-synthesis: none;
  --background: hsl(200, 20%, 98%);
  --foreground: hsl(210, 80%, 25%);
  --card: hsl(200, 30%, 99%);
  --primary: hsl(195, 100%, 50%);
  --primary-dark: hsl(210, 85%, 40%);
  --primary-light: hsl(200, 80%, 55%);
  --accent: hsl(175, 70%, 45%);
  --accent-light: hsl(175, 65%, 55%);
  --secondary: hsl(200, 25%, 94%);
  --secondary-foreground: hsl(210, 50%, 25%);
  --muted: hsl(200, 20%, 96%);
  --muted-foreground: hsl(210, 20%, 50%);
  --border: hsl(200, 30%, 90%);
  --tides: hsl(205, 85%, 45%);
  --tides-bg: hsl(205, 85%, 97%);
  --waves: hsl(190, 80%, 42%);
  --waves-bg: hsl(190, 80%, 97%);
  --wind: hsl(220, 70%, 50%);
  --wind-bg: hsl(220, 70%, 97%);
  --weather: hsl(195, 75%, 45%);
  --weather-bg: hsl(195, 75%, 97%);
  --fishing: hsl(175, 70%, 40%);
  --fishing-bg: hsl(175, 70%, 97%);
  --astronomy: hsl(260, 60%, 55%);
  --astronomy-bg: hsl(260, 60%, 97%);
  --gradient-ocean: linear-gradient(135deg, var(--tides) 0%, var(--accent) 100%);
  --gradient-action: linear-gradient(to right, var(--primary), var(--primary-dark));
  --card-surface: linear-gradient(180deg, var(--card) 0%, var(--background) 100%);
  --card-shadow: 0 4px 20px -2px hsl(205 85% 45% / .08);
  --chart-tides: var(--tides);
  --chart-waves: var(--waves);
  --chart-waves-swell: hsl(190, 96%, 29%);
  --chart-waves-significant: hsl(214, 88%, 39%);
  --chart-waves-period: hsl(32, 88%, 48%);
  --chart-wind: var(--wind);
  --chart-weather: var(--weather);
  --chart-fishing: hsl(168, 88%, 29%);
  --chart-astronomy: var(--astronomy);
  --chart-gusts: var(--accent);
  --chart-sun: hsl(45, 70%, 50%);
  --chart-tides-fill-start: hsl(205 85% 45% / .15);
  --chart-tides-fill-end: hsl(205 85% 45% / .005);
  --chart-waves-fill-start: hsl(190 80% 42% / .15);
  --chart-waves-fill-end: hsl(190 80% 42% / .005);
  --chart-waves-swell-fill-start: hsl(190 96% 29% / .92);
  --chart-waves-swell-fill-end: hsl(190 96% 29% / .72);
  --chart-waves-significant-fill-start: hsl(214 88% 39% / .9);
  --chart-waves-significant-fill-end: hsl(214 88% 39% / .7);
  --chart-waves-period-fill-start: hsl(32 88% 48% / .2);
  --chart-waves-period-fill-end: hsl(32 88% 48% / .02);
  --chart-wind-fill-start: hsl(220 70% 50% / .15);
  --chart-wind-fill-end: hsl(220 70% 50% / .005);
  --chart-weather-fill-start: hsl(195 75% 45% / .15);
  --chart-weather-fill-end: hsl(195 75% 45% / .005);
  --chart-fishing-fill-start: hsl(168 88% 29% / .92);
  --chart-fishing-fill-end: hsl(168 88% 29% / .74);
  --chart-astronomy-fill-start: hsl(260 60% 55% / .13);
  --chart-astronomy-fill-end: hsl(260 60% 55% / .005);
  --chart-sun-fill-start: hsl(45 70% 50% / .15);
  --chart-sun-fill-end: hsl(45 70% 50% / .005);
  --chart-gusts-fill-start: hsl(175 70% 45% / .15);
  --chart-gusts-fill-end: hsl(175 70% 45% / .005);
  --chart-ink: var(--foreground);
  --chart-muted: var(--muted-foreground);
  --chart-grid: hsl(200 30% 90% / .55);
  --chart-white: hsl(0, 0%, 100%);
  --chart-now: var(--primary-dark);
  --chart-now-line: hsl(205 85% 45% / .58);
  --current-hour-bg: hsl(204 100% 97%);
  --ocean-glow: hsl(195 100% 50% / .12);
  --turquoise-glow: hsl(175 70% 45% / .1);
  --moon-sky: hsl(222, 45%, 13%);
  --moon-star: hsl(0 0% 100% / .65);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 74px;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

h1, h2, h3 {
  margin: 0;
  color: var(--foreground);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.forecast-header {
  position: relative;
  isolation: isolate;
  padding: 22px 0 39px;
  background: radial-gradient(ellipse 55% 70% at 95% 5%, var(--turquoise-glow), transparent 80%), radial-gradient(ellipse 46% 60% at 3% 83%, var(--ocean-glow), transparent 80%), linear-gradient(150deg, hsl(205, 55%, 94%) 0%, hsl(195, 55%, 97%) 53%, var(--background) 100%);
}

.forecast-header__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  color: var(--card);
  pointer-events: none;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 46px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--foreground);
  font: 800 20px/1 "Plus Jakarta Sans", system-ui, sans-serif;
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 39px;
  height: 39px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
}

.brand__title {
  font: 700 20px/1 "Plus Jakarta Sans", system-ui, sans-serif;
}

.brand-row__status {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.location-layout {
  display: grid;
  gap: 30px;
  align-items: end;
}

.location-intro__eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.location-intro h1 {
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
}

.location-intro p {
  margin: 10px 0 9px;
  color: var(--muted-foreground);
  font-size: 15px;
}

.station {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
}

.location-tools {
  min-width: 0;
}

.location-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  border: 1px solid hsla(200, 30%, 90%, 0.8);
  border-radius: 9999px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.location-search:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px hsla(195, 100%, 50%, 0.12), var(--card-shadow);
}

.location-search > svg {
  color: var(--primary-dark);
}

.location-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 15px;
}

.location-search input::placeholder {
  color: var(--muted-foreground);
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.search-results a, .search-results button, .search-results__state {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  text-decoration: none;
}

.search-results a {
  justify-content: space-between;
  gap: 12px;
}

.search-results__flag {
  width: 22px;
  height: auto;
  flex: 0 0 auto;
  border-radius: 1px;
  object-fit: contain;
}

.search-results__country {
  flex: 0 0 auto;
  color: var(--muted-foreground);
  font-size: 12px;
  text-align: right;
}

.search-results__text {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
}

.search-results a:hover, .search-results a:focus-visible, .search-results a.is-active, .search-results button:hover, .search-results button:focus-visible {
  background: var(--tides-bg);
  outline: none;
}

.search-results a span, .search-results button span, .search-results__state {
  color: var(--muted-foreground);
  font-size: 12px;
}

.search-results__state {
  justify-content: center;
  cursor: default;
}

.popular-locations {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 11px;
  padding: 2px 1px 7px;
  scrollbar-width: thin;
}

.popular-locations__label {
  flex: 0 0 auto;
  align-self: center;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.popular-locations button,
.popular-locations a {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
  color: var(--secondary-foreground);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.popular-locations button:hover,
.popular-locations a:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
}

.popular-locations button.is-active,
.popular-locations a.is-active {
  border-color: transparent;
  background: var(--gradient-ocean);
  color: var(--chart-white);
}

.current-panel {
  margin-top: 34px;
  padding: 21px;
  border: 1px solid hsla(200, 30%, 90%, 0.5);
  border-radius: 1rem;
  background: var(--card-surface);
  box-shadow: var(--card-shadow);
}

.current-panel__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 17px;
}

.current-panel__heading span, .range-row__label {
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.current-panel__heading h2 {
  margin-top: 3px;
  font-size: 19px;
}

.current-panel__heading small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.current-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  align-items: start;
  min-width: 0;
  padding: 13px;
  background: var(--card);
}

.current-item__label, .current-item__value {
  min-width: 0;
}

.current-item__label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-item svg {
  flex: 0 0 auto;
  color: var(--primary-dark);
}

.current-item span {
  color: var(--muted-foreground);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.current-item strong {
  overflow: hidden;
  color: var(--foreground);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.current-item small {
  overflow: hidden;
  max-width: 100%;
  color: var(--muted-foreground);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.range-row {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.range-row > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.range-row small {
  color: var(--muted-foreground);
  font-size: 11px;
}

.range-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--card);
}

.range-control button {
  min-height: 37px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.range-control button:hover:not(.is-active) {
  background: var(--tides-bg);
  color: var(--primary-dark);
}

.range-control button.is-active {
  background: var(--gradient-action);
  color: var(--chart-white);
}

.range-control__app {
  display: flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: 5px;
  padding: 0 9px;
  border-left: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.range-control__app svg {
  color: var(--accent);
}

.range-control__app:hover, .range-control__app:focus-visible {
  background: var(--tides-bg);
  color: var(--foreground);
}

.forecast-context {
  display: grid;
  gap: 16px;
  align-items: center;
  margin-top: 24px;
}

.forecast-context__copy h2 {
  font-size: 22px;
}

.forecast-context__copy p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
  line-height: 1.6;
}

.location-map {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 1fr);
  align-items: stretch;
  align-self: start;
  overflow: hidden;
  border: 1px solid hsla(200, 30%, 90%, 0.5);
  border-radius: 1rem;
  background: var(--card-surface);
  box-shadow: var(--card-shadow);
}

.location-map__image {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 240px;
  background: var(--tides-bg);
}

.location-map__image .leaflet-container {
  width: 100%;
  height: 240px;
}

.location-map__image .leaflet-control-attribution {
  margin: 0 6px 6px 0 !important;
  padding: 2px 5px !important;
  border-radius: 3px;
  background: hsl(0 0% 100% / .92);
  box-shadow: 0 1px 5px hsl(210 25% 20% / .14);
  color: hsl(210 30% 30%) !important;
  font: 400 10px/1.2 Arial, sans-serif !important;
  white-space: nowrap;
}

.location-map__image .leaflet-control-attribution a,
.location-map__image .leaflet-control-zoom a {
  display: inline !important;
  width: auto;
  height: auto;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: hsl(205 80% 35%) !important;
  font: inherit !important;
  line-height: inherit !important;
  text-decoration: none;
}

.location-map__image .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid hsl(0 0% 0% / .2) !important;
  border-radius: 4px;
}

.location-map__image .leaflet-control-zoom a {
  display: block !important;
  width: 26px !important;
  height: 26px !important;
  color: hsl(210 30% 20%) !important;
  font: 700 18px/26px Arial, sans-serif !important;
  text-align: center;
}

.location-map__image .leaflet-popup-close-button {
  display: none;
}

.leaflet-marker-hightide {
  display: grid;
  place-items: start center;
  background: none;
  border: 0;
}

.leaflet-marker-hightide span {
  display: block;
  width: 26px;
  height: 26px;
  border: 3px solid var(--card);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 4px 12px hsl(210 80% 25% / .28);
  transform: rotate(-45deg);
}

.leaflet-marker-hightide span::after {
  display: block;
  width: 8px;
  height: 8px;
  margin: 6px;
  border-radius: 50%;
  background: var(--card);
  content: "";
}

.leaflet-marker-hightide--location span { background: var(--primary-dark); }
.leaflet-marker-hightide--station span { background: var(--accent); }

.location-map__image > img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 512px;
  height: 512px;
  max-width: none;
  transform: translate(-50%, -50%);
}

.location-map__marker {
  position: absolute;
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--card);
  border-radius: 50%;
  color: var(--card);
  box-shadow: 0 2px 7px hsla(210, 80%, 25%, 0.28);
  transform: translate(-50%, -50%);
}

.location-map__marker--place {
  background: var(--primary-dark);
}

.location-map__marker--station {
  background: var(--accent);
}

.location-map__credit {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: var(--foreground);
  background: hsla(0, 0%, 100%, 0.85);
  font-size: 7px;
}

.location-map__details {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 13px 17px;
}

.location-map__details > div {
  display: flex;
  align-items: start;
  gap: 9px;
}

.location-map__entry {
  min-width: 0;
}

.location-map__role {
  display: block;
  color: var(--muted-foreground);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.location-map__details strong, .location-map__details small {
  display: block;
}

.location-map__details strong {
  margin-top: 2px;
  color: var(--foreground);
  font-size: 12px;
}

.location-map__details small {
  margin-top: 2px;
  color: var(--muted-foreground);
  font-size: 10px;
}

.location-map__key {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
}

.location-map__key--place {
  background: var(--primary-dark);
}

.location-map__key--station {
  background: var(--accent);
}

.section-nav-sentinel {
  height: 1px;
  margin-bottom: -1px;
}

.section-nav {
  position: sticky;
  z-index: 15;
  top: 0;
  background: var(--card);
  transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.section-nav--stuck {
  background: hsla(0, 0%, 100%, 0.8);
  box-shadow: 0 5px 22px hsla(205, 85%, 30%, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.section-nav__scroll {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-top: 8px;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.section-nav__links, .section-nav__ranges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.section-nav__links {
  margin-right: auto;
}

.section-nav__ranges {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.section-nav__scroll::-webkit-scrollbar {
  display: none;
}

.section-nav a {
  flex: 0 0 auto;
  padding: 9px 13px;
  border-radius: 9999px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.section-nav__ranges button {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.section-nav__ranges button:hover, .section-nav__ranges button:focus-visible {
  background: var(--tides-bg);
  color: var(--foreground);
}

.section-nav__ranges button.is-active {
  background: var(--gradient-action);
  color: var(--chart-white);
}

.section-nav a:hover, .section-nav a:focus-visible {
  color: var(--foreground);
  background: var(--tides-bg);
}

.section-nav a[aria-current=location] {
  background: var(--tides-bg);
  color: var(--primary-dark);
  font-weight: 700;
}

.section-nav__location {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  margin-right: 3px;
}

.section-nav__location::after {
  width: 1px;
  height: 19px;
  margin-left: 7px;
  background: var(--border);
  content: "";
}

.section-nav__location-toggle {
  padding: 9px 7px;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  color: var(--foreground);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.section-nav__location-toggle:hover, .section-nav__location-toggle:focus-visible {
  background: var(--tides-bg);
}

.section-nav__location-toggle span {
  margin-left: 3px;
  color: var(--primary-dark);
}

.section-nav__location-picker {
  position: absolute;
  z-index: 25;
  top: calc(100% + 5px);
  left: max(16px, (100vw - 1080px) / 2);
  width: min(440px, 100vw - 32px);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: 0 10px 32px hsla(210, 80%, 25%, 0.15);
}

.section-nav__location-picker .popular-locations {
  max-height: 78px;
}

.forecast-sections {
  overflow: clip;
  background: var(--card);
}

.forecast-section {
  position: relative;
  isolation: isolate;
  scroll-margin-top: 60px;
  padding: 58px 0;
  background: radial-gradient(ellipse 40% 45% at 90% 12%, var(--ocean-glow), transparent 85%), linear-gradient(180deg, var(--section-tint) 0%, hsl(200, 55%, 98%) 38%, var(--card) 78%);
}

.forecast-section:nth-child(even) {
  background: radial-gradient(ellipse 42% 50% at 8% 14%, var(--turquoise-glow), transparent 85%), linear-gradient(180deg, var(--section-tint) 0%, hsl(200, 55%, 98%) 42%, var(--card) 80%);
}

.forecast-section--tides {
  --section-accent: var(--tides);
  --section-tint: var(--tides-bg);
}

.forecast-section--waves {
  --section-accent: var(--waves);
  --section-tint: var(--waves-bg);
}

.forecast-section--wind {
  --section-accent: var(--wind);
  --section-tint: var(--wind-bg);
}

.forecast-section--weather {
  --section-accent: var(--weather);
  --section-tint: var(--weather-bg);
}

.forecast-section--fishing {
  --section-accent: var(--fishing);
  --section-tint: var(--fishing-bg);
}

.forecast-section--astronomy {
  --section-accent: var(--astronomy);
  --section-tint: var(--astronomy-bg);
}

.forecast-section__wave {
  position: absolute;
  top: -1px;
  left: 0;
  display: block;
  width: 100%;
  height: 60px;
  color: var(--card);
  transform: rotate(180deg);
  pointer-events: none;
}

.forecast-section:nth-child(even) .forecast-section__wave {
  transform: rotate(180deg) scaleX(-1);
}

.forecast-section > .container {
  position: relative;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
}

.section-heading__icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid hsla(200, 30%, 90%, 0.5);
  border-radius: 12px;
  background: var(--section-tint);
  color: var(--section-accent);
}

.section-heading h2 {
  font-size: 27px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted-foreground);
  font-size: 13px;
}

.primary-readings {
  margin-bottom: 16px;
}

.reading-card {
  height: 100%;
  min-height: 125px;
  padding: 20px;
  border: 1px solid hsla(200, 30%, 90%, 0.5);
  border-radius: 1rem;
  background: var(--card-surface);
  box-shadow: var(--card-shadow);
}

.reading-card span {
  display: block;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.reading-card strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--foreground);
  font: 700 25px/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.reading-card small {
  color: var(--section-accent);
  font-size: 12px;
  font-weight: 600;
}

.weather-condition {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.weather-condition svg {
  flex: 0 0 auto;
  color: var(--section-accent);
}

.reading-card strong.weather-condition {
  align-items: center;
}

.reading-card .weather-condition__text {
  display: inline;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 16px;
  padding: 11px 15px;
  border: 1px solid hsla(200, 30%, 90%, 0.5);
  border-radius: 10px;
  background: var(--card);
}

.fact-strip div {
  display: flex;
  gap: 7px;
  margin-right: 22px;
}

.fact-strip dt {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 500;
}

.fact-strip dd {
  margin: 0;
  color: var(--foreground);
  font-size: 11px;
  font-weight: 700;
}

.graph-block {
  padding: 18px 13px 13px;
  border: 1px solid hsla(200, 30%, 90%, 0.65);
  border-radius: 1rem 1rem 0 0;
  background: var(--card);
}

.graph-block__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 5px 14px;
}

.graph-block__heading h3 {
  font-size: 14px;
}

.graph-block__heading span {
  color: var(--muted-foreground);
  font-size: 10px;
}

.forecast-chart {
  width: 100%;
  height: 245px;
}

.forecast-table-wrap {
  overflow-x: auto;
  border: 1px solid hsla(200, 30%, 90%, 0.65);
  border-top: 0;
  border-radius: 0 0 1rem 1rem;
  background: var(--card);
}

.forecast-table-wrap--hourly {
  max-height: 540px;
  overflow: auto;
}

.forecast-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  font-size: 11px;
}

.forecast-table th, .forecast-table td {
  padding: 11px 14px;
  border-bottom: 1px solid hsla(200, 30%, 90%, 0.6);
  text-align: left;
  white-space: nowrap;
}

.forecast-table thead th {
  position: sticky;
  z-index: 2;
  top: 0;
  background: var(--muted);
  color: var(--secondary-foreground);
  font-weight: 700;
}

.forecast-table tbody tr.is-current-hour > th,
.forecast-table tbody tr.is-current-hour > td {
  background: var(--current-hour-bg) !important;
  border-top: 2px solid hsl(205 85% 45% / .48);
  border-bottom-color: hsl(205 85% 45% / .18);
}

.forecast-table tbody tr.is-current-hour > * {
  color: var(--foreground);
  font-weight: 700;
}

.radial-meter {
  --meter: 0%;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--meter-color, var(--primary-dark)) var(--meter), hsl(200 30% 90%) 0);
  color: var(--foreground);
  font-weight: 800;
}

.radial-meter::before {
  position: absolute;
  content: "";
}

.radial-meter > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  font-size: 11px;
}

.radial-meter--tide {
  position: relative;
}

.radial-meter--tide small {
  position: absolute;
  right: -20px;
  bottom: 3px;
  color: var(--muted-foreground);
  font-size: 9px;
  font-weight: 700;
}

.radial-meter--low { --meter-color: var(--accent); }
.radial-meter--medium { --meter-color: var(--primary-dark); }
.radial-meter--high { --meter-color: hsl(18, 85%, 54%); }
.radial-meter--sea.radial-meter--low { --meter-color: var(--waves); }
.radial-meter--sea.radial-meter--medium { --meter-color: var(--chart-waves-significant); }
.radial-meter--score { --meter-color: var(--chart-fishing); }
.radial-meter--uv.radial-meter--low { --meter-color: hsl(145 60% 42%); }
.radial-meter--uv.radial-meter--medium { --meter-color: hsl(38 90% 48%); }
.radial-meter--uv.radial-meter--high { --meter-color: hsl(18 85% 54%); }

.force-meter, .wind-direction-cell, .wave-direction-cell, .tide-type, .driver-list {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.force-meter small, .wind-direction-cell small {
  color: var(--muted-foreground);
  font-size: 10px;
}

.wave-direction-arrow {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--waves-bg);
  color: var(--waves);
  font-size: 13px;
  font-weight: 800;
  transform: rotate(var(--wave-rotation, 0deg));
  transform-origin: 50% 50%;
}

.tide-type {
  font-weight: 700;
}

.tide-type span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: var(--card);
}

.tide-type--high span { background: var(--tides); }
.tide-type--low span { background: var(--accent); }

.wind-barb {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transform: rotate(var(--wind-rotation, 0deg));
  transform-origin: 50% 50%;
}

.driver-list {
  max-width: 260px;
  flex-wrap: wrap;
}

.driver-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  cursor: help;
}

.driver-icon:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

.driver-floating-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 220px;
  padding: 7px 9px;
  border-radius: 8px;
  background: var(--foreground);
  color: var(--card);
  box-shadow: 0 8px 24px hsl(210 45% 20% / .2);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 9px));
  white-space: nowrap;
}

.driver-floating-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--foreground);
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.driver-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.driver-icon--multi {
  grid-auto-flow: column;
  width: auto;
  min-width: 34px;
  padding: 0 5px;
  gap: 2px;
  border-radius: 999px;
}

.driver-icon--multi img {
  width: 15px;
  height: 15px;
}

.driver-icon--text {
  width: auto;
  min-width: 26px;
  max-width: 130px;
  padding: 0 8px;
  border-radius: 999px;
}

.driver-icon--text span {
  overflow: hidden;
  color: var(--foreground);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-icon--pos { border-color: hsl(145 60% 45% / .35); background: hsl(145 60% 96%); }
.driver-icon--soft_neg { border-color: hsl(42 85% 52% / .35); background: hsl(42 85% 96%); }
.driver-icon--neg { border-color: hsl(8 80% 56% / .35); background: hsl(8 80% 96%); }

.forecast-table tbody th {
  color: var(--foreground);
  font-weight: 700;
}

.forecast-table tbody td {
  color: var(--secondary-foreground);
}

.forecast-table tbody tr:nth-child(even) {
  background: hsl(200, 20%, 98%);
}

.forecast-table tbody tr:last-child > * {
  border-bottom: 0;
}

.astronomy-content {
  display: grid;
  gap: 16px;
}

.moon-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.moon-panel__visual {
  display: grid;
  min-height: 230px;
  place-items: center;
  background: radial-gradient(circle at 50% 48%, hsla(255, 45%, 50%, 0.19), transparent 58%), radial-gradient(circle at 22% 22%, var(--moon-star) 0 1px, transparent 2px), radial-gradient(circle at 77% 36%, var(--moon-star) 0 1px, transparent 2px), radial-gradient(circle at 67% 75%, var(--moon-star) 0 1px, transparent 2px), var(--moon-sky);
}

.moon-illustration {
  display: block;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 1px 3px hsla(260, 25%, 18%, 0.16));
}

.moon-illustration--large {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 0 22px hsla(0, 0%, 100%, 0.23));
}

.moon-panel__details {
  padding: 28px 32px;
}

.moon-panel__eyebrow, .moon-event span {
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.moon-panel h3 {
  margin: 8px 0 19px;
  font-size: 30px;
}

.moon-panel__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--secondary-foreground);
  font-size: 12px;
  font-weight: 600;
}

.moon-panel__metrics > span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 13px;
  border: 1px solid hsla(260, 60%, 55%, 0.12);
  border-radius: 9999px;
  background: var(--astronomy-bg);
}

.moon-panel__metrics strong {
  color: var(--astronomy);
  font: 700 19px/1 "Plus Jakarta Sans", system-ui, sans-serif;
}

.moon-events {
  margin-bottom: 0;
}

.moon-event {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  min-height: 115px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
}

.moon-event > svg {
  color: var(--astronomy);
}

.moon-event div:not(.moon-event__horizon) {
  display: grid;
  gap: 5px;
}

.moon-event strong {
  color: var(--foreground);
  font: 700 28px/1.1 "Plus Jakarta Sans", system-ui, sans-serif;
}

.moon-event__horizon {
  position: absolute;
  right: -12px;
  bottom: -30px;
  width: 100px;
  height: 66px;
  border: 2px solid hsla(260, 60%, 55%, 0.17);
  border-radius: 50%;
  pointer-events: none;
}

.moon-phases {
  margin-top: 10px;
}

.moon-phases h3 {
  margin-bottom: 13px;
  font-size: 17px;
}

.moon-phases__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
}

.moon-phases__table {
  min-width: 560px;
}

.moon-phases__table td:first-child {
  width: 70px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.moon-phases__table td:first-child svg {
  vertical-align: middle;
}

.sun-times {
  margin-top: 8px;
  padding: 18px 21px;
  border-top: 1px solid var(--border);
}

.sun-times h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  color: var(--secondary-foreground);
  font-size: 15px;
}

.sun-times h3 svg {
  color: var(--primary-dark);
}

.sun-times dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.sun-times dt {
  color: var(--muted-foreground);
  font-size: 11px;
}

.sun-times dd {
  margin: 3px 0 0;
  color: var(--foreground);
  font: 700 16px/1.3 "Plus Jakarta Sans", system-ui, sans-serif;
}

.forecast-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted-foreground);
}

.forecast-error {
  margin: 18px 0 0;
  padding: 12px;
  border: 1px solid hsla(0, 70%, 70%, 0.5);
  border-radius: 8px;
  background: hsl(0, 70%, 97%);
  color: hsl(0, 60%, 35%);
  font-size: 13px;
}

.forecast-afterword {
  padding: 74px 0 110px;
  background: radial-gradient(ellipse 50% 90% at 96% 0%, var(--turquoise-glow), transparent 80%), var(--background);
}

.forecast-afterword h2 {
  font-size: 22px;
}

.forecast-about h2 {
  font-size: 25px;
}

.forecast-about h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 15px;
  border-radius: 9999px;
  background: var(--gradient-ocean);
}

.forecast-about p {
  max-width: 810px;
  margin: 12px 0 0;
  color: var(--secondary-foreground);
  font-size: 14px;
  line-height: 1.75;
}

.forecast-nearby {
  margin-top: 35px;
}

.forecast-nearby__links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.forecast-nearby__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 15px;
  border: 1px solid hsla(200, 30%, 90%, 0.8);
  border-radius: 12px;
  background: var(--card);
  color: var(--foreground);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s, transform 0.2s;
}

.forecast-nearby__links a:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: 0 8px 22px -6px hsla(205, 85%, 45%, 0.2);
  transform: translateY(-1px);
}

.forecast-nearby__links strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-nearby__links small {
  flex: 0 0 auto;
  color: var(--muted-foreground);
  font-size: 11px;
  font-weight: 700;
}

.forecast-nearby__links a span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--tides-bg);
  color: var(--primary-dark);
  font-size: 11px;
}

.forecast-app {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 32px;
  padding: 16px 0 0;
  border-top: 1px solid var(--border);
}

.forecast-app p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.5;
}

.forecast-app a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 11px 20px;
  border: 0;
  border-radius: 9999px;
  background: var(--gradient-action);
  color: var(--chart-white);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px hsla(205, 85%, 45%, 0.5);
  transition: box-shadow 0.2s, transform 0.2s;
}

.forecast-app a:hover {
  color: var(--chart-white);
  box-shadow: 0 10px 24px -8px hsla(205, 85%, 45%, 0.6);
  transform: translateY(-1px);
}

.site-footer {
  position: relative;
  padding: 28px 0;
  background: var(--foreground);
  color: var(--chart-white);
}

.site-footer__wave {
  position: absolute;
  top: -59px;
  left: 0;
  display: block;
  width: 100%;
  height: 60px;
  color: var(--foreground);
  pointer-events: none;
}

.site-footer .container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.site-footer span {
  font: 800 18px/1 "Plus Jakarta Sans", system-ui, sans-serif;
}

.site-footer p {
  margin: 0;
  color: hsla(0, 0%, 100%, 0.7);
  font-size: 11px;
}

.site-footer a {
  color: var(--chart-white);
  font-size: 11px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .forecast-header {
    padding-top: 26px;
    padding-bottom: 39px;
  }
  .location-layout {
    grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  }
  .current-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .current-item {
    padding: 16px;
  }
  .range-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .range-row > div:first-child {
    display: block;
  }
  .range-row small {
    display: block;
    margin-top: 3px;
  }
  .range-control {
    width: 420px;
  }
  .forecast-context {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .section-nav__scroll {
    justify-content: center;
  }
  .section-nav--stuck .section-nav__scroll {
    justify-content: flex-start;
  }
  .forecast-section {
    padding: 76px 0;
  }
  .forecast-chart {
    height: 310px;
  }
}
@media (min-width: 992px) {
  .container {
    max-width: 1080px;
  }
  .brand-row {
    margin-bottom: 58px;
  }
  .current-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .section-heading h2 {
    font-size: 31px;
  }
  .reading-card strong {
    font-size: 29px;
  }
  .graph-block {
    padding: 23px 20px 16px;
  }
}
@media (max-width: 575.98px) {
  .moon-panel {
    grid-template-columns: 1fr;
  }
  .moon-panel__visual {
    min-height: 180px;
  }
  .moon-illustration--large {
    width: 135px;
    height: 135px;
  }
  .moon-panel__details {
    padding: 20px;
  }
  .moon-panel h3 {
    font-size: 26px;
  }
  .sun-times {
    padding: 18px 0;
  }
  .sun-times dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand-row {
    margin-bottom: 35px;
  }
  .brand-row__status {
    display: none;
  }
  .location-intro h1 {
    font-size: 39px;
  }
  .location-layout {
    gap: 23px;
  }
  .current-panel {
    margin-top: 26px;
    padding: 15px;
  }
  .current-panel__heading {
    align-items: start;
  }
  .current-panel__heading small {
    max-width: 80px;
    text-align: right;
  }
  .current-item {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px 9px;
  }
  .current-item svg {
    display: none;
  }
  .range-control button {
    min-width: 0;
    font-size: 11px;
  }
  .range-control__app {
    gap: 4px;
    margin-left: 3px;
    padding: 0 3px;
    font-size: 10px;
  }
  .location-map {
    grid-template-columns: minmax(110px, 1fr) minmax(170px, 1fr);
  }
  .location-map__image,
  .location-map__image .leaflet-container {
    height: 220px;
  }
  .location-map__details {
    padding: 12px;
  }
  .forecast-nearby__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .forecast-app {
    align-items: flex-start;
    flex-direction: column;
  }
  .forecast-section {
    padding: 48px 0;
  }
  .forecast-section__wave {
    height: 50px;
  }
  .section-heading {
    align-items: flex-start;
  }
  .section-heading p {
    max-width: 260px;
  }
  .reading-card {
    min-height: 111px;
  }
  .forecast-chart {
    height: 220px;
  }
  .site-footer .container {
    grid-template-columns: 1fr auto;
  }
  .site-footer p {
    grid-column: 1/-1;
    grid-row: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
