:root {
  color-scheme: dark;
	--bg: #0A090B;
	--input: #0f0e11;
	--panel: #121113;
	--panel-hl: #1b1a1f;
	--line: #1b1a1f;
	--line-hl: #39373e;
	--muted: #8b8896;
	--muted-hl: #b2b0bc;
	--text: #d9d7e1;

	--blue: #5b82c7;
	--green: #468146;
	--yellow: #dbb561;
	--orange: #c9814a;
	--purple: #9a7fa1;
	--danger: #C44E4E;
	--danger-hl: #FF7471;


	--blue-glow: rgba(124, 173, 227, .32);

	--z-base: 2;
	--z-footer: 10;
	--z-context: 200;
	--z-modal: 100;
	--z-overlay: 300;
	--z-tooltip: 9999;

	--radius: 4px;
	--radius-lg: 8px;

	--transition: 0.1s ease;
	--transition-fast: 0.05s ease;

	--small: .75rem;
	--medium: 1rem;
	--large: 2rem;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .012) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .28;
}

a,
.markdown-section a {
  color: var(--blue);
  text-decoration-color: rgba(91, 130, 199, .45);
  text-underline-offset: 3px;
}

a:hover,
.markdown-section a:hover {
  color: var(--text);
}

.app-name {
  margin: 0;
  border-bottom: 1px dashed var(--line);
}

.app-name-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.app-name-link img {
  width: min(190px, 78%);
  max-height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(91, 130, 199, .16));
  padding-bottom: 16px;
}

.sidebar {
  width: 284px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel) 52%, var(--bg) 100%);
  border-right: 1px solid var(--line);
  color: var(--muted);
}

.sidebar-toggle {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
}

.sidebar-toggle span {
  background-color: var(--muted-hl);
}

.sidebar-nav {
  padding: 12px 14px 28px;
}

.sidebar ul,
.sidebar ol,
.sidebar li {
  padding-left: 0;
  margin: 0;
  list-style: none !important;
  list-style-type: none !important;
}

.sidebar li::before, 
.sidebar li::after {
  content: none !important;
}

.sidebar-nav a {
  display: flex;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none !important;
  border: none !important;
  transition: color var(--transition), background var(--transition), text-shadow var(--transition);
}

.sidebar-nav > ul > li > a,
.sidebar-nav > ol > li > a {
  color: var(--text) !important;
  font-size: .96rem;
}

.sidebar-nav .app-sub-sidebar a,
.sidebar-nav ul ul a,
.sidebar-nav ol ol a {
  min-height: 28px;
  padding-left: 36px;
  color: var(--muted);
}




.sidebar-nav > ul > li.active > a,
.sidebar-nav > ol > li.active > a,
.sidebar-nav > ul > li > a.active,
.sidebar-nav > ol > li > a.active {
  background: var(--line) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
  text-shadow: none;
}



.sidebar-nav ul li.active > a {
  color: var(--text) !important;
}

.section-link:hover {
	background: none !important;
  color: var(--text) !important;
}

.search {
  margin: 14px;
  padding: 0;
  border-bottom: 0px !important;
}

.search .input-wrap {
  position: relative;
}

.search .input-wrap::before {
  position: absolute;
  top: 50%;
  left: 11px;
  width: 15px;
  height: 15px;
  content: "";
  transform: translateY(-50%);
  opacity: .72;
  background: currentColor;
  color: var(--muted);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 21-4.34-4.34'/%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.search input {
  height: 38px;
  padding: 0 0 0 32px !important;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg) 100%);
  border: 1px solid rgba(200, 200, 200, .02);
  border-bottom: 1px solid #050607;
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: var(--small);
  outline: none;
}

.search input::placeholder {
  color: transparent;
}

.search input:focus {
  border-color: rgba(91, 130, 199, .38);
  box-shadow: 0 0 0 1px rgba(91, 130, 199, .18), 0 0 18px var(--blue-glow);
}

.search .clear-button {
  color: var(--muted);
}

.search .results-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 34px rgba(0, 0, 0, .35);
}

.search .matching-post {
  border-bottom: 1px dashed var(--line);
}

.search .matching-post:last-child {
  border-bottom: 0;
}

.search .matching-post p,
.search .matching-post h2 {
  color: var(--text);
}

.content {
  background: transparent;
  padding-top: 0px !important;
}

.markdown-section {
  max-width: 960px;
  padding: 16px 38px 72px;
  color: var(--text);
}

.markdown-section h1,
.markdown-section h1 a,
.markdown-section h1 span {
  margin: 0 0 24px;
  color: var(--text) !important;
  font-size: clamp(2rem, 3vw, 3.0rem);
  font-weight: 650;
  letter-spacing: 0;
}

.markdown-section > p:first-child:has(img[alt="Kairos icon"]) {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  padding: 6px 0 30px;
  margin: 0 0 8px;
  border-bottom: 1px dashed var(--line);
}

.markdown-section img[alt="Kairos icon"] {
height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(91, 130, 199, .22));
  margin-right: 24px;
  
}

.markdown-section img[alt="Kairos logo"] {
height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(91, 130, 199, .16));
}

/* Fix: Removed margin from H2 and child elements */
.markdown-section h2 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0; 
   margin-top: 32px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line);
  color: var(--muted) !important;
  font-size: .86rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.markdown-section h2 a,
.markdown-section h2 span {
  margin: 0 !important;
  border-bottom: none !important;
  padding: 0 !important;
  color: var(--muted);
}

.markdown-section h3,
.markdown-section h4 {
  color: var(--muted) !important;
  font-size: var(--medium);
  letter-spacing: 0;
  text-transform: none;
}

.markdown-section p,
.markdown-section li {
  color: var(--text);
  line-height: 1.7;
}

.markdown-section p {
  margin: 16px 0 16px;
}

.markdown-section ol {
  padding-left: 0;
  margin: 16px 0 22px;
  counter-reset: kairos-step;
}

.markdown-section ol > li {
  position: relative;
  display: block;
  min-height: 30px;
  padding: 4px 0 8px 42px;
  margin: 0;
  list-style: none;

}

.markdown-section ol > li::before {
  position: absolute;
  top: 9px;
  left: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 20px;
  counter-increment: kairos-step;
  content: counter(kairos-step);
  background: linear-gradient(180deg, var(--line) 0%, var(--panel-hl) 10%, var(--panel) 100%);
  border-bottom: 1px solid #050607;
  border-radius: var(--radius);
  color: var(--muted-hl);
  font-size: .68rem;
}

.markdown-section strong {
  color: var(--blue);
  font-weight: 700;
}

.markdown-section em {
  color: var(--orange);
}

.markdown-section code {
  padding: .16em .34em;
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--yellow);
}

.markdown-section blockquote {
  margin: 24px 0;
  padding: 16px 16px;
  background: var(--panel);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  color: var(--text);
}

.markdown-section blockquote.kairos-note {
  border-left-color: var(--yellow);
}

.markdown-section blockquote.kairos-tip {
  border-left-color: var(--green);
}

.markdown-section blockquote.kairos-warning {
  border-left-color: var(--danger);
}

.markdown-section blockquote p {
  margin: 0;
  color: var(--text);
}

/* Base structural rules for all blockquote headers */
.markdown-section blockquote p:first-child {
  margin: 0;
  font-size: var(--small);
  text-transform: uppercase;
  color: var(--muted-hl); /* Default color if no type class matches */
}

/* Specific type overrides matching the exact selector depth */
.markdown-section blockquote.kairos-note p:first-child {
  color: var(--yellow);
}

.markdown-section blockquote.kairos-tip p:first-child {
  color: var(--green);
}

.markdown-section blockquote.kairos-warning p:first-child {
  color: var(--danger);
}

.markdown-section table {
  background: var(--panel);
  border: none;
  border-radius: var(--radius);
  border-collapse: collapse;
  width: auto;
  display: table;
}

.markdown-section th,
.markdown-section td {
  border: none;
}

.markdown-section thead tr {
  background: transparent;
  text-align: left;
}

.markdown-section tr {
  border-top: none;
}

.markdown-section tbody tr:nth-child(odd) {
  background: var(--panel);
}

.markdown-section tbody tr:nth-child(even) {
  background: var(--input);
}

.kairos-lucide {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: currentColor;
}

.docsify-copy-code-button {
  border-radius: var(--radius);
}

@media (max-width: 768px) {
  .markdown-section {
    padding: 28px 22px 64px;
  }

  .markdown-section h1 {
    font-size: 2.15rem;
  }

  .sidebar {
    background: var(--panel);
  }
}