:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172a32;
  background: #f7faf8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --forest: #0b3d2e;
  --green: #086348;
  --mint: #e8f5ef;
  --line: #e4ebe7;
  --muted: #64736d;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
a:hover { color: var(--forest); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: .75rem;
  left: .75rem;
  padding: .7rem 1rem;
  transform: translateY(-180%);
  border-radius: .6rem;
  background: white;
  color: var(--forest);
}
.skip-link:focus { transform: translateY(0); }
.docs-app { min-height: 100vh; }
.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--forest);
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--forest);
  color: #fff;
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: .81rem; letter-spacing: .045em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: .72rem; }
.topbar-actions { display: flex; align-items: center; gap: 1.25rem; }
.portal-link { font-size: .85rem; font-weight: 650; text-decoration: none; }
.menu-toggle { display: none; }
.docs-layout {
  display: grid;
  min-height: calc(100vh - 68px);
  grid-template-columns: 280px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  height: calc(100vh - 68px);
  flex-direction: column;
  overflow-y: auto;
  padding: 1.5rem 1rem 1rem;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}
.search-form { position: relative; margin: 0 .4rem 1.35rem; }
.search-form > label { display: block; margin: 0 0 .5rem; color: #394b44; font-size: .75rem; font-weight: 750; }
.search-box {
  display: flex;
  height: 40px;
  align-items: center;
  gap: .5rem;
  padding: 0 .6rem;
  border: 1px solid #dfe8e3;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.search-box:focus-within { border-color: #54a78a; box-shadow: 0 0 0 3px rgba(16, 185, 129, .12); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--forest); font-size: .8rem; }
.search-box kbd { min-width: 20px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: #f8faf9; text-align: center; font-size: .68rem; }
.search-status { position: relative; z-index: 2; margin: .25rem 0 0; color: var(--muted); font-size: .73rem; }
.search-results { position: absolute; top: 4.2rem; right: 0; left: 0; max-height: 55vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 12px 30px #0b3d2e18; }
.search-result { display: block; width: 100%; padding: .7rem .75rem; border: 0; border-bottom: 1px solid #edf1ee; background: #fff; color: var(--forest); text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus-visible { background: #f1f8f4; }
.search-result strong, .search-result span { display: block; }
.search-result strong { font-size: .78rem; }
.search-result span { margin-top: .2rem; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.navigation { padding-bottom: 1rem; }
.nav-group + .nav-group { margin-top: 1.05rem; }
.nav-heading {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .55rem;
  border: 0;
  background: transparent;
  color: #718078;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .075em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-heading:hover { color: var(--forest); }
.chevron { font-size: 1rem; transition: transform .15s ease; }
.nav-heading[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.nav-items { display: grid; gap: 2px; margin-top: .3rem; }
.nav-items[hidden] { display: none; }
.nav-article {
  width: 100%;
  padding: .48rem .65rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #45554e;
  font-size: .8rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.nav-article:hover { background: #eef5f1; color: var(--forest); }
.nav-article.is-active { background: #e7f2ec; color: var(--forest); font-weight: 750; }
.sidebar-footer { margin-top: auto; padding: 1rem .5rem .3rem; border-top: 1px solid var(--line); }
.sidebar-footer a { font-size: .75rem; font-weight: 650; text-decoration: none; }
.article-shell { width: 100%; max-width: 1040px; min-width: 0; margin: 0 auto; padding: 2rem clamp(1.25rem, 5vw, 4.5rem) 2rem; outline: none; }
.breadcrumbs { display: flex; min-height: 1.2rem; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 2.2rem; color: #829087; font-size: .73rem; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs strong { color: #45554e; font-weight: 650; }
.article-content { max-width: 760px; min-height: 60vh; }
.article-content h1 { margin: 0 0 1.2rem; color: var(--forest); font-size: clamp(2rem, 4.5vw, 3rem); letter-spacing: -.045em; line-height: 1.12; }
.article-content h2 { margin: 2.2rem 0 .75rem; color: var(--forest); font-size: 1.45rem; letter-spacing: -.025em; }
.article-content h3 { margin: 1.65rem 0 .55rem; color: #173e30; font-size: 1.1rem; }
.article-content p, .article-content li { color: #405149; font-size: .97rem; line-height: 1.78; }
.article-content p { margin: .8rem 0; }
.article-content ul, .article-content ol { display: grid; gap: .4rem; padding-left: 1.5rem; }
.article-content li::marker { color: #2f8d69; }
.article-content strong { color: #243b31; }
.article-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-content img { display: block; max-width: 100%; height: auto; margin: 1.5rem auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
.article-content code { padding: .12em .35em; border-radius: 4px; background: #edf3ef; color: #20583f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }
.article-content pre { overflow-x: auto; padding: 1rem; border-radius: 9px; background: #102a20; color: #e8f4ed; line-height: 1.6; }
.article-content pre code { padding: 0; background: transparent; color: inherit; }
.article-content blockquote { margin: 1.2rem 0; padding: .25rem 1rem; border-left: 3px solid #45a781; background: #f0f7f3; }
.article-content blockquote p { margin: .55rem 0; }
.article-content hr { height: 1px; margin: 2rem 0; border: 0; background: var(--line); }
.eyebrow { color: #18845d !important; font-size: .74rem !important; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lead { max-width: 690px; color: #596a61 !important; font-size: 1.14rem !important; line-height: 1.7 !important; }
.landing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin-top: 2.2rem; }
.landing-card { position: relative; min-height: 154px; padding: 1.15rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s ease, transform .15s ease; }
.landing-card:hover { transform: translateY(-2px); border-color: #a7cbb8; }
.landing-card .card-index { color: #439171; font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.landing-card h2 { margin: .65rem 0 .25rem; font-size: 1.05rem; }
.landing-card p { margin: .2rem 0 .8rem; color: var(--muted); font-size: .76rem; }
.landing-card > button, .inline-link { padding: 0; border: 0; background: none; color: var(--green); font-size: .78rem; font-weight: 750; cursor: pointer; }
.landing-card > button:hover, .inline-link:hover { text-decoration: underline; }
.callout { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; padding: .9rem 1rem; border: 1px solid #dcebe1; border-radius: 9px; background: #f0f7f3; color: #405149; font-size: .84rem; }
.callout strong { color: var(--forest); }
.article-footer { display: flex; max-width: 760px; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding: 1rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.article-footer a { font-weight: 650; text-decoration: none; }
.loading-state, .error-state { padding: 2rem 0; color: var(--muted); }
.error-state h1 { font-size: 1.8rem; }
.error-state button { padding: .55rem .8rem; border: 1px solid #c9ded1; border-radius: 7px; background: white; color: var(--forest); cursor: pointer; }
.sidebar-backdrop { display: none; }
:focus-visible { outline: 3px solid #30a477; outline-offset: 2px; }

@media (max-width: 820px) {
  .topbar { height: 60px; padding: 0 1rem; }
  .docs-layout { min-height: calc(100vh - 60px); grid-template-columns: 1fr; }
  .menu-toggle { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--forest); font-size: 1.05rem; cursor: pointer; }
  .sidebar { position: fixed; z-index: 10; top: 60px; bottom: 0; left: 0; width: min(86vw, 330px); height: calc(100dvh - 60px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 10px 0 30px #0b3d2e12; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { position: fixed; z-index: 9; inset: 60px 0 0; display: block; border: 0; background: #10281f66; }
  .article-shell { padding-top: 1.5rem; }
  .breadcrumbs { margin-bottom: 1.6rem; }
}
@media (max-width: 560px) {
  .brand { gap: .55rem; }
  .brand strong { font-size: .71rem; }
  .brand small { font-size: .66rem; }
  .portal-link { font-size: .75rem; }
  .topbar-actions { gap: .65rem; }
  .article-shell { padding: 1.2rem 1.1rem 1.5rem; }
  .article-content p, .article-content li { font-size: .92rem; }
  .landing-grid { grid-template-columns: 1fr; }
  .landing-card { min-height: 135px; }
  .article-footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
