body, html {
    height: 100%;
    margin: 0;
}

.center-container {
    height: 100vh;
}

.icon-img {
    width: 64px;
    height: auto;
}

th, td {
    text-align:center;
}

.table, .table th, .table td {
    border: 1px solid black !important;
}

.table {
    border-collapse: collapse !important;
}

.navbar-brand{
    margin-left:20px
}

body {
    padding-top: 70px; 
    padding-bottom: 70px;
}

  table.dataTable {
    white-space: nowrap;  /* prevent text from wrapping */
    font-size: 0.85rem;    /* shrink text slightly for large tables */
  }

  /* Apply drop shadow to all chart images */
img.img-fluid.shadow-sm {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25) !important;
  border-radius: 8px;
}

/* Page title bar */
.page-title {
  background: #f5f5f7;           /* light grey */
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.page-title .inner {
  max-width: 1400px;              /* match your charts width */
  margin: 0 auto;
  padding: .75rem 1rem;           /* comfy spacing */
}
.page-title h1 {
  margin: 0;
  font-size: 1.25rem;             /* h5-ish */
  font-weight: 600;
  color: #1f2937;                 /* dark grey */
}

.jumbotron {
    padding: 2rem 1rem;
    /*margin-bottom: 2rem;*/
    background-color: #e9ecef;
    border-radius: .3rem;
    margin-top:-10px
}

.display-3 {
    font-size: 3.0rem;
    font-weight: 300;
    line-height: 1.2;
}

/* Home-only overrides */
body.home {
  /* remove global page padding used for fixed navbar elsewhere */
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (max-width: 575.98px) {
  body.home {
    padding: 24px 20px;              /* comfy mobile gutters */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  body.home .center-container {
    /* avoid conflict with the global 100vh container rule */
    height: auto !important;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  body.home .center-container > div {
    transform: translateY(-6vh);     /* nudge up a bit */
    margin-top: 0 !important;
    max-width: 720px;
    width: 100%;
    padding: 0 8px;
  }
  body.home .icon-img {
    width: 96px !important;          /* override the global 64px */
    height: auto;
  }
  /* hide the inline link list on small screens if you're using the offcanvas menu */
  body.home .home-nav { display: none !important; }
}
/* Mobile-only: place hamburger in the top-right on the home page */
@media (max-width: 575.98px) {
  body.home .menu-btn{
    position: fixed;
    inset: 12px 12px auto auto;  /* top/right = 12px; no left */
    left: auto !important;
    right: 12px !important;
    z-index: 1065;               /* above content/backdrop */
    border: 1px solid #e5e7eb;
    background: #fff;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
  }
  body.home .menu-btn .icon{ font-size: 1.2rem; line-height: 1; }
}

/* === Home (desktop / tablet) === */
body.home .center-container { text-align: center; }

body.home .home-nav{
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

body.home .home-nav .nav-item{
  display: flex;
  align-items: center;
}

body.home .home-nav .nav-link{
  color: #000;
  font-weight: 600;
  text-decoration: none;
  padding: 0 0.75rem;
  cursor: pointer;
}

body.home .home-nav .nav-link:hover{
  text-decoration: underline;
}

/* vertical pipe separators between items (desktop only) */
body.home .home-nav .nav-item + .nav-item::before{
  content: "|";
  color: #000;
  margin: 0 0.75rem;
}

@media (min-width: 768px){
  .navbar #mainNav { margin-left: auto !important; }
}

/* Optional: make the rocket a bit larger on md+ screens */
@media (min-width: 768px){
  body.home .icon-img{ width: 96px; }
}

/* Desktop/tablet: keep hero content the same width as the nav */
@media (min-width: 768px){
  body.home .center-container > div{
    max-width: 650px;   /* tune 700–820px to taste */
    margin-left: auto;
    margin-right: auto;
  }
  body.home .info-text{
    max-width: 760px;   /* match the wrapper so the paragraph doesn't run wide */
  }
}

/* Global nav polish */
.navbar .nav-link { font-weight: 400; color: #444; }
.navbar .nav-link:hover { color: #0d6efd; }

/* Offcanvas list lines + weight */
.offcanvas .list-group-item { border-color: #eef1f4; font-weight: 600; }

/* Offcanvas list lines + weight */
.offcanvas .list-group-item {
  border-color:#eef1f4;
  font-weight:600;
}
.offcanvas .list-group-item .bi { font-size:1.1rem; opacity:.9; }


/* Pretty mobile hamburger */
.mv-menu-btn {
  display:flex; align-items:center; justify-content:center;
  width:44px; height:44px;
  border:1px solid #e5e7eb; background:#fff; border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.06);
  margin-left:auto;
}
.mv-menu-btn:active { transform: translateY(1px); }
.mv-menu-btn .bi { font-size:1.25rem; line-height:1; }

/* Remove any seam between fixed-top navbar and the header */
.navbar.fixed-top + .page-header { margin-top: 0; }

/* If you still see a hairline, overlap by 1px to hide it */
@media (min-width: 0) {
  .page-header { margin-top: -15px !important; }
}

/* 60% width subtitle on phones; back to full width on md+ */
.subtitle-60 {
  width: 70%;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 768px) {
  .subtitle-60 { width: 100%; }
}

/* ================================
   Archive page table (desktop)
   ================================ */
.archive-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.archive-table thead th,
.archive-table tbody td {
  border: 1px solid #e6e9ef !important;
  padding: .5rem .6rem;
  vertical-align: middle;
  background: #fff;
  text-align: center;            /* center ALL cells by default */
}

.archive-table thead th {
  background: #f8f9fb;
  font-weight: 700;
  white-space: nowrap;
}

/* Explicitly center the first column header/value as well */
.archive-table thead th:first-child,
.archive-table thead td:first-child {
  text-align: center !important;
}
.archive-table tbody td:first-child {
  text-align: center !important;
}

@media (max-width: 575.98px) {
  .archive-table thead { display: none; }

  .archive-table table,
  .archive-table tbody,
  .archive-table tr,
  .archive-table td {
    display: block;
    width: 100%;
  }

  .archive-table tr {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    margin-bottom: .9rem;
    overflow: hidden;
  }

  .archive-table td {
    border: 0 !important;
    border-top: 1px solid #f1f3f7 !important;  /* row separators inside the card */
    padding: .7rem .9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: right;                          /* card value on the right */
  }
  .archive-table td:first-child { border-top: 0 !important; }

  /* Column label shown on the left inside each card row */
  .archive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #475467;
    flex: 0 0 56%;
    text-align: left;
    white-space: normal;
  }

  .archive-table td,
  .archive-table td::before {
    word-break: break-word;
  }
}

/* ================================
   Open Positions tables (desktop)
   ================================ */
.open-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.open-table thead th,
.open-table tbody td {
  border: 1px solid #e6e9ef !important;
  padding: .5rem .6rem;
  vertical-align: middle;
  background: #fff;
  text-align: center;            /* center all cells */
}

.open-table thead th {
  background: #f8f9fb;
  font-weight: 700;
  white-space: nowrap;
}

/* First column explicitly centered (header + body) */
.open-table thead th:first-child,
.open-table thead td:first-child,
.open-table tbody td:first-child {
  text-align: center !important;
}

@media (max-width: 575.98px) {
  .open-table thead { display: none; }

  .open-table table,
  .open-table tbody,
  .open-table tr,
  .open-table td {
    display: block;
    width: 100%;
  }

  .open-table tr {
    background: #fff;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
    margin-bottom: .9rem;
    overflow: hidden;
  }

  .open-table td {
    border: 0 !important;
    border-top: 1px solid #f1f3f7 !important;
    padding: .7rem .9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: right;            /* value on the right in cards */
  }
  .open-table td:first-child { border-top: 0 !important; }

  .open-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #475467;
    flex: 0 0 56%;
    text-align: left;
    white-space: normal;
  }

  .open-table td,
  .open-table td::before {
    word-break: break-word;
  }
}

/* Page width just for this page */
.regimes-page .container { max-width: 1100px; }

/* Center headers/cells only for this table */
.regimes-table thead th { text-align: center; vertical-align: middle; }
.regimes-table tbody td { text-align: center; vertical-align: middle; }

/* Count row cells */
.regimes-table .count-cell { font-weight: 700; font-size: 1.05rem; color: #333; }
/* Dot colors (desktop view) */
.regimes-table .r--3 { color: crimson; font-weight: 700; }   /* -3 = red */
.regimes-table .r--2 { color: orange;  font-weight: 700; }   /* -2 = orange */
.regimes-table .r--1 { color: #d4a514; font-weight: 700; }   /* -1 = yellow */
.regimes-table .r-1  { color: #7fbf4d; font-weight: 700; }   /*  1 = light green */
.regimes-table .r-2  { color: #2e7d32; font-weight: 700; }   /*  2 = dark green */
.regimes-table .r-3  { color: #4169e1; font-weight: 700; }   /*  3 = blue */
.regimes-table .dot  { font-size: 1.1rem; line-height: 1; }

/* Mobile-only regime badge */
.regimes-table .reg-badge {
  font-weight: 700;
  padding: .35rem .6rem;
  border-radius: .5rem;
  display: inline-block;
}
.regimes-table .reg--3 { background:#ffe5e8; color:crimson; } /* -3 */
.regimes-table .reg--2 { background:#ffe9cf; color:#ff8c00; } /* -2 */
.regimes-table .reg--1 { background:#fff2c7; color:#b58a0d; } /* -1 */
.regimes-table .reg-1  { background:#e9f7df; color:#3c8e2b; } /*  1 */
.regimes-table .reg-2  { background:#e1f2e6; color:#2e7d32; } /*  2 */
.regimes-table .reg-3  { background:#e3ebff; color:#4169e1; } /*  3 */


/* ===== Scoped to the corr page ===== */
    .corr-page .container { max-width: 1200px; }

    .corr-page .corr-wrap{
      overflow:auto;
      -webkit-overflow-scrolling:touch;
      border: 1px solid #e6e9ef;
      border-radius: 10px;
      background:#fff;
    }

    /* Base table */
    .corr-page #corrTable{
      width:100%;
      border-collapse:separate;
      border-spacing:0;
      font: 14px system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    }
    .corr-page #corrTable th,
    .corr-page #corrTable td{
      border:1px solid #e5e7eb;
      padding:8px 10px;
      background-clip:padding-box;
      white-space:nowrap;
    }

    /* Sticky header + first column */
    .corr-page #corrTable thead th{
      position:sticky; top:0;
      z-index:3; background:#fff;
    }
    .corr-page #corrTable tbody th[scope="row"]{
      position:sticky; left:0;
      z-index:2; background:#fff; text-align:left;
    }
    .corr-page #corrTable thead th:first-child{
      left:0; z-index:4; /* top-left corner */
    }
    /* draw left edge (WebKit/Safari paint fix) */
    .corr-page #corrTable thead th:first-child::before,
    .corr-page #corrTable tbody th[scope="row"]::before{
      content:""; position:absolute; left:0; top:0; bottom:0; width:1px; background:#e5e7eb;
    }

    /* Alignment helpers */
    .corr-page .dt-left  { text-align:left; }
    .corr-page .dt-right { text-align:right; font-variant-numeric:tabular-nums; }

    /* Kill Bootstrap/DataTables zebra striping so heat shows clean */
    .corr-page #corrTable.table-striped>tbody>tr:nth-of-type(odd),
    .corr-page #corrTable.table-striped>tbody>tr:nth-of-type(even),
    .corr-page #corrTable.dataTable.stripe tbody tr.odd,
    .corr-page #corrTable.dataTable.stripe tbody tr.even {
      background-color: transparent !important;
    }

    /* Hover highlight (row & column) */
    .corr-page #corrTable tbody tr:hover td,
    .corr-page #corrTable tbody tr:hover th[scope="row"]{
      box-shadow: inset 0 0 0 9999px rgba(13,110,253,.06);
    }
    .corr-page #corrTable td.is-col-hover { box-shadow: inset 0 0 0 9999px rgba(13,110,253,.06); }

    /* Legend */
    .corr-page .legend{
      display:flex; align-items:center; gap:10px; font-size:.9rem; color:#475467;
    }
    .corr-page .legend-bar{
      height:10px; width:220px; border-radius:6px;
      background: linear-gradient(90deg, rgb(220,52,52) 0%, #fff 50%, rgb(68,127,255) 100%);
      border:1px solid #e5e7eb;
    }

    /* Small screen type/padding */
    @media (max-width: 575.98px){
      .corr-page #corrTable th, .corr-page #corrTable td{ padding:7px 8px; }
      .corr-page #corrTable{ font-size:13px; }
    }

    /* Corr table filter layout */
#corrTable_wrapper .dataTables_filter {
  float: none !important;
  text-align: left !important;
  margin: 0 0 .5rem 0;
  padding: 0;
  width: 100%;
}

#corrTable_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  margin: 0;
}

#corrTable_wrapper .dataTables_filter input[type="search"] {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: none;
  margin: 0 !important;
}

/* Optional: nicer bottom row on phones */
@media (max-width: 575.98px){
  #corrTable_wrapper .dataTables_info { padding-top: .5rem; }
}

/* keep numeric columns right-aligned */
    table.dataTable td.dt-right, table.dataTable th.dt-right { text-align: right; }
    .results-note { font-size:.95rem; color:#6c757d; }

    /* hide buttons if you don’t want them shown */
    .dt-buttons { box-shadow: none !important; display:none !important; }

    /* ===== Full-width, left-aligned search (scoped to this table) ===== */
    #resultsTable_wrapper .dataTables_filter {
      float: none !important;
      text-align: left !important;
      margin: 0 0 .5rem 0;
      padding: 0;
      width: 100%;
    }
    #resultsTable_wrapper .dataTables_filter label {
      display: flex;
      align-items: center;
      gap: .5rem;
      width: 100%;
      margin: 0;
    }
    #resultsTable_wrapper .dataTables_filter input[type="search"] {
      flex: 1 1 auto;
      width: 100% !important;
      max-width: none;
      margin: 0 !important;
    }
    @media (max-width: 575.98px){
      #resultsTable_wrapper .dataTables_info { padding-top: .5rem; }
    }

        /* Scope page width tweak to this page only */
    .returns-container { max-width: 1400px; }

    #returnsChart { max-height: 560px; min-height: 420px; }
    @media (max-width: 575.98px){
      #returnsChart { min-height: 320px; max-height: 420px; }
      /* Mobile projections toggle strip */
      .proj-toggle .btn {
        font-size: .9rem;
        padding: .35rem .6rem;
        border-radius: .6rem;
      }
      .proj-toggle .btn.active {
        color: #fff;
      }
    }

    .strategy-page .container { max-width: 1100px; }

    /* ===== Correlation Heatmap (scoped) ===== */
    .strategy-page .corr-wrap{
      overflow:auto;
      -webkit-overflow-scrolling:touch;
      border-radius: 8px;
      box-shadow: inset 0 0 0 1px #1f2a44;
    }
    .strategy-page .corr-table{
      width:100%;
      border-collapse:separate;   /* critical */
      border-spacing:0;
      font:14px system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
      background:#fff;
    }
    .strategy-page .corr-table th,
    .strategy-page .corr-table td{
      border:1px solid #1f2a44;
      padding:8px 10px;
      text-align:center;
      white-space:nowrap;
      background-clip:padding-box;
    }

    /* Sticky header & first column */
    .strategy-page .corr-table thead th{
      position:sticky; top:0;
      background:#fff; color:#000; z-index:3;
    }
    .strategy-page .corr-table tbody th{
      position:sticky; left:0;
      background:#fff; color:#000; text-align:center; z-index:2;
    }
    /* Top-left corner cell: double sticky */
    .strategy-page .corr-table thead th:first-child{
      left:0; z-index:4;
    }
    /* Safari/WebKit left-edge fix */
    .strategy-page .corr-table thead th:first-child::before,
    .strategy-page .corr-table tbody th::before{
      content:"";
      position:absolute; left:0; top:0; bottom:0; width:1px;
      background:#1f2a44;
    }

    /* Heatmap scale */
    .strategy-page .corr-table .h-neg{ background:#fff; color:#000; }
    .strategy-page .corr-table .h-00{ background:#e9f0ff; }
    .strategy-page .corr-table .h-10{ background:#dbe8ff; }
    .strategy-page .corr-table .h-20{ background:#ccdefe; }
    .strategy-page .corr-table .h-30{ background:#bfd5fe; }
    .strategy-page .corr-table .h-40{ background:#b1ccfe; }
    .strategy-page .corr-table .h-50{ background:#a2c2fe; color:#0b1220; }
    .strategy-page .corr-table .h-60{ background:#8fb3fd; color:#0b1220; }
    .strategy-page .corr-table .h-70{ background:#7aa5fc; color:#0b1220; }
    .strategy-page .corr-table .h-80{ background:#5f94fb; color:#fff; }
    .strategy-page .corr-table .h-90{ background:#447ff8; color:#fff; }
    .strategy-page .corr-table .is-max{ font-weight:700; }

    /* Figures / images */
    .strategy-page .figure-img { background:#fff; }

    /* Small-screen polish */
    @media (max-width: 575.98px){
      .strategy-page .corr-table{ font-size:13px; }
      .strategy-page .corr-table th,
      .strategy-page .corr-table td{ padding:7px 8px; }
      .strategy-page .figure-caption{ font-size:.9rem; }
    }


    


