/*
 * Zett Agent documentation theme.
 *
 * Identity: forged steel and ember. Neutral charcoal surfaces carry the
 * reading experience; one amber accent marks what is interactive or hot.
 * Built on pydata-sphinx-theme variables so the theme keeps working.
 */

html {
  --pst-font-size-base: 16px;
  --pst-font-family-base:
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pst-font-family-heading: var(--pst-font-family-base);
  --pst-font-family-monospace-system:
    "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  --pst-font-family-monospace: var(--pst-font-family-monospace-system);
  --bs-font-monospace: var(--pst-font-family-monospace-system);
  --zett-radius: 0.75rem;
  --zett-radius-small: 0.5rem;
  --pst-header-height: 3.75rem;
  scroll-padding-top: 5rem;
}

html[data-theme="light"] {
  --pst-color-primary: #b45309;
  --pst-color-primary-text: #fff;
  --pst-color-primary-highlight: #92400e;
  --pst-color-primary-highlight-text: #fff;
  --pst-color-secondary: #b45309;
  --pst-color-secondary-text: #fff;
  --pst-color-secondary-highlight: #92400e;
  --pst-color-secondary-highlight-text: #fff;
  --pst-color-link: #b45309;
  --pst-color-link-hover: #92400e;
  --pst-color-text-base: #14171c;
  --pst-color-text-muted: #5b6472;
  --pst-color-background: #fff;
  --pst-color-on-background: #fff;
  --pst-color-surface: #f6f7f9;
  --pst-color-on-surface: #eceff3;
  --pst-color-border: #e3e6eb;
  --pst-color-inline-code: #92400e;
  --pst-color-target: #fff3e0;
  --zett-surface: #f6f7f9;
  --zett-surface-border: #e3e6eb;
  --zett-hero-surface: #fff7ed;
  --zett-code-surface: #fafbfc;
  --zett-accent: #b45309;
  --zett-ember: #f59e0b;
  --zett-glow: rgb(245 158 11 / 14%);
  --zett-gradient: linear-gradient(100deg, #c2410c, #d97706 70%);
  --sd-color-primary-bg: #fff3e0;
  --sd-color-primary-bg-text: #14171c;
  --zett-shadow: 0 1px 2px rgb(16 24 40 / 4%), 0 12px 32px rgb(16 24 40 / 6%);
}

html[data-theme="dark"] {
  --pst-color-primary: #fbbf24;
  --pst-color-primary-text: #1a1203;
  --pst-color-primary-highlight: #fcd34d;
  --pst-color-primary-highlight-text: #1a1203;
  --pst-color-secondary: #fbbf24;
  --pst-color-secondary-text: #1a1203;
  --pst-color-secondary-highlight: #fcd34d;
  --pst-color-secondary-highlight-text: #1a1203;
  --pst-color-link: #fbbf24;
  --pst-color-link-hover: #fde68a;
  --pst-color-text-base: #e8ecf1;
  --pst-color-text-muted: #9aa5b4;
  --pst-color-background: #0d1014;
  --pst-color-on-background: #12161b;
  --pst-color-surface: #151a21;
  --pst-color-on-surface: #1d242d;
  --pst-color-border: #262e39;
  --pst-color-inline-code: #fbbf24;
  --pst-color-target: #2a2110;
  --zett-surface: #12161b;
  --zett-surface-border: #262e39;
  --zett-hero-surface: #17140d;
  --zett-code-surface: #0f1318;
  --zett-accent: #fbbf24;
  --zett-ember: #f59e0b;
  --zett-glow: rgb(245 158 11 / 12%);
  --zett-gradient: linear-gradient(100deg, #fb923c, #fbbf24 70%);
  --sd-color-primary-bg: #2a2110;
  --sd-color-primary-bg-text: #e8ecf1;
  --zett-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px rgb(0 0 0 / 35%);
}

::selection {
  background: var(--zett-glow);
}

/* ---- Layout ------------------------------------------------------------ */

.bd-page-width {
  max-width: 96rem;
}
.bd-main .bd-content .bd-article-container {
  max-width: 64rem;
}
.bd-main .bd-content .bd-article-container:has(.zett-landing) {
  max-width: 78rem;
}
.bd-article {
  padding: 1.5rem 2.25rem 3rem;
  line-height: 1.7;
}
.bd-sidebar-primary {
  width: 16.5rem;
  flex: 0 0 16.5rem;
  padding: 1.25rem 1rem;
  background: var(--pst-color-background);
  border-right: 1px solid var(--zett-surface-border);
}
.bd-sidebar-secondary {
  font-size: 0.82rem;
}

/* Right-hand table of contents: one tidy column that scrolls on its own. */
.bd-sidebar-secondary .sidebar-secondary-items {
  max-height: calc(100vh - var(--pst-header-height) - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--zett-surface-border) transparent;
}
.bd-sidebar-secondary .page-toc.tocsection {
  margin-bottom: 0.5rem;
  color: var(--pst-color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bd-sidebar-secondary .page-toc .fa-list {
  display: none;
}
.page-toc .nav-link {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  padding: 0.28rem 0.75rem;
  border-left: 2px solid transparent;
  color: var(--pst-color-text-muted);
  line-height: 1.4;
}
.page-toc .nav-link:hover {
  color: var(--pst-color-text-base);
}
.page-toc .nav-link.active {
  border-left-color: var(--zett-ember);
  background: var(--zett-glow);
  color: var(--pst-color-text-base);
  font-weight: 600;
}
.page-toc ul ul .nav-link {
  padding-left: 1.5rem;
}
.page-toc .nav-link code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 0.78rem;
}
.page-toc ul,
.page-toc li {
  min-width: 0;
}
/* A wrapping column sizes itself to its widest entry; keep it the column's width. */
.page-toc ul.nav {
  flex-wrap: nowrap;
}
/* API names are identifiers: keep each on one line and clip with an ellipsis. */
.page-toc .nav-link:has(code) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-toc .nav-link code,
.page-toc .nav-link .pre {
  font-weight: 500;
}
.page-toc .nav-link.active code,
.page-toc .nav-link.active .pre {
  font-weight: 650;
}

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

.bd-header {
  border-bottom: 1px solid var(--zett-surface-border);
  background: color-mix(in srgb, var(--pst-color-background) 86%, transparent);
  box-shadow: none;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.navbar-brand.logo {
  gap: 0.7rem;
}
.navbar-brand img.logo__image {
  width: 2rem;
  height: 2rem;
}
.navbar-brand p.logo__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.bd-header .navbar-nav {
  gap: 0.15rem;
  font-size: 0.88rem;
}
.bd-header .navbar-nav > li > a.nav-link {
  padding: 0.4rem 0.7rem;
  border-radius: var(--zett-radius-small);
  color: var(--pst-color-text-muted);
  font-weight: 500;
}
.bd-header .navbar-nav > li > a.nav-link:hover,
.bd-header .navbar-nav > li.current > a.nav-link {
  color: var(--pst-color-text-base);
  background: var(--pst-color-surface);
}
.bd-header .navbar-nav > li.current > a.nav-link {
  box-shadow: inset 0 -2px var(--zett-ember);
  border-radius: var(--zett-radius-small) var(--zett-radius-small) 0 0;
}
.bd-header .search-button__button {
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--zett-surface);
  color: var(--pst-color-text-muted);
  font-size: 0.84rem;
}
.bd-header .search-button__button:hover {
  border-color: var(--zett-ember);
}
@media (min-width: 992px) {
  .bd-header .search-button__button {
    width: 14rem;
  }
}

.zett-language-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: 0;
  color: var(--pst-color-text-muted);
  font-size: 0.85rem;
}
.zett-language-button:hover,
.zett-language-button.show {
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
}
.zett-language-menu {
  min-width: 9rem;
  padding: 0.35rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--pst-color-background);
  box-shadow: var(--zett-shadow);
  font-size: 0.86rem;
}
.zett-language-menu .dropdown-item {
  padding: 0.4rem 0.7rem;
  border-radius: 0.35rem;
  color: var(--pst-color-text-muted);
}
.zett-language-menu .dropdown-item:hover {
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
}
.zett-language-menu .dropdown-item.active {
  background: var(--zett-glow);
  color: var(--pst-color-text-base);
  font-weight: 600;
}

/* ---- Sidebar navigation ------------------------------------------------ */

.zett-navigation {
  font-size: 0.875rem;
  line-height: 1.4;
  padding-bottom: 2rem;
}
.zett-navigation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}
.zett-navigation .zett-docs-home {
  color: var(--pst-color-text-base);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}
.zett-version {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: 999px;
  background: var(--zett-surface);
  color: var(--pst-color-text-muted);
  font-family: var(--pst-font-family-monospace);
  font-size: 0.7rem;
}
.zett-navigation ul,
.zett-navigation ul.nav {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}
.zett-navigation li {
  position: relative;
  margin: 0;
}
.zett-navigation a.reference {
  display: block;
  color: var(--pst-color-text-muted);
  text-decoration: none;
}
.zett-navigation a.reference:hover {
  color: var(--pst-color-text-base);
}

/* Top-level sections: bold rows that fold open. */
.zett-navigation .toctree-l1 {
  margin-bottom: 0.15rem;
}
.zett-navigation .toctree-l1 > a.reference {
  padding: 0.45rem 2rem 0.45rem 0.6rem;
  border-radius: var(--zett-radius-small);
  color: var(--pst-color-text-base);
  font-weight: 600;
}
.zett-navigation .toctree-l1 > a.reference:hover {
  background: var(--pst-color-surface);
}
.zett-navigation .toctree-l1.current > a.reference {
  color: var(--pst-color-text-base);
}
.zett-navigation .toctree-l1 > details {
  display: block;
}
.zett-navigation summary {
  position: absolute;
  top: 0.3rem;
  right: 0.1rem;
  width: 1.9rem;
  height: 1.9rem;
  list-style: none;
  cursor: pointer;
}
.zett-navigation summary::-webkit-details-marker {
  display: none;
}
.zett-navigation summary .toctree-toggle {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: var(--zett-radius-small);
  color: var(--pst-color-text-muted);
}
.zett-navigation summary:hover .toctree-toggle {
  background: var(--pst-color-surface);
  color: var(--pst-color-text-base);
}
.zett-navigation summary .toctree-toggle i {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}
.zett-navigation details:not([open]) > summary .toctree-toggle i {
  transform: rotate(-90deg);
}

/* Pages inside a section: small group headings, indented rows, one filled
 * pill for the current page. No guide line, so rows read as a list. */
.zett-navigation details > ul {
  margin: 0.15rem 0 0.75rem;
  padding-left: 0.35rem;
}
.zett-navigation .zett-group-heading {
  margin: 1rem 0 0.25rem;
  padding: 0 0.7rem;
  color: var(--pst-color-text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.85;
  pointer-events: none;
}
.zett-navigation details > ul > .zett-group-heading:first-child {
  margin-top: 0.4rem;
}
.zett-navigation .toctree-l2 > a.reference {
  padding: 0.32rem 0.7rem;
  border-radius: var(--zett-radius-small);
}
.zett-navigation .toctree-l2 > a.reference:hover {
  background: var(--pst-color-surface);
}
.zett-navigation .toctree-l2.current > a.reference {
  background: var(--zett-glow);
  color: var(--zett-accent);
  font-weight: 600;
}
html[data-theme="dark"] .zett-navigation .toctree-l2.current > a.reference {
  color: var(--pst-color-text-base);
}

/* ---- Reading typography ------------------------------------------------ */

a {
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
h1,
h2,
h3,
h4 {
  color: var(--pst-color-text-base);
  letter-spacing: -0.02em;
}
.bd-article h1 {
  margin-bottom: 1.25rem;
  font-size: 2.3rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.bd-article h2 {
  margin-top: 3rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--zett-surface-border);
  font-size: 1.5rem;
  font-weight: 700;
}
.bd-article h3 {
  margin-top: 2rem;
  font-size: 1.15rem;
  font-weight: 650;
}
.bd-breadcrumbs {
  font-size: 0.8rem;
}

/* ---- Code, tables, admonitions ----------------------------------------- */

div.highlight {
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--zett-code-surface);
}
div.highlight pre {
  padding: 1rem 1.1rem;
  font-size: 0.82rem;
  line-height: 1.7;
}
code.literal {
  padding: 0.1em 0.38em;
  border: 1px solid var(--zett-surface-border);
  border-radius: 0.3rem;
  background: var(--zett-surface);
  font-size: 0.86em;
}
.bd-article table {
  font-size: 0.87rem;
  line-height: 1.6;
}
table.docutils thead th {
  background: var(--zett-surface);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.bd-article table.docutils td,
.bd-article table.docutils th {
  padding: 0.7rem 0.85rem;
  border-color: var(--zett-surface-border);
}
div.admonition,
.admonition {
  border: 1px solid var(--zett-surface-border);
  border-left-width: 4px;
  border-radius: var(--zett-radius-small);
  background: var(--zett-surface);
  box-shadow: none;
  font-size: 0.92rem;
}
div.admonition > .admonition-title,
.admonition > .admonition-title {
  background: transparent;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mermaid-container {
  margin: 1.25rem 0 1.75rem;
}
pre.mermaid {
  padding: 1rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--zett-code-surface);
}
pre.mermaid > svg {
  height: auto !important;
  min-height: 12rem;
}
/* The theme inverts diagrams in dark mode; pin an explicit palette instead. */
html[data-theme="dark"] pre.mermaid svg,
html[data-theme="dark"] .mermaid-container svg {
  filter: none !important;
}
html[data-theme="dark"] pre.mermaid .node rect,
html[data-theme="dark"] pre.mermaid .node polygon,
html[data-theme="dark"] pre.mermaid .node circle,
html[data-theme="dark"] pre.mermaid .node path {
  fill: #1d242d !important;
  stroke: var(--zett-ember) !important;
}
html[data-theme="dark"] pre.mermaid .cluster rect {
  fill: #12161b !important;
  stroke: var(--zett-surface-border) !important;
}
html[data-theme="dark"] pre.mermaid .edgeLabel,
html[data-theme="dark"] pre.mermaid .edgeLabel rect,
html[data-theme="dark"] pre.mermaid .labelBkg {
  background-color: #151a21 !important;
  fill: #151a21 !important;
  opacity: 1;
}
html[data-theme="dark"] pre.mermaid .nodeLabel,
html[data-theme="dark"] pre.mermaid .edgeLabel,
html[data-theme="dark"] pre.mermaid text {
  color: var(--pst-color-text-base) !important;
  fill: var(--pst-color-text-base) !important;
}
html[data-theme="dark"] pre.mermaid .flowchart-link,
html[data-theme="dark"] pre.mermaid .edgePath path {
  stroke: #8a96a6 !important;
}
html[data-theme="dark"] pre.mermaid marker path,
html[data-theme="dark"] pre.mermaid .arrowMarkerPath {
  fill: #8a96a6 !important;
  stroke: #8a96a6 !important;
}

/* ---- API reference ----------------------------------------------------- */

dl.py {
  margin-bottom: 1.75rem;
}
dl.py > dt {
  overflow-wrap: anywhere;
  font-family: var(--pst-font-family-monospace);
  font-size: 0.88rem;
  line-height: 1.65;
}
dl.py.class > dt,
dl.py.function > dt,
dl.py.exception > dt,
dl.py.data > dt {
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--zett-surface-border);
  border-left: 3px solid var(--zett-ember);
  border-radius: var(--zett-radius-small);
  background: var(--zett-surface);
}
dl.py.method > dt,
dl.py.attribute > dt,
dl.py.property > dt {
  padding: 0.9rem 0 0.35rem;
  border-top: 1px solid var(--zett-surface-border);
}
dl.py > dt .sig-name,
dl.py > dt .descname {
  color: var(--pst-color-text-base);
  font-weight: 700;
}
dl.py > dt .sig-prename,
dl.py > dt em.property {
  color: var(--pst-color-text-muted);
  font-style: normal;
}
dl.py > dd {
  margin-left: 1.25rem;
}
dl.field-list > dt {
  color: var(--pst-color-text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Landing: hero ----------------------------------------------------- */

.zett-landing {
  position: relative;
}
.zett-landing > h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.zett-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2.5rem;
  padding: 1.5rem 0 3.25rem;
}
.zett-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2rem 0 auto 0;
  height: 26rem;
  background: linear-gradient(180deg, var(--zett-glow), transparent);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}
.zett-hero-identity p {
  margin: 0;
}
.zett-hero-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
}
.zett-hero-identity img {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.8rem;
  box-shadow: var(--zett-shadow);
}
.zett-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.75rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: 999px;
  background: var(--zett-surface);
  color: var(--pst-color-text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
}
.zett-hero-identity .zett-hero-badge a,
.zett-hero-badge a {
  color: inherit;
  text-decoration: none;
}
.zett-hero-badge::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--zett-ember);
  box-shadow: 0 0 0 3px var(--zett-glow);
}
.zett-hero-badge:hover {
  border-color: var(--zett-ember);
  color: var(--pst-color-text-base);
}
.zett-hero-title {
  margin: 0 0 1.25rem;
  color: var(--pst-color-text-base);
  font-size: clamp(2.2rem, 3.6vw, 3.3rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.06;
}
.zett-hero-title strong {
  display: block;
  font-weight: inherit;
  background: var(--zett-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--zett-accent);
  -webkit-text-fill-color: transparent;
}
.zett-hero-copy > p:not(.zett-hero-title) {
  max-width: 35rem;
  color: var(--pst-color-text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}
.zett-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.75rem 0 1.4rem;
}
.zett-actions p {
  margin: 0;
}
/* Plain links drawn as buttons: the first is the primary action. */
.zett-actions a {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--pst-color-background);
  color: var(--pst-color-text-base);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
.zett-actions a:hover {
  border-color: var(--zett-ember);
  transform: translateY(-1px);
}
.zett-actions p:first-child a {
  border-color: var(--pst-color-primary);
  background: var(--pst-color-primary);
  color: var(--pst-color-primary-text);
}
.zett-actions p:first-child a:hover {
  border-color: var(--pst-color-primary-highlight);
  background: var(--pst-color-primary-highlight);
}
.zett-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--pst-color-text-muted);
  font-size: 0.78rem;
}
.zett-hero-meta a {
  color: inherit;
}

/* The hero code card is the product in one glance. */
.zett-hero-example {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius);
  background: var(--zett-code-surface);
  box-shadow: var(--zett-shadow);
}
.zett-code-caption {
  margin: 0;
  list-style: none;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--zett-surface-border);
  background: var(--zett-surface);
  color: var(--pst-color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.zett-code-caption li {
  margin: 0;
}
.zett-code-caption li:last-child {
  text-transform: none;
  font-family: var(--pst-font-family-monospace);
  font-weight: 400;
  letter-spacing: 0;
}
.zett-hero-example .zett-code-caption + div.highlight-python,
.zett-hero-example div.highlight {
  margin: 0;
}
.zett-hero-example div.highlight {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.zett-hero-example div.highlight pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  font-size: 0.76rem;
  line-height: 1.8;
}
.zett-hero-example .zett-code-caption:not(:first-child) {
  border-top: 1px solid var(--zett-surface-border);
}
.zett-hero-example .zett-code-note {
  max-width: none;
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-top: 1px solid var(--zett-surface-border);
  background: var(--zett-hero-surface);
  color: var(--pst-color-text-muted);
  font-size: 0.76rem;
  line-height: 1.6;
}
.zett-hero-example .zett-code-note p {
  margin: 0;
}

.zett-install {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}
.bd-content .sd-tab-set > input + label {
  padding: 0.45rem 0.9rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--pst-color-text-muted);
  opacity: 1;
  font-size: 0.84rem;
}
.bd-content .sd-tab-set > input:checked + label {
  border: 0;
  border-bottom: 2px solid var(--zett-ember);
  background: transparent;
  color: var(--pst-color-text-base);
  transform: none;
}
.bd-content .sd-tab-set .sd-tab-content {
  padding: 0.65rem 0 0;
  border: 0;
  box-shadow: none;
}
.zett-install .highlight {
  margin-bottom: 0;
}

/* ---- Landing: sections ------------------------------------------------- */

.zett-landing > section {
  margin-top: 3.5rem;
}
.zett-landing > section > h2 {
  padding: 0;
  border: 0;
  font-size: 1.75rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.zett-landing > section > p {
  max-width: 44rem;
  color: var(--pst-color-text-muted);
  font-size: 1rem;
}

.bd-article .sd-card {
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius);
  background: var(--pst-color-background);
  box-shadow: none !important;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.bd-article .sd-card-body {
  padding: 1.35rem;
  font-size: 0.9rem;
}
.sd-card-title {
  color: var(--pst-color-text-base);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.sd-card-text {
  color: var(--pst-color-text-muted);
  line-height: 1.7;
}
.bd-article .sd-card-hover:hover {
  border-color: var(--zett-ember);
  box-shadow: var(--zett-shadow) !important;
  transform: translateY(-2px);
}

/* The JIT harness loop: forge, reuse, inspect. */
.zett-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
  counter-reset: zett-step;
}
.bd-article .zett-step {
  position: relative;
  padding: 1.35rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius);
  background: var(--zett-surface);
  font-size: 0.9rem;
  counter-increment: zett-step;
}
.zett-step::before {
  content: counter(zett-step);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: var(--zett-gradient);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
html[data-theme="dark"] .zett-step::before {
  color: #1a1203;
}
.zett-step strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--pst-color-text-base);
  font-size: 1rem;
}
.zett-step p {
  margin: 0;
  color: var(--pst-color-text-muted);
}
.zett-step code.literal {
  font-size: 0.78rem;
}
.zett-steps + p {
  margin-top: 1.4rem;
}
.bd-article .sd-container-fluid {
  padding-right: 0;
  padding-left: 0;
}

.zett-paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.bd-article .zett-path {
  padding: 1.35rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius);
  background: var(--zett-surface);
  font-size: 0.9rem;
}
.zett-path p:last-child {
  margin-bottom: 0;
}
.zett-path strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--pst-color-text-base);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zett-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  list-style: none;
  padding: 1.5rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius);
  margin: 1.25rem 0;
  background: var(--zett-surface);
}
.zett-flow > li {
  position: relative;
  margin: 0 1.5rem 0 0;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--zett-surface-border);
  border-radius: var(--zett-radius-small);
  background: var(--pst-color-background);
  color: var(--pst-color-text-base);
  font-size: 0.83rem;
  font-weight: 550;
}
.zett-flow > li:last-child {
  margin-right: 0;
}
.zett-flow > li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -1.35rem;
  transform: translateY(-50%);
  color: var(--zett-ember);
  font-weight: 400;
}
.zett-flow > li:nth-child(3)::after {
  content: "↺";
}
.zett-flow > li:nth-child(3) {
  border-color: var(--zett-ember);
  background: var(--zett-glow);
}

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

.bd-footer {
  border-top: 1px solid var(--zett-surface-border);
}
.bd-footer .footer-items__start {
  width: 100%;
}
.zett-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  width: 100%;
  padding: 0.6rem 0;
  color: var(--pst-color-text-muted);
  font-size: 0.8rem;
}
.zett-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.zett-footer-brand img {
  border-radius: 0.35rem;
}
.zett-footer-brand strong {
  color: var(--pst-color-text-base);
}
.zett-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
}
.zett-footer a {
  color: inherit;
  text-decoration: none;
}
.zett-footer a:hover {
  color: var(--zett-accent);
  text-decoration: underline;
}
.zett-footer-separator {
  margin: 0 0.4rem;
  opacity: 0.5;
}

/* ---- Interaction ------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
.bd-content .sd-tab-set > input:focus-visible + label {
  outline: 2px solid var(--zett-ember);
  outline-offset: 3px;
}

@keyframes zett-rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}
.zett-hero-copy > *,
.zett-hero-example {
  animation: zett-rise 0.5s ease both;
}
.zett-hero-copy > :nth-child(2) {
  animation-delay: 0.05s;
}
.zett-hero-copy > :nth-child(3) {
  animation-delay: 0.1s;
}
.zett-hero-copy > :nth-child(4) {
  animation-delay: 0.15s;
}
.zett-hero-example {
  animation-delay: 0.12s;
}

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

@media (max-width: 1199px) {
  .zett-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .zett-hero-example {
    max-width: 40rem;
  }
}

@media (max-width: 991px) {
  .zett-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .bd-article {
    padding: 1rem 0.75rem 2rem;
  }
  .bd-article h1 {
    font-size: 1.9rem;
  }
  .zett-hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  .zett-paths {
    grid-template-columns: 1fr;
  }
  .zett-hero-example div.highlight pre {
    padding: 0.85rem;
    font-size: 0.7rem;
  }
  .zett-code-caption,
  .zett-code-note {
    padding: 0.7rem 0.85rem;
  }
  .zett-flow {
    padding: 1rem;
  }
  .zett-footer {
    padding: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Chinese typography ------------------------------------------------ */

/* Negative tracking tuned for Latin letters crowds ideographs, and the hero
 * emphasis reads as one sentence in Chinese instead of a second line. */
html[lang|="zh"] {
  --pst-font-family-base:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --pst-font-family-heading: var(--pst-font-family-base);
}
html[lang|="zh"] h1,
html[lang|="zh"] h2,
html[lang|="zh"] h3,
html[lang|="zh"] h4,
html[lang|="zh"] .zett-hero-title,
html[lang|="zh"] .sd-card-title,
html[lang|="zh"] .navbar-brand p.logo__title {
  letter-spacing: 0;
}
html[lang|="zh"] .bd-article p.zett-hero-title {
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  line-height: 1.3;
}
html[lang|="zh"] .zett-hero-title strong {
  display: inline;
}
html[lang|="zh"] .zett-group-heading {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}
html[lang|="zh"] .zett-navigation > div > ul > li > a,
html[lang|="zh"] .bd-article {
  letter-spacing: 0;
}
html[lang|="zh"] .bd-article p,
html[lang|="zh"] .bd-article li {
  line-height: 1.85;
}
