html {
  font-size: 11px;
}

@media screen and (min-width: 32rem) and (max-width: 48rem) {
  html {
    font-size: 14px;
  }
}

@media screen and (min-width: 48rem) {
  html {
    font-size: 15px;
  }
}

body {
  line-height: 1.85;
  max-width: 100%;
  overflow-x: hidden;
}

p,
.splendor-p {
  font-size: 1rem;
  margin-bottom: 1.3rem;
}

h1,h2,h3,h4 {
  margin: 1.414rem 0 .5rem;
  font-weight: inherit;
  line-height: 1.42;
}

h1 {
  margin-top: 0;
  font-size: 2.998rem;
}

h2 {
  font-size: 1.827rem;
}

h3 {
  font-size: 1.6rem;
  font-weight: bold;
}

h4 {
  font-size: 1.4rem;
  font-weight: bold;
}

h5 {
  font-size: 1.2rem;
  font-weight: bold;
}

h6 {
  font-size: .8rem;
  font-weight: bold;
}

small {
  font-size: .707em;
}

h1 {
  padding: 4rem 0 !important;
}

h1:before {
    background-color: #dc322f;
    content: '';
    display: block;
    height: 4px;
    width: 4em;
    margin-bottom: 5px;
}

h2:before {
    background-color: #268bd2;
    content: '';
    display: block;
    height: 2px;
    width: 3em;
    margin-bottom: 3px;
}

img,
canvas,
iframe,
video,
svg,
select,
textarea,
figcaption {
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

figcaption {
  font-size: small;
  text-align: center;
  margin-top: 0.5rem;
}

html {
  font-size: 18px;
  max-width: 100%;
}

body {
  color: #93a1a1;
  font-family: 'Merriweather', Georgia, serif;
  margin: 0;
  max-width: 100%;
  background-color: #002b36;
  color: #839496;
  cursor: default;
  padding: 1em;
}

p, .sbdl,
*:not(div):not(img):not(body):not(html):not(li):not(blockquote):not(p):not(span):not(code):not(figcaption):not(pre) {
  margin: 1rem auto 1rem;
  max-width: 60rem;
  padding: .25rem;
}

div {
  width: 100%;
}

div img {
  width: 100%;
}

blockquote p {
  font-size: 1.2rem;
  font-style: italic;
  margin: 0.8rem auto 0.8rem;
  max-width: 48rem;
}

li {
  margin-left: 2rem;
}

p {
  height: auto;
  line-height: 1.45;
}

code {
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

pre {
  margin: 0rem auto 0rem;
  max-width: 58rem;
  font-family: Menlo, Monaco, "Courier New", monospace;
  font-size: .8rem;
  padding: .7rem;
  page-break-inside: avoid;
  border-radius: 5px;
  border-style: dashed;
  border-width: 1px;
  color: #2aa198;
  white-space: pre-wrap;     /* Preserve formatting, but allow wrapping */
  word-wrap: break-word;     /* Force wrapping on long strings */
  overflow-wrap: break-word; /* Ensure compatibility */
  word-break: break-all;     /* Force breaks within words if necessary */
}

pre::-webkit-scrollbar {
    display: none;
}

a {
  color: #839496;
}

hr {
  border: 1px solid #dc322f;
  border-radius: 5px;
}

table {
  border-collapse: collapse;

}

td {
  border: dashed thin;
}

strong {
  font-weight: bold;
  text-decoration-line: underline;
}

.elementdefinition {
  margin: 1rem auto 1rem;
  max-width: 56rem;
  border-radius: 5px;
  border-style: dashed;
  border-width: 0px;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  background-color: #073642;
}

.invisibletable {
  margin: 0px;
  padding: 0px;
  border-spacing: 0px;
}

.invisibletable td {
  border: none;
  vertical-align: top;
  padding: 0px;
}

.sbdl_id {
  color: #dc322f;
}
.sbdl_type {
  color: #d33682 ;
}
.sbdl_properties {
  color: #2aa198;
}
.sbdl_string {
  font-style: italic;
}
.sbdl_keyword {
  font-weight: italic;
  color: #eee8d5;
}
.sbdl_keychar {
  font-weight: light;
  color: #eee8d5;
}
.sbdl_linenumber {
  font-weight: light;
  color: #586e75;
}
.sbdl_no_linenumber .sbdl_linenumber {
  display: none;
}

.typename, .propertyname {
  display: inline-block;
  padding: 2px 5px;
  border: 0px solid #ddd;
  border-radius: 4px;
  font-weight: bold;
}

.typename {
  background-color: #cb4b1680;
}

.propertyname {
  background-color: #268bd280;
}

/* --------------------------------- FONTS -----------------------------------*/

/* cyrillic-ext */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4l0qyriQwlOrhSvowK_l5-eR7lXff1jvzRPA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4l0qyriQwlOrhSvowK_l5-eR7lXff8jvzRPA.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4l0qyriQwlOrhSvowK_l5-eR7lXff3jvzRPA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4l0qyriQwlOrhSvowK_l5-eR7lXff2jvzRPA.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Merriweather';
  font-style: italic;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4l0qyriQwlOrhSvowK_l5-eR7lXff4jvw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l521wRZVcf6lvg.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l521wRZXMf6lvg.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l521wRZV8f6lvg.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l521wRZVsf6lvg.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Merriweather';
  font-style: normal;
  font-weight: 300;
  src: url(https://fonts.gstatic.com/s/merriweather/v30/u-4n0qyriQwlOrhSvowK_l521wRZWMf6.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------ NAVIGATION ---------------------------------*/

#TOC a {
  text-decoration: none;
  color: inherit;
}

#TOC a:hover {
  text-shadow: 0 0 4px #268bd2, 0 0 8px #268bd2;
  transition: all 0.3s ease;
}

#TOC ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

/* each entry reserves a left gutter for its toggle, so titles wrap under themselves
   and leaf entries line up with toggled ones; nested lists inherit the indent */
#TOC li {
  position: relative;
  margin-left: 0;
  padding: 0 0 0 1.2rem;
}

#TOC li > a {
  display: block;
  margin: 0;
  padding: 0.05rem 0.2rem;
}

/* collapsible entries (class set by the script; without it the full tree shows) */
#TOC.collapsible li > ul {
  display: none;
}

#TOC.collapsible li.open > ul {
  display: block;
}

#TOC .toc-toggle {
  display: none;
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 1.2rem;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: #586e75;
  font: inherit;
  cursor: pointer;
  vertical-align: middle;
}

#TOC.collapsible .toc-toggle {
  display: inline-block;
}

#TOC .toc-toggle::before {
  content: '\25B8'; /* small triangle */
  display: inline-block;
  transition: transform 0.15s ease;
}

#TOC li.open > .toc-toggle::before {
  transform: rotate(90deg);
}

#TOC a.active {
  color: #eee8d5;
  border-left: 2px solid #268bd2;
  padding-left: 0.4rem;
}

/* sidebar layout: the content column shifts right to leave room for it */
@media (min-width: 1100px) {
  body {
    padding-left: 18.5rem;
  }
  #TOC {
    position: fixed;
    top: 0;
    left: 0;
    width: 16rem;
    height: 100vh;
    margin: 0;
    padding: 1rem 0.5rem 1rem 0.75rem;
    box-sizing: border-box;
    overflow-y: auto;
    /* long-dashed divider: a solid border carrying a repeating gradient */
    border-right: 2px solid rgba(38, 139, 210, 0.3);
    border-image: repeating-linear-gradient(to bottom, rgba(38, 139, 210, 0.3) 0 16px, transparent 16px 24px) 1;
    font-size: 0.85rem;
    line-height: 1.5;
    z-index: 10;
  }
}

/* scrollbars in the page palette: the document's own and the sidebar's */
html, #TOC {
  scrollbar-width: thin;
  scrollbar-color: #586e75 #002b36;
}

html::-webkit-scrollbar, #TOC::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track, #TOC::-webkit-scrollbar-track {
  background: #002b36;
}

html::-webkit-scrollbar-thumb, #TOC::-webkit-scrollbar-thumb {
  background: #586e75;
  border-radius: 5px;
  border: 2px solid #002b36;
}

html::-webkit-scrollbar-thumb:hover, #TOC::-webkit-scrollbar-thumb:hover {
  background: #839496;
}

#TOC::-webkit-scrollbar {
  width: 6px;
}

/* heading anchors (added by the script) */
h2, h3, h4, h5 {
  scroll-margin-top: 1rem;
}

.hanchor {
  margin-left: 0.4rem;
  text-decoration: none;
  opacity: 0;
  font-weight: normal;
  transition: opacity 0.15s ease;
}

h2:hover .hanchor, h3:hover .hanchor, h4:hover .hanchor, h5:hover .hanchor, .hanchor:focus {
  opacity: 0.6;
}

/* back to top control (added by the script) */
.backtotop {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 2.4rem;
  height: 2.4rem;
  line-height: 2.4rem;
  text-align: center;
  border-radius: 50%;
  border: 1px solid #268bd2;
  background-color: #073642;
  color: #93a1a1;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.backtotop.visible {
  opacity: 0.8;
  pointer-events: auto;
}

/* ------------------------ COLLAPSIBLE REFERENCE BLOCKS --------------------*/

details > summary {
  cursor: pointer;
  padding: 0.3rem 0.25rem;
}

details > summary:hover {
  color: #eee8d5;
}

.summaryhint {
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-left: 0.5rem;
}

details[open] > summary .summaryhint {
  display: none;
}

details.sbdl_no_linenumber > summary {
  max-width: 58rem;
  margin: 1rem auto 0.5rem;
}

/* ------------------------------- TABLES ------------------------------------*/

table {
  font-size: 0.85rem;
  line-height: 1.5;
}

th {
  border: dashed thin;
  padding: 0.3rem 0.5rem;
  color: #eee8d5;
}

td {
  padding: 0.3rem 0.5rem;
  vertical-align: top;
}

td code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
