@font-face {
  font-family: "Libre Franklin";
  src: url("libre_franklin/LibreFranklin-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Libre Franklin";
  src: url("libre_franklin/LibreFranklin-Italic-VariableFont_wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Kingsbridge";
  src: url("kingsbridge/Kingsbridge Rg.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Kingsbridge";
  src: url("kingsbridge/Kingsbridge Sb.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Kingsbridge";
  src: url("kingsbridge/Kingsbridge Bd.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Kingsbridge";
  src: url("kingsbridge/Kingsbridge Rg It.otf") format("opentype");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  --overlay-green-rgb: 55, 112, 40;
  --overlay-green: rgba(var(--overlay-green-rgb), 0.62);
  --solid-green: rgb(var(--overlay-green-rgb));
  --text: #ffffff;
  --muted: #596353;
  --link: #2f6b24;
  --link-hover: #173b11;
  --panel-bg: rgba(255, 255, 255, 0.3);
  --panel-bg-strong: rgba(255, 255, 255, 0.3);
  --panel-bg-soft: rgba(255, 255, 255, 0.3);
  --faint-white: rgba(255, 255, 255, 0.8);
  --faint-white-strong: rgba(255, 255, 255, 0.8);
  --shadow: 0 18px 50px rgba(14, 35, 12, 0.24);
  --content-width: 940px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.65;
  background: var(--solid-green);
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("bg.jpg") center center / cover no-repeat;
}

body::after {
  z-index: -1;
  background: var(--overlay-green);
}

.site-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  margin: 0 0 34px;
  padding-top: 110px;
}

.site-box,
#language-container,
#menu-container,
#page-content,
#search-container,
#site-footer {
  border: 0;
  box-shadow: none;
  margin-bottom: 18px;
  padding: 0;
}

#page-content,
#search-container {
  background: rgb(0 53 12 / 84%);
  backdrop-filter: blur(2px);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 30px);
}

#language-container {
  order: -10;
}

#language-container,
#page-content,
#search-container {
  width: calc(100% - 36px);
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

#menu-container {
  order: -30;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
  width: auto;
  margin-bottom: 10px;
  margin-left: 0;
  margin-right: 0;
  padding: 10px 0;
  background: var(--panel-bg);
  backdrop-filter: blur(5px);
}

/* typography */
a {
  color: var(--link);
  font-weight: 700;
  text-decoration-line: underline;
  text-decoration-color: rgba(var(--overlay-green-rgb), 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: background-color 160ms ease, color 160ms ease, text-decoration-color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  background: rgba(255, 255, 255, 0.42);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.site-title,
.page-title,
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6,
.inline-index-title,
.search-result-title a {
  color: var(--text);
  font-family: "Kingsbridge", Georgia, serif;
  letter-spacing: 0;
}

.site-title {
  margin: 0;
  text-align: center;
  font-size: clamp(2.15rem, 6vw, 3.7rem);
  font-weight: 700;
  line-height: 0.98;
}

.page-title {
  margin: 0.8rem 0 0;
  color: var(--muted);
  text-align: center;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  font-weight: 600;
}

.markdown-body {
  color: var(--text);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-size: 1.04rem;
  font-weight: 400;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin: 1.55em 0 0.55em;
  line-height: 1.08;
}

.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child,
.markdown-body h5:first-child,
.markdown-body h6:first-child {
  margin-top: 0;
}

.markdown-body h1 {
  font-size: clamp(2.15rem, 6vw, 4rem);
  font-weight: 700;
  padding-bottom: 0.18em;
  border-bottom: 6px solid var(--solid-green);
}

.markdown-body h2 {
  font-size: clamp(1.55rem, 3.6vw, 2.5rem);
  font-weight: 700;
}

.markdown-body h3 {
  font-size: clamp(1.28rem, 2.7vw, 1.85rem);
  font-weight: 600;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-weight: 600;
}

.markdown-body h1::before,
.markdown-body h2::before,
.markdown-body h3::before,
.markdown-body h4::before,
.markdown-body h5::before,
.markdown-body h6::before {
  content: none;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body pre,
.markdown-body table,
.markdown-body figure {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.markdown-body p {
  margin: 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 1.45rem;
}

.markdown-body strong {
  color: var(--text);
  font-weight: 700;
}

.markdown-body em,
.markdown-body i {
  color: inherit;
  font-style: italic;
}

/* language bar */
.language-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.language-links a {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: var(--panel-bg-soft);
  color: var(--text);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.language-links a:hover,
.language-links a:focus-visible,
.language-links a.is-active {
  background: var(--panel-bg-strong);
  color: var(--link-hover);
}

/* sticky menu bar */
.menu-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.menu-links {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  gap: 8px;
  justify-content: flex-start;
  align-items: center;
  padding-left: 28px;
}

.menu-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.74rem 1.05rem 0.58rem;
  border: 0;
  background: var(--solid-green);
  color: #fff;
  font-family: "Kingsbridge", Georgia, serif;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0;
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.menu-links a:hover,
.menu-links a:focus-visible {
  background: var(--faint-white);
  color: var(--solid-green);
  text-decoration: none;
}

.menu-links a.is-active {
  background: var(--solid-green);
  color: #fff;
  box-shadow: inset 0 -4px 0 var(--faint-white-strong);
}

.menu-logo {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  padding-right: 10px;
  background: transparent;
  text-decoration: none;
}

.menu-logo:hover,
.menu-logo:focus-visible {
  background: transparent;
}

.menu-logo img {
  display: block;
  width: auto;
  max-width: min(220px, 32vw);
  height: 80px;
  object-fit: contain;
}

/* media */
.markdown-body img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  padding: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.markdown-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  box-shadow: 0 12px 32px rgba(14, 35, 12, 0.18);
}

.markdown-body audio {
  width: 100%;
  max-width: 100%;
}

.markdown-body figure {
  display: block;
  margin: 1.6rem 0;
}

.markdown-body figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-size: 0.94rem;
  font-weight: 400;
}

.markdown-body figure a:hover,
.markdown-body figure figcaption a:hover {
  background: rgba(255, 255, 255, 0.46);
}

.markdown-body figure > a:has(img),
.markdown-body figure > a:has(img):hover,
.markdown-body a:has(> img),
.markdown-body a:has(> img):hover {
  background: transparent;
}

.video-embed {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-top: 56.25%;
  background: #111;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(14, 35, 12, 0.18);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.iframe-embed {
  width: 100%;
  max-width: 100%;
  margin: 1.6rem 0;
  background: #111;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(14, 35, 12, 0.18);
}

.iframe-embed iframe {
  display: block;
  width: 100%;
  height: var(--iframe-height, 450px);
  border: 0;
}

/* inline index */
.inline-index {
  margin: 2rem 0 1.5rem;
  padding: 1.2rem 1.25rem 0.65rem;
  background: var(--panel-bg-soft);
  border-left: 4px solid var(--solid-green);
}

.inline-index-title {
  margin: 0 0 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.inline-index-title::before {
  content: none !important;
}

/* news */
.news-box {
  margin-bottom: 2rem;
  padding: 1.1rem 1.25rem;
  background: var(--panel-bg-soft);
  border-left: 4px solid var(--solid-green);
  color: var(--text);
}

.news-box .markdown-body,
.news-box .markdown-body p,
.news-box .markdown-body li,
.news-box .markdown-body blockquote {
  color: var(--text);
}

.news-box .markdown-body h1,
.news-box .markdown-body h2,
.news-box .markdown-body h3,
.news-box a {
  color: var(--text);
}

.news-box .markdown-body h1:first-child,
.news-box .markdown-body h2:first-child,
.news-box .markdown-body h3:first-child {
  display: inline-block;
  margin-bottom: 0.65rem;
  color: var(--solid-green);
}

.news-box .markdown-body h1:first-child::before,
.news-box .markdown-body h2:first-child::before,
.news-box .markdown-body h3:first-child::before {
  content: none;
}

/* blockquote */
.markdown-body blockquote {
  margin: 1.35rem 0;
  padding: 0.85rem 1rem;
  background: var(--panel-bg-soft);
  border-left: 4px solid var(--solid-green);
  font-style: italic;
}

/* code */
.code-block {
  margin: 0 0 1rem;
  overflow: hidden;
}

.markdown-body pre,
.markdown-body code {
  font-family: "Courier New", Courier, monospace;
}

.markdown-body pre {
  margin: 0;
  padding: 0.95rem 1rem;
  background: #172013;
  color: #f4f6f1;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* tables */
.markdown-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  background: var(--panel-bg-strong);
}

.markdown-body th,
.markdown-body td {
  border: 1px solid rgba(var(--overlay-green-rgb), 0.26);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.markdown-body th {
  background: rgba(var(--overlay-green-rgb), 0.14);
  font-family: "Kingsbridge", Georgia, serif;
  font-weight: 700;
}

/* search */
.search-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(var(--overlay-green-rgb), 0.35);
  background: var(--panel-bg-strong);
  color: var(--text);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: 400;
}

.search-form input:focus {
  outline: 2px solid var(--solid-green);
  outline-offset: 2px;
  background: #fff;
}

.search-form input::placeholder {
  color: var(--muted);
  font-weight: 400;
}

.search-form button {
  padding: 0.8rem 1.1rem 0.65rem;
  border: 0;
  background: var(--solid-green);
  color: #fff;
  font-family: "Kingsbridge", Georgia, serif;
  font-size: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  cursor: pointer;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: var(--faint-white);
  color: #fff;
}

/* search results */
.search-result {
  margin-bottom: 12px;
  padding: 1rem 1.05rem;
  background: var(--panel-bg-soft);
  border-left: 4px solid var(--solid-green);
}

.search-result-title a {
  font-weight: 700;
  text-transform: uppercase;
}

.search-result-snippet {
  overflow-wrap: anywhere;
  word-break: break-word;
}

mark.search-hit {
  background: rgba(var(--overlay-green-rgb), 0.18) !important;
  color: var(--text) !important;
  font-weight: 700;
  padding: 0 0.08em;
}

/* footer */
#site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  width: auto;
  margin: 0;
  padding: 8px 18px;
  background: var(--panel-bg);
  backdrop-filter: blur(5px);
  color: var(--muted);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-weight: 400;
  text-align: left;
}

#site-footer:empty {
  display: none;
}

#site-footer .markdown-body {
  width: min(var(--content-width), 100%);
  margin: 0 auto;
  text-align: left;
}

/* helpers */
.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.align-justify { text-align: justify; }

.loading,
.error-box {
  color: var(--text);
  font-family: "Libre Franklin", Arial, Helvetica, sans-serif;
  font-weight: 700;
}

.error-box {
  background: var(--panel-bg-strong);
  padding: 1rem;
}

.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 10, 0.82);
}

.lightbox-inner {
  max-width: min(1000px, 100%);
  max-height: 100%;
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 82vh;
  height: auto;
  margin: 0 auto;
}

.lightbox-caption {
  margin-top: 0.75rem;
  color: #fff;
  text-align: center;
}

/* mobile */
@media (max-width: 700px) {
  .site-shell {
    width: 100%;
    margin-bottom: 0;
    padding: 0 0 46px;
  }

  #language-container,
  #page-content,
  #search-container {
    width: calc(100% - 20px);
  }

  #menu-container {
    position: sticky;
    left: auto;
    right: auto;
    width: 100%;
    padding: 8px 10px;
  }

  #page-content,
  #search-container {
    margin-bottom: 8px;
    padding: 20px;
  }

  #site-footer {
    padding: 8px 10px;
  }

  .language-links {
    justify-content: flex-end;
  }

  .menu-links {
    justify-content: flex-start;
    gap: 6px;
    padding-left: 0;
  }

  .menu-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .menu-logo {
    order: -1;
    justify-content: center;
    margin-left: 0;
    padding-right: 0;
  }

  .menu-logo img {
    width: auto;
    max-width: min(240px, 72vw);
    height: 80px;
  }

  .menu-links a {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }

  .search-form {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  #page-content,
  #search-container {
    padding: 18px 16px;
  }

  .menu-links a {
    flex-basis: 100%;
  }
}
