@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #183642;
  --paper: #f7f4ed;
  --coral: #e76f51;
  --mint: #b8d8d8;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

h1, h2, h3, .navbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0;
}

h1 {
  color: var(--ink);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.98;
  max-width: 22ch;
}

.page-layout-article .quarto-about-jolla,
.page-layout-article main.content {
  max-width: min(1440px, calc(100vw - 2rem));
  margin-left: auto;
  margin-right: auto;
}

.page-layout-article main.content {
  width: 100%;
}

.quarto-title-block .quarto-title .subtitle {
  color: #42616a;
  font-size: 1.2rem;
  max-width: 40rem;
}

.quarto-about-jolla .quarto-title-block {
  width: 100%;
}

.quarto-about-jolla .quarto-title {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quarto-about-jolla .quarto-title h1.title {
  width: 100%;
  max-width: 100%;
}

.quarto-about-jolla {
  border-bottom: 1px solid rgba(24, 54, 66, 0.18);
  margin-bottom: 4rem;
  padding-bottom: 4rem;
}

.quarto-about-jolla .about-image {
  box-shadow: 18px 18px 0 var(--mint);
}

.grid {
  column-gap: 2.5rem;
  row-gap: 2rem;
  margin: 3rem 0 4rem;
}

.grid h3 {
  color: var(--coral);
  font-size: 1.1rem;
}

.callout-note {
  background: var(--mint);
  border: 0;
  border-left: 6px solid var(--coral);
  color: var(--ink);
}

.status-graphic {
  background: var(--paper);
  border-top: 1px solid rgba(24, 54, 66, 0.18);
  border-bottom: 1px solid rgba(24, 54, 66, 0.18);
  margin: 2rem 0 1.5rem;
  overflow-x: auto;
  padding: 1.25rem 0;
}

.status-graphic img {
  display: block;
  height: auto;
  min-width: 760px;
  width: 100%;
}

.navbar-brand {
  font-weight: 700;
}

.quarto-title-block {
  border-bottom: 1px solid rgba(24, 54, 66, 0.18);
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
}

.cell-output-display {
  margin: 2rem 0 4.5rem;
}

.cell-output-display .plotly,
.cell-output-display .plotly.html-widget,
.cell-output-display .plotly.html-widget > .js-plotly-plot {
  width: 100% !important;
  max-width: 100%;
}

.cell-output-display img {
  background: var(--paper);
}

.trial-size-panels {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 2rem 0 4rem;
}

.trial-size-panel {
  background: var(--paper);
  border: 1px solid rgba(24, 54, 66, 0.18);
  display: block;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.trial-size-panel:hover,
.trial-size-panel:focus-visible {
  box-shadow: 0 8px 20px rgba(24, 54, 66, 0.16);
  transform: translateY(-2px);
}

.trial-size-panel img {
  display: block;
  height: auto;
  width: 100%;
}

@media (max-width: 900px) {
  .trial-size-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .page-layout-article .quarto-about-jolla,
  .page-layout-article main.content {
    max-width: calc(100vw - 1.5rem);
  }

  .trial-size-panels {
    gap: 1rem;
    grid-template-columns: 1fr;
  }
}

.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0 3rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid rgba(24, 54, 66, 0.15);
  border-left: 5px solid var(--coral);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 6px rgba(24, 54, 66, 0.05);
}

.metric-card.alt {
  border-left-color: #42616a;
}

.metric-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.metric-label {
  font-size: 0.92rem;
  color: #42616a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-top: 0.35rem;
}

.metric-sub {
  font-size: 0.85rem;
  color: #5d757e;
  margin-top: 0.25rem;
}

.benefit-box {
  background: #ffffff;
  border: 1px solid rgba(24, 54, 66, 0.12);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(24, 54, 66, 0.04);
}

.benefit-box h3 {
  margin-top: 0;
  color: var(--coral);
  font-size: 1.3rem;
}

/* Hide figure captions underneath charts to prevent overlapping and cutoff text */
figcaption,
.figure-caption,
.quarto-float-caption,
.quarto-float-caption-bottom {
  display: none !important;
}

