:root {
  --gp-indigo: #4f46e5;
  --gp-violet: #7c3aed;
  --gp-cyan: #0891b2;
  --gp-ink: #111827;
  --gp-muted: #64748b;
  --gp-border: rgba(99, 102, 241, 0.18);
  --gp-surface: rgba(255, 255, 255, 0.82);
  --gp-shadow: 0 18px 50px rgba(30, 41, 59, 0.10);
}

[data-md-color-scheme="slate"] {
  --gp-ink: #f8fafc;
  --gp-muted: #cbd5e1;
  --gp-border: rgba(129, 140, 248, 0.22);
  --gp-surface: rgba(15, 23, 42, 0.72);
  --gp-shadow: 0 20px 55px rgba(0, 0, 0, 0.30);
}

.md-grid {
  max-width: 1500px;
}

.md-header {
  backdrop-filter: saturate(140%) blur(14px);
}

.gp-announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .72rem;
}

.gp-announcement a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .16rem;
}

.gp-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 2rem;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.6rem);
  margin: 1rem 0 1.5rem;
  border-radius: 1.7rem;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.18), transparent 33%),
    radial-gradient(circle at 90% 20%, rgba(34,211,238,.28), transparent 32%),
    linear-gradient(135deg, #312e81 0%, #4f46e5 50%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 28px 80px rgba(49, 46, 129, .28);
}

.gp-hero::after {
  content: "";
  position: absolute;
  width: 24rem;
  height: 24rem;
  right: -10rem;
  bottom: -15rem;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(255,255,255,.025),
    0 0 0 7rem rgba(255,255,255,.02);
}

.gp-hero__copy,
.gp-code-panel {
  position: relative;
  z-index: 1;
}

.gp-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .75rem;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
}

.gp-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.45rem, 5vw, 4.65rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.gp-lead {
  max-width: 760px;
  margin: 1.3rem 0 1.5rem;
  color: rgba(255,255,255,.88);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.gp-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
}

.gp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: .7rem 1rem;
  border-radius: .7rem;
  font-weight: 800;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.gp-btn--primary {
  background: #fff;
  color: #312e81 !important;
  box-shadow: 0 8px 22px rgba(15,23,42,.18);
}

.gp-btn--secondary {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff !important;
}

.gp-btn--ghost {
  color: rgba(255,255,255,.92) !important;
}

.gp-chip-row {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.gp-chip-row span {
  padding: .28rem .58rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: .68rem;
  font-weight: 700;
}

.gp-code-panel {
  align-self: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 1rem;
  background: rgba(8, 15, 40, .82);
  box-shadow: 0 22px 50px rgba(15, 23, 42, .35);
  backdrop-filter: blur(12px);
}

.gp-code-panel__bar {
  display: flex;
  align-items: center;
  gap: .36rem;
  padding: .68rem .82rem;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.gp-code-panel__bar span {
  width: .52rem;
  height: .52rem;
  border-radius: 50%;
  background: rgba(255,255,255,.32);
}

.gp-code-panel__bar strong {
  margin-left: .35rem;
  color: rgba(255,255,255,.64);
  font-size: .68rem;
}

.gp-code-panel pre {
  margin: 0;
  padding: 1.15rem 1.2rem;
  background: transparent !important;
  color: #e2e8f0;
  font-size: .72rem;
  line-height: 1.65;
}

.gp-stats,
.gp-release-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0 2.5rem;
}

.gp-stat,
.gp-release-strip > div {
  padding: 1rem;
  border: 1px solid var(--gp-border);
  border-radius: .9rem;
  background: var(--gp-surface);
  box-shadow: 0 8px 24px rgba(30, 41, 59, .045);
}

.gp-stat strong,
.gp-release-strip strong {
  display: block;
  color: var(--md-typeset-color);
  font-size: 1.15rem;
}

.gp-stat span,
.gp-release-strip span {
  display: block;
  margin-top: .2rem;
  color: var(--gp-muted);
  font-size: .68rem;
  line-height: 1.35;
}

.gp-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}

.gp-path {
  position: relative;
  display: block;
  min-height: 13rem;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--gp-border);
  border-radius: 1.15rem;
  background: var(--gp-surface);
  box-shadow: var(--gp-shadow);
  color: var(--md-typeset-color) !important;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.gp-path:hover {
  transform: translateY(-4px);
  border-color: rgba(99,102,241,.42);
  box-shadow: 0 24px 60px rgba(30,41,59,.15);
}

.gp-path::after {
  content: "";
  position: absolute;
  width: 8rem;
  height: 8rem;
  right: -3rem;
  top: -3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79,70,229,.13), rgba(8,145,178,.08));
}

.gp-path__eyebrow,
.gp-card-tag {
  color: var(--gp-indigo);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

[data-md-color-scheme="slate"] .gp-path__eyebrow,
[data-md-color-scheme="slate"] .gp-card-tag {
  color: #a5b4fc;
}

.gp-path h3 {
  margin: .45rem 0 .6rem;
  font-size: 1.18rem;
}

.gp-path p {
  color: var(--gp-muted);
  font-size: .77rem;
  line-height: 1.55;
}

.gp-path strong {
  position: absolute;
  bottom: 1.2rem;
  font-size: .72rem;
}

.gp-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .45rem;
  margin: 1rem 0 1.1rem;
}

.gp-flow > div {
  position: relative;
  padding: .78rem .55rem;
  text-align: center;
  border-radius: .75rem;
  background: linear-gradient(135deg, rgba(79,70,229,.11), rgba(8,145,178,.07));
  border: 1px solid var(--gp-border);
}

.gp-flow strong {
  display: block;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0 auto .35rem;
  line-height: 1.45rem;
  border-radius: 50%;
  background: var(--gp-indigo);
  color: #fff;
  font-size: .66rem;
}

.gp-flow span {
  font-size: .68rem;
  font-weight: 750;
}

.gp-showcase {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0 2rem;
}

.gp-showcase a {
  display: flex;
  flex-direction: column;
  gap: .32rem;
  min-height: 6rem;
  padding: 1rem;
  border: 1px solid var(--gp-border);
  border-radius: .85rem;
  background: var(--gp-surface);
  color: var(--md-typeset-color) !important;
  text-decoration: none !important;
}

.gp-showcase a:hover {
  border-color: rgba(99,102,241,.45);
}

.gp-showcase span {
  color: var(--gp-muted);
  font-size: .7rem;
}

.gp-bottom-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 3rem 0 1rem;
  padding: 1.5rem 1.6rem;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  color: #fff;
}

.gp-bottom-cta h2 {
  margin: 0;
  color: #fff;
}

.gp-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin: 1rem 0 2rem;
}

.gp-example-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.1rem;
  border: 1px solid var(--gp-border);
  border-radius: .95rem;
  background: var(--gp-surface);
}

.gp-example-card h3,
.gp-example-card p {
  margin: 0;
}

.gp-example-card p {
  color: var(--gp-muted);
  font-size: .76rem;
}

.gp-example-card code {
  margin-top: .35rem;
  padding: .45rem .55rem;
  border-radius: .5rem;
  font-size: .68rem;
}

.gp-example-card a {
  margin-top: auto;
  font-size: .72rem;
  font-weight: 750;
}

.gp-link-grid > ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem .85rem;
  padding: 0;
  list-style: none;
}

.gp-link-grid li {
  margin: 0 !important;
  padding: .68rem .78rem;
  border: 1px solid var(--gp-border);
  border-radius: .65rem;
  background: var(--gp-surface);
  font-size: .75rem;
}

.gp-link-grid li:hover {
  border-color: rgba(99,102,241,.42);
}

.gp-api-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin: 1rem 0 1.8rem;
}

.gp-api-card {
  display: block;
  padding: .9rem;
  border: 1px solid var(--gp-border);
  border-radius: .8rem;
  background: var(--gp-surface);
  color: var(--md-typeset-color) !important;
  text-decoration: none !important;
}

.gp-api-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: .78rem;
}

.gp-api-card span {
  display: block;
  margin-top: .25rem;
  color: var(--gp-muted);
  font-size: .66rem;
}

.gp-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.gp-gallery figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--gp-border);
  border-radius: 1rem;
  background: var(--gp-surface);
  box-shadow: var(--gp-shadow);
}

.gp-gallery figure.gp-gallery__wide {
  grid-column: 1 / -1;
}

.gp-gallery img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.gp-gallery figcaption {
  padding: .85rem 1rem 1rem;
  color: var(--gp-muted);
  font-size: .72rem;
  line-height: 1.45;
}

.gp-gallery figcaption strong {
  color: var(--md-typeset-color);
  font-size: .8rem;
}

.md-typeset table:not([class]) {
  border-radius: .65rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30,41,59,.04);
}

.md-typeset h2 {
  margin-top: 2.3em;
}

@media (max-width: 1000px) {
  .gp-hero {
    grid-template-columns: 1fr;
  }

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

  .gp-paths,
  .gp-api-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 700px) {
  .gp-hero {
    padding: 1.5rem;
    border-radius: 1.1rem;
  }

  .gp-hero h1 {
    font-size: 2.55rem;
  }

  .gp-stats,
  .gp-release-strip,
  .gp-showcase,
  .gp-example-grid,
  .gp-link-grid > ul,
  .gp-gallery {
    grid-template-columns: 1fr;
  }

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

  .gp-bottom-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .gp-gallery figure.gp-gallery__wide {
    grid-column: auto;
  }
}
