.applet-index-lead,
.applet-card-grid,
.applet-nav,
main.content > p,
main.content > .applet-stage,
main.content > .applet-note,
main.content > .applet-sources {
  width: min(1500px, calc(100% - 2rem));
  margin-right: auto;
  margin-left: auto;
}

.applet-index-lead {
  max-width: 1080px;
  margin-bottom: 1.4rem;
  color: #53616f;
  font-size: 1.05rem;
  line-height: 1.6;
}

.applet-index-lead p {
  max-width: 820px;
}

.sciencepop-back-link,
.applet-nav a {
  color: #175873;
  font-weight: 700;
  text-decoration: none;
}

.applet-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0.9rem;
  max-width: 1180px;
  padding-bottom: 3rem;
}

.applet-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid rgba(43, 67, 91, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(43, 67, 91, 0.07);
}

.applet-card--featured {
  border-color: rgba(31, 111, 139, 0.45);
  background: linear-gradient(145deg, #f2fbff, #ffffff 60%);
  box-shadow: 0 14px 34px rgba(31, 111, 139, 0.13);
}

.applet-card-kicker {
  color: #1f6f8b;
  font-size: 0.74rem;
  font-weight: 780;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.applet-card h2 {
  margin: 0.38rem 0 0.55rem;
  font-size: 1.23rem;
  line-height: 1.2;
}

.applet-card h2 a {
  color: #25313a;
  text-decoration: none;
}

.applet-card p {
  margin: 0;
  color: #53616f;
  line-height: 1.48;
}

.applet-card-action {
  margin-top: auto;
  padding-top: 1rem;
  color: #175873;
  font-weight: 720;
  text-decoration: none;
}

.applet-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.applet-stage {
  box-sizing: border-box;
  max-width: 1560px;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
  padding: clamp(0.55rem, 1.7vw, 1.5rem);
  overflow: hidden;
  border: 1px solid rgba(103, 151, 184, 0.34);
  border-radius: 16px;
  background: #06111f;
  color: #f0f5fa;
  box-shadow: 0 18px 44px rgba(17, 38, 56, 0.16);
}

.applet-stage .observablehq {
  max-width: 100%;
}

.applet-note,
.applet-sources {
  max-width: 1120px;
  color: #53616f;
  line-height: 1.55;
}

.applet-note {
  margin-bottom: 1.4rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #1f6f8b;
  background: rgba(255, 255, 255, 0.72);
}

.applet-sources {
  margin-bottom: 3rem;
  font-size: 0.92rem;
}

html.is-embedded-applet body {
  background: transparent;
}

html.is-embedded-applet #quarto-header,
html.is-embedded-applet #title-block-header,
html.is-embedded-applet .applet-nav,
html.is-embedded-applet .nav-footer {
  display: none !important;
}

html.is-embedded-applet #quarto-content,
html.is-embedded-applet main.content {
  margin: 0 !important;
  padding: 0 !important;
}

html.is-embedded-applet #quarto-content,
html.is-embedded-applet #quarto-content.page-columns {
  display: block !important;
}

html.is-embedded-applet main.content {
  width: 100% !important;
  max-width: none !important;
  grid-column: 1 / -1 !important;
}

html.is-embedded-applet main.content > p,
html.is-embedded-applet main.content > .applet-note,
html.is-embedded-applet main.content > .applet-sources {
  display: none !important;
}

html.is-embedded-applet main.content > .applet-stage {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

html.is-embedded-applet .code-copy-button {
  display: none !important;
}

@media (max-width: 800px) {
  .applet-card-grid {
    grid-template-columns: 1fr;
  }
}
