:root {
  --bg: #f6f1e7;
  --bg-alt: #f0e7d8;
  --ink: #1a1a1a;
  --muted: #6f6a61;
  --accent: #ff6b3d;
  --accent-2: #2b70ff;
  --accent-3: #1dbf73;
  --card: #fff8ec;
  --stroke: rgba(26, 26, 26, 0.12);
  --shadow: 0 20px 45px rgba(26, 26, 26, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

body.theme-sunrise {
  background: radial-gradient(circle at 20% 20%, #ffe6d4 0%, rgba(255, 230, 212, 0) 55%),
    radial-gradient(circle at 80% 0%, #e1f0ff 0%, rgba(225, 240, 255, 0) 50%),
    linear-gradient(180deg, #f8efe1 0%, #f1ead8 50%, #f6f1e7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  margin: 0 0 0.6rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.6;
}

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

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header,
.app-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(248, 239, 225, 0.75);
  border-bottom: 1px solid var(--stroke);
  z-index: 5;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b3d, #ffb347);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  font-weight: 700;
}

.brand-tag {
  font-size: 0.85rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}

.hero {
  padding: 5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.05;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-2);
  font-weight: 600;
}

.lead {
  font-size: 1.1rem;
  color: #4d493f;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 15px 30px rgba(255, 107, 61, 0.25);
}

.btn.ghost {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.5);
}

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

.trust-strip {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.8rem;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat {
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  padding: 1rem;
  border: 1px solid var(--stroke);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.stat-note {
  font-size: 0.75rem;
  color: var(--muted);
}

.mini-feed {
  margin-top: 1.6rem;
  display: grid;
  gap: 0.8rem;
}

.feed-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.7);
}

.pill.warn {
  border-color: rgba(255, 107, 61, 0.4);
  color: #c44a1c;
}

.pill.info {
  border-color: rgba(43, 112, 255, 0.4);
  color: #1d4cc9;
}

.pill.cool {
  border-color: rgba(29, 191, 115, 0.4);
  color: #0c7d4b;
}

.section {
  padding: 4rem 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
}

.section-head {
  margin-bottom: 2rem;
}

.card-grid,
.signal-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.card,
.signal,
.price-card,
.panel,
.report-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.report-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.report-card.highlight {
  background: linear-gradient(135deg, rgba(255, 107, 61, 0.2), rgba(43, 112, 255, 0.15));
}

.quote-meta {
  font-weight: 600;
  color: var(--muted);
}

.price-card {
  text-align: center;
}

.price-card.featured {
  border: 2px solid var(--accent);
  transform: translateY(-8px);
}

.price {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0.8rem 0 1rem;
}

.price span {
  font-size: 1rem;
  color: var(--muted);
}

.cta-center {
  margin-top: 2rem;
  text-align: center;
}

.site-footer {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid var(--stroke);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-weight: 500;
}

.clean-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  color: #4d493f;
}

.dashboard .dashboard-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
}

.sidebar {
  display: grid;
  gap: 0.6rem;
  align-self: start;
}

.side-link {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--stroke);
  font-weight: 600;
}

.side-link.active {
  background: #fff;
  border-color: rgba(255, 107, 61, 0.4);
}

.dashboard-main {
  display: grid;
  gap: 1.8rem;
}

.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

select {
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

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

.kpi {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  padding: 1.2rem;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.kpi-note {
  font-size: 0.75rem;
  color: var(--muted);
}

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

.panel {
  display: grid;
  gap: 1rem;
}

.panel.wide {
  grid-column: 1 / -1;
}

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

.panel-list {
  display: grid;
  gap: 0.8rem;
}

.panel-item {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 0.9rem;
  display: grid;
  gap: 0.4rem;
}

.panel-item .meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.feed-grid {
  display: grid;
  gap: 0.8rem;
}

.feed-row {
  display: grid;
  grid-template-columns: 100px 1fr 120px;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.6);
}

.feed-row .feed-source {
  font-weight: 600;
  font-size: 0.85rem;
}

.feed-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.feed-row .feed-time {
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  align-items: start;
}

.brief-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.meta-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.meta-value {
  font-weight: 600;
}

.brief-card {
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  border: 1px solid var(--stroke);
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.muted {
  color: var(--muted);
}

.fade-up {
  animation: fadeUp 0.6s ease both;
}

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

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .dashboard .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }

  .feed-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .feed-row .feed-time {
    text-align: left;
  }
}

.panel-item .detail {
  font-size: 0.75rem;
  line-height: 1.5;
  color: #5a564d;
  margin-top: 0.3rem;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.panel-item .apps {
  font-size: 0.72rem;
  color: var(--accent-2);
  font-weight: 500;
}

.feed-row.new-item {
  animation: slideInLeft 0.5s ease both, pulseHighlight 2s ease 0.5s both;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseHighlight {
  0% {
    background: rgba(255, 107, 61, 0.15);
  }
  100% {
    background: rgba(255, 255, 255, 0.6);
  }
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  animation: livePulse 2s ease infinite;
  margin-right: 0.4rem;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.refresh-timer {
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.signal-counter {
  transition: all 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
