@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Newsreader:opsz,wght@6..72,400;6..72,600;6..72,700&display=swap");

/* ================================
   19NEWS – UI
=================================== */

/* ROOT VARIABLES */
:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --text: #f9fafb;
  --muted: #9ca3af;
  --card: #0b1220;
  --border: #1e2533;
  --accent: #ff5c5c;
  --accent2: #4ea6ff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-hover: 0 14px 50px rgba(0,0,0,0.6);
  --transition: 0.25s ease;
  --max-width: 1100px;
  --body-bg: radial-gradient(circle at top, #10172a 0%, #050816 60%, #00010a 100%);
}

/* =========================================================
   LIGHT MODE VARIABLES + OVERRIDES
========================================================= */

:root[data-theme="light"] {
  --bg: #f1f5f9;
  --bg-alt: #e0e5ef;
  --text: #0b1220;
  --muted: #4b5563;
  --card: #ffffff;
  --border: #d1d5db;
  --accent: #ef4444;
  --accent2: #2563eb;

  --body-bg: radial-gradient(
    circle at top,
    #f3f4f6 0%,
    #e5e7eb 40%,
    #f8fafc 100%
  );
}

/* Body background */
[data-theme="light"] body {
  background: var(--body-bg);
}

[data-theme="light"] body::before {
  opacity: 0.18;
  filter: blur(16px);
}

/* Weather search bar */
[data-theme="light"] .weather-search-input {
  background: #ffffff !important;
  border-color: #d1d5db !important;
  color: #0f172a !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Search icon */
[data-theme="light"] .weather-search-icon {
  color: #475569 !important;
}

/* GPS button */
[data-theme="light"] .weather-gps-btn {
  background: #ffffff !important;
  border-color: var(--accent2) !important;
  color: #0f172a !important;
}

/* Hourly weather chips */
[data-theme="light"] .weather-hour-chip {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Weather cards */
[data-theme="light"] .weather-card {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  color: #0f172a !important;
}

/* Footer (light mode) */
[data-theme="light"] .site-footer {
  background: linear-gradient(to top, #eef2f7, #ffffff) !important;
  border-top: 1px solid #e2e8f0;
}

/* Footer links in light mode */
[data-theme="light"] .footer-links-row a {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #4b5563;
}

/* Modal overlay light mode */
[data-theme="light"] .modal {
  background: rgba(15, 23, 42, 0.25);
}

/* =========================
   RESET
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: -20% -10%;
  background:
    radial-gradient(600px 380px at 10% 20%, rgba(78, 166, 255, 0.28), transparent 60%),
    radial-gradient(700px 420px at 90% 10%, rgba(255, 151, 92, 0.22), transparent 62%),
    radial-gradient(520px 360px at 70% 80%, rgba(255, 92, 92, 0.18), transparent 60%);
  z-index: -1;
  filter: blur(10px);
  animation: aurora-drift 18s ease-in-out infinite;
  pointer-events: none;
}

h1,
h2,
h3,
.section-title,
.logo {
  font-family: "Newsreader", "DM Sans", serif;
  letter-spacing: -0.01em;
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  background: #0b1220;
  color: #f8fafc;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  transform: translateY(-120%);
  transition: transform 0.2s ease;
  z-index: 20;
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* PAGE WRAPPER */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* NAVBAR */
.navbar {
  width: 100%;
  padding: 18px 0;
  display: flex;
  justify-content: center;
}

.navbar-inner {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 720px) {
  .navbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .navbar-inner > div {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .navbar-inner > div .nav-btn,
  .navbar-inner > div select {
    width: 100%;
    justify-content: center;
  }
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent2);
  text-shadow: 0 0 12px rgba(78, 166, 255, 0.7);
}

.nav-btn {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: var(--transition);
  margin-left: 8px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.45);
}

select.nav-btn {
  appearance: none;
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.nav-btn.accent {
  background: linear-gradient(135deg, #ff6b6b, #ff8f5f);
  color: #fff;
}

.nav-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: #fff;
  transform: translateY(-2px);
}

[data-theme="light"] .nav-btn {
  background: #ffffff;
  color: #111827;
  border-color: #e5e7eb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .nav-btn:hover {
  background: #f3f4f6;
  color: #0b1220;
}

.nav-btn[disabled],
.nav-btn.nav-btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* HERO */
.hero {
  width: 100%;
  padding: 70px 0 40px;
  text-align: center;
  animation: hero-rise 0.9s ease both;
}

.hero h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(120deg, #f8fafc 0%, #a5d8ff 45%, #ffd2a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 14px 30px rgba(14, 165, 233, 0.18);
}

.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 520px;
  margin: 10px auto 0;
  animation: hero-fade 1.1s ease both;
}

.hero-subtle {
  font-size: 14px;
  color: rgba(148,163,184,0.9);
  max-width: 640px;
  margin: 10px auto 0;
}

[data-theme="light"] .hero h2 {
  color: #0b1220;
  background: none;
  text-shadow: none;
}

@media (max-width: 720px) {
  .hero {
    padding: 46px 0 26px;
    text-align: left;
  }

  .hero h2 {
    font-size: 30px;
  }

  .hero p,
  .hero-subtle {
    margin-left: 0;
    margin-right: 0;
  }

  .cta-btn {
    width: 100%;
  }

  .app-links {
    justify-content: flex-start;
  }
}

/* TOP NEWS LAYOUT */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 24px;
  margin: 26px 0 10px;
  align-items: start;
}

.news-main,
.news-side {
  display: grid;
  gap: 22px;
}

.news-layout .live-strip {
  margin-top: 0;
  grid-template-columns: 1fr;
}

.news-layout .unique-section,
.news-layout .alerts-strip,
.news-layout .tips-section {
  margin-top: 0;
}

.news-side .impact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* TRUST SECTION */
.trust-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 12px 28px rgba(2,6,23,0.4);
}

.trust-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: start;
}

.trust-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.9);
}

.trust-text {
  font-size: 13px;
  color: var(--muted);
}

.trust-link {
  margin-top: 6px;
}

.trust-inline-link {
  color: var(--accent2);
  text-decoration: none;
}

.trust-inline-link:hover {
  text-decoration: underline;
}

[data-theme="light"] .trust-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

/* NEWS SIDEBAR STACK */
.news-side .weather-section,
.news-side .tools-section {
  margin-top: 0;
}

.news-side .tools-grid {
  grid-template-columns: 1fr;
}

.news-side .weather-header-row {
  align-items: flex-start;
  flex-direction: column;
}

.news-side .weather-header-actions {
  width: 100%;
}

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

  .news-layout .live-strip {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 720px) {
  .news-layout {
    gap: 16px;
  }

  .news-main,
  .news-side {
    gap: 16px;
  }

}

.cta-btn {
  margin-top: 20px;
  background: linear-gradient(135deg, #ff6b6b, #ff8f5f);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  box-shadow: 0 12px 30px rgba(255, 107, 107, 0.3);
  transition: var(--transition);
}

.cta-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  transform: translateY(-3px) scale(1.02);
}

[data-theme="light"] .cta-btn {
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.25);
}

.app-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.app-link {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.45);
  transition: var(--transition);
}

.app-link:hover {
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-2px);
}

.app-soon {
  font-size: 14px;
  color: var(--muted);
}

[data-theme="light"] .app-link {
  background: #ffffff;
  color: #0b1220;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

/* SECTION TITLE */
.section-title {
  margin-top: 40px;
  margin-bottom: 16px;
  font-size: 28px;
  font-weight: 700;
  color: #e2e8f0;
  text-shadow: 0 6px 20px rgba(56, 189, 248, 0.15);
}

[data-theme="light"] .section-title {
  color: #0b1220;
  text-shadow: none;
}

/* FEATURES */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(10,16,28,0.95));
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(2,6,23,0.5);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2,6,23,0.6);
}

.feature-card p {
  color: var(--muted);
  font-size: 14px;
}

.feature-card h3 {
  color: #e2e8f0;
  text-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

[data-theme="light"] .feature-card {
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .feature-card h3 {
  color: #0b1220;
  text-shadow: none;
}

/* ===========================
   LIVE STRIP
=========================== */

.live-strip {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.alerts-strip {
  margin-top: 22px;
  background: linear-gradient(180deg, rgba(12,18,30,0.98), rgba(9,14,24,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 16px;
  animation: section-in 0.7s ease both;
}

.alerts-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .alerts-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.alerts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.alert-pill {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  animation: pill-in 0.5s ease both;
}

.alerts-row .alert-pill:nth-child(2) { animation-delay: 60ms; }
.alerts-row .alert-pill:nth-child(3) { animation-delay: 120ms; }
.alerts-row .alert-pill:nth-child(4) { animation-delay: 180ms; }
.alerts-row .alert-pill:nth-child(5) { animation-delay: 240ms; }

[data-theme="light"] .alerts-strip {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .alert-pill {
  background: #f8fafc;
}

.alert-pill:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.18);
}

.alert-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
}

.alert-title {
  font-size: 14px;
  font-weight: 600;
}

.alert-source {
  font-size: 12px;
  color: var(--muted);
}

/* ===========================
   UNIQUE EDITORIAL BLOCKS
=========================== */

.unique-section {
  margin-top: 22px;
  background: linear-gradient(180deg, rgba(12,18,30,0.98), rgba(9,14,24,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 18px;
  animation: section-in 0.7s ease both;
}

.unique-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.witness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.witness-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.35);
  cursor: pointer;
  animation: card-in 0.6s ease both;
}

.witness-card:hover {
  border-color: rgba(78, 166, 255, 0.6);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.2);
  transform: translateY(-3px);
}

.witness-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.witness-time {
  font-size: 12px;
  color: var(--muted);
}

.witness-card h4 {
  font-size: 16px;
  margin: 0;
  color: #e2e8f0;
}

.witness-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.witness-source {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.impact-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 6px;
  text-align: left;
  box-shadow: 0 8px 24px rgba(2,6,23,0.35);
}

.impact-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.impact-value {
  font-size: 26px;
  font-weight: 700;
  color: #e2e8f0;
}

.impact-delta {
  font-size: 12px;
  color: var(--muted);
}

.impact-delta.up {
  color: #22c55e;
}

.impact-delta.down {
  color: #f97316;
}

.impact-delta.same {
  color: #38bdf8;
}

.digest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.digest-list li {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  box-shadow: 0 6px 18px rgba(2,6,23,0.3);
}

.digest-item {
  cursor: pointer;
  transition: var(--transition);
}

.digest-item:hover {
  border-color: var(--accent2);
}

.digest-time {
  font-size: 12px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.digest-text {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
}

.digest-meta {
  font-size: 12px;
  color: #94a3b8;
}

/* TOP NEWS */
.top-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.top-news-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  cursor: pointer;
  transition: var(--transition);
  align-items: center;
  animation: card-in 0.6s ease both;
}

.top-news-grid .top-news-card:nth-child(2) { animation-delay: 60ms; }
.top-news-grid .top-news-card:nth-child(3) { animation-delay: 120ms; }
.top-news-grid .top-news-card:nth-child(4) { animation-delay: 180ms; }

.top-news-card:hover {
  border-color: var(--accent2);
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.18);
}

.top-news-lead {
  grid-column: 1 / -1;
  grid-template-columns: 1.2fr 1fr;
}

.top-news-media {
  height: 110px;
  border-radius: 14px;
  overflow: hidden;
}

.top-news-media img,
.top-news-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(34,197,94,0.15));
}

.top-news-placeholder {
  min-height: 110px;
  position: relative;
  display: grid;
  place-items: center;
  color: rgba(226, 232, 240, 0.7);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.top-news-placeholder::after {
  content: "19NEWS";
}

.top-news-body h4 {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.top-news-body p {
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.top-news-source {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
  display: inline-block;
  margin-bottom: 6px;
}

[data-theme="light"] .top-news-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .top-news-body p {
  color: #475569;
}

[data-theme="light"] .top-news-placeholder {
  color: rgba(15, 23, 42, 0.55);
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(14,165,233,0.1));
}

[data-theme="light"] .top-news-source {
  color: #2563eb;
}

@media (max-width: 900px) {
  .top-news-grid {
    grid-template-columns: 1fr;
  }

  .top-news-card,
  .top-news-lead {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .top-news-card {
    padding: 10px;
  }

  .top-news-media {
    height: 160px;
  }

  .top-news-body h4 {
    font-size: 16px;
  }
}

/* CATEGORY / CITY PAGES */
.news-page-hero {
  padding: 40px 0 18px;
  text-align: left;
}

.news-page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  color: #38bdf8;
}

.news-page-title {
  font-size: 34px;
  line-height: 1.1;
  margin-top: 8px;
}

.news-page-subtitle {
  color: var(--muted);
  margin-top: 10px;
  max-width: 640px;
}

[data-theme="light"] .news-page-kicker {
  color: #2563eb;
}

.news-section {
  margin-top: 18px;
}

.news-list {
  display: grid;
  gap: 12px;
}

.news-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  animation: card-in 0.6s ease both;
}

.news-list .news-card:nth-child(2) { animation-delay: 60ms; }
.news-list .news-card:nth-child(3) { animation-delay: 120ms; }
.news-list .news-card:nth-child(4) { animation-delay: 180ms; }

.news-card:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.18);
}

.news-card h4 {
  font-size: 16px;
  margin-bottom: 6px;
}

.news-meta {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.news-summary {
  font-size: 13px;
  color: var(--muted);
}

[data-theme="light"] .news-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .news-meta {
  color: #64748b;
}

[data-theme="light"] .news-summary {
  color: #475569;
}

/* EMERGENCY ALERTS */
.emergency-list {
  display: grid;
  gap: 12px;
}

.emergency-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.emergency-search {
  flex: 1 1 220px;
  min-width: 200px;
}

.emergency-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.emergency-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  animation: card-in 0.6s ease both;
}

.emergency-card:hover {
  border-color: rgba(255, 92, 92, 0.6);
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.2);
  transform: translateY(-3px);
}

.emergency-list .emergency-card:nth-child(2) { animation-delay: 60ms; }
.emergency-list .emergency-card:nth-child(3) { animation-delay: 120ms; }
.emergency-list .emergency-card:nth-child(4) { animation-delay: 180ms; }

.emergency-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f97316;
}

.emergency-card h4 {
  font-size: 15px;
}

.emergency-card p {
  font-size: 13px;
  color: var(--muted);
}

[data-theme="light"] .emergency-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .emergency-meta {
  color: #ea580c;
}

@media (max-width: 720px) {
  .emergency-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .emergency-pagination {
    justify-content: space-between;
  }
}

[data-theme="light"] .unique-section {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .witness-card,
[data-theme="light"] .impact-card,
[data-theme="light"] .digest-list li {
  background: #f8fafc;
}

[data-theme="light"] .witness-card h4,
[data-theme="light"] .impact-value {
  color: #0b1220;
}

.tips-section {
  margin-top: 22px;
}

.tips-card {
  background: linear-gradient(180deg, rgba(14,20,34,0.98), rgba(10,16,28,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 18px;
  display: grid;
  gap: 10px;
}

[data-theme="light"] .tips-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

/* ===========================
   FLIGHTS
=========================== */

.flights-section {
  margin-top: 22px;
  background: linear-gradient(180deg, rgba(12,18,30,0.98), rgba(9,14,24,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 16px;
}

.flights-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

@media (max-width: 720px) {
  .flights-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.flights-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.flights-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.flight-card {
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

[data-theme="light"] .flights-section {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .flight-card {
  background: #f8fafc;
}

.flight-call {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.flight-meta {
  font-size: 12px;
  color: var(--muted);
}

/* ===========================
   TOOLS
=========================== */

.tools-section {
  margin-top: 22px;
}

.tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 720px) {
  .tools-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.tools-card {
  background: linear-gradient(180deg, rgba(14,20,34,0.98), rgba(10,16,28,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 16px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tools-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tools-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.6);
}

.tools-card:hover::before {
  opacity: 1;
}

.tools-card h4 {
  margin: 0;
  color: #e2e8f0;
}

[data-theme="light"] .tools-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .tools-card h4 {
  color: #0b1220;
}

.tools-card.large h2 {
  margin: 0 0 10px;
}

.tools-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 16px 60px;
  display: grid;
  gap: 18px;
  position: relative;
}

.tools-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(251, 191, 36, 0.12), transparent 45%);
  pointer-events: none;
}

.tools-page > * {
  position: relative;
  z-index: 1;
}

.tools-card.large {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(4, 10, 20, 0.98));
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.65);
  animation: toolRise 0.7s ease both;
}

.tools-card.large::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(56, 189, 248, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tools-card.large:hover::after {
  opacity: 1;
}

.tools-card.large h2 {
  font-size: 20px;
  letter-spacing: 0.3px;
  color: #f8fafc;
}

.tools-card.large .tools-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tools-card.large .btn-submit {
  width: fit-content;
  justify-self: start;
}

[data-theme="light"] .tools-card.large {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .tools-card.large h2 {
  color: #0b1220;
}

.tools-card .nav-btn {
  width: fit-content;
}

@keyframes toolRise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tools-result {
  font-size: 16px;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.live-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.live-tile h3 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #e2e8f0;
}

[data-theme="light"] .live-tile {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .live-tile h3 {
  color: #0b1220;
}

.clock-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.clock-select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
}

.clock-row,
.market-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.clock-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}

[data-theme="light"] .clock-item,
[data-theme="light"] .market-item {
  background: #f8fafc;
}

.clock-city {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.clock-time {
  font-size: 16px;
  font-weight: 600;
}

.market-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.market-label {
  font-size: 12px;
  color: var(--muted);
}

.market-price {
  font-size: 16px;
  font-weight: 600;
}

.market-change {
  font-size: 12px;
}

.change-up {
  color: #22c55e;
}

.change-down {
  color: #ef4444;
}

/* ===========================
   WEATHER SECTION
=========================== */

.weather-section {
  margin-top: 20px;
}

/* Title + search row */
.weather-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .weather-header-row {
    align-items: stretch;
  }

  .weather-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .weather-search-shell {
    max-width: 100%;
  }

  .weather-gps-btn {
    width: 100%;
    margin-left: 0;
  }
}

/* Pill search wrapper */
.weather-search-shell {
  position: relative;
  max-width: 360px;
  width: 100%;
}

/* Magnifying glass icon */
.weather-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  opacity: 0.9;
}

/* Main search input */
.weather-search-input {
  width: 100%;
  padding: 11px 16px 11px 44px; /* space for icon */
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.8)
  );
  color: var(--text);
  font-size: 15px;
  outline: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.weather-search-input::placeholder {
  color: var(--muted);
  opacity: 0.9;
}

/* BOM-style weather panel */
.weather-bom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.weather-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

/* Weather card */
.weather-card {
  position: relative;
  background: linear-gradient(140deg, rgba(16, 24, 44, 0.95), rgba(8, 12, 24, 0.98));
  padding: 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 28px rgba(2,6,23,0.45);
  transition: var(--transition);
  text-align: left;
  overflow: hidden;
  animation: weather-card-in 0.7s ease both;
}

.weather-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(2,6,23,0.6), 0 0 0 1px rgba(78, 166, 255, 0.2);
}

.weather-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 120px at 80% 10%, rgba(78, 166, 255, 0.22), transparent 60%);
  pointer-events: none;
  animation: weather-glow 6s ease-in-out infinite;
}

.weather-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.weather-icon {
  font-size: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  animation: weather-float 4s ease-in-out infinite;
}

.weather-temp {
  font-size: 30px;
  font-weight: 700;
  margin-top: 6px;
}

.weather-desc,
.weather-city {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.weather-extra {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.weather-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.weather-chip {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: rgba(226, 232, 240, 0.85);
  background: rgba(15, 23, 42, 0.6);
}

.weather-warnings {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b1220;
  box-shadow: 0 12px 28px rgba(2,6,23,0.45);
}

.weather-warnings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f4d317;
  color: #0b1220;
  font-weight: 700;
}

.weather-warnings-body {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.weather-warnings-count {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.weather-warnings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.weather-warnings-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #e2e8f0;
}

.weather-warnings-item .warn-count {
  color: #f4d317;
  font-weight: 700;
  text-align: right;
}

[data-theme="light"] .weather-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .weather-warnings {
  background: #ffffff;
}

[data-theme="light"] .weather-warnings-body {
  color: #0f172a;
}

[data-theme="light"] .weather-warnings-count {
  color: #475569;
}

[data-theme="light"] .weather-warnings-item {
  color: #0f172a;
}

[data-theme="light"] .weather-warnings-item .warn-count {
  color: #b45309;
}

@keyframes weather-card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes weather-glow {
  0% {
    opacity: 0.35;
    transform: translate3d(-2%, -1%, 0);
  }
  50% {
    opacity: 0.75;
    transform: translate3d(2%, 1%, 0);
  }
  100% {
    opacity: 0.35;
    transform: translate3d(-2%, -1%, 0);
  }
}

@keyframes weather-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-card,
  .weather-card::after,
  .weather-icon {
    animation: none;
  }
}

/* First-load animation */
.first-load .page-wrapper {
  animation: page-intro 0.9s ease both;
}

@keyframes page-intro {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .first-load .page-wrapper {
    animation: none;
  }
}

/* Hint text */
.hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
/* Feed header row (title + search) */
.feed-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.feed-window {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 12px;
  flex-wrap: wrap;
}

.feed-window-badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(78, 166, 255, 0.4);
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
}

.feed-window-select {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
}

/* 3D tilt cards */
.tilt-card {
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--tilt-lift, 0px));
  transform-style: preserve-3d;
  will-change: transform;
}

.top-news-card.tilt-card:hover {
  --tilt-lift: -3px;
}

.feed-card.tilt-card:hover {
  --tilt-lift: -6px;
}

@media (prefers-reduced-motion: reduce) {
  .tilt-card {
    transform: none;
  }
}

/* Feed search shell */
.feed-search-shell {
  position: relative;
  max-width: 320px;
  width: 100%;
}

/* Search icon */
.feed-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.85;
  pointer-events: none;
}

/* Search input */
.feed-search-input {
  width: 100%;
  padding: 9px 14px 9px 40px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.96),
    rgba(15, 23, 42, 0.88)
  );
  color: var(--text);
  font-size: 14px;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

/* Light theme override for feed search */
[data-theme="light"] .feed-search-input {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  color: #0f172a;
}
[data-theme="light"] .feed-search-icon {
  color: #6b7280;
}

/* Make feed cards feel more ‘headline’ */
.feed-card {
  display: flex;
  align-items: center;
  min-height: 90px;
}

.feed-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #f8fafc;
}

@media (max-width: 640px) {
  .feed-header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-search-shell {
    max-width: 100%;
  }
}


/* ===========================
   SPORTS
=========================== */

.sports-section {
  margin-top: 40px;
}

.sports-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.sport-card {
  background: var(--card);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.sports-live {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

@media (max-width: 720px) {
  .sports-live {
    grid-template-columns: 1fr;
  }
}

.sport-live-card {
  background: linear-gradient(180deg, rgba(14,20,34,0.98), rgba(10,16,28,0.98));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 34px rgba(2,6,23,0.5);
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

[data-theme="light"] .sport-live-card {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .sport-league {
  color: #2563eb;
}

[data-theme="light"] .sport-teams,
[data-theme="light"] .sport-headline {
  color: #0b1220;
}

[data-theme="light"] .sport-score {
  color: #0f172a;
}

[data-theme="light"] .sport-status {
  color: #475569;
}

.sport-league {
  font-size: 12px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sport-teams {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}

.sport-headline {
  font-size: 15px;
  font-weight: 600;
  color: #f8fafc;
}

.sport-headline a {
  color: inherit;
  text-decoration: none;
}

.sport-headline a:hover {
  text-decoration: underline;
}

.sport-score {
  font-size: 18px;
  font-weight: 700;
}

.sport-status {
  font-size: 12px;
  color: var(--muted);
}

/* ===========================
   FEED
=========================== */

.feed-section {
  margin-top: 40px;
}

.feed-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.feed-advanced {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

@media (max-width: 720px) {
  .feed-header-row {
    align-items: stretch;
  }

  .feed-search-shell {
    width: 100%;
  }

  .feed-filters,
  .feed-advanced {
    gap: 8px;
  }

  .feed-advanced {
    flex-direction: column;
    align-items: stretch;
  }

  .city-filter {
    margin-top: 8px;
  }
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.filter-chip {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  transition: var(--transition);
}

.filter-chip.active,
.filter-chip:hover {
  background: var(--accent2);
  color: #fff;
}

.city-filter {
  margin-bottom: 16px;
}

.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

/* Feed cards */
.feed-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.feed-day {
  grid-column: 1 / -1;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.feed-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.98), rgba(8,12,22,0.98));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: 0 14px 36px rgba(2,6,23,0.55);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  animation: card-in 0.6s ease both;
}

.feed-container .feed-card:nth-child(2) { animation-delay: 60ms; }
.feed-container .feed-card:nth-child(3) { animation-delay: 120ms; }
.feed-container .feed-card:nth-child(4) { animation-delay: 180ms; }

.feed-card--image {
  flex-direction: column;
  align-items: stretch;
}

.feed-card--image .feed-content {
  width: 100%;
}

.feed-card:hover {
  box-shadow: 0 24px 54px rgba(2,6,23,0.7), 0 0 0 1px rgba(78, 166, 255, 0.25);
}

.feed-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.feed-content {
  padding: 16px;
}

.feed-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.feed-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.verification-badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(2,6,23,0.35);
}

.badge-verified {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.badge-unverified {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
}

.badge-pending {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.badge-rejected {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.badge-emergency {
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.12);
}

.badge-source {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
}

.feed-report-btn {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15,23,42,0.8);
  color: #cbd5f5;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(2,6,23,0.35);
}

.feed-report-btn:hover {
  border-color: #38bdf8;
  color: #38bdf8;
}

[data-theme="light"] .feed-card {
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .feed-content h3 {
  color: #0b1220;
}

[data-theme="light"] .verification-badge {
  background: #f8fafc;
}

[data-theme="light"] .feed-report-btn {
  background: #ffffff;
  color: #334155;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

/* ===========================
   MODALS & FORMS
=========================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  z-index: 999;
}

.modal.hidden {
  display: none;
}

.hidden {
  display: none !important;
}

.modal-content {
  background: var(--card);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-hover);
  width: 100%;
  max-width: 620px;
}

.modal-content.large {
  max-width: 650px;
}

.modal-content.small {
  max-width: 420px;
}

.modal-close {
  float: right;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

/* Detail */
.detail-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin: 14px 0;
}

.detail-meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.detail-report-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.detail-profile-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.detail-edit-btn,
.detail-delete-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.detail-report-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.detail-profile-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.detail-edit-btn:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.detail-delete-btn:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.detail-emergency {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.1);
  font-size: 13px;
}

.detail-map {
  width: 100%;
  height: 240px;
  border: 0;
  border-radius: 12px;
  margin-top: 12px;
}

.profile-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.profile-post-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-alt);
  cursor: pointer;
  transition: var(--transition);
}

.profile-post-card:hover {
  border-color: var(--accent2);
  box-shadow: var(--shadow-soft);
}

.profile-post-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-input,
.form-textarea,
.form-file {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text);
}

.form-textarea {
  height: 130px;
  resize: vertical;
}

.form-message {
  font-size: 13px;
  color: var(--accent);
}

.form-link {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--accent2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.form-link:hover {
  text-decoration: underline;
}

.weather-hourly {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weather-hour-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 12px;
}

.weather-gps-btn {
  margin-left: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent2);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.weather-gps-btn:hover:not(:disabled) {
  background: var(--accent2);
  color: #fff;
}

/* Buttons */
.btn-submit {
  background: linear-gradient(135deg, #ff6b6b, #ff8f5f);
  border: none;
  color: #fff;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  box-shadow: 0 12px 30px rgba(255, 107, 107, 0.3);
}

.btn-submit:hover {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  transform: translateY(-2px);
}

[data-theme="light"] .btn-submit {
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.2);
}

/* ========================= */
/*          FOOTER           */
/* ========================= */

.site-footer {
  width: 100%;
  margin-top: 80px;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(3,7,18,1));
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset: auto 18px 18px 18px;
  z-index: 30;
}

.cookie-card {
  max-width: 840px;
  margin: 0 auto;
  background: rgba(12, 18, 30, 0.96);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(2,6,23,0.6);
  padding: 16px 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.cookie-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.cookie-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .cookie-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: #ff4d4d;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.8);
  animation: pulse 1.2s infinite ease-in-out;
  vertical-align: middle;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}


/* columns */
.footer-col {
  flex: 1;
}

/* left/right layout */
.footer-col-left {
  text-align: left;
}

.footer-col-right {
  text-align: right;
}

/* brand / tagline */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent2);
  text-shadow: 0 0 10px rgba(78,166,255,0.8);
}

.footer-badge {
  font-size: 11px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(248,250,252,0.18);
  background: rgba(15,23,42,0.85);
  letter-spacing: 0.08em;
  color: #e5e7eb;
}

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
}

/* links row */
.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-links-row a {
  text-decoration: none;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.9);
  transition: 0.2s ease;
}

.footer-links-row a:hover {
  color: #fff;
  border-color: var(--accent2);
  box-shadow: 0 0 14px rgba(78,166,255,0.7);
}

/* meta row */
.footer-meta-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.9;
}

.footer-dot {
  opacity: 0.6;
}

/* Stack columns on small screens */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-col-right {
    text-align: left;
  }

  .footer-links-row,
  .footer-meta-row {
    justify-content: flex-start;
  }
}

/* ===========================
   RESPONSIVE – HERO ETC
=========================== */

@media (max-width: 640px) {
  .hero h2 {
    font-size: 28px;
  }

  .section-title {
    margin-top: 30px;
  }

  .navbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .nav-btn {
    margin-left: 0;
  }

  .live-strip,
  .alerts-row,
  .flights-row,
  .sports-live,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .clock-settings {
    grid-template-columns: 1fr 1fr;
  }
}
.detail-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.article-body {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.7;
}

.article-body p {
  margin-bottom: 1em;
}

.article-img {
  margin: 18px 0;
}

.article-img img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

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

/* left / right */
.article-img-left img,
.article-img-right img {
  max-width: 45%;
}

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

.article-img-right {
  text-align: right;
}

/* mobile: always full width */
@media (max-width: 768px) {
  .article-img-left img,
  .article-img-right img {
    max-width: 100%;
  }

  .article-img-left,
  .article-img-right {
    text-align: center;
  }
}
/* Detail page shell */
.detail-page-shell {
  max-width: 800px;
  margin: 20px auto 60px;
}

/* Article layout */
.detail-article {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 22px 20px 26px;
  box-shadow: var(--shadow-soft);
}

/* AI summary card */
.ai-summary-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 12px 14px 14px;
  margin-bottom: 18px;
}

:root[data-theme="light"] .ai-summary-card {
  background: #f9fafb;
  border-color: #e5e7eb;
}

.ai-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent2);
  margin-bottom: 4px;
}

.ai-summary-text {
  font-size: 14px;
  color: var(--text);
}

/* Detail header */
.detail-header {
  margin-bottom: 16px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.detail-meta {
  font-size: 13px;
  color: var(--muted);
}

/* Detail body */
.detail-body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
}

.ai-panel {
  margin-top: 14px;
  background: rgba(15,23,42,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: 0 10px 26px rgba(2,6,23,0.35);
}

.ai-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 6px;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.ai-chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2,6,23,0.35);
  color: #cbd5f5;
}

[data-theme="light"] .ai-panel {
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .ai-title {
  color: #2563eb;
}

[data-theme="light"] .ai-chip {
  background: #f1f5f9;
  color: #1e293b;
}

.detail-link-wrap {
  margin-top: 18px;
}

.detail-link {
  color: var(--accent2);
  text-decoration: none;
  font-size: 14px;
}

.detail-link:hover {
  text-decoration: underline;
}
.article {
  max-width: 820px;
  margin: 0 auto 40px;
}

.article-header h2 {
  font-size: 30px;
  margin-bottom: 6px;
}

.article-hero {
  margin: 18px 0 24px;
  border-radius: 16px;
}

.article-body {
  font-size: 16px;
  line-height: 1.7;
}

/* gallery layout */
.article-gallery {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-image {
  max-width: 100%;
}

.article-image img {
  width: 100%;
  display: block;
  border-radius: 14px;
}

/* Alternate left / right layout on large screens */
@media (min-width: 768px) {
  .article-image-left img {
    max-width: 65%;
    margin-right: auto;
  }

  .article-image-right img {
    max-width: 65%;
    margin-left: auto;
  }
}
/* ARTICLE PAGE LAYOUT */
.article-shell {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 24px 24px 28px;
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin: 20px auto 40px;
}

.article-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 4px;
}

.article-header .detail-meta {
  font-size: 13px;
  color: var(--muted);
}

/* AI summary card */
.article-ai-card {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.article-ai-card h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Hero image */
.article-hero-image {
  margin-top: 22px;
}

.article-hero-image img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
}

/* Blocks */
.article-body {
  margin-top: 20px;
}

.article-block {
  margin-top: 18px;
}

/* text */
.article-block-text p {
  font-size: 15px;
}

/* images */
.article-block-image img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.article-caption {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* alignment */
.article-image-full {
  max-width: 100%;
}

.article-image-left {
  max-width: 70%;
  margin-right: auto;
}

.article-image-right {
  max-width: 70%;
  margin-left: auto;
}
.article-block-image {
  margin: 20px 0;
}

.article-block-image img {
  width: 100%;
  border-radius: 10px;
}

/* LEFT */
.article-align-left img {
  float: left;
  width: 45%;
  margin: 0 20px 20px 0;
}

/* RIGHT */
.article-align-right img {
  float: right;
  width: 45%;
  margin: 0 0 20px 20px;
}

/* FULL */
.article-align-full img {
  width: 100%;
  float: none;
}

.article-block-text {
  margin: 20px 0;
  clear: both;
}

/* Motion */
@keyframes section-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pill-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  50% {
    transform: translate3d(2%, 1%, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
  .alerts-strip,
  .alert-pill,
  .unique-section,
  .witness-card,
  .top-news-card,
  .news-card,
  .emergency-card,
  .feed-card {
    animation: none;
  }
}
