* {
  box-sizing: border-box;
}

:root {
  --primary: #5340c8;
  --primary-hover: #3f30a3;
  --secondary: #13d2ea;
  --color-fg-default: #1f2328;
  --color-fg-muted: #636c76;
  --color-canvas-default: #ffffff;
  --color-canvas-subtle: #f6f8fa;
  --color-border-default: #d0d7de;
  --color-accent-fg: #0969da;
  --color-btn-bg: #f6f8fa;
  --sidebar-width: 260px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Plus Jakarta Sans";
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-fg-default);
  background-color: var(--color-canvas-default);
  margin: 0;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

html.home-mode-root {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 64px;
  scroll-behavior: smooth;
}

body.home-mode {
  overflow-x: hidden;
  overflow-y: auto;
}

/* Ensure font is applied to form elements */
button,
input,
select,
textarea {
  font-family: inherit;
}

/* Monospace fonts for code */
code,
pre code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    SF Mono,
    Menlo,
    Consolas,
    Liberation Mono,
    monospace !important;
}

/* Navbar */
.header {
  background-color: #24292f;
  color: rgba(255, 255, 255, 0.7);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

.header-brand img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

.header-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
}

.header-link i {
  color: var(--secondary);
  font-size: 16px;
  opacity: 0.9;
}

.header-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.version-switcher select {
  appearance: none;
  min-width: 112px;
  padding: 7px 30px 7px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.08);
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.version-switcher select:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

.version-switcher option {
  color: #1f2328;
  background: #fff;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */
.container-main {
  display: flex;
  width: 100%;
  margin: 0;
}

/* Sidebar */
#sidebar {
  width: var(--sidebar-width);
  padding: 32px 16px;
  border-right: 1px solid var(--color-border-default);
  height: calc(100vh - 64px);
  position: fixed;
  top: 64px;
  bottom: 0;
  left: 0;
  z-index: 900;
  background-color: var(--color-canvas-default);
  overflow-y: auto;
  display: none;
}

.docs-mode #sidebar {
  display: block;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-title {
  font-size: 11px;
  font-weight: 700;
  color: #8c959f;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 8px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-title i {
  font-size: 14px;
  color: var(--color-fg-muted);
}

.nav-item {
  display: block;
  padding: 6px 12px;
  color: #484f58;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  margin-bottom: 2px;
  transition: all 0.1s ease;
}

.nav-item:hover {
  background-color: rgba(208, 215, 222, 0.32);
  color: var(--color-fg-default);
}

.nav-item.active {
  font-weight: 600;
  background-color: #f0effc;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  border-radius: 2px 6px 6px 2px;
}

/* Submenu Styles */
.nav-item-group {
  margin-bottom: 2px;
}

.nav-submenu {
  padding-left: 16px;
  display: none;
  margin-top: 2px;
  margin-bottom: 8px;
}

.nav-item.active + .nav-submenu,
.nav-item-group:has(.nav-item.active) .nav-submenu {
  display: block;
}

.nav-subitem {
  display: block;
  padding: 4px 12px;
  color: var(--color-fg-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: 0;
  transition: all 0.1s ease;
  border-left: 1px solid var(--color-border-default);
  margin-left: 8px;
}

.nav-subgroup-title {
  margin: 10px 0 3px 8px;
  padding: 2px 12px 2px 12px;
  color: var(--color-fg-default);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  border-left: 1px solid transparent;
}

.api-method-menu {
  padding-left: 10px;
}

.api-method-item {
  padding-left: 20px;
  font-family:
    ui-monospace, SFMono-Regular, SFMono-Regular, Consolas, "Liberation Mono",
    Menlo, monospace;
  font-size: 12px;
}

.nav-subitem:hover {
  color: var(--primary);
  background-color: rgba(83, 64, 200, 0.05);
  border-left-color: var(--primary);
}

.nav-subitem.active {
  color: var(--primary);
  font-weight: 600;
  border-left: 4px solid var(--primary);
  background-color: rgba(83, 64, 200, 0.05);
  border-radius: 0 6px 6px 0;
}

/* Documentation Content Icons */
.doc-header-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 12px;
  display: block;
}

.markdown-body h1 i,
.markdown-body h2 i,
.markdown-body h3 i {
  margin-right: 8px;
  color: var(--primary);
  vertical-align: middle;
}

.markdown-body ul li i {
  margin-right: 6px;
  color: var(--primary);
  font-size: 1.1em;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 16px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.lang-btn {
  min-width: 40px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 0 10px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.lang-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-btn.active {
  color: #071018;
  border-color: rgba(19, 210, 234, 0.6);
  background: linear-gradient(135deg, var(--secondary), #8ef0ff);
  box-shadow: 0 8px 20px rgba(19, 210, 234, 0.18);
}

.lang-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.lang-label {
  display: none;
  font-size: 11px;
  font-weight: 700;
}

/* Content */
#content-wrapper {
  flex: 1;
  min-width: 0;
  padding: 40px 64px;
}

.docs-mode #content-wrapper {
  width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
  display: grid;
  grid-template-columns: minmax(0, 860px) minmax(190px, 240px);
  justify-content: center;
  align-items: start;
  gap: 48px;
  padding: 48px 56px;
}

.docs-mode #home-hero-wrapper {
  display: none;
}

.docs-mode #doc-content {
  grid-column: 1;
  width: 100%;
}

.docs-mode #page-toc {
  grid-column: 2;
}

.docs-mode #site-footer-wrapper {
  grid-column: 1 / -1;
}

.home-mode #content-wrapper {
  width: 100%;
  padding: 0;
}

.page-loader {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-fg-muted);
  font-weight: 600;
  animation: loader-fade-in 0.18s ease-out both;
}

.page-loader-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(83, 64, 200, 0.16);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: loader-spin 0.75s linear infinite;
}

.page-loader-text {
  line-height: 1;
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loader-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-loader,
  .page-loader-spinner {
    animation: none;
  }
}

/* Markdown Body (Bootstrap-inspired docs style) */
.markdown-body {
  width: 100%;
  min-width: 0;
  max-width: 860px;
  font-size: 16px;
  word-wrap: break-word;
}

.docs-mode .markdown-body {
  color: #24324b;
}

#page-toc {
  display: none;
}

.docs-mode #page-toc {
  display: block;
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.page-toc-inner {
  padding: 8px 0 8px 18px;
  border-left: 1px solid rgba(208, 215, 222, 0.9);
}

.page-toc-title {
  margin-bottom: 10px;
  color: #25345d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-toc-nav {
  display: grid;
  gap: 2px;
}

.page-toc-link {
  display: block;
  padding: 4px 0;
  color: var(--color-fg-muted);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition:
    color 0.16s ease,
    transform 0.16s ease;
}

.page-toc-link.is-nested {
  padding-left: 12px;
  font-size: 12px;
}

.page-toc-link:hover,
.page-toc-link.active {
  color: var(--primary);
  transform: translateX(2px);
}

.markdown-body h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 18px;
  color: #172033;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.05em;
}
.markdown-body h2 {
  font-size: 1.55em;
  border-bottom: 1px solid rgba(208, 215, 222, 0.75);
  padding-bottom: 0.45em;
  margin-top: 56px;
  margin-bottom: 18px;
  color: #172033;
  font-weight: 800;
  letter-spacing: -0.025em;
  scroll-margin-top: 92px;
}
.markdown-body h3 {
  font-size: 1.18em;
  margin-top: 34px;
  margin-bottom: 12px;
  color: #25345d;
  font-weight: 750;
  scroll-margin-top: 92px;
}
.markdown-body p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #4b5568;
}

.markdown-body ul,
.markdown-body ol {
  margin-bottom: 20px;
}

.markdown-body li {
  margin-bottom: 8px;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin-top: 8px;
}

/* Tables (GitHub Style) */
.markdown-body table {
  display: block;
  width: 100%;
  width: max-content;
  max-width: 100%;
  overflow: auto;
  border-spacing: 0;
  border-collapse: collapse;
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body table th {
  font-weight: 700;
  background-color: #f8fafc;
}
.markdown-body table th,
.markdown-body table td {
  padding: 10px 14px;
  border: 1px solid rgba(208, 215, 222, 0.82);
}

.markdown-body table tr {
  background-color: var(--color-canvas-default);
  border-top: 1px solid var(--color-border-default);
}
.markdown-body table tr:nth-child(2n) {
  background-color: var(--color-canvas-subtle);
}

/* Code Blocks */
.markdown-body pre {
  background-color: #f8fafc;
  border: 1px solid rgba(208, 215, 222, 0.82);
  border-radius: 12px;
  padding: 18px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.55;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.markdown-body code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    SF Mono,
    Menlo,
    Consolas,
    Liberation Mono,
    monospace;
  padding: 0.2em 0.42em;
  margin: 0;
  font-size: 85%;
  color: #5132a8;
  background-color: rgba(83, 64, 200, 0.08);
  border-radius: 6px;
}

.markdown-body pre code {
  padding: 0;
  background-color: transparent;
  font-size: 100%;
}

.code-tabs {
  margin: 16px 0 20px;
  border: 1px solid var(--color-border-default);
  border-radius: 8px;
  background-color: var(--color-canvas-default);
  overflow: hidden;
}

.code-tab-buttons {
  display: flex;
  gap: 4px;
  padding: 8px 8px 0;
  border-bottom: 1px solid var(--color-border-default);
  background-color: var(--color-canvas-subtle);
  overflow-x: auto;
}

.code-tab-button {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: var(--color-fg-muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  padding: 8px 12px;
  white-space: nowrap;
}

.code-tab-button:hover {
  color: var(--color-fg-default);
  background-color: rgba(208, 215, 222, 0.32);
}

.code-tab-button.active {
  color: var(--primary);
  border-color: var(--color-border-default);
  background-color: var(--color-canvas-default);
}

.code-tab-panel {
  display: none;
}

.code-tab-panel.active {
  display: block;
}

.markdown-body .code-tabs pre {
  margin: 0;
  border-radius: 0;
  border: none;
}

/* Buttons */
.btn-github {
  display: inline-block;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--color-border-default);
  border-radius: 6px;
  background-color: var(--color-btn-bg);
  color: var(--color-fg-default);
  text-decoration: none;
}

.btn-github:hover {
  background-color: #f3f4f6;
  border-color: #1b1f2326;
}

.btn-primary-github {
  background-color: var(--primary);
  color: #fff;
  border-color: rgba(27, 31, 35, 0.15);
}

.btn-primary-github:hover {
  background-color: var(--primary-hover);
  color: #fff;
}

/* Home Layout (Center Middle & Cover) */
.home-mode .container-main {
  position: relative;
  z-index: 10;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  max-width: 100%;
  background: transparent;
}

.home-mode .header {
  z-index: 100;
}

.home-hero,
.site-footer {
  background: transparent !important; /* Ensure all components are transparent */
}

.home-mode #content-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  padding: 0;
}

.home-mode #home-hero-wrapper {
  flex: 0 0 auto;
  width: 100%;
}

/* Spacer to push content to middle while keeping footer at bottom */
.home-mode #home-hero-wrapper {
  margin-top: 0;
}

.home-mode #site-footer-wrapper {
  margin-top: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  scroll-snap-align: end;
}

/* Hero Section for Home (Restored Text Size) */
.home-hero {
  padding: 0 16px 32px;
  text-align: center;
  background-color: transparent;
  width: 100%;
}

.home-hero img {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.2);
}

.home-hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  border: none;
  letter-spacing: -0.04em;
}

.home-hero p {
  font-size: 20px;
  color: var(--color-fg-muted);
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.home-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 24px;
}

.home-badges a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.home-badges a:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.home-badges img {
  display: block;
  height: 20px;
  width: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-hero-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.home-flow {
  width: min(100% - 32px, 1080px);
  margin: 44px auto 0;
  padding: 22px;
  border: 1px solid rgba(83, 64, 200, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(19, 210, 234, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(31, 35, 40, 0.08);
  backdrop-filter: blur(10px);
}

.home-flow-heading {
  margin-bottom: 18px;
}

.home-flow-heading h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.home-flow-heading p {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.55;
}

.home-flow-diagram {
  display: grid;
  grid-template-columns:
    minmax(220px, 1fr) auto minmax(170px, 0.72fr)
    auto minmax(300px, 1.25fr);
  align-items: center;
  gap: 16px;
}

.home-flow-card,
.home-flow-core {
  position: relative;
  border: 1px solid rgba(208, 215, 222, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.home-flow-card {
  padding: 16px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(31, 35, 40, 0.06);
}

.home-flow-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-flow-storage ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.home-flow-storage li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(208, 215, 222, 0.6);
  border-radius: 999px;
  color: var(--color-fg-default);
  background: var(--color-canvas-subtle);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.home-flow-storage li i {
  color: var(--secondary);
  font-size: 15px;
}

.home-flow-arrow {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 26px rgba(83, 64, 200, 0.22);
  font-size: 24px;
}

.home-flow-core {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(83, 64, 200, 0.96), rgba(19, 210, 234, 0.9)),
    var(--primary);
  box-shadow: 0 18px 38px rgba(83, 64, 200, 0.28);
}

.home-flow-core-glow {
  position: absolute;
  inset: auto -24px -44px auto;
  width: 110px;
  height: 110px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.home-flow-core img {
  width: 58px;
  height: 58px;
  margin: 0;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(31, 35, 40, 0.22);
}

.home-flow-core strong {
  position: relative;
  z-index: 1;
  font-size: 16px;
}

.home-flow-result {
  display: grid;
  gap: 8px;
}

.home-flow-result pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(208, 215, 222, 0.7);
  border-radius: 12px;
  background: #f6f8fa;
  color: var(--color-fg-default);
  font-size: 11px;
  line-height: 1.45;
}

.home-flow-result code {
  padding: 0;
  background: transparent;
}

.home-bootstrap-home {
  padding-top: 0;
}

.home-bootstrap-hero {
  position: relative;
  width: min(100% - 32px, 980px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: clamp(40px, 7vh, 82px) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-bootstrap-hero::after {
  content: "";
  position: absolute;
  inset: 12% 10% 28%;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  filter: blur(42px);
}

.home-bootstrap-hero::before {
  content: "";
  position: absolute;
  inset: -28px 8% auto;
  height: 340px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(255, 255, 255, 0.92),
      transparent 18%
    ),
    radial-gradient(
      circle at 50% 22%,
      rgba(19, 210, 234, 0.16),
      transparent 34%
    ),
    radial-gradient(circle at 50% 34%, rgba(83, 64, 200, 0.12), transparent 48%);
  filter: blur(10px);
}

.home-bootstrap-logo {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  margin: 0 auto 26px;
  border-radius: 22px;
  object-fit: contain;
  filter: drop-shadow(0 22px 32px rgba(31, 35, 40, 0.16))
    drop-shadow(0 0 34px rgba(255, 255, 255, 0.72))
    drop-shadow(0 0 42px rgba(19, 210, 234, 0.24));
  box-shadow: none;
}

.home-bootstrap-hero h1 {
  max-width: 920px;
  margin: 0 auto 18px;
  color: #172033;
  font-size: clamp(2.85rem, 5.8vw, 4.65rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.home-bootstrap-hero p {
  max-width: 760px;
  margin: 0 auto 22px;
  color: #5b6472;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.5;
}

.home-bootstrap-badges {
  margin-bottom: 20px;
}

.home-bootstrap-hero .home-bootstrap-badges img {
  display: block;
  width: auto;
  height: 20px;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-bootstrap-install {
  width: min(100%, 520px);
  margin-bottom: 22px;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow:
    0 10px 30px rgba(31, 35, 40, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.home-bootstrap-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.home-bootstrap-actions .btn-github {
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
}

.home-flow-showcase {
  min-height: calc(100vh - 64px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 40px);
  padding: clamp(48px, 7vh, 82px) 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-flow-showcase-heading {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.home-flow-showcase-heading h2 {
  margin: 0 0 10px;
  color: #172033;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.home-flow-showcase-heading p {
  max-width: 680px;
  margin: 0 auto;
  color: #687386;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.55;
}

.home-flow-showcase .home-flow-core {
  min-height: 280px;
  padding: 28px 24px;
}

.home-flow-showcase .home-flow-core .home-flow-core-logo {
  width: 86px;
  height: 86px;
}

.home-flow-showcase .home-flow-core p {
  max-width: 240px;
  margin-top: 10px;
}

/* Home flow visual refinement */
.home-hero {
  padding-bottom: 16px;
}

.home-hero img {
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
}

.home-hero h1 {
  margin-bottom: 10px;
}

.home-hero p {
  margin-bottom: 14px;
}

.home-badges {
  margin-bottom: 16px;
}

.home-quick-install {
  margin-bottom: 18px;
}

.home-bootstrap-hero .home-bootstrap-logo {
  width: 112px;
  height: 112px;
  margin: 0 auto 26px;
}

.home-bootstrap-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2.85rem, 5.8vw, 4.65rem);
}

.home-bootstrap-hero p {
  margin-bottom: 22px;
}

.home-flow {
  position: relative;
  width: min(100% - 48px, 1180px);
  margin-top: 28px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.home-flow::before {
  content: "";
  position: absolute;
  inset: 8% -5% -10%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(83, 64, 200, 0.1), transparent 34%),
    radial-gradient(
      circle at 50% 60%,
      rgba(19, 210, 234, 0.08),
      transparent 40%
    );
  filter: blur(6px);
}

.home-flow-heading {
  max-width: 680px;
  margin: 0 auto 18px;
}

.home-flow-heading h2 {
  font-size: 18px;
}

.home-flow-heading p {
  font-size: 13px;
}

.home-flow-diagram {
  grid-template-columns:
    minmax(230px, 0.82fr) minmax(64px, 0.24fr) minmax(360px, 1.24fr)
    minmax(64px, 0.24fr) minmax(260px, 0.92fr);
  gap: 0;
}

.home-flow-card {
  min-height: auto;
  padding: 18px;
  border-color: rgba(208, 215, 222, 0.72);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 22px 52px rgba(31, 35, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.home-flow-card:hover {
  transform: translateY(-2px);
  border-color: rgba(83, 64, 200, 0.24);
  box-shadow:
    0 28px 60px rgba(31, 35, 40, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.home-flow-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.home-flow-card-title strong,
.home-flow-card-title small {
  display: block;
}

.home-flow-card-title strong {
  color: #25345d;
  font-size: 15px;
  line-height: 1.25;
}

.home-flow-card-title small {
  margin-top: 2px;
  color: var(--color-fg-muted);
  font-size: 11px;
  line-height: 1.35;
}

.home-flow-card-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #2f80ff;
  background: rgba(47, 128, 255, 0.1);
  font-size: 22px;
}

.home-flow-card-icon.code {
  color: var(--primary);
  background: rgba(83, 64, 200, 0.1);
}

.home-flow-card-icon.success {
  color: #14b87a;
  background: rgba(20, 184, 122, 0.12);
}

.home-flow-storage {
  align-self: center;
}

.home-flow-storage ul {
  grid-template-columns: 1fr;
  gap: 9px;
}

.home-flow-storage li {
  height: 35px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 1px 0 rgba(31, 35, 40, 0.03);
  font-size: 13px;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.home-flow-storage li:hover {
  transform: translateX(2px);
  border-color: rgba(19, 210, 234, 0.38);
  background: linear-gradient(180deg, #ffffff, #f2fbfd);
}

.home-flow-storage li i {
  width: 18px;
  color: #18bfd6;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  opacity: 0.82;
}

.home-flow-connector {
  position: relative;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-flow-connector::before,
.home-flow-connector::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 2px;
  border-top: none;
  background-image: linear-gradient(
    90deg,
    rgba(47, 128, 255, 0) 0,
    rgba(47, 128, 255, 0) 8px,
    rgba(47, 128, 255, 0.45) 8px,
    rgba(47, 128, 255, 0.45) 18px,
    rgba(19, 210, 234, 0.8) 22px,
    rgba(47, 128, 255, 0) 30px
  );
  background-size: 60px 2px;
  animation: flow-line-x 1.25s linear infinite;
}

.home-flow-connector::before {
  left: 0;
  right: 50%;
}

.home-flow-connector::after {
  left: 50%;
  right: 0;
}

.home-flow-connector span {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(208, 215, 222, 0.72);
  border-radius: 999px;
  color: #2f80ff;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 12px 26px rgba(31, 35, 40, 0.08),
    0 0 0 0 rgba(47, 128, 255, 0.22);
  font-size: 26px;
  animation: flow-arrow-pulse 1.45s ease-in-out infinite;
}

.home-flow-connector span i {
  animation: flow-arrow-nudge 1.15s ease-in-out infinite;
}

.home-flow-core {
  min-height: 360px;
  padding: 34px 30px 28px;
  border: none;
  border-radius: 26px;
  background:
    radial-gradient(
      circle at 50% 19%,
      rgba(255, 255, 255, 0.2),
      transparent 23%
    ),
    radial-gradient(
      circle at 22% 12%,
      rgba(19, 210, 234, 0.28),
      transparent 34%
    ),
    linear-gradient(145deg, #1f7df4 0%, #3f66f2 42%, #6436d8 100%);
  box-shadow:
    0 32px 70px rgba(83, 64, 200, 0.32),
    0 10px 26px rgba(19, 210, 234, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.home-flow-core:hover {
  transform: translateY(-3px);
  box-shadow:
    0 38px 78px rgba(83, 64, 200, 0.36),
    0 14px 32px rgba(19, 210, 234, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.home-flow-core::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 18px;
  border-radius: 20px;
  background:
    radial-gradient(
      circle at 50% 15%,
      rgba(255, 255, 255, 0.14),
      transparent 32%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 46%);
}

.home-flow-core::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 38px;
  left: 50%;
  width: 178px;
  height: 150px;
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 50% 42%,
      rgba(255, 255, 255, 0.62) 0%,
      rgba(19, 210, 234, 0.34) 36%,
      rgba(148, 79, 255, 0) 70%
    ),
    radial-gradient(circle at 50% 55%, rgba(83, 64, 200, 0.28), transparent 66%);
  filter: blur(14px);
  opacity: 0.95;
  transform: translateX(-50%);
}

.home-flow-core strong {
  position: relative;
  z-index: 2;
  font-size: 30px;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.home-flow-core em,
.home-flow-core small {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.88);
  font-style: normal;
  line-height: 1.35;
}

.home-flow-core em {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
}

.home-flow-core small {
  font-size: 13px;
}

.home-flow-result {
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.home-flow-io-block {
  padding: 0;
}

.home-flow-io-block + .home-flow-io-block {
  border-top: 1px solid rgba(208, 215, 222, 0.72);
}

.home-flow-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 26px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.home-flow-accordion-toggle > i {
  flex: 0 0 20px;
  width: 20px;
  color: var(--color-fg-muted);
  font-size: 18px;
  text-align: center;
  transition: transform 0.2s ease;
}

.home-flow-io-block.active .home-flow-accordion-toggle > i {
  transform: rotate(180deg);
}

.home-flow-io-block.active .home-flow-accordion-toggle {
  background: linear-gradient(180deg, rgba(246, 248, 250, 0.42), transparent);
}

.home-flow-accordion-panel {
  max-height: 0;
  padding: 0 12px;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition:
    max-height 0.28s ease,
    opacity 0.22s ease,
    padding 0.28s ease,
    transform 0.28s ease;
}

.home-flow-io-block.active .home-flow-accordion-panel {
  max-height: 360px;
  padding: 0 12px 12px;
  opacity: 1;
  transform: translateY(0);
}

.home-flow-result pre {
  max-height: none;
  margin: 0;
  padding: 10px 12px;
  border-color: rgba(208, 215, 222, 0.75);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  font-size: 9px;
  line-height: 1.3;
  white-space: pre-wrap;
  overflow: visible;
  overflow-wrap: anywhere;
}

.home-flow-result .home-flow-card-title {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.home-flow-result .home-flow-card-title strong {
  font-size: 14px;
}

.home-flow-result .home-flow-card-title small {
  font-size: 10px;
}

.home-flow-result code[class*="language-"],
.home-flow-result pre[class*="language-"] {
  color: #25345d;
  text-shadow: none;
}

.home-flow-result .token.keyword,
.home-flow-result .token.boolean {
  color: #7c3aed;
}

.home-flow-result .token.string {
  color: #0a7f56;
}

.home-flow-result .token.function,
.home-flow-result .token.property {
  color: #0969da;
}

.home-flow-result .token.number {
  color: #b42318;
}

.home-flow-result .token.punctuation,
.home-flow-result .token.operator {
  color: #57606a;
}

.home-start {
  width: 100%;
  min-height: calc(100vh - 64px);
  margin-top: 0;
  padding: clamp(36px, 5vh, 56px) 24px;
  color: #172033;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.home-start-header {
  max-width: 820px;
  margin: 0 auto 18px;
  text-align: center;
}

.home-start-header h2 {
  margin: 0 0 10px;
  color: #172033;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.home-start-header p {
  max-width: 760px;
  margin: 0 auto 10px;
  color: #5b6472;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.45;
}

.home-start-header a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #74a7ff;
  font-weight: 800;
  text-decoration: none;
}

.home-start-header a:hover {
  color: #a7c7ff;
  text-decoration: underline;
}

.home-start-grid {
  max-width: 1120px;
  margin: 20px auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3.5vw, 40px);
}

.home-start-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(208, 215, 222, 0.78);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 24px 60px rgba(31, 35, 40, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-start-card > i {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 32px;
}

.home-start-card h3 {
  margin: 0 0 8px;
  color: #172033;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.2;
}

.home-start-card p {
  width: 100%;
  min-height: 44px;
  margin: 0 0 16px;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.55;
}

.home-start-install,
.home-start-code,
.home-start-card pre {
  border: 1px solid rgba(208, 215, 222, 0.82);
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.home-start-install {
  width: min(100%, 430px);
  margin: 0 auto;
}

.home-start-install,
.home-start-code {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.home-start-install code,
.home-start-code code {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #0a7f56;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-start-install .install-action,
.home-start-code .install-action {
  color: var(--color-fg-muted);
}

.home-start-install .install-action:hover,
.home-start-code .install-action:hover {
  color: var(--primary);
  background: rgba(83, 64, 200, 0.08);
}

.home-start-card pre {
  width: 100%;
  min-height: 210px;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  color: #25345d;
  font-size: 10.5px;
  line-height: 1.42;
  text-align: left;
}

.home-start-card pre code {
  color: inherit;
  background: transparent;
  padding: 0;
}

.home-start-card .token.keyword,
.home-start-card .token.boolean {
  color: #7c3aed;
}

.home-start-card .token.string {
  color: #0a7f56;
}

.home-start-card .token.function,
.home-start-card .token.property {
  color: #0969da;
}

.home-start-card .token.number {
  color: #b42318;
}

/* Quick Install Bar */
.home-quick-install {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--color-canvas-subtle);
  border: 1px solid var(--color-border-default);
  padding: 9px 10px 10px 14px;
  border-radius: 8px;
  max-width: min(100%, 420px);
  margin: 0 auto 18px;
  font-family:
    ui-monospace,
    SFMono-Regular,
    SF Mono,
    Menlo,
    monospace;
  white-space: nowrap;
}

.home-quick-install code {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--color-fg-default);
  background: none;
  padding: 0;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-action {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--color-fg-muted);
  cursor: pointer;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.install-action:hover {
  background-color: rgba(175, 184, 193, 0.2);
  color: var(--primary);
}

.npm-link {
  font-size: 18px;
}

.copy-btn.copied {
  color: #2da44e;
}

.home-flow-core .home-flow-core-logo {
  position: relative;
  z-index: 3;
  width: 104px;
  height: 104px;
  margin: -2px 0 8px;
  border-radius: 20px;
  object-fit: contain;
  filter: drop-shadow(0 20px 24px rgba(31, 35, 40, 0.26))
    drop-shadow(0 0 26px rgba(255, 255, 255, 0.46))
    drop-shadow(0 0 34px rgba(19, 210, 234, 0.28));
  box-shadow: none;
}

.home-flow-core p {
  position: relative;
  z-index: 2;
  max-width: 310px;
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.home-flow-badges {
  position: relative;
  z-index: 2;
  margin: 14px auto 0;
  gap: 6px;
}

.home-flow-badges img {
  width: auto;
  height: 20px;
  margin: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
}

.home-flow-install {
  position: relative;
  z-index: 2;
  width: min(100%, 390px);
  margin: 16px auto 0;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.home-flow-install code,
.home-flow-install .install-action {
  color: #fff;
}

.home-flow-install code {
  font-size: 12px;
  text-overflow: clip;
}

.home-flow-install .install-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.home-flow-core-cta {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  padding: 9px 22px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px rgba(31, 35, 40, 0.14);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.home-flow-core-cta:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 14px 28px rgba(31, 35, 40, 0.16);
}

.home-flow-actions {
  margin-top: 18px;
}

/* Footer Sticky at Bottom */
.site-footer {
  width: 100%;
  max-width: 1012px;
  margin: 40px auto 0;
  padding: 24px 16px 20px;
  border-top: 1px solid var(--color-border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-fg-muted);
  font-size: 12px;
  background-color: transparent;
}

.home-mode .site-footer {
  border-top: none;
  margin-top: auto; /* Push to bottom of flex container if needed */
  padding-bottom: 20px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.footer-brand img {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.footer-brand span {
  min-width: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-link {
  color: var(--color-accent-fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.footer-link i {
  font-size: 14px;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: none;
  background: rgba(83, 64, 200, 0.06);
  border-color: rgba(83, 64, 200, 0.12);
}

.footer-link-credit {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.footer-link-credit:hover {
  text-decoration: underline;
}

/* Antigravity Interactive Background */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Above background but below content */
  pointer-events: none;
  display: none;
}

.home-mode #bg-canvas {
  display: block;
}

.floating-icon {
  position: absolute;
  opacity: 0.24;
  color: #78909c;
  pointer-events: none;
  filter: none;
}

@keyframes flow-line-x {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 60px 0;
  }
}

@keyframes flow-line-y {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 0 60px;
  }
}

@keyframes flow-arrow-pulse {
  0%,
  100% {
    box-shadow:
      0 12px 26px rgba(31, 35, 40, 0.08),
      0 0 0 0 rgba(47, 128, 255, 0.22);
    transform: scale(1);
  }
  45% {
    box-shadow:
      0 14px 30px rgba(31, 35, 40, 0.1),
      0 0 0 10px rgba(47, 128, 255, 0);
    transform: scale(1.04);
  }
}

@keyframes flow-arrow-nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes flow-arrow-nudge-y {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-flow-connector::before,
  .home-flow-connector::after,
  .home-flow-connector span,
  .home-flow-connector span i {
    animation: none;
  }

  .home-flow-accordion-panel,
  .home-flow-accordion-toggle > i {
    transition: none;
  }
}

@media (max-width: 1180px) {
  .home-flow {
    width: min(100% - 32px, 720px);
  }

  .home-flow-diagram {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-flow-card {
    min-height: auto;
  }

  .home-flow-connector {
    min-height: 46px;
  }

  .home-flow-connector::before,
  .home-flow-connector::after {
    left: 50%;
    right: auto;
    width: 2px;
    height: 50%;
    border-top: none;
    border-left: none;
    background-image: linear-gradient(
      180deg,
      rgba(47, 128, 255, 0) 0,
      rgba(47, 128, 255, 0) 8px,
      rgba(47, 128, 255, 0.45) 8px,
      rgba(47, 128, 255, 0.45) 18px,
      rgba(19, 210, 234, 0.8) 22px,
      rgba(47, 128, 255, 0) 30px
    );
    background-size: 2px 60px;
    animation-name: flow-line-y;
  }

  .home-flow-connector::before {
    top: 0;
  }

  .home-flow-connector::after {
    top: 50%;
  }

  .home-flow-connector span {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .home-flow-connector span i {
    animation-name: flow-arrow-nudge-y;
  }

  .home-flow-connector span i::before {
    content: "\ea4e";
  }

  .home-flow-core {
    min-height: auto;
    padding: 28px 22px;
  }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  html.home-mode-root {
    scroll-padding-top: 96px;
  }

  body.home-mode {
    overflow-y: auto; /* Allow scroll on small home screens */
  }

  body {
    padding-top: 96px;
  }

  .header {
    min-height: 96px;
    padding: 10px 16px 12px;
    justify-content: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .header-brand {
    min-width: 0;
    height: 32px;
  }

  .header-brand img {
    width: 30px;
    height: 30px;
  }

  .header-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .header-nav {
    display: flex;
    position: static;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .header-link {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 28px;
    padding: 0 2px;
  }

  .lang-switcher {
    flex: 0 0 auto;
    margin-right: 2px;
    justify-content: flex-start;
    gap: 3px;
    padding: 3px;
  }

  .lang-btn {
    height: 26px;
    min-width: 36px;
    padding: 0 8px;
    line-height: 1;
  }

  .container-main {
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: auto !important;
  }

  #sidebar {
    display: block;
    width: min(86vw, 340px);
    height: auto;
    max-height: none;
    border-right: 1px solid var(--color-border-default);
    border-bottom: none;
    position: fixed;
    top: 96px;
    bottom: 0;
    left: 0;
    z-index: 999;
    background: var(--color-canvas-default);
    padding: 20px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 18px 0 40px rgba(31, 35, 40, 0.16);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
  }

  #sidebar.active,
  .docs-mode #sidebar.active,
  .home-mode #sidebar.active {
    transform: translateX(0);
  }

  #content-wrapper,
  .docs-mode #content-wrapper {
    flex: none;
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: 0;
    padding: 24px 16px;
  }

  .docs-mode #page-toc {
    display: none;
  }

  .markdown-body {
    width: 100%;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .markdown-body h1 {
    font-size: 1.75em;
    line-height: 1.25;
  }

  .markdown-body h2 {
    font-size: 1.35em;
    line-height: 1.3;
  }

  .markdown-body table,
  .markdown-body pre {
    max-width: 100%;
  }

  .markdown-body table {
    width: 100%;
  }

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

  .home-mode .container-main {
    min-height: calc(100vh - 96px);
  }

  .home-mode #content-wrapper {
    padding: 20px 0;
  }

  .home-hero h1 {
    font-size: 32px;
  }

  .home-bootstrap-home {
    padding-top: 0;
  }

  .home-bootstrap-hero {
    min-height: calc(100vh - 96px);
    padding: 28px 0;
  }

  .home-flow-showcase {
    min-height: calc(100vh - 96px);
    padding: 32px 0;
    gap: 24px;
  }

  .home-flow-showcase-heading h2 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }

  .home-flow-showcase-heading p {
    font-size: 15px;
  }

  .home-bootstrap-hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.4rem);
    line-height: 1;
  }

  .home-bootstrap-hero p {
    font-size: 16px;
  }

  .home-bootstrap-logo,
  .home-bootstrap-hero .home-bootstrap-logo {
    width: 88px;
    height: 88px;
    margin-bottom: 22px;
  }

  .home-bootstrap-install {
    width: calc(100% - 16px);
  }

  .home-bootstrap-actions .btn-github {
    width: 100%;
    max-width: 320px;
    padding: 12px;
  }

  .home-start {
    min-height: calc(100vh - 96px);
    padding: 56px 16px;
  }

  .home-start-grid {
    grid-template-columns: 1fr;
  }

  .home-start-code code {
    font-size: 12px;
  }

  .home-start-card p {
    min-height: 0;
  }

  .home-start-card pre {
    min-height: auto;
    font-size: 11px;
  }

  .home-hero p {
    font-size: 16px;
  }

  .home-badges {
    gap: 6px;
    padding: 0 12px;
  }

  .home-quick-install {
    width: calc(100% - 32px);
    max-width: 100%;
  }

  .home-hero-btns {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 8px;
  }

  .home-flow {
    width: calc(100% - 32px);
    margin-top: 32px;
    padding: 16px;
    border-radius: 18px;
  }

  .home-flow-heading h2 {
    font-size: 18px;
  }

  .home-flow-heading p {
    font-size: 13px;
  }

  .home-flow-diagram {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-flow-storage ul {
    grid-template-columns: 1fr;
  }

  .home-flow-connector span {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .home-flow-core {
    min-height: auto;
    padding: 24px 16px;
  }

  .home-flow-core .home-flow-core-logo {
    width: 84px;
    height: 84px;
  }

  .home-flow-core p {
    font-size: 12px;
  }

  .home-flow-install {
    width: 100%;
  }

  .home-flow-core strong {
    font-size: 24px;
  }

  .home-flow-accordion-toggle {
    padding: 12px 20px;
  }

  .home-flow-result pre {
    max-height: none;
    font-size: 9px;
  }

  .home-hero-btns .btn-github {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .site-footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 24px 16px;
    position: static;
    transform: none;
  }

  .home-mode .site-footer {
    position: static;
    transform: none;
    margin-top: 40px;
  }

  .footer-brand {
    justify-content: center;
    flex-direction: column;
  }

  .footer-links {
    justify-content: center;
  }
}
