:root {
  color-scheme: dark;
  --bg: #07090b;
  --bg-elevated: #10151a;
  --panel: rgba(16, 21, 26, 0.82);
  --panel-solid: #111820;
  --text: #f5f7f9;
  --muted: #9aa7b4;
  --line: rgba(255, 255, 255, 0.12);
  --cyan: #45d8ff;
  --green: #9eff6c;
  --amber: #ffb84d;
  --rose: #ff5c8a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(69, 216, 255, 0.08), transparent 340px),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

body.contrast-mode {
  --bg: #030405;
  --bg-elevated: #0b0f12;
  --panel: rgba(3, 4, 5, 0.9);
  --panel-solid: #0b0f12;
  --line: rgba(255, 255, 255, 0.22);
  --muted: #c7d0d8;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero__content > *,
.workspace > *,
.dispatch > *,
.story-card,
.metric-card,
.signal-card {
  min-width: 0;
}

.ticker {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #050607;
  color: var(--muted);
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 32px;
  padding: 9px 24px;
  animation: ticker-move 26s linear infinite;
  white-space: nowrap;
}

.ticker strong {
  color: var(--text);
  margin-right: 7px;
}

.ticker em,
.watch-row em {
  font-style: normal;
  font-weight: 750;
}

.up {
  color: var(--green);
}

.down {
  color: var(--rose);
}

@keyframes ticker-move {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-36%);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 72px;
  padding: 14px max(24px, calc((100% - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 11, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(69, 216, 255, 0.44);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(69, 216, 255, 0.18), rgba(158, 255, 108, 0.12)),
    #0a1014;
  color: var(--text);
  font-weight: 900;
}

.brand__copy {
  display: grid;
  gap: 1px;
}

.brand__copy strong {
  font-size: 1rem;
}

.brand__copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-links a {
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.92rem;
  padding: 9px 12px;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

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

.button,
.icon-button {
  min-height: 42px;
  border: 1px solid rgba(69, 216, 255, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: #061015;
  font-weight: 800;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
}

.button:hover,
.button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button--compact {
  min-height: 38px;
  padding: 8px 13px;
}

.button--ghost,
.icon-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.button--ghost {
  border-color: var(--line);
}

.icon-button {
  display: grid;
  width: 42px;
  place-items: center;
}

.hero {
  position: relative;
  min-height: 640px;
  isolation: isolate;
  overflow: hidden;
}

.hero__media,
.hero__overlay {
  position: absolute;
  inset: 0;
}

.hero__media {
  z-index: -3;
  background-image: url("assets/kbo808-crypto-newsroom.png");
  background-position: center;
  background-size: cover;
}

.hero__overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 9, 11, 0.96) 0%, rgba(7, 9, 11, 0.74) 38%, rgba(7, 9, 11, 0.24) 76%),
    linear-gradient(0deg, var(--bg) 0%, transparent 34%),
    linear-gradient(180deg, rgba(7, 9, 11, 0.08), rgba(7, 9, 11, 0.26));
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: end;
  gap: 40px;
  width: 100%;
  max-width: var(--max);
  min-height: 640px;
  margin: 0 auto;
  padding: 86px 24px 72px;
}

.hero__copy {
  min-width: 0;
  max-width: 660px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 5.25rem;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero__lede {
  max-width: 610px;
  margin: 24px 0 30px;
  color: #dce5eb;
  font-size: 1.16rem;
}

.lead-story {
  align-self: end;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(18px);
}

.story-kicker,
.story-meta,
.story-card__top,
.watch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.story-kicker,
.story-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.lead-story h2 {
  margin: 18px 0 12px;
  font-size: 1.45rem;
  line-height: 1.18;
  overflow-wrap: break-word;
}

.lead-story p,
.story-card p,
.signal-card p,
.pulse-panel p {
  color: var(--muted);
  margin: 0;
}

.band {
  padding: 70px 24px;
}

.briefing,
.signals {
  max-width: var(--max);
  margin: 0 auto;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.section-heading--compact {
  display: block;
  margin-bottom: 18px;
}

.section-heading--compact h2 {
  font-size: 1.35rem;
}

.metric-grid,
.signal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.story-card,
.signal-card,
.pulse-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
}

.metric-card {
  min-height: 152px;
  padding: 20px;
}

.metric-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.metric-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.6rem;
  line-height: 1.1;
}

.metric-card__detail {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
}

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 26px;
  max-width: var(--max);
  margin: 0 auto;
}

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

.watchlist,
.pulse-panel {
  margin-bottom: 16px;
}

.watchlist {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.watch-row {
  min-height: 56px;
  background: var(--panel-solid);
  padding: 13px 14px;
}

.watch-row span {
  color: var(--muted);
  font-weight: 800;
}

.pulse-panel {
  padding: 18px;
}

.pulse-panel__label {
  color: var(--muted);
  font-size: 0.82rem;
}

.pulse-panel strong {
  display: block;
  margin: 6px 0 8px;
  font-size: 2.2rem;
  line-height: 1;
}

.pulse-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 72px;
  margin-top: 18px;
}

.pulse-bars span {
  flex: 1;
  min-width: 0;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--cyan), var(--green));
}

.feed-topbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 320px);
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

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

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 750;
  padding: 7px 12px;
}

.filter-tabs button.is-active,
.filter-tabs button:hover,
.filter-tabs button:focus-visible {
  border-color: rgba(69, 216, 255, 0.48);
  background: rgba(69, 216, 255, 0.12);
  color: var(--text);
  outline: none;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.story-card {
  display: grid;
  gap: 14px;
  min-height: 255px;
  padding: 20px;
}

.story-card.is-hidden {
  display: none;
}

.story-card__top span {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.save-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.save-button.is-saved {
  border-color: rgba(255, 184, 77, 0.55);
  color: var(--amber);
}

.story-card h3,
.signal-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.story-card .story-meta {
  align-self: end;
  padding-top: 4px;
}

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

.signal-card {
  min-height: 230px;
  padding: 24px;
}

.signal-card span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(69, 216, 255, 0.44);
  border-radius: var(--radius);
  color: var(--cyan);
  font-weight: 900;
  margin-bottom: 42px;
}

.signal-card--featured {
  background:
    linear-gradient(135deg, rgba(69, 216, 255, 0.18), rgba(255, 184, 77, 0.1)),
    var(--panel-solid);
}

.dispatch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.dispatch h2 {
  max-width: 560px;
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.dispatch-form {
  display: flex;
  gap: 10px;
  width: min(100%, 490px);
}

.dispatch-form input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: 0;
  padding: 0 14px;
}

.dispatch-form input:focus {
  border-color: rgba(69, 216, 255, 0.58);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

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

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .hero__content {
    min-height: auto;
  }

  .hero__content {
    grid-template-columns: 1fr;
    padding-top: 74px;
  }

  .lead-story {
    width: 100%;
    max-width: 560px;
  }

  .metric-grid,
  .story-grid,
  .signal-grid,
  .workspace {
    grid-template-columns: 1fr 1fr;
  }

  .side-rail {
    position: static;
  }
}

@media (max-width: 720px) {
  .ticker__track {
    gap: 24px;
  }

  .site-header {
    align-items: flex-start;
    padding: 12px 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand__copy span {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .button--compact {
    display: none;
  }

  .hero__content {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 58px 16px 46px;
  }

  .hero__copy,
  .hero__actions,
  .lead-story {
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: 3.55rem;
  }

  .hero__lede {
    font-size: 1.02rem;
  }

  .lead-story h2 {
    font-size: 1.3rem;
  }

  .hero__actions,
  .dispatch-form,
  .dispatch,
  .feed-topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .band {
    padding: 48px 16px;
  }

  .metric-grid,
  .story-grid,
  .signal-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .search-box {
    width: 100%;
  }

  .story-card,
  .metric-card,
  .signal-card {
    min-height: auto;
  }

  .signal-card span {
    margin-bottom: 28px;
  }

  .site-footer {
    flex-direction: column;
    padding-inline: 16px;
  }
}
