* {
  box-sizing: border-box;
}

@font-face {
  font-family: "EchoesElemental";
  src: url("../fonts/Elemental%20End.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "EchoesEurostile";
  src: url("../fonts/eurostile.ttf") format("truetype");
  font-display: swap;
}

:root {
  --calmnews-content-width: 850px;
  --calmnews-frame-width: 1100px;
  --echoes-bg: #02070b;
  --echoes-bg-soft: #041019;
  --echoes-panel: #071019;
  --echoes-panel-2: #0a1620;
  --echoes-panel-3: #0b1d29;
  --echoes-line: rgba(46, 225, 255, .24);
  --echoes-line-strong: rgba(66, 232, 255, .72);
  --echoes-text: #e8fbff;
  --echoes-muted: #84a6b2;
  --echoes-cyan: #36e7ff;
  --echoes-cyan-soft: rgba(54, 231, 255, .12);
  --echoes-amber: #f0b94d;
  --echoes-coral: #ff7468;
  --echoes-shadow: rgba(0, 0, 0, .42);
}

html {
  background: var(--echoes-bg);
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background:
    linear-gradient(120deg, rgba(54,231,255,.07), transparent 28%, rgba(240,185,77,.04) 72%, transparent),
    repeating-linear-gradient(0deg, rgba(80,230,255,.028) 0, rgba(80,230,255,.028) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at 50% -18%, rgba(54,231,255,.13), transparent 42%),
    var(--echoes-bg);
  color: var(--echoes-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 44px 0 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(54,231,255,.055) 50%, transparent 100%),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(54,231,255,.035) 80px),
    repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(54,231,255,.026) 80px);
  opacity: .42;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
  z-index: -1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(3, 5, 10, .96);
  border-bottom: 1px solid rgba(54, 231, 255, .18);
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: var(--calmnews-frame-width);
  margin: 0 auto;
  min-height: 80px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  line-height: 1;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #f6fbff;
  font-synthesis: none;
  text-shadow: 0 0 14px rgba(54, 231, 255, .24);
  white-space: nowrap;
}

.brand-title {
  font-family: "EchoesElemental", system-ui, sans-serif;
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 400;
  line-height: .86;
  letter-spacing: .36em;
}

.brand-slogan {
  margin-top: 6px;
  font-family: "EchoesEurostile", system-ui, sans-serif;
  font-size: clamp(10.5px, .95vw, 13.5px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .40em;
}

.nav {
  flex: 0 1 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a {
  color: rgba(232, 251, 255, .78);
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.nav a:hover,
.nav a.primary {
  color: #ffffff;
  border-bottom-color: var(--echoes-cyan);
  text-shadow: 0 0 12px rgba(54,231,255,.42);
}

.wrap {
  width: 100%;
  flex: 1 0 auto;
}

.hero {
  padding: 10px 0 24px;
}

.page-shell {
  width: 100%;
  max-width: var(--calmnews-frame-width);
  margin: 0 auto;
  padding: 24px 16px 36px;
  flex: 1 0 auto;
}

.page-frame {
  width: 100%;
  padding: clamp(18px, 3.5vw, 40px) clamp(14px, 8vw, 122px) 32px;
  background: linear-gradient(145deg, rgba(7,22,34,.96), rgba(4,13,20,.98));
  border: 1px solid var(--echoes-line);
  border-radius: 8px;
  box-shadow: 0 18px 48px var(--echoes-shadow), inset 0 0 32px rgba(54,231,255,.035);
}

.page-panel {
  max-width: var(--calmnews-content-width);
  margin: 0 auto;
  background: rgba(5, 12, 18, .94);
  border: 1px solid rgba(54, 231, 255, .20);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.32);
}

.page-panel h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.18;
  color: #f3fdff;
}

.page-panel h2 {
  margin: 24px 0 10px;
  font-size: 18px;
  color: var(--echoes-cyan);
  letter-spacing: 0;
}

.page-panel p {
  color: rgba(232, 251, 255, .82);
  line-height: 1.55;
  margin: 0 0 14px;
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.source-card {
  background: rgba(3, 10, 16, .92);
  border: 1px solid rgba(54, 231, 255, .18);
  border-radius: 8px;
  padding: 12px;
  min-height: 104px;
}

.source-card strong {
  display: block;
  margin-bottom: 6px;
  color: #f3fdff;
}

.source-meta {
  color: var(--echoes-muted);
  font-size: 13px;
  line-height: 1.4;
}

.text-link {
  color: var(--echoes-cyan);
  text-decoration: none;
}

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

footer {
  max-width: var(--calmnews-frame-width);
  margin: 0 auto;
  padding: 0 16px 26px;
  color: var(--echoes-muted);
  font-size: 13px;
  width: 100%;
  flex: 0 0 auto;
}

.tagline {
  border-top: 1px solid rgba(54, 231, 255, .18);
  padding-top: 14px;
}

@media (max-width: 860px) {
  .topbar-inner {
    min-height: 0;
    padding: 10px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-title {
    font-size: clamp(28px, 8.2vw, 38px);
  }

  .brand-slogan {
    margin-top: 6px;
    font-size: clamp(9.5px, 2.8vw, 12.2px);
  }

  .nav {
    margin-left: 0;
    justify-content: flex-start;
    gap: 14px;
  }

  .nav a {
    font-size: 13px;
  }

  .page-shell {
    padding: 14px 10px 28px;
  }

  .page-frame {
    border-radius: 8px;
    padding: 12px;
  }

  .page-panel {
    border-radius: 8px;
    padding: 16px;
  }

  .page-panel h1 {
    font-size: 24px;
  }
}
