:root {
  color-scheme: dark;
  --bg: #070a13;
  --panel: rgba(17, 24, 39, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --primary-strong: #0ea5e9;
  --accent: #a78bfa;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #fb7185;
  --shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.16), transparent 32rem),
    radial-gradient(circle at 85% 10%, rgba(167, 139, 250, 0.16), transparent 30rem),
    linear-gradient(135deg, #060913 0%, #0f172a 55%, #111827 100%);
  color: var(--text);
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.orb {
  position: fixed;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  filter: blur(56px);
  opacity: 0.22;
  pointer-events: none;
  z-index: -1;
}

.orb-one {
  left: -8rem;
  top: 18rem;
  background: var(--primary);
}

.orb-two {
  right: -8rem;
  bottom: 4rem;
  background: var(--accent);
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero,
.feed-card,
.subscribe-card,
.metrics-card {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 34px;
  padding: 24px;
}

.topbar,
.hero-grid,
.section-header,
.news-meta,
.metrics div {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #020617;
  box-shadow: 0 12px 35px rgba(56, 189, 248, 0.35);
}

.status-pill,
.refresh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.66);
  font-size: 0.9rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.14);
}

.status-pill.online .status-dot {
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.status-pill.error .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(251, 113, 133, 0.14);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
}

.eyebrow,
.panel-label {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.045em;
}

.lede {
  max-width: 680px;
  color: #cbd5e1;
  font-size: 1.15rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 15px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #020617;
  box-shadow: 0 20px 42px rgba(56, 189, 248, 0.22);
}

.button.ghost {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.button.wide {
  width: 100%;
}

.refresh-panel {
  align-self: stretch;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 28px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(56, 189, 248, 0.14), rgba(167, 139, 250, 0.08)),
    rgba(2, 6, 23, 0.46);
}

.countdown {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}

.countdown span {
  font-size: clamp(4.2rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.countdown small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.progress-track {
  height: 12px;
  margin: 26px 0 18px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.14);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), var(--primary), var(--accent));
  transition: width 900ms linear;
}

.panel-note {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 22px;
}

.feed-card,
.subscribe-card,
.metrics-card {
  border-radius: 28px;
  padding: 24px;
}

.section-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.visual-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 18px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.32);
}

.pulse-ring {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--primary);
}

.pulse-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: inherit;
  animation: pulse 1.6s infinite;
}

.visual-feedback.refreshing .pulse-ring {
  background: var(--warning);
}

.visual-feedback.updated {
  border-color: rgba(34, 197, 94, 0.42);
  background: rgba(34, 197, 94, 0.08);
}

.visual-feedback.error {
  border-color: rgba(251, 113, 133, 0.42);
  background: rgba(251, 113, 133, 0.08);
}

@keyframes pulse {
  0% {
    transform: scale(0.75);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

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

.news-item {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.news-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.32);
  background: rgba(15, 23, 42, 0.9);
}

.news-item.is-new {
  animation: flashNew 1.2s ease;
}

@keyframes flashNew {
  0% {
    border-color: rgba(34, 197, 94, 0.85);
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0.12);
  }
  100% {
    border-color: var(--border);
    box-shadow: none;
  }
}

.news-meta {
  gap: 10px;
  margin-bottom: 12px;
}

.category {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-size: 0.76rem;
  font-weight: 800;
}

.published,
.source,
.summary,
.subscribe-card p,
.metrics dt {
  color: var(--muted);
}

.tldr {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0 0 12px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 12px 13px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(167, 139, 250, 0.08));
  color: #dbeafe;
  line-height: 1.55;
}

.tldr > span:first-child {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.news-item h3 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.news-item h3 a {
  text-decoration: none;
}

.news-item h3 a:hover {
  color: var(--primary);
}

.summary {
  margin-bottom: 13px;
  line-height: 1.65;
  font-size: 0.94rem;
}

.source {
  margin-bottom: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.subscribe-card p {
  line-height: 1.7;
}

.subscribe-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.subscribe-form label {
  display: grid;
  gap: 8px;
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.44);
  color: var(--text);
}

input:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  font-weight: 700;
}

.form-message.success {
  color: #86efac;
}

.form-message.error {
  color: #fda4af;
}

.metrics {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
}

.metrics div {
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.metrics dt,
.metrics dd {
  margin: 0;
}

.metrics dd {
  font-weight: 900;
  color: var(--text);
}

@media (max-width: 920px) {
  .hero-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero,
  .feed-card,
  .subscribe-card,
  .metrics-card {
    border-radius: 22px;
    padding: 18px;
  }

  .topbar {
    margin-bottom: 44px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }
}
