@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --db-ink: #12263a;
  --db-ink-soft: #38506a;
  --db-paper: #fffaf2;
  --db-paper-strong: #f3ebdc;
  --db-panel: #fffdf8;
  --db-border: rgba(18, 38, 58, 0.12);
  --db-accent: #0f8b8d;
  --db-accent-strong: #0a5f70;
  --db-warm: #f4a261;
  --db-gold: #e9c46a;
  --db-shadow: 0 18px 50px rgba(18, 38, 58, 0.12);
}

body:has(.home-hero) {
  background:
    radial-gradient(circle at top left, rgba(233, 196, 106, 0.2), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 139, 141, 0.18), transparent 24%),
    linear-gradient(180deg, #fffaf2 0%, #fffdf8 48%, #f5efe2 100%);
  color: var(--db-ink);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

body:has(.home-hero) .bd-main .bd-content .bd-article-container {
  max-width: 1200px;
}

body:has(.home-hero) .bd-article {
  overflow: hidden;
}

body:has(.home-hero) .bd-article h1 {
  margin-bottom: 0.8rem;
  color: var(--db-ink);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

body:has(.home-hero) .bd-article h2 {
  margin-top: 4rem;
  margin-bottom: 1.25rem;
  color: var(--db-accent-strong);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

body:has(.home-hero) .bd-article h3 {
  color: var(--db-ink);
  font-family: "Fraunces", Georgia, serif;
}

body:has(.home-hero) .bd-header {
  backdrop-filter: blur(10px);
  background: rgba(255, 250, 242, 0.88);
}

body:has(.home-hero) .navbar-brand img {
  border-radius: 0.8rem;
  box-shadow: 0 10px 26px rgba(18, 38, 58, 0.18);
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  margin: 1rem 0 2.8rem;
  padding: 1.8rem;
  border: 1px solid var(--db-border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 248, 236, 0.95)),
    linear-gradient(135deg, rgba(15, 139, 141, 0.08), rgba(244, 162, 97, 0.08));
  box-shadow: var(--db-shadow);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: auto -120px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 139, 141, 0.2), rgba(15, 139, 141, 0));
}

.home-hero__eyebrow {
  margin-bottom: 1rem;
  color: var(--db-accent-strong);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero__lede {
  max-width: 58ch;
  margin-bottom: 1.35rem;
  color: var(--db-ink-soft);
  font-size: 1.18rem;
  line-height: 1.65;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.home-button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.home-button--primary {
  background: linear-gradient(135deg, var(--db-accent), var(--db-accent-strong));
  box-shadow: 0 12px 24px rgba(15, 139, 141, 0.24);
  color: #fff;
}

.home-button--primary:hover {
  color: #fff;
}

.home-button--secondary {
  border-color: rgba(18, 38, 58, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--db-ink);
}

.home-button--secondary:hover {
  color: var(--db-ink);
  box-shadow: 0 10px 18px rgba(18, 38, 58, 0.08);
}

.home-hero__support {
  max-width: 58ch;
  color: var(--db-ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}

.home-hero__panel {
  position: relative;
  z-index: 1;
  padding: 1.3rem;
  border: 1px solid rgba(18, 38, 58, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.home-hero__panel h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.home-stat {
  padding: 0.95rem;
  border-radius: 18px;
  background: var(--db-paper);
}

.home-stat strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--db-accent-strong);
  font-size: 1.6rem;
  font-weight: 700;
}

.home-panel-note {
  margin: 0;
  color: var(--db-ink-soft);
  font-size: 0.95rem;
  line-height: 1.65;
}

.home-feature-grid,
.home-resource-grid,
.home-chapter-grid {
  display: grid;
  gap: 1rem;
}

.home-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-resource-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-chapter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-feature,
.home-resource,
.home-chapter-card,
.home-coming-soon {
  border: 1px solid var(--db-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(18, 38, 58, 0.06);
}

.home-feature,
.home-resource,
.home-coming-soon {
  padding: 1.35rem;
}

.home-feature {
  animation: rise-in 500ms ease both;
}

.home-feature p,
.home-resource p,
.home-coming-soon p {
  margin-bottom: 0;
  color: var(--db-ink-soft);
  line-height: 1.65;
}

.home-chapter-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.25rem;
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-chapter-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 139, 141, 0.32);
  box-shadow: 0 18px 36px rgba(18, 38, 58, 0.12);
  color: inherit;
  text-decoration: none;
}

.home-chapter-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 139, 141, 0.15), rgba(233, 196, 106, 0.4));
  color: var(--db-accent-strong);
  font-size: 1rem;
  font-weight: 700;
}

.home-chapter-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.home-chapter-card p {
  margin: 0;
  color: var(--db-ink-soft);
  line-height: 1.62;
}

.home-chapter-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
}

.home-chip,
.home-link-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.home-chip {
  background: rgba(15, 139, 141, 0.12);
  color: var(--db-accent-strong);
}

.home-link-inline {
  border: 1px solid rgba(18, 38, 58, 0.12);
  background: rgba(255, 255, 255, 0.84);
  color: var(--db-ink);
}

.home-link-inline:hover {
  color: var(--db-ink);
  text-decoration: none;
}

.home-resource h3,
.home-feature h3,
.home-coming-soon h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.home-resource a {
  font-weight: 700;
}

.home-coming-soon {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(15, 139, 141, 0.08), rgba(233, 196, 106, 0.18)),
    rgba(255, 255, 255, 0.92);
}

.home-coming-soon::after {
  content: "Future section";
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(18, 38, 58, 0.08);
  color: var(--db-accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .home-feature-grid,
  .home-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-chapter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 1.3rem;
  }

  .home-stats,
  .home-feature-grid,
  .home-resource-grid,
  .home-chapter-grid {
    grid-template-columns: 1fr;
  }

  body:has(.home-hero) .bd-article h1 {
    font-size: clamp(2.2rem, 10vw, 3.1rem);
  }
}

.output--sandboxed {
  margin-top: 0.5rem;
}

.sandboxed-html-output {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(18, 38, 58, 0.1);
}

/* Remove the secondary (right) sidebar globally to have left-only columns */
.bd-sidebar-secondary,
.sidebar-secondary,
.bd-toc {
  display: none !important;
}

/* Reclaim the main content area width to prevent an empty right column */
.bd-content .bd-article-container {
  max-width: 100% !important;
}

/* Ensure the main grid layout expands to fill the available space */
.bd-main .bd-content {
  flex-grow: 1 !important;
}