:root {
  --bg: #0b1020;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-alt: rgba(15, 23, 42, 0.94);
  --card: rgba(15, 23, 42, 0.9);
  --card-strong: rgba(9, 14, 24, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #9cb0d2;
  --primary: #7c9cff;
  --primary-strong: #9d7af7;
  --green: #63f7c6;
  --orange: #ffb15f;
  --purple: #b79cff;
  --blue: #7cc8ff;
  --shadow: 0 28px 60px rgba(9, 12, 20, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(124, 156, 255, 0.35), transparent 30%),
    radial-gradient(circle at bottom right, rgba(157, 122, 247, 0.25), transparent 20%),
    var(--bg);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

button,
a {
  font: inherit;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-shell.single-region {
  max-width: 1400px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 18px;
  z-index: 20;
}

.compact-topbar {
  padding: 16px 20px;
  margin-bottom: 18px;
}

.topbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.source-link {
  color: var(--blue);
  font-size: 0.74rem;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.source-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.metabase-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 420px;
  width: 70%;
  margin: 0 auto;
}

.metabase-panel iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  background: #fff;
}

.metabase-panel-compressed {
  max-width: 1100px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 10px 24px rgba(124, 156, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow.accent {
  color: var(--blue);
}

.brand-wrap h2,
.section-heading h2,
.hero-copy h1,
.about-copy h2,
.card-header h3,
.blog-card h3,
.status-card h3,
.stat-card strong {
  margin: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav a,
.text-link,
.blog-card a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover,
.text-link:hover,
.blog-card a:hover {
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
}

.button.secondary,
.button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.section-card,
.stat-card,
.blog-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 12, 20, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero {
  margin-top: 32px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 1.1;
  margin-top: 10px;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 600px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 18px;
}

.cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.mini-metrics {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.mini-metrics li {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 130px;
  padding: 16px 18px;
}

.mini-metrics strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.mini-metrics span {
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-card {
  background: rgba(12, 17, 29, 0.9);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7cc8ff, #9d7af7);
  font-weight: 800;
}

.profile-name {
  margin: 0;
  font-weight: 700;
}

.profile-role {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  box-shadow: 0 0 18px rgba(99, 247, 198, 0.7);
}

.status-card h3 {
  font-size: 1.45rem;
  margin-top: 16px;
}

.status-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-block {
  margin-top: 48px;
}

.dashboard-only {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(148, 163, 184, 0.05);
  font-size: 0.8rem;
}

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

.featured-post-article {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(9, 12, 20, 0.96));
  box-shadow: var(--shadow);
  padding: 28px 28px 18px;
  color: var(--text);
}

.featured-post-header {
  margin-bottom: 22px;
}

.featured-post-header h3 {
  margin: 10px 0 12px;
  font-size: clamp(1.8rem, 2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.featured-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.featured-post-body-text {
  color: var(--text);
}

.featured-post-body-text section + section {
  margin-top: 30px;
}

.featured-post-body-text h4 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.featured-post-body-text p,
.featured-post-body-text li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.featured-post-body-text ul {
  margin: 12px 0 0 20px;
  padding: 0;
}

.featured-post-body-text a {
  color: var(--blue);
  text-decoration: none;
}

.featured-post-body-text a:hover {
  text-decoration: underline;
}

.featured-post-body-text code {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  padding: 2px 6px;
}

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

.stats-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stat-card {
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stat-card.accent {
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.18), rgba(157, 122, 247, 0.16));
}

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

.stat-card strong {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.stat-card small {
  color: var(--muted);
}

.dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.chart-card,
.activity-card {
  padding: 22px 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

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

.bars {
  height: 210px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding-top: 22px;
}

.bars span {
  display: block;
  flex: 1;
  height: var(--h);
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #7cc8ff, #9d7af7);
  box-shadow: 0 10px 26px rgba(124, 156, 255, 0.3);
}

.activity-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.activity-card li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.blue { background: var(--blue); }
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.purple { background: var(--purple); }

.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
  padding: 22px 20px;
}

.meta {
  display: inline-block;
  color: var(--blue);
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.blog-card h3 {
  font-size: 1.3rem;
  line-height: 1.45;
}

.blog-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 14px 0 18px;
}

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

.about-block {
  margin-top: 52px;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  align-items: center;
}

.about-copy p {
  color: var(--muted);
  line-height: 1.8;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.about-tags span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(124, 156, 255, 0.12);
  border: 1px solid rgba(124, 156, 255, 0.2);
  color: var(--text);
}

@media (max-width: 980px) {
  .hero,
  .dashboard-grid,
  .about-block,
  .stats-grid,
  .blog-grid,
  .featured-post-card {
    grid-template-columns: 1fr;
  }

  .nav {
    display: none;
  }

  .topbar {
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero,
  .chart-card,
  .activity-card,
  .blog-card,
  .about-block,
  .stat-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}
