/*
Stylesheet for use with Docutils/rst2html.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.

Modified from Chad Skeeters' rst2html-style
https://bitbucket.org/cskeeters/rst2html-style/

Modified by Boyd Greenfield and narimiran

And modified by myself (Vindaar) for my Org exported HTML documents
*/

/* Set up Baskervville font */
@font-face{
  font-family: "Baskervville";
  src: url("/fonts/Baskervville-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;   /* adjust to the real range if different */
  font-style: normal;
  font-display: swap;
}
@font-face{
  font-family: "Baskervville";
  src: url("/fonts/Baskervville-Italic-VariableFont_wght.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
    /* Default: Monokai with Soft Text */
    --primary-background: #333333;
    --toc-background: #171122;
    --scrollbar-color: #666666;
    --secondary-background: #1e202a;
    --third-background: #1b1e2b;
    --info-background: #008000;
    --warning-background: #807000;
    --error-background: #030000;
    --border: #0e1014;
    --text: #d4d4d4;
    --anchor: #8be9fd;
    --anchor-focus: #8be9fd;
    --input-focus: #8be9fd;
    --strong: #bd93f9;
    --hint: #7A7C85;
    --keyword: #ff79c6;
    --identifier: #d4d4d4;
    --comment: #6272a4;
    --operator: #ff79c6;
    --punctuation: #d4d4d4;
    --other: #d4d4d4;
    --escapeSequence: #bd93f9;
    --number: #bd93f9;
    --literal: #f1fa8c;
    --raw-data: #8be9fd;

    /* Maybe left a bit bigger for table of contents. 35%, 33% is maybe a bit too narrow?*/
    margin-left: 30%;
    margin-right: 30%;
    margin-bottom: 2.5%;
    font-size: 15px;
}

/* Light theme overrides */
body.light-theme {
    --primary-background: #e1d9c2;
    --toc-background: #d0ccc0;
    --scrollbar-color: #999999;
    --secondary-background: #d5d1c9;
    --third-background: #cac6be;
    --info-background: #28a745;
    --warning-background: #ffc107;
    --error-background: #dc3545;
    --border: #b0b0b0;
    --text: #000000;
    --anchor: #0066cc;
    --anchor-focus: #004499;
    --input-focus: #0066cc;
    --strong: #6a0dad;
    --hint: #666666;
    --keyword: #d73a49;
    --identifier: #24292e;
    --comment: #6a737d;
    --operator: #d73a49;
    --punctuation: #24292e;
    --other: #24292e;
    --escapeSequence: #6f42c1;
    --number: #6f42c1;
    --literal: #22863a;
    --raw-data: #005cc5;
}

/* Monokai with Soft Text */
body.theme-monokai-soft-text {
    --primary-background: #333333;
    --toc-background: #252525;
    --scrollbar-color: #666666;
    --secondary-background: #1e202a;
    --third-background: #1b1e2b;
    --info-background: #008000;
    --warning-background: #807000;
    --error-background: #030000;
    --border: #0e1014;
    --text: #d4d4d4;
    --anchor: #8be9fd;
    --anchor-focus: #8be9fd;
    --input-focus: #8be9fd;
    --strong: #bd93f9;
    --hint: #7A7C85;
    --keyword: #ff79c6;
    --identifier: #d4d4d4;
    --comment: #6272a4;
    --operator: #ff79c6;
    --punctuation: #d4d4d4;
    --other: #d4d4d4;
    --escapeSequence: #bd93f9;
    --number: #bd93f9;
    --literal: #f1fa8c;
    --raw-data: #8be9fd;
}

/* Monokai with white text */
body.theme-monokai-white-text {
    --primary-background: #333333;
    --toc-background: #252525;
    --scrollbar-color: #666666;
    --secondary-background: #1e202a;
    --third-background: #1b1e2b;
    --info-background: #008000;
    --warning-background: #807000;
    --error-background: #030000;
    --border: #0e1014;
    --text: #fff;
    --anchor: #8be9fd;
    --anchor-focus: #8be9fd;
    --input-focus: #8be9fd;
    --strong: #bd93f9;
    --hint: #7A7C85;
    --keyword: #ff79c6;
    --identifier: #f8f8f2;
    --comment: #6272a4;
    --operator: #ff79c6;
    --punctuation: #f8f8f2;
    --other: #f8f8f2;
    --escapeSequence: #bd93f9;
    --number: #bd93f9;
    --literal: #f1fa8c;
    --raw-data: #8be9fd;
}

/* Dracula Theme */
body.theme-dracula {
    --primary-background: #282a36;
    --toc-background: #1e1f29;
    --scrollbar-color: #6272a4;
    --secondary-background: #343746;
    --third-background: #44475a;
    --info-background: #50fa7b;
    --warning-background: #f1fa8c;
    --error-background: #ff5555;
    --border: #44475a;
    --text: #f8f8f2;
    --anchor: #8be9fd;
    --anchor-focus: #80d4ff;
    --input-focus: #8be9fd;
    --strong: #ff79c6;
    --hint: #6272a4;
    --keyword: #ff79c6;
    --identifier: #f8f8f2;
    --comment: #6272a4;
    --operator: #ff79c6;
    --punctuation: #f8f8f2;
    --other: #f8f8f2;
    --escapeSequence: #bd93f9;
    --number: #bd93f9;
    --literal: #f1fa8c;
    --raw-data: #8be9fd;
}

/* Gruvbox Dark Theme */
body.theme-gruvbox {
    --primary-background: #282828;
    --toc-background: #1d2021;
    --scrollbar-color: #665c54;
    --secondary-background: #3c3836;
    --third-background: #504945;
    --info-background: #b8bb26;
    --warning-background: #fabd2f;
    --error-background: #fb4934;
    --border: #504945;
    --text: #ebdbb2;
    --anchor: #83a598;
    --anchor-focus: #8ec07c;
    --input-focus: #83a598;
    --strong: #d3869b;
    --hint: #928374;
    --keyword: #fb4934;
    --identifier: #ebdbb2;
    --comment: #928374;
    --operator: #fe8019;
    --punctuation: #ebdbb2;
    --other: #ebdbb2;
    --escapeSequence: #d3869b;
    --number: #d3869b;
    --literal: #b8bb26;
    --raw-data: #83a598;
}

/* Tokyo Night Theme */
body.theme-tokyo-night {
    --primary-background: #1a1b26;
    --toc-background: #16161e;
    --scrollbar-color: #565f89;
    --secondary-background: #24283b;
    --third-background: #414868;
    --info-background: #9ece6a;
    --warning-background: #e0af68;
    --error-background: #f7768e;
    --border: #414868;
    --text: #c0caf5;
    --anchor: #7aa2f7;
    --anchor-focus: #2ac3de;
    --input-focus: #7aa2f7;
    --strong: #bb9af7;
    --hint: #565f89;
    --keyword: #bb9af7;
    --identifier: #c0caf5;
    --comment: #565f89;
    --operator: #89ddff;
    --punctuation: #c0caf5;
    --other: #c0caf5;
    --escapeSequence: #ff9e64;
    --number: #ff9e64;
    --literal: #9ece6a;
    --raw-data: #7aa2f7;
}

/* Andromeda Theme */
body.theme-andromeda {
    --primary-background: #23262e;
    --toc-background: #1b1e24;
    --scrollbar-color: #5a5c63;
    --secondary-background: #2b2e36;
    --third-background: #373b43;
    --info-background: #96e072;
    --warning-background: #ffe66d;
    --error-background: #ee5d43;
    --border: #373b43;
    --text: #d5ced9;
    --anchor: #f39c12;
    --anchor-focus: #f4ac4f;
    --input-focus: #f39c12;
    --strong: #c74ded;
    --hint: #5a5c63;
    --keyword: #ee5d43;
    --identifier: #d5ced9;
    --comment: #7c7c98;
    --operator: #f39c12;
    --punctuation: #d5ced9;
    --other: #d5ced9;
    --escapeSequence: #c74ded;
    --number: #f39c12;
    --literal: #ffe66d;
    --raw-data: #96e072;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
    border-radius: 20px;
}

/*::-webkit-scrollbar-track {
    background-color: #fca5a5;
}*/


::-webkit-scrollbar-corner {
    background-color: var(--primary-background);
}


.theme-switch-wrapper {
  display: flex;
  align-items: center;
}

.theme-switch-wrapper em {
  margin-left: 10px;
  font-size: 1rem;
}

.theme-switch {
  display: inline-block;
  height: 22px;
  position: relative;
  width: 50px;
}

.theme-switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: .4s;
}

.slider:before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 13px;
  left: 4px;
  position: absolute;
  transition: .4s;
  width: 13px;
}

input:checked + .slider {
  background-color: #66bb6a;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 17px;
}

.slider.round:before {
  border-radius: 50%;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%; }

body {
  font-family: "Baskervville", serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  font-size: 1.3em;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--primary-background); }

/* Skeleton grid */
.container {
  position: relative;
  width: 100%;
  max-width: 1050px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box; }

.column,
.columns {
  width: 100%;
  float: left;
  box-sizing: border-box;
  margin-left: 1%;
}

.column:first-child,
.columns:first-child {
  margin-left: 0; }

.three.columns {
  width: 22%;
}

.nine.columns {
  width: 77.0%; }

.twelve.columns {
  width: 100%;
  margin-left: 0; }

/* Mobile hamburger menu button */
.toc-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background-color: var(--secondary-background);
  border: 2px solid var(--anchor);
  border-radius: 5px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--anchor);
  font-size: 1.2em;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.toc-toggle:hover {
  background-color: var(--third-background);
  border-color: var(--anchor-focus);
}

/* Theme selector dropdown */
.theme-selector-wrapper {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1001;
}

.theme-selector {
  background-color: var(--secondary-background);
  border: 2px solid var(--anchor);
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9em;
  font-family: "Baskervville", serif;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  min-width: 180px;
}

.theme-selector:hover {
  background-color: var(--third-background);
  border-color: var(--anchor-focus);
}

.theme-selector:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow: 0 0 5px var(--input-focus);
}

.theme-selector option {
  background-color: var(--secondary-background);
  color: var(--text);
}

/* Light theme adjustments for specific elements */
body.light-theme blockquote {
  border-left-color: #999;
}

body.light-theme .extended {
  color: #28a745;
}

body.light-theme [class^="section-number-"] {
  color: #d73a49;
}

body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #d97706;
}

body.light-theme .Theory,
body.light-theme .CAST,
body.light-theme .Detector,
body.light-theme .Reconstruction,
body.light-theme .Calibration,
body.light-theme .Analysis,
body.light-theme .Limit,
body.light-theme .Appendix,
body.light-theme .Ack {
  color: #ca8a04;
}

@media screen and (max-width: 860px) {
  /* Prevent horizontal scrolling on mobile */
  html {
    overflow-x: hidden;
    width: 100%;
  }

  body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* Show hamburger menu on mobile */
  .toc-toggle {
    display: block;
  }

  /* Adjust root margins for mobile */
  :root {
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    font-size: 14px;
  }

  /* Add padding to content instead of margins on root */
  #content, .content {
    padding-left: 5%;
    padding-right: 5%;
    padding-top: 60px; /* Space for hamburger button */
    box-sizing: border-box;
    max-width: 100%;
  }

  /* TOC as overlay on mobile */
  #table-of-contents {
    position: fixed !important;
    left: -100% !important;
    width: 80% !important;
    max-width: 300px !important;
    height: 100% !important;
    top: 0 !important;
    z-index: 1000 !important;
    transition: left 0.3s ease-in-out !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5) !important;
    padding: 15px !important;
  }

  /* Show TOC when active */
  #table-of-contents.active {
    left: 0 !important;
  }

  /* Better TOC spacing on mobile */
  #table-of-contents h2 {
    margin-top: 0.5em;
    font-size: 1.2em;
  }

  #table-of-contents ul {
    font-size: 0.9em;
  }

  #table-of-contents a {
    display: block;
    padding: 0.3em 0;
  }

  /* Overlay backdrop */
  .toc-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .toc-backdrop.active {
    display: block;
  }

  .three.columns {
    display: none;
  }
  .nine.columns {
    width: 98.0%;
  }
  body {
    font-size: 1em;
    line-height: 1.35;
  }

  /* Better mobile typography */
  h1 {
    font-size: 1.5em;
    margin-top: 1.5em;
  }

  h1.title {
    font-size: 2em;
    margin-top: 0.5em;
    padding-left: 0;
    box-sizing: border-box;
  }

  header {
    padding-top: 50px; /* Space for hamburger menu */
  }

  h2 {
    font-size: 1.2em;
  }

  h3 {
    font-size: 1.1em;
  }

  /* Make tables scrollable on mobile */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  /* Adjust blockquotes for mobile */
  blockquote {
    font-size: 0.95em;
    padding-left: 0.3em;
    border-left: 3px solid #bbc;
  }

  /* Adjust pre/code blocks for mobile */
  pre {
    font-size: 0.8em;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Make images more mobile-friendly */
  img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
  }

  /* Ensure all potentially wide elements stay within bounds */
  * {
    max-width: 100%;
  }

  /* But allow specific elements to use full width */
  html, body, #content, .content {
    max-width: none;
  }

  /* Adjust figure margins for mobile */
  .figure-wrapper {
    margin: 1%;
  }

  figure.subfigure {
    width: 100% !important;
    display: block;
    margin-bottom: 1em;
  }

  figure.subfigure img {
    width: 100% !important;
  }
}

/* Tablet view (between mobile and desktop) */
@media screen and (min-width: 861px) and (max-width: 1200px) {
  :root {
    margin-left: 20%;
    margin-right: 20%;
  }

  #table-of-contents {
    width: 15%;
  }
}

cite {
  font-style: italic !important; }


/* Nim search input */
div#searchInputDiv {
  margin-bottom: 1em;
}
input#searchInput {
  width: 80%;
}

/*
 * Some custom formatting for input forms.
 * This also fixes input form colors on Firefox with a dark system theme on Linux.
 */
input {
  -moz-appearance: none;
  background-color: var(--secondary-background);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  font-size: 0.9em;
  padding: 6px;
}

input:focus {
  border: 1px solid var(--input-focus);
  box-shadow: 0 0 3px var(--input-focus);
}

select {
  -moz-appearance: none;
  background-color: var(--secondary-background);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  font-size: 0.9em;
  padding: 6px;
}

select:focus {
  border: 1px solid var(--input-focus);
  box-shadow: 0 0 3px var(--input-focus);
}

/* Docgen styles */
/* Links */
a {
  color: var(--anchor);
  text-decoration: none;
}

a span.Identifier {
  text-decoration: underline;
  text-decoration-color: #aab;
}

a.reference-toplevel {
  font-weight: bold;
}

a.toc-backref {
  text-decoration: none;
  color: var(--text); }

a.link-seesrc {
  color: #607c9f;
  font-size: 0.9em;
  font-style: italic; }

a:hover,
a:focus {
  color: var(--anchor-focus);
  text-decoration: underline; }

a:hover span.Identifier {
  color: var(--anchor);
}


sub,
sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline; }

sup {
  top: -0.5em; }

sub {
  bottom: -0.25em; }

img {
    /* The first three are required to make sure single images are centered */
    display: block;
    margin-left: auto;
    margin-right: auto;

    width: auto;
    height: auto;
    max-width: 100%;
    vertical-align: middle;
    border: 0;
    -ms-interpolation-mode: bicubic;
}



@media print {
  * {
    color: black !important;
    text-shadow: none !important;
    background: transparent !important;
    box-shadow: none !important; }

  a,
  a:visited {
    text-decoration: underline; }

  a[href]:after {
    content: " (" attr(href) ")"; }

  abbr[title]:after {
    content: " (" attr(title) ")"; }

  .ir a:after,
  a[href^="javascript:"]:after,
  a[href^="#"]:after {
    content: ""; }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid; }

  thead {
    display: table-header-group; }

  tr,
  img {
    page-break-inside: avoid; }

  img {
    max-width: 100% !important; }

  @page {
    margin: 0.5cm; }

  h1 {
    page-break-before: always; }

  h1.title {
    page-break-before: avoid; }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3; }

  h2,
  h3 {
    page-break-after: avoid; }
}


p {
  margin-top: 1em; /* Can be used to adjust margin between paragraphs */
  margin-bottom: 1em;
  text-align: justify; /* Justify the text! */
}

small {
  font-size: 85%; }

strong {
  font-weight: 600;
  font-size: 0.95em;
  color: var(--strong);
}

em {
  font-style: italic; }

h1 {
  font-size: 1.8em;
  font-weight: 400;
  padding-bottom: .25em;
  border-bottom: 6px solid var(--third-background);
  margin-top: 2.5em;
  margin-bottom: 1em;
  line-height: 1.2em; }

h1.title {
  padding-bottom: 1em;
  border-bottom: 0px;
  font-size: 2.5em;
  text-align: center;
  font-weight: 900;
  margin-top: 0.75em;
  margin-bottom: 0em;
}

h2 {
  font-size: 1.3em;
  margin-top: 2em; }

h2.subtitle {
  text-align: center; }

h3 {
  font-size: 1.125em;
  font-style: italic;
  margin-top: 1.5em; }

h4 {
  font-size: 1.125em;
  margin-top: 1em; }

h5 {
  font-size: 1.125em;
  margin-top: 0.75em; }

h6 {
  font-size: 1.1em; }


ul,
ol {
  padding: 0;
  margin-top: 0.5em;
  margin-left: 0.75em; }

ul ul,
ul ol,
ol ol,
ol ul {
  margin-bottom: 0;
  margin-left: 1.25em; }

ul.simple > li {
    list-style-type: circle;
}

ul.simple-boot li {
    list-style-type: none;
    margin-left: 0em;
    margin-bottom: 0.5em;
}

ol.simple > li, ul.simple > li {
  margin-bottom: 0.2em;
  margin-left: 0.4em }

ul.simple.simple-toc > li {
    margin-top: 1em;
}

ul.simple-toc {
  list-style: none;
  font-size: 0.9em;
  margin-left: -0.3em;
  margin-top: 1em; }

ul.simple-toc > li {
    list-style-type: none;
}

ul.simple-toc-section {
  list-style-type: circle;
  margin-left: 0.8em;
  color: #6c9aae; }

ul.nested-toc-section {
  list-style-type: circle;
  margin-left: -0.75em;
  color: var(--text);
}

ul.nested-toc-section > li {
  margin-left: 1.25em;
}


ol.arabic {
  list-style: decimal; }

ol.loweralpha {
  list-style: lower-alpha; }

ol.upperalpha {
  list-style: upper-alpha; }

ol.lowerroman {
  list-style: lower-roman; }

ol.upperroman {
  list-style: upper-roman; }

ul.auto-toc {
  list-style-type: none; }


dl {
  margin-bottom: 1.5em; }

dt {
  margin-bottom: -0.5em;
  margin-left: 0.0em; }

dd {
  margin-left: 2.0em;
  margin-bottom: 3.0em;
  margin-top: 0.5em; }


hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid #aaa; }

blockquote {
  font-size: 0.9em;
  font-style: italic;
  padding-left: 0.5em;
  margin-left: 0;
  border-left: 5px solid #bbc;
}

.pre {
  font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
  font-weight: 500;
  font-size: 0.85em;
  color: var(--text);
  background-color: var(--third-background);
  padding-left: 3px;
  padding-right: 3px;
  border-radius: 4px;
}

pre {
  font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
  color: var(--text);
  font-weight: 500;
  display: inline-block;
  box-sizing: border-box;
  min-width: 100%;
  padding: 0.5em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-size: 0.85em;
  background-color: var(--secondary-background);
  border: 1px solid var(--border);
  -webkit-border-radius: 6px;
  -moz-border-radius: 6px;
  white-space: pre-wrap;
  border-radius: 6px; }

.pre-scrollable {
  max-height: 340px;
}


/* Nim line-numbered tables */
.line-nums-table {
  width: 100%;
  table-layout: fixed; }

table.line-nums-table {
  border-radius: 4px;
  border: 1px solid #cccccc;
  background-color: ghostwhite;
  border-collapse: separate;
  margin-top: 15px;
  margin-bottom: 25px; }

.line-nums-table tbody {
  border: none; }

.line-nums-table td pre {
  border: none;
  background-color: transparent; }

.line-nums-table td.blob-line-nums {
  width: 28px; }

.line-nums-table td.blob-line-nums pre {
  color: #b0b0b0;
  -webkit-filter: opacity(75%);
  filter: opacity(75%);
  text-align: right;
  border-color: transparent;
  background-color: transparent;
  padding-left: 0px;
  margin-left: 0px;
  padding-right: 0px;
  margin-right: 0px; }


table {
  max-width: 100%;
  background-color: transparent;
  margin-top: 0.5em;
  margin-bottom: 1.5em;
  border-collapse: collapse;
  border-color: var(--third-background);
  border-spacing: 0;
  font-size: 0.9em;
}

table th, table td {
  padding: 0px 0.5em 0px;
  border-color: var(--third-background);
}

table th {
  background-color: var(--third-background);
  border-color: var(--third-background);
  font-weight: bold; }

table th.docinfo-name {
    background-color: transparent;
    text-align: right;
}

table tr:hover {
  background-color: var(--third-background); }


/* rst2html default used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0; }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 !important; }

.admonition {
    padding: 0.3em;
    background-color: var(--secondary-background);
    border-left: 0.4em solid #7f7f84;
    margin-bottom: 0.5em;
    -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
       -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
            box-shadow: 0 5px 8px -6px rgba(0,0,0,.2);
}
.admonition-info {
    border-color: var(--info-background);
}
.admonition-info-text {
    color: var(--info-background);
}
.admonition-warning {
    border-color: var(--warning-background);
}
.admonition-warning-text {
    color: var(--warning-background);
}
.admonition-error {
    border-color: var(--error-background);
}
.admonition-error-text {
    color: var(--error-background);
}

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 !important; }

.last, .with-subtitle {
  margin-bottom: 0 !important; }

.hidden {
  display: none; }

blockquote.epigraph {
  margin: 2em 5em; }

dl.docutils dd {
  margin-bottom: 0.5em; }

object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
  overflow: hidden; }


div.figure {
  margin-left: 2em;
  margin-right: 2em; }


.figure-number {
    display: none;
}



/* NOTE: Use the below if you use an Org exported HTML directly, without splitting it */
/* with the `split_org_html.nim` tool! */

/* body { */
/*     /\* Reset only the main figure counter *\/ */
/*     counter-reset: fig-counter subfig-counter; */
/* } */

/* figure { */
/*     /\* Increment the global figure counter for every top-level figure *\/ */
/*     counter-increment: fig-counter; */
/* } */


.figure-wrapper {
    margin: 3%;
}

/* figure:not(.subfigure) { */
/*     /\* Reset the subfigure counter for every new top-level figure *\/ */
/*     counter-reset: subfig-counter; */
/* } */

/* Use a class to identify subfigures, say 'subfig' */
/* Use the data-width attribute for the subfigure width */
figure.subfigure {
    /* Increment the subfigure counter for every subfigure */
    /* counter-increment: subfig-counter; */
    display: inline-block;
    vertical-align: top;
    box-sizing: border-box;
    padding: 0 0.0%;
    margin: 0;
/* vertical alignment could be nice, but is broken if one caption is longer! */
/*    vertical-align: bottom; */
}

figure.subfigure[data-width] {
    width: attr(data-width);  /* Fetch width from data-width attribute */
}

/* Use the data-width attribute for the image width within subfigures */
figure.subfigure img[data-width] {
    width: attr(data-width);      /* Fetch width from data-width attribute */
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

figure.subfigure figcaption {
    text-align: center; /* Centers the text within the figcaption */
    display: block;     /* Ensures figcaption behaves like a block */
    margin: 0 auto;     /* Centers the block itself, if it's not already full width */
}


/* figcaption::before { */
/*     /\* Display the global counter value before each main figcaption *\/ */
/*     content: "Figure " counter(fig-counter) ": "; */
/* } */

/* /\* Use the subfig class to display the subfigure counter *\/ */
/* figure.subfigure figcaption::before { */
/*     /\* Display the combined global and subfigure counter values *\/ */
/*     content: counter(fig-counter) " - " counter(subfig-counter, lower-alpha) ": "; */
/* } */

div.footer, div.header {
  clear: both;
  text-align: center;
  color: #666;
  font-size: smaller; }

div.footer {
    padding-top: 5em;
}

div.line-block {
  display: block;
  margin-top: 1em;
  margin-bottom: 1em; }

div.line-block div.line-block {
  margin-top: 0;
  margin-bottom: 0;
  margin-left: 1.5em; }

div.topic {
  margin: 2em; }

div.search_results {
  background-color: var(--third-background);
  margin: 3em;
  padding: 1em;
  border: 1px solid #4d4d4d;
}

div#global-links ul {
  margin-left: 0;
  list-style-type: none;
}

div#global-links > simple-boot {
    margin-left: 3em;
}

hr.docutils {
  width: 75%; }

img.align-left, .figure.align-left, object.align-left {
  clear: left;
  float: left;
  margin-right: 1em; }

img.align-right, .figure.align-right, object.align-right {
  clear: right;
  float: right;
  margin-left: 1em; }

img.align-center, .figure.align-center, object.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto; }

.align-left {
  text-align: left; }

.align-center {
  clear: both;
  text-align: center; }

.align-right {
  text-align: right; }

/* reset inner alignment in figures */
div.align-right {
  text-align: inherit; }

p.attribution {
  text-align: right;
  margin-left: 50%; }

p.caption {
  font-style: italic; }

p.credits {
  font-style: italic;
  font-size: smaller; }

p.label {
  white-space: nowrap; }

p.rubric {
  font-weight: bold;
  font-size: larger;
  color: maroon;
  text-align: center; }

p.topic-title {
  font-weight: bold; }

pre.address {
  margin-bottom: 0;
  margin-top: 0;
  font: inherit; }

pre.literal-block, pre.doctest-block, pre.math, pre.code {
  margin-left: 2em;
  margin-right: 2em; }

pre.code .ln {
  color: grey; }

/* line numbers */
pre.code, code {
    background-color: #222222;
    color: #8a2be2;
    font-family: monospace;
}

#table-of-contents {
    position: fixed;
    left: 0%;
    width: 17.5%;
    height: 100%;
    top: 0%;
    overflow: auto;
    overflow-wrap: break-word;
    font-size: 14px;
    font-family: "Baskervville", serif;
    background-color: var(--toc-background);
}


pre.code .comment, code .comment {
  color: #5c6576; }

pre.code .keyword, code .keyword {
  color: #3B0D06;
  font-weight: bold; }

pre.code .literal.string, code .literal.string {
  color: #0c5404; }

pre.code .name.builtin, code .name.builtin {
  color: #352b84; }

pre.code .deleted, code .deleted {
  background-color: #DEB0A1; }

pre.code .inserted, code .inserted {
  background-color: #A3D289; }

span.classifier {
  font-style: oblique; }

span.classifier-delimiter {
  font-weight: bold; }

span.option {
  white-space: nowrap; }

span.problematic {
  color: #b30000; }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80%; }

span.DecNumber {
  color: var(--number); }

span.BinNumber {
  color: var(--number); }

span.HexNumber {
  color: var(--number); }

span.OctNumber {
  color: var(--number); }

span.FloatNumber {
  color: var(--number); }

span.Identifier {
  color: var(--identifier); }

span.Keyword {
  font-weight: 600;
  color: var(--keyword); }

span.StringLit {
  color: var(--literal); }

span.LongStringLit {
  color: var(--literal); }

span.CharLit {
  color: var(--literal); }

span.EscapeSequence {
  color: var(--escapeSequence); }

span.Operator {
  color: var(--operator); }

span.Punctuation {
  color: var(--punctuation); }

span.Comment, span.LongComment {
  font-style: italic;
  font-weight: 400;
  color: var(--comment); }

span.RegularExpression {
  color: darkviolet; }

span.TagStart {
  color: darkviolet; }

span.TagEnd {
  color: darkviolet; }

span.Key {
  color: #252dbe; }

span.Value {
  color: #252dbe; }

span.RawData {
  color: var(--raw-data); }

span.Assembler {
  color: #252dbe; }

span.Preprocessor {
  color: #252dbe; }

span.Directive {
  color: #252dbe; }

span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference,
span.Other {
  color: var(--other); }

/* Pop type, const, proc, and iterator defs in nim def blocks */
dt pre > span.Identifier, dt pre > span.Operator {
  color: var(--identifier);
  font-weight: 700; }

dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier {
  color: var(--identifier);
  font-weight: inherit; }

span.pragmadots {
  /* Position: relative frees us up to make the dots
  look really nice without fucking up the layout and
  causing bulging in the parent container */
  position: relative;
  /* 1px down looks slightly nicer */
  top: 1px;
  padding: 2px;
  background-color: var(--third-background);
  border-radius: 4px;
  margin: 0 2px;
  cursor: pointer;
  font-size: 0.8em;
}

span.pragmadots:hover {
  background-color: var(--hint);
}
span.pragmawrap {
  display: none;
}

span.attachedType {
  display: none;
  visibility: hidden;
}



/* Add behavior for elements that are folded */
.folded-content {
  display: none;
}
.foldable-header {
  cursor: pointer;
}

/* Add hint box */
.hint-message {
  position: fixed;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-family: "Baskervville", serif;
  font-size: 14px;
  z-index: 1000; /* Ensures the message is on top */
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); /* Optional: Adds a shadow for better visibility */
}

.extended {
    color: #A6E22E; /*#66D9EF;*/ /* rgb(253, 151, 31);*/
}

[class^="section-number-"] {
    color: #F92672;
}

h2, h3, h4, h5, h6 {
    color: #FD971F; /* #A6E22E;*/
}

.Theory, .CAST, .Detector, .Reconstruction, .Calibration, .Analysis, .Limit, .Appendix, .Ack {
    color: #E6DB74; /*#FD5FF0;*/
}
