:root {
  --content-max: 1440px;
  --bg: #050814;
  --bg-soft: #0c1324;
  --surface: #101b31;
  --surface-2: #14213d;
  --text: #f8fafc;
  --text-soft: #cad8ef;
  --text-muted: #8fa6ca;
  --line: rgba(150, 178, 228, 0.2);
  --brand: #4f8dff;
  --brand-strong: #2563eb;
  --brand-accent: #22d3ee;
  --ok: #16a34a;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 14px 30px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.18);

  --page-wash: rgba(6, 14, 32, 0.9);
  --bg-photo-opacity: 0.2;
  --section-bg: #0c1628;
  --hero-bg: url("hero bg 3.jpeg");
  --panel-bg: rgba(14, 26, 48, 0.94);
  --panel-bg-soft: rgba(14, 27, 52, 0.92);
  --input-bg: rgba(9, 18, 36, 0.78);
  --input-border: rgba(161, 190, 236, 0.16);
  --input-text: #f3f8ff;
  --input-placeholder: #8ca4c6;
  --label-color: #d8e8ff;
  --footer-bg: rgba(5, 10, 23, 0.55);
  --section-space-y: clamp(3.5rem, 6vw, 5.5rem);
  --section-space-y-lg: clamp(4rem, 7vw, 6.5rem);
  --stack-gap: clamp(2.5rem, 5vw, 4rem);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f9fc;
  --text: #062642;
  --text-soft: #1d3557;
  --text-muted: #4a6a8a;
  --line: rgba(12, 75, 134, 0.14);

  --page-wash: rgba(255, 255, 255, 0.94);
  --bg-photo-opacity: 0.1;
  --section-bg: #ffffff;
  --panel-bg: #ffffff;
  --panel-bg-soft: #ffffff;
  --input-bg: rgba(255, 255, 255, 0.94);
  --input-border: rgba(12, 75, 134, 0.22);
  --input-text: #062642;
  --input-placeholder: #5d7a9a;
  --label-color: #0e2c4c;
  --footer-bg: rgba(7, 28, 56, 0.92);
  --shadow-lg: 0 16px 38px rgba(12, 60, 110, 0.12);
  --shadow-md: 0 10px 22px rgba(12, 60, 110, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  font-family: "Inter", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Decorative water photo — kept subtle; solid wash on top for readable text */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url("water bg image.avif") center / cover no-repeat;
  opacity: var(--bg-photo-opacity);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--page-wash);
  pointer-events: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon-inline {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

.container {
  width: min(var(--content-max), 94%);
  margin-inline: auto;
}

.hero .container,
.community-section .container,
.about-section .container,
.contact-section .container,
.map-section .container {
  width: min(1520px, 94%);
}

.bg-orb {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  filter: blur(70px);
  opacity: 0.22;
}

[data-theme="light"] .bg-orb {
  opacity: 0.06;
}

.bg-orb-1 {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: #3b82f6;
  left: -120px;
  top: 100px;
}

.bg-orb-2 {
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: #06b6d4;
  right: -120px;
  top: 40px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 12px 0;
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid rgba(155, 184, 232, 0.12);
  border-radius: 999px;
  background: rgba(13, 23, 42, 0.68);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.18);
  margin: -10px 0;
}

[data-theme="light"] .brand-logo {
  border-color: rgba(15, 32, 64, 0.12);
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.brand h1 {
  margin: 0;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  font-family: "Manrope", sans-serif;
  line-height: 1.1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  transition: 0.2s ease;
}

.nav-links a:hover {
  color: #fff;
  border-color: rgba(186, 215, 255, 0.3);
  background: rgba(79, 141, 255, 0.12);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--brand-strong);
  border: 2px solid #1e40af;
  box-shadow: none;
}

.nav-cta:hover {
  background: #1d4ed8;
  border-color: #1e3a8a;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(48px, 7vw, 80px) 0;
  background: transparent;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.10), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(79, 141, 255, 0.10), transparent 46%);
}

[data-theme="light"] .hero-bg-overlay {
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.45), transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(186, 224, 245, 0.50), transparent 46%),
    radial-gradient(circle at 50% 105%, rgba(125, 211, 252, 0.32), transparent 55%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

/* ===== Dark mode (default): solid navy cards ===== */
.hero-content {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 3.6vw, 44px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(8, 28, 64, 0.78) 0%, rgba(11, 42, 92, 0.72) 50%, rgba(15, 60, 120, 0.72) 100%),
    var(--hero-bg) center / cover no-repeat;
  background-color: #0a1f44;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.40);
  color: #ffffff;
  text-align: left;
  max-width: none;
}

.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(20px, 2.6vw, 30px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(140deg, #0a1530 0%, #0c1a3a 65%, #0a1530 100%);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.38);
  color: #ffffff;
}

.hero-content::after,
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 0%, rgba(186, 230, 253, 0.10), transparent 48%),
    radial-gradient(circle at 100% 100%, rgba(34, 211, 238, 0.08), transparent 50%);
  z-index: 0;
}

.hero-content > *,
.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #b6e8ff;
  background: rgba(8, 30, 68, 0.7);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
}

.hero h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 16ch;
  text-wrap: balance;
  color: #f4faff;
  text-shadow:
    0 2px 22px rgba(0, 10, 28, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 56ch;
  color: #e6f1ff;
  font-size: clamp(1rem, 1.7vw, 1.1rem);
  font-weight: 500;
  line-height: 1.62;
  text-shadow: 0 1px 8px rgba(0, 8, 24, 0.55);
}

.hero-mini-stats h3 {
  color: #ffffff;
}

.hero-mini-stats p {
  color: rgba(232, 241, 255, 0.82);
}

/* Light-mode hero text — dark navy on light glass cards. */
[data-theme="light"] .hero-chip {
  color: #075985;
  background: rgba(186, 230, 253, 0.55);
  border-color: rgba(14, 116, 144, 0.30);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
}

[data-theme="light"] .hero h2 {
  color: #062642;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.45);
}

[data-theme="light"] .hero-copy {
  color: #1d3557;
  text-shadow: none;
}

[data-theme="light"] .hero-mini-stats h3 {
  color: #062642;
  text-shadow: none;
}

[data-theme="light"] .hero-mini-stats p {
  color: #34618c;
}

[data-theme="light"] .hero-mini-stats article {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(125, 211, 252, 0.40);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-actions {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
}

.hero-actions .btn {
  gap: 8px;
}

.btn,
.btn-submit,
.btn-comment,
.btn-like,
.btn-discuss {
  cursor: pointer;
  font: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 11px 18px;
  font-weight: 700;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--brand-strong);
  color: #fff;
  border-color: #1e40af;
  box-shadow: none;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1e3a8a;
}

.btn-ghost {
  color: #deebff;
  border: 2px solid rgba(155, 184, 232, 0.45);
  background: rgba(17, 31, 56, 0.5);
}

.btn-ghost:hover {
  background: rgba(32, 51, 85, 0.75);
  border-color: rgba(186, 215, 255, 0.55);
}

.hero-mini-stats {
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: none;
  text-align: left;
}

.hero-mini-stats article {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(13, 32, 64, 0.7);
}

.hero-mini-stats h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.05;
}

.hero-mini-stats p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== Hero panel (TDS Quality Scale) ===== */
.hero-panel-head {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #f0f9ff;
}

.hero-panel-head .icon-inline {
  width: 18px;
  height: 18px;
  color: #67e8f9;
}

.hero-panel-head h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.012em;
  color: #f0f9ff;
  text-shadow: 0 2px 12px rgba(8, 47, 92, 0.45);
}

.hero-panel-copy {
  margin: 10px 0 18px;
  color: #cfe6fb;
  font-size: 0.92rem;
  line-height: 1.55;
}

.tds-scale {
  display: grid;
  gap: 6px;
}

.tds-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  box-shadow:
    0 6px 14px rgba(8, 24, 56, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.tds-band .range {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.tds-band .label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0.95;
}

.tds-note {
  margin: 16px 0 0;
  color: #b8d3ee;
  font-size: 0.82rem;
  line-height: 1.55;
}

/* Light mode hero-content card: the water/hand photo plays behind a
   soft white vignette so the dark navy headline stays crisp on the
   left while the photo is visible on the right + edges of the card. */
[data-theme="light"] .hero-content {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background:
    radial-gradient(ellipse 70% 85% at 25% 50%,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(232, 244, 252, 0.32) 45%,
      transparent 78%),
    linear-gradient(155deg,
      rgba(214, 236, 248, 0.28) 0%,
      rgba(186, 224, 245, 0.22) 50%,
      rgba(125, 211, 252, 0.18) 100%),
    var(--hero-bg) center / cover no-repeat;
  background-color: rgba(214, 236, 248, 0.22);
  box-shadow: 0 8px 24px rgba(8, 24, 56, 0.08);
  color: #062642;
}

/* Right-side TDS panel keeps clean light glass (no photo behind it,
   since the colored TDS bands need a calm backdrop). */
[data-theme="light"] .hero-panel {
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: linear-gradient(155deg,
      rgba(255, 255, 255, 0.58) 0%,
      rgba(220, 238, 250, 0.48) 50%,
      rgba(186, 224, 245, 0.42) 100%);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 8px 24px rgba(8, 24, 56, 0.08);
  color: #062642;
}

[data-theme="light"] .hero-content::after,
[data-theme="light"] .hero-panel::after {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.30), transparent 48%),
    radial-gradient(circle at 100% 100%, rgba(125, 211, 252, 0.18), transparent 50%);
}

[data-theme="light"] .hero-panel-head,
[data-theme="light"] .hero-panel-head h3 {
  color: #062642;
  text-shadow: none;
}

[data-theme="light"] .hero-panel-head .icon-inline {
  color: #0c4b86;
}

[data-theme="light"] .hero-panel-copy {
  color: #1d3557;
}

[data-theme="light"] .tds-note {
  color: #34618c;
}

/* TDS scale bands (hero panel) + live form indicator keep gradients */
.tds-band.excellent,
.tds-indicator.excellent { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.tds-band.good,
.tds-indicator.good { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; }
.tds-band.fair,
.tds-indicator.fair { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.tds-band.poor,
.tds-indicator.poor { background: linear-gradient(135deg, #f97316, #ea580c); color: #fff; }
.tds-band.bad,
.tds-indicator.bad { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }

/* Feed / modal badges — solid pills with icons (no emoji) */
.tds-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px 7px 10px;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
  border: 1px solid transparent;
}

.tds-badge-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tds-badge-icon svg {
  width: 18px;
  height: 18px;
}

.tds-badge-text strong {
  font-weight: 800;
  font-size: 0.95rem;
}

.tds-badge-sep {
  opacity: 0.45;
  font-weight: 500;
}

.tds-badge.excellent { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.45); }
.tds-badge.good      { background: rgba(34, 197, 94, 0.18);  color: #86efac; border-color: rgba(74, 222, 128, 0.45); }
.tds-badge.fair      { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border-color: rgba(251, 191, 36, 0.45); }
.tds-badge.poor      { background: rgba(249, 115, 22, 0.18); color: #fdba74; border-color: rgba(251, 146, 60, 0.45); }
.tds-badge.bad       { background: rgba(239, 68, 68, 0.18);  color: #fca5a5; border-color: rgba(248, 113, 113, 0.45); }

[data-theme="light"] .tds-badge.excellent { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
[data-theme="light"] .tds-badge.good      { background: #dcfce7; color: #166534; border-color: #86efac; }
[data-theme="light"] .tds-badge.fair      { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
[data-theme="light"] .tds-badge.poor      { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
[data-theme="light"] .tds-badge.bad       { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }

.community-section {
  padding: var(--section-space-y-lg) 0;
  background: var(--section-bg);
}

.community-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-gap);
  align-items: start;
}

.panel {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--panel-bg);
  backdrop-filter: blur(10px) saturate(110%);
  -webkit-backdrop-filter: blur(10px) saturate(110%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: clamp(20px, 2.5vw, 28px);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 1.25rem;
}

.panel-kicker {
  margin: 0 0 2px;
  font-size: 0.74rem;
  color: var(--brand-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.panel h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.012em;
}

.title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.title-with-icon .icon-inline {
  width: 18px;
  height: 18px;
  color: #91b4ff;
}

.panel-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.feed-controls {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--input-text);
  padding: 10px 11px;
  font: inherit;
  outline: none;
  transition: 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(125, 170, 252, 0.45);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.feed-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.feed-card {
  border: none;
  border-radius: 16px;
  background: var(--panel-bg);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.feed-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.card-header,
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card-header {
  padding: 16px 18px 8px;
  border-bottom: none;
}

.card-body {
  padding: 8px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-footer {
  padding: 8px 18px 16px;
  border-top: none;
  background: transparent;
}

.card-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 0;
}

.card-location-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.card-location-icon svg {
  width: 16px;
  height: 16px;
}

.card-date {
  color: var(--text-muted);
  font-size: 0.76rem;
  white-space: nowrap;
  font-weight: 500;
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-bg-soft);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.meta-chip-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  color: var(--brand-strong);
}

.meta-chip-icon svg {
  width: 14px;
  height: 14px;
}

.card-comment {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 10px;
  border-left: 3px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.05);
  border-top: none;
  border-right: none;
  border-bottom: none;
}

.card-photos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.card-photos img {
  width: 100%;
  height: 88px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.card-photos img:hover {
  transform: scale(1.02);
}

.card-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.card-author-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
}

.card-author-icon svg {
  width: 15px;
  height: 15px;
}

.card-actions {
  display: inline-flex;
  gap: 8px;
}

.btn-like,
.btn-discuss {
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--panel-bg);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.btn-like:hover,
.btn-discuss:hover {
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--text);
  background: rgba(56, 189, 248, 0.08);
}

.btn-like.liked {
  border-color: rgba(22, 163, 74, 0.55);
  color: #166534;
  background: #dcfce7;
}

.discuss-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.comment-author-icon {
  display: inline-flex;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.comment-author-icon svg {
  width: 14px;
  height: 14px;
}

.modal-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  font-weight: 700;
}

.modal-location-icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: var(--brand-accent);
}

.modal-location-icon svg {
  width: 16px;
  height: 16px;
}

.modal-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.comments-section h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comments-section-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--brand-accent);
}

.comments-section-icon svg {
  width: 18px;
  height: 18px;
}

.like-pop {
  animation: likePop 0.35s ease;
}

@keyframes likePop {
  0% { transform: scale(1); }
  42% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.load-more-container {
  margin-top: 16px;
  text-align: center;
}

.btn-secondary {
  border-radius: 10px;
  color: #fff;
  background: var(--brand-strong);
  border: 2px solid #1e40af;
  padding: 11px 16px;
  font-weight: 700;
  box-shadow: none;
}

.btn-secondary:hover {
  background: #1d4ed8;
  border-color: #1e3a8a;
}

.form-panel {
  position: sticky;
  top: 104px;
  padding-top: clamp(1rem, 2vw, 1.5rem);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-group {
  margin-bottom: 9px;
}

label {
  display: block;
  margin-bottom: 7px;
  color: var(--label-color);
  font-weight: 600;
  font-size: 0.88rem;
}

.required {
  color: #fda4af;
}

.optional {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

textarea {
  resize: vertical;
  min-height: 104px;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.upload-area {
  position: relative;
  border: 1px dashed rgba(152, 186, 238, 0.32);
  border-radius: 14px;
  background: rgba(11, 21, 39, 0.82);
  padding: 12px;
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-area.drag-over {
  border-color: rgba(84, 158, 255, 0.95);
  background: rgba(20, 38, 68, 0.9);
}

.upload-placeholder {
  text-align: center;
  color: #deebff;
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: rgba(52, 105, 206, 0.36);
  border: 1px solid rgba(145, 186, 251, 0.45);
  font-size: 1.5rem;
  font-weight: 700;
}

.upload-placeholder p {
  margin: 0 0 2px;
  font-size: 0.88rem;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 0.76rem !important;
}

.photo-preview {
  margin-top: 9px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.photo-preview img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(151, 183, 234, 0.38);
}

.tds-indicator {
  margin-top: 8px;
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-submit {
  width: 100%;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--brand-strong);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  border: 2px solid #1e40af;
  box-shadow: none;
}

.btn-submit:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1e3a8a;
}

.btn-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.success-msg {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(74, 222, 128, 0.24);
  background: rgba(21, 82, 42, 0.44);
  color: #bbf7d0;
  padding: 10px 12px;
  font-size: 0.87rem;
}

.feed-state {
  border-radius: 14px;
  border: 1px dashed rgba(148, 183, 236, 0.24);
  background: rgba(9, 17, 34, 0.6);
  text-align: center;
  padding: 28px 16px;
}

.feed-state h3 {
  margin: 0 0 6px;
  font-family: "Manrope", sans-serif;
}

.feed-state p {
  margin: 0;
  color: var(--text-muted);
}

.feed-state-action {
  margin-top: 12px;
}

.feed-state-loading {
  margin-bottom: 12px;
}

.loading-spinner {
  color: #dbeafe;
  font-weight: 700;
}

.feed-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feed-skeleton-card {
  height: 170px;
  border-radius: 14px;
  border: 1px solid rgba(145, 177, 227, 0.18);
  background: linear-gradient(90deg, #132442 20%, #1c3156 38%, #132442 55%);
  background-size: 220% 100%;
  animation: shimmer 1.15s linear infinite;
}

@keyframes shimmer {
  from { background-position: 170% 0; }
  to { background-position: -40% 0; }
}

.about-section {
  padding: var(--section-space-y-lg) 0;
  background: var(--section-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--stack-gap);
}

.about-card,
.guide-grid {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--panel-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
}

.about-card {
  padding: 18px;
}

.about-card h2 {
  margin: 0 0 12px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.about-card h3 {
  margin: 18px 0 8px;
  font-family: "Manrope", sans-serif;
}

.about-card p {
  margin: 0 0 10px;
  color: var(--text-soft);
}

.guide-grid {
  padding: 10px;
  display: grid;
  gap: 10px;
}

.guide-card {
  border-radius: 14px;
  padding: 12px;
  border: none;
  background: rgba(14, 26, 50, 0.5);
}

.guide-card h4 {
  margin: 0 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: 1.03rem;
}

.guide-card p {
  margin: 0;
  color: #d3e3ff;
  font-size: 0.88rem;
}

.guide-green {
  border-left: 4px solid #22c55e;
}

.guide-amber {
  border-left: 4px solid #f59e0b;
}

.guide-orange {
  border-left: 4px solid #f97316;
}

.guide-red {
  border-left: 4px solid #ef4444;
}

.contact-section {
  padding: var(--section-space-y-lg) 0;
  background: var(--section-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 1160px;
  margin-inline: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.contact-card {
  border-radius: 18px;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 16px;
}

.contact-card h2,
.contact-card h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

.contact-card p {
  margin: 0 0 8px;
  color: var(--text-soft);
}

.contact-points {
  margin: 10px 0 14px;
}

.contact-points p {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 8px;
  color: #dbe7fb;
}

.contact-points .icon-inline {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: #9ec5ff;
}

.contact-btn {
  width: fit-content;
}

.contact-form-card {
  background: rgba(10, 20, 38, 0.38);
  border-left: 1px solid rgba(164, 190, 235, 0.1);
}

.contact-form {
  display: grid;
  gap: 6px;
}

.contact-form label {
  margin-bottom: 2px;
  font-size: 0.8rem;
  color: #b8cbed;
}

.contact-form input,
.contact-form textarea {
  margin-bottom: 6px;
  border-radius: 10px;
  min-height: 40px;
}

.contact-form textarea {
  min-height: 110px;
}

.contact-form .btn-submit {
  margin-top: 2px;
}

.site-footer {
  border-top: none;
  background: var(--footer-bg);
  padding: 24px 0 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
}

.site-footer h4 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
}

.site-footer p,
.site-footer li {
  margin: 0 0 6px;
  color: #c4d6f5;
  font-size: 0.86rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(163, 191, 236, 0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 22, 0.78);
}

.modal-content {
  position: relative;
  width: min(760px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(160, 188, 236, 0.22);
  background: linear-gradient(180deg, rgba(22, 37, 65, 0.97), rgba(13, 23, 43, 0.97));
  box-shadow: var(--shadow-lg);
  padding: 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(153, 183, 231, 0.36);
  background: rgba(11, 21, 42, 0.8);
  color: #e2ecff;
  cursor: pointer;
}

.modal-tds-badge {
  margin-bottom: 8px;
}

.modal-comment {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(155, 186, 236, 0.3);
  background: rgba(13, 23, 43, 0.75);
  padding: 10px 12px;
}

.modal-photos {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.modal-photos img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid rgba(156, 185, 232, 0.32);
  cursor: zoom-in;
}

.comments-section h4 {
  margin: 16px 0 8px;
  font-family: "Manrope", sans-serif;
}

.comment-thread {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.comment-item {
  border-radius: 10px;
  border: 1px solid rgba(156, 186, 233, 0.24);
  background: rgba(13, 23, 43, 0.74);
  padding: 10px;
}

.comment-item-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.comment-author {
  font-size: 0.82rem;
  font-weight: 700;
}

.comment-time {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.comment-text {
  margin: 0;
  font-size: 0.86rem;
  color: #deebff;
}

.comment-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.btn-comment {
  width: fit-content;
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-accent));
  font-weight: 700;
}

@media (max-width: 1080px) {
  .hero-grid,
  .community-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }

  .contact-form-card {
    border-left: none;
    border-top: 1px solid rgba(164, 190, 235, 0.1);
  }
}

/* ===== Hamburger button (only visible on mobile) ===== */
.nav-toggle {
  display: none;
  appearance: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.10); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
[data-theme="light"] .nav-toggle {
  border-color: rgba(12, 75, 134, 0.22);
  background: rgba(232, 245, 254, 0.85);
  color: #0c1f3a;
}
[data-theme="light"] .nav-toggle:hover { background: rgba(186, 224, 245, 0.95); }

/* Animated to "X" when open */
.nav-shell.is-nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-shell.is-nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-shell.is-nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 840px) {
  .site-header { padding: 8px 0; }

  .nav-shell {
    border-radius: 18px;
    padding: 8px 12px;
    gap: 8px;
  }

  /* Compact brand: smaller logo, hide the kicker text, keep just the title */
  .brand { gap: 8px; min-width: 0; flex: 1 1 auto; }
  .brand-logo {
    width: 40px;
    height: 40px;
    margin: 0;
    border-width: 1px;
  }
  .brand-kicker { display: none; }
  .brand h1 {
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle { display: inline-flex; }

  /* Nav links collapse into a popover panel below the header */
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    margin: 0 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(13, 23, 42, 0.96);
    border: 1px solid rgba(155, 184, 232, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 50;
  }
  .nav-shell { position: relative; }
  .nav-shell.is-nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s;
  }
  .nav-links a {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
  }
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(12, 75, 134, 0.18);
    box-shadow: 0 16px 40px rgba(12, 60, 110, 0.18);
  }

  /* Compact actions: shrink the Submit Now button to icon-only */
  .nav-actions { gap: 6px; flex-shrink: 0; }
  .nav-cta {
    padding: 9px 12px;
    font-size: 0;
    gap: 0;
  }
  .nav-cta .icon-inline { width: 18px; height: 18px; }
}

@media (max-width: 420px) {
  .brand h1 { font-size: 0.85rem; }
  .brand-logo { width: 34px; height: 34px; }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 24px;
  }

  .hero-mini-stats,
  .feed-grid,
  .feed-skeleton-grid,
  .feed-controls,
  .form-row,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content,
  .hero-panel,
  .panel,
  .about-card,
  .guide-grid {
    border-radius: 18px;
  }

  .card-photos,
  .photo-preview,
  .modal-photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Theme toggle ===== */
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 232, 0.18);
  background: rgba(13, 23, 42, 0.55);
  color: #e2ecff;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-toggle:hover {
  border-color: rgba(125, 170, 252, 0.6);
  color: #fff;
}

.theme-toggle .icon-inline {
  width: 16px;
  height: 16px;
}

.theme-toggle .icon-theme-light {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-theme-dark {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-theme-light {
  display: inline-block;
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(15, 32, 64, 0.16);
  background: #ffffff;
  color: #0b1a33;
}

/* ===== UK Map Section ===== */
.map-section {
  padding: var(--section-space-y-lg) 0;
  background: var(--section-bg);
}

.map-head {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.map-head h2 {
  margin: 4px 0 6px;
  justify-content: center;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.012em;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.map-copy {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: stretch;
  max-width: 1160px;
  margin-inline: auto;
}

.map-wrap {
  background: var(--panel-bg);
  border-radius: 20px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  border: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.uk-map {
  width: 100%;
  height: 560px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 35, 65, 0.35);
}

[data-theme="light"] .uk-map {
  background: rgba(232, 245, 254, 0.6);
}

.uk-map.is-loading::after {
  content: "Loading heat map...";
  position: absolute;
  inset: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(15, 35, 65, 0.55);
  backdrop-filter: blur(2px);
  border-radius: 14px;
  pointer-events: none;
  z-index: 500;
}

[data-theme="light"] .uk-map.is-loading::after {
  background: rgba(232, 245, 254, 0.7);
}

.leaflet-container {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: transparent;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--panel-bg);
  color: var(--text);
  border: 1px solid var(--panel-border, rgba(255,255,255,0.08));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.leaflet-popup-content {
  margin: 10px 14px;
  font-size: 0.85rem;
  line-height: 1.45;
}

.leaflet-popup-content strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.uk-region-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.uk-region-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 6px 10px 5px;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  font-family: "Manrope", sans-serif;
  line-height: 1;
  pointer-events: none;
}

.uk-region-label-ppm {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.uk-region-label-unit {
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.92;
}

.uk-region-label.q-excellent { background: #10b981; color: #fff; }
.uk-region-label.q-good { background: #22c55e; color: #fff; }
.uk-region-label.q-fair { background: #f59e0b; color: #0f172a; }
.uk-region-label.q-poor { background: #f97316; color: #fff; }
.uk-region-label.q-bad { background: #ef4444; color: #fff; }

/* Map location finder (postal-code.co.uk style) */
.map-location-finder {
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  padding: clamp(16px, 2vw, 22px);
  border-radius: 16px;
  border: none;
  background: rgba(14, 26, 48, 0.88);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
}

.map-location-finder > label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.map-search-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-search-wrap input[type="search"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 10px;
  border: 2px solid rgba(155, 184, 232, 0.28);
  background: rgba(4, 12, 28, 0.55);
  color: var(--text);
}

.map-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 600;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(155, 184, 232, 0.2);
  background: rgba(10, 22, 44, 0.98);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.map-suggestion-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.map-suggestion-btn:hover {
  background: rgba(56, 189, 248, 0.15);
}

.map-suggestion-type {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  margin-bottom: 2px;
}

.map-suggestion-label {
  display: block;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--text-soft);
}

.map-location-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(155, 184, 232, 0.12);
}

.map-result-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.map-result-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.map-result-value.q-excellent { color: #34d399; }
.map-result-value.q-good { color: #4ade80; }
.map-result-value.q-fair { color: #fbbf24; }
.map-result-value.q-poor { color: #fb923c; }
.map-result-value.q-bad { color: #f87171; }

.map-location-hint {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.map-location-hint.is-error { color: #fca5a5; }

.uk-map.map-clickable {
  cursor: crosshair;
}

.map-pick-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.map-pick-marker {
  width: 28px;
  height: 40px;
  background: var(--brand-strong);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  margin-left: 2px;
}

[data-theme="light"] .map-location-finder {
  background: #ffffff;
  border-color: rgba(12, 75, 134, 0.12);
}

[data-theme="light"] .map-search-wrap input[type="search"] {
  background: #ffffff;
  border-color: rgba(12, 75, 134, 0.18);
  color: #062642;
}

[data-theme="light"] .map-suggestions {
  background: #ffffff;
  border-color: rgba(12, 75, 134, 0.15);
  box-shadow: 0 8px 24px rgba(12, 60, 110, 0.12);
}

[data-theme="light"] .map-suggestion-btn:hover {
  background: #f0f7ff;
}

[data-theme="light"] .map-result-value {
  color: #062642;
}

.map-color-scale {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(8, 24, 48, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(6px);
  z-index: 500;
  pointer-events: none;
}

[data-theme="light"] .map-color-scale {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(12, 75, 134, 0.18);
  box-shadow: 0 6px 18px rgba(12, 60, 110, 0.12);
}

.map-color-scale-title {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--panel-bg);
  padding: 0 6px;
  border-radius: 4px;
}

.map-color-scale-bar {
  width: 12px;
  height: 240px;
  border-radius: 6px;
  background: linear-gradient(to bottom,
    #10b981 0%,
    #22c55e 20%,
    #f59e0b 45%,
    #f97316 75%,
    #ef4444 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.map-color-scale-labels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 720px) {
  .uk-map {
    height: 420px;
  }
  .map-color-scale {
    top: 22px;
    right: 22px;
    padding: 8px 10px;
  }
  .map-color-scale-bar {
    height: 180px;
  }
}

/* Sea / ocean background around the country */
.uk-sea {
  pointer-events: none;
}

/* Base land wash: gives every UK pixel a quality color even between data points */
.land-wash {
  pointer-events: none;
  opacity: 0.55;
}

[data-theme="light"] .land-wash {
  opacity: 0.65;
}

/* Heat density layer (blurred + clipped) */
.heat-layer {
  pointer-events: none;
  opacity: 0.95;
}

[data-theme="light"] .heat-layer {
  opacity: 0.90;
}

/* Sharp UK outline on top */
.uk-outline {
  fill: none;
  stroke: rgba(220, 235, 255, 0.55);
  stroke-width: 1.2;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(120, 200, 255, 0.18));
}

[data-theme="light"] .uk-outline {
  stroke: rgba(8, 47, 92, 0.55);
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

/* Map ornaments: compass + km scale bar (real-map context) */
.compass {
  pointer-events: none;
}

.compass .compass-bg {
  fill: rgba(8, 18, 38, 0.55);
  stroke: rgba(220, 235, 255, 0.4);
  stroke-width: 1;
}

.compass .compass-arrow {
  fill: #f0f9ff;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.compass .compass-n {
  text-anchor: middle;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  fill: rgba(220, 235, 255, 0.85);
}

[data-theme="light"] .compass .compass-bg {
  fill: rgba(255, 255, 255, 0.7);
  stroke: rgba(8, 47, 92, 0.35);
}

[data-theme="light"] .compass .compass-arrow {
  fill: #062642;
  filter: none;
}

[data-theme="light"] .compass .compass-n {
  fill: #062642;
}

.scale-km {
  pointer-events: none;
}

.scale-km .scale-km-line,
.scale-km .scale-km-tick {
  stroke: rgba(220, 235, 255, 0.65);
  stroke-width: 1.4;
}

.scale-km .scale-km-label {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 700;
  fill: rgba(220, 235, 255, 0.85);
}

[data-theme="light"] .scale-km .scale-km-line,
[data-theme="light"] .scale-km .scale-km-tick {
  stroke: rgba(8, 47, 92, 0.6);
}

[data-theme="light"] .scale-km .scale-km-label {
  fill: #062642;
  paint-order: stroke fill;
  stroke: rgba(255, 255, 255, 0.7);
  stroke-width: 1.5;
}

/* Active region "live hotspot" pulse */
@keyframes regionPulse {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 1));
  }
}

.uk-region.is-active .region-dot {
  animation: regionPulse 2.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .uk-region.is-active .region-dot {
    animation: none;
  }
}

/* Vertical color scale legend (right side of map) */
.color-scale {
  pointer-events: none;
}

.color-scale .scale-bar {
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.25));
}

.color-scale .scale-title {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-anchor: middle;
  fill: rgba(255, 255, 255, 0.85);
}

.color-scale .scale-ticks line {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1;
}

.color-scale .scale-labels text {
  font-family: "Inter", sans-serif;
  font-size: 9px;
  font-weight: 700;
  fill: rgba(255, 255, 255, 0.85);
  dominant-baseline: middle;
}

[data-theme="light"] .color-scale .scale-title,
[data-theme="light"] .color-scale .scale-labels text {
  fill: rgba(255, 255, 255, 0.95);
  paint-order: stroke fill;
  stroke: rgba(8, 24, 56, 0.5);
  stroke-width: 2;
  stroke-linejoin: round;
}

[data-theme="light"] .color-scale .scale-ticks line {
  stroke: rgba(255, 255, 255, 0.85);
}

.uk-region {
  cursor: pointer;
}

.region-hit {
  fill: rgba(255, 255, 255, 0.001);
  stroke: none;
  transition: fill 0.2s ease;
}

.uk-region:focus {
  outline: none;
}

.uk-region .region-dot {
  fill: #ffffff;
  stroke: rgba(2, 8, 20, 0.7);
  stroke-width: 1.2;
  opacity: 0.75;
  transition: r 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
  transform-origin: center;
  transform-box: fill-box;
}

.uk-region:hover .region-dot,
.uk-region:focus .region-dot,
.uk-region.is-active .region-dot {
  r: 7;
  opacity: 1;
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.95));
}

.uk-region:hover .region-hit,
.uk-region:focus .region-hit,
.uk-region.is-active .region-hit {
  fill: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .uk-region:hover .region-hit,
[data-theme="light"] .uk-region:focus .region-hit,
[data-theme="light"] .uk-region.is-active .region-hit {
  fill: rgba(8, 24, 56, 0.06);
}

/* Region name labels: hidden by default, revealed on hover/active for a clean heatmap look */
.uk-region .region-name {
  text-anchor: middle;
  pointer-events: none;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  fill: #ffffff;
  paint-order: stroke fill;
  stroke: rgba(2, 8, 20, 0.85);
  stroke-width: 3.2;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.2s ease, font-size 0.2s ease;
}

.uk-region:hover .region-name,
.uk-region:focus .region-name,
.uk-region.is-active .region-name {
  opacity: 1;
  font-size: 12px;
}

.map-side {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.35rem);
}

.map-tooltip {
  background: var(--panel-bg);
  border-radius: 16px;
  padding: 18px;
  min-height: 100px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.map-tooltip-kicker {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--brand-accent);
  margin-bottom: 6px;
}

.map-tooltip-region {
  margin: 0 0 4px;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
}

.map-tooltip-tds {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-accent);
}

.map-tooltip-quality {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(34, 211, 238, 0.18);
  color: #c2eefb;
}

[data-theme="light"] .map-tooltip-quality {
  background: rgba(37, 99, 235, 0.12);
  color: #1e40af;
}

.map-tooltip-quality.q-excellent { background: rgba(16, 163, 74, 0.22); color: #16a34a; }
.map-tooltip-quality.q-good { background: rgba(34, 197, 94, 0.22); color: #16a34a; }
.map-tooltip-quality.q-fair { background: rgba(245, 158, 11, 0.22); color: #b45309; }
.map-tooltip-quality.q-poor { background: rgba(249, 115, 22, 0.22); color: #c2410c; }
.map-tooltip-quality.q-bad { background: rgba(239, 68, 68, 0.22); color: #b91c1c; }

[data-theme="light"] .map-tooltip-quality.q-excellent { color: #15803d; }
[data-theme="light"] .map-tooltip-quality.q-good { color: #15803d; }

.region-rank {
  background: var(--panel-bg);
  border-radius: 16px;
  padding: 18px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.region-rank-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.region-rank-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.region-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.region-rank-list li {
  display: grid;
  grid-template-columns: 84px 1fr 38px;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease;
  font-size: 0.82rem;
  color: var(--text);
}

.region-rank-list li:hover {
  background: rgba(120, 170, 250, 0.1);
}

.region-rank-list li.is-active {
  background: rgba(34, 211, 238, 0.16);
}

[data-theme="light"] .region-rank-list li:hover {
  background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .region-rank-list li.is-active {
  background: rgba(37, 99, 235, 0.12);
}

.rank-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

[data-theme="light"] .rank-bar {
  background: rgba(15, 32, 64, 0.08);
}

.rank-bar-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #f59e0b, #f97316, #ef4444);
  transition: width 0.3s ease;
}

.rank-value {
  text-align: right;
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.map-legend {
  background: var(--panel-bg);
  border-radius: 16px;
  padding: 18px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.legend-title {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 4px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.excellent { background: #10b981; }
.legend-dot.good { background: #16a34a; }
.legend-dot.fair { background: #f59e0b; }
.legend-dot.poor { background: #f97316; }
.legend-dot.bad { background: #ef4444; }

.map-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

@media (max-width: 1080px) {
  .map-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Light theme overrides ===== */
[data-theme="light"] .panel,
[data-theme="light"] .about-card,
[data-theme="light"] .contact-card {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

[data-theme="light"] .about-card {
  background: #f8fafc;
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2rem);
}

[data-theme="light"] .contact-card {
  background: #ffffff;
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 4px 24px rgba(12, 60, 110, 0.05);
}

[data-theme="light"] .guide-grid {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  gap: 12px;
}

[data-theme="light"] .map-side > * {
  background: #f8fafc;
  border: none;
  box-shadow: none;
}

[data-theme="light"] .community-section {
  background: #ffffff;
}

[data-theme="light"] .feed-card {
  background: #f8fafc;
  border: none;
  box-shadow: none;
}

[data-theme="light"] .feed-card:hover {
  background: #f1f5f9;
  box-shadow: 0 8px 28px rgba(12, 60, 110, 0.07);
}

[data-theme="light"] .card-footer {
  background: transparent;
}

[data-theme="light"] .card-comment {
  background: rgba(56, 189, 248, 0.08);
  border-left-color: rgba(37, 99, 235, 0.35);
  color: #1d3557;
}

[data-theme="light"] .btn-like.liked {
  background: #dcfce7;
  color: #166534;
  border-color: rgba(22, 163, 74, 0.45);
}

[data-theme="light"] .meta-chip {
  background: #f1f5f9;
  color: #475569;
}

[data-theme="light"] .nav-shell {
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 0 rgba(12, 75, 134, 0.08);
}

[data-theme="light"] .map-section .map-wrap,
[data-theme="light"] .map-location-finder {
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 24px rgba(12, 60, 110, 0.06);
}

[data-theme="light"] .map-tooltip,
[data-theme="light"] .region-rank,
[data-theme="light"] .map-legend {
  background: #f8fafc;
}

[data-theme="light"] .about-section,
[data-theme="light"] .contact-section {
  background: #ffffff;
}

[data-theme="light"] .impact-strip,
[data-theme="light"] .map-section,
[data-theme="light"] .news-hub-landing {
  background: #f8fafc;
}

[data-theme="light"] .pillars-section,
[data-theme="light"] .community-section {
  background: #ffffff;
}

[data-theme="light"] .about-section {
  background: #ffffff;
}

[data-theme="light"] .contact-section {
  background: #f8fafc;
}

[data-theme="light"] .upload-area {
  border: 1px dashed rgba(12, 75, 134, 0.22);
  background: #f8fafc;
}

[data-theme="light"] .form-panel .panel-copy {
  margin-top: 0.5rem;
}

[data-theme="light"] .guide-card {
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 8px rgba(12, 60, 110, 0.05);
}

[data-theme="light"] .news-masthead-deck,
[data-theme="light"] .news-section-copy {
  color: #4a6a8a;
}

[data-theme="light"] .news-masthead-title,
[data-theme="light"] .news-section-title,
[data-theme="light"] .news-section-head h2 {
  color: #062642;
}

[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="number"],
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
  color: #062642;
  border-color: rgba(12, 75, 134, 0.18);
}

[data-theme="light"] .brand-kicker {
  color: #2563eb;
}

[data-theme="light"] .nav-links a {
  color: #1d2c47;
}

[data-theme="light"] .nav-links a:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.22);
  color: #1e40af;
}

[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-submit,
[data-theme="light"] .btn-secondary,
[data-theme="light"] .nav-cta {
  background: #ffffff;
  color: #0c4b86;
  border: 2px solid #0c4b86;
  box-shadow: none;
}

[data-theme="light"] .btn-primary:hover,
[data-theme="light"] .btn-submit:hover:not(:disabled),
[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .nav-cta:hover {
  background: #f0f7ff;
  border-color: #1e40af;
  color: #1e3a8a;
}

[data-theme="light"] .btn-ghost {
  color: #0c4b86;
  background: #ffffff;
  border: 2px solid #0c4b86;
}

[data-theme="light"] .btn-ghost:hover {
  background: #f0f7ff;
  border-color: #1e40af;
}

[data-theme="light"] .panel h2,
[data-theme="light"] .about-card h2,
[data-theme="light"] .about-card h3,
[data-theme="light"] .about-card p,
[data-theme="light"] .contact-card h2,
[data-theme="light"] .contact-card h3,
[data-theme="light"] .contact-card p,
[data-theme="light"] .map-tooltip-region,
[data-theme="light"] .legend-row,
[data-theme="light"] .map-copy {
  color: #0b1a33;
}

[data-theme="light"] .panel-copy,
[data-theme="light"] .panel-kicker,
[data-theme="light"] .card-meta,
[data-theme="light"] .card-author,
[data-theme="light"] .card-date,
[data-theme="light"] .legend-title,
[data-theme="light"] .map-note {
  color: #34507c;
}

[data-theme="light"] .panel-kicker {
  color: #0c4b86;
}


[data-theme="light"] .card-location,
[data-theme="light"] .card-comment {
  color: #062642;
}

[data-theme="light"] .btn-like,
[data-theme="light"] .btn-discuss {
  background: rgba(243, 250, 254, 0.95);
  color: #0c4b86;
  border-color: rgba(12, 75, 134, 0.22);
}

[data-theme="light"] .upload-area {
  background: rgba(243, 250, 254, 0.95);
  border-color: rgba(12, 75, 134, 0.32);
}

[data-theme="light"] .upload-placeholder {
  color: #062642;
}

[data-theme="light"] .upload-icon {
  background: rgba(12, 75, 134, 0.12);
  border-color: rgba(12, 75, 134, 0.28);
  color: #0c4b86;
}

[data-theme="light"] .guide-card {
  background: rgba(243, 250, 254, 0.95);
  border: 1px solid rgba(12, 75, 134, 0.10);
}

[data-theme="light"] .guide-card p {
  color: #1d3557;
}

[data-theme="light"] .map-tooltip,
[data-theme="light"] .map-legend,
[data-theme="light"] .map-wrap {
  background: rgba(232, 244, 252, 0.82);
}

[data-theme="light"] .uk-region text {
  fill: #ffffff;
}

[data-theme="light"] .site-footer {
  color: #cbd6ec;
}

[data-theme="light"] .site-footer p,
[data-theme="light"] .site-footer li {
  color: #cbd6ec;
}

[data-theme="light"] .feed-state {
  background: rgba(243, 250, 254, 0.95);
  border-color: rgba(12, 75, 134, 0.22);
}

[data-theme="light"] .modal-content {
  background: rgba(243, 250, 254, 0.97);
  border-color: rgba(12, 75, 134, 0.14);
}

/* ===== App status banner (Firebase init) ===== */
.app-status {
  position: fixed;
  top: auto;
  bottom: 72px;
  right: 16px;
  left: auto;
  transform: none;
  z-index: 3000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 8px;
  background: rgba(8, 24, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  max-width: min(240px, calc(100% - 24px));
}
.app-status[hidden] { display: none; }
.app-status.is-error { background: rgba(120, 12, 12, 0.92); border-color: rgba(248, 113, 113, 0.4); }
.app-status.is-ready { background: rgba(8, 56, 28, 0.92); border-color: rgba(74, 222, 128, 0.4); }

.app-status-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
.app-status.is-ready .app-status-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); animation: none; }
.app-status.is-error .app-status-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); animation: none; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.7); opacity: 0.7; }
}

.app-status-close {
  flex-shrink: 0;
  margin-left: 2px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 6px;
  line-height: 1;
}
.app-status-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.app-status-text {
  min-width: 0;
}

@media (max-width: 900px) {
  .app-status {
    bottom: 20px;
    right: 14px;
    max-width: min(220px, calc(100% - 28px));
  }
}

.app-status-text a {
  color: #93c5fd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Toasts ===== */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
  max-width: min(460px, calc(100% - 32px));
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px 12px 14px;
  background: rgba(15, 28, 56, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left-width: 4px;
  border-radius: 12px;
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  animation: toast-in 0.25s ease-out;
  max-width: 100%;
}
.toast.is-success { border-left-color: #22c55e; }
.toast.is-error   { border-left-color: #ef4444; }
.toast.is-info    { border-left-color: #38bdf8; }
.toast.is-warn    { border-left-color: #f59e0b; }
.toast-title { font-weight: 700; margin-bottom: 2px; }
.toast-body { color: rgba(248, 250, 252, 0.85); white-space: pre-line; }
.toast-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  line-height: 1;
}
.toast-close:hover { color: #fff; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

[data-theme="light"] .app-status {
  background: rgba(255, 255, 255, 0.95);
  color: #0c1f3a;
  border-color: rgba(12, 75, 134, 0.18);
  box-shadow: 0 8px 22px rgba(12, 60, 110, 0.14);
}
[data-theme="light"] .app-status.is-error { background: rgba(254, 226, 226, 0.95); color: #7f1d1d; }
[data-theme="light"] .app-status.is-ready { background: rgba(220, 252, 231, 0.95); color: #14532d; }
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.97);
  color: #0c1f3a;
  border-color: rgba(12, 75, 134, 0.18);
}
[data-theme="light"] .toast-body { color: rgba(12, 31, 58, 0.78); }

/* ===== Admin link (footer icon on the public site) ===== */
.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 12px;
  border-radius: 8px;
  color: rgba(248, 250, 252, 0.45);
  transition: color 0.2s ease, background 0.2s ease;
}
.admin-link svg { width: 14px; height: 14px; }
.admin-link:hover {
  color: rgba(248, 250, 252, 0.95);
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .admin-link { color: rgba(12, 31, 58, 0.45); }
[data-theme="light"] .admin-link:hover { color: #0c1f3a; background: rgba(12, 75, 134, 0.08); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ===== Admin dashboard ===== */
.admin-body {
  background:
    linear-gradient(160deg, rgba(4, 12, 28, 0.92), rgba(6, 16, 36, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.08), transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(34, 211, 238, 0.06), transparent 60%),
    var(--bg) center / cover no-repeat;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", sans-serif;
  margin: 0;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 14px 22px;
  background: rgba(8, 16, 36, 0.85);
  border-bottom: 1px solid rgba(155, 184, 232, 0.12);
  backdrop-filter: blur(12px);
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1280px;
  margin-inline: auto;
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.admin-brand img { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); }
.admin-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
}
.admin-brand h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.1;
}
.admin-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-user-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.78);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s ease;
  text-decoration: none;
  white-space: nowrap;
}
.admin-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.admin-btn-primary {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #ffffff;
  border-color: transparent;
}
.admin-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(56, 189, 248, 0.32); }
.admin-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.10);
}
.admin-btn-ghost:hover { background: rgba(255, 255, 255, 0.10); }
.admin-btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.32);
}
.admin-btn-danger:hover { background: rgba(239, 68, 68, 0.22); color: #fff; }

.admin-main {
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 22px 60px;
}

/* Login */
.admin-login {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
}
.admin-login-card {
  width: min(440px, 100%);
  padding: 36px 32px;
  border-radius: 22px;
  background: rgba(13, 24, 46, 0.78);
  border: 1px solid rgba(155, 184, 232, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(16px);
  text-align: center;
}
.admin-login-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(56,189,248,0.18), rgba(99,102,241,0.18));
  color: #67e8f9;
}
.admin-login-icon svg { width: 28px; height: 28px; }
.admin-login-card h2 { margin: 0 0 6px; font-size: 1.5rem; font-family: "Manrope", sans-serif; }
.admin-login-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 0.9rem; }
.admin-auth-checking {
  margin: 0 0 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-auth-checking[hidden] { display: none !important; }
.admin-login-help { font-size: 0.78rem; color: var(--text-muted); margin: 18px 0 0; }
.admin-login-help a { color: #7dd3fc; }

.admin-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.admin-form label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-top: 12px;
}
.admin-form input,
.admin-form textarea,
.admin-form select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(155, 184, 232, 0.18);
  background: rgba(8, 16, 32, 0.70);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 1px;
}
.admin-form textarea { resize: vertical; }
.admin-form .admin-btn { margin-top: 18px; }

/* Dashboard */
.admin-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(8, 16, 32, 0.55);
  border: 1px solid rgba(155, 184, 232, 0.12);
  margin-bottom: 22px;
  overflow-x: auto;
  max-width: 100%;
}
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.18s ease;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.is-active { color: #ffffff; background: rgba(56, 189, 248, 0.18); }
.admin-tabpanel { display: none; }
.admin-tabpanel.is-active { display: block; }

.admin-tab-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.admin-tab-badge[hidden] { display: none !important; }

.admin-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-weight: 600;
  user-select: none;
}
.admin-toggle-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #38bdf8; }

.admin-status-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-status-pending   { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.admin-status-published { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.admin-status-rejected  { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }

.admin-promo-preview {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(99, 102, 241, 0.10));
  border-color: rgba(56, 189, 248, 0.30);
  margin-top: 4px;
}

.admin-card {
  padding: 24px;
  border-radius: 18px;
  background: rgba(13, 24, 46, 0.65);
  border: 1px solid rgba(155, 184, 232, 0.14);
  backdrop-filter: blur(14px);
}
.admin-card h3 { margin: 0 0 4px; font-family: "Manrope", sans-serif; font-size: 1.1rem; }
.admin-card-sub { color: var(--text-muted); font-size: 0.85rem; margin: 0 0 18px; }

.admin-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 920px) { .admin-grid-2 { grid-template-columns: 1fr; } }

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.admin-stat {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(13, 24, 46, 0.65);
  border: 1px solid rgba(155, 184, 232, 0.14);
}
.admin-stat-label {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.admin-stat h3 {
  margin: 0;
  font-size: 2rem;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-hint {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px dashed rgba(56, 189, 248, 0.32);
  color: var(--text-soft);
  font-size: 0.88rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.admin-toolbar input,
.admin-toolbar select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(155, 184, 232, 0.18);
  background: rgba(8, 16, 32, 0.70);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}
.admin-toolbar input { flex: 1 1 240px; }

.admin-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(155, 184, 232, 0.12);
  background: rgba(13, 24, 46, 0.55);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
  font-size: 0.88rem;
}
.admin-table thead th {
  text-align: left;
  padding: 14px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(8, 16, 32, 0.55);
  border-bottom: 1px solid rgba(155, 184, 232, 0.10);
  position: sticky;
  top: 0;
}
.admin-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(155, 184, 232, 0.06);
  vertical-align: top;
}
.admin-table tbody tr:hover { background: rgba(56, 189, 248, 0.04); }
.admin-table-empty {
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.admin-cell-when { color: var(--text-muted); font-size: 0.8rem; }
.admin-row-actions { display: inline-flex; gap: 8px; }

.admin-tds-pill {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
.admin-tds-excellent { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.admin-tds-good      { background: rgba(34, 197, 94, 0.16);  color: #86efac; }
.admin-tds-fair      { background: rgba(245, 158, 11, 0.18); color: #fcd34d; }
.admin-tds-poor      { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.admin-tds-bad       { background: rgba(239, 68, 68, 0.18);  color: #fca5a5; }

/* Hero editor */
.admin-dropzone {
  margin-top: 4px;
  padding: 28px 18px;
  border-radius: 14px;
  border: 1.5px dashed rgba(155, 184, 232, 0.32);
  background: rgba(8, 16, 32, 0.45);
  text-align: center;
  cursor: pointer;
  transition: 0.18s ease;
}
.admin-dropzone:hover,
.admin-dropzone.drag-over { border-color: rgba(56, 189, 248, 0.65); background: rgba(56, 189, 248, 0.08); }
.admin-dropzone-prompt span { display: block; margin-bottom: 4px; font-weight: 600; }
.admin-dropzone-prompt small { color: var(--text-muted); }
.admin-image-preview {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-image-preview img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(155, 184, 232, 0.16);
}
.admin-form-actions {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-hero-preview {
  margin-top: 4px;
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background-image: url("hero bg 3.jpeg");
  background-size: cover;
  background-position: center;
}
.admin-hero-preview-overlay {
  position: absolute;
  inset: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  background: linear-gradient(135deg, rgba(8, 28, 64, 0.78) 0%, rgba(11, 42, 92, 0.62) 60%, rgba(15, 60, 120, 0.45) 100%);
  color: #ffffff;
}
.admin-hero-preview-overlay h4 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.15rem;
  line-height: 1.15;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 8, 24, 0.55);
}
.admin-hero-preview-overlay p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.92);
  text-shadow: 0 1px 6px rgba(0, 8, 24, 0.55);
}

/* Admin dashboard — light theme (uses global [data-theme="light"] CSS variables) */
[data-theme="light"] .admin-body {
  background:
    linear-gradient(160deg, rgba(232, 244, 252, 0.97), rgba(214, 236, 248, 0.94)),
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.12), transparent 52%),
    radial-gradient(circle at 82% 100%, rgba(34, 211, 238, 0.10), transparent 58%),
    var(--bg) center / cover no-repeat;
}
[data-theme="light"] .admin-body .bg-orb { opacity: 0.22; }
[data-theme="light"] .admin-header {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 18px rgba(12, 60, 110, 0.06);
}
[data-theme="light"] .admin-brand img {
  border-color: rgba(12, 75, 134, 0.15);
}
[data-theme="light"] .admin-user-pill {
  color: var(--text-muted);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(12, 75, 134, 0.14);
}
[data-theme="light"] .admin-btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--line);
  color: var(--text);
}
[data-theme="light"] .admin-btn-ghost:hover {
  background: rgba(232, 244, 252, 0.98);
}
[data-theme="light"] .admin-btn-danger {
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.85);
  border-color: rgba(239, 68, 68, 0.35);
}
[data-theme="light"] .admin-login-card {
  background: var(--panel-bg);
  border-color: var(--line);
  box-shadow: var(--shadow-lg);
}
[data-theme="light"] .admin-login-help a { color: var(--brand-strong); }
[data-theme="light"] .admin-form input,
[data-theme="light"] .admin-form textarea,
[data-theme="light"] .admin-form select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}
[data-theme="light"] .admin-tabs {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}
[data-theme="light"] .admin-tab.is-active {
  color: var(--text);
  background: rgba(56, 189, 248, 0.22);
}
[data-theme="light"] .admin-card {
  background: var(--panel-bg);
  border-color: var(--line);
}
[data-theme="light"] .admin-stat {
  background: var(--panel-bg-soft);
  border: 1px solid var(--line);
}
[data-theme="light"] .admin-toolbar input,
[data-theme="light"] .admin-toolbar select {
  background: var(--input-bg);
  border-color: var(--input-border);
  color: var(--input-text);
}
[data-theme="light"] .admin-table-wrap {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}
[data-theme="light"] .admin-table thead th {
  color: var(--text-muted);
  background: rgba(232, 244, 252, 0.95);
  border-bottom-color: var(--line);
}
[data-theme="light"] .admin-table tbody td {
  border-bottom-color: rgba(12, 75, 134, 0.08);
}
[data-theme="light"] .admin-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.06);
}
[data-theme="light"] .admin-dropzone {
  border-color: rgba(12, 75, 134, 0.22);
  background: rgba(255, 255, 255, 0.55);
}
[data-theme="light"] .admin-dropzone:hover,
[data-theme="light"] .admin-dropzone.drag-over {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(56, 189, 248, 0.08);
}
[data-theme="light"] .admin-image-preview img {
  border-color: var(--line);
}
[data-theme="light"] .post-modal {
  background: rgba(12, 40, 70, 0.35);
}

/* Admin light theme — stronger contrast (tabs, table, pills, buttons) */
[data-theme="light"] .admin-kicker {
  color: #0e7490;
  font-weight: 700;
}
[data-theme="light"] .admin-brand h1 {
  color: #042a4d;
}
[data-theme="light"] .admin-tab {
  color: #2d4a66;
}
[data-theme="light"] .admin-tab:hover {
  color: #042a4d;
  background: rgba(12, 75, 134, 0.06);
}
[data-theme="light"] .admin-tab.is-active {
  color: #042a4d;
  background: rgba(14, 116, 178, 0.2);
  box-shadow: inset 0 0 0 2px rgba(12, 75, 134, 0.35);
  font-weight: 700;
}
[data-theme="light"] .admin-tabs {
  background: #ffffff;
  border: 1px solid rgba(12, 75, 134, 0.2);
  box-shadow: 0 2px 10px rgba(12, 60, 110, 0.06);
}
[data-theme="light"] .admin-table-wrap {
  background: #ffffff;
  border: 1px solid rgba(12, 75, 134, 0.2);
  box-shadow: 0 4px 16px rgba(12, 60, 110, 0.07);
}
[data-theme="light"] .admin-table thead th {
  color: #0a3550;
  background: #cfe8f8;
  border-bottom: 2px solid rgba(12, 75, 134, 0.22);
  font-weight: 800;
}
[data-theme="light"] .admin-table tbody td {
  color: #0a2540;
  border-bottom-color: rgba(12, 75, 134, 0.12);
}
[data-theme="light"] .admin-table-empty {
  color: #3d5c78;
}
[data-theme="light"] .admin-cell-when {
  color: #3d5c78;
  font-weight: 500;
}
[data-theme="light"] .admin-btn-ghost {
  border-width: 2px;
  border-color: rgba(12, 75, 134, 0.28);
  color: #042a4d;
  font-weight: 600;
}
[data-theme="light"] .admin-btn-danger {
  color: #991b1b;
  font-weight: 700;
  border-width: 2px;
  border-color: rgba(185, 28, 28, 0.45);
}
[data-theme="light"] .admin-hint {
  color: #1e4a6e;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(12, 75, 134, 0.28);
}
[data-theme="light"] .admin-tds-pill {
  border: 1px solid transparent;
  font-weight: 800;
}
[data-theme="light"] .admin-tds-excellent {
  background: #d1fae5;
  color: #065f46;
  border-color: #34d399;
}
[data-theme="light"] .admin-tds-good {
  background: #dcfce7;
  color: #166534;
  border-color: #4ade80;
}
[data-theme="light"] .admin-tds-fair {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
}
[data-theme="light"] .admin-tds-poor {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fb923c;
}
[data-theme="light"] .admin-tds-bad {
  background: #fee2e2;
  color: #991b1b;
  border-color: #f87171;
}
[data-theme="light"] .admin-status-pending {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}
[data-theme="light"] .admin-status-published {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #4ade80;
}
[data-theme="light"] .admin-status-rejected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #f87171;
}
[data-theme="light"] .admin-card-sub,
[data-theme="light"] .admin-login-sub {
  color: #3d5c78;
}

@media (max-width: 600px) {
  .admin-header-inner { flex-direction: column; align-items: flex-start; }
  .admin-header-actions { width: 100%; }
  .admin-main { padding: 0 14px 40px; }
}

/* Force hidden=true to win over .admin-login { display: grid } etc.
   Without this, the login screen + tabpanels stay visible after login. */
.admin-login[hidden],
.admin-dashboard[hidden],
.admin-tabpanel[hidden],
.admin-image-preview[hidden],
.admin-user-pill[hidden],
.btn-text[hidden],
.btn-loading[hidden],
.promo-strip[hidden] {
  display: none !important;
}

/* ===== Promo strip (admin-editable sponsored panel below hero) ===== */
.promo-strip {
  padding: 12px 0 22px;
}
.promo-card {
  display: grid;
  grid-template-columns: minmax(160px, 200px) 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.22);
  box-shadow: 0 14px 32px rgba(8, 24, 56, 0.18);
  position: relative;
  overflow: hidden;
}
.promo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.10), transparent 55%);
  pointer-events: none;
}
.promo-card-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(8, 16, 32, 0.55);
}
.promo-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(8, 24, 48, 0.75);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
}
.promo-card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.promo-kicker {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  font-weight: 700;
}
.promo-card-body h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.18;
}
.promo-copy {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 60ch;
}
.promo-btn {
  margin-top: 6px;
  width: fit-content;
}
[data-theme="light"] .promo-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(214, 236, 248, 0.62));
  border-color: rgba(12, 75, 134, 0.22);
  box-shadow: 0 14px 32px rgba(12, 60, 110, 0.14);
}
[data-theme="light"] .promo-badge {
  background: rgba(12, 31, 58, 0.85);
}
@media (max-width: 720px) {
  .promo-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .promo-card-image { aspect-ratio: 16 / 9; }
}

/* ===== Blog hero (top of blog.html) ===== */
.blog-hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 clamp(28px, 4vw, 48px);
  text-align: center;
  overflow: hidden;
}
.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(56, 189, 248, 0.18), transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(99, 102, 241, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero .panel-kicker { margin-bottom: 12px; }
.blog-hero h1 {
  margin: 0 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  background: linear-gradient(135deg, #ffffff 0%, #7dd3fc 60%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .blog-hero h1 {
  background: linear-gradient(135deg, #062642 0%, #0c4b86 55%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.blog-hero-copy {
  margin: 0 auto 24px;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.55;
}
.blog-hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ===== Blog toolbar (search) ===== */
.blog-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.blog-search-wrap {
  position: relative;
  flex: 1 1 460px;
  max-width: 540px;
}
.blog-search-wrap input[type="search"] {
  width: 100%;
  padding: 14px 16px 14px 46px;
  border-radius: 999px;
  border: 1px solid rgba(155, 184, 232, 0.22);
  background: rgba(8, 16, 32, 0.65);
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.blog-search-wrap input[type="search"]:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}
.blog-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}
[data-theme="light"] .blog-search-wrap input[type="search"] {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(12, 75, 134, 0.20);
}

/* ===== Tag filter row ===== */
.blog-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}
.blog-tag-row .blog-tag-btn {
  cursor: pointer;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: rgba(56, 189, 248, 0.10);
  color: #7dd3fc;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: 0.18s ease;
}
.blog-tag-row .blog-tag-btn:hover { background: rgba(56, 189, 248, 0.20); transform: translateY(-1px); }
.blog-tag-row .blog-tag-btn.is-active {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 14px rgba(56, 189, 248, 0.32);
}
.blog-tag-row .blog-tag-btn small { opacity: 0.65; margin-left: 4px; font-weight: 600; }
[data-theme="light"] .blog-tag-row .blog-tag-btn {
  background: rgba(14, 116, 144, 0.10);
  color: #075985;
  border-color: rgba(14, 116, 144, 0.28);
}

/* ===== Pagination ===== */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* ===== Pending preview banner (post.html) ===== */
.admin-preview-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border-radius: 14px;
  border: 1px dashed rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.10);
  color: var(--text);
  font-size: 0.9rem;
}
.admin-preview-banner strong { color: #fcd34d; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.admin-preview-banner span { flex: 1 1 auto; color: var(--text-soft); }
[data-theme="light"] .admin-preview-banner { background: rgba(245, 158, 11, 0.14); border-color: rgba(180, 83, 9, 0.45); }
[data-theme="light"] .admin-preview-banner strong { color: #b45309; }

/* ===== Blog cards (homepage teaser + archive list) ===== */
.blog-section { padding: 28px 0 36px; }
.blog-section .section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.blog-section .section-head h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 800;
}
.blog-section .section-head .panel-kicker { margin-bottom: 4px; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}
.blog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 16px 36px rgba(8, 24, 56, 0.30);
}
.blog-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(8, 16, 32, 0.55) center / cover no-repeat;
  display: block;
}
.blog-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.blog-card-meta {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.blog-card h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}
.blog-card-excerpt {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.5;
}
.blog-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.blog-tag {
  display: inline-flex;
  padding: 2px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.26);
}
[data-theme="light"] .blog-tag {
  background: rgba(14, 116, 144, 0.16);
  color: #075985;
  border-color: rgba(14, 116, 144, 0.28);
}
.blog-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
  border-radius: 16px;
  border: none;
  background: rgba(14, 26, 48, 0.45);
  font-size: 0.92rem;
}

[data-theme="light"] .blog-empty {
  background: #f8fafc;
  border: none;
  color: #4a6a8a;
}

/* ===== Single post page ===== */
.post-page { padding: 36px 0 80px; }
.post-page .post-cover {
  width: 100%;
  max-height: 420px;
  aspect-ratio: 16 / 7;
  border-radius: 22px;
  background: rgba(8, 16, 32, 0.55) center / cover no-repeat;
  margin-bottom: 24px;
}
.post-page .post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.post-page article {
  max-width: 760px;
  margin-inline: auto;
}
.post-page h1 {
  margin: 0 0 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.12;
}
.post-body {
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--text);
}
.post-body p { margin: 0 0 1em; }
.post-body h2 { font-family: "Manrope", sans-serif; margin: 1.6em 0 0.6em; font-size: 1.5rem; }
.post-body h3 { font-family: "Manrope", sans-serif; margin: 1.4em 0 0.5em; font-size: 1.2rem; }
.post-body a { color: #7dd3fc; text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 12px; margin: 1em 0; }
.post-body blockquote {
  margin: 1em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--brand-accent);
  background: rgba(56, 189, 248, 0.08);
  border-radius: 0 12px 12px 0;
  color: var(--text-soft);
  font-style: italic;
}
.post-body ul, .post-body ol { margin: 0 0 1em; padding-left: 1.4em; }
.post-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.post-comments {
  max-width: 760px;
  margin: 36px auto 0;
}
.post-comments h2 {
  margin: 0 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: 1.25rem;
}
.post-comments .comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 14px;
  background: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.post-comments .comment-form input,
.post-comments .comment-form textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(155, 184, 232, 0.18);
  background: rgba(8, 16, 32, 0.70);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}
.post-comments .comment-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== Submit-a-post modal (community contribution) ===== */
.write-post-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(0, 4, 16, 0.65);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.post-modal[hidden] { display: none; }
.post-modal-card {
  width: min(820px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: rgba(13, 24, 46, 0.96);
  border: 1px solid rgba(155, 184, 232, 0.18);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.50);
  position: relative;
}

/* Two-column row for Title + Excerpt inside the post modal */
.post-form-wide .post-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: end;
}
.post-form-wide .post-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.post-form-wide .post-form-field label { margin-top: 12px; }
.post-form-wide .post-form-field input { width: 100%; }
@media (max-width: 640px) {
  .post-form-wide .post-form-row {
    grid-template-columns: 1fr;
  }
  .post-modal-card { padding: 22px; }
}
.post-modal-card h3 { margin: 0 0 4px; font-family: "Manrope", sans-serif; font-size: 1.3rem; }
.post-modal-card .post-modal-sub { margin: 0 0 18px; color: var(--text-muted); font-size: 0.88rem; }
.post-modal-card .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.post-modal-card .modal-close:hover { background: rgba(255, 255, 255, 0.14); }

[data-theme="light"] .post-modal-card {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(12, 75, 134, 0.18);
  color: #0c1f3a;
}
[data-theme="light"] .post-comments .comment-form {
  background: rgba(255, 255, 255, 0.78);
}

/* ===== Water News Hub (BBC / Times inspired) ===== */
.news-hub-page,
.news-hub-landing {
  --news-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

.news-hub-landing {
  margin-top: 0;
  border-top: none;
  background: var(--section-bg);
}

[data-theme="light"] .news-hub-landing,
[data-theme="light"] .news-hub-page main {
  background: #ffffff;
}

.news-masthead--home {
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2rem);
}

.news-masthead--home .news-masthead-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.news-masthead-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 0.9rem;
}

.news-masthead-cta .news-link-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid rgba(155, 184, 232, 0.35);
  background: rgba(14, 26, 48, 0.6);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.news-masthead-cta .news-link-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(20, 40, 72, 0.75);
  color: #fff;
}

.news-masthead-cta a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 10px;
  border: 2px solid var(--brand-strong);
  background: var(--brand-strong);
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.news-masthead-cta a:hover {
  background: #1d4ed8;
  border-color: #1e3a8a;
  text-decoration: none;
}

[data-theme="light"] .news-masthead-cta .news-link-btn {
  background: #ffffff;
  color: #0c4b86;
  border: 2px solid #0c4b86;
}

[data-theme="light"] .news-masthead-cta .news-link-btn:hover {
  background: #f0f7ff;
  border-color: #1e40af;
  color: #1e3a8a;
}

[data-theme="light"] .news-masthead-cta a {
  background: #ffffff;
  color: #0c4b86;
  border: 2px solid #0c4b86;
}

[data-theme="light"] .news-masthead-cta a:hover {
  background: #f0f7ff;
  border-color: #1e40af;
  color: #1e3a8a;
}

.news-masthead-cta .news-cta-sep {
  color: var(--text-muted);
  user-select: none;
}

.news-hub-landing-body .news-hub-section {
  padding: var(--section-space-y) 0;
}

.news-hub-landing-body .news-hub-section:first-child {
  padding-top: clamp(2rem, 4vw, 3rem);
}

.news-section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.news-section-title {
  margin: 0;
  font-family: var(--news-serif);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
}

.news-section-more {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.news-section-more:hover {
  color: var(--brand-strong);
}

.news-hub-landing .news-section-head-actions {
  display: none;
}

.news-masthead {
  padding: 28px 0 24px;
  border-bottom: 2px solid rgba(196, 18, 48, 0.45);
  background: rgba(10, 20, 40, 0.92);
}

[data-theme="light"] .news-masthead,
[data-theme="light"] .news-masthead--home {
  background: #ffffff;
  border-bottom: 2px solid #c41230;
}

.news-masthead-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c41230;
}

.news-masthead-title {
  margin: 0;
  font-family: var(--news-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.news-masthead-deck {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.news-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  padding-top: 0;
  border-top: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.news-section-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0;
}

.news-section-nav a:hover {
  color: var(--brand-strong);
}

.news-hub-section {
  padding: 36px 0 44px;
}

.news-hub-section--alt {
  background: rgba(10, 20, 40, 0.75);
  border-block: 1px solid rgba(155, 184, 232, 0.08);
}

[data-theme="light"] .news-hub-section--alt {
  background: #f8fafc;
  border-block-color: rgba(12, 75, 134, 0.08);
}

[data-theme="light"] .news-hub-landing-body .news-hub-section,
[data-theme="light"] .news-hub-section {
  background: #ffffff;
}

[data-theme="light"] .news-feature-card,
[data-theme="light"] .news-discussion-card {
  background: #ffffff;
  border: 1px solid rgba(12, 75, 134, 0.12);
  box-shadow: 0 2px 10px rgba(12, 60, 110, 0.05);
}

[data-theme="light"] .news-wire-item {
  border-bottom-color: rgba(12, 75, 134, 0.1);
}

[data-theme="light"] .news-wire-item:hover {
  background: #f8fafc;
}

.news-section-head {
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}

[data-theme="light"] .news-section-head {
  border-bottom: none;
}

.news-section-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c41230;
}

.news-section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

/* Homepage: shorter headers only (full copy stays on blog.html) */
.news-hub-landing .news-section-copy {
  display: none;
}

.news-section-head h2 {
  margin: 0;
  font-family: var(--news-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.news-section-copy {
  margin: 8px 0 0;
  max-width: 640px;
  color: var(--text-muted);
  line-height: 1.5;
}

.news-feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

.news-feature-grid-secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-feature-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(155, 184, 232, 0.14);
  background: rgba(14, 26, 48, 0.88);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-feature-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.news-feature-card--lead {
  grid-row: span 2;
}

.news-feature-cover {
  aspect-ratio: 16 / 9;
  background: center / cover no-repeat;
}

.news-feature-cover--placeholder {
  background: linear-gradient(135deg, #0c4b86, #1d3557);
}

.news-feature-body {
  padding: 16px 18px 18px;
}

.news-feature-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c41230;
}

.news-feature-card h3 {
  margin: 8px 0 8px;
  font-family: var(--news-serif);
  font-size: 1.25rem;
  line-height: 1.2;
}

.news-feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.news-feature-meta {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-wire-list {
  display: flex;
  flex-direction: column;
  border-top: none;
}

.news-wire-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 2px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(155, 184, 232, 0.08);
  transition: background 0.15s ease;
}

.news-wire-item:hover {
  background: rgba(56, 189, 248, 0.08);
}

.news-wire-source {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c41230;
}

.news-wire-item h3 {
  margin: 6px 0 6px;
  font-family: var(--news-serif);
  font-size: 1.15rem;
  line-height: 1.25;
}

.news-wire-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.news-wire-aside {
  text-align: right;
  white-space: nowrap;
}

.news-wire-time {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-wire-external {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
}

.news-discussion-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.news-discussion-card {
  display: block;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(155, 184, 232, 0.14);
  background: rgba(14, 26, 48, 0.88);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.news-discussion-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.news-discussion-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
}

.news-discussion-card h3 {
  margin: 8px 0 8px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.news-discussion-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.news-discussion-meta {
  display: block;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.news-hub-teaser {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.news-hub-teaser-block {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(155, 184, 232, 0.14);
  background: rgba(8, 16, 32, 0.35);
}

.news-hub-teaser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.news-hub-teaser-head h3 {
  margin: 0;
  font-family: var(--news-serif);
  font-size: 1.1rem;
}

.news-hub-teaser-head a {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  text-decoration: none;
}

.news-hub-teaser-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-row-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(4, 12, 28, 0.35);
  transition: background 0.15s ease;
}

.news-row-card:hover { background: rgba(56, 189, 248, 0.1); }

.news-row-card--external { grid-template-columns: 1fr; }

.news-row-thumb {
  border-radius: 8px;
  background: center / cover no-repeat;
  min-height: 56px;
}

.news-row-kicker {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c41230;
}

.news-row-card h3 {
  margin: 4px 0 4px;
  font-size: 0.92rem;
  line-height: 1.25;
}

.news-row-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.news-row-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.news-hub-teaser-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-news-cta {
  margin: 20px 0;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.08);
}

.post-back {
  margin-top: 32px;
  font-size: 0.9rem;
}

.post-back a { color: #38bdf8; text-decoration: none; font-weight: 600; }

@media (max-width: 960px) {
  .news-feature-grid { grid-template-columns: 1fr; }
  .news-feature-card--lead { grid-row: auto; }
  .news-hub-teaser { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .news-wire-item { grid-template-columns: 1fr; }
  .news-wire-aside { text-align: left; }
  .map-search-wrap .btn { width: 100%; }
  .map-location-results { grid-template-columns: 1fr; }
}

/* ===== Refill-inspired homepage sections ===== */
.hero-actions--triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.hero-cta-card {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px 16px;
  min-height: 84px;
}

.hero-cta-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-cta-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.82;
  line-height: 1.3;
}

.hero-actions--triple .btn-ghost .hero-cta-hint {
  color: rgba(222, 235, 255, 0.85);
}

.impact-strip {
  padding: var(--section-space-y) 0;
  background: var(--section-bg);
  border-block: none;
}

.impact-kicker {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-accent);
  text-align: center;
}

.impact-title {
  margin: 0 0 28px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.impact-stat {
  padding: 28px 22px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: var(--panel-bg);
  text-align: center;
}

.impact-stat h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--brand-strong);
}

.impact-unit {
  font-size: 0.45em;
  font-weight: 700;
  opacity: 0.75;
}

.impact-stat p {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.pillars-section {
  padding: var(--section-space-y-lg) 0;
}

.pillars-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.pillars-deck {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pillar-card {
  padding: 22px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-bg-soft);
}

.pillar-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  margin-bottom: 14px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--brand-accent);
}

.pillar-icon svg {
  width: 22px;
  height: 22px;
}

.pillar-card h3 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.pillar-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.partner-strip {
  padding: var(--section-space-y) 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(37, 99, 235, 0.08));
  border-block: none;
}

.partner-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.partner-copy h2 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

.partner-copy p {
  margin: 0;
  max-width: 560px;
  color: var(--text-muted);
}

.footer-disclaimer {
  margin-top: 10px !important;
  font-size: 0.8rem !important;
  line-height: 1.45;
}

.footer-bottom a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner p {
  margin: 0;
  flex: 1 1 240px;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.cookie-banner a {
  color: var(--brand-accent);
  font-weight: 600;
}

.cookie-accept {
  padding: 9px 16px !important;
  font-size: 0.85rem !important;
}

.legal-page .legal-main {
  max-width: 760px;
  padding: 40px 22px 60px;
}

.legal-page .legal-main h1 {
  margin: 0 0 8px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.legal-updated {
  margin: 0 0 28px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-page .legal-main h2 {
  margin: 28px 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 1.15rem;
}

.legal-page .legal-main p,
.legal-page .legal-main li {
  color: var(--text-soft);
  line-height: 1.65;
}

.legal-page .legal-main ul {
  padding-left: 1.2rem;
}

[data-theme="light"] .hero-actions--triple .btn-ghost .hero-cta-hint {
  color: var(--text-muted);
}

[data-theme="light"] .impact-stat h3 {
  color: var(--brand-strong);
}

[data-theme="light"] .pillar-card {
  background: #ffffff;
}

[data-theme="light"] .partner-strip {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(214, 236, 248, 0.65));
}

[data-theme="light"] .cookie-banner {
  background: #ffffff;
}

@media (max-width: 920px) {
  .hero-actions--triple,
  .pillars-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero-actions--triple,
  .impact-grid,
  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .partner-strip-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
