/* =========================
   Text Styling
========================= */
.h1-blog {
  font-size: 32px;
  padding-top: 24px;
}
.h2-blog {
  font-size: 24px !important;
  font-weight: 900 !important;
  padding-top: 10px !important;
  margin-top: 30px !important;
}
.h3-blog {
  font-size: 20px !important;
  font-weight: bold !important;
  margin-top: 20px !important;
}

blockquote {
  background-color: #f0f8ff;
  border-left: 5px solid rgb(44, 133, 220);
  padding: 10px 20px;
  margin: 20px 0;
  font-style: italic;
  color: #333;
  border-radius: 5px;
}

ul { margin-bottom: 20px; }
ol { margin-bottom: 10px; }
li { margin: 5px; }

.cfo-tip {
  color: rgb(17, 127, 220);
  font-weight: bold;
}

.latex {
  font-size: 0.85em;
  max-width: 100%;
  overflow: auto;
}

.sources {
  font-size: smaller;
}

/* =========================
   Figure Styling
========================= */
figure {
  width: 90%;
}

figcaption {
  font-size: smaller;
}

/* =========================
   Plotly Styling
========================= */
.plotly-container {
  width: 100%;
  height: 500px;
}

/* =========================
   Tabs
========================= */
.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab-link {
  background-color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  color: rgb(44, 133, 220);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.tab-link:hover {
  background-color: #ddd;
}

.tab-link.active {
  background-color: #ccc;
  font-weight: bold;
}

.tab-content {
  display: block;
  padding: 20px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-top: none;
  background-color: #f9f9f9;
  overflow-x: auto;
}

/* =========================
   Tooltip
========================= */
.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted currentColor;
  }
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 125%;
  transform: translateX(-50%);

  width: clamp(180px, 60vw, 260px);
  white-space: normal;

  background: #111;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 1000;
}

.tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 115%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #111;

  opacity: 0;
  transition: opacity 0.15s ease;
}

.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
}

/* =========================
   Tables
========================= */
.table-wrapper {
  width: 90%;
  margin: 10px auto;
}

table {
  display: table;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Arial, sans-serif;
  border: 2px solid #000028;
} */

caption {
  caption-side: top;
  padding: 10px;
  font-weight: bold;
  text-align: left;
}

th,
td {
  border: 1px solid #ccc;
  padding: 8px;
  height: 44px;
  font-size: 14px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

thead {
  border: 2px solid #000028;
}

thead th {
  background-color: #f5f5f5;
  font-weight: 600;
}

tfoot {
  border: 2px solid #000028;
}

tfoot td {
  font-weight: bolder;
}

/* =========================
   Slideshow
========================= */
.slideshow {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: auto;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.slide {
  flex-grow: 1;
}

.controls {
  margin-top: auto;
}

.note {
  margin-top: 5px;
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 16px;
  cursor: pointer;
}

#reset {
  margin-top: 20px;
  background: #eee;
  font-size: 14px;
}

/* =========================
   Mobile
========================= */
@media (max-width: 768px) {
  thead,
  td {
    font-size: 10px;
    word-wrap: break-word;
  }

  .plotly-container {
  width: 100%;
  height: 500px;
  }
  
  .table-container {
    width: 100%;
    table-layout: fixed;
    text-align: center;
  }
  
  .tabs {
    flex-wrap: wrap;
  }
  
  .tab-link {
    flex: 1 1 auto;
    font-size: 14px;
    padding: 8px 12px;
  }

  .wrapper {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrapper > div {
    width: 100%;
  }
}
