:root {
  --project-blue: #2a78d6;
  --project-orange: #eb6834;
  --project-green: #1baf7a;
  --project-yellow: #eda100;
  --panel-bg: #ffffff;
  --panel-border: #d9dee7;
  --panel-muted: #5c6470;
}

body.quarto-dark {
  --panel-bg: #202326;
  --panel-border: #3a4047;
  --panel-muted: #c3c8cf;
}

.quarto-title-block .title {
  font-weight: 760;
  letter-spacing: 0;
}

.quarto-title-block .subtitle {
  max-width: 760px;
}

.navbar-title {
  font-weight: 700;
  letter-spacing: 0;
}

.fig-light,
.fig-dark {
  display: none;
  width: 100%;
  height: auto;
}

body.quarto-light .fig-light,
body.quarto-dark .fig-dark {
  display: block;
}

body:not(.quarto-light):not(.quarto-dark) .fig-light {
  display: block;
}

@media (prefers-color-scheme: dark) {
  body:not(.quarto-light):not(.quarto-dark) .fig-light {
    display: none;
  }
  body:not(.quarto-light):not(.quarto-dark) .fig-dark {
    display: block;
  }
}

figure {
  margin: 1.9rem 0;
}

figure figcaption {
  font-size: 0.85rem;
  opacity: 0.72;
  margin-top: 0.55rem;
  line-height: 1.45;
}

.table-scroll,
div:has(> table) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.metric-strip,
.workflow,
.build-strip,
.strategy-grid {
  display: grid;
  gap: 0.9rem;
  margin: 1.5rem 0 2rem;
}

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

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

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

.metric,
.workflow-step,
.build-card,
.strategy {
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--panel-bg);
  padding: 1rem;
  min-width: 0;
  position: relative;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

body.quarto-dark .metric,
body.quarto-dark .workflow-step,
body.quarto-dark .build-card,
body.quarto-dark .strategy {
  box-shadow: none;
}

.metric::before,
.workflow-step::before,
.build-card::before,
.strategy::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--project-blue);
  border-radius: 6px 6px 0 0;
}

.metric-hot::before,
.build-card:nth-child(2)::before,
.strategy:nth-child(2)::before {
  background: var(--project-orange);
}

.metric-green::before,
.build-card-accent::before,
.workflow-step:nth-child(3)::before,
.strategy:nth-child(3)::before {
  background: var(--project-green);
}

.strategy:nth-child(4)::before {
  background: var(--project-yellow);
}

.metric span,
.step-id {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--panel-muted);
  letter-spacing: 0;
  margin-bottom: 0.45rem;
}

.metric p {
  margin: 0;
}

.metric strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1.1;
  margin-bottom: 0.45rem;
}

.metric small {
  display: block;
  color: var(--panel-muted);
  line-height: 1.4;
}

.workflow-step h3,
.build-card h3,
.strategy h3 {
  font-size: 1rem;
  margin: 0 0 0.45rem;
  letter-spacing: 0;
}

.workflow-step p,
.build-card p,
.strategy p {
  margin: 0;
  color: var(--panel-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

table {
  font-size: 0.9rem;
}

pre {
  overflow-x: auto;
  max-width: 100%;
}

.takeaway {
  border-left: 3px solid #2a78d6;
  padding: 0.65rem 0 0.65rem 1rem;
  margin: 1.6rem 0;
  font-size: 1.02rem;
  line-height: 1.6;
}

body.quarto-dark .takeaway {
  border-left-color: #3987e5;
}

@media (max-width: 640px) {
  .metric-strip,
  .workflow,
  .build-strip,
  .strategy-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 0.8rem;
  }

  figure figcaption {
    font-size: 0.8rem;
  }

  .takeaway {
    font-size: 0.96rem;
    padding-left: 0.8rem;
  }

  h1 {
    font-size: 1.65rem;
    line-height: 1.25;
  }

  h2 {
    font-size: 1.3rem;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  .metric-strip,
  .workflow,
  .build-strip,
  .strategy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
