/* Docs site chrome for the Soft library */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body.docs { margin: 0; min-height: 100vh; }
.docs-top { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: color-mix(in srgb, var(--sf-bg) 86%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--sf-line); }
.docs-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--sf-ink); text-decoration: none; }
.docs-brand i { width: 12px; height: 12px; border-radius: 50%; background: var(--sf-ink); display: inline-block; animation: sf-bob 1.8s ease-in-out infinite; }
.docs-search { flex: 1; max-width: 420px; margin-left: auto; }
.docs-search input { width: 100%; min-height: 42px; border: 2px solid transparent; border-radius: 999px; background: var(--sf-fill); color: var(--sf-ink); padding: 0 18px; font: inherit; font-size: 15px; transition: background .2s, border-color .2s; }
.docs-search input:focus { outline: none; background: var(--sf-surface); border-color: var(--sf-ink); }
.docs-menu-btn { display: none; }
.docs-shell { display: grid; grid-template-columns: 290px minmax(0, 1fr); max-width: 1500px; margin: 0 auto; }
.docs-side { position: sticky; top: 67px; align-self: start; height: calc(100vh - 67px); overflow: auto; padding: 24px 12px 48px 24px; border-right: 1px solid var(--sf-line); }
.docs-group { margin: 0 0 22px; }
.docs-group > h4 { margin: 0 0 6px 12px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--sf-muted); }
.docs-side a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 12px; color: var(--sf-ink); text-decoration: none; font-size: 15px; font-weight: 500; transition: background .2s, transform .3s var(--sf-spring); }
.docs-side a:hover { background: var(--sf-fill); transform: translateX(3px); }
.docs-side a[aria-current="page"] { background: var(--sf-ink); color: var(--sf-on-ink); }
.docs-side a small { font-size: 12px; opacity: .6; }
.docs-sub { margin: 2px 0 8px 12px; padding-left: 10px; border-left: 2px solid var(--sf-line); }
.docs-sub a { min-height: 30px; font-size: 14px; font-weight: 400; color: var(--sf-muted); }
.docs-main { padding: 40px 40px 120px; min-width: 0; }
.docs-main > .sf-demo > .sf-demo__title { font-size: clamp(36px, 5vw, 64px); letter-spacing: -.04em; margin: 0 0 8px; line-height: 1; }
.sf-demo__lede { margin: 0 0 40px; font-size: 19px; line-height: 1.5; color: var(--sf-muted); max-width: 640px; }
.sf-demo__item { margin: 0 0 56px; }
.sf-demo__item > h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.sf-demo__item > p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; max-width: 720px; }
.sf-demo__stage { position: relative; display: block; padding: 40px; border-radius: 24px; background: var(--sf-bg); border: 1px solid var(--sf-line); overflow: visible; min-width: 0; }
.sf-demo__stage.is-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.sf-demo__stage > * { min-width: 0; max-width: 100%; }
/* block-level children (tables, sections, lists, wrappers) take a full row; inline-level ones (buttons, badges) sit side by side.
   docs.js tags them with data-sf-row from their display type; .sf-demo__row forces it by hand. */
.sf-demo__stage > [data-sf-row], .sf-demo__stage > .sf-demo__row { flex: 1 1 100%; }
.sf-demo__stage.is-ready.sf-demo__stage--column { flex-direction: column; align-items: stretch; }
.sf-demo__stage--center { justify-content: center; }
.sf-demo__stage--tall { min-height: 420px; }
.sf-demo__stage.sf-demo__stage--flush { padding: 0; overflow: hidden; }
.docs-home-hero { min-height: 420px; }
.docs-home-hero .wrap { padding: 72px 40px 72px; }
.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 24px; }
.docs-cards a { display: block; text-decoration: none; color: inherit; }
.docs-cards .sf-card { height: 100%; }
.docs-cards h3 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.02em; }
.docs-cards p { margin: 0; font-size: 14px; color: var(--sf-muted); line-height: 1.5; }
.docs-count { font-size: clamp(64px, 12vw, 140px); font-weight: 700; letter-spacing: -.05em; line-height: .9; }
.docs-code { margin: 16px 0; scrollbar-width: none; padding: 18px 20px; border-radius: 16px; background: var(--sf-surface); border: 1px solid var(--sf-line); font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: auto; white-space: pre; }
.docs-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 64px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .sf-demo__stage { padding: 20px; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: fixed; inset: 67px 0 0 0; z-index: 150; height: auto; background: var(--sf-bg); transform: translateX(-100%); transition: transform .4s var(--sf-spring); padding-right: 24px; }
  body.docs-open .docs-side { transform: none; }
  .docs-menu-btn { display: inline-flex; }
  .docs-main { padding: 28px 18px 96px; }
}

.docs-main { overflow-x: clip; }
.docs-main p code, .docs-main li code, .docs-main h3 code { overflow-wrap: anywhere; }
.docs-home-hero { overflow: hidden; }
html { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--sf-ink) 22%, transparent) transparent; }
.docs-side { scrollbar-width: none; }
.docs-side::-webkit-scrollbar { display: none; }

/* ---- polish ---- */
.docs-home-hero { margin: 0 -40px; }
.docs-side-search { display: none; margin: 0 0 18px; }
.docs-side-search input, .docs-search input { -webkit-appearance: none; appearance: none; }
.docs-side-search input { width: 100%; min-height: 44px; border: 2px solid transparent; border-radius: 999px; background: var(--sf-fill); color: var(--sf-ink); padding: 0 18px; font: inherit; font-size: 16px; }
.docs-side-search input:focus { outline: none; background: var(--sf-surface); border-color: var(--sf-ink); }
.docs-top { min-height: 67px; box-sizing: border-box; }
.docs-brand { flex: none; }
.sf-demo__item { scroll-margin-top: 88px; }
.sf-demo__item > p code, .sf-demo__lede code { font-size: .92em; background: var(--sf-fill); padding: 1px 6px; border-radius: 6px; }
.docs-pager .sf-btn { text-decoration: none; }
@media (max-width: 900px) {
  .docs-search { display: none; }
  .docs-top > #docs-theme { margin-left: auto; }
  .docs-side-search { display: block; }
  .docs-home-hero { margin: 0 -18px; }
  .docs-home-hero .wrap { padding: 48px 18px 56px; }
  .docs-side { padding: 20px 18px 48px; }
}
