:root {
  --theme-color: #0f5c45;
  --base-background: #f2efe6;
  --base-color: #111111;
  --sidebar-background: #111111;
  --sidebar-color: #f2efe6;
  --sidebar-active: #d7ff5a;
  --link-color: #0f5c45;
  --blockquote-border-color: #0f5c45;
  --code-background: #e9e4d7;
  --table-border-color: #d5cec0;
  --table-head-background: #e9e4d7;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

body {
  background: #f2efe6;
  color: #111111;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

::selection { background: #d7ff5a; color: #111; }

/* Sidebar */

.sidebar {
  width: 310px;
  background: #111111;
  color: #f2efe6;
  border-right: 1px solid #000;
  padding: 24px 0 40px;
}

.sidebar > h1 {
  margin: 0 0 18px;
  padding: 0 22px;
  font-family: var(--display);
  font-size: 23px;
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  text-align: left;
}

.sidebar > h1 a {
  color: #f2efe6;
}

.sidebar .sidebar-nav {
  line-height: 1.3;
}

.sidebar ul {
  margin: 0;
  padding: 0;
}

.sidebar li {
  margin: 0;
}

.sidebar ul li a {
  display: block;
  padding: 8px 22px;
  color: #b9b3a7;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  text-overflow: clip;
  text-decoration: none;
  border-bottom: 1px solid rgba(242, 239, 230, 0.08);
}

.sidebar ul li a:hover {
  color: #d7ff5a;
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
}

.sidebar ul li.active > a {
  color: #111111;
  background: #d7ff5a;
  border-right: 0;
  font-weight: 700;
}

.sidebar li > p,
.sidebar li > strong {
  display: block;
  margin: 6px 0 0;
  padding: 18px 22px 7px;
  color: #e6e1d6;
  border-top: 1px solid rgba(242, 239, 230, 0.14);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar ul li ul {
  padding-left: 0;
}

.sidebar ul li ul:not(.app-sub-sidebar) li a {
  padding-left: 36px;
  font-size: 12px;
  color: #a8a296;
}

.sidebar ul li ul:not(.app-sub-sidebar) li.active > a {
  color: #111111;
  font-weight: 700;
}

.app-sub-sidebar li a {
  padding-left: 38px;
  font-size: 12px;
  color: #918b7f;
}

.app-sub-sidebar li.active > a {
  color: #111;
  background: #d7ff5a;
}

.app-sub-sidebar li::before {
  display: none;
}

.sidebar-toggle {
  background: #111;
}

.sidebar-toggle span {
  background-color: #f2efe6;
}

/* Content */

.content {
  left: 310px;
}

.markdown-section {
  max-width: 880px;
  padding: 46px 48px 96px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  color: #111;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #111;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.markdown-section h1 {
  font-size: 44px;
  line-height: 0.92;
  margin: 0 0 18px;
}

.markdown-section h2 {
  font-size: 28px;
  line-height: 1;
  margin: 48px 0 14px;
  padding-top: 16px;
  border-top: 2px solid #111;
}

.markdown-section h3 {
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 32px 0 10px;
  text-transform: none;
}

.markdown-section h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin: 26px 0 8px;
}

.markdown-section h1 a,
.markdown-section h2 a,
.markdown-section h3 a,
.markdown-section h4 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0;
}

.markdown-section p,
.markdown-section ul,
.markdown-section ol {
  line-height: 1.7;
  word-spacing: normal;
}

.markdown-section a {
  color: #0f5c45;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-section a:hover {
  background: rgba(15, 92, 69, 0.07);
}

.markdown-section strong {
  color: #111;
  font-weight: 700;
}

.markdown-section blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 4px solid #0f5c45;
  background: rgba(15, 92, 69, 0.07);
  color: #333;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
}

.markdown-section blockquote p {
  margin: 0 0 8px;
  font-weight: 500;
}

.markdown-section blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-section hr {
  border: 0;
  border-top: 1px solid #d5cec0;
  margin: 34px 0;
}

/* Tables */

.markdown-section table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #111;
  border-bottom: 2px solid #111;
  margin: 20px 0 26px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
}

.markdown-section th {
  border: 0;
  border-bottom: 1px solid #111;
  padding: 9px 9px;
  color: #6d675c;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  vertical-align: bottom;
}

.markdown-section td {
  border: 0;
  border-bottom: 1px solid #d5cec0;
  padding: 9px 9px;
  vertical-align: top;
}

.markdown-section tr {
  border: 0;
}

.markdown-section tr:nth-child(2n) {
  background: #e9e4d7;
}

.markdown-section th[align="right"],
.markdown-section td[align="right"] {
  text-align: right;
}

/* Code */

.markdown-section code,
.markdown-section pre {
  font-family: var(--mono);
  background: #e9e4d7;
  color: #111;
}

.markdown-section code {
  border: 1px solid #d5cec0;
  border-radius: 0;
  padding: 2px 5px;
  font-size: 0.8em;
}

.markdown-section pre {
  border: 1px solid #d5cec0;
  border-left: 4px solid #111;
  border-radius: 0;
  padding: 16px 18px;
  overflow-x: auto;
}

.markdown-section pre > code {
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.6;
}

/* Search */

.search {
  margin: 18px 18px 14px;
  border-bottom: 0;
  padding: 0;
}

.search input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #1b1b1b;
  border: 1px solid #2d2d2d;
  border-radius: 0;
  color: #f2efe6;
  font-family: var(--sans);
  font-size: 12px;
  outline: none;
}

.search input:focus {
  border-color: #d7ff5a;
}

.search input::placeholder {
  color: #777166;
}

.search .results-panel {
  background: #111;
  border: 1px solid #2d2d2d;
  color: #f2efe6;
  margin-top: 4px;
}

.search .matching-post {
  border-bottom: 1px solid #2d2d2d;
  padding: 10px 12px;
}

.search .matching-post:last-child {
  border-bottom: 0;
}

.search .matching-post h2 {
  color: #d7ff5a;
  font-family: var(--sans);
  font-size: 13px;
  margin: 0 0 4px;
}

.search .matching-post p {
  color: #a8a296;
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
}

.search .search-keyword {
  color: #d7ff5a;
  font-style: normal;
  font-weight: 700;
}

.search .no-data {
  color: #a8a296;
  font-family: var(--mono);
  font-size: 10px;
  padding: 14px;
}

/* Progress */

.progress {
  background: #0f5c45;
  height: 2px;
}

/* Compact sidebar on short desktop screens */

@media (min-width: 769px) and (max-height: 820px) {
  .sidebar > h1 {
    margin-bottom: 12px;
  }

  .search {
    margin: 12px 18px 10px;
  }

  .sidebar ul li a {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .sidebar li > p,
  .sidebar li > strong {
    margin-top: 4px;
    padding-top: 13px;
    padding-bottom: 5px;
  }
}

/* Mobile */

@media (max-width: 768px) {
  .sidebar {
    width: 300px;
  }

  .content {
    left: 0;
  }

  .markdown-section {
    padding: 30px 20px 72px;
    font-size: 16px;
  }

  .markdown-section h1 {
    font-size: 34px;
  }

  .markdown-section h2 {
    font-size: 24px;
  }

  .markdown-section table {
    display: block;
    overflow-x: auto;
    font-size: 12px;
  }
}

/* Print */

@media print {
  .sidebar,
  .sidebar-toggle,
  .search,
  .progress {
    display: none !important;
  }

  .content {
    left: 0;
  }

  .markdown-section {
    max-width: none;
    padding: 0;
    font-size: 10.5pt;
  }

  .markdown-section h2 {
    page-break-after: avoid;
  }

  .markdown-section table {
    page-break-inside: avoid;
  }
}
