/* Weblogy Docs – builds on /styles.css tokens */
html[data-language="de"] [data-lang="en"],
html[data-language="en"] [data-lang="de"] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.docs-page { background: var(--paper); }
.docs-brand { font-weight: 900; color: var(--teal); padding: .2rem .55rem; border-radius: 6px; background: var(--mint); font-size: .9rem; }
.docs-main { padding-top: 76px; min-height: 70vh; }

/* home */
.docs-home { padding: 4rem 0 5rem; }
.docs-home h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); margin: 0 0 .6rem; letter-spacing: -0.02em; }
.docs-lead { color: var(--muted); font-size: 1.15rem; margin: 0 0 2.4rem; }
.docs-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.docs-product { display: flex; flex-direction: column; gap: .6rem; padding: 1.6rem; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-soft); transition: transform 160ms ease, border-color 160ms ease; }
.docs-product:hover { transform: translateY(-3px); border-color: var(--teal); }
.docs-product strong { font-size: 1.3rem; }
.docs-product > span { color: var(--muted); }
.docs-product-links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.docs-product-links > span { font-size: .82rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; background: var(--soft); color: var(--teal); }
.docs-help { margin-top: 2.4rem; padding: 1.2rem 1.4rem; border-radius: 12px; background: var(--soft); display: flex; gap: .8rem; flex-wrap: wrap; }
.docs-help a { color: var(--teal); font-weight: 700; }

/* layout */
.docs-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 220px; gap: 2.6rem; width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 2.4rem 0 4rem; }
.docs-sidebar, .docs-toc { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
.docs-product-head { display: flex; align-items: center; gap: .6rem; font-size: 1.1rem; margin-bottom: 1rem; }
.docs-search { position: relative; display: block; margin-bottom: 1rem; }
.docs-search input { padding: .6rem 2.2rem .6rem .8rem; font-size: .92rem; }
.docs-search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-size: .75rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem; color: var(--muted); }
.docs-results { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow-soft); margin: -.4rem 0 1rem; overflow: hidden; }
.docs-results a { display: block; padding: .6rem .8rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.docs-results a:last-child { border-bottom: 0; }
.docs-results a:hover, .docs-results a:focus { background: var(--soft); outline: none; }
.docs-results small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-results mark { background: var(--mint); color: inherit; }
.docs-results p { margin: 0; padding: .7rem .8rem; color: var(--muted); font-size: .88rem; }
.docs-nav-title { margin: 1.2rem 0 .4rem; font-size: .75rem; font-weight: 900; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; }
.docs-sidebar ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-sidebar li a { display: block; padding: .38rem .7rem; border-radius: 7px; color: var(--ink); font-size: .93rem; font-weight: 600; }
.docs-sidebar li a:hover { background: var(--soft); }
.docs-sidebar li a.is-current { background: var(--mint); color: var(--teal); }
.docs-cta { display: block; margin-top: 1.4rem; padding: .7rem .9rem; border-radius: 10px; background: var(--coral); color: #fff; font-weight: 800; font-size: .9rem; text-align: center; }
.docs-toc li a { display: block; padding: .25rem 0 .25rem .8rem; border-left: 2px solid var(--line); color: var(--muted); font-size: .86rem; }
.docs-toc li a.is-active { border-left-color: var(--teal); color: var(--teal); font-weight: 700; }

/* article */
.docs-article { min-width: 0; max-width: 780px; }
.docs-menu { display: none; }
.docs-crumbs { margin: 0 0 .5rem; color: var(--muted); font-size: .88rem; }
.docs-crumbs a { color: var(--teal); font-weight: 700; }
.docs-article h1 { font-size: clamp(2rem, 3.6vw, 2.7rem); line-height: 1.12; margin: 0 0 1.4rem; letter-spacing: -0.02em; }
.docs-body { font-size: 1.02rem; line-height: 1.72; }
.docs-body > p:first-child { font-size: 1.15rem; color: var(--muted); }
.docs-body h2 { font-size: 1.5rem; margin: 2.6rem 0 .8rem; padding-top: .4rem; scroll-margin-top: 96px; letter-spacing: -0.01em; }
.docs-body h3 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; scroll-margin-top: 96px; }
.docs-body a { color: var(--teal); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.docs-body ul, .docs-body ol { padding-left: 1.3rem; }
.docs-body li { margin: .3rem 0; }
.docs-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88em; padding: .1em .35em; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); }
.docs-body pre { overflow: auto; padding: 1rem 1.1rem; border-radius: 10px; background: var(--charcoal); color: #e6f0ea; font-size: .88rem; }
.docs-body pre code { background: none; border: 0; padding: 0; color: inherit; }
.docs-body kbd { font-family: inherit; font-size: .85em; font-weight: 700; padding: .1em .45em; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--paper); }
.docs-body table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .94rem; display: block; overflow-x: auto; }
.docs-body th, .docs-body td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs-body th { background: var(--soft); font-size: .85rem; }
.docs-body .steps { list-style: none; padding: 0; counter-reset: st; }
.docs-body .steps > li { position: relative; padding: 0 0 1.1rem 2.8rem; counter-increment: st; }
.docs-body .steps > li::before { content: counter(st); position: absolute; left: 0; top: .05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.docs-body .note, .docs-body .tip, .docs-body .warn { padding: .9rem 1.1rem; border-radius: 10px; margin: 1.2rem 0; border-left: 4px solid; }
.docs-body .note { background: #eef6ff; border-color: #2d6cdf; }
.docs-body .tip { background: var(--mint); border-color: var(--green); }
.docs-body .warn { background: #fff4e0; border-color: var(--amber); }
.docs-body .note > :first-child, .docs-body .tip > :first-child, .docs-body .warn > :first-child { margin-top: 0; }
.docs-body .note > :last-child, .docs-body .tip > :last-child, .docs-body .warn > :last-child { margin-bottom: 0; }
html[data-theme="dark"] .docs-body .note { background: #14243d; }
html[data-theme="dark"] .docs-body .warn { background: #3a2a0d; }
.docs-body .pill { display: inline-block; font-size: .72rem; font-weight: 900; padding: .1rem .5rem; border-radius: 999px; background: #efe7ff; color: #6d28d9; vertical-align: middle; }
.docs-body .pill.free { background: var(--mint); color: var(--teal); }
.docs-body .cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 1.2rem 0; }
.docs-body .cards a { display: block; padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.docs-body .cards a:hover { border-color: var(--teal); }
.docs-body .cards a strong { display: block; color: var(--teal); }
.docs-body .cards a span { color: var(--muted); font-weight: 400; font-size: .92rem; }
.docs-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 3rem 0 1.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.docs-pager a { padding: .8rem 1rem; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; color: var(--teal); }
.docs-pager a:hover { border-color: var(--teal); }
.docs-pager .next { margin-left: auto; text-align: right; }
.docs-feedback { color: var(--muted); font-size: .9rem; }
.docs-feedback a { color: var(--teal); font-weight: 700; }

@media (max-width: 1180px) {
  .docs-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); width: calc(100% - 32px); padding-top: 1.2rem; }
  .docs-sidebar { display: none; position: static; max-height: none; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
  .docs-sidebar.is-open { display: block; }
  .docs-menu { display: inline-flex; gap: .4rem; margin-bottom: 1rem; padding: .5rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 700; cursor: pointer; }
  .docs-body .cards { grid-template-columns: minmax(0, 1fr); }
}
