/* ============================================================
   LobHub Docs — layer on top of styles/main.css
   Bilingual static user documentation at lobhub.de/docs.
   Uses the same Material-3 tokens; no build step.
   ============================================================ */

.docs-page {
  background:
    linear-gradient(180deg, var(--md-primary-95) 0, rgba(237, 240, 255, 0) 280px),
    var(--md-surface);
}

/* ── Hero ── */
.docs-hero {
  padding: 88px 0 36px;
}
@media (max-width: 640px) {
  .docs-hero { padding: 64px 0 28px; }
}
.docs-hero .h-display {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.5vw, 56px);
}
.docs-lead {
  margin: 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--md-on-surface-variant);
}

/* ── Breadcrumb ── */
.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--md-neutral-50);
}
.docs-breadcrumb a {
  color: var(--md-primary);
  font-weight: 500;
  text-decoration: none;
}
.docs-breadcrumb a:hover { text-decoration: underline; }
.docs-breadcrumb .sep { color: var(--md-neutral-70); }

/* ── Two-column layout: sticky sidebar + article ── */
.docs-body {
  padding: 0 0 96px;
}
.docs-body--page {
  padding-top: 96px;
}
@media (max-width: 640px) {
  .docs-body--page { padding-top: 76px; }
}
.docs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Sidebar ── */
.docs-sidebar {
  position: sticky;
  top: 88px;
}
.docs-sidebar h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--md-neutral-50);
}
.docs-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.docs-sidebar nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--md-on-surface-variant);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.35;
}
.docs-sidebar nav a:hover {
  background: var(--md-primary-95);
  color: var(--md-primary-20);
}
.docs-sidebar nav a.is-active {
  background: var(--md-primary-90);
  color: var(--md-primary-10);
}
@media (max-width: 860px) {
  .docs-sidebar {
    position: static;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px 6px;
  }
  .docs-sidebar h2 { display: none; }
  .docs-sidebar nav {
    flex-direction: row;
    gap: 6px;
    width: max-content;
  }
  .docs-sidebar nav a {
    white-space: nowrap;
    border: 1px solid var(--md-outline-variant);
    border-radius: var(--radius-pill);
    background: #fff;
    padding: 7px 14px;
  }
  .docs-sidebar nav a.is-active {
    border-color: var(--md-primary-90);
  }
}

/* ── Article card ── */
.docs-article {
  background: #fff;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-1);
  padding: 40px 44px 44px;
  min-width: 0;
}
@media (max-width: 640px) {
  .docs-article { padding: 24px 20px 28px; }
}

.docs-article > h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--md-on-surface);
}
.docs-article .docs-intro {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--md-on-surface-variant);
}
.docs-article h2 {
  margin: 38px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--md-outline-variant);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--md-on-surface);
}
.docs-article h3 {
  margin: 24px 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--md-on-surface);
}
.docs-article p {
  margin: 0 0 14px;
  line-height: 1.65;
  color: var(--md-on-surface-variant);
}
.docs-article a {
  color: var(--md-primary);
  font-weight: 500;
}
.docs-article ul,
.docs-article ol {
  margin: 0 0 14px;
  padding-left: 24px;
  color: var(--md-on-surface-variant);
  line-height: 1.65;
}
.docs-article li + li { margin-top: 8px; }
.docs-article code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.88em;
  background: var(--md-neutral-95);
  border: 1px solid var(--md-outline-variant);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--md-primary-20);
  overflow-wrap: anywhere;
}

/* ── Numbered step list ── */
.docs-steps {
  counter-reset: docs-step;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.docs-steps > li {
  counter-increment: docs-step;
  position: relative;
  padding: 0 0 22px 52px;
}
.docs-steps > li:last-child { padding-bottom: 0; }
.docs-steps > li::before {
  content: counter(docs-step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--md-primary-90);
  color: var(--md-primary-10);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.docs-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16.5px;
  top: 36px;
  bottom: 4px;
  width: 1.5px;
  background: var(--md-outline-variant);
}
.docs-steps h3 {
  margin: 2px 0 6px;
}
.docs-steps p { margin-bottom: 8px; }

/* ── Callouts ── */
.docs-callout {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--md-primary-90);
  background: var(--md-primary-95);
  color: var(--md-primary-20);
  font-size: 14.5px;
  line-height: 1.6;
}
.docs-callout svg { margin-top: 2px; }
.docs-callout p { margin: 0; color: inherit; }
.docs-callout p + p { margin-top: 8px; }
.docs-callout strong { color: inherit; }
.docs-callout--tip {
  border-color: var(--md-tertiary-90);
  background: #f0faf9;
  color: var(--md-tertiary-40);
}
.docs-callout--warn {
  border-color: #f3d9a4;
  background: #fdf6e7;
  color: #7a5b13;
}

/* ── Code / embed snippet block ── */
.docs-snippet {
  margin: 0 0 18px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.docs-snippet__label {
  display: block;
  padding: 8px 14px;
  background: var(--md-neutral-98);
  border-bottom: 1px solid var(--md-outline-variant);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--md-neutral-40);
}
.docs-snippet pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: var(--md-neutral-10);
}
.docs-snippet pre code {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  color: #e1e2ec;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: normal;
}

/* ── Screenshot figure ── */
.docs-figure {
  margin: 6px 0 22px;
}
.docs-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-2);
}
.docs-figure figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--md-neutral-50);
  text-align: center;
}

/* ── Fact table (limits, plans) ── */
.docs-table-wrap {
  overflow-x: auto;
  margin: 0 0 18px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-sm);
}
.docs-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: #fff;
  color: var(--md-on-surface-variant);
  font-size: 14.5px;
}
.docs-table th,
.docs-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--md-outline-variant);
}
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table th {
  background: var(--md-neutral-98);
  color: var(--md-on-surface);
  font-weight: 600;
}
.docs-table td:first-child {
  color: var(--md-on-surface);
  font-weight: 500;
}

/* ── Index: section cards ── */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 4px 0 8px;
}
@media (max-width: 680px) {
  .docs-cards { grid-template-columns: 1fr; }
}
.docs-card {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-md);
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.docs-card:hover {
  border-color: var(--md-primary-80);
  box-shadow: var(--elev-2);
  transform: translateY(-1px);
}
.docs-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--md-primary-95);
  color: var(--md-primary-40);
}
.docs-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--md-on-surface);
}
.docs-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--md-on-surface-variant);
}

/* ── Prev / next pager ── */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--md-outline-variant);
}
@media (max-width: 560px) {
  .docs-pager { grid-template-columns: 1fr; }
}
.docs-pager a {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: var(--md-neutral-99);
}
.docs-pager a:hover { border-color: var(--md-primary-80); }
.docs-pager .dir {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--md-neutral-50);
  margin-bottom: 4px;
}
.docs-pager .title {
  font-weight: 600;
  color: var(--md-primary);
  font-size: 15px;
}
.docs-pager a.next { text-align: right; }

/* ── Meta line (updated) ── */
.docs-updated {
  margin: 26px 0 0;
  font-size: 12.5px;
  color: var(--md-neutral-60);
}

/* ── FAQ details on docs pages ── */
.docs-article details {
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--radius-sm);
  background: var(--md-neutral-99);
  margin: 0 0 10px;
}
.docs-article summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--md-on-surface);
}
.docs-article summary::-webkit-details-marker { display: none; }
.docs-article summary .caret {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--md-neutral-50);
  border-bottom: 2px solid var(--md-neutral-50);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.docs-article details[open] summary .caret { transform: rotate(-135deg); }
.docs-article details .faq-body {
  padding: 0 18px 16px;
}
.docs-article details .faq-body p:last-child { margin-bottom: 0; }
