:root {
  --brand-ink: #172033;
  --brand-accent: #0f766e;
  --brand-blue: #2563eb;
  --brand-green: #059669;
  --brand-warm: #d97706;
  --brand-rose: #be123c;
  --brand-soft: #f7f3ea;
  --brand-muted: #64748b;
  --surface: rgba(255, 255, 255, 0.9);
}

body {
  color: var(--brand-ink);
  background: #f8f7f3;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

#quarto-content,
main.content,
.quarto-container.page-layout-article {
  background: transparent;
}

#quarto-document-content {
  background: rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  padding: 1.25rem 1.35rem 2rem;
  box-shadow: 0 18px 40px rgba(15, 32, 51, 0.05);
}

h1, h2, h3, h4, .navbar-title {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.01em;
}

.navbar {
  background: linear-gradient(90deg, #102033, #0f766e) !important;
  box-shadow: 0 8px 24px rgba(15, 32, 51, 0.14);
}

.navbar .navbar-title,
.navbar .nav-link {
  color: #ffffff !important;
}

.navbar .nav-link.active,
.navbar .nav-link:hover {
  color: #fde68a !important;
}

.hero-banner {
  padding: 2.4rem 2.4rem;
  margin: 1.2rem 0 2rem;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 32, 51, 0.96), rgba(15, 118, 110, 0.9)),
    linear-gradient(135deg, rgba(217, 119, 6, 0.24), transparent 42%);
  color: #f8fbff;
  box-shadow: 0 18px 42px rgba(20, 50, 74, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-banner h2 {
  margin-top: 0;
  color: #ffffff;
}

.whale-thesis {
  margin: 0.8rem 0 2rem;
  padding: 1.35rem 1.45rem 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 234, 0.92));
  border: 1px solid rgba(15, 118, 110, 0.16);
  box-shadow: 0 14px 34px rgba(15, 32, 51, 0.08);
}

.whale-thesis-kicker {
  color: var(--brand-accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.whale-thesis h3 {
  margin: 0 0 0.65rem;
  color: var(--brand-ink);
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

.whale-thesis p {
  margin-bottom: 0.8rem;
  font-size: 1.02rem;
  line-height: 1.7;
}

.whale-thesis p:last-child {
  margin-bottom: 0;
}

.table {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 32, 51, 0.06);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.35rem;
}

.snapshot-card {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(239, 247, 244, 0.88));
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: 0 12px 28px rgba(15, 32, 51, 0.09);
  overflow: hidden;
}

.snapshot-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-accent), var(--brand-warm));
}

.snapshot-label {
  color: var(--brand-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.25;
  min-height: 4.2rem;
  display: block;
}

.snapshot-value {
  margin-top: 0.8rem;
  color: var(--brand-ink);
  font-size: clamp(1.75rem, 2.7vw, 3.1rem);
  font-weight: 800;
  line-height: 1.02;
  min-height: 8.2rem;
  display: flex;
  align-items: flex-start;
  overflow-wrap: anywhere;
}

.snapshot-note {
  margin-top: auto;
  padding-top: 0.4rem;
  color: #475569;
  font-size: 0.92rem;
}

.interactive-table-wrap {
  margin: 1rem 0 1.5rem;
}

.interactive-table-search {
  width: min(100%, 22rem);
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #c8ced6;
  border-radius: 6px;
}

.interactive-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 32, 51, 0.06);
}

.interactive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.interactive-table th,
.interactive-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #e8ebf0;
  text-align: left;
  white-space: nowrap;
}

.interactive-table th {
  background: #e8f3f1;
  font-weight: 650;
}

.interactive-table tr:hover td {
  background: #fff7ed;
}

.quarto-title-banner {
  background: transparent;
}

a {
  color: var(--brand-accent);
}

a:hover {
  color: var(--brand-warm);
}

.result-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.result-metric-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.1rem 1rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(20, 50, 74, 0.08);
  box-shadow: 0 10px 24px rgba(20, 50, 74, 0.08);
}

.result-metric-card-accent {
  background: linear-gradient(135deg, rgba(15, 76, 92, 0.96), rgba(20, 50, 74, 0.94));
  color: #f8fbff;
}

.result-metric-label {
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.7rem;
  min-height: 4.9rem;
  line-height: 1.3;
  display: block;
}

.result-metric-value {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 2.35vw, 2.15rem);
  line-height: 0.98;
  font-weight: 700;
  margin-top: auto;
  margin-bottom: auto;
  overflow-wrap: anywhere;
  max-width: 82%;
}

.page-footer {
  background: rgba(15, 32, 51, 0.92);
  color: #f8fafc;
}

@media (max-width: 1200px) {
  .snapshot-grid,
  .result-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .snapshot-grid,
  .result-metric-grid {
    grid-template-columns: 1fr;
  }
}

.cell-output-display > div:has(.plotly-graph-div),
.cell-output-display > div:has(.dataframe),
.cell-output-display > table,
.plotly-graph-div {
  background: transparent;
}

.cell-output-display > div:has(.plotly-graph-div),
.cell-output-display > div:has(.dataframe) {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  box-shadow: 0 10px 24px rgba(15, 32, 51, 0.05);
}
