:root {
  --ay-bg: #070a0f;
  --ay-bg-soft: #0b0f17;
  --ay-panel: #111827;
  --ay-panel-soft: rgba(17, 24, 39, 0.72);
  --ay-border: rgba(148, 163, 184, 0.24);
  --ay-border-blue: rgba(56, 189, 248, 0.42);
  --ay-text: #f8fafc;
  --ay-muted: #cbd5e1;
  --ay-subtle: #94a3b8;
  --ay-blue: #38bdf8;
  --ay-violet: #8b5cf6;
  --ay-orange: #f59e0b;
}

html,
body {
  background: var(--ay-bg);
  color: var(--ay-text);
}

body {
  color-scheme: dark;
}

a {
  color: var(--ay-blue);
}

a:hover,
a:focus {
  color: #00a6ff;
}

.navbar,
.pkgdown-navbar {
  background: rgba(7, 10, 15, 0.96) !important;
  border-bottom: 1px solid var(--ay-border);
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--ay-text) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--ay-blue) !important;
}

.page-header {
  border-bottom-color: var(--ay-border);
}

.contents,
main,
.template-home main,
.template-home .contents {
  background: transparent;
}

.template-home main,
.template-home .contents {
  max-width: 1060px;
}

.template-home main > .float:first-child,
.template-home .contents > p:first-child {
  margin: 1.25rem 0 0.25rem;
  padding: 0.5rem 0 0.75rem;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.template-home main > .float:first-child img,
.template-home .contents > p:first-child img {
  display: block;
  width: min(340px, 72vw);
  height: auto;
  margin: 0 auto;
}

.template-home main > .float:first-child .figcaption {
  display: none;
}

.template-home main > .section.level1 > .page-header h1,
.template-home .contents > h1:first-of-type {
  margin-top: 1.2rem;
  color: var(--ay-text);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.template-home main > .section.level1 > p:first-of-type,
.template-home .contents > h1:first-of-type + p {
  max-width: 860px;
  color: var(--ay-text);
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
}

.template-home main > .section.level1 > p:nth-of-type(2),
.template-home main > .section.level1 > p:nth-of-type(3),
.template-home .contents > h1:first-of-type + p + p,
.template-home .contents > h1:first-of-type + p + p + p {
  margin-bottom: 0.4rem;
  color: var(--ay-subtle);
  font-weight: 650;
}

.template-home main > .section.level1 > p:nth-of-type(4),
.template-home .contents > h1:first-of-type + p + p + p + p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.1rem 0 1.5rem;
}

.template-home main > .section.level1 > p:nth-of-type(4) a,
.template-home .contents > h1:first-of-type + p + p + p + p a {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid var(--ay-border-blue);
  border-radius: 8px;
  color: var(--ay-text);
  font-weight: 650;
  text-decoration: none;
}

.template-home main > .section.level1 > p:nth-of-type(4) a:hover,
.template-home main > .section.level1 > p:nth-of-type(4) a:focus,
.template-home .contents > h1:first-of-type + p + p + p + p a:hover,
.template-home .contents > h1:first-of-type + p + p + p + p a:focus {
  border-color: var(--ay-orange);
  background: rgba(249, 115, 22, 0.12);
}

.template-home main .section.level2 > h2,
.template-home .contents > h2 {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--ay-border);
  color: var(--ay-text);
}

.template-home main .section.level2:first-of-type > h2,
.template-home .contents > h2:first-of-type {
  border-top: 3px solid var(--ay-blue);
}

.template-home main p,
.template-home main ul,
.template-home main ol,
.template-home .contents > p,
.template-home .contents > ul,
.template-home .contents > ol {
  color: var(--ay-muted);
}

.template-home main table,
.template-home .contents table {
  width: 100%;
  margin: 1.2rem 0 1.6rem;
  color: var(--ay-muted);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--ay-panel-soft);
  border: 1px solid var(--ay-border);
  border-radius: 8px;
}

.template-home main thead th,
.template-home .contents thead th {
  color: var(--ay-text);
  background: rgba(56, 189, 248, 0.1);
  border-bottom: 1px solid var(--ay-border-blue);
}

.template-home main th,
.template-home main td,
.template-home .contents th,
.template-home .contents td {
  padding: 0.85rem;
  border-color: var(--ay-border);
}

.template-home main tr + tr td,
.template-home .contents tr + tr td {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.template-home main code,
.template-home .contents code,
.template-reference-topic code {
  color: #ffb020;
}

.template-home main pre,
.template-home .contents pre,
.template-reference-topic pre {
  background: #0b0f17;
  border: 1px solid var(--ay-border);
  border-radius: 8px;
}

.template-home main .sourceCode,
.template-home .contents .sourceCode,
.template-reference-topic .sourceCode {
  background: #0b0f17;
}

.pkgdown-footer,
footer {
  background: #0b0f17;
  border-top: 1px solid var(--ay-border);
  color: var(--ay-subtle);
}

@media (max-width: 700px) {
  .template-home main > .float:first-child img,
  .template-home .contents > p:first-child img {
    width: min(300px, 80vw);
  }

  .template-home main > .section.level1 > p:nth-of-type(4) a,
  .template-home .contents > h1:first-of-type + p + p + p + p a {
    width: 100%;
    justify-content: center;
  }

  .template-home main table,
  .template-home main thead,
  .template-home main tbody,
  .template-home main tr,
  .template-home main th,
  .template-home main td,
  .template-home .contents table,
  .template-home .contents thead,
  .template-home .contents tbody,
  .template-home .contents tr,
  .template-home .contents th,
  .template-home .contents td {
    display: block;
  }

  .template-home .contents thead {
    display: none;
  }

  .template-home main tr,
  .template-home .contents tr {
    padding: 0.8rem;
    border-top: 1px solid var(--ay-border);
  }

  .template-home main tr:first-child,
  .template-home .contents tr:first-child {
    border-top: 0;
  }

  .template-home main td,
  .template-home .contents td {
    padding: 0.35rem 0;
    border: 0;
  }

  .template-home main td:first-child,
  .template-home .contents td:first-child {
    color: var(--ay-text);
    font-weight: 700;
  }
}
