:root {
  color-scheme: light;
  --ink: #17333a;
  --muted: #61757a;
  --line: #d8e4e4;
  --paper: #ffffff;
  --wash: #f4f8f7;
  --sea: #087f8c;
  --sea-dark: #075d68;
  --sun: #f2aa3b;
  --coral: #ee6b4d;
  --shadow: 0 12px 32px rgba(20, 67, 75, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
main { min-height: 70vh; }

.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 72px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { border-radius: 8px; }
.brand span { display: grid; line-height: 1.25; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.site-header nav { display: flex; gap: 24px; font-size: 14px; font-weight: 600; }
.site-header nav a:hover { color: var(--sea); }

.breadcrumbs { width: min(1180px, calc(100% - 40px)); margin: 18px auto 0; color: var(--muted); font-size: 13px; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #9caeb1; }
.breadcrumbs a:hover { color: var(--sea); }

.page-grid, .listing-layout { width: min(1180px, calc(100% - 40px)); margin: 22px auto 72px; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.content-column { min-width: 0; }
.page-intro, .listing-intro { padding: 38px 0 30px; border-bottom: 1px solid var(--line); }
.listing-intro { width: min(1180px, calc(100% - 40px)); margin: 22px auto 0; }
.index-intro { padding-top: 48px; }
.eyebrow { margin: 0 0 8px; color: var(--sea); font-size: 13px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(32px, 5vw, 52px); line-height: 1.16; letter-spacing: 0; }
h2 { margin: 0; font-size: 24px; line-height: 1.3; letter-spacing: 0; }
.lead { max-width: 780px; margin: 18px 0 0; color: #36545a; font-size: 18px; line-height: 1.8; }
.update-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

.metric-band { display: grid; grid-template-columns: repeat(3, 1fr); margin: 30px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.metric-band > div { min-width: 0; padding: 24px; background: var(--paper); }
.metric-band > div + div { border-left: 1px solid var(--line); }
.metric-band span, .metric-band em { display: block; color: var(--muted); font-size: 13px; font-style: normal; }
.metric-band strong { display: block; margin: 5px 0 2px; color: var(--sea-dark); font-size: 35px; line-height: 1.2; }
.metric-band strong small { margin-left: 4px; font-size: 13px; font-weight: 600; }

.content-section { padding: 38px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading > span, .section-heading > a { color: var(--muted); font-size: 13px; }
.section-heading > a { color: var(--sea); font-weight: 700; }
.tide-chart { width: 100%; margin: 0 0 20px; border-radius: 8px; overflow: hidden; background: var(--wash); }
.tide-chart svg { display: block; width: 100%; aspect-ratio: 720 / 220; min-height: 180px; }
.tide-chart text { fill: var(--muted); font-size: 11px; }
.chart-axis { stroke: #a9bec1; stroke-width: 1; }
.chart-grid { stroke: #d9e7e7; stroke-width: 1; stroke-dasharray: 5 5; }
.chart-area { fill: rgba(8,127,140,.13); }
.chart-line { fill: none; stroke: var(--sea); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.tide-chart circle { fill: var(--paper); stroke: var(--coral); stroke-width: 3; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
thead th { background: var(--wash); color: var(--muted); font-size: 12px; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th span, tbody th small, tbody td small { display: block; }
tbody th small, tbody td small { color: var(--muted); font-size: 12px; font-weight: 400; }
.compact-table { max-width: 520px; }
.forecast-table th:first-child { min-width: 116px; }
.forecast-table td:last-child { white-space: normal; min-width: 210px; }

.catch-band { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 8px 28px; margin: 10px 0; padding: 28px; color: #fff; background: var(--sea-dark); border-radius: 8px; }
.catch-band .eyebrow { color: #a6e7df; }
.catch-band p { margin: 4px 0 0; font-size: 19px; font-weight: 700; }
.catch-band small { grid-column: 2; color: #c7e1e2; }
.prose p:not(.eyebrow) { margin: 14px 0 0; color: #405d62; font-size: 16px; }
.safety-section ul { margin: 20px 0 0; padding-left: 22px; }
.safety-section li + li { margin-top: 8px; }
.nearby-section { padding: 38px 0 0; }
.link-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.link-grid a { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; font-weight: 700; }
.link-grid a:hover { border-color: var(--sea); color: var(--sea); }
.link-grid small { color: var(--muted); font-weight: 500; }

.qr-panel { position: sticky; top: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); text-align: center; }
.qr-panel .eyebrow { text-align: left; }
.qr-panel h2 { margin-bottom: 16px; text-align: left; font-size: 20px; }
.qr-panel img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.qr-panel p:not(.eyebrow) { margin: 14px 0 8px; color: var(--muted); font-size: 13px; }
.qr-panel strong { font-size: 14px; }

.station-list { display: grid; gap: 14px; }
.station-card { padding: 24px; border: 1px solid var(--line); border-radius: 8px; }
.station-card > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.station-card h2 { font-size: 21px; }
.station-code { margin: 0; color: var(--muted); font-size: 12px; order: 2; }
.station-card dl { display: grid; grid-template-columns: repeat(2, 1fr); margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.station-card dl div { padding: 12px 0; }
.station-card dl div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.station-card dt { color: var(--muted); font-size: 12px; }
.station-card dd { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.station-card dd small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.station-card > p { color: var(--muted); font-size: 13px; }
.text-link { color: var(--sea); font-size: 14px; font-weight: 800; }
.city-list, .province-list { display: grid; gap: 12px; }
.city-row, .province-row { display: grid; grid-template-columns: 1fr auto 28px; align-items: center; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; }
.city-row:hover, .province-row:hover { border-color: var(--sea); box-shadow: var(--shadow); }
.city-row span:first-child, .province-row span:first-child { display: grid; }
.city-row small, .province-row small { color: var(--sea); font-size: 12px; }
.city-row strong, .province-row strong { font-size: 21px; }
.city-row > span:nth-child(2), .province-row > span:nth-child(2) { color: var(--muted); font-size: 13px; }
.city-row b, .province-row b { color: var(--sea); font-size: 22px; }

.site-footer { padding: 32px max(20px, calc((100% - 1180px) / 2)); color: #cbd9da; background: #17333a; font-size: 13px; }
.site-footer > div { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.site-footer strong { color: #fff; font-size: 17px; }
.site-footer p { margin: 12px 0 0; }
.site-footer a { text-decoration: underline; }

@media (max-width: 860px) {
  .page-grid, .listing-layout { grid-template-columns: 1fr; gap: 30px; }
  .qr-panel { position: static; max-width: 360px; }
}

@media (max-width: 620px) {
  .header-inner, .breadcrumbs, .page-grid, .listing-layout, .listing-intro { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand small, .site-header nav a:last-child { display: none; }
  .site-header nav { gap: 14px; }
  .page-intro, .listing-intro { padding: 24px 0; }
  h1 { font-size: 34px; }
  h2 { font-size: 21px; }
  .lead { font-size: 16px; }
  .metric-band { grid-template-columns: 1fr; }
  .metric-band > div { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 17px 18px; }
  .metric-band > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .metric-band strong { grid-row: span 2; grid-column: 2; font-size: 28px; }
  .metric-band em { max-width: 180px; }
  .catch-band { grid-template-columns: 1fr; padding: 22px; }
  .catch-band small { grid-column: 1; }
  .link-grid { grid-template-columns: 1fr; }
  .city-row, .province-row { grid-template-columns: 1fr 20px; padding: 19px; }
  .city-row > span:nth-child(2), .province-row > span:nth-child(2) { grid-column: 1; }
  .city-row b, .province-row b { grid-column: 2; grid-row: 1 / span 2; }
  th, td { padding: 13px; }
}
