/* Firefox */
* {
  scrollbar-color: var(--site-color) transparent;
}

/* Chromium / Safari */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--site-color);
  border-radius: 999px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  opacity: .85;
}



html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.65;
  color: #222;
  background: #f7f7f4;
}

:root {
  --menu-top: 20px;
}

a {
  color: var(--site-color);
}

img {
  max-width: 100%;
  border-radius: 16px;
}

hr {
  border: 0;
  height: 1px;
  margin: 3rem 0;
  background: linear-gradient(to right, transparent, rgba(0,0,0,.12), transparent);
}

blockquote {
  border-left: 3px solid #999;
  padding-left: 1em;
  color: #444;
  margin-left: 0;
}

code {
  background: #eee;
  padding: 2px 5px;
  border-radius: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--site-color);
  padding: 10px;
  text-align: left;
}

/* Loader */

#PageLoader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.92);
  transition: opacity .25s ease, visibility .25s ease;
}

#PageLoader.Hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.PageSpinner {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 3px solid rgba(0,0,0,.08);
  border-top-color: var(--site-color);
  animation: HicSpin .7s linear infinite;
}

@keyframes HicSpin {
  to { transform: rotate(360deg); }
}

/* Layout */

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
}

main {
  background: #fff;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 40px;
  color: var(--site-color);

}

/* Desktop menu */


.site-nav {
  position: sticky;
  top: var(--menu-top);
  align-self: start;

  max-height: calc(100vh - (var(--menu-top) * 2));
  overflow-y: auto;
  overscroll-behavior: contain;

  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE */
}

.site-nav::-webkit-scrollbar {
  display: none;              /* Chrome/Safari */
}


.MenuButton {
  display: none;
}

.HicDialog {
  display: block;
  position: static;
  width: auto;
  max-height: none;
  border: 0;
  padding: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.HicDialog::backdrop,
.HicDialogHead {
  display: none;
}

.HicDesktopTitle {
  margin-bottom: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--site-color);
}

.nav-links {
  padding: 18px 20px;
}

.nav-links a {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.nav-links a:last-child {
  border-bottom: 0;
}

.nav-links a.Active {
  color: var(--site-color);
  font-weight: 700;
}

/* Media embeds */

.HicAudio {
  margin: 2rem 0;
  padding: 18px;
  background: #f7f7f4;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
}

.HicAudioTitle,
.HicVideoTitle {
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--site-color);
}

.HicAudio audio {
  width: 100%;
  display: block;
}

.HicVideo {
  margin: 2rem 0;
}

.HicVideoTitle {
  margin-left: 1.35em;
}

.HicVideo iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}


.HicSectionHidden {
  display: none !important;
}


/* Footer */

.site-footer {
  max-width: 1100px;
  margin: 40px auto 20px;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
  color: #777;
}

.site-footer a {
  color: inherit;
}

/* Mobile */

@media (max-width: 800px) {
  .wrap {
    display: block;
    padding: 0;
  }

  main {
    margin: 5px;
    margin-top: -10px;
    padding: 22px;
    border-radius: 0;
    box-shadow: 0 1px 8px rgba(0,0,0,.20);
  }

  .site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
  }

  .MenuButton {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 20px;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    background: #fff;
    box-shadow: none;
    font: inherit;
    font-weight: 700;
    text-align: left;
    color: var(--site-color);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
  }

  .HicDesktopTitle {
    display: none;
  }

  .HicDialog {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .HicDialog[open] {
    display: flex;
    flex-direction: column;
  }

  .HicDialog::backdrop {
    display: block;
    background: rgba(0,0,0,.25);
    backdrop-filter: blur(4px);
  }

  .HicDialogHead {
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
  }

  .HicDialogHead strong {
    color: var(--site-color);
  }

  .HicDialogHead button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #f1f1ee;
    font-size: 22px;
    cursor: pointer;
  }

  .HicDialog .nav-links {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 10px 20px 140px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links a {
    padding: 13px 0;
    font-size: 15px;
  }

  h1 {
    font-size: 2rem;
  }

  .site-footer {
    display: block;
    text-align: center;
    line-height: 1.8;
    padding: 0 20px 30px;
  }
}