/* Legal page (/recht) in the structure of the application (/apply, p/bewerbung.css): the bar on top, the contents with
   progress on the left - sticky, so it stays in view while reading and marks the document on screen (js/recht.js) -,
   the documents as cards on the right. On phones the contents become a chip row under the bar that scrolls along.
   Builds on maske.css (tokens, bar, wordmark, buttons, notes, card). */
html { scroll-behavior: smooth; }
body.lg { min-height: 100vh; min-height: 100dvh; }
.lg a { color: inherit; }
.lg .btn, .lg .btn2 { text-decoration: none; }
.lg .btn.sm, .lg .btn2.sm { height: 32px; padding: 0 12px; border-radius: 9px; font-size: 13px; gap: 6px; }

/* ---------- Bar ---------- */
.lg-bar { position: sticky; top: 0; z-index: 30; }
.lg-bar-r { display: flex; align-items: center; gap: 10px; margin: 0 0 0 auto; }

/* ---------- Layout: contents left, the documents right ---------- */
.lg-wrap { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 48px; padding: 36px 40px 96px; }
.lg-toc {
  position: sticky; top: 92px; align-self: start; display: grid; gap: 20px;
  max-height: calc(100dvh - 112px); overflow-y: auto; overscroll-behavior: contain;
}
.lg-main { min-width: 0; max-width: 880px; }

/* contents head with progress (as the application's "Deine Anfrage") */
.lg-toc-h { display: grid; gap: 8px; }
.lg-toc-h b { font-family: var(--font-d); font-size: 18px; font-weight: 700; }
.lg-count { display: flex; justify-content: space-between; gap: 10px; color: var(--ink3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lg-count > span:first-child { color: var(--ink2); font-weight: 600; }
.lg-progress { display: block; height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; }
.lg-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .15s linear; }

/* the documents - an icon in the circle where the application has its step number */
.lg-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.lg-list a {
  position: relative; display: grid; gap: 1px; padding: 7px 10px 7px 42px; border-radius: 9px; color: var(--ink2);
  text-decoration: none; transition: background-color .15s, color .15s;
}
.lg-list a:hover { background: var(--sunken); color: var(--ink); }
.lg-list .ic {
  position: absolute; left: 10px; top: 7px; width: 22px; height: 22px; padding: 4px; border: 1px solid var(--line2); border-radius: 50%;
  color: var(--ink3); stroke-width: 2; transition: background-color .15s, border-color .15s, color .15s;
}
.lg-list b { font-size: 13.5px; font-weight: 500; line-height: 22px; }
.lg-list em { display: none; font-style: normal; font-size: 12.5px; line-height: 1.4; color: var(--ink3); }
.lg-list a[aria-current] { background: var(--sunken); color: var(--ink); }
.lg-list a[aria-current] b { font-weight: 600; }
.lg-list a[aria-current] em { display: block; }
.lg-list a[aria-current] .ic { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.lg-notes { display: grid; gap: 8px; }
.lg-notes .note { margin: 0; font-size: 12.5px; }
.lg-notes .note > .ic { margin-top: 2px; color: var(--ink3); }

/* ---------- Page head ---------- */
.lg-head { margin-bottom: 22px; }
.lg-head h1 { margin: 0; font-family: var(--font-d); font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.lg-head p { margin: 8px 0 0; max-width: 62ch; color: var(--ink2); font-size: 15px; line-height: 1.55; }

/* ---------- One card per document ---------- */
.lg-doc { padding: 28px 32px 30px; scroll-margin-top: 84px; }
.lg-doc + .lg-doc { margin-top: 20px; }
.lg-doc h2 { margin: 0; font-family: var(--font-d); font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.lg-doc h3 { margin: 26px 0 6px; font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.lg-doc p, .lg-doc li { max-width: 72ch; color: var(--ink2); font-size: 14.5px; line-height: 1.65; }
.lg-doc p { margin: 0; }
.lg-doc p + p, .lg-doc ul + p, .lg-doc .lg-key + p, .lg-doc noscript + p { margin-top: 12px; }
.lg-doc .lg-stand { margin-top: 6px; color: var(--ink3); font-size: 12.5px; }
.lg-doc strong { color: var(--ink); font-weight: 600; }
.lg-doc ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.lg-doc li { position: relative; padding-left: 22px; }
.lg-doc li::before { content: ""; position: absolute; left: 2px; top: .82em; width: 10px; height: 1.5px; border-radius: 1px; background: var(--line2); }
.lg-doc code { padding: 1px 5px; border-radius: 5px; background: var(--sunken); color: var(--ink); font-size: .9em; }
.lg-doc a, .lg-notes a, .lg-foot a {
  color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere;
}
.lg-doc a:hover, .lg-notes a:hover, .lg-foot a:hover { color: var(--accent-text); }
.lg-key { margin: 22px 0; padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); }
.lg-doc .lg-key p { color: var(--ink); }
.lg-muted { color: var(--ink3); }
.lg-foot { margin: 20px 0 0; color: var(--ink3); font-size: 13px; }

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
  .lg-wrap { grid-template-columns: 236px minmax(0, 1fr); gap: 32px; padding: 32px 28px 80px; }
  .lg-doc { padding: 24px 26px 26px; }
}
/* phones and tablets: the contents become a chip row under the bar that scrolls along; the bar shows the progress */
@media (max-width: 900px) {
  .lg-wrap { display: block; padding: 0 0 64px; }
  .lg-toc {
    position: sticky; top: 56px; z-index: 20; display: block; max-height: none; overflow: visible; padding: 10px 0;
    border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--page) 90%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .lg-toc-h { position: absolute; left: 0; right: 0; bottom: -1px; display: block; }
  .lg-toc-h b, .lg-count { display: none; }
  .lg-progress { height: 2px; border-radius: 0; background: none; }
  .lg-list { display: flex; gap: 6px; padding: 0 16px; overflow-x: auto; scroll-padding: 0 16px; }
  .lg-list li { flex: none; }
  .lg-list a {
    display: flex; align-items: center; height: 34px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); white-space: nowrap;
  }
  .lg-list .ic { left: 7px; top: 6px; width: 20px; height: 20px; padding: 3.5px; }
  .lg-list a[aria-current] { border-color: var(--accent); background: var(--surface); }
  .lg-list a[aria-current] em, .lg-list em { display: none; }
  .lg-notes { display: none; }
  .lg-main { max-width: none; padding: 20px 24px 0; }
  .lg-head h1 { font-size: 26px; }
  .lg-head p { font-size: 14px; }
  .lg-doc { padding: 22px 22px 24px; scroll-margin-top: 124px; }
  .lg-doc h2 { font-size: 21px; }
}
@media (max-width: 560px) {
  .lg-cta { display: none; }
  .lg-main { padding: 16px 16px 0; }
  .lg-doc { padding: 20px 18px 22px; border-radius: 16px; }
  .lg-doc + .lg-doc { margin-top: 14px; }
  .lg-doc p, .lg-doc li { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lg-progress i, .lg-list a, .lg-list .ic { transition: none; }
}
@media print {
  .lg-bar, .lg-toc, .lg-foot { display: none; }
  .lg-wrap { display: block; padding: 0; }
  .lg-doc { padding: 0; border: 0; }
  .lg-doc + .lg-doc { margin-top: 32px; }
}
