/* Handbuch, API und Änderungen auf mietflott.de. Baut auf site.css auf und nutzt nur deren Variablen. */

.doc-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.doc-bar .wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s3);
}
.doc-bar a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}
.doc-bar a:hover {
    text-decoration: underline;
}
.doc-bar a[aria-current='page'] {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.3em;
}

.doc-hero {
    padding-bottom: var(--s3);
}
.doc-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    max-width: 22ch;
}
.doc-lang {
    font-size: 0.95rem;
}
.doc-lang a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.doc-layout {
    display: grid;
    gap: var(--s4);
    padding-bottom: var(--s6);
    align-items: start;
}
@media (min-width: 1000px) {
    .doc-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }
    .doc-toc {
        position: sticky;
        top: 84px;
    }
}

.doc-toc {
    border-left: 3px solid var(--line);
    padding-left: var(--s2);
}
.doc-toc h2 {
    font-size: 1rem;
    font-family: 'Barlow', system-ui, sans-serif;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: var(--s1);
}
.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
}
.doc-toc a {
    display: block;
    padding: 10px 0;
    color: var(--ink);
    text-decoration: none;
    line-height: 1.3;
}
.doc-toc a:hover {
    text-decoration: underline;
}

.doc-body {
    display: grid;
    gap: var(--s2);
    max-width: 780px;
    min-width: 0;
}
.doc-body > * {
    min-width: 0;
}
.doc-body h2 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    margin-top: var(--s4);
    scroll-margin-top: 84px;
}
.doc-body h3 {
    font-size: 1.35rem;
    margin-top: var(--s3);
    scroll-margin-top: 84px;
}
.doc-body h4 {
    font-size: 1.05rem;
    margin-top: var(--s2);
}
.doc-body p,
.doc-body li,
.doc-body td {
    color: var(--body);
}
.doc-body strong {
    color: var(--ink);
    font-weight: 600;
}
.doc-bullets,
.doc-steps {
    padding-left: 1.4em;
    display: grid;
    gap: 8px;
    margin: 0;
}

.doc-note {
    padding: var(--s2) var(--s3);
    background: var(--sunken);
    border-left: 3px solid var(--muted);
    border-radius: var(--radius);
}

.doc-table {
    overflow-x: auto;
    max-width: 100%;
}
.doc-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
}
.doc-table th,
.doc-table td {
    text-align: left;
    vertical-align: top;
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--line);
}
.doc-table thead th {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--muted);
}
@media (max-width: 640px) {
    .doc-table:not(.doc-table-fields) thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .doc-table:not(.doc-table-fields) tr {
        display: grid;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--line);
    }
    .doc-table:not(.doc-table-fields) td {
        border: 0;
        padding: 0.2rem 0;
    }
    .doc-table:not(.doc-table-fields) td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--muted);
    }
}

.doc-figure img {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.doc-figure-phone {
    max-width: 300px;
}

code {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
}
.doc-code {
    margin: 0;
    padding: var(--s2);
    background: var(--sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}
.doc-code code {
    overflow-wrap: normal;
    white-space: pre;
}
.doc-code:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
}

.doc-section {
    padding: 0;
    display: grid;
    gap: var(--s2);
}
.doc-route {
    display: grid;
    gap: var(--s1);
    padding: var(--s3) 0;
    border-top: 1px solid var(--line);
    scroll-margin-top: 84px;
}
.doc-route h3 {
    margin-top: 0;
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}
.doc-method {
    font-family: 'Barlow', system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 2px 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink);
}
.doc-facts {
    display: grid;
    gap: 4px;
    margin: 0;
}
.doc-facts div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--s1);
}
.doc-facts dt {
    font-weight: 600;
}
.doc-facts dt::after {
    content: ':';
}
.doc-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.doc-pager {
    display: grid;
    gap: var(--s2);
    margin-top: var(--s4);
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
}
@media (min-width: 700px) {
    .doc-pager {
        grid-template-columns: 1fr 1fr;
    }
}
.doc-pager a {
    display: grid;
    gap: 2px;
    min-height: 44px;
    padding: var(--s2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
}
.doc-pager a:hover {
    border-color: var(--ink);
}
.doc-pager span {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--muted);
}
.doc-pager-next {
    text-align: right;
    grid-column: -2;
}
.doc-all a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}

.doc-index {
    padding-bottom: var(--s6);
    display: grid;
    gap: var(--s4);
}
.doc-chapters-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}
.doc-chapters-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface);
}
.doc-chapters-nav a:hover {
    border-color: var(--ink);
}
.doc-chapter {
    padding: 0;
    display: grid;
    gap: var(--s2);
}
.doc-chapter h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    scroll-margin-top: 84px;
}
.doc-articles {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    column-gap: var(--s4);
}
@media (min-width: 800px) {
    .doc-articles {
        grid-template-columns: 1fr 1fr;
    }
}
.doc-articles li {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 4px;
}
.doc-articles a {
    font-weight: 600;
    font-size: 1.08rem;
}
.doc-articles p {
    color: var(--body);
    font-size: 0.98rem;
}

.doc-changes {
    padding-bottom: var(--s6);
    display: grid;
    gap: var(--s4);
}
.doc-day {
    padding: 0;
    display: grid;
    gap: var(--s2);
}
.doc-day h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    padding-top: var(--s3);
    border-top: 1px solid var(--line);
}
.doc-day h3 {
    font-size: 1.15rem;
    font-family: 'Barlow', system-ui, sans-serif;
    font-weight: 600;
    color: var(--muted);
}
.doc-day li {
    color: var(--body);
}
