/*
Theme Name: MM0ZIF
Theme URI: https://mm0zif.radio/current/
Author: Marcus Hazel-McGown
Author URI: https://mm0zif.radio/current/about/
Description: A station-console and field-journal theme for MM0ZIF and MM0ZIF_WX. Warm editorial pages for the journal, a dark data-dense dashboard for live weather from Marybank, Isle of Lewis.
Version: 0.1.7
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mm0zif
Tags: block-theme, full-site-editing, blog, news, custom-colors, wide-blocks
*/

/* ==========================================================================
   MM0ZIF design system
   A station-console / field-journal visual system.
   ========================================================================== */

:root {
  --ink: #0a1f28;
  --ink-2: #14323b;
  --navy: #0b2b35;
  --navy-deep: #071b22;
  --deep: #0a3b45;
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --aurora: #2dd4bf;
  --sea: #dff1ec;
  --sand: #f7f2e7;
  --paper: #fffdf8;
  --white: #ffffff;
  --muted: #5a6b70;
  --muted-2: #7b8a8e;
  --line: #e2ded2;
  --line-strong: #cfc9ba;
  --amber: #b45309;
  --amber-bright: #f59e0b;
  --rain: #2f6f9f;
  --danger: #b91c1c;
  --shadow: 0 1px 2px rgba(10, 31, 40, 0.04), 0 12px 32px -12px rgba(10, 31, 40, 0.18);
  --shadow-lg: 0 2px 4px rgba(10, 31, 40, 0.05), 0 24px 64px -24px rgba(10, 31, 40, 0.35);
  --radius: 18px;
  --radius-lg: 24px;
  --radius-sm: 12px;
  --wrap: 1240px;
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Reset ------------------------------------------------------------------ */
*,
*::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: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 1.1em;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--aurora);
  color: var(--navy-deep);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

/* Layout ----------------------------------------------------------------- */
.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.section {
  padding-block: clamp(56px, 7vw, 92px);
}

.section-tight {
  padding-block: clamp(36px, 5vw, 64px);
}

.section-alt {
  background: var(--sand);
}

.section-dark {
  background: var(--navy);
  color: #e7f4f1;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 999;
  padding: 12px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 10px;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.16);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

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

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover {
  background: #0b5f59;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--sea);
  border-color: var(--teal);
}

.btn-light {
  background: #fff;
  color: var(--ink);
}

.btn-outline-light {
  background: transparent;
  color: #e7f4f1;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
  background: var(--sea);
  border-color: var(--teal);
}

/* Top bar ---------------------------------------------------------------- */
.topbar {
  background: var(--navy-deep);
  color: #b9d6d1;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
}

.topbar-loc,
.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.topbar-loc .icon {
  width: 14px;
  height: 14px;
  color: var(--aurora);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.units {
  display: inline-flex;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.units button {
  min-width: 34px;
  padding: 3px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.units button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  box-shadow: 0 4px 12px -4px rgba(10, 31, 40, 0.45);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.brand-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--sea);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.18s ease, color 0.18s ease;
}

.nav a:hover {
  background: var(--sea);
}

.nav a.active {
  background: var(--ink);
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.menu-btn {
  display: none;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.search-panel.open {
  display: block;
}

.search-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 16px;
}

.search-inner input {
  flex: 1;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.search-inner input::placeholder {
  color: var(--muted-2);
}

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 6.5vw, 88px) 0 clamp(40px, 5vw, 64px);
  background: linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%);
}

.hero-isobars {
  position: absolute;
  inset: -20% -10% auto auto;
  width: min(900px, 75vw);
  height: auto;
  opacity: 0.9;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.hero h1 {
  max-width: 13ch;
  margin: 0 0 20px;
  font-size: clamp(40px, 5.4vw, 68px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 50ch;
  margin: 0;
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0 38px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  min-width: 70px;
}

.hero-stats dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-stats dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Conditions card -------------------------------------------------------- */
.conditions-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #0d3541 0%, #071b22 100%);
  color: #eaf6f2;
  box-shadow: var(--shadow-lg);
}

.conditions-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 80% 10%, #000 0%, transparent 70%);
  pointer-events: none;
}

.conditions-card > * {
  position: relative;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.card-place {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: #cfe3e0;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.1);
  color: #9fe3d8;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-pill .dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.temp-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 20px 0 20px;
}

.temp {
  font-family: var(--font-display);
  font-size: clamp(58px, 7vw, 78px);
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.temp .deg {
  margin-left: 2px;
  font-size: 0.36em;
  font-weight: 500;
  letter-spacing: 0;
  color: #9fc4bf;
}

.condition {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-bottom: 6px;
  text-align: right;
}

.condition .icon {
  width: 28px;
  height: 28px;
  color: #9fe3d8;
}

.condition strong {
  font-size: 15px;
  font-weight: 600;
}

.condition .muted {
  font-size: 11px;
  color: #9fc4bf;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.mini-grid > div {
  padding: 10px 12px;
  background: rgba(7, 27, 34, 0.72);
}

.mini-grid span {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.mini-grid strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.mini-grid small {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 400;
  color: #9fc4bf;
}

.forecast-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.fc-day {
  text-align: center;
}

.fc-day span {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.fc-day .icon {
  width: 22px;
  height: 22px;
  margin: 6px auto;
  color: #9fe3d8;
}

.fc-day strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fc-day small {
  display: block;
  font-size: 10px;
  color: #9fc4bf;
}

.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9fe3d8;
  font-size: 13px;
  font-weight: 600;
}

.card-link .icon {
  transition: transform 0.18s ease;
}

.card-link:hover .icon {
  transform: translateX(3px);
}

/* Quick strip ------------------------------------------------------------ */
.quick-strip {
  padding-bottom: clamp(36px, 5vw, 56px);
  background: var(--paper);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.quick-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.quick-card .q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quick-card .icon {
  width: 18px;
  height: 18px;
  color: var(--teal);
}

.quick-card h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.quick-card .value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.quick-card .sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.quick-card .q-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
}

.quick-card.webcam {
  padding: 0;
  overflow: hidden;
  position: relative;
  background: var(--navy);
}

.quick-card.webcam img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.quick-card.webcam .webcam-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  min-height: 148px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(7, 27, 34, 0.05), rgba(7, 27, 34, 0.88));
  color: #fff;
}

.quick-card.webcam h3 {
  color: #9fe3d8;
}

.quick-card.webcam .value {
  color: #fff;
  font-size: 17px;
}

/* Section headers -------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-size: clamp(30px, 3.4vw, 44px);
}

.section-head p {
  max-width: 52ch;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.section-head .link-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
}

.section-head .link-more .icon {
  transition: transform 0.18s ease;
}

.section-head .link-more:hover .icon {
  transform: translateX(3px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.chip:hover {
  border-color: var(--teal);
}

.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Posts ------------------------------------------------------------------ */
.featured-post {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.featured-post:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.featured-post .thumb {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background: var(--sea);
}

.featured-post .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.featured-post:hover .thumb img {
  transform: scale(1.03);
}

.featured-post .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.4vw, 44px);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-meta .cat {
  color: var(--teal);
}

.featured-post h3 {
  margin: 0 0 12px;
  font-size: clamp(25px, 2.8vw, 36px);
  line-height: 1.08;
}

.featured-post p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15.5px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.post-card .thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sea);
}

.post-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.post-card:hover .thumb img {
  transform: scale(1.045);
}

/* The title link stretches over the whole card, so the card can stay an
   article without nesting the category link inside another anchor. */
.post-card,
.featured-post {
  position: relative;
}

.card-title-link {
  color: inherit;
}

.card-title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-title-link:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
}

.post-card:focus-within,
.featured-post:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.post-meta .cat {
  position: relative;
  z-index: 2;
}

.post-card .body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
}

.post-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.18;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.post-card .more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
}

.post-card .more .icon {
  width: 14px;
  height: 14px;
}

/* Video row -------------------------------------------------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: var(--navy);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

.video-card:hover .video-thumb img {
  transform: scale(1.04);
  opacity: 1;
}

.video-thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 27, 34, 0.55));
}

.video-thumb .play span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.video-card:hover .play span {
  transform: scale(1.08);
}

.video-thumb .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.video-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.video-card .post-meta {
  margin: 0;
  color: var(--muted);
}

/* Topic hubs ------------------------------------------------------------- */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  overflow: hidden;
  padding: 24px;
  border-radius: 20px;
  background: var(--navy);
  color: #e7f4f1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:nth-child(2) {
  background: #0a3b45;
}

.topic-card:nth-child(3) {
  background: #123a4a;
}

.topic-card:nth-child(4) {
  background: #1a3f3b;
}

.topic-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.topic-card::before {
  content: "";
  position: absolute;
  right: -30%;
  top: -30%;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.035),
    0 0 0 56px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.topic-card > * {
  position: relative;
}

.topic-card .count {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}

.topic-card h3 {
  margin: 6px 0 8px;
  font-size: 22px;
  color: #fff;
}

.topic-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(231, 244, 241, 0.72);
}

.topic-card .topic-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 700;
  color: #9fe3d8;
}

/* About ------------------------------------------------------------------ */
.about-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.about-photo {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  background: var(--sea);
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 3.6vw, 46px);
}

.about-copy p {
  color: var(--muted);
  font-size: 16px;
}

.signature {
  margin: 24px 0 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.signature span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--teal);
}

/* Support ---------------------------------------------------------------- */
.support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(45, 212, 191, 0.18), transparent 45%),
    linear-gradient(135deg, #0a3b45 0%, #071b22 100%);
  color: #e7f4f1;
}

.support h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  color: #fff;
}

.support p {
  max-width: 56ch;
  margin: 0;
  color: rgba(231, 244, 241, 0.75);
  font-size: 15px;
}

.support-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
}

/* Footer ----------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(48px, 6vw, 80px);
  padding: 56px 0 24px;
  background: var(--navy-deep);
  color: #cfe3e0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand .brand-name {
  color: #fff;
}

.footer-brand .brand-badge {
  background: rgba(45, 212, 191, 0.14);
  color: #9fe3d8;
}

.footer-brand p {
  max-width: 34ch;
  margin: 16px 0 20px;
  font-size: 14px;
  color: #9fbdb9;
}

.social {
  display: flex;
  gap: 8px;
}

.social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  color: #cfe3e0;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.social a:hover {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.5);
  color: #fff;
}

.social .icon {
  width: 16px;
  height: 16px;
}

.footer-col h3 {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: #cfe3e0;
  transition: color 0.18s ease;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #8fb0ac;
}

.footer-bottom a {
  color: #b9d6d1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-bottom a:hover {
  color: #fff;
}

/* ==========================================================================
   Article
   ========================================================================== */

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 3px;
  background: var(--aurora);
  transition: width 0.1s linear;
}

.article-hero {
  padding: clamp(32px, 5vw, 56px) 0 0;
  background: linear-gradient(180deg, var(--sand), var(--paper));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.breadcrumbs .sep {
  color: var(--line-strong);
}

.article-header {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.article-header .post-meta {
  justify-content: center;
  margin-bottom: 14px;
}

.article-header h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.article-standfirst {
  max-width: 62ch;
  margin: 0 auto 24px;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}

.article-byline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--muted);
}

.article-byline img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.article-byline strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.article-byline .byline-meta {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-figure {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.article-figure img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.article-figure figcaption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.article-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 720px);
  gap: clamp(32px, 5vw, 64px);
  justify-content: center;
  padding-block: clamp(40px, 6vw, 72px);
}

.toc {
  position: sticky;
  top: 104px;
  align-self: start;
}

.toc h2 {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc li a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  margin-left: -1px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.toc li a:hover,
.toc li a.active {
  border-left-color: var(--teal);
  color: var(--ink);
}

.toc .toc-cta {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.toc .toc-cta strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.article-body {
  font-size: 18px;
  line-height: 1.72;
  color: #1d343c;
}

.article-body > p:first-child {
  font-size: 20px;
  line-height: 1.6;
  color: var(--ink-2);
}

.article-body h2 {
  margin: 2.2em 0 0.6em;
  font-size: clamp(26px, 3vw, 34px);
  scroll-margin-top: 110px;
}

.article-body h3 {
  margin: 1.8em 0 0.5em;
  font-size: 21px;
  scroll-margin-top: 110px;
}

.article-body a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.article-body li {
  margin-bottom: 0.5em;
}

.article-body li::marker {
  color: var(--teal);
  font-weight: 700;
}

.article-body strong {
  font-weight: 700;
  color: var(--ink);
}

.article-body blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  border-left: 3px solid var(--aurora);
  border-radius: 0 14px 14px 0;
  background: var(--sea);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.article-body blockquote p:last-child {
  margin-bottom: 0;
}

.article-body figure {
  margin: 2em 0;
}

.article-body figure img {
  border-radius: 14px;
}

.article-body figcaption {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.article-body table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  font-size: 14.5px;
}

.article-body th,
.article-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.article-body th {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--sand);
}

.article-body td {
  font-variant-numeric: tabular-nums;
}

.callout {
  display: flex;
  gap: 14px;
  margin: 2em 0;
  padding: 20px 22px;
  border: 1px solid #bfe3dc;
  border-radius: 14px;
  background: #f0faf7;
}

.callout .icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--teal);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 16px;
}

.callout p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.diagram {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.diagram svg {
  width: 100%;
  height: auto;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.tag {
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.feedback strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
}

.feedback span {
  font-size: 12px;
  color: var(--muted);
}

.feedback-actions {
  display: flex;
  gap: 8px;
}

.feedback-actions button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.feedback-actions button:hover {
  background: var(--sea);
  border-color: var(--teal);
}

.author-box {
  display: flex;
  gap: 18px;
  margin-top: 40px;
  padding: 24px;
  border-radius: 16px;
  background: var(--sand);
}

.author-box img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.author-box h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.author-box p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.author-box .about-links {
  margin-top: 0;
}

.related {
  padding-block: clamp(48px, 6vw, 80px);
  background: var(--sand);
}

.related .post-grid {
  grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Station dashboard
   ========================================================================== */

.station {
  background: var(--navy-deep);
  color: #e7f4f1;
}

.station .site-header {
  background: rgba(7, 27, 34, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.station .brand-name {
  color: #fff;
}

.station .brand-badge {
  background: rgba(45, 212, 191, 0.14);
  color: #9fe3d8;
}

.station .nav a {
  color: #cfe3e0;
}

.station .nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.station .nav a.active {
  background: var(--aurora);
  color: #062a2a;
}

.station .icon-btn {
  color: #cfe3e0;
  border-color: rgba(255, 255, 255, 0.18);
}

.station .icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(45, 212, 191, 0.6);
}

.station .btn-ghost {
  color: #e7f4f1;
  border-color: rgba(255, 255, 255, 0.22);
}

.station .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(45, 212, 191, 0.6);
}

.station .search-panel {
  background: var(--navy-deep);
  border-top-color: rgba(255, 255, 255, 0.08);
}

.station .search-inner input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.station-main {
  padding-bottom: clamp(48px, 6vw, 80px);
}

.station-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) 0 28px;
  background:
    radial-gradient(circle at 82% 20%, rgba(45, 212, 191, 0.13), transparent 42%),
    linear-gradient(180deg, #0a2a34 0%, var(--navy-deep) 100%);
}

.station-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}

.station-hero .wrap {
  position: relative;
}

.station-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}

.station-hero .lede {
  max-width: 60ch;
  color: #a9c9c4;
}

.station-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8fb0ac;
}

.station-status-row .status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9fe3d8;
}

.station-status-row .dot {
  width: 7px;
  height: 7px;
}

.station-status-row .sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.span-12 {
  grid-column: span 12;
}

.span-8 {
  grid-column: span 8;
}

.span-6 {
  grid-column: span 6;
}

.span-4 {
  grid-column: span 4;
}

.span-3 {
  grid-column: span 3;
}

.station-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.station-card h2,
.station-card h3 {
  margin: 0;
  color: #fff;
}

.station-card h2 {
  font-size: 22px;
}

.station-card h3 {
  font-size: 17px;
}

.station-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.station-card .card-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8fb0ac;
}

.station-card .card-label {
  color: #8fc7c0;
}

.current-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 22px;
}

.current-main .temp {
  color: #fff;
  font-size: clamp(64px, 8vw, 92px);
}

.current-main .condition {
  align-items: flex-start;
  padding-bottom: 8px;
  text-align: left;
}

.current-main .condition strong {
  font-size: 18px;
  color: #fff;
}

.current-main .condition .muted {
  color: #9fc4bf;
}

.current-main .condition .icon {
  width: 34px;
  height: 34px;
  color: #9fe3d8;
}

.station-data-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.station-data-grid > div {
  padding: 12px;
  background: rgba(7, 27, 34, 0.72);
}

.station-data-grid .label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.station-data-grid .value {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.station-data-grid .unit {
  font-size: 10px;
  font-weight: 400;
  color: #9fc4bf;
}

.station-data-grid .sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: #9fc4bf;
}

.compass-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.compass {
  width: min(240px, 100%);
  height: auto;
}

.compass text {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.webcam-card {
  padding: 0;
}

.webcam-card .webcam-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0a242c;
}

.webcam-card .webcam-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.webcam-card .webcam-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(7, 27, 34, 0.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.webcam-card .webcam-badge .dot {
  width: 6px;
  height: 6px;
}

.webcam-card .webcam-body {
  padding: 16px 18px 18px;
}

.webcam-card .webcam-body p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8fb0ac;
}

.forecast-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.forecast-day {
  padding: 14px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(7, 27, 34, 0.5);
  text-align: center;
}

.forecast-day .day {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.forecast-day .icon {
  width: 26px;
  height: 26px;
  margin: 10px auto;
  color: #9fe3d8;
}

.forecast-day .temps {
  display: flex;
  justify-content: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.forecast-day .temps .low {
  color: #8fb0ac;
  font-weight: 500;
}

.forecast-day .wind,
.forecast-day .rain {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #9fc4bf;
}

.chart-legend {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fc4bf;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
}

.chart {
  width: 100%;
  height: auto;
  margin-top: 8px;
}

.tide-list {
  list-style: none;
}

.tide-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.tide-list li:last-child {
  border-bottom: 0;
}

.tide-list .tide-type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfe3e0;
}

.tide-list .tide-type .icon {
  width: 15px;
  height: 15px;
  color: #9fe3d8;
}

.tide-list .tide-height {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.almanac-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.almanac-grid > div {
  padding: 12px;
  background: rgba(7, 27, 34, 0.72);
}

.almanac-grid .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.almanac-grid .value {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.almanac-grid .sub {
  display: block;
  font-size: 10px;
  color: #9fc4bf;
}

.strike-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
}

.strike-main .label {
  display: block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8fc7c0;
}

.strike-time {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.strike-main .sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: #9fc4bf;
}

.strike-badge {
  padding: 4px 8px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.strike-scale {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.5), rgba(255, 255, 255, 0.08));
}

.strike-scale-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: #f59e0b;
  opacity: 0.75;
}

.strike-scale-mark {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border: 2px solid #f59e0b;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.strike-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: #8fb0ac;
}

.kp-scale {
  display: flex;
  gap: 4px;
  margin: 16px 0 10px;
}

.kp-scale span {
  flex: 1;
  height: 26px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #8fb0ac;
  font-family: var(--font-mono);
  font-size: 9px;
  display: grid;
  place-items: center;
}

.kp-scale span.on {
  background: var(--aurora);
  color: #062a2a;
  font-weight: 600;
}

.health-list {
  list-style: none;
}

.health-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
}

.health-list li:last-child {
  border-bottom: 0;
}

.health-list .source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfe3e0;
}

.health-list .source .dot {
  width: 6px;
  height: 6px;
}

.health-list .when {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #8fb0ac;
}

.data-note {
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #8fb0ac;
}

.data-note strong {
  color: #cfe3e0;
}

.data-note a {
  color: #9fe3d8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Footer on station pages */
.station .site-footer {
  margin-top: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1120px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .nav.open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 18px 32px -18px rgba(10, 31, 40, 0.3);
  }

  .station .nav.open {
    background: var(--navy-deep);
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .nav.open a {
    padding: 12px 14px;
  }

  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .station-data-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .forecast-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 16ch;
  }

  .conditions-card {
    max-width: 620px;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post .thumb {
    min-height: 260px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    max-width: 420px;
    aspect-ratio: 1 / 1;
  }

  .support {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-col:last-child {
    display: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: 2;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
  }

  .toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-left: 0;
  }

  .toc li a {
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    margin-left: 0;
  }

  .toc li a:hover,
  .toc li a.active {
    border-color: var(--teal);
  }

  .toc .toc-cta {
    display: none;
  }

  .article-body {
    order: 1;
  }

  .span-8,
  .span-4,
  .span-6,
  .span-3 {
    grid-column: span 12;
  }

  .forecast-row {
    grid-template-columns: repeat(7, minmax(110px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .station-data-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .topbar-loc {
    display: none;
  }

  .topbar-inner {
    justify-content: flex-end;
  }

  .header-inner {
    min-height: 68px;
  }

  .header-actions .btn {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .hero-stats {
    gap: 18px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-card {
    min-height: 132px;
  }

  .quick-card.webcam .webcam-overlay {
    min-height: 132px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .post-grid,
  .video-grid,
  .related .post-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 180px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-col:last-child {
    display: block;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-header {
    text-align: left;
  }

  .article-header .post-meta,
  .article-byline {
    justify-content: flex-start;
  }

  .article-figure {
    width: calc(100% - 32px);
  }

  .article-figure img {
    border-radius: 14px;
  }

  .article-body {
    font-size: 17px;
  }

  .article-body > p:first-child {
    font-size: 18px;
  }

  .feedback {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-box {
    flex-direction: column;
  }

  .station-hero h1 {
    font-size: clamp(32px, 9vw, 46px);
  }

  .current-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .current-main .condition {
    align-items: flex-start;
  }

  .station-data-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .forecast-row {
    grid-template-columns: repeat(4, minmax(110px, 1fr));
  }

  .station-card {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: auto;
  }

  .quick-card.webcam .webcam-overlay {
    min-height: 160px;
  }

  .mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .forecast-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .support-actions {
    width: 100%;
  }

  .support-actions .btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Fallback shown when the station plugin is not active. */
.station-notice {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.station-notice h1 {
  margin-bottom: 12px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.station-notice p {
  color: var(--muted);
}

/* Astronomy table (shortcode [mm0zif_astronomy]) ------------------------- */
.astro-table-wrap {
  margin: 1.75rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.astro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.astro-table caption {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
}

.astro-table th,
.astro-table td {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.astro-table th {
  background: var(--sand);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

.astro-table tbody tr:nth-child(even) {
  background: rgba(10, 31, 40, 0.02);
}

.astro-table tbody tr:last-child td {
  border-bottom: 0;
}

.astro-table .astro-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: nowrap;
}

.astro-table .astro-phase {
  min-width: 11rem;
}

.astro-table .astro-muted {
  color: var(--muted);
}

@media (max-width: 640px) {
  .astro-table {
    font-size: 0.88rem;
  }

  .astro-table th,
  .astro-table td {
    padding: 0.45rem 0.6rem;
  }
}