@import url("https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&display=swap");

:root {
  --hm-bg-hard: #1d2021;
  --hm-bg: #282828;
  --hm-bg-soft: #32302f;
  --hm-bg-1: #3c3836;
  --hm-bg-2: #504945;
  --hm-gray: #928374;
  --hm-fg-0: #fbf1c7;
  --hm-fg-1: #ebdbb2;
  --hm-fg-2: #d5c4a1;
  --hm-fg-3: #bdae93;
  --hm-fg-4: #a89984;
  --hm-yellow: #fabd2f;
  --hm-orange: #fe8019;
  --hm-green: #b8bb26;
  --hm-blue: #83a598;
  --hm-red: #fb4934;
}

html,
body,
.wy-grid-for-nav,
.wy-nav-content-wrap {
  background: var(--hm-bg);
}

body {
  color: var(--hm-fg-1);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 16px;
  line-height: 1.7;
}

/* Sidebar and project identity */
.wy-nav-side {
  width: 300px;
  border-right: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-hard);
}

.wy-side-nav-search {
  padding: 1.5rem 1.25rem 1.35rem;
  border-bottom: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-hard);
}

.wy-side-nav-search > a,
.wy-side-nav-search .wy-dropdown > a {
  color: var(--hm-fg-0);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.wy-side-nav-search > a.icon::before {
  display: none;
}

.wy-side-nav-search > a img.logo {
  width: 76px;
  height: 76px;
  margin: 0 auto 0.8rem;
  padding: 0;
  background: transparent;
}

.wy-side-nav-search input[type="text"] {
  height: 2.5rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hm-bg-2);
  border-radius: 2px;
  outline: none;
  background: var(--hm-bg);
  box-shadow: none;
  color: var(--hm-fg-1);
  font-family: inherit;
  font-size: 0.82rem;
}

.wy-side-nav-search input[type="text"]:focus {
  border-color: var(--hm-yellow);
}

.wy-side-nav-search input[type="text"]::placeholder {
  color: var(--hm-gray);
}

.wy-menu-vertical {
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
}

.wy-menu-vertical p.caption {
  margin: 1.5rem 1.25rem 0.55rem;
  color: var(--hm-yellow);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.wy-menu-vertical a {
  padding: 0.55rem 1.25rem;
  color: var(--hm-fg-3);
  font-size: 0.86rem;
  line-height: 1.45;
}

.wy-menu-vertical a:hover {
  background: var(--hm-bg-1);
  color: var(--hm-fg-0);
}

.wy-menu-vertical li.current,
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.toctree-l1.current > a {
  border: 0;
  background: var(--hm-bg-soft);
  color: var(--hm-fg-0);
}

.wy-menu-vertical li.current > a {
  border-left: 3px solid var(--hm-yellow);
  padding-left: calc(1.25rem - 3px);
}

.wy-menu-vertical li.current a:hover {
  background: var(--hm-bg-1);
}

.wy-menu-vertical li.current ul {
  background: var(--hm-bg-hard);
}

.wy-menu-vertical li.current ul a {
  padding-left: 2rem;
  color: var(--hm-fg-4);
}

.wy-menu-vertical li.current ul a.current,
.wy-menu-vertical li.current ul a.current:hover,
.wy-menu-vertical li.current li.current > a {
  border: 0;
  border-left: 2px solid var(--hm-yellow);
  background: var(--hm-bg-1) !important;
  color: var(--hm-yellow) !important;
  font-weight: 500;
}

/* Main reading surface */
.wy-nav-content-wrap {
  margin-left: 300px;
}

.wy-nav-content {
  min-height: 100vh;
  max-width: 1080px;
  padding: 2.5rem clamp(2rem, 5vw, 4.5rem) 4rem;
  background: var(--hm-bg);
}

.rst-content {
  color: var(--hm-fg-2);
  font-size: 1rem;
  line-height: 1.75;
}

.rst-content p,
.rst-content ol,
.rst-content ul,
.rst-content dl {
  margin-bottom: 1.35rem;
}

.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
  color: var(--hm-fg-0);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-weight: 500;
  line-height: 1.3;
}

.rst-content h1 {
  margin: 0 0 2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--hm-bg-2);
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.rst-content h2 {
  margin: 2.8rem 0 1rem;
  font-size: 1.45rem;
}

.rst-content h3 {
  margin: 2rem 0 0.8rem;
  color: var(--hm-fg-2);
  font-size: 1.15rem;
}

.rst-content h4,
.rst-content h5,
.rst-content h6 {
  color: var(--hm-fg-3);
  font-size: 1rem;
}

a,
.rst-content a,
.wy-breadcrumbs a,
.wy-menu-vertical a:active {
  color: var(--hm-yellow);
}

a:hover,
.rst-content a:hover,
.wy-breadcrumbs a:hover {
  color: var(--hm-orange);
  text-decoration: underline;
}

.wy-breadcrumbs {
  margin-bottom: 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--hm-bg-2);
  color: var(--hm-fg-4);
  font-size: 0.78rem;
}

.wy-breadcrumbs li,
.wy-breadcrumbs li a {
  color: var(--hm-fg-4);
}

.wy-breadcrumbs li a:hover {
  color: var(--hm-yellow);
}

.wy-breadcrumbs-aside a {
  color: var(--hm-gray);
}

hr {
  border: 0;
  border-top: 1px solid var(--hm-bg-2);
}

/* Inline code, source blocks, and SystemVerilog signatures */
code,
.rst-content code,
.rst-content tt,
.rst-content code.literal,
.rst-content tt.literal {
  padding: 0.08rem 0.28rem;
  border: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-hard) !important;
  color: var(--hm-fg-0) !important;
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.rst-content code.xref,
.rst-content tt.xref,
.rst-content a code,
.rst-content a tt,
.rst-content a code.literal,
.rst-content a tt.literal {
  color: var(--hm-yellow) !important;
}

.rst-content div[class^="highlight"],
.rst-content div.highlight,
.rst-content pre.literal-block {
  margin: 1.4rem 0;
  border: 1px solid var(--hm-bg-2);
  border-radius: 0;
  background: var(--hm-bg-hard);
}

.rst-content div[class^="highlight"] pre,
.rst-content div.highlight pre,
.rst-content pre.literal-block {
  padding: 1rem 1.1rem;
  background: transparent;
  color: var(--hm-fg-1);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.86rem;
  line-height: 1.6;
}

.rst-content dl:not(.docutils) dt,
.rst-content dl.sv dt.sig,
.rst-content dt.sig.sig-object {
  margin: 1.1rem 0 0;
  padding: 0.7rem 0.85rem;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-left: 3px solid var(--hm-yellow) !important;
  border-radius: 0;
  background: var(--hm-bg-hard) !important;
  color: var(--hm-fg-1) !important;
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.9rem;
}

.rst-content dl:not(.docutils) dt .property,
.rst-content dl.sv dt.sig .property,
.rst-content dt.sig.sig-object .property {
  color: var(--hm-green) !important;
}

.rst-content dl:not(.docutils) dt .sig-name,
.rst-content dl.sv dt.sig .sig-name,
.rst-content dt.sig.sig-object .sig-name {
  color: var(--hm-fg-0) !important;
  font-weight: 700;
}

.rst-content dt.sig.sig-object code,
.rst-content dt.sig.sig-object span {
  border: 0;
  background: transparent !important;
}

.rst-content dl:not(.docutils) dd,
.rst-content dl.sv dd {
  margin: 0 0 0 1.2rem;
  padding: 0.8rem 0 0.2rem 1rem;
  border-left: 1px solid var(--hm-bg-2);
}

.headerlink {
  color: var(--hm-gray) !important;
}

.headerlink:hover {
  color: var(--hm-yellow) !important;
}

/* Tables and diagrams */
.wy-table-responsive {
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 0;
}

.rst-content table.docutils,
.rst-content table.field-list {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--hm-fg-2);
}

.rst-content table.docutils caption {
  padding: 0 0 0.65rem;
  color: var(--hm-fg-3);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
}

.rst-content table.docutils thead,
.rst-content table.docutils th {
  background: transparent !important;
  color: var(--hm-fg-4);
  font-weight: 500;
}

.rst-content table.docutils th {
  padding: 0.55rem 0.8rem 0.65rem;
  border: 0 !important;
  border-bottom: 1px solid var(--hm-bg-2) !important;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: normal;
}

.rst-content table.docutils td {
  padding: 0.8rem;
  border: 0 !important;
  border-bottom: 1px solid var(--hm-bg-1) !important;
  background: transparent !important;
  font-size: 0.86rem;
  white-space: normal;
}

.rst-content table.docutils tbody tr:last-child td {
  border-bottom: 0 !important;
}

.rst-content table.docutils code,
.rst-content table.docutils tt {
  padding: 0;
  border: 0;
  background: transparent !important;
}

.rst-content table.field-list td,
.rst-content table.field-list th {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--hm-bg-2) !important;
  font-size: 0.86rem;
  white-space: normal;
}

.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
  background: transparent !important;
}

.rst-content figure img.align-center {
  max-width: 100%;
  margin: 1.5rem auto 0;
  padding: 1.25rem;
  border: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-hard);
}

.rst-content figure figcaption {
  margin-top: 0.65rem;
  color: var(--hm-fg-4);
  font-size: 0.78rem;
  font-style: normal;
  text-align: center;
}

.rst-content figure figcaption p {
  margin: 0;
  font-size: inherit;
}

.rst-content figure figcaption .caption-text {
  font-style: normal !important;
}

/* Admonitions, controls, and footer */
.rst-content .admonition,
.rst-content .note,
.rst-content .warning {
  border: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-soft);
  color: var(--hm-fg-2);
}

.rst-content .admonition-title {
  background: var(--hm-bg-1);
  color: var(--hm-yellow);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
}

.btn,
.rst-content .btn {
  border: 1px solid var(--hm-bg-2);
  border-radius: 2px;
  background: var(--hm-bg-hard) !important;
  box-shadow: none;
  color: var(--hm-fg-2) !important;
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
}

.btn:hover,
.rst-content .btn:hover {
  border-color: var(--hm-yellow);
  color: var(--hm-yellow) !important;
}

footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hm-bg-2);
  color: var(--hm-gray);
  font-size: 0.75rem;
}

.rst-footer-buttons {
  margin-top: 2.5rem;
}

.wy-nav-top {
  border-bottom: 1px solid var(--hm-bg-2);
  background: var(--hm-bg-hard);
  color: var(--hm-fg-0);
  font-family: "Fira Mono", "DejaVu Sans Mono", monospace;
}

.wy-nav-top a {
  color: var(--hm-yellow);
}

@media screen and (max-width: 768px) {
  .wy-nav-side {
    left: -300px;
  }

  .wy-nav-side.shift {
    left: 0;
  }

  .wy-nav-content-wrap {
    margin-left: 0;
  }

  .wy-nav-content-wrap.shift {
    left: 300px;
  }

  .wy-nav-content {
    padding: 1.75rem 1.25rem 3rem;
  }

  .rst-content h1 {
    font-size: 1.8rem;
  }
}
