:root {
  --ay-bg: #fbf8f1;
  --ay-elevated: #fdfcf8;
  --ay-toolbar: rgba(255, 253, 248, .82);
  --ay-edit-bg: #ffffff;
  --ay-fg: #2a2140;
  --ay-dim: #6e6383;
  --ay-faint: #a99dbc;
  --ay-border: #e7e0d3;
  --ay-accent: #7a5cc0;
  --ay-accent-bright: #6a4cb0;
  --ay-mark: #fbebb0;
  --ay-danger: #c0506a;
  --ay-ui: "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  --ay-mono: "SFMono-Regular", "Menlo", "Consolas", "DejaVu Sans Mono",
    "Noto Sans Mono CJK JP", "MS Gothic", monospace;
}

html,
body {
  background: var(--ay-bg);
  color: var(--ay-fg);
  font-family: var(--ay-ui);
  font-size: 16px;
}

body {
  background: var(--ay-bg);
}

a {
  color: var(--ay-accent-bright);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

a:hover,
a:focus {
  color: var(--ay-accent);
}

.navbar.fixed-top {
  min-height: 44px;
  padding-block: 0;
  background: color-mix(in srgb, var(--ay-toolbar) 94%, var(--ay-bg)) !important;
  border-bottom: 1px solid color-mix(in srgb, var(--ay-border) 88%, transparent);
  box-shadow: none;
  backdrop-filter: blur(18px);
}

.navbar.fixed-top .container {
  max-width: none;
  min-height: 44px;
  padding-inline: 18px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ay-fg) !important;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0;
  text-shadow: none;
}

.navbar-brand::before {
  content: "";
  width: 28px;
  height: 28px;
  background: url("favicon.svg") center / contain no-repeat;
  flex: 0 0 auto;
}

.navbar .nav-link {
  color: var(--ay-dim) !important;
  border-radius: 5px;
  font-size: 14px;
  text-shadow: none;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.active,
.navbar .dropdown.show > .nav-link {
  color: var(--ay-accent-bright) !important;
  background: color-mix(in srgb, var(--ay-accent) 10%, transparent);
}

.navbar-toggler {
  border-color: var(--ay-border);
  border-radius: 7px;
  margin-left: auto;
  padding: 5px 9px;
}

.navbar.fixed-top #navbar-collapse.show {
  background: color-mix(in srgb, var(--ay-toolbar) 98%, var(--ay-bg));
  border-top: 1px solid color-mix(in srgb, var(--ay-border) 86%, transparent);
  margin: 0 -18px;
  padding: 10px 18px 14px;
}

.dropdown-menu {
  background: var(--ay-elevated);
  border: 1px solid var(--ay-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(42, 33, 64, .06);
}

.dropdown-item {
  color: var(--ay-fg);
  font-size: 14px;
}

.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
  color: var(--ay-accent-bright);
  background: color-mix(in srgb, var(--ay-accent) 10%, transparent);
}

body > .container {
  max-width: 1180px;
  padding-top: 34px;
}

body > .container > .row > .col-md-3 {
  display: none !important;
}

body > .container > .row > [role="main"] {
  flex: 0 1 min(100%, 920px);
  max-width: 920px;
  width: 100%;
  margin-inline: auto;
}

[role="main"] {
  background: color-mix(in srgb, var(--ay-elevated) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--ay-border) 88%, transparent);
  border-radius: 8px;
  box-shadow: none;
  padding: 34px 42px;
}

[role="main"] h1 {
  margin-top: 0;
  color: var(--ay-fg);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 670;
  line-height: 1.05;
  letter-spacing: 0;
}

[role="main"] h2 {
  margin-top: 2rem;
  color: var(--ay-fg);
  font-size: 1.65rem;
  font-weight: 620;
}

[role="main"] h3 {
  color: var(--ay-fg);
  font-size: 1.18rem;
  font-weight: 650;
}

[role="main"] p,
[role="main"] li,
[role="main"] td {
  color: var(--ay-fg);
  line-height: 1.68;
}

[role="main"] > p:first-of-type {
  color: var(--ay-dim);
  font-size: 1.08rem;
  line-height: 1.55;
}

.bs-sidebar {
  padding-top: 0;
}

.bs-sidebar > .navbar-collapse > .nav,
.bs-sidebar #toc-collapse {
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bs-sidebar .nav > li > a,
.bs-sidebar .nav .nav > li > a {
  color: var(--ay-dim);
  border-left: 1px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  padding: 5px 10px;
}

.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
  color: var(--ay-accent-bright);
  background: color-mix(in srgb, var(--ay-accent) 5%, transparent);
  border-left-color: color-mix(in srgb, var(--ay-accent) 28%, transparent);
}

.bs-sidebar .nav > li.active > a,
.bs-sidebar .nav > li > a.active {
  color: var(--ay-accent-bright);
  background: transparent;
  border-left-color: color-mix(in srgb, var(--ay-accent) 48%, transparent);
  font-weight: 650;
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--ay-border);
  border-radius: 8px;
}

table th {
  background: color-mix(in srgb, var(--ay-mark) 34%, var(--ay-elevated));
  color: var(--ay-fg);
  font-weight: 650;
}

table td,
table th {
  border: 0;
  border-bottom: 1px solid var(--ay-border);
  padding: 10px 12px;
  vertical-align: top;
}

table tr:last-child td {
  border-bottom: 0;
}

table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--ay-accent) 5%, transparent);
}

code,
pre,
kbd {
  font-family: var(--ay-mono);
}

code {
  color: var(--ay-accent-bright);
  background: color-mix(in srgb, var(--ay-accent) 8%, var(--ay-elevated));
  border: 1px solid color-mix(in srgb, var(--ay-border) 78%, transparent);
  border-radius: 5px;
  padding: .08em .34em;
}

pre {
  background: var(--ay-edit-bg);
  border: 1px solid var(--ay-border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

pre code {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
}

blockquote {
  color: var(--ay-dim);
  border-left: 3px solid var(--ay-accent);
  background: color-mix(in srgb, var(--ay-accent) 7%, transparent);
  border-radius: 0 8px 8px 0;
  padding: 12px 16px;
}

hr {
  border-color: var(--ay-border);
  opacity: 1;
}

.modal-content {
  background: var(--ay-elevated);
  border: 1px solid var(--ay-border);
  border-radius: 8px;
}

.form-control {
  border-color: var(--ay-border);
  border-radius: 7px;
}

.form-control:focus {
  border-color: var(--ay-accent);
  box-shadow: 0 0 0 .16rem color-mix(in srgb, var(--ay-accent) 18%, transparent);
}

footer.col-md-12 {
  color: var(--ay-dim);
  border-top: 1px solid var(--ay-border);
  background: color-mix(in srgb, var(--ay-toolbar) 86%, transparent);
  margin-top: 46px;
}

@media (min-width: 768px) {
  .navbar.navbar-expand-lg .navbar-toggler {
    display: none;
  }

  .navbar.navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}

@media (max-width: 767.98px) {
  body > .container {
    padding-top: 22px;
  }

  [role="main"] {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    padding: 24px 18px;
  }

  [role="main"] h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.4rem);
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  table {
    border-radius: 8px;
  }

  table tr {
    border-bottom: 1px solid var(--ay-border);
  }

  table tr:last-child {
    border-bottom: 0;
  }

  table td,
  table th {
    border-bottom: 0;
    padding: 9px 12px;
  }

  table td:first-child {
    color: var(--ay-accent-bright);
    font-weight: 650;
    padding-bottom: 2px;
  }

  table td + td {
    padding-top: 2px;
  }
}
