/* Self-hosted fonts (OFL-1.1) — loaded from canonical branding/fonts-face.css */
@import url('fonts-face.css');

/* ---- Body & content ---- */
/* Match Doxygen's exact selector to win the cascade */
body, table, div, p, dl {
  font-family: 'EB Garamond', 'Palatino Linotype', serif;
  font-size: 20px;      /* EB Garamond has small x-height; 20px ≈ visual 14px of Roboto */
  line-height: 1.75;
}
body {
  color: #2A1850;
  background-color: #F4F0FA;
}

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-family: 'EB Garamond', 'Palatino Linotype', serif;
  font-style: italic;
  font-weight: 600;
  color: #2A1850;
}
h2.groupheader {
  border-bottom: 2px solid #E8B84B;
  color: #6B4FA0;
}

/* ---- Page title (Doxygen renders this as <div class="title">, not <h1>) ---- */
div.headertitle div.title {
  font-family: 'EB Garamond', 'Palatino Linotype', serif;
  font-style: italic;
  font-weight: 600;
  color: #2A1850;
}

/* ---- Title / header area ---- */
#titlearea {
  background-color: #6B4FA0;
  border-bottom: 3px solid #E8B84B;
  padding: 8px 12px;
}
#projectname {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 600;
  color: #F4F0FA;
}
#projectbrief {
  font-family: 'Jost', 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  color: rgba(244,240,250,0.82);
}
#projectlogo img { max-height: 55px; }

/* ---- Navigation tabs ---- */
div.tabs, div.tabs2, div.tabs3 {
  background-color: #6B4FA0;
  border-bottom: 3px solid #E8B84B;
}
.tablist a, .tablist a:visited {
  font-family: 'Jost', 'Segoe UI', sans-serif;
  color: rgba(244,240,250,0.82) !important;
  text-shadow: none;
}
.tablist a:hover {
  background-color: rgba(232,184,75,0.25);
  color: #F4F0FA !important;
}
.tablist li.current a {
  background-color: rgba(232,184,75,0.2);
  border-bottom: 2px solid #E8B84B;
  color: #F4F0FA !important;
}

/* ---- Links ---- */
a, a:visited { color: #6B4FA0; }
a:hover      { color: #C4664A; }

/* ---- Nav tree (left panel) ---- */
#nav-tree { background-color: #2A1850; }
#nav-tree .selected { background-color: #6B4FA0; }
#nav-tree a {
  color: rgba(244,240,250,0.82);
  font-family: 'Jost', 'Segoe UI', sans-serif;
  font-size: 0.875rem;
}
#nav-tree a:hover { color: #E8B84B; }

/* ---- Code / pre ---- */
/* Override all JetBrains Mono usages and size-match to EB Garamond body.
   span.tt is Doxygen's wrapper for <tt>...</tt> in docstrings; the base
   doxygen.css sets its font-family but no font-size, so without this
   rule it inherits the 20px serif body size. */
code, span.code, span.tt, div.fragment, pre.fragment, div.line,
.memname, td.paramtype, td.paramname {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 15px;  /* 15px Fira Code ≈ visual 20px EB Garamond */
}
/* Inline code inside prose: align baseline with the serif body text.
   Without this, Fira Code at 15px inherits the 35px line-height of the
   20px EB Garamond paragraph and ends up floating above the baseline. */
p code, li code, dd code, td code,
p span.tt, li span.tt, dd span.tt, td span.tt {
  line-height: 1;
  vertical-align: baseline;
}
div.fragment, pre.fragment {
  background-color: #E8E0F8;
  color: #5A3E8C;
  border-left: 3px solid #E8B84B;
}

/* ---- Member tables ---- */
tr.memitem td  { background-color: #EDE8F7; }
tr.memdesc td  { background-color: #F4F0FA; font-family: 'EB Garamond', serif; }
tr.separator td { border-bottom: 1px solid #D6CCF0; }

/* ---- Search ---- */
#MSearchBox  { border: 1px solid #D6CCF0; }
#MSearchField { font-family: 'Jost', 'Segoe UI', sans-serif; }

/* ---- Mobile responsiveness ---- */
@media screen and (max-width: 768px) {
  /* Hide side nav tree and let content fill the screen */
  #side-nav { display: none !important; }
  #doc-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Scale down body text */
  body, table, div, p, dl {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Tighten header */
  #titlearea { padding: 6px 8px; }
  #projectlogo img { max-height: 40px; }
  #projectname { font-size: 1.2rem; }
  #projectbrief { font-size: 0.75rem; }

  /* Move hamburger to the right to match the main site;
     hide the search box which would otherwise overlap it */
  .main-menu-btn {
    float: right;
    margin-right: 8px;
  }
  #MSearchBox { display: none !important; }

  /* Wrap navigation tabs */
  div.tabs, div.tabs2, div.tabs3 {
    padding: 0 4px;
  }
  .tablist li { display: inline-block; }
  .tablist a { font-size: 0.8rem; padding: 4px 6px; }

  /* Prevent code blocks from overflowing */
  div.fragment, pre.fragment {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
  }
  code, span.code, span.tt, div.fragment, pre.fragment, div.line,
  .memname, td.paramtype, td.paramname {
    font-size: 13px;
  }

  /* Member documentation tables */
  .memberdecls td, .fieldtable td, .fieldtable th {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }
  .memItemLeft, .memItemRight {
    display: block;
    width: auto !important;
    padding: 2px 8px;
  }
  .memItemLeft { padding-bottom: 0; }
  .memItemRight { padding-top: 0; }

  /* Content area padding */
  div.contents { padding: 8px; }
  .textblock { overflow-x: auto; }

  /* Graphs / images */
  div.center img, div.dynheader img, .dotgraph img {
    max-width: 100%;
    height: auto;
  }

  /* Search box */
  #MSearchBox { max-width: 150px; }

  /* Footer */
  #provsql-back-link { font-size: 0.8rem; padding: 0.5em; }
}

@media screen and (max-width: 480px) {
  body, table, div, p, dl {
    font-size: 14px;
    line-height: 1.5;
  }
  h1 { font-size: 1.3rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 1.05rem; }

  code, span.code, span.tt, div.fragment, pre.fragment, div.line,
  .memname, td.paramtype, td.paramname {
    font-size: 11px;
  }

  #projectname { font-size: 1rem; }
  #projectlogo img { max-height: 30px; }
}
