:root {
  color-scheme: light dark;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #516074;
  --muted-strong: #64748b;
  --border: rgba(148, 163, 184, 0.24);
  --cyan: #2563eb;
  --cyan-strong: #1d4ed8;
  --teal: #14b8a6;
  --ink: #020617;
  --shadow: 0 18px 44px rgba(15, 23, 42, 0.1);
  --shadow-strong: 0 30px 90px rgba(15, 23, 42, 0.14);
  --body-bg:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.1), transparent 34%),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.1), transparent 26%),
    linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
  --header-bg: rgba(248, 250, 252, 0.86);
  --header-border: rgba(148, 163, 184, 0.14);
  --cta-secondary-bg: rgba(255, 255, 255, 0.74);
  --callout-bg: rgba(37, 99, 235, 0.08);
  --callout-border: rgba(37, 99, 235, 0.18);
  --media-border: rgba(148, 163, 184, 0.22);
  --card-hover-border: rgba(37, 99, 235, 0.4);
  --card-hover-shadow: 0 28px 70px rgba(15, 23, 42, 0.13);
  --hero-panel-bg:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 246, 255, 0.76));
  --card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  --card-accent: rgba(37, 99, 235, 0.16);
}

html[data-theme="dark"] {
  --bg: #020617;
  --surface: rgba(15, 23, 42, 0.86);
  --surface-strong: #0f172a;
  --text: #e5f0ff;
  --muted: #9fb0c8;
  --muted-strong: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-strong: #67e8f9;
  --teal: #2dd4bf;
  --ink: #e2e8f0;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-strong: 0 34px 110px rgba(0, 0, 0, 0.52);
  --body-bg:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 90% 6%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #020617 0%, #071427 56%, #08111f 100%);
  --header-bg: rgba(2, 6, 23, 0.82);
  --header-border: rgba(148, 163, 184, 0.16);
  --cta-secondary-bg: rgba(15, 23, 42, 0.78);
  --callout-bg: rgba(34, 211, 238, 0.09);
  --callout-border: rgba(34, 211, 238, 0.18);
  --media-border: rgba(148, 163, 184, 0.22);
  --card-hover-border: rgba(34, 211, 238, 0.42);
  --card-hover-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  --hero-panel-bg:
    linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(8, 18, 35, 0.78));
  --card-bg:
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(8, 18, 35, 0.82));
  --card-accent: rgba(34, 211, 238, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--body-bg);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 72%);
}

a {
  color: inherit;
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  border: 1px solid rgba(34, 211, 238, 0.18);
  box-shadow:
    0 14px 30px rgba(34, 211, 238, 0.14),
    0 4px 12px rgba(2, 6, 23, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.brand-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.94rem;
  border-radius: 999px;
  padding: 9px 12px;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.nav-links a:not(.cta):hover {
  color: var(--text);
  background: var(--callout-bg);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  background: var(--surface);
  cursor: pointer;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  border-radius: 999px;
  padding: 14px 22px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cta-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
}

.cta-secondary {
  color: var(--text);
  background: var(--cta-secondary-bg);
  border: 1px solid var(--border);
}

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

.cta-primary:hover {
  background: var(--cyan-strong);
}

.hero {
  padding: 46px 0 34px;
}

.signal-board {
  position: relative;
  overflow: hidden;
  min-height: 318px;
  padding: 24px;
  border: 1px solid var(--media-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 4%, var(--card-accent), transparent 30%),
    linear-gradient(145deg, var(--surface-strong), var(--callout-bg));
  box-shadow: var(--shadow-strong);
}

.signal-board::after {
  content: "";
  position: absolute;
  inset: auto -22% -48% 35%;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--card-accent), transparent 68%);
  pointer-events: none;
}

.signal-kicker,
.signal-meta {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-kicker strong {
  color: var(--text);
}

.rank-row,
.gap-row,
.market-row {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.rank-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.gap-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.market-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.rank-row:first-of-type,
.gap-row:first-of-type,
.market-row:first-of-type {
  margin-top: 18px;
}

.rank-name,
.gap-name,
.market-name {
  min-width: 0;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 800;
}

.rank-name small,
.gap-name small,
.market-name small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

.rank-value,
.rank-change,
.gap-value,
.market-value {
  white-space: nowrap;
  font-weight: 900;
}

.rank-value,
.market-value {
  color: var(--cyan);
  font-size: 1.08rem;
}

.rank-change,
.gap-value {
  color: var(--teal);
  font-size: 0.8rem;
}

.gap-value.warning {
  color: #f59e0b;
}

.market-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
}

.signal-track {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  gap: 8px;
  height: 138px;
  margin: 20px 0 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.025);
}

.signal-track span {
  flex: 1;
  min-width: 10px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--teal), var(--cyan));
  box-shadow: 0 8px 18px var(--card-accent);
}

.signal-track span:nth-child(2),
.signal-track span:nth-child(5) {
  background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.signal-track span:nth-child(3) {
  background: linear-gradient(180deg, #818cf8, #2563eb);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.workflow-strip span {
  position: relative;
  z-index: 1;
  padding: 11px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
}

.workflow-strip span:first-child {
  color: var(--cyan);
  border-color: var(--callout-border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
  overflow: hidden;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--border);
  border-radius: 34px;
  background: var(--hero-panel-bg);
  box-shadow: var(--shadow-strong);
}

.hero-grid::before {
  content: "";
  position: absolute;
  inset: -30% -12% auto auto;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 62%);
  pointer-events: none;
}

.hero-grid > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  line-height: 0.96;
  margin: 18px 0 16px;
  letter-spacing: -0.065em;
}

.hero p {
  margin: 0;
  max-width: 66ch;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.hero-card,
.section-card,
.faq-item,
.metric,
.link-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 14px;
  transform: rotate(0.6deg);
  box-shadow: var(--shadow-strong);
}

.hero-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--media-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-card-note {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.section {
  padding: 32px 0;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.section-heading p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 70ch;
}

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

.metric {
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--card-accent);
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-strong);
  margin-bottom: 10px;
  font-weight: 800;
}

.metric-value {
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.grid-3,
.grid-2 {
  display: grid;
  gap: 16px;
}

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

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

.section-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.section-card::before,
.faq-item::before,
.link-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--card-accent), transparent 36%);
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

.section-card:hover,
.faq-item:hover,
.link-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

.section-card:hover::before,
.faq-item:hover::before,
.link-card:hover::before {
  opacity: 1;
}

.section-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.section-card p,
.faq-item p,
.section-card li {
  color: var(--muted);
  line-height: 1.75;
}

.section-card ul {
  margin: 0;
  padding-left: 18px;
}

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

.faq-item {
  position: relative;
  overflow: hidden;
  padding: 22px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.bread {
  color: var(--muted-strong);
  font-size: 0.92rem;
  margin-bottom: 14px;
}

.bread a {
  text-decoration: none;
}

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

.link-card {
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
  padding: 20px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.link-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 8px;
}

.link-card span {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.96rem;
}

.cta-band {
  margin: 28px 0 40px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 34%),
    linear-gradient(135deg, var(--callout-bg), rgba(6, 182, 212, 0.1));
  border: 1px solid var(--callout-border);
  box-shadow: var(--shadow);
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.cta-band p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.footer {
  padding: 28px 0 50px;
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.blog-hero {
  padding: 70px 0 34px;
}

.blog-hero h1 {
  max-width: 850px;
  margin: 16px 0 14px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.blog-hero p {
  max-width: 70ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.blog-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  text-decoration: none;
  padding: 24px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-hover-border);
  box-shadow: var(--card-hover-shadow);
}

.blog-card-label,
.article-kicker {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.blog-card h2 {
  margin: 14px 0 10px;
  font-size: 1.34rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

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

.blog-card-read {
  margin-top: auto;
  padding-top: 22px;
  color: var(--cyan-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.article {
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow-strong);
}

.article h1 {
  margin: 12px 0 16px;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.article-intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.8;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.article-content {
  margin-top: 28px;
}

.article-content h2 {
  margin: 34px 0 10px;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.article-content h3 {
  margin: 24px 0 8px;
  font-size: 1.18rem;
}

.article-content p,
.article-content li {
  color: var(--muted);
  line-height: 1.85;
}

.article-content ul,
.article-content ol {
  padding-left: 22px;
}

.article-content li + li {
  margin-top: 8px;
}

.article-content strong {
  color: var(--text);
}

.article-content img {
  display: block;
  width: 100%;
  margin: 24px 0;
  border-radius: 18px;
  border: 1px solid var(--media-border);
  box-shadow: var(--shadow);
}

.article-callout {
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--callout-bg);
  border: 1px solid var(--callout-border);
}

.article-callout p {
  margin: 0;
}

.article-nav {
  position: sticky;
  top: 96px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.article-nav h2 {
  margin: 0 0 14px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.article-nav a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  text-decoration: none;
}

.article-nav a:hover {
  color: var(--cyan);
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .metrics,
  .related,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-nav {
    position: static;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .nav {
    position: relative;
    align-items: center;
    flex-direction: row;
    padding: 12px 0;
  }

  .brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .brand-title {
    font-size: 0.96rem;
  }

  .brand-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 2px);
    right: 0;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 14px;
  }

  .nav-links .cta {
    padding: 12px 14px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-grid {
    padding: 22px;
    border-radius: 26px;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(2.3rem, 13vw, 3.6rem);
  }

  .section-card,
  .faq-item,
  .metric,
  .hero-card,
  .cta-band,
  .blog-card,
  .article-nav {
    padding: 18px;
    border-radius: 22px;
  }

  .cta {
    width: 100%;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero {
    padding-top: 42px;
  }
}
