@import url("basic.css");

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-opsz-italic.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url("fonts/inter-latin-ext-opsz-italic.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens measured on birdnet.cornell.edu */
:root {
  --bn-blue: #1a5fb4;
  --bn-blue-hover: #1c68c6;
  --bn-blue-light: #3584e4;
  --bn-gradient: linear-gradient(135deg, #3584e4 0%, #1a5fb4 100%);
  --bn-blue-tint: rgba(26, 95, 180, 0.08);
  --bn-visited: #6f42c1;
  --bn-visited-on-dark: #c0a2f5;
  --bn-amber: #f59e0b;
  --bn-badge: #ffc107;
  --bn-text: #334155;
  --bn-strong: #212529;
  --bn-muted: #64748b;
  --bn-lead: rgba(33, 37, 41, 0.75);
  --bn-slate-900: #0f172a;
  --bn-slate-400: #94a3b8;
  --bn-slate-100: #f1f5f9;
  --bn-slate-50: #f8fafc;
  --bn-panel: #f8f9fa;
  --bn-border: #e9ecef;
  --bn-dark: #1a1a1a;
  --bn-dark-gradient: linear-gradient(180deg, #262626 0%, #1a1a1a 100%);
  --bn-header-height: 61px;
  --bn-radius-sm: 12px;
  --bn-radius: 16px;
  --bn-radius-lg: 20px;
  --bn-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  --bn-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --bn-font: "Inter Variable", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bn-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --bn-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --bn-container: 1400px;
  --bn-gutter: 24px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: calc(var(--bn-header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--bn-font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--bn-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--bn-blue);
  text-decoration: none;
  transition: color 0.2s var(--bn-ease);
}

a:hover {
  color: var(--bn-blue-hover);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--bn-blue-light);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  height: auto;
}

.bn-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.bn-icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
  vertical-align: -0.125em;
}

.bn-skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 2000;
  padding: 8px 16px;
  border-radius: var(--bn-radius-sm);
  background: #fff;
  color: var(--bn-blue);
  font-weight: 600;
}

.bn-skip:focus {
  top: 8px;
}

/* ---------- Header ---------- */

.bn-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  height: var(--bn-header-height);
  background: rgba(0, 0, 7, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bn-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: var(--bn-container);
  margin: 0 auto;
  padding: 0 var(--bn-gutter);
}

.bn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.bn-brand:hover {
  color: #fff;
  text-decoration: none;
}

.bn-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
}

.bn-version-slot {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.bn-version-slot:not(:has(select)) {
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.bn-version-slot select {
  appearance: none;
  -webkit-appearance: none;
  padding: 5px 26px 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0'/%3E%3C/svg%3E") no-repeat right 9px center / 9px;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.bn-version-slot select option {
  color: var(--bn-strong);
  background: #fff;
}

.bn-topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.bn-topnav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15.2px;
  font-weight: 500;
  white-space: nowrap;
}

.bn-topnav-link:visited {
  color: var(--bn-visited-on-dark);
}

.bn-topnav-link:hover,
.bn-topnav-link.active {
  color: #fff;
  text-decoration: none;
}

.bn-topnav-link.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -11px;
  height: 2px;
  border-radius: 2px;
  background: var(--bn-blue-light);
}

.bn-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bn-badge);
  color: var(--bn-strong);
  font-size: 10.4px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bn-search,
.bn-drawer-search {
  position: relative;
  display: flex;
  align-items: center;
}

.bn-search .bn-icon,
.bn-drawer-search .bn-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
}

.bn-search .bn-icon {
  color: rgba(255, 255, 255, 0.6);
}

.bn-search input,
.bn-drawer-search input {
  width: 170px;
  padding: 7px 12px 7px 34px;
  border-radius: 20px;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  transition: all 0.3s var(--bn-ease);
}

.bn-search input {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.bn-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.bn-search input:focus {
  width: 220px;
  outline: none;
  border-color: var(--bn-blue-light);
  background: rgba(255, 255, 255, 0.14);
}

.bn-header-icon {
  display: inline-flex;
  padding: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 20px;
}

.bn-header-icon:hover {
  color: #fff;
}

.bn-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -8px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.bn-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- Page grid ---------- */

.bn-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  max-width: var(--bn-container);
  margin: 0 auto;
  padding: 0 var(--bn-gutter);
}

.bn-page.bn-has-toc {
  grid-template-columns: 260px minmax(0, 1fr) 210px;
}

.bn-page.bn-no-tree {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.bn-page.bn-no-tree.bn-has-toc {
  grid-template-columns: minmax(0, 860px) 210px;
}

.bn-wide .bn-page {
  display: block;
  max-width: none;
  padding: 0;
}

@media (min-width: 1100px) {
  .bn-wide .bn-sidebar,
  .bn-no-tree .bn-sidebar {
    display: none;
  }
}

.bn-sidebar {
  position: sticky;
  top: var(--bn-header-height);
  align-self: start;
  height: calc(100vh - var(--bn-header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bn-sidebar-inner {
  padding: 36px 0 48px;
}

.bn-drawer-sections,
.bn-drawer-search,
.bn-drawer-version {
  display: none;
}

.bn-drawer-version {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 0 12px;
  color: var(--bn-muted);
  font-size: 14px;
}

.bn-drawer-version .bn-version-slot {
  color: var(--bn-strong);
  font-size: 16px;
  font-weight: 500;
}

.bn-drawer-version .bn-version-slot:not(:has(select)) {
  border-color: #cbd5e1;
}

.bn-drawer-version .bn-version-slot select {
  padding: 7px 30px 7px 12px;
  border-color: #cbd5e1;
  background: var(--bn-slate-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23334155'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0'/%3E%3C/svg%3E") no-repeat right 11px center / 10px;
  color: var(--bn-strong);
}

.bn-tree-title {
  display: block;
  margin: 0 0 10px;
  padding: 0 12px;
  color: var(--bn-slate-900);
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bn-tree-title.active,
.bn-tree-title:hover {
  color: var(--bn-blue);
  text-decoration: none;
}

.bn-tree,
.bn-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-tree ul {
  margin: 2px 0 6px 14px;
  padding-left: 8px;
  border-left: 1px solid var(--bn-border);
}

.bn-tree a {
  display: block;
  padding: 6px 12px;
  border-radius: 10px;
  color: var(--bn-text);
  font-size: 14.5px;
  line-height: 1.45;
}

.bn-tree a:hover {
  background: var(--bn-slate-100);
  color: var(--bn-slate-900);
  text-decoration: none;
}

.bn-tree li.current > a {
  color: var(--bn-slate-900);
  font-weight: 600;
}

.bn-tree li.active > a {
  background: var(--bn-blue-tint);
  color: var(--bn-blue);
  font-weight: 600;
}

.bn-main {
  min-width: 0;
  padding: 40px 0 72px;
}

.bn-wide .bn-main {
  padding: 0 0 72px;
}

div.body.bn-article {
  max-width: 860px;
  overflow-wrap: break-word;
}

.bn-wide div.body.bn-article {
  max-width: none;
}

.bn-toc {
  position: sticky;
  top: calc(var(--bn-header-height) + 40px);
  align-self: start;
  max-height: calc(100vh - var(--bn-header-height) - 64px);
  overflow-y: auto;
  padding: 0 0 24px;
  font-size: 13.5px;
  line-height: 1.5;
}

.bn-toc-title {
  margin: 0 0 10px;
  color: var(--bn-slate-900);
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bn-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-toc > ul > li > a {
  display: none;
}

.bn-toc ul ul ul {
  padding-left: 12px;
}

.bn-toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--bn-border);
  color: var(--bn-muted);
}

.bn-toc a:hover {
  color: var(--bn-blue);
  text-decoration: none;
}

.bn-toc a.bn-current {
  border-left-color: var(--bn-blue);
  color: var(--bn-blue);
  font-weight: 600;
}

.bn-scrim {
  position: fixed;
  inset: var(--bn-header-height) 0 0 0;
  z-index: 1025;
  background: rgba(15, 23, 42, 0.35);
}

/* ---------- Article typography ---------- */

div.body {
  min-width: 0;
}

div.body p,
div.body dd,
div.body li,
div.body blockquote {
  -webkit-hyphens: manual;
  hyphens: manual;
}

:where(.bn-article) h1,
:where(.bn-article) h2,
:where(.bn-article) h3,
:where(.bn-article) h4,
:where(.bn-article) p.rubric {
  font-family: var(--bn-font);
  line-height: 1.2;
}

:where(.bn-article) h1 {
  margin: 0 0 24px;
  color: var(--bn-blue);
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

:where(.bn-article) h2 {
  margin: 56px 0 16px;
  padding-top: 32px;
  border-top: 1px solid var(--bn-border);
  color: var(--bn-text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

:where(.bn-article) h3 {
  margin: 40px 0 12px;
  color: var(--bn-strong);
  font-size: 1.25rem;
  font-weight: 700;
}

:where(.bn-article) h4 {
  margin: 28px 0 8px;
  color: var(--bn-strong);
  font-size: 1.05rem;
  font-weight: 700;
}

:where(.bn-article) p.rubric {
  margin: 28px 0 8px;
  color: var(--bn-strong);
  font-size: 1.05rem;
  font-weight: 700;
}

:where(.bn-article) h1 + h2,
:where(.bn-article) section:first-of-type > section:first-of-type > h2:first-child {
  margin-top: 40px;
}

:where(.bn-article) p,
:where(.bn-article) li,
:where(.bn-article) dd {
  margin-top: 0;
}

:where(.bn-article) p {
  margin-bottom: 1em;
}

:where(.bn-article) ul,
:where(.bn-article) ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

:where(.bn-article) li {
  margin-bottom: 0.3em;
}

:where(.bn-article) li > p {
  margin-bottom: 0.4em;
}

:where(.bn-article) strong {
  color: var(--bn-strong);
  font-weight: 650;
}

a.toc-backref,
a.toc-backref:hover {
  color: inherit;
  text-decoration: none;
}

a.headerlink {
  margin-left: 0.35em;
  padding: 0 0.2em;
  color: var(--bn-slate-400);
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s var(--bn-ease);
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
a.headerlink:focus {
  opacity: 1;
}

a.headerlink:hover {
  color: var(--bn-blue);
  text-decoration: none;
}

.bn-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--bn-blue-tint);
  color: var(--bn-blue);
  font-size: 11.2px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bn-label a,
.bn-label a:hover {
  color: inherit;
  text-decoration: none;
}

.bn-article > section > p:first-of-type:not(.bn-label) {
  font-size: 1.1rem;
  color: var(--bn-text);
}

hr.docutils {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--bn-border);
}

blockquote {
  margin: 0 0 1em;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--bn-border);
  color: var(--bn-muted);
}

/* Inline code, GUI labels, keys */

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

code.literal,
.bn-article code:not(pre code) {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--bn-slate-100);
  color: var(--bn-slate-900);
  font-size: 0.86em;
  word-break: break-word;
}

.bn-article code .bn-wrap .pre {
  white-space: normal;
}

a code.literal,
a code {
  color: var(--bn-blue);
}

.guilabel,
.menuselection {
  padding: 0.05em 0.45em;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: var(--bn-slate-50);
  color: var(--bn-slate-900);
  font-size: 0.92em;
  font-weight: 550;
  white-space: nowrap;
}

kbd {
  padding: 0.1em 0.4em;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  font-size: 0.85em;
}

/* Code blocks: the dark panel of the BirdNET-Pi page */

div.highlight {
  position: relative;
  margin: 0 0 1.25em;
  border-radius: var(--bn-radius);
  background: var(--bn-dark-gradient);
}

div.highlight pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  background: transparent;
  color: #e6edf3;
  font-size: 13.5px;
  line-height: 1.6;
}

div.highlight .c,
div.highlight .c1,
div.highlight .cm,
div.highlight .ch {
  color: rgba(255, 255, 255, 0.5);
}

div.highlight-bash .nb,
div.highlight-bash .nv,
div.highlight-powershell .n {
  color: #0dcaf0;
}

.bn-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s var(--bn-ease);
}

div.highlight:hover .bn-copy,
.bn-copy:focus-visible,
.bn-copy.bn-copied {
  opacity: 1;
}

.bn-copy:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Admonitions */

div.admonition,
div.topic,
aside.topic {
  margin: 24px 0;
  padding: 16px 20px;
  border: 0;
  border-left: 4px solid var(--bn-blue);
  border-radius: var(--bn-radius-sm);
  background: rgba(26, 95, 180, 0.05);
}

div.admonition > :last-child,
div.topic > :last-child {
  margin-bottom: 0;
}

p.admonition-title,
p.topic-title {
  margin: 0 0 6px;
  color: var(--bn-blue);
  font-size: 0.95rem;
  font-weight: 700;
}

p.admonition-title::after {
  content: "";
}

div.warning,
div.caution,
div.attention,
div.important {
  border-left-color: var(--bn-amber);
  background: rgba(245, 158, 11, 0.08);
}

div.warning p.admonition-title,
div.caution p.admonition-title,
div.attention p.admonition-title,
div.important p.admonition-title {
  color: #b45309;
}

div.danger,
div.error {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

div.danger p.admonition-title,
div.error p.admonition-title {
  color: #b91c1c;
}

/* Local contents block */

nav.contents,
div.contents,
aside.contents {
  margin: 24px 0 32px;
  padding: 20px 24px;
  border: 1px solid var(--bn-border);
  border-radius: var(--bn-radius);
  background: var(--bn-slate-50);
}

nav.contents p.topic-title,
div.contents p.topic-title {
  color: var(--bn-slate-900);
  font-size: 12.8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav.contents ul,
div.contents ul {
  margin: 0;
  padding-left: 1.1em;
}

nav.contents > ul,
div.contents > ul {
  padding-left: 0;
  list-style: none;
}

nav.contents > ul > li > a,
nav.contents > ul > li > p > a,
div.contents > ul > li > a,
div.contents > ul > li > p > a {
  font-weight: 600;
}

nav.contents li,
div.contents li {
  margin: 0.15em 0;
}

/* Tables */

.bn-table-wrap {
  max-width: 100%;
  margin: 0 0 1.5em;
  overflow-x: auto;
  border: 1px solid var(--bn-border);
  border-radius: var(--bn-radius-sm);
}

table.docutils {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

table.docutils th,
table.docutils td {
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--bn-border);
  text-align: left;
  vertical-align: top;
}

table.docutils thead th {
  background: var(--bn-slate-50);
  color: var(--bn-slate-900);
  font-weight: 600;
}

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

table.docutils td > p:last-child,
table.docutils th > p:last-child {
  margin-bottom: 0;
}

/* Definition and option lists (command-line reference) */

dl {
  margin: 0 0 1em;
}

dl:not(.footnote):not(.citation) > dt {
  margin-top: 0.75em;
  color: var(--bn-strong);
  font-weight: 600;
}

dl:not(.footnote):not(.citation) > dd {
  margin: 0.2em 0 0.6em 1.5em;
}

dl.option-list > dt {
  margin-top: 1.5em;
}

dl.option-list kbd,
dl.option-list .option {
  padding: 0.2em 0.6em;
  border-bottom-width: 1px;
  background: var(--bn-slate-50);
  color: var(--bn-slate-900);
  font-family: var(--bn-mono);
  font-size: 0.9em;
  font-weight: 600;
}

dl.option-list > dd {
  margin-top: 0.5em;
}

dl.option-list > dd > p {
  margin-bottom: 0.5em;
}

dl.option-list > dd > p.bn-opt-meta {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  align-items: baseline;
  margin-bottom: 0.2em;
}

.bn-opt-label {
  color: var(--bn-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bn-opt-values {
  line-height: 1.9;
}

.bn-article .bn-opt-default code {
  background: var(--bn-blue-tint);
  color: var(--bn-blue);
  font-weight: 600;
}

/* Figures and images */

figure,
div.figure {
  margin: 24px 0;
}

figcaption,
.caption-text {
  color: var(--bn-muted);
  font-size: 0.9rem;
}

img.bn-shot,
.bn-shot img {
  border: 1px solid var(--bn-border);
  border-radius: var(--bn-radius);
  box-shadow: var(--bn-shadow-md);
}

audio {
  width: 100%;
  max-width: 520px;
}

/* Pager */

.bn-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 860px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--bn-border);
}

.bn-pager a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 48%;
  padding: 12px 16px;
  border: 1px solid var(--bn-border);
  border-radius: var(--bn-radius);
  color: var(--bn-strong);
  font-weight: 600;
  line-height: 1.35;
  transition: all 0.3s var(--bn-ease);
}

.bn-pager a:hover {
  border-color: rgba(26, 95, 180, 0.35);
  color: var(--bn-blue);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--bn-shadow-md);
}

.bn-pager small {
  display: block;
  color: var(--bn-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bn-pager-next {
  margin-left: auto;
  text-align: right;
}

/* ---------- Cards made with ".. container:: bn-cards" ---------- */

.bn-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.bn-card {
  position: relative;
  padding: 20px 22px;
  border: 1px solid #eef1f4;
  border-radius: var(--bn-radius-lg);
  background: #fff;
  box-shadow: var(--bn-shadow);
  transition: all 0.3s var(--bn-ease);
}

.bn-card:hover {
  border-color: rgba(26, 95, 180, 0.25);
  box-shadow: var(--bn-shadow-md);
  transform: translateY(-4px);
}

.bn-card > p {
  margin: 0;
  color: var(--bn-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.bn-card > p:first-child {
  margin-bottom: 6px;
  color: var(--bn-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.bn-card > p:first-child a {
  color: var(--bn-strong);
}

.bn-card > p:first-child a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.bn-card:hover > p:first-child a {
  color: var(--bn-blue);
  text-decoration: none;
}

/* ---------- Wide pages: landing and release ---------- */

.bn-container {
  max-width: var(--bn-container);
  margin: 0 auto;
  padding: 0 var(--bn-gutter);
}

.bn-wide .bn-article > section > h1:first-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bn-wide .bn-article > section {
  max-width: var(--bn-container);
  margin: 0 auto;
  padding: 0 var(--bn-gutter);
}

.bn-wide .bn-article > section > section {
  max-width: 900px;
}

.bn-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 56px 0 64px;
}

.bn-intro-text {
  min-width: 0;
}

.bn-display {
  margin: 0 0 20px;
  color: var(--bn-blue);
  font-size: clamp(2.5rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.bn-lead {
  margin: 0 0 28px;
  color: var(--bn-lead);
  font-size: 20px;
  font-weight: 300;
  line-height: 1.7;
}

.bn-media img {
  display: block;
  width: 100%;
  border: 1px solid var(--bn-border);
  border-radius: var(--bn-radius);
  box-shadow: var(--bn-shadow-md);
}

.bn-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.bn-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  transition: all 0.3s var(--bn-ease);
}

.bn-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.bn-btn-primary {
  background: var(--bn-gradient);
  box-shadow: 0 2px 6px rgba(26, 95, 180, 0.15);
  color: #fff;
}

.bn-btn-primary:hover {
  color: #fff;
  filter: brightness(1.1);
  box-shadow: 0 4px 10px rgba(26, 95, 180, 0.25);
}

.bn-btn-outline {
  border-color: var(--bn-strong);
  color: var(--bn-strong);
}

.bn-btn-outline:hover {
  background: var(--bn-slate-900);
  border-color: var(--bn-slate-900);
  color: #fff;
}

.bn-band {
  padding: 64px 0;
  border-top: 1px solid var(--bn-border);
}

.bn-band-grey {
  background: var(--bn-panel);
  border-top: 0;
}

.bn-band-head {
  max-width: 760px;
  margin-bottom: 32px;
}

.bn-band-head h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--bn-text);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.bn-band-head p:not(.bn-label) {
  margin: 0;
  color: var(--bn-lead);
  font-size: 17px;
}

.bn-grid {
  display: grid;
  gap: 24px;
}

.bn-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bn-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bn-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bn-feature {
  position: relative;
  padding: 24px;
  border: 1px solid #eef1f4;
  border-radius: var(--bn-radius-lg);
  background: #fff;
  box-shadow: var(--bn-shadow);
  transition: all 0.3s var(--bn-ease);
}

a.bn-feature {
  display: block;
  color: inherit;
}

a.bn-feature:hover {
  border-color: rgba(26, 95, 180, 0.25);
  box-shadow: var(--bn-shadow-md);
  text-decoration: none;
  transform: translateY(-4px);
}

.bn-feature h3 {
  margin: 0 0 6px;
  color: var(--bn-strong);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.bn-feature p {
  margin: 0;
  color: var(--bn-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.bn-feature p + p {
  margin-top: 8px;
}

.bn-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--bn-radius-sm);
  background: var(--bn-slate-100);
  color: var(--bn-muted);
  font-size: 20px;
  transition: all 0.3s var(--bn-ease);
}

a.bn-feature:hover .bn-tile {
  background: var(--bn-gradient);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
}

.bn-facts {
  margin: 0;
  padding: 12px 24px 20px;
  border: 1px solid #eef1f4;
  border-radius: var(--bn-radius);
  background: #fff;
  box-shadow: var(--bn-shadow);
}

.bn-facts .bn-data {
  margin-top: 0;
}

.bn-article .bn-facts .bn-data th,
.bn-article .bn-facts .bn-data td {
  text-align: left;
}

.bn-facts .bn-data td:first-child {
  color: var(--bn-muted);
}

.bn-facts .bn-data tbody tr:last-child td {
  border-bottom: 0;
}

.bn-facts .bn-note {
  margin-top: 8px;
}

.bn-note {
  max-width: 900px;
  margin: 16px 0 0;
  color: var(--bn-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Short list of changes on the release page */

.bn-points {
  max-width: 900px;
  margin: 0;
}

.bn-points > div {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 4px 32px;
  padding: 14px 0;
  border-top: 1px solid var(--bn-border);
}

.bn-points > div:last-child {
  border-bottom: 1px solid var(--bn-border);
}

.bn-points dt {
  margin: 0;
  color: var(--bn-strong);
  font-weight: 600;
}

.bn-points dd {
  margin: 0;
}

/* Horizontal bar charts */

.bn-chart {
  margin: 0;
}

.bn-chart-title {
  margin: 0 0 4px;
  color: var(--bn-strong);
  font-size: 16px;
  font-weight: 700;
}

.bn-chart-sub {
  margin: 0 0 16px;
  color: var(--bn-muted);
  font-size: 14px;
  line-height: 1.55;
}

.bn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: var(--bn-text);
  font-size: 13px;
}

.bn-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bn-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.bn-group {
  margin: 0 0 14px;
}

.bn-group-label {
  margin: 0 0 4px;
  color: var(--bn-strong);
  font-size: 14px;
  font-weight: 600;
}

.bn-bar-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 24px;
  font-size: 13px;
}

.bn-bar-row + .bn-bar-row {
  margin-top: 3px;
}

.bn-bar-label {
  overflow: hidden;
  color: var(--bn-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bn-bar-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  border-left: 1px solid #c2c2c2;
}

.bn-bar {
  display: block;
  height: 16px;
  min-width: 2px;
  border-radius: 0 4px 4px 0;
}

.bn-bar-value {
  color: var(--bn-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

/* Series colours, validated for colour-vision deficiencies */
.bn-c-30 {
  background: #1a5fb4;
}

.bn-c-24 {
  background: #f47230;
}

.bn-c-240 {
  background: repeating-linear-gradient(135deg, #f47230 0 2px, #fcd3bf 2px 5px);
}

.bn-c-perch {
  background: #00b894;
}

.bn-table-view {
  margin-top: 14px;
  font-size: 13.5px;
}

.bn-table-view summary {
  padding: 4px 0;
  color: var(--bn-blue);
  font-weight: 600;
  cursor: pointer;
}

.bn-data {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

/* basic.css left-aligns "div.body td". */
.bn-article .bn-data th,
.bn-article .bn-data td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--bn-border);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bn-article .bn-data th:first-child,
.bn-article .bn-data td:first-child {
  text-align: left;
}

.bn-data th {
  color: var(--bn-slate-900);
  font-weight: 600;
  white-space: nowrap;
}

.bn-chart > .bn-data,
.bn-facts .bn-data {
  font-size: 15px;
}

.bn-data-narrow {
  max-width: 520px;
}

.bn-table-scroll,
.bn-table-wrap {
  overflow-x: auto;
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)) left center / 40px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) right center / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0)) right center / 12px 100% no-repeat scroll;
}

.bn-table-scroll .bn-data:not(.bn-data-narrow) td:first-child {
  min-width: 9.5em;
}

.bn-data .bn-total td {
  border-top: 1px solid #cbd5e1;
  border-bottom: 0;
  color: var(--bn-slate-900);
  font-weight: 600;
}

.bn-chart-title-next {
  margin-top: 28px;
}

/* Two-column text rows on the release page */

.bn-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: start;
}

/* ---------- Footer ---------- */

.bn-footer {
  padding: 80px 0 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bn-dark);
  color: var(--bn-slate-400);
  font-size: 13px;
  line-height: 1.7;
}

.bn-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2.5fr));
  gap: 48px;
  max-width: var(--bn-container);
  margin: 0 auto;
  padding: 0 var(--bn-gutter);
}

.bn-footer-brand p {
  max-width: 380px;
  margin: 16px 0;
}

.bn-partners {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin: 24px 0;
}

.bn-partners img {
  width: auto;
}

.bn-partners img[height="30"] {
  height: 30px;
}

.bn-partners img[height="45"] {
  height: 45px;
}

.bn-copyright {
  font-size: 12px;
}

.bn-footer-heading {
  margin: 0 0 16px;
  color: var(--bn-slate-50);
  font-size: 12.8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bn-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-footer li {
  margin: 0 0 10px;
}

.bn-footer-col a {
  display: inline-block;
  color: var(--bn-slate-400);
  transition: all 0.3s var(--bn-ease);
}

.bn-footer-col a:hover {
  color: #fff;
  text-decoration: none;
  transform: translateX(4px);
}

/* ---------- Search page ---------- */

#search-results h2 {
  margin-top: 32px;
}

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

ul.search li {
  padding: 14px 0;
  border-bottom: 1px solid var(--bn-border);
  background: none;
  list-style: none;
}

ul.search li a {
  font-weight: 600;
}

ul.search li p.context {
  margin: 4px 0 0;
  color: var(--bn-muted);
  font-size: 14.5px;
}

.bn-article form input[type="text"] {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font: inherit;
}

.bn-article form input[type="submit"] {
  padding: 8px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--bn-gradient);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

span.highlighted {
  background: #fff3c4;
}

/* ---------- Banner added by the version switcher ---------- */

.bn-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: var(--bn-radius-sm);
  background: rgba(245, 158, 11, 0.1);
  color: #7c4a03;
  font-size: 14.5px;
}

.bn-wide .bn-banner {
  max-width: var(--bn-container);
  margin: 16px auto 0;
}

.bn-banner a {
  color: #7c4a03;
  font-weight: 600;
  text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 1279.98px) {
  .bn-page.bn-has-toc {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
  }

  .bn-page.bn-no-tree.bn-has-toc {
    grid-template-columns: minmax(0, 860px);
  }

  .bn-toc {
    display: none;
  }

  .bn-search input,
  .bn-search input:focus {
    width: 120px;
  }

  .bn-topnav-link {
    padding: 8px 9px;
  }

  .bn-topnav-link.active::after {
    left: 9px;
    right: 9px;
  }
}

@media (max-width: 1099.98px) {
  :root {
    --bn-gutter: 16px;
  }

  .bn-header-inner {
    gap: 10px;
  }

  .bn-nav-toggle {
    display: inline-flex;
  }

  .bn-topnav {
    display: none;
  }

  .bn-search {
    margin-left: auto;
  }

  .bn-page,
  .bn-page.bn-has-toc,
  .bn-page.bn-no-tree {
    display: block;
  }

  .bn-sidebar {
    position: fixed;
    top: var(--bn-header-height);
    left: 0;
    bottom: 0;
    z-index: 1030;
    width: min(320px, 86vw);
    height: auto;
    align-self: auto;
    padding: 0 12px;
    background: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    transform: translateX(-105%);
    transition: transform 0.3s var(--bn-ease);
    visibility: hidden;
  }

  .bn-nav-open .bn-sidebar {
    transform: none;
    visibility: visible;
  }

  .bn-sidebar-inner {
    padding: 16px 0 32px;
  }

  .bn-tree-title {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .bn-drawer-sections {
    display: block;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bn-border);
  }

  .bn-drawer-sections:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .bn-drawer-sections a {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--bn-strong);
    font-weight: 600;
  }

  .bn-drawer-sections a:visited {
    color: var(--bn-visited);
  }

  .bn-drawer-sections a.active {
    background: var(--bn-blue-tint);
    color: var(--bn-blue);
  }

  .bn-drawer-sections a:hover {
    background: var(--bn-slate-100);
    text-decoration: none;
  }

  .bn-main {
    padding-top: 28px;
  }

  .bn-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 32px 0 48px;
  }

  .bn-grid-3,
  .bn-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bn-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .bn-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 24px;
  }

  .bn-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639.98px) {
  .bn-search,
  .bn-header .bn-version-slot {
    display: none;
  }

  .bn-drawer-version {
    display: flex;
  }

  .bn-footer li {
    margin-bottom: 2px;
  }

  .bn-footer-col a {
    padding: 4px 0;
  }

  /* A table with pictures in its first column: the picture goes above the text. */
  .bn-article table.docutils:has(td:first-child img) :is(tbody, tr, td) {
    display: block;
    width: auto;
  }

  .bn-article table.docutils:has(td:first-child img) colgroup {
    display: none;
  }

  .bn-article table.docutils:has(td:first-child img) td:first-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .bn-article table.docutils:has(td:first-child img) td:first-child img {
    width: auto;
    max-width: 140px;
    max-height: 72px;
    margin: 0;
  }

  .bn-header-icon {
    margin-left: auto;
  }

  .bn-brand {
    font-size: 17px;
  }

  .bn-drawer-search {
    display: flex;
    margin: 0 0 16px;
  }

  .bn-drawer-search .bn-icon {
    color: var(--bn-muted);
  }

  /* iOS zooms the page when a field with a smaller font gets the focus. */
  .bn-drawer-search input {
    font-size: 16px;
    width: 100%;
    border: 1px solid #cbd5e1;
    background: var(--bn-slate-50);
    color: var(--bn-strong);
  }

  .bn-article h2 {
    font-size: 1.5rem;
  }

  .bn-grid-2,
  .bn-grid-3,
  .bn-grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .bn-band {
    padding: 48px 0;
  }

  .bn-bar-row {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px;
  }

  .bn-points > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .bn-facts {
    padding: 8px 16px 16px;
  }

  .bn-pager {
    flex-direction: column;
  }

  .bn-pager a {
    max-width: none;
  }

  .bn-footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .bn-copy {
    opacity: 1;
  }
}

@media (hover: none) {
  .bn-search input {
    font-size: 16px;
  }

  .bn-copy {
    opacity: 1;
  }

  div.highlight pre {
    padding-right: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

@media print {
  .bn-header,
  .bn-sidebar,
  .bn-toc,
  .bn-pager,
  .bn-footer,
  .bn-copy {
    display: none !important;
  }

  .bn-page {
    display: block;
  }
}
