/* bloqy Dokumentation: Farben und Schriften wie der Admin-Bereich (Grau + Koralle), hell und dunkel. */
@font-face { font-family: "Plus Jakarta Sans"; src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
    --bg: #F7F7F8; --surface: #FFFFFF; --sunken: #EEEFF1; --text: #14161B; --muted: #50545D; --border: #DFE1E5;
    --accent: #D63F17; --accent-soft: #FFF4F0; --accent-text: #AE3110;
    --note: #EEF4FB; --note-text: #1E4E7C; --tip: #EEF8F1; --tip-text: #1C6234; --warn: #FFF7E6; --warn-text: #7A4B00;
    --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0F1115; --surface: #181A20; --sunken: #0B0C10; --text: #F3F4F6; --muted: #A3A7B0; --border: #2A2D35;
        --accent: #F2552C; --accent-soft: #2A1610; --accent-text: #FF9B7A;
        --note: #14202C; --note-text: #9CC4EA; --tip: #13231A; --tip-text: #94D3A8; --warn: #2A2110; --warn-text: #F0C46E;
        color-scheme: dark;
    }
    .brand img { filter: invert(1) hue-rotate(180deg); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--sans); }
a { color: var(--accent-text); }
a:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
code, kbd { font-family: var(--mono); font-size: .88em; background: var(--sunken); border-radius: 4px; padding: .1em .35em; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; }
pre { background: var(--sunken); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: .88rem; }
pre code { background: none; padding: 0; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: .5rem; z-index: 10; background: var(--surface); padding: .5rem 1rem; }

.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding: .75rem max(16px, calc((100% - 1200px) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 600; }
.brand span { color: var(--muted); font-weight: 500; }
.areas { display: flex; flex-wrap: wrap; gap: .25rem; }
.areas a { padding: .35rem .75rem; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.areas a:hover { background: var(--sunken); }
.areas a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }

.frame { max-width: 1200px; margin: 0 auto; padding: 2rem 16px 4rem; }
.frame.has-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3rem; }
.side { position: sticky; top: 4.5rem; align-self: start; max-height: calc(100vh - 6rem); overflow-y: auto; font-size: .92rem; }
.side ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.side li a, .side-home { display: block; padding: .25rem .6rem; border-radius: 6px; color: var(--text); text-decoration: none; }
.side li a:hover, .side-home:hover { background: var(--sunken); }
.side .is-current { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.side-home { font-weight: 600; margin-bottom: .75rem; }
.side-group { margin: 1rem 0 .3rem .6rem; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

main { min-width: 0; max-width: 780px; }
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; color: var(--muted); font-size: .88rem; margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }
h1 { font-size: clamp(1.7rem, 4vw, 2.25rem); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 .6rem; line-height: 1.3; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 .4rem; }
.eyebrow { margin: 0 0 .25rem; color: var(--accent-text); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 1.75rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .3rem; }
/* Labels of the interface (buttons, tabs, fields) look like a small button */
.ui { display: inline-block; padding: 0 .45em; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-weight: 600; font-size: .92em; line-height: 1.6; white-space: nowrap; }
.ui img.icon { margin-left: 0; }
/* Diagrams (inline SVG) */
figure.diagram, .diagram svg { max-width: 100%; height: auto; }
figure.diagram { margin: 1.5rem 0; padding: 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }

ol.steps { counter-reset: step; list-style: none; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin-bottom: .9rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: .05rem; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; font-size: .9rem; }

.note, .tip, .warn { border-radius: 10px; padding: .85rem 1.1rem; margin: 1.25rem 0; }
.note { background: var(--note); color: var(--note-text); }
.tip { background: var(--tip); color: var(--tip-text); }
.warn { background: var(--warn); color: var(--warn-text); }
.note > :last-child, .tip > :last-child, .warn > :last-child { margin-bottom: 0; }
.note strong:first-child, .tip strong:first-child, .warn strong:first-child { display: block; margin-bottom: .2rem; }

figure.shot { margin: 1.5rem 0; }
figure.shot img { display: block; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
figure.shot figcaption { margin-top: .5rem; color: var(--muted); font-size: .88rem; }

table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--sunken); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: .75rem; margin: .75rem 0 1.5rem; }
.card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; }
.card:hover { border-color: var(--accent); }
.card strong { font-size: 1rem; }
.card span { color: var(--muted); font-size: .9rem; line-height: 1.5; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.pager a { display: flex; flex-direction: column; padding: .75rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); font-weight: 500; }
.pager .next { text-align: right; grid-column: 2; }

.foot { border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; text-align: center; padding: 1.5rem 16px; }

@media (max-width: 900px) {
    /* Content first, the navigation of the area below it */
    .frame.has-side { display: flex; flex-direction: column; }
    .side { order: 2; position: static; max-height: none; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
    .side ul { columns: 2; column-gap: 1rem; }
}
@media (max-width: 560px) {
    .side ul { columns: 1; }
    .pager { grid-template-columns: 1fr; }
    .pager .next { grid-column: 1; }
}

/* Symbole der Oberfläche im Text und in Symbol-Tabellen */
img.icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; margin: 0 .1em; }
@media (prefers-color-scheme: dark) { img.icon { filter: invert(1); } }
table.icons td:first-child { width: 3rem; text-align: center; }
table.icons img.icon { width: 1.4em; height: 1.4em; }
.swatch { display: inline-block; width: .9em; height: .9em; border-radius: 50%; vertical-align: -.1em; margin-right: .3em; }

/* Suche im Kopf und Ergebnisseite */
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search input { width: 100%; padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--surface); }
.search-results { position: absolute; right: 0; top: calc(100% + .4rem); width: min(440px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .14); padding: .35rem; z-index: 20; }
.search-hit { display: flex; flex-direction: column; gap: .1rem; padding: .6rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.search-hit:hover, .search-hit:focus { background: var(--sunken); outline: none; }
.search-hit small { color: var(--muted); font-size: .75rem; }
.search-hit span { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.search-hit mark { background: var(--accent-soft); color: var(--accent-text); border-radius: 3px; padding: 0 .1em; }
.search-all { display: block; padding: .6rem .75rem; font-weight: 600; text-decoration: none; }
.search-none { margin: 0; padding: .75rem; color: var(--muted); }
.search-page .search-hit { padding: 1rem 0; border-bottom: 1px solid var(--border); border-radius: 0; }
.search-page .search-hit:hover { background: none; }
.search-page .search-hit strong { font-size: 1.1rem; color: var(--accent-text); }
@media (max-width: 760px) { .search { max-width: none; order: 3; flex-basis: 100%; } }
