:root {
  color-scheme: light dark;
  --bg: #f6f2e8;
  --bg-alt: #fffdfa;
  --ink: #15130f;
  --muted: #5d564b;
  --line: rgba(28, 24, 18, 0.16);
  --accent: #ef4f24;
  --accent-warm: #fa7f32;
  --accent-green: #8ec92e;
  --card-shadow: 0 18px 50px rgba(40, 31, 18, 0.1);
  --signal-card-height: clamp(208px, 24vh, 234px);
  --display: "Outfit", "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(1100px 650px at 8% -12%, rgba(250, 127, 50, 0.2), transparent 62%),
    radial-gradient(900px 520px at 95% 4%, rgba(57, 114, 215, 0.12), transparent 64%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.ambient-layer::before,
.ambient-layer::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ambient-layer::before {
  background:
    radial-gradient(600px 280px at 15% 80%, rgba(239, 79, 36, 0.12), transparent 72%),
    radial-gradient(720px 280px at 85% 78%, rgba(142, 201, 46, 0.09), transparent 70%);
}

.ambient-layer::after {
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    -15deg,
    rgba(16, 12, 7, 0.1) 0 1px,
    transparent 1px 14px
  );
}

.topbar {
  width: min(1460px, 96vw);
  margin: 1.2rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: var(--display);
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  white-space: nowrap;
}

.brand-eye-letter {
  position: relative;
  display: inline-block;
  margin-right: -0.01em;
  line-height: 1;
}

.brand-eye-letter::after {
  content: "";
  position: absolute;
  width: 0.13em;
  height: 0.13em;
  border-radius: 50%;
  background: currentColor;
  left: 58%;
  top: 61%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.34rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(27, 21, 14, 0.13);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 22px rgba(31, 24, 16, 0.08);
  backdrop-filter: blur(6px);
}

.theme-label {
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #665a4a;
  font-weight: 600;
}

.theme-slider {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.theme-slider input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-track {
  width: 42px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(26, 18, 10, 0.18);
  background: linear-gradient(140deg, rgba(239, 79, 36, 0.18), rgba(250, 127, 50, 0.18));
  transition: background-color 180ms ease, border-color 180ms ease;
}

.theme-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(32, 21, 12, 0.28);
  transform: translateX(0);
  transition: transform 200ms ease;
}

.theme-slider input:checked + .theme-track {
  border-color: rgba(109, 156, 214, 0.45);
  background: linear-gradient(140deg, rgba(83, 128, 203, 0.44), rgba(41, 77, 142, 0.52));
}

.theme-slider input:checked + .theme-track .theme-thumb {
  transform: translateX(20px);
}

.theme-slider input:focus-visible + .theme-track {
  outline: 2px solid rgba(239, 79, 36, 0.62);
  outline-offset: 2px;
}

.status-chip {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 18, 12, 0.13);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  color: #564a3b;
  backdrop-filter: blur(6px);
}

.page-shell {
  width: min(1460px, 96vw);
  margin: 0.9rem auto 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.hero {
  max-width: 690px;
  margin-bottom: 0.25rem;
}

.kicker {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #665b4c;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.3vw, 3.7rem);
  line-height: 1.03;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-highlight {
  position: relative;
  display: inline-block;
  color: #db5f1e;
  background: linear-gradient(110deg, #ef4f24 0%, #fa7f32 46%, #cc3f1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy {
  margin: 1rem 0 1.3rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.65vw, 1.16rem);
  line-height: 1.6;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-warm) 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 79, 36, 0.35);
}

.btn.ghost {
  color: #352d22;
  border-color: rgba(35, 28, 20, 0.18);
  background: rgba(255, 255, 255, 0.6);
}

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

.btn:focus-visible {
  outline: 2px solid rgba(239, 79, 36, 0.58);
  outline-offset: 2px;
}

.pipeline {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(32, 24, 13, 0.12);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.84) 0%,
    rgba(255, 248, 236, 0.72) 44%,
    rgba(247, 248, 252, 0.74) 100%
  );
  box-shadow: var(--card-shadow);
  min-height: clamp(510px, 67vh, 790px);
  padding: clamp(1.6rem, 3.2vw, 3.35rem);
  display: grid;
  grid-template-columns:
    minmax(390px, 1.55fr)
    minmax(245px, 0.98fr)
    minmax(245px, 1fr)
    minmax(210px, 0.9fr);
  gap: clamp(0.95rem, 2vw, 1.8rem);
  align-items: center;
}

.pipeline::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 240px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 127, 50, 0.13) 0%, transparent 72%);
  pointer-events: none;
}

.floating-note {
  position: absolute;
  left: 50%;
  top: 1rem;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(22, 18, 12, 0.13);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.74rem;
  color: #554939;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #28b85c;
  box-shadow: 0 0 0 0 rgba(40, 184, 92, 0.42);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 184, 92, 0.42);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(40, 184, 92, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 184, 92, 0);
  }
}

#flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#flow-lines path {
  fill: none;
  stroke: url(#flowGradient);
  stroke-width: 2.3;
  stroke-linecap: round;
  opacity: 0.82;
}

#line-news,
#line-social,
#line-market,
#line-tv,
#line-satellite,
#line-webcam {
  stroke-dasharray: 8 10;
  animation: stream 16s linear infinite;
}

#line-social {
  stroke-width: 2.6;
  opacity: 0.95;
}

#line-tv {
  stroke-width: 2.45;
}

#line-satellite {
  stroke-width: 2.35;
  opacity: 0.9;
}

#line-webcam {
  stroke-width: 2.25;
  opacity: 0.88;
}

#line-core {
  stroke-width: 2.7;
  opacity: 0.95;
}

#line-trade {
  stroke-width: 2.7;
  opacity: 0.95;
}

@keyframes stream {
  to {
    stroke-dashoffset: -680;
  }
}

.column {
  position: relative;
  z-index: 2;
}

.sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: var(--signal-card-height);
  gap: 0.78rem;
  align-self: center;
  align-items: stretch;
}

.signal-card,
.core-card,
.trade-card,
.pnl-card {
  position: relative;
  padding: 0.95rem 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 28px rgba(29, 21, 14, 0.08);
}

.signal-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.signal-social,
.signal-market,
.signal-tv,
.signal-webcam {
  padding-bottom: 1.16rem;
}

.signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 14, 9, 0.13);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5b4d3d;
}

.signal-news {
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.96) 0%, rgba(255, 248, 236, 0.78) 100%);
}

.news-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.breaking-chip {
  padding: 0.15rem 0.43rem;
  border-radius: 5px;
  background: #201810;
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.news-desk {
  font-size: 0.72rem;
  color: #6a5d4d;
}

.news-headline {
  margin-top: 0.35rem;
  font-weight: 600;
  line-height: 1.35;
  min-height: 2.7em;
  max-height: 2.7em;
}

.news-meta {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #6d6150;
  font-size: 0.7rem;
}

.signal-social {
  background:
    linear-gradient(180deg, rgba(249, 252, 255, 0.97) 0%, rgba(241, 248, 255, 0.8) 100%);
}

.social-stream {
  margin-top: 0.45rem;
  margin-bottom: 0.14rem;
  border: 1px solid rgba(27, 44, 74, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.62rem 0.68rem 0.66rem;
}

.social-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.social-avatar {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #2e6ccb 0%, #6f9ff0 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.social-user,
.social-platform {
  margin: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.social-user {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f2b3f;
}

.social-platform {
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64728a;
}

.social-copy {
  margin: 0.55rem 0 0.62rem;
  color: #1f2c41;
  font-size: 0.86rem;
  line-height: 1.4;
  min-height: 2.7em;
  max-height: 2.7em;
  transition: opacity 200ms ease, transform 200ms ease;
}

.social-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: #64728a;
}

.social-foot strong {
  font-size: 0.78rem;
  color: #1f2c41;
}

.social-score {
  transition: opacity 200ms ease, transform 200ms ease;
}

.social-meter {
  margin-top: 0.4rem;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(56, 91, 148, 0.18);
  overflow: hidden;
}

.social-meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f8feb 0%, #2dbf76 100%);
  transition: width 360ms ease;
}

.social-swap {
  opacity: 0.15;
  transform: translateY(4px);
}

.signal-market {
  background:
    linear-gradient(180deg, rgba(248, 255, 245, 0.94) 0%, rgba(244, 251, 238, 0.8) 100%);
}

.market-contract {
  margin-top: 0.42rem;
  min-height: 2.7em;
  max-height: 2.7em;
  color: #1e2d13;
  font-weight: 600;
  line-height: 1.38;
}

.market-odds {
  margin-top: 0.56rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.market-side {
  border-radius: 10px;
  border: 1px solid rgba(25, 39, 13, 0.16);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.42rem 0.48rem;
}

.market-side span {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #61744d;
}

.market-side strong {
  display: block;
  margin-top: 0.16rem;
  font-family: var(--display);
  font-size: 1rem;
}

.market-side.yes strong {
  color: #2f9d2e;
}

.market-side.no strong {
  color: #ce4d2d;
}

.signal-tv {
  background:
    linear-gradient(180deg, rgba(238, 245, 255, 0.96) 0%, rgba(231, 241, 255, 0.84) 100%);
}

.tv-panel {
  margin-top: 0.48rem;
  margin-bottom: 0.14rem;
  border-radius: 12px;
  padding: 0.42rem;
  background: rgba(15, 21, 36, 0.96);
  border: 1px solid rgba(12, 18, 33, 0.8);
}

.tv-screen {
  position: relative;
  min-height: 102px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(162, 186, 242, 0.2);
  padding: 0.45rem 0.5rem;
  background:
    radial-gradient(180px 96px at 88% 22%, rgba(72, 109, 181, 0.48), transparent 62%),
    radial-gradient(220px 96px at 12% 86%, rgba(31, 67, 143, 0.35), transparent 70%),
    linear-gradient(155deg, #1c2f57 0%, #131d34 54%, #0f1628 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.tv-noise {
  position: absolute;
  inset: 0;
  opacity: 0.17;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 5px);
  animation: tv-noise-shift 0.22s steps(5) infinite;
}

@keyframes tv-noise-shift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-2px);
  }
}

.tv-channel-bug {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.on-air {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  padding: 0.16rem 0.36rem;
  border-radius: 999px;
  background: rgba(202, 40, 40, 0.9);
  color: #fff;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(202, 40, 40, 0.45);
}

.on-air span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: on-air-pulse 1.5s ease infinite;
}

@keyframes on-air-pulse {
  0% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.35;
  }
}

.tv-channel,
.tv-timecode,
.tv-headline,
.tv-ticker {
  margin: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.tv-channel {
  font-size: 0.72rem;
  font-weight: 600;
  color: #d7e4ff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tv-timecode {
  font-family: var(--body);
  font-size: 0.63rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
}

.tv-headline {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 auto;
  min-height: 2.7em;
  max-height: 2.7em;
  color: #f4f7ff;
  font-size: 0.8rem;
  line-height: 1.34;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.33);
}

.tv-lower-third {
  position: relative;
  z-index: 1;
  margin-top: 0.42rem;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
}

.tv-lower-third .tv-timecode {
  padding: 0.24rem 0.32rem;
  background: #ef4f24;
}

.tv-ticker {
  padding: 0.24rem 0.38rem;
  background: rgba(255, 255, 255, 0.95);
  color: #1b2844;
  font-size: 0.66rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-swap {
  opacity: 0.14;
  transform: translateY(4px);
}

.signal-webcam {
  background:
    linear-gradient(180deg, rgba(246, 251, 255, 0.95) 0%, rgba(236, 245, 252, 0.84) 100%);
}

.webcam-view {
  margin-top: 0.5rem;
  margin-bottom: 0.14rem;
}

.webcam-frame {
  position: relative;
  height: 70px;
  border-radius: 11px;
  overflow: hidden;
  border: 1px solid rgba(35, 51, 69, 0.28);
  background:
    radial-gradient(170px 88px at 65% 30%, rgba(143, 174, 205, 0.44), transparent 68%),
    radial-gradient(120px 74px at 18% 78%, rgba(99, 133, 173, 0.36), transparent 62%),
    linear-gradient(150deg, rgba(49, 67, 88, 0.88), rgba(31, 43, 59, 0.94));
}

.webcam-grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 6px);
}

.webcam-rec,
.webcam-location,
.webcam-stamp {
  position: absolute;
  z-index: 2;
  transition: opacity 200ms ease, transform 200ms ease;
}

.webcam-rec {
  top: 6px;
  left: 7px;
  padding: 0.12rem 0.3rem;
  border-radius: 999px;
  background: rgba(196, 43, 43, 0.9);
  color: #fff;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.webcam-location {
  left: 8px;
  bottom: 8px;
  max-width: 62%;
  color: #f3f7ff;
  font-size: 0.64rem;
  line-height: 1.2;
}

.webcam-stamp {
  right: 8px;
  bottom: 8px;
  color: #d9e6ff;
  font-size: 0.62rem;
}

.webcam-target {
  position: absolute;
  width: 21px;
  height: 14px;
  border: 2px solid rgba(255, 239, 183, 0.9);
  top: 36%;
  left: 62%;
  animation: webcam-track 3.8s ease-in-out infinite;
}

@keyframes webcam-track {
  0% {
    transform: translate(0, 0);
  }
  45% {
    transform: translate(-14px, 5px);
  }
  80% {
    transform: translate(9px, -3px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.webcam-note {
  margin-top: 0.5rem;
  min-height: 2.7em;
  max-height: 2.7em;
  font-size: 0.84rem;
  line-height: 1.36;
  color: #1f2d3c;
  font-weight: 600;
}

.webcam-swap {
  opacity: 0.16;
  transform: translateY(4px);
}

.signal-satellite {
  background:
    linear-gradient(180deg, rgba(245, 255, 251, 0.95) 0%, rgba(236, 248, 243, 0.84) 100%);
}

.sat-frame {
  position: relative;
  margin-top: 0.52rem;
  height: 68px;
  border-radius: 12px;
  border: 1px solid rgba(32, 66, 53, 0.17);
  overflow: hidden;
  background:
    radial-gradient(120px 64px at 74% 32%, rgba(157, 198, 137, 0.52), transparent 64%),
    radial-gradient(140px 70px at 16% 76%, rgba(107, 163, 131, 0.5), transparent 66%),
    linear-gradient(160deg, rgba(43, 79, 64, 0.78), rgba(61, 108, 87, 0.84));
}

.sat-grid {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 12px);
}

.sat-target {
  position: absolute;
  width: 26px;
  height: 18px;
  border: 2px solid rgba(255, 247, 201, 0.86);
  top: 34%;
  left: 56%;
  box-shadow: 0 0 0 999px rgba(255, 255, 255, 0.04) inset;
  animation: sat-scan 3.5s ease-in-out infinite;
}

@keyframes sat-scan {
  0% {
    transform: translate(0, 0);
  }
  35% {
    transform: translate(-10px, 6px);
  }
  70% {
    transform: translate(8px, -4px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.sat-caption {
  margin-top: 0.52rem;
  min-height: 2.7em;
  max-height: 2.7em;
  color: #173126;
  font-weight: 600;
  line-height: 1.36;
}

.news-headline,
.social-copy,
.market-contract,
.tv-headline,
.sat-caption,
.webcam-note {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.sat-meta {
  margin-top: 0.42rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.7rem;
  color: #406456;
}

.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: #6f614f;
  font-weight: 600;
}

.signal-card h3,
.pnl-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.03rem;
  letter-spacing: -0.01em;
}

.rotator {
  margin: 0.6rem 0 0;
  line-height: 1.48;
  color: #2b251d;
  min-height: 2.7em;
  transition: opacity 200ms ease, transform 200ms ease;
}

.rotator.swap-out {
  opacity: 0.1;
  transform: translateY(5px);
}

.core,
.trade {
  display: flex;
  justify-content: center;
}

.core-card {
  width: min(100%, 370px);
  min-height: clamp(196px, 22vh, 252px);
  padding: clamp(1rem, 1.5vw, 1.25rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-color: rgba(125, 97, 57, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.95) 0%, rgba(252, 246, 236, 0.84) 100%);
  box-shadow: 0 14px 30px rgba(34, 26, 15, 0.09);
}

.core-glow {
  position: absolute;
  width: 130px;
  height: 130px;
  right: -40px;
  top: -45px;
  background: radial-gradient(circle, rgba(250, 127, 50, 0.28) 0%, transparent 70%);
  filter: blur(3px);
  pointer-events: none;
}

.core-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.02rem, 1.15vw, 1.24rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.core-card p {
  margin: 0.72rem 0 0;
  color: #4f4538;
  font-size: 0.86rem;
  line-height: 1.55;
  max-width: 34ch;
}

.trade-card {
  width: min(100%, 370px);
  min-height: clamp(196px, 22vh, 252px);
  padding: clamp(1rem, 1.5vw, 1.25rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.94) 0%, rgba(251, 243, 232, 0.84) 100%);
  border-color: rgba(125, 97, 57, 0.22);
  box-shadow: 0 14px 30px rgba(34, 26, 15, 0.09);
}

.trade-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.02rem, 1.15vw, 1.24rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 20ch;
}

.trade-card p {
  margin: 0.72rem 0 0;
  color: #4f4538;
  font-size: 0.86rem;
  line-height: 1.55;
  max-width: 34ch;
}

.core-card .card-label,
.trade-card .card-label {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.69rem;
}

.output {
  align-self: center;
}

.pnl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.pnl-value {
  margin: 0;
  color: #3f9e17;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 700;
}

.pnl-chart {
  width: 100%;
  height: 150px;
  margin-top: 0.62rem;
  border-radius: 14px;
  border: 1px solid rgba(83, 115, 31, 0.2);
  background: linear-gradient(180deg, rgba(143, 197, 50, 0.16) 0%, rgba(143, 197, 50, 0.02) 92%);
}

.area {
  fill: url(#lineFill);
}

.line {
  fill: none;
  stroke: #9cd335;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(156, 211, 53, 0.5));
  stroke-dasharray: 560;
  stroke-dashoffset: 560;
  animation: draw-line 2.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.4s;
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

.stat-row {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.stat-row div {
  padding: 0.55rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(24, 19, 12, 0.12);
  background: rgba(255, 255, 255, 0.6);
}

.stat-row span {
  display: block;
  font-size: 0.76rem;
  color: #6e6355;
  margin-bottom: 0.26rem;
}

.stat-row strong {
  font-family: var(--display);
  font-size: 1.16rem;
}

.footer {
  text-align: center;
  color: #62584a;
  font-size: 0.98rem;
}

.footer p {
  margin: 0;
}

.footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 700ms cubic-bezier(0.22, 0.72, 0.25, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .pipeline {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 3.3rem;
  }

  #flow-lines {
    display: none;
  }

  .sources {
    order: 1;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .core {
    order: 2;
  }

  .trade {
    order: 3;
  }

  .output {
    order: 4;
  }

  .signal-card,
  .core-card,
  .trade-card,
  .pnl-card {
    border-radius: 18px;
  }

  .signal-card {
    height: auto;
  }

  .signal-social,
  .signal-market,
  .signal-tv,
  .signal-webcam {
    padding-bottom: 1rem;
  }
}

@media (max-width: 720px) {
  .topbar {
    margin-top: 0.8rem;
  }

  .theme-switch {
    padding: 0.28rem 0.34rem;
    gap: 0.34rem;
  }

  .theme-label {
    display: none;
  }

  .status-chip {
    display: none;
  }

  h1 {
    max-width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    min-width: 160px;
  }

  .floating-note {
    top: 0.8rem;
    font-size: 0.71rem;
  }
}

.theme-dark {
  color-scheme: dark;
  --bg: #0b1119;
  --bg-alt: #101a26;
  --ink: #f1f5fd;
  --muted: #a8b4c6;
  --line: rgba(163, 182, 206, 0.24);
  --card-shadow: 0 20px 54px rgba(0, 0, 0, 0.45);
  background:
    radial-gradient(1100px 650px at 8% -12%, rgba(239, 79, 36, 0.22), transparent 62%),
    radial-gradient(920px 520px at 95% 4%, rgba(66, 120, 205, 0.2), transparent 64%),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}

.theme-dark .ambient-layer::before {
  background:
    radial-gradient(640px 290px at 15% 80%, rgba(239, 79, 36, 0.14), transparent 72%),
    radial-gradient(760px 300px at 85% 78%, rgba(142, 201, 46, 0.12), transparent 70%);
}

.theme-dark .ambient-layer::after {
  opacity: 0.14;
  background-image: repeating-linear-gradient(
    -15deg,
    rgba(215, 226, 241, 0.09) 0 1px,
    transparent 1px 14px
  );
}

.theme-dark .theme-switch {
  border-color: rgba(161, 183, 210, 0.3);
  background: rgba(21, 32, 48, 0.82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.theme-dark .theme-label {
  color: #a7b7cb;
}

.theme-dark .theme-track {
  border-color: rgba(111, 153, 214, 0.44);
  background: linear-gradient(140deg, rgba(76, 123, 200, 0.35), rgba(40, 77, 143, 0.44));
}

.theme-dark .theme-thumb {
  background: #f7fbff;
}

.theme-dark .theme-slider input:checked + .theme-track {
  border-color: rgba(136, 176, 231, 0.58);
  background: linear-gradient(140deg, rgba(84, 133, 215, 0.62), rgba(49, 95, 171, 0.72));
}

.theme-dark .kicker {
  color: #97a5ba;
}

.theme-dark .pipeline {
  border-color: rgba(148, 170, 198, 0.25);
  background: linear-gradient(
    145deg,
    rgba(20, 30, 45, 0.92) 0%,
    rgba(22, 31, 46, 0.88) 44%,
    rgba(19, 29, 42, 0.9) 100%
  );
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.5);
}

.theme-dark .pipeline::after {
  background: radial-gradient(circle, rgba(250, 127, 50, 0.2) 0%, transparent 72%);
}

.theme-dark .floating-note {
  border-color: rgba(164, 186, 213, 0.26);
  background: rgba(18, 28, 43, 0.86);
  color: #c7d4e6;
}

.theme-dark #flowGradient stop:nth-child(1) {
  stop-opacity: 0.5;
}

.theme-dark #flowGradient stop:nth-child(2) {
  stop-opacity: 1;
}

.theme-dark #flowGradient stop:nth-child(3) {
  stop-opacity: 0.62;
}

.theme-dark #flow-lines path {
  opacity: 0.93;
}

.theme-dark .signal-card,
.theme-dark .core-card,
.theme-dark .trade-card,
.theme-dark .pnl-card {
  background: rgba(18, 27, 41, 0.86);
  border-color: rgba(161, 182, 208, 0.24);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.theme-dark .source-pill {
  border-color: rgba(168, 188, 213, 0.24);
  background: rgba(30, 42, 60, 0.82);
  color: #b6c6dd;
}

.theme-dark .signal-news {
  background: linear-gradient(180deg, rgba(49, 38, 30, 0.9) 0%, rgba(34, 30, 27, 0.9) 100%);
}

.theme-dark .breaking-chip {
  background: #f2eee8;
  color: #1d1710;
}

.theme-dark .news-desk {
  color: #c5b8a7;
}

.theme-dark .news-meta {
  color: #af9f8b;
}

.theme-dark .signal-social {
  background: linear-gradient(180deg, rgba(25, 37, 57, 0.92) 0%, rgba(23, 35, 52, 0.9) 100%);
}

.theme-dark .social-stream {
  border-color: rgba(132, 161, 205, 0.35);
  background: rgba(16, 28, 45, 0.84);
}

.theme-dark .social-user,
.theme-dark .social-copy,
.theme-dark .social-foot strong {
  color: #d8e5fb;
}

.theme-dark .social-platform,
.theme-dark .social-foot {
  color: #9fb2cf;
}

.theme-dark .social-meter {
  background: rgba(101, 129, 173, 0.28);
}

.theme-dark .signal-market {
  background: linear-gradient(180deg, rgba(31, 44, 31, 0.9) 0%, rgba(25, 37, 28, 0.9) 100%);
}

.theme-dark .market-contract {
  color: #d8e7cc;
}

.theme-dark .market-side {
  border-color: rgba(137, 171, 118, 0.32);
  background: rgba(24, 35, 26, 0.82);
}

.theme-dark .market-side span {
  color: #9fb987;
}

.theme-dark .signal-tv {
  background: linear-gradient(180deg, rgba(27, 38, 60, 0.92) 0%, rgba(23, 34, 54, 0.9) 100%);
}

.theme-dark .signal-webcam {
  background: linear-gradient(180deg, rgba(26, 35, 47, 0.93) 0%, rgba(21, 30, 43, 0.9) 100%);
}

.theme-dark .signal-satellite {
  background: linear-gradient(180deg, rgba(22, 41, 34, 0.92) 0%, rgba(20, 34, 29, 0.9) 100%);
}

.theme-dark .webcam-note {
  color: #d1ddef;
}

.theme-dark .sat-caption {
  color: #cce8dc;
}

.theme-dark .sat-meta {
  color: #8fb8a7;
}

.theme-dark .card-label {
  color: #9fadc1;
}

.theme-dark .rotator {
  color: #d9e5f6;
}

.theme-dark .core-card,
.theme-dark .trade-card {
  border-color: rgba(169, 187, 212, 0.26);
  background: linear-gradient(180deg, rgba(26, 36, 53, 0.92) 0%, rgba(22, 33, 48, 0.9) 100%);
}

.theme-dark .core-card p,
.theme-dark .trade-card p {
  color: #adc0d8;
}

.theme-dark .core-glow {
  background: radial-gradient(circle, rgba(250, 127, 50, 0.34) 0%, transparent 70%);
}

.theme-dark .pnl-value {
  color: #8fdd57;
}

.theme-dark .pnl-chart {
  border-color: rgba(121, 171, 72, 0.34);
  background: linear-gradient(180deg, rgba(143, 197, 50, 0.2) 0%, rgba(143, 197, 50, 0.04) 92%);
}

.theme-dark .stat-row div {
  border-color: rgba(151, 172, 199, 0.25);
  background: rgba(25, 35, 51, 0.72);
}

.theme-dark .stat-row span {
  color: #a8b7cb;
}

.theme-dark .footer {
  color: #9da9bb;
}

.theme-dark .footer a {
  color: #ff8a49;
}
