:root {
  --brand: #2e8555;
  --brand-dark: #205d3b;
  --brand-soft: rgba(46, 133, 85, .09);
  --surface: #ffffff;
  --muted: #5f6b66;
  --border: #dfe6e2;
  --shadow: 0 10px 30px rgba(22, 52, 36, .08);
  /* Keep Mermaid diagrams on the same neutral/brand palette as the site.
     Quarto's default Cosmo mapping uses the link color for labels and a
     mid-gray body tint for subgraph fills, which is too strong here. */
  --mermaid-bg-color: #ffffff;
  --mermaid-edge-color: #69766f;
  --mermaid-node-fg-color: #205d3b;
  --mermaid-fg-color: #343a40;
  --mermaid-fg-color--lighter: #c7d2cc;
  --mermaid-fg-color--lightest: #f3f7f5;
  --mermaid-label-bg-color: #ffffff;
  --mermaid-label-fg-color: #343a40;
  --mermaid-node-bg-color: rgba(46, 133, 85, .09);
  --mermaid-font-weight: 500;
}

a { color: var(--brand-dark); }
.navbar { border-bottom: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.035); }
.navbar-brand img { max-height: 28px; }
.navbar-title { font-weight: 700; letter-spacing: -.015em; }
.nav-link.active, .navbar-nav .nav-link:hover { color: var(--brand-dark) !important; }
#quarto-search.type-overlay .aa-Autocomplete svg { color: var(--brand); }
.sidebar-navigation .sidebar-item .sidebar-link.active { color: var(--brand-dark); font-weight: 700; }
.sidebar-navigation .sidebar-item .sidebar-link:hover { color: var(--brand); }
.quarto-title h1, h1, h2, h3 { letter-spacing: -.025em; }
.quarto-title-meta { font-size: .9rem; }

.content-card-grid, .advantage-grid, .use-case-grid, .comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.content-card {
  display: flex;
  flex-direction: column;
  min-height: 180px;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(22,52,36,.045);
}
.content-card > h3 { margin-top: 0; font-size: 1.12rem; }
.content-card > p { color: var(--muted); flex: 1; }
.content-card .card-link { margin-top: auto; }
.card-link { font-weight: 700; text-decoration: none; }
.card-meta { color: var(--brand-dark); font-size: .72rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.featured-card { border-color: rgba(46,133,85,.45); box-shadow: var(--shadow); }

.template-interactive { margin: 1.5rem 0 2rem; }
.template-demo-card { display: block; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; }
.template-demo-image { display:block; position:relative; aspect-ratio:16/9; overflow:hidden; background:#0f172a; }
.template-demo-image img { width:100%; height:100%; object-fit:cover; transition:transform .25s ease; }
.template-demo-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(15,23,42,.25); }
.template-demo-badge { background:var(--brand); color:white; font-weight:700; border-radius:999px; padding:.75rem 1.25rem; box-shadow:0 4px 16px rgba(0,0,0,.25); }
.template-demo-card:hover img { transform:scale(1.015); }
.template-interactive figcaption { margin-top:.55rem; font-size:.94rem; }

.homepage #title-block-header.quarto-title-block { display:none; }
.home-container { width:min(1180px, calc(100% - 2rem)); margin:0 auto; }
.home-hero { padding:5.5rem 0 4.5rem; background:linear-gradient(180deg, rgba(46,133,85,.075), rgba(46,133,85,.012)); }
.hero-grid, .two-column { display:grid; grid-template-columns:minmax(0,1fr) minmax(430px,1fr); gap:4rem; align-items:center; }
.hero-copy h1 { font-size:clamp(2.8rem,6vw,5.3rem); line-height:.96; margin:0; letter-spacing:-.055em; }
.hero-copy p { font-size:1.18rem; line-height:1.7; color:var(--muted); max-width:650px; }
.eyebrow { color:var(--brand-dark); font-size:.78rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; margin-bottom:1rem; }
.cta-row { display:flex; gap:.8rem; flex-wrap:wrap; margin:1.6rem 0 1rem; }
.btn-primary, .btn-secondary { display:inline-block; padding:.75rem 1rem; border-radius:8px; font-weight:750; text-decoration:none; }
.btn-primary { background:var(--brand); color:white !important; }
.btn-secondary { border:1px solid var(--border); color:#1f2925; background:white; }
.appsource-link { font-size:.9rem; font-weight:650; }
.product-preview { display:block; color:inherit; text-decoration:none; border:1px solid var(--border); border-radius:14px; overflow:hidden; background:white; box-shadow:0 18px 45px rgba(22,52,36,.13); }
.product-preview img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.preview-caption { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem 1.1rem; }
.preview-caption span { display:flex; flex-direction:column; }
.preview-caption small { color:var(--muted); margin-top:.15rem; }
.logo-wall-section { padding:2.2rem 0 2.6rem; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.logo-wall-label { text-align:center; color:var(--muted); font-size:.82rem; font-weight:700; }
.logo-wall { display:grid; grid-template-columns:repeat(8,minmax(72px,1fr)); gap:1.6rem 2rem; align-items:center; margin-top:1.3rem; }
.logo-wall img { width:100%; max-width:110px; height:40px; object-fit:contain; margin:auto; filter:grayscale(100%); opacity:.52; }
.home-section { padding:5rem 0; }
.home-section h2 { font-size:clamp(2rem,4vw,3.15rem); line-height:1.05; margin-bottom:1rem; }
.subtle-section { background:var(--brand-soft); border-top:1px solid rgba(46,133,85,.1); border-bottom:1px solid rgba(46,133,85,.1); }
.advantage-grid, .use-case-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.product-model { display:grid; grid-template-columns:minmax(0,.8fr) auto minmax(0,1fr); align-items:center; gap:.8rem; }
.model-box { border:1px solid var(--border); border-radius:10px; padding:1.1rem; background:white; }
.model-box span { display:block; color:var(--muted); font-size:.8rem; margin-top:.3rem; }
.model-notebook { border-color:rgba(46,133,85,.45); box-shadow:var(--shadow); }
.model-arrow { color:var(--brand); font-size:1.5rem; font-weight:800; }
.model-outputs { display:grid; gap:.5rem; }
.model-outputs span { background:white; border:1px solid rgba(46,133,85,.2); border-radius:7px; padding:.6rem .75rem; font-size:.82rem; font-weight:700; }
.section-heading { display:flex; justify-content:space-between; align-items:end; gap:2rem; }
.section-heading h2 { margin-bottom:0; }
.feature-section { background:#f7f9f8; }
.code-example { background:#16211c; color:#edf6f0; border-radius:12px; padding:1.25rem; box-shadow:var(--shadow); overflow:auto; }
.code-example > span { display:block; color:#a8c2b2; font-size:.75rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; margin-bottom:.75rem; }
.code-example pre { margin:0 0 1rem; background:transparent; color:inherit; border:0; padding:0; }
.code-example code { color:inherit; }
.comparison-grid { grid-template-columns:1fr 1fr; }
.supporting-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1rem; margin-top:2rem; }
.supporting-grid a { display:flex; justify-content:space-between; border:1px solid var(--border); border-radius:10px; padding:1rem; text-decoration:none; font-weight:700; background:white; }
.final-section { padding-bottom:6rem; }
.final-cta { text-align:center; max-width:800px; }
.final-cta .cta-row { justify-content:center; }

.marketplace-badge { display:block; width:180px; max-width:100%; height:auto; margin-top:1rem; }

.callout { border-radius:8px; }

@media (max-width: 1000px) {
  .hero-grid, .two-column { grid-template-columns:1fr; gap:2rem; }
  .advantage-grid, .use-case-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .logo-wall { grid-template-columns:repeat(4,1fr); }
}
@media (max-width: 620px) {
  .home-hero { padding:3.5rem 0 3rem; }
  .advantage-grid, .use-case-grid, .comparison-grid, .supporting-grid { grid-template-columns:1fr; }
  .logo-wall { grid-template-columns:repeat(2,1fr); }
  .section-heading { display:block; }
}

/* Quarto dark theme overrides for custom cards/landing sections. */
.quarto-dark {
  --surface: #202622;
  --muted: #bac5bf;
  --border: #3a453f;
  --brand-dark: #6ad5a0;
  --brand-soft: rgba(73, 191, 126, .10);
  --mermaid-bg-color: #202622;
  --mermaid-edge-color: #aab6b0;
  --mermaid-node-fg-color: #6ad5a0;
  --mermaid-fg-color: #f2f5f3;
  --mermaid-fg-color--lighter: #4d5b54;
  --mermaid-fg-color--lightest: #29312d;
  --mermaid-label-bg-color: #202622;
  --mermaid-label-fg-color: #f2f5f3;
  --mermaid-node-bg-color: rgba(73, 191, 126, .10);
}
.quarto-dark .content-card,
.quarto-dark .model-box,
.quarto-dark .model-outputs span,
.quarto-dark .supporting-grid a,
.quarto-dark .btn-secondary,
.quarto-dark .product-preview { background: var(--surface); color: #f2f5f3; }
.quarto-dark .feature-section { background: #181d1a; }
.quarto-dark .logo-wall img { filter: grayscale(100%) invert(.82); }
.quarto-dark .btn-secondary { border-color: var(--border); }

/* Template library: distinguish focused Examples from feature-rich Toolboxes. */
.template-library-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.25rem;
}

.template-library-choice {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 1.25rem 1.35rem;
  background: color-mix(in srgb, var(--bs-body-bg) 94%, var(--bs-primary) 6%);
}

.template-library-choice h3 {
  margin-top: 0;
}

#toolboxes-grid .quarto-grid-item {
  border-width: 1px;
}

#toolboxes-grid .card-title {
  font-size: 1.35rem;
}

#toolboxes-grid .card-text,
#toolboxes-grid .listing-description {
  font-size: 1rem;
  line-height: 1.55;
}

@media (max-width: 767.98px) {
  .template-library-choices {
    grid-template-columns: 1fr;
  }
}
