:root {
    --bg: #f6f8fa;
    --surface: #ffffff;
    --surface-2: #f1f4f8;
    --border: #d9dee5;
    --text: #1b2330;
    --muted: #5c6778;
    --primary: #2563eb;
    --primary-hover: #1d4fd8;
    --primary-soft: #e6eeff;
    --accent: #0ea5a4;
    --danger: #d92d3a;
    --danger-soft: #fde8ea;
    --success: #15803d;
    --success-soft: #e3f6ea;
    --warn-soft: #fff6dd;
    --add-bg: #e6ffec;
    --del-bg: #ffebe9;
    --hunk-bg: #eef3ff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d1117;
        --surface: #151b24;
        --surface-2: #1b2330;
        --border: #2a3340;
        --text: #e6ebf2;
        --muted: #8d99ab;
        --primary: #4f8cff;
        --primary-hover: #6b9dff;
        --primary-soft: #19284a;
        --accent: #2dd4bf;
        --danger: #f2545f;
        --danger-soft: #3a1a1e;
        --success: #3fb950;
        --success-soft: #142a1b;
        --warn-soft: #2d2614;
        --add-bg: #12261b;
        --del-bg: #2d1518;
        --hunk-bg: #172341;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
h1 { font-size: 1.7rem; margin: .4em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: 1.4em 0 .6em; }
h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.center { text-align: center; }
.spacer { flex: 1; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.inline { display: inline; }
.pre { white-space: pre-wrap; }
.pad { padding: 20px; }

/* Topbar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; }
.nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav > a:not(.btn) { color: var(--text); font-weight: 500; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: var(--text); }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.avatar-sm { width: 22px; height: 22px; font-size: .7rem; }
.avatar-xl { width: 120px; height: 120px; font-size: 3rem; }
.avatar-link:hover { text-decoration: none; }

.container { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 16px 48px; flex: 1; }
.narrow { max-width: 760px; margin: 0 auto; }

/* Buttons & Forms */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: .87rem; }
.btn-lg { padding: 11px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; justify-content: center; margin-top: 8px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-active { background: var(--primary-soft); border-color: var(--primary); }
.btn.static { cursor: default; }
.count { display: inline-block; padding: 0 7px; border-radius: 99px; background: var(--surface-2); font-size: .8em; font-weight: 600; }

input, select, textarea { width: 100%; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg);
    color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--primary); }
textarea { resize: vertical; }
textarea.mono { font-family: var(--mono); font-size: .85rem; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 400; }
.form label.check input { margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row .grow-0 { flex: 0 0 200px; }
.slash { font-size: 1.5rem; color: var(--muted); padding-bottom: 6px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 8px; }
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-group.vertical { grid-template-columns: 1fr; }
.radio-card { flex-direction: row !important; align-items: flex-start; gap: 10px !important; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; background: var(--bg); }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.radio-card input { margin-top: 5px; }
.radio-card span { display: flex; flex-direction: column; }
.radio-card small { color: var(--muted); font-weight: 400; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border);
    background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; font-size: .92rem; flex-wrap: wrap; }

.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash-success { background: var(--success-soft); border-color: var(--success); }
.flash-error { background: var(--danger-soft); border-color: var(--danger); }
.flash-info { background: var(--primary-soft); border-color: var(--primary); }
.notice { padding: 12px 16px; border-radius: var(--radius); background: var(--warn-soft); border: 1px solid var(--border); margin: 12px 0; }

.badge { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; border: 1px solid var(--border);
    color: var(--muted); vertical-align: middle; }
.badge-danger, .badge-deleted { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.badge-success, .badge-added { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.badge-renamed, .badge-modified { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px 0 30px; }
.hero h1 { font-size: 2.8rem; line-height: 1.12; letter-spacing: -.025em; }
.accent { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.12rem; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; }
.rule-cards { display: grid; gap: 12px; }
.rule-card { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 16px 18px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.rule-card h3 { margin: 0; }
.rule-card p { grid-column: 2; margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
.rule-num { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800;
    font-size: 1.2rem; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.rule-num.big { width: 56px; height: 56px; font-size: 1.5rem; flex: none; }
.muted-card .rule-num { background: var(--surface-2); color: var(--text); }

.section-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 18px 0 12px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.repo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.repo-grid .card + .card { margin-top: 0; }
.repo-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; color: var(--text); transition: transform .12s, border-color .12s; }
.repo-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-1px); }
.repo-card-title { font-size: 1.02rem; }
.repo-card-desc { margin: 0; color: var(--text); font-size: .92rem; flex: 1; }
.repo-card-meta { display: flex; gap: 16px; font-size: .82rem; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty-state.small { padding: 14px; }

/* Repo */
.repo-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.repo-title { display: flex; align-items: center; gap: 8px; font-size: 1.3rem; }
.repo-title svg { color: var(--muted); }
.repo-actions { margin-left: auto; display: flex; gap: 8px; }
.tabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border); margin: 14px 0 18px; flex-wrap: wrap; }
.tabs > a { padding: 9px 14px; color: var(--text); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs > a:hover { text-decoration: none; background: var(--surface-2); border-radius: 8px 8px 0 0; }
.tabs > a.active { border-bottom-color: var(--primary); font-weight: 600; }
.clone { margin-left: auto; display: flex; gap: 6px; padding-bottom: 6px; }
.clone input { width: 330px; font-family: var(--mono); font-size: .8rem; padding: 4px 9px; }

.repo-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; }
.repo-side h3 { margin-top: 0; }
.side-list { list-style: none; padding: 0; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.license-note { font-size: .86rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.breadcrumb { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 1.02rem; }
.dropdown { position: relative; }
.dropdown summary { list-style: none; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; min-width: 220px; max-height: 340px; overflow: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px; }
.dropdown-menu a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text); }
.dropdown-menu a:hover, .dropdown-menu a.active { background: var(--primary-soft); text-decoration: none; }
.dropdown-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px 2px; }

/* Profil-Dropdown in der Topbar */
.profile-menu summary { list-style: none; cursor: pointer; display: inline-flex; }
.profile-menu summary::-webkit-details-marker { display: none; }
.dropdown-right { left: auto; right: 0; min-width: 230px; }
.dropdown-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown-menu .dropdown-sep { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-btn { width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 6px 10px;
    border-radius: 6px; cursor: pointer; }
.dropdown-btn:hover { background: var(--surface-2); }

/* Sprachumschalter */
.lang-switch { margin-left: 10px; display: inline-flex; gap: 4px; }
.lang-switch a { padding: 1px 7px; border-radius: 6px; border: 1px solid var(--border); font-size: .78rem; font-weight: 600; color: var(--muted); }
.lang-switch a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.lang-switch a:hover { text-decoration: none; }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Dokumentation */
.docs-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 28px; align-items: start; }
.docs-nav { position: sticky; top: 80px; }
.docs-nav h3 { margin: 0 0 10px; }
.docs-nav nav { display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); }
.docs-nav a:hover { background: var(--surface-2); text-decoration: none; }
.docs-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.docs-content .markdown-body { padding: 16px 32px 28px; }

/* Account-Einstellungen */
.settings-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 80px; }
.settings-user { display: flex; align-items: center; gap: 10px; padding: 0 8px 14px; }
.avatar-lg { width: 40px; height: 40px; font-size: 1.1rem; }
.settings-nav nav { display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { padding: 8px 12px; border-radius: 8px; color: var(--text); }
.settings-nav a:hover { background: var(--surface-2); text-decoration: none; }
.settings-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.settings-content h1 { margin-top: 4px; }

.file-list { overflow: hidden; }
.last-commit { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .9rem; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); color: var(--text); font-size: .93rem; }
.file-row:last-child { border-bottom: 0; }
a.file-row:hover { background: var(--surface-2); text-decoration: none; }
a.file-row:hover .fname { color: var(--primary); text-decoration: underline; }
.ficon { width: 20px; text-align: center; }
.fsize { font-size: .8rem; }

.readme { margin-top: 20px; }
.markdown-body { padding: 8px 28px 24px; overflow-wrap: anywhere; }
.markdown-body.pad { padding: 16px 28px; }
.markdown-body h1, .markdown-body h2 { border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.markdown-body pre, pre.snippet { background: var(--surface-2); padding: 14px 16px; border-radius: 8px; overflow: auto; }
.markdown-body pre code, pre.snippet code { background: none; padding: 0; }
.markdown-body img { max-width: 100%; }
.markdown-body blockquote { margin: 0; padding: 0 1em; border-left: 4px solid var(--border); color: var(--muted); }
.markdown-body table { border-collapse: collapse; }
pre.plain { white-space: pre-wrap; padding: 16px; margin: 0; }

.code-view { display: flex; overflow: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.6; }
.code-view pre { margin: 0; padding: 12px 0; }
.code-view .gutter { text-align: right; padding: 12px 12px 12px 16px; color: var(--muted); user-select: none; border-right: 1px solid var(--border);
    background: var(--surface-2); min-width: 54px; }
.code-view .code { flex: 1; padding-left: 16px; }
.code-view .code code, .code-view code.hljs { background: transparent !important; padding: 0 16px 0 0; font-size: inherit; line-height: inherit; }
.image-view { padding: 24px; text-align: center; background: repeating-conic-gradient(var(--surface-2) 0% 25%, transparent 0% 50%) 50% / 20px 20px; }
.image-view img { max-width: 100%; }

/* Commits & Diff */
.day-head { margin: 22px 0 8px; color: var(--muted); font-weight: 500; }
.commit-row { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.commit-row:last-child { border-bottom: 0; }
.commit-subject { color: var(--text); font-weight: 600; }
.commit-head h2 { margin-top: 0; }
.commit-body { white-space: pre-wrap; font-family: inherit; color: var(--muted); }
.pager { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.add { color: var(--success); font-weight: 600; }
.del { color: var(--danger); font-weight: 600; }
.diff-file { overflow: hidden; }
.diff { font-family: var(--mono); font-size: .82rem; overflow-x: auto; }
.dl { white-space: pre; padding: 0 16px; min-width: max-content; }
.dl .dm { display: inline-block; width: 18px; color: var(--muted); user-select: none; }
.dl-a { background: var(--add-bg); }
.dl-d { background: var(--del-bg); }
.dl-h { background: var(--hunk-bg); color: var(--muted); padding: 4px 16px; }

/* Issues */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg a { padding: 5px 12px; color: var(--text); font-size: .9rem; }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.active { background: var(--primary-soft); font-weight: 600; }
.seg a:hover { text-decoration: none; background: var(--surface-2); }
.issue-row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.issue-row:last-child { border-bottom: 0; }
.issue-title { color: var(--text); font-weight: 600; }
.issue-state.open { color: var(--success); }
.issue-state.closed { color: #8b5cf6; }
.issue-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.issue-head h1 { width: 100%; margin-bottom: 0; }
.pill { padding: 4px 12px; border-radius: 99px; color: #fff; font-weight: 600; font-size: .85rem; }
.pill.open { background: var(--success); }
.pill.closed { background: #8b5cf6; }
.timeline { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.timeline .card + .card { margin-top: 0; }

/* Auth */
.auth-box { max-width: 440px; margin: 40px auto; padding: 28px; }
.auth-box h1 { margin-top: 0; }
.rules-box { background: var(--surface-2); border-radius: var(--radius); padding: 12px 16px; font-size: .92rem; }
.rules-box ol { margin: 6px 0; padding-left: 20px; }
.rules-box p { margin: 4px 0 0; }

/* Profile */
.profile { display: flex; gap: 32px; }
.profile-side { width: 240px; flex: none; }
.profile-side h1 { margin-bottom: 4px; }

/* Rules page */
.prose p, .prose li { color: var(--text); }
.rule-block { display: flex; gap: 20px; padding: 22px; margin: 18px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.rule-block h2 { margin-top: 4px; }

/* Tables & stats */
.table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; margin-bottom: 20px; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: var(--surface-2); font-size: .85rem; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0; }
.stat-row .card + .card { margin-top: 0; }
.stat { padding: 16px; color: var(--text); }
.stat:hover { text-decoration: none; }
.stat-num { font-size: 1.8rem; font-weight: 800; }
.takedown-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.takedown-row .row input { width: 260px; }
.takedown-info { text-align: left; margin: 20px auto; max-width: 520px; }
.takedown-info p { margin: 6px 0; }
.dl { margin: 0; }
dl.dl { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; }
dl.dl dt { font-weight: 600; color: var(--muted); }
dl.dl dd { margin: 0; white-space: normal; padding: 0; }
dl.dl dd.pre { white-space: pre-wrap; }
.danger-zone { border-color: var(--danger); margin-top: 24px; }
.danger-zone h2 { color: var(--danger); margin-top: 0; }
.copyright-fields { display: none; flex-direction: column; gap: 14px; padding: 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.copyright-fields.show { display: flex; }
.copyright-fields h3 { margin: 0; }

.error-page { text-align: center; padding: 60px 0; }
.error-code { font-size: 5rem; font-weight: 800; line-height: 1; background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--surface); font-size: .88rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; padding-top: 22px; padding-bottom: 22px; }
.footer-copy { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links > a { color: var(--muted); }
.footer-links > a:hover { color: var(--text); }
.footer strong { color: var(--text); }

/* Hamburger-Button (nur mobil sichtbar) */
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 40px; flex: none; padding: 0;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1px solid var(--border); border-radius: 9px; background: var(--surface); cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px;
    transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---- Tablet ---- */
@media (max-width: 900px) {
    .container { padding: 16px 14px 40px; }
    .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 16px; }
    .hero h1 { font-size: 2.1rem; }
    .repo-layout { grid-template-columns: 1fr; }
    .clone { margin-left: 0; width: 100%; }
    .clone input { width: 100%; }
    .profile { flex-direction: column; }
    .profile-side { width: 100%; }
    .radio-group { grid-template-columns: 1fr; }
    dl.dl { grid-template-columns: 1fr; }
    .docs-layout, .settings-layout { grid-template-columns: 1fr; }
    .docs-nav, .settings-nav { position: static; }
    .docs-nav nav, .settings-nav nav { flex-direction: row; flex-wrap: wrap; }

    /* Topbar: Hamburger-Menü */
    .topbar-inner { position: relative; flex-wrap: nowrap; gap: 12px; }
    .search { display: none; }
    .nav-toggle { display: flex; }
    .nav {
        display: none; position: absolute; top: calc(100% + 8px); left: 12px; right: 12px; margin: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .2); padding: 8px; z-index: 50;
    }
    .nav.open { display: flex; }
    .nav > a, .nav > .btn { width: 100%; text-align: left; padding: 11px 12px; border-radius: 8px; }
    .nav > a:not(.btn):hover { background: var(--surface-2); text-decoration: none; }
    .nav .btn-primary { justify-content: flex-start; }
    /* Profil-Menü inline statt eigenes Dropdown */
    .profile-menu { width: 100%; }
    .profile-menu > summary { display: none; }
    .profile-menu .dropdown-menu { position: static; display: block; box-shadow: none; border: 0;
        background: transparent; padding: 0; min-width: 0; }
    .profile-menu .dropdown-menu > a, .profile-menu .dropdown-btn { padding: 11px 12px; border-radius: 8px; }
    .profile-menu .dropdown-head { padding: 6px 12px 8px; }
}

/* ---- Handy ---- */
@media (max-width: 600px) {
    body { font-size: 14.5px; }
    .container { padding: 14px 12px 36px; }
    h1 { font-size: 1.45rem; }
    h2 { font-size: 1.15rem; }
    .hero h1 { font-size: 1.8rem; }
    .lead { font-size: 1rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }

    /* Topbar kompakt */
    .brand span { font-size: 1.05rem; }

    /* Repo-Kopf + Tabs */
    .repo-head { gap: 8px; }
    .repo-actions { margin-left: 0; width: 100%; }
    .repo-actions .btn { flex: 1; justify-content: center; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 2px; -webkit-overflow-scrolling: touch; }
    .tabs > a { white-space: nowrap; padding: 9px 11px; }
    .toolbar { gap: 8px; }
    .last-commit { flex-wrap: wrap; }

    /* Listen & Grids einspaltig */
    .repo-grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
    .rule-block { flex-direction: column; gap: 12px; padding: 16px; }
    .rule-num.big { width: 46px; height: 46px; font-size: 1.2rem; }

    /* Abstände/Lesbarkeit */
    .pad, .card.pad { padding: 14px; }
    .markdown-body, .markdown-body.pad, .docs-content .markdown-body { padding: 12px 15px; }
    .auth-box { margin: 20px auto; padding: 18px; }

    /* Tabellen horizontal scrollbar statt Überlauf */
    .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .mono.small, td .small { word-break: break-all; }

    /* Footer gestapelt */
    .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
    .footer-links { gap: 12px 16px; }
}
.profile-bio { margin: 8px 0; color: var(--text); }
