:root,
:root[data-theme="dark"] {
    --bg:           #1a1f24;
    --bg-deep:      #14181c;
    --panel:        #20262d;
    --panel-edge:   #2c343d;
    --rule:         #313a44;
    --text:         #e8e4dd;
    --text-muted:   #9ca3af;
    --text-faint:   #6b7280;
    --accent:       #d97735;
    --accent-warm:  #f0a468;
    --accent-deep:  #a4521f;
    --blueprint:    #6ba8c7;
    --blueprint-faint: #2d4452;
    --ok:           #6fbf73;
    --warn:         #d4a23a;
    --grid-line:    rgba(107,168,199,.06);
    --shadow:       0 1px 0 rgba(255,255,255,.03) inset, 0 12px 28px rgba(0,0,0,.32);
    --topbar-bg:    rgba(20,24,28,.85);
    --code-bg:      rgba(107,168,199,.08);
    --pre-bg:       #14181c;
    --pre-text:     #e8e4dd;
    --notif-bg:     rgba(217,119,53,.12);
    --notif-bg-warn: rgba(212,162,58,.06);
    --notif-bg-ok:   rgba(111,191,115,.06);
    --notif-bg-info: rgba(107,168,199,.06);
}

/* Light Mode: Papier / Werkbank-Optik mit gedaempften Industrie-Tönen */
:root[data-theme="light"] {
    --bg:           #f4efe7;
    --bg-deep:      #ebe4d6;
    --panel:        #ffffff;
    --panel-edge:   #d9d2c4;
    --rule:         #c9c1b0;
    --text:         #1a1f24;
    --text-muted:   #4b5563;
    --text-faint:   #6b7280;
    --accent:       #b85f24;       /* tieferes oxidiertes Orange fuer Kontrast */
    --accent-warm:  #d97735;
    --accent-deep:  #8c4419;
    --blueprint:    #2e6680;       /* dunklerer Blueprint-Ton */
    --blueprint-faint: #d6e4ed;
    --ok:           #4a8f4e;
    --warn:         #a87f1d;
    --grid-line:    rgba(46,102,128,.05);
    --shadow:       0 1px 0 rgba(255,255,255,.7) inset, 0 8px 22px rgba(46,46,46,.10);
    --topbar-bg:    rgba(244,239,231,.9);
    --code-bg:      rgba(46,102,128,.08);
    --pre-bg:       #1a1f24;       /* Code-Blocks bleiben dunkel — bessere Lesbarkeit fuer Code */
    --pre-text:     #e8e4dd;
    --notif-bg:     rgba(184,95,36,.10);
    --notif-bg-warn: rgba(168,127,29,.10);
    --notif-bg-ok:   rgba(74,143,78,.10);
    --notif-bg-info: rgba(46,102,128,.08);
}

/* Dark ist Default; Light nur bei explizitem data-theme="light"
   (kein Auto-Wechsel via prefers-color-scheme, weil das den Werks-Look
   beim ersten Besuch zerstoeren wuerde). */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text);
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-warm); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

code, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
code { background: var(--code-bg); padding: 1px 6px; border-radius: 3px; font-size: .92em; color: var(--blueprint); }

h1, h2, h3 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.1;
    margin: 0 0 .4em;
    color: var(--text);
}

h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; font-weight: 700; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* --- Top bar --- */
.topbar {
    border-bottom: 1px solid var(--rule);
    background: var(--topbar-bg);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    max-width: 1180px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}
.brand-mark {
    width: 28px; height: 28px;
    border: 1.5px solid var(--accent);
    border-radius: 3px;
    position: relative;
    flex-shrink: 0;
}
.brand-mark::before, .brand-mark::after {
    content: ''; position: absolute; background: var(--accent);
}
.brand-mark::before { left: 6px; top: 6px; right: 6px; height: 2px; }
.brand-mark::after  { left: 6px; bottom: 6px; right: 6px; height: 2px; }
.brand .v2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    color: var(--accent);
    border: 1px solid var(--accent-deep);
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 4px;
    letter-spacing: .08em;
    font-weight: 500;
}
.nav { display: flex; gap: 20px; font-size: .95rem; }
.nav a { color: var(--text-muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.primary {
    color: var(--bg-deep);
    background: var(--accent);
    padding: 7px 14px;
    border-radius: 3px;
    font-weight: 600;
}
.nav a.primary:hover { background: var(--accent-warm); text-decoration: none; }
@media (max-width: 720px) {
    .nav a:not(.primary) { display: none; }
}

/* --- Beta-banner --- */
.beta-banner {
    background: var(--notif-bg);
    border-bottom: 1px solid var(--accent-deep);
    color: var(--accent);
    font-size: .85rem;
    text-align: center;
    padding: 8px 16px;
    font-family: 'JetBrains Mono', monospace;
}
.beta-banner strong { color: var(--accent); }

/* --- Hero --- */
.hero {
    padding: 80px 0 60px;
    position: relative;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 64px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: 48px 0 40px; }
}

.hero-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    color: var(--blueprint);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-eyebrow::before {
    content: '';
    width: 28px; height: 1px;
    background: var(--blueprint);
}

.hero h1 .accent { color: var(--accent); }
.hero h1 .line-break { display: block; }

.hero-lead {
    margin-top: 22px;
    font-size: 1.18rem;
    color: var(--text-muted);
    max-width: 38em;
    line-height: 1.55;
}

.hero-cta {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 3px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .98rem;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .12s, background .12s;
}
.cta.primary {
    background: var(--accent);
    color: var(--bg-deep);
}
.cta.primary:hover {
    background: var(--accent-warm);
    text-decoration: none;
    transform: translateY(-1px);
}
.cta.ghost {
    border-color: var(--rule);
    color: var(--text);
    background: transparent;
}
.cta.ghost:hover {
    border-color: var(--blueprint);
    color: var(--blueprint);
    text-decoration: none;
}
.cta .arrow { transition: transform .15s; }
.cta:hover .arrow { transform: translateX(2px); }

/* --- Hero animation: Fabrikstraße --- */
.fabrik-anim {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 6px;
    padding: 28px 24px 18px;
    position: relative;
    box-shadow: var(--shadow);
}
.fabrik-anim::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 6px;
    pointer-events: none;
    background:
        linear-gradient(135deg, transparent 0 calc(100% - 22px), var(--accent-deep) calc(100% - 22px) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    padding: 1px;
}
.fabrik-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--text-faint);
    letter-spacing: .12em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fabrik-label .dot {
    width: 7px; height: 7px; background: var(--accent); border-radius: 50%;
    display: inline-block; margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(217,119,53,.6);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0   rgba(217,119,53,.6); }
    70%  { box-shadow: 0 0 0 9px rgba(217,119,53,0);  }
    100% { box-shadow: 0 0 0 0   rgba(217,119,53,0);  }
}

.fabrik-svg { width: 100%; height: auto; display: block; }
.fabrik-svg .belt { fill: var(--rule); }
.fabrik-svg .belt-line { stroke: var(--text-faint); stroke-width: 1; stroke-dasharray: 6 6; }
.fabrik-svg .station-frame { fill: none; stroke: var(--blueprint); stroke-width: 1.4; }
.fabrik-svg .station-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    fill: var(--text-faint);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.fabrik-svg .blueprint-line { stroke: var(--blueprint); stroke-width: 1.2; fill: none; }
.fabrik-svg .blueprint-fill { fill: var(--blueprint-faint); stroke: var(--blueprint); stroke-width: 1; }
.fabrik-svg .gear { fill: var(--text-faint); }
.fabrik-svg .gear-active { fill: var(--accent); }
.fabrik-svg .stamp { fill: var(--ok); }
.fabrik-svg .stamp-text { fill: var(--ok); font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700; }
.fabrik-svg .commit-doc { fill: var(--panel); stroke: var(--text-faint); stroke-width: 1; }

/* Workpiece animation along the belt */
.fabrik-svg .workpiece {
    fill: var(--accent);
    animation: travel 9s ease-in-out infinite;
}
@keyframes travel {
    0%   { transform: translateX(0);   opacity: 0; }
    8%   { opacity: 1; }
    25%  { transform: translateX(0);   opacity: 1; }
    35%  { transform: translateX(165px); opacity: 1; }
    55%  { transform: translateX(165px); opacity: 1; }
    65%  { transform: translateX(330px); opacity: 1; }
    92%  { transform: translateX(330px); opacity: 1; }
    100% { transform: translateX(330px); opacity: 0; }
}
/* Gear rotation */
.fabrik-svg .gear-rotate {
    transform-origin: center;
    transform-box: fill-box;
    animation: spin 4s linear infinite;
}
.fabrik-svg .gear-rotate.reverse {
    animation-direction: reverse;
    animation-duration: 6s;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* Station highlight pulses to match workpiece */
.fabrik-svg .station-1 .station-frame { animation: highlight 9s linear infinite; }
.fabrik-svg .station-2 .station-frame { animation: highlight 9s linear infinite -3s; }
.fabrik-svg .station-3 .station-frame { animation: highlight 9s linear infinite -6s; }
@keyframes highlight {
    0%, 24%      { stroke: var(--blueprint); stroke-width: 1.4; }
    25%, 33%     { stroke: var(--accent); stroke-width: 2.4; }
    34%, 100%    { stroke: var(--blueprint); stroke-width: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
    .fabrik-svg .workpiece,
    .fabrik-svg .gear-rotate,
    .fabrik-svg .station-1 .station-frame,
    .fabrik-svg .station-2 .station-frame,
    .fabrik-svg .station-3 .station-frame,
    .fabrik-label .dot { animation: none; }
    .fabrik-svg .workpiece { opacity: 1; transform: translateX(165px); }
}

.fabrik-foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--rule);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-faint);
}
.fabrik-foot strong { display: block; color: var(--text); margin-top: 2px; text-transform: none; font-family: 'Inter', sans-serif; font-weight: 600; font-size: .95rem; letter-spacing: 0; }

/* --- Section divider (engineer style) --- */
.tech-rule {
    height: 28px;
    margin: 32px 0;
    position: relative;
    display: flex;
    align-items: center;
}
.tech-rule::before {
    content: '';
    flex: 1;
    height: 1px;
    background:
        repeating-linear-gradient(90deg, var(--rule) 0 8px, transparent 8px 16px);
}
.tech-rule .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    color: var(--text-faint);
    padding: 0 14px;
    letter-spacing: .18em;
    text-transform: uppercase;
}

/* --- Three killer points --- */
.three {
    padding: 80px 0;
}
.three-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 900px) {
    .three-grid { grid-template-columns: 1fr; }
}
.three-card {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 5px;
    padding: 28px 24px 26px;
    position: relative;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.three-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}
.three-card:hover h3 { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
    .three-card { transition: border-color .18s ease, box-shadow .18s ease; }
    .three-card:hover { transform: none; }
}
.three-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--accent);
    letter-spacing: .14em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.three-num::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--accent-deep);
    opacity: .5;
}
.three-card h3 { font-size: 1.3rem; line-height: 1.2; margin-bottom: 12px; }
.three-card p { margin: 0; color: var(--text-muted); font-size: .98rem; line-height: 1.55; }
.three-card .corner {
    position: absolute;
    top: 0; right: 0;
    width: 16px; height: 16px;
    border-top: 1.5px solid var(--accent);
    border-right: 1.5px solid var(--accent);
    transition: width .18s ease, height .18s ease;
}
.three-card:hover .corner { width: 28px; height: 28px; }

/* --- Flow diagram (gespreizte Schritt-Boxen statt ASCII-pre) --- */
.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 16px;
    margin: 20px 0 24px;
}
.flow-step {
    flex: 1 1 140px;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    background: var(--code-bg);
    border: 1px solid var(--rule);
    border-left: 2px solid var(--accent);
    border-radius: 4px;
}
.flow-stage {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--text);
}
.flow-tbl {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: .78rem;
    color: var(--blueprint);
    line-height: 1.6;
}
.flow-arrow {
    align-self: center;
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 1.25rem;
}
@media (max-width: 720px) {
    .flow { flex-direction: column; gap: 10px; }
    .flow-arrow { transform: rotate(90deg); align-self: flex-start; margin-left: 22px; }
}

/* --- Live status strip --- */
.status-strip {
    background: var(--bg-deep);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 22px 0;
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    font-family: 'JetBrains Mono', monospace;
}
@media (max-width: 720px) {
    .status-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.status-item .label {
    font-size: .7rem;
    color: var(--text-faint);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.status-item .value {
    font-size: 1.1rem;
    color: var(--text);
    font-weight: 500;
    letter-spacing: .02em;
}
.status-item .value.ok { color: var(--ok); }
.status-item .value.accent { color: var(--accent); }

/* --- Was die Fabrik macht --- */
.werks {
    padding: 80px 0;
}
.werks-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 64px;
    align-items: start;
}
@media (max-width: 900px) {
    .werks-grid { grid-template-columns: 1fr; gap: 32px; }
}
.werks-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
}
.werks-list li {
    padding: 18px 0;
    border-bottom: 1px dashed var(--rule);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: start;
}
.werks-list li:last-child { border-bottom: 0; }
.werks-list .icon {
    width: 38px; height: 38px;
    border: 1.4px solid var(--blueprint);
    border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    color: var(--blueprint);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: .85rem;
    background: var(--notif-bg-info);
    flex-shrink: 0;
}
.werks-list h3 { margin: 0 0 4px; font-size: 1.05rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.werks-list p { margin: 0; color: var(--text-muted); font-size: .95rem; }
.werks-list p code { font-size: .85em; }

/* --- Author / Bauherr --- */
.author {
    padding: 70px 0;
    background: var(--bg-deep);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.author-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 44px;
    align-items: start;
}
.author-photo { width: 200px; }
@media (max-width: 700px) {
    .author-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
}
.author-photo {
    width: 180px;
    aspect-ratio: 4 / 5;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
    background: var(--panel);
    position: relative;
    margin: 0 auto;
}
.author-photo::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 1px dashed var(--rule);
    pointer-events: none;
}
.author-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--blueprint);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.author h2 { margin: 0 0 10px; font-size: 1.6rem; }
.author p { color: var(--text-muted); margin: 0 0 12px; max-width: 60em; }
.author .author-links {
    margin-top: 14px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
}

/* --- Footer --- */
footer {
    padding: 44px 0 60px;
    color: var(--text-faint);
    font-size: .85rem;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-grid .links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-grid a { color: var(--text-muted); }
.footer-meta {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--rule);
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--text-faint);
    letter-spacing: .08em;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* === Content-page-Styles (Unterseiten /v2/*.html) === */
.page-hero {
    padding: 64px 0 36px;
    border-bottom: 1px solid var(--rule);
}
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.page-hero .hero-lead { max-width: 50em; margin-top: 14px; }
.content { padding: 56px 0 80px; }
.content-grid { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .content-grid { grid-template-columns: 1fr; gap: 24px; } }

/* Sidebar (Inhaltsverzeichnis pro Seite) */
.toc {
    position: sticky; top: 80px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .82rem;
}
.toc h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    color: var(--text-faint);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 12px;
    font-weight: 500;
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: tocnum; }
.toc li { counter-increment: tocnum; margin: 0 0 4px; }
.toc a {
    display: block;
    padding: 6px 0 6px 28px;
    position: relative;
    color: var(--text-muted);
    border-left: 1px solid var(--rule);
    margin-left: 4px;
    transition: color .12s, border-color .12s;
}
.toc a::before {
    content: counter(tocnum, decimal-leading-zero);
    position: absolute;
    left: 8px;
    color: var(--text-faint);
    font-size: .68rem;
}
.toc a:hover { color: var(--accent); border-left-color: var(--accent); text-decoration: none; }
.toc a:hover::before { color: var(--accent); }

/* Generische Werks-Karten */
.werk-card {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 5px;
    padding: 26px 28px;
    margin-bottom: 22px;
    position: relative;
}
.werk-card.with-corner::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 14px; height: 14px;
    border-top: 1.5px solid var(--accent);
    border-right: 1.5px solid var(--accent);
}
.werk-card h2 { font-size: 1.45rem; margin-top: 0; margin-bottom: 12px; }
.werk-card h3 { font-size: 1.1rem; font-family: 'Inter', sans-serif; font-weight: 600; margin: 22px 0 8px; }
.werk-card p { color: var(--text-muted); margin: 0 0 12px; }
.werk-card p:last-child, .werk-card ul:last-child, .werk-card ol:last-child { margin-bottom: 0; }
.werk-card ul, .werk-card ol { color: var(--text-muted); padding-left: 22px; }
.werk-card ul li, .werk-card ol li { margin: 6px 0; }
.werk-card ul li::marker { color: var(--accent); }
.werk-card strong { color: var(--text); }
.werk-card em { color: var(--blueprint); font-style: italic; }
.werk-card a { color: var(--accent-warm); }
.werk-card pre {
    background: var(--pre-bg);
    color: var(--pre-text);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 14px 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: .85rem;
    line-height: 1.5;
    margin: 14px 0;
}

/* Tabellen */
.werk-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: .92rem;
}
.werk-card thead th {
    text-align: left;
    background: var(--bg-deep);
    color: var(--text);
    font-weight: 600;
    padding: 10px 12px;
    border-bottom: 1px solid var(--rule);
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.werk-card tbody td {
    padding: 9px 12px;
    border-bottom: 1px dashed var(--rule);
    color: var(--text-muted);
    vertical-align: top;
}
.werk-card tbody td code { font-size: .85em; }
.werk-card tbody tr:last-child td { border-bottom: 0; }

/* Pillen / Tags */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.pill {
    display: inline-block;
    background: var(--bg-deep);
    border: 1px solid var(--rule);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
}
.pill.accent { border-color: var(--accent-deep); color: var(--accent-warm); }

/* Hinweisboxen */
.note {
    background: var(--notif-bg-info);
    border-left: 3px solid var(--blueprint);
    padding: 14px 18px;
    margin: 14px 0;
    border-radius: 0 3px 3px 0;
    color: var(--text-muted);
}
.note strong { color: var(--blueprint); }
.note.warn {
    background: var(--notif-bg-warn);
    border-left-color: var(--warn);
}
.note.warn strong { color: var(--warn); }
.note.ok {
    background: var(--notif-bg-ok);
    border-left-color: var(--ok);
}
.note.ok strong { color: var(--ok); }

/* Release-Karten in news.html */
.release {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 5px;
    padding: 28px 30px;
    margin-bottom: 22px;
    position: relative;
}
.release.featured::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--accent);
    border-radius: 5px 0 0 5px;
}
.release-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .8rem;
}
.release-version {
    background: var(--notif-bg);
    color: var(--accent);
    border: 1px solid var(--accent-deep);
    padding: 3px 10px;
    border-radius: 2px;
    font-weight: 600;
}
.release-date { color: var(--text-faint); }
.release-badge {
    background: var(--notif-bg-ok);
    color: var(--ok);
    border: 1px solid var(--ok);
    padding: 3px 10px;
    border-radius: 2px;
    font-size: .72rem;
    letter-spacing: .08em;
}
.release h2 { font-size: 1.45rem; margin: 0 0 10px; }
.release h3 { font-size: 1rem; margin-top: 20px; color: var(--accent-warm); font-family: 'Inter', sans-serif; font-weight: 600; }
.release p { color: var(--text-muted); margin: 0 0 12px; }
.release ul { color: var(--text-muted); padding-left: 22px; }
.release ul li { margin: 6px 0; }
.release ul li::marker { color: var(--accent); }
.release strong { color: var(--text); }
.release em { color: var(--blueprint); font-style: italic; }

/* FAQ Kategorien */
.faq-section { margin-bottom: 42px; }
.faq-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
}
.faq-section-header .num {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: var(--accent);
    letter-spacing: .14em;
    padding: 3px 9px;
    border: 1px solid var(--accent-deep);
    border-radius: 2px;
}
.faq-section-header h2 { font-size: 1.4rem; margin: 0; }
.faq-q {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--rule);
}
.faq-q:last-child { border-bottom: 0; }
.faq-q h3 {
    font-size: 1.02rem;
    margin: 0 0 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}
.faq-q p { color: var(--text-muted); margin: 0 0 8px; }
.faq-q ul, .faq-q ol { color: var(--text-muted); padding-left: 22px; margin: 8px 0; }

/* Demo-Tour-Schritte */
.step-list {
    list-style: none;
    counter-reset: stepnum;
    padding: 0;
    margin: 0;
}
.step-list li {
    counter-increment: stepnum;
    padding: 20px 0;
    border-bottom: 1px dashed var(--rule);
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 22px;
    align-items: start;
}
.step-list li:last-child { border-bottom: 0; }
.step-list li::before {
    content: counter(stepnum, decimal-leading-zero);
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    padding-top: 2px;
}
.step-list h3 { margin: 0 0 6px; font-size: 1.1rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.step-list p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* Quick-Links auf Index (page hero, optional) */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.quick-links a {
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .82rem;
    text-decoration: none;
}
.quick-links a:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

/* === Theme-Toggle (Dark/Light) === */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 6px 10px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    letter-spacing: .08em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: border-color .12s, color .12s;
    margin-left: 6px;
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    width: 14px; height: 14px;
    display: inline-block;
}
:root[data-theme="light"] .theme-toggle .icon-moon,
:root:not([data-theme]) .theme-toggle .icon-moon { display: inline-block; }
:root[data-theme="light"] .theme-toggle .icon-sun,
:root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
    :root:not([data-theme]) .theme-toggle .icon-sun { display: none; }
    :root:not([data-theme]) .theme-toggle .icon-moon { display: inline-block; }
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-toggle .icon-sun { display: inline-block; }
    :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}

/* === Logo im Topbar (Icon + Text-Wordmark) === */
.brand-icon {
    height: 36px;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.brand-wordmark {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    letter-spacing: -.005em;
}
@media (max-width: 480px) {
    .brand-wordmark { display: none; }
}

/* === Logo im Footer (full image mit Text) === */
.brand-logo {
    height: 34px;
    width: auto;
    display: block;
    flex-shrink: 0;
    max-width: 220px;
}

/* === Sprachumschaltung DE/EN === */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--rule);
    border-radius: 3px;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    font-size: .78rem;
    margin-right: 4px;
}
.lang-switch a,
.lang-switch span {
    padding: 6px 9px;
    text-decoration: none;
    color: var(--text-muted);
    letter-spacing: .08em;
    font-weight: 500;
    transition: background .12s, color .12s;
}
.lang-switch a:hover {
    background: var(--notif-bg);
    color: var(--accent);
}
.lang-switch .active {
    background: var(--accent);
    color: var(--bg-deep);
    font-weight: 600;
}
:root[data-theme="light"] .lang-switch .active {
    color: #ffffff;
}

/* ============================================================
   Doku-Komponenten (v0.18.0 Doku-Aufwertung)
   Screenshot-Rahmen im App-Fenster-Look, Voraussetzungs-Checkliste,
   Schritt-Meta. Blueprint-konform, in allen Anleitungen wiederverwendet.
   ============================================================ */

/* Screenshot / Abbildung mit dezenter App-Fenster-Chrome */
figure.shot { margin: 24px 0; }
figure.shot.tight { margin: 14px 0 4px; }
.shot-frame {
    border: 1px solid var(--panel-edge);
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.shot-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border-bottom: 1px solid var(--rule);
    background: var(--bg-deep);
    font-family: 'JetBrains Mono', monospace;
    font-size: .68rem;
    letter-spacing: .03em;
    color: var(--text-faint);
}
.shot-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); flex: none; }
.shot-bar .dot:nth-child(1) { background: var(--accent-deep); }
.shot-bar .url {
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 4px;
    background: var(--code-bg);
    color: var(--text-muted);
}
.shot-frame img { display: block; width: 100%; height: auto; }
figure.shot figcaption {
    margin-top: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-size: .74rem;
    line-height: 1.5;
    color: var(--text-faint);
    letter-spacing: .01em;
}
figure.shot figcaption b { color: var(--accent); font-weight: 500; }

/* Voraussetzungs-Checkliste (abhakbare Optik) */
.checklist { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 11px; }
.checklist li {
    position: relative;
    padding-left: 39px;
    min-height: 23px;
    color: var(--text-muted);
    font-size: .96rem;
    line-height: 1.5;
}
.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    border-radius: 6px;
    background: var(--notif-bg-ok);
    border: 1px solid var(--rule);
    color: var(--ok);
    font-size: .82rem;
    font-weight: 700;
}
.checklist li strong { color: var(--text); font-weight: 600; }

/* Geschätzte-Zeit / Meta-Chips unter einem Hero */
.meta-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.meta-chips .chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--panel-edge);
    border-radius: 999px;
    background: var(--panel);
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    letter-spacing: .04em;
    color: var(--text-muted);
}
.meta-chips .chip b { color: var(--accent); font-weight: 500; }

/* „Zwei Wege"-Auswahlkarten (Weg A / Weg B) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.choice-card {
    border: 1px solid var(--panel-edge);
    border-radius: 7px;
    background: var(--bg-deep);
    padding: 20px 22px;
    position: relative;
}
.choice-card .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blueprint);
    display: inline-block;
    margin-bottom: 8px;
}
.choice-card.recommended { border-color: color-mix(in srgb, var(--accent) 45%, var(--panel-edge)); }
.choice-card.recommended .tag { color: var(--accent); }
.choice-card h3 { margin: 0 0 8px; font-family: 'Inter', sans-serif; font-size: 1.05rem; font-weight: 600; }
.choice-card p { margin: 0; color: var(--text-muted); font-size: .92rem; }

/* Bauherr-Monogramm — On-brand-Fallback, wenn (noch) kein Portrait vorliegt */
.author-monogram {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 22px 22px,
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 22px 22px,
        radial-gradient(120% 85% at 50% 0%, rgba(217,119,53,.12), transparent 62%),
        var(--bg-deep);
}
.author-monogram .mono-initials {
    font-family: 'Fraunces', serif;
    font-weight: 900;
    font-size: 3.7rem;
    letter-spacing: -.02em;
    color: var(--accent);
    line-height: 1;
}
.author-monogram .mono-mark {
    font-size: 1.05rem;
    color: var(--blueprint);
    letter-spacing: .3em;
}

/* Responsive Tabellen: breite Tabellen scrollen in ihrer EIGENEN Box,
   statt die Spalten wort-für-wort zu quetschen oder die Seite horizontal
   zu sprengen. (v0.18.0 Doku-Fix) */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
    max-width: 100%;
}
.table-scroll > table { margin: 0; min-width: 560px; }

/* ============================================================
   Mobile-Härtung (v0.18.0): kein horizontaler Seiten-Überlauf.
   - lange Tokens/URLs dürfen umbrechen
   - alle <pre> scrollen in sich (auch außerhalb .werk-card)
   - Grid-Spuren dürfen unter ihre Inhaltsbreite schrumpfen (min-width:0),
     damit scrollbare <pre> die Spalte nicht sprengen
   ============================================================ */
pre { max-width: 100%; overflow-x: auto; }
code { overflow-wrap: anywhere; }
.content a, .content p, .content li { overflow-wrap: anywhere; }
.step-list li > div { min-width: 0; }
.sample-cols > div { min-width: 0; }
.po-card { min-width: 0; }
.po-card pre { overflow-x: auto; }

/* Zwei-Spalten-Band (Text + CTAs), das auf Mobil auf eine Spalte kollabiert */
.split-band { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
@media (max-width: 640px) { .split-band { grid-template-columns: 1fr; } }
