/* shadcn-inspired polish for the Cinder layout. */
@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("../fonts/GeistMono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sc-background: #ffffff;
  --sc-foreground: #171717;
  --sc-muted: #f5f5f5;
  --sc-muted-foreground: #737373;
  --sc-border: #e5e5e5;
  --sc-accent: #f5f5f5;
  --sc-accent-foreground: #171717;
  --sc-ring: #a3a3a3;
  --sc-code: #fafafa;
  --sc-radius: 10px;
  --sc-font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sc-font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--sc-background);
  color: var(--sc-foreground);
  font-family: var(--sc-font-sans);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.006em;
}

body > .container {
  padding-left: 24px;
  padding-right: 24px;
}

[role="main"] {
  max-width: 820px;
  padding-bottom: 7rem;
}

/* Top navigation: same Cinder structure, flatter shadcn surface. */
.navbar-default {
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-bottom: 1px solid var(--sc-border);
  box-shadow: none;
  backdrop-filter: blur(12px);
border-bottom: 4px solid #03e0e0;
}

.navbar-default .navbar-brand,
.navbar-default .navbar-nav > li > a {
  color: var(--sc-muted-foreground);
  font-family: var(--sc-font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.navbar-default .navbar-brand {
  color: var(--sc-foreground);
  font-weight: 650;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
  background: var(--sc-accent);
  color: var(--sc-accent-foreground);
}

.navbar-default .navbar-toggle .icon-bar {
  background-color: #03e0e0;
}

.navbar-default .dropdown-menu > li > a:hover {
    background-color: #03e0e0;
    color: black;
    font-weight: 400;
}

.dropdown-menu {
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  padding: 6px;
}

.dropdown-menu > li > a {
  border-radius: 7px;
  color: var(--sc-foreground);
  font-size: 14px;
  padding: 8px 10px;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background: var(--sc-accent);
  color: var(--sc-accent-foreground);
}

/* Typography. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--sc-foreground);
  font-family: var(--sc-font-sans);
  font-weight: 650;
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.15rem;
  line-height: 1.15;
  margin: 0 0 1.5rem;
}

h2 {
  border-top: 1px solid var(--sc-border);
  font-size: 1.55rem;
  line-height: 1.25;
  margin-top: 2.75rem;
  padding-top: 1.4rem;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin-top: 2rem;
}

h4, h5, h6 {
  font-style: normal;
  font-variant: normal;
  font-weight: 600;
  margin-top: 1.5rem;
}

p, ul, ol, blockquote, table, pre {
  margin-bottom: 1rem;
}

p {
  color: #262626;
}

/*
li + li {
  margin-top: 0.2rem;
}
*/

a {
  color: #2563eb;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
    color: #848484;
}

/* Sidebar / table of contents. */
.bs-sidenav {
  background: #fafafa;
  background-image: none;
  border: 0;
  border-radius: var(--sc-radius);
  font-family: var(--sc-font-sans);
  font-size: 13px;
  padding: 8px;
}

.bs-sidebar .nav > li > a {
  border-radius: 7px;
  color: var(--sc-muted-foreground);
  padding: 6px 10px;
}

.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus,
.bs-sidebar .nav > .active > a,
.bs-sidebar .nav > .active:hover > a,
.bs-sidebar .nav > .active:focus > a {
  background: var(--sc-accent);
  border-right: 0;
  color: var(--sc-foreground);
  /* font-weight: 550; */
}

.bs-sidebar .nav .nav > li > a {
  font-size: 12px;
  padding-left: 18px;
}

.well {
  background: #fafafa;
  border-color: var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: none;
  border: none;
}

/* Code and data blocks. */
pre, code, kbd, samp {
  font-family: var(--sc-font-mono);
}

code {
  background: var(--sc-muted);
  border: 1px solid var(--sc-border);
  border-radius: 6px;
  color: #171717;
  font-size: 0.88em;
  padding: 0.12em 0.35em;
}

pre {
  background: var(--sc-code);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: none;
  font-size: 13px;
  line-height: 1.6;
  margin: 1.25rem 0;
  padding: 1rem;
}

pre code {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

blockquote {
  border-left: 3px solid var(--sc-border);
  color: var(--sc-muted-foreground);
  padding: 0.25rem 0 0.25rem 1rem;
}

table {
  font-size: 14px;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  border-top-color: var(--sc-border);
  padding: 9px 10px;
}

.table-striped > tbody > tr:nth-child(2n+1) > td,
.table-striped > tbody > tr:nth-child(2n+1) > th {
  background: #fafafa;
}

.bs-callout,
.admonition {
  background: #fafafa;
  border-color: var(--sc-border);
  border-left-color: #171717;
  border-radius: var(--sc-radius);
}

.btn,
.form-control,
.modal-content {
  border-radius: var(--sc-radius);
}

.form-control:focus,
#mkdocs-search-query:focus {
  border-color: var(--sc-ring);
  box-shadow: 0 0 0 3px rgba(163, 163, 163, 0.22);
}

footer {
  color: var(--sc-muted-foreground);
  font-size: 13px;
}

footer > hr {
  border-top-color: var(--sc-border);
}

@media (max-width: 991px) {
  [role="main"] {
    max-width: none;
  }

  body > .container {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* Dark mode. */
html[data-theme="dark"] {
  color-scheme: dark;
  --sc-background: #0a0a0a;
  --sc-foreground: #fafafa;
  --sc-muted: #262626;
  --sc-muted-foreground: #a3a3a3;
  --sc-border: #262626;
  --sc-accent: #1f1f1f;
  --sc-accent-foreground: #fafafa;
  --sc-ring: #737373;
  --sc-code: #111111;
}

.navbar-nav > li > .theme-toggle {
  background: transparent;
  border: 0;
  color: var(--sc-muted-foreground);
  display: block;
  font-size: 14px;
  line-height: 20px;
  margin: 0;
  padding: 12px;
}

.navbar-nav > li > .theme-toggle:hover,
.navbar-nav > li > .theme-toggle:focus {
  background: var(--sc-accent);
  color: var(--sc-accent-foreground);
  outline: 0;
}

.navbar-default .navbar-brand:hover,
 .navbar-default .navbar-brand:focus {
  color: #03e0e0;
}

html[data-theme="dark"] body,
html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] td,
html[data-theme="dark"] th,
html[data-theme="dark"] label,
html[data-theme="dark"] .modal-body {
  color: var(--sc-foreground);
}

html[data-theme="dark"] .navbar-default {
  background: rgba(10, 10, 10, 0.92);
}

html[data-theme="dark"] .navbar-default .navbar-toggle,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .well,
html[data-theme="dark"] .bs-sidenav,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] #mkdocs-search-query {
  background: #111111;
  border-color: var(--sc-border);
  color: var(--sc-foreground);
}

html[data-theme="dark"] .navbar-default .navbar-toggle .icon-bar {
  background-color: var(--sc-foreground);
}

html[data-theme="dark"] .dropdown-menu > li > a,
html[data-theme="dark"] .navbar-default .navbar-brand,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
  color: var(--sc-foreground);
}

html[data-theme="dark"] .navbar-default .navbar-nav > li > a,
html[data-theme="dark"] .bs-sidebar .nav > li > a,
html[data-theme="dark"] blockquote,
html[data-theme="dark"] footer,
html[data-theme="dark"] h1 small,
html[data-theme="dark"] h2 small,
html[data-theme="dark"] h3 small,
html[data-theme="dark"] h4 small,
html[data-theme="dark"] h5 small,
html[data-theme="dark"] h6 small {
  color: var(--sc-muted-foreground);
}

html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus,
html[data-theme="dark"] .navbar-default .navbar-nav > li > a:hover,
html[data-theme="dark"] .navbar-default .navbar-nav > li > a:focus,
html[data-theme="dark"] .navbar-default .navbar-nav > .active > a,
html[data-theme="dark"] .navbar-default .navbar-nav > .active > a:hover,
html[data-theme="dark"] .navbar-default .navbar-nav > .active > a:focus,
html[data-theme="dark"] .navbar-default .navbar-nav > .open > a,
html[data-theme="dark"] .navbar-default .navbar-nav > .open > a:hover,
html[data-theme="dark"] .navbar-default .navbar-nav > .open > a:focus,
html[data-theme="dark"] .bs-sidebar .nav > li > a:hover,
html[data-theme="dark"] .bs-sidebar .nav > li > a:focus,
html[data-theme="dark"] .bs-sidebar .nav > .active > a,
html[data-theme="dark"] .bs-sidebar .nav > .active:hover > a,
html[data-theme="dark"] .bs-sidebar .nav > .active:focus > a {
  background: var(--sc-accent);
  color: var(--sc-accent-foreground);
}

html[data-theme="dark"] code,
html[data-theme="dark"] pre,
html[data-theme="dark"] .hljs {
  background: var(--sc-code);
  border-color: var(--sc-border);
  color: #e5e5e5;
}

html[data-theme="dark"] pre code {
  background: transparent;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-child(2n+1) > td,
html[data-theme="dark"] .table-striped > tbody > tr:nth-child(2n+1) > th,
html[data-theme="dark"] .bs-callout,
html[data-theme="dark"] .admonition {
  background: #111111;
}

html[data-theme="dark"] .bs-callout,
html[data-theme="dark"] .admonition {
  border-color: var(--sc-border);
  border-left-color: #fafafa;
}

html[data-theme="dark"] a {
  color: #93c5fd;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus {
  color: #93c5fd;
}

/* Minimal shadcn-like search modal. */
.search-modal .modal-backdrop,
.modal-backdrop {
  background: #000;
}

.search-modal-dialog {
  margin: 12vh auto 0;
  max-width: 640px;
  width: calc(100% - 32px);
}

.search-modal-content {
  background: var(--sc-background);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.search-modal-body {
  padding: 0;
}

.search-modal-form {
  margin: 0;
}

.search-input-wrap {
  align-items: center;
  border-bottom: 1px solid var(--sc-border);
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
}

.search-input-icon {
  color: var(--sc-muted-foreground);
  font-size: 14px;
  opacity: 0.72;
}

.search-modal-input,
.search-modal-input:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--sc-foreground);
  font-size: 15px;
  height: 48px;
  padding: 0;
}

.search-modal-input::placeholder {
  color: var(--sc-muted-foreground);
}

.search-modal-results {
  max-height: min(52vh, 460px);
  overflow-y: auto;
  padding: 8px;
}

.search-modal-results:empty {
  display: none;
}

.search-modal-results article,
.search-modal-results div {
  border-radius: 8px;
}

.search-modal-results a {
  border-radius: 8px;
  color: var(--sc-foreground);
  display: block;
  padding: 9px 10px;
  text-decoration: none;
}

.search-modal-results a:hover,
.search-modal-results a:focus {
  background: var(--sc-accent);
  color: var(--sc-accent-foreground);
}

.search-modal-results p {
  color: var(--sc-muted-foreground);
  font-size: 13px;
  margin: 2px 10px 8px;
}

html[data-theme="dark"] .search-modal-content {
  background: #111111;
  border-color: var(--sc-border);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .search-modal-input,
html[data-theme="dark"] .search-modal-input:focus {
  background: transparent;
  color: var(--sc-foreground);
}

div[role="main"] a {
    color: #000;
    text-decoration: underline;
}
div[role="main"] a:hover {
    color: #737373;
}

html[data-theme="dark"] div[role="main"] a {
    color: white;
    text-decoration: underline;
}

html[data-theme="dark"] div[role="main"] a:hover {
    color: #737373;
}

.navbar-default .dropdown-menu > li > a:hover, 
.navbar-default .dropdown-menu > .active > a:hover {
  background-color: #03e0e0;
}

.navbar-default .dropdown-menu > .active > a {
    color: white;
    background-color: #5c5c5c;
}

.navbar .dropdown-menu > li > a, .navbar .dropdown-menu > li > a:focus {
    font-weight: unset;
}