/* ============================================================
   Self-hosted IBM Plex (DSGVO/GDPR-compliant)
   ============================================================ */
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/-F63fjptAgt5VM-kVkqdyU8n1iIq131nj-otFQ.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/-F63fjptAgt5VM-kVkqdyU8n1isq131nj-otFQ.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/-F63fjptAgt5VM-kVkqdyU8n1iAq131nj-otFQ.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/-F63fjptAgt5VM-kVkqdyU8n1iEq131nj-otFQ.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl1FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwlRFgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl9FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwl5FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgsAXHNk.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl1FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwlRFgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl9FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwl5FgsAXHNlYzg.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/-F6qfjptAgt5VM-kVkqdyU8n3vAOwlBFgsAXHNk.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYbSB4Zh.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYbSB4Zh.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYbSB4Zh.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxTKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxaKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxdKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxRKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxQKYbSB4ZhRNU.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/zYXzKVElMYYaJe8bpLHnCwDKr932-G7dytD-Dmu1syxeKYbSB4Zh.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Textnetz Publisher — Design Tokens & Components
   Extract this block to public/assets/app.css
   ============================================================ */

:root {
  /* --- Color: Warm neutrals (light) --- */
  --bg:           oklch(98.6% 0.005 75);   /* page bg, warm off-white */
  --surface:      oklch(100% 0 0);         /* cards */
  --surface-2:    oklch(97.2% 0.006 75);   /* sunken / table header */
  --surface-3:    oklch(94.8% 0.008 75);   /* hover */
  --line:         oklch(91% 0.008 75);     /* hairlines */
  --line-strong:  oklch(85% 0.01 75);

  --ink:          oklch(22% 0.012 75);     /* primary text */
  --ink-muted:    oklch(46% 0.012 75);     /* secondary */
  --ink-subtle:   oklch(62% 0.012 75);     /* tertiary, captions */
  --ink-disabled: oklch(76% 0.008 75);

  /* --- Accent: muted petrol (single brand accent) --- */
  --accent:       oklch(48% 0.07 200);
  --accent-hover: oklch(43% 0.08 200);
  --accent-bg:    oklch(95% 0.02 200);
  --accent-line:  oklch(82% 0.04 200);
  --accent-ink:   oklch(38% 0.08 200);

  /* --- Status (desaturated, accessible) --- */
  --ok:        oklch(52% 0.11 150);
  --ok-bg:     oklch(95% 0.03 150);
  --ok-line:   oklch(82% 0.06 150);

  --warn:      oklch(58% 0.12 75);
  --warn-bg:   oklch(96% 0.04 75);
  --warn-line: oklch(85% 0.07 75);

  --err:       oklch(52% 0.16 25);
  --err-bg:    oklch(96% 0.03 25);
  --err-line:  oklch(85% 0.06 25);

  --info:      oklch(50% 0.10 245);
  --info-bg:   oklch(96% 0.025 245);
  --info-line: oklch(84% 0.05 245);

  --opt:       oklch(48% 0.13 305);   /* lila — optional action */
  --opt-bg:    oklch(96% 0.03 305);
  --opt-line:  oklch(85% 0.06 305);

  /* --- Type --- */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-xs:   11px;
  --fs-sm:   12px;
  --fs-base: 13px;
  --fs-md:   14px;
  --fs-lg:   16px;
  --fs-xl:   19px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;

  --lh-tight: 1.2;
  --lh-snug:  1.35;
  --lh-base:  1.5;

  /* --- Spacing (4px base) --- */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-7:  32px;
  --s-8:  40px;
  --s-9:  56px;
  --s-10: 72px;

  /* --- Radius --- */
  --r-sm: 3px;
  --r-md: 5px;
  --r-lg: 8px;
  --r-xl: 12px;

  /* --- Shadow --- */
  --sh-1: 0 1px 0 0 oklch(0% 0 0 / 0.04);
  --sh-2: 0 1px 2px 0 oklch(0% 0 0 / 0.05), 0 0 0 1px oklch(0% 0 0 / 0.04);
  --sh-3: 0 6px 16px -4px oklch(0% 0 0 / 0.08), 0 2px 4px -1px oklch(0% 0 0 / 0.06), 0 0 0 1px oklch(0% 0 0 / 0.04);

  /* --- Density (tweakable) --- */
  --row-y: 10px;
  --cell-x: 14px;

  /* --- Plattform-Brand-Farben (offiziell) --- */
  --c-instagram: #E1306C;
  --c-facebook:  #1877F2;
  --c-linkedin:  #0A66C2;
}

/* density */
.density-compact  { --row-y: 7px;  --cell-x: 12px; }
.density-cozy     { --row-y: 10px; --cell-x: 14px; }
.density-comfy    { --row-y: 14px; --cell-x: 16px; }

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* overflow-x: clip statt hidden — verhindert horizontales Ueberlaufen genauso,
   erzeugt aber KEINEN Scroll-Container (hidden zwingt overflow-y auf auto und
   macht body zum Scroller, wodurch position:sticky an der .topbar nicht greift). */
html, body { overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
code, kbd, .mono { font-family: var(--font-mono); font-size: 0.92em; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: var(--lh-snug); color: var(--ink); }
p { margin: 0; }

/* ============================================================
   App chrome
   ============================================================ */
.app {
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: 0 var(--s-6);
  height: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  /* Sticky: bleibt beim Scrollen oben. z-index 90 liegt ueber Content-
     Dropdowns (.action-menu-body z-index 30), aber unter Such-Overlay (1000)
     und Toasts (200). Avatar-Dropdown ist Kind der Topbar und rendert
     dadurch korrekt ueber dem Content. */
  position: sticky;
  top: 0;
  z-index: 90;
}
.brand {
  display: flex; align-items: center; gap: var(--s-2);
  font-weight: 600; font-size: var(--fs-md);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 18px; height: 18px;
  border-radius: var(--r-sm);
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--bg); font-size: 10px; font-weight: 700;
  font-family: var(--font-mono);
}
.brand-name { color: var(--ink); }
.brand-slash { color: var(--ink-subtle); margin: 0 2px; }
.brand-app { color: var(--ink-muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: var(--s-4); }
.nav a {
  padding: 6px 10px; border-radius: var(--r-md);
  color: var(--ink-muted); font-size: var(--fs-base);
}
.nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); background: var(--surface-2); }
/* Gruppen-Trenner zwischen Kreativ / Verwaltung / Kunden (Phase 1 UI-Vereinfachung) */
.nav .nav-sep {
  width: 1px; height: 18px; background: var(--bd-soft);
  margin: 0 var(--s-2); flex: none;
}

.topbar-spacer { flex: 1; }

.topbar-cta {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}

/* Topbar-Activity-Indicator — sichtbar wenn Hintergrund-Jobs laufen */
.topbar-activity {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--info-bg);
  color: var(--info);
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-right: 8px;
  text-decoration: none;
}
.topbar-activity:hover { background: oklch(from var(--info-bg) calc(l - 0.03) c h); text-decoration: none; }
.topbar-activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--info);
  animation: pulse 1.4s ease-in-out infinite;
}
.topbar-activity[hidden] { display: none !important; }

/* ── App-weite Suche: Topbar-Trigger + Overlay ───────────── */
.topbar-search-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--bd-soft);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  margin-right: 8px;
  transition: background-color .12s, color .12s, border-color .12s;
}
.topbar-search-trigger:hover {
  background: var(--surface-1, #fff);
  color: var(--ink);
  border-color: var(--bd);
}
.topbar-search-trigger svg { color: var(--ink-muted); flex-shrink: 0; }
.topbar-search-label { line-height: 1; }
.topbar-search-kbd kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--surface-1, #fff);
  border: 1px solid var(--bd-soft);
  color: var(--ink-muted);
}
@media (max-width: 900px) {
  .topbar-search-label, .topbar-search-kbd { display: none; }
  .topbar-search-trigger { padding: 6px 8px; }
}

body.search-overlay-open { overflow: hidden; }
.search-overlay[hidden] { display: none !important; }
.search-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.search-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 32, 0.55);
  backdrop-filter: blur(4px);
}
.search-overlay-panel {
  position: relative;
  width: min(680px, 92vw);
  background: var(--surface-1, #fff);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 32, 0.32), 0 2px 8px rgba(15, 23, 32, 0.08);
  border: 1px solid var(--bd-soft);
  overflow: hidden;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
}
.search-overlay-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd-soft);
}
.search-overlay-icon { color: var(--ink-muted); flex-shrink: 0; }
.search-overlay-input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 17px;
  color: var(--ink);
  padding: 4px 0;
}
.search-overlay-input::-webkit-search-cancel-button { display: none; }
.search-overlay-hint {
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}
.search-overlay-hint kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 3px;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--bd-soft);
}
.search-overlay-close {
  background: none; border: 0;
  font-size: 22px; line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 0 4px;
}
.search-overlay-close:hover { color: var(--ink); }
.search-overlay-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
}
.search-overlay-placeholder,
.search-overlay-empty {
  padding: 32px 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}
.search-overlay-placeholder kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--bd-soft);
}
.search-overlay-group + .search-overlay-group { margin-top: 6px; }
.search-overlay-group-label {
  padding: 8px 18px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-overlay-group-count {
  font-size: 10px;
  font-weight: 500;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--bd-soft);
  border-radius: 999px;
  padding: 1px 7px;
  color: var(--ink-muted);
  text-transform: none;
  letter-spacing: 0;
}
.search-overlay-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.search-overlay-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 18px;
  color: var(--ink);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.search-overlay-item:hover,
.search-overlay-item.is-active {
  background: var(--surface-2, #f3f4f6);
  border-left-color: var(--info);
  text-decoration: none;
}
.search-overlay-item-title {
  font-weight: 500;
  line-height: 1.3;
}
.search-overlay-item-snippet {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-overlay-item-meta {
  font-size: 11px;
  color: var(--ink-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.search-overlay-item mark {
  background: oklch(94% 0.10 90);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
.search-overlay-foot {
  padding: 10px 18px;
  font-size: 11px;
  color: var(--ink-muted);
  text-align: center;
  border-top: 1px solid var(--bd-soft);
  margin-top: 4px;
}
@media (max-width: 640px) {
  .search-overlay { padding-top: 4vh; }
  .search-overlay-panel { width: 96vw; max-height: 92vh; }
  .search-overlay-hint { display: none; }
}

/* Sub-Nav unter der page-head — Tab-Reihe für sekundäre Sichten (Liste/Kalender, Vorschläge/Sites) */
.subnav {
  display: flex;
  gap: 4px;
  margin: -8px 0 var(--s-5);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.subnav-item {
  padding: 8px 14px;
  font-size: var(--fs-base);
  color: var(--ink-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
}
.subnav-item:hover { color: var(--ink); text-decoration: none; }
.subnav-item.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 500;
}
.user-chip {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-sm); color: var(--ink-muted);
}

.avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
}

/* ===== Dropdown-Menü (Top-Bar Einstellungen) ===== */
.dropdown { position: relative; display: inline-block; }
.dropdown-trigger { display: inline-flex; align-items: center; }
.dropdown-trigger svg { transition: transform .15s ease; }
.dropdown.open .dropdown-trigger svg { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 100;
  opacity: 0;
  transform: translateY(-4px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu li { margin: 0; }
.dropdown-menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--ink);
  font-size: var(--fs-sm);
  text-decoration: none;
  white-space: nowrap;
}
.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.dropdown-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
  list-style: none;
}

/* Trigger-Inhalte: Desktop = Label, Mobile = Avatar-Initialen */
.dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.dropdown-trigger .dt-avatar {
  display: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent-ink);
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  align-items: center; justify-content: center;
}

/* Buttons im Dropdown-Menu */
.dropdown-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--ink);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.dropdown-menu button:hover { background: var(--surface-2); }
.dropdown-menu a.active { background: var(--surface-2); font-weight: 600; }

/* Mobile-only Items im Dropdown — auf Desktop versteckt */
.dm-mobile-only { display: none; }

/* Logout-Form als Menüitem */
.dm-logout-form { margin: 0; padding: 0; }
.dm-logout-form button { width: 100%; }

/* ===== Admin Users Tabelle ===== */
.admin-users-t .inline-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.admin-users-t .user-actions {
  white-space: nowrap;
}
.admin-users-t .user-actions .inline-form + .inline-form { margin-left: 4px; }
.select.sm {
  padding: 4px 26px 4px 8px;
  font-size: 13px;
  height: auto;
  line-height: 1.3;
}
@media (max-width: 640px) {
  .admin-users-t .user-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    white-space: normal;
    width: 100%;
  }
  .admin-users-t .user-actions .inline-form { margin: 0; width: 100%; }
  .admin-users-t .user-actions .inline-form + .inline-form { margin-left: 0; }
  .admin-users-t .user-actions .btn { width: 100%; justify-content: center; }
  .admin-users-t .inline-form { flex-wrap: wrap; }
  .admin-users-t td[data-label="Rolle"] .inline-form { width: 100%; }
  .admin-users-t td[data-label="Rolle"] .select.sm { flex: 1 1 auto; }
}

.content { padding: var(--s-7) var(--s-6); flex: 1; }
.content-narrow { max-width: 560px; margin: 0 auto; }
.content-wide { max-width: 1040px; margin: 0 auto; }

/* ============================================================
   Page header
   ============================================================ */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: var(--fs-2xl);
  letter-spacing: -0.015em;
}
.page-head .sub {
  color: var(--ink-muted);
  font-size: var(--fs-base);
  margin-top: 2px;
}

/* ============================================================
   Layout-Utilities — fuer Templates statt Inline-Styles
   ============================================================ */
.stack         { display: flex; flex-direction: column; gap: var(--s-3); }
.stack.gap-1   { gap: var(--s-1); }
.stack.gap-2   { gap: var(--s-2); }
.stack.gap-4   { gap: var(--s-4); }
.row           { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.row.gap-1     { gap: var(--s-1); }
.row.gap-3     { gap: var(--s-3); }
.row.gap-4     { gap: var(--s-4); }
.row.between   { justify-content: space-between; }
.row.end       { justify-content: flex-end; }
.row.start     { align-items: flex-start; }
.row.nowrap    { flex-wrap: nowrap; }

/* Hstack ist .row ohne Default-Wrap, kompakter gap */
.hstack        { display: flex; align-items: center; gap: var(--s-3); }
.hstack.gap-1  { gap: var(--s-1); }
.hstack.gap-2  { gap: var(--s-2); }
.hstack.wrap   { flex-wrap: wrap; }
.hstack.start  { align-items: flex-start; }
.grid-stats    { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-4); }
.grid-cards    { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-4); align-items: stretch; }
.grid-cards > .card,
.grid-cards > .card + .card { margin-top: 0; }
.grow          { flex: 1; min-width: 0; }
.no-shrink     { flex-shrink: 0; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mt-3          { margin-top: var(--s-3); }
.mt-4          { margin-top: var(--s-4); }
.mt-5          { margin-top: var(--s-5); }
.mb-3          { margin-bottom: var(--s-3); }
.mb-4          { margin-bottom: var(--s-4); }
.mt-0          { margin-top: 0; }
.mt-1          { margin-top: var(--s-1); }
.mt-2          { margin-top: var(--s-2); }
.mt-6          { margin-top: var(--s-6); }
.mb-1          { margin-bottom: var(--s-1); }
.mb-2          { margin-bottom: var(--s-2); }
.mb-5          { margin-bottom: var(--s-5); }
.m-0           { margin: 0; }

/* Inline-Color-Utilities */
.text-err      { color: var(--err); }
.text-warn     { color: var(--warn); }
.text-info     { color: var(--info); }
.text-ok       { color: var(--ok); }
.text-xs       { font-size: 11px; }

/* Row-Modifier */
.row.baseline  { align-items: baseline; }

/* Margin/Padding-Utilities zusaetzlich */
.mr-2          { margin-right: var(--s-2); }
.ml-2          { margin-left: var(--s-2); }
.ml-1          { margin-left: var(--s-1); }

/* Code-Snippet als Block (Passwort-Anzeige, Settings-Code etc.) */
.code-block {
  display: block;
  padding: 10px 14px;
  background: var(--bg2);
  border-radius: var(--r-sm);
  font-size: 14px;
  user-select: all;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-mono, ui-monospace, monospace);
}

/* Center-Layouts (Login, Logout) */
.center-row    { display: flex; justify-content: center; }
.form-narrow   { max-width: 640px; }

/* Logo-Bilder */
.brand-logo-lg { height: 64px; width: 64px; display: block; }
.brand-logo-sm { height: 28px; width: 28px; display: block; }
.brand-link    { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }

/* Text-Utilities */
.text-center   { text-align: center; }
.text-help     { font-size: var(--fs-sm); color: var(--ink-muted); }
.text-eyebrow  { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); font-weight: 500; }

/* Listen-Spacing — gut lesbar fuer Help-/Doku-Listen */
.list-spaced     { line-height: 1.8; }
.list-spaced li  { margin-bottom: 2px; }

/* Code-Block / Shell-Snippet */
.code-snippet {
  background: var(--bg2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-family: var(--font-mono, ui-monospace, monospace);
  overflow-x: auto;
  white-space: pre;
  color: var(--ink);
}

/* Card-Body Varianten */
.card-body.is-centered { text-align: center; }
.card-body.is-compact  { padding: var(--s-2) var(--s-3); }
.card-body.no-pad-top  { padding-top: 0; }
.card-body.no-pad-bottom { padding-bottom: 0; }

/* Flash-Variante: stacked Content statt nebeneinander */
.flash.is-stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
}

/* Card Anchor-Cards (Help): tighter Stack mit Sprungmarken */
.card.is-anchor { scroll-margin-top: 80px; }
.card + .card.is-anchor { margin-top: var(--s-3); }

/* Help-Toc: kompakte Liste mit Einrückung */
.help-toc { padding-left: 18px; margin-top: var(--s-2); }
.help-footer { margin-bottom: var(--s-6); }

/* Cloudflare-Analytics Sparkline (Site-Detail + Dashboard) */
.cf-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 60px;
  padding: 4px 0;
}
.cf-sparkline-lg { height: 120px; }
.cf-spark-bar {
  flex: 1;
  background: var(--accent, oklch(0.55 0.18 250));
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: opacity 80ms;
}
.cf-spark-bar:hover { opacity: 0.7; }

/* Dashboard-Overview */
.kpi-row { margin-bottom: var(--s-5); }
.kpi-tile { position: relative; }
.kpi-tile .kpi-hint {
  margin-top: 4px;
  font-size: var(--fs-xs);
}

/* Analytics-Overview Partial (Dashboard + Seiten) */
.analytics-overview { margin-bottom: var(--s-5); }
.analytics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.analytics-title {
  margin: 0;
  font-size: var(--fs-xl);
  font-weight: 600;
}
.analytics-title .meta { color: var(--ink-muted); font-weight: 400; font-size: var(--fs-base); }

.range-filter {
  display: inline-flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
}
.range-pill {
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 60ms, color 60ms;
}
.range-pill:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.range-pill.is-active { background: var(--ink); color: var(--bg); }
.range-pill.is-active:hover { background: var(--ink); color: var(--bg); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-4);
}
.dashboard-grid .card { margin-top: 0; }

/* Site-Aktivität-Liste auf Dashboard */
.dash-site-list { list-style: none; margin: 0; padding: 0; }
.dash-site-row {
  border-bottom: 1px solid var(--line);
}
.dash-site-row:last-child { border-bottom: none; }
.dash-site-link {
  display: grid;
  grid-template-columns: minmax(100px, 140px) minmax(60px, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px 16px;
  color: inherit;
  text-decoration: none;
}
a.dash-site-link:hover { background: var(--surface-2); }
.dash-site-host {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: var(--fs-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-site-bar-wrap {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.dash-site-bar {
  display: block;
  height: 100%;
  background: var(--accent, oklch(0.55 0.18 250));
  border-radius: 3px;
}
.dash-site-pv {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: var(--fs-sm);
}

/* Kalender-Legende: kompakt unter dem Header */
.card.cal-legend-card { margin-top: var(--s-2); margin-bottom: var(--s-2); }

/* Poll-Indikator (live-Refresh-Hint im Job-Detail) */
.poll-indicator {
  margin-top: var(--s-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.poll-dot { width: 8px; height: 8px; }

/* Stat-Kachel — Zahl groß, Label klein */
.stat-tile        { padding: 4px 0; }
.stat-tile-label  { font-size: var(--fs-xs); color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.stat-tile-value  { font-size: 24px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Site-Card auf der Sites-Uebersicht */
.site-card-title  { display: flex; align-items: center; gap: 8px; min-width: 0; }
.site-card-title a { color: inherit; text-decoration: none; }
.site-card-mono   { width: 26px; height: 26px; font-size: 13px; }
.site-card-meta   { list-style: none; padding: 0; margin: 0 0 var(--s-3); display: grid; gap: 4px; font-size: var(--fs-sm); color: var(--ink-muted); }
.site-card-tags   { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--s-3); }
.site-card-link   { color: inherit; text-decoration: underline; }
.site-card-profile { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.site-card-profile .badge { text-decoration: none; }
.site-card-profile .badge:not(.ok) { opacity: 0.5; }

/* Topic-Suggestion — Karte mit Action-Spalte */
.topic-row        { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.topic-row:last-child { border-bottom: none; }
.topic-row h3     { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.topic-actions    { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.topic-site-head  { padding: 12px 16px; background: var(--surface-2); font-weight: 600; font-family: var(--font-mono); font-size: 13px; }
.topic-site-head .meta { font-weight: 400; margin-left: 8px; }

/* Form-Spinner-Button (data-loading) — Layout-Hilfe */
form.is-loading button[type="submit"] .spinner-dot { color: currentColor; }

/* Empty-State — einheitlicher Look fuer Onboarding-Hinweise */
.empty-state         { padding: var(--s-6); text-align: left; }
.empty-state-title   { font-size: var(--fs-md); font-weight: 600; margin: 0 0 var(--s-3); display: flex; align-items: center; gap: 8px; }
.empty-state-body    { color: var(--ink-muted); line-height: 1.6; max-width: 560px; margin: 0 0 var(--s-3); }
.empty-state-body:last-child { margin-bottom: 0; }
.empty-state-body strong { color: var(--ink); }

/* Inline-Edit-Card auf der Job-Detail — Title/Meta/Excerpt direkt editierbar */
.inline-edit-card .inline-field { display: flex; flex-direction: column; gap: 6px; }
.inline-edit-card .inline-field-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-edit-card .inline-input {
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 100ms ease, background 100ms ease;
}
.inline-edit-card .inline-input:focus {
  outline: none;
  border-color: var(--accent, var(--ink));
  background: var(--surface);
}
.inline-edit-card .inline-input.is-saving {
  background: oklch(from var(--info-bg) l c h / 0.5);
}
.inline-edit-card textarea.inline-input { resize: vertical; min-height: 56px; }
.inline-status-saving { color: var(--ink-muted); }
.inline-status-saved  { color: var(--ok); }
.inline-status-error  { color: var(--err); }

/* Inline-Block-Edit (intro/text/h2/image-alt+caption) im Spec-Card */
.block-edit-card .block-input {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-base);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 100ms ease, background 100ms ease;
}
.block-edit-card .block-input:focus {
  outline: none;
  border-color: var(--accent, var(--ink));
}
.block-edit-card .block-input.is-saving {
  background: oklch(from var(--info-bg) l c h / 0.5);
}
.block-edit-card .block-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
  font-size: var(--fs-base);
}
.block-edit-card input.block-input.h2-text {
  font-weight: 600;
  font-size: var(--fs-md);
}

/* Beiträge-Liste auf dem Dashboard — Listenitems statt dichter Tabelle */
.job-list { list-style: none; margin: 0; padding: 0; }
.job-list-row { border-bottom: 1px solid var(--line); }
.job-list-row:last-child { border-bottom: none; }
.job-list-link {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 14px 16px;
  text-decoration: none; color: inherit;
}
.job-list-link:hover { background: var(--surface-2); text-decoration: none; }
.job-list-main { flex: 1; min-width: 0; }
.job-list-topic {
  font-size: var(--fs-base); font-weight: 500; margin: 0 0 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-list-meta {
  font-size: var(--fs-sm); color: var(--ink-muted);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}

/* Action-Bar im Job-Detail — primary CTA + secondary Buttons + Disclosure */
.action-bar { margin-top: var(--s-5); }
.action-bar .btn.primary.big {
  font-size: 15px; font-weight: 600;
  padding: 11px 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.action-bar-hint { margin: 8px 0 0; }
.secondary-actions { margin-top: var(--s-3); }
.secondary-actions form { display: inline; }
.revise-with-note summary { cursor: pointer; padding: 4px 0; }
.revise-with-note[open] summary { color: var(--ink); }

/* Spec-Card als <details> — der Card-Head wird zum klickbaren Summary */
details.card.spec-card { padding: 0; }
details.card.spec-card > summary {
  cursor: pointer;
  list-style: none;
}
details.card.spec-card > summary::-webkit-details-marker { display: none; }
details.card.spec-card > summary::after {
  content: '▾';
  margin-left: auto;
  color: var(--ink-subtle);
  font-size: 12px;
  transition: transform 150ms ease;
}
details.card.spec-card[open] > summary::after { transform: rotate(180deg); }
details.card.spec-card > summary:hover { background: var(--surface-2); }

/* Crosslink-Liste — kompakte Items mit Hover */
.crosslink-list { list-style: none; margin: 0; padding: 0; }
.crosslink-list li { border-bottom: 1px solid var(--line); }
.crosslink-list li:last-child { border-bottom: none; }
.crosslink-target {
  display: flex; align-items: baseline; gap: var(--s-3); padding: 12px 16px;
  text-decoration: none; color: inherit;
}
.crosslink-target:hover { background: var(--surface-2); text-decoration: none; }
.crosslink-title { font-weight: 500; flex: 1; min-width: 0; }
.crosslink-meta { font-size: var(--fs-sm); color: var(--ink-muted); }

/* Topic-Suggestion Detail-Texte */
.topic-rationale { margin: 0 0 8px; font-size: var(--fs-base); color: var(--ink-muted); line-height: 1.5; }
.topic-h2s       { margin: 6px 0 0; }
.topic-h2s summary { cursor: pointer; }
.topic-h2s ul    { margin: 6px 0 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--ink-muted); }
.topic-meta      { margin-top: 8px; font-size: 11px; color: var(--ink-subtle); }

/* ============================================================
   Cards & sections
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}
.card + .card { margin-top: var(--s-6); }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.card-head h2 {
  font-size: var(--fs-md);
  font-weight: 600;
}
.card-head .meta { color: var(--ink-subtle); font-size: var(--fs-sm); }
.card-body { padding: var(--s-5); }
.card-body.no-pad { padding: 0; }

/* ============================================================
   Tables
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-base);
}
.t thead th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-subtle);
  font-size: var(--fs-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: var(--s-3) var(--cell-x);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.t tbody td {
  padding: var(--row-y) var(--cell-x);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink);
}
.t tbody tr:last-child td { border-bottom: none; }
.t tbody tr:hover td { background: var(--surface-2); }
.t td.num, .t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t td.mono { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-muted); }
.t td.thin { color: var(--ink-muted); white-space: nowrap; }
.t td.title { font-weight: 500; }
.t td.title a { color: var(--ink); }
.t td.title a:hover { color: var(--accent); }

.t-empty {
  padding: var(--s-8) var(--s-5);
  text-align: center;
  color: var(--ink-muted);
}
.t-empty .ico { color: var(--ink-disabled); margin-bottom: var(--s-3); }
.t-empty h3 { font-size: var(--fs-md); margin-bottom: var(--s-2); }

/* ============================================================
   Status badge
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  white-space: nowrap;
  line-height: 1.4;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.85;
  flex: none;
}
.badge.pending           { color: var(--ink-muted); }
.badge.working           { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.badge.generating        { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.badge.uploading         { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.badge.ready_for_review,
.badge.ready             { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.badge.published         { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.badge.scheduled         { color: var(--opt); background: var(--opt-bg); border-color: var(--opt-line); }
.badge.failed            { color: var(--err); background: var(--err-bg); border-color: var(--err-line); }
.badge.working::before, .badge.generating::before, .badge.uploading::before {
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Loading-Spinner fuer langsame Form-Submits (data-loading) */
.spinner-dot {
  display: inline-block;
  width: 11px; height: 11px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spinner-spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: -1px;
}
@keyframes spinner-spin { to { transform: rotate(360deg); } }
form.is-loading button[type="submit"] {
  cursor: progress;
  opacity: 0.85;
}

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  vertical-align: middle;
}
.dot.ok   { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.err  { background: var(--err); }
.dot.info { background: var(--info); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.4;
  transition: background 80ms ease, border-color 80ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { background: var(--surface-3); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn[disabled] { color: var(--ink-disabled); background: var(--surface-2); cursor: not-allowed; }

.btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn.primary:hover { background: oklch(from var(--ink) calc(l + 0.08) c h); }

.btn.success {
  background: var(--ok); color: white; border-color: var(--ok);
}
.btn.success:hover { background: oklch(from var(--ok) calc(l - 0.04) c h); }

.btn.danger {
  color: var(--err); border-color: var(--err-line); background: var(--surface);
}
.btn.danger:hover { background: var(--err-bg); }

.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn.sm { padding: 4px 8px; font-size: var(--fs-sm); }
.btn.lg { padding: 9px 16px; font-size: var(--fs-md); }

/* ============================================================
   Forms
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field > label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  display: flex; align-items: baseline; gap: var(--s-2);
}
.field > label .opt { font-weight: 400; color: var(--ink-subtle); font-size: var(--fs-xs); }
.field .help { font-size: var(--fs-xs); color: var(--ink-subtle); }
.input, .textarea, .select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-base);
  line-height: 1.4;
  transition: border-color 80ms ease, box-shadow 80ms ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.textarea { resize: vertical; min-height: 88px; line-height: 1.55; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%23999' stroke-width='1.5' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.form-actions {
  display: flex; gap: var(--s-2); justify-content: flex-end;
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  margin-top: var(--s-2);
}
/* Notiz-Feld neben dem Speichern-Knopf (Profil-Editor) */
.form-actions .note-inline { flex: 1; max-width: 420px; margin-right: auto; }

/* Grundregeln-Karte: prominente Klick-Zeile, gilt für alle Projekte */
a.grundregeln-card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 16px 18px; margin-bottom: var(--s-5);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; text-decoration: none; color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
a.grundregeln-card:hover {
  text-decoration: none; border-color: var(--accent);
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.06), 0 6px 18px oklch(0% 0 0 / 0.06);
}
.gr-icon {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in oklch, var(--accent) 14%, var(--surface));
  color: var(--accent);
}
.gr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gr-title { font-weight: 600; font-size: var(--fs-lg, 16px); }
.gr-sub { font-size: var(--fs-sm); color: var(--ink-muted); }
.gr-cue { flex: none; font-size: var(--fs-sm); color: var(--accent); font-weight: 500; }

/* Projekt-Karten-Grid */
.section-title {
  font-size: var(--fs-sm); font-weight: 600; letter-spacing: .02em;
  color: var(--ink-muted); text-transform: uppercase;
  margin: var(--s-5) 0 var(--s-3);
}
.project-grid {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.project-card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); text-decoration: none; color: inherit;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.project-card:hover {
  text-decoration: none; border-color: var(--accent);
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.05), 0 6px 16px oklch(0% 0 0 / 0.06);
  transform: translateY(-1px);
}
.project-mono {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px;
  color: oklch(42% 0.10 var(--mono-h, 250));
  background: oklch(94% 0.045 var(--mono-h, 250));
}
.project-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.project-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-host { font-size: 12px; color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-subtle); margin-top: 3px;
}
.project-status.is-own { color: var(--ok, oklch(55% 0.13 150)); }
.project-status .dot { width: 7px; height: 7px; }

.hint-box {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  line-height: 1.55;
}
.hint-box .pipe {
  font-family: var(--font-mono);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  font-size: 11px;
}

.privacy-notice {
  display: flex;
  gap: var(--s-3);
  margin-top: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--opt-bg, var(--surface-2));
  border: 1px solid var(--opt-line, var(--line));
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  line-height: 1.55;
  color: var(--ink-muted);
}
.privacy-notice strong { color: var(--ink); font-weight: 600; }
.privacy-notice a { color: var(--accent); text-decoration: underline; }
.privacy-notice-icon {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  margin-top: 1px;
}
.privacy-notice-detail {
  display: block;
  font-size: var(--fs-xs);
  color: var(--ink-subtle);
  margin: 4px 0 6px;
}

/* Bulk-Generierung: Grid für Site-Auswahl */
.bulk-site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.bulk-site-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: background .12s, border-color .12s;
}
.bulk-site-pick:hover { background: var(--surface-2); border-color: var(--line-strong); }
.bulk-site-pick input[type="checkbox"] { margin: 0; }
.bulk-site-pick:has(input:checked) { background: var(--accent-bg); border-color: var(--accent); }
.bulk-site-domain { font-weight: 500; color: var(--ink); flex: 1; }
.bulk-site-key { font-size: 11px; color: var(--ink-subtle); }

/* Job-History / Audit-Log */
.job-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-event {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.job-event.is-failure {
  background: var(--err-bg);
  border-color: var(--err-line, var(--err));
  color: var(--err);
}
.job-event-time {
  font-size: 11px;
  color: var(--ink-subtle);
  flex: 0 0 auto;
}
.job-event-label {
  font-weight: 500;
  color: var(--ink);
}
.job-event.is-failure .job-event-label { color: var(--err); }
.job-event-actor {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
}
.job-event-detail {
  font-size: var(--fs-xs);
  color: var(--ink-subtle);
  flex: 1 1 100%;
  margin-left: 0;
}
@media (min-width: 641px) {
  .job-event-detail { flex: 1 1 auto; margin-left: auto; text-align: right; }
}

/* ============================================================
   Login
   ============================================================ */
.login-shell {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: var(--s-7);
  background: var(--bg);
}
.login-card {
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-6) var(--s-6);
  box-shadow: var(--sh-2);
}
.login-card .brand { justify-content: center; margin-bottom: var(--s-2); }
.login-card .tag {
  text-align: center;
  font-size: var(--fs-sm); color: var(--ink-subtle);
  margin-bottom: var(--s-6);
}
.login-card .btn { width: 100%; justify-content: center; }
.login-card .footnote {
  margin-top: var(--s-5);
  font-size: var(--fs-xs); color: var(--ink-subtle);
  text-align: center;
}

/* ============================================================
   Job detail
   ============================================================ */
.job-head {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.job-head .crumbs {
  font-size: var(--fs-sm); color: var(--ink-subtle);
  margin-bottom: 6px;
}
.job-head .crumbs a { color: var(--ink-muted); }
.job-head h1 {
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  max-width: 760px;
  text-wrap: balance;
}
.job-head .meta-row {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  margin-top: var(--s-2);
  font-size: var(--fs-sm); color: var(--ink-muted);
}
.job-head .meta-row span strong { color: var(--ink); font-weight: 500; }
.job-head .meta-row .mono { color: var(--ink-muted); }

.status-block {
  display: flex; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.status-block.is-running { background: var(--info-bg); border-color: var(--info-line); }
.status-block.is-ready { background: var(--warn-bg); border-color: var(--warn-line); }
.status-block.is-failed { background: var(--err-bg); border-color: var(--err-line); }
.status-block .text { flex: 1; }
.status-block .text h3 { font-size: var(--fs-md); margin-bottom: 2px; }
.status-block .text p { font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.5; }
.status-block .right { font-size: var(--fs-sm); color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.progress-steps {
  display: flex;
  margin-top: var(--s-3);
  gap: 2px;
}
.progress-steps .step {
  flex: 1; height: 3px; border-radius: 2px;
  background: var(--line);
}
.progress-steps .step.done { background: var(--info); }
.progress-steps .step.active { background: var(--info); position: relative; overflow: hidden; }
.progress-steps .step.active::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, oklch(100% 0 0 / 0.4), transparent);
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* spec preview */
.spec-meta {
  display: grid;
  grid-template-columns: 130px 1fr;
  row-gap: var(--s-2);
  column-gap: var(--s-4);
  font-size: var(--fs-base);
}
.spec-meta dt { color: var(--ink-subtle); font-size: var(--fs-sm); padding-top: 1px; }
.spec-meta dd { margin: 0; color: var(--ink); }
.spec-meta dd .mono { color: var(--ink-muted); font-size: var(--fs-sm); }
.spec-meta dd .len {
  color: var(--ink-subtle); font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  margin-left: var(--s-2);
}
.spec-meta dd .len.ok   { color: var(--ok); }
.spec-meta dd .len.warn { color: var(--warn); }

/* Phase-3-UI: Stammdaten-Section (Title/Meta/Excerpt editierbar) +
   spec-meta-readonly (Slug/Keyword/Kategorie, dezent) + Section-Divider */
.stammdaten-section { margin-bottom: var(--s-3); }
.spec-meta-readonly {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid var(--bd-soft);
  opacity: 0.85;
}
.section-divider {
  border: 0;
  border-top: 1px solid var(--bd-soft);
  margin: var(--s-4) 0 var(--s-3);
}
.blocks-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.blocks-heading-row .section-title {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 600;
}

/* block timeline */
.blocks { border-top: 1px solid var(--line); }
.block-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-base);
}
.block-item:last-child { border-bottom: none; }
.block-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 3px;
}
.block-tag.h2 { color: var(--accent-ink); font-weight: 600; }
.block-content.h2-text { font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.block-content.muted { color: var(--ink-muted); }
.block-content .img-row {
  display: flex; gap: var(--s-3); align-items: center;
}
.block-content .thumb {
  width: 96px; height: 60px; border-radius: var(--r-sm);
  background:
    repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 4px, var(--surface-3) 4px, var(--surface-3) 8px);
  border: 1px solid var(--line);
  flex: none;
  overflow: hidden;
  display: block;
}
.block-content .thumb-img {
  background: var(--surface-2);
  padding: 0;
  text-decoration: none;
  transition: transform 100ms ease;
}
.block-content .thumb-img:hover { transform: scale(1.04); }
.block-content .thumb-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.block-content .caption {
  font-size: var(--fs-sm); color: var(--ink-muted); font-style: italic;
}

/* validator */
.issue-list { display: flex; flex-direction: column; }
.issue {
  display: grid;
  grid-template-columns: 70px 110px 1fr;
  gap: var(--s-3);
  align-items: baseline;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-base);
}
.issue:last-child { border-bottom: none; }
.issue-level {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.06em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  display: inline-block;
  text-align: center;
  width: fit-content;
}
.issue-level.error { color: var(--err); background: var(--err-bg); border: 1px solid var(--err-line); }
.issue-level.warn  { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.issue-level.info  { color: var(--info); background: var(--info-bg); border: 1px solid var(--info-line); }
.issue-code {
  font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink-muted);
}
.issue-msg { color: var(--ink); }
.issue-msg .ref { color: var(--ink-muted); }

.issue-empty {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  font-size: var(--fs-sm);
  color: var(--ok);
}

/* WP box */
.wp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-4);
}
.wp-cell label {
  display: block;
  font-size: var(--fs-xs); color: var(--ink-subtle);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.wp-cell .val { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink); }
.wp-cell a.val { color: var(--accent); }

/* action cards */
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.action-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s-5);
  display: flex; flex-direction: column;
  min-height: 200px;
}
.action-card.warn  { border-color: var(--warn-line); background: var(--warn-bg); }
.action-card.opt   { border-color: var(--opt-line); background: var(--opt-bg); }
.action-card.ok    { border-color: var(--ok-line); background: var(--ok-bg); }
.action-card.disabled { opacity: 0.5; }
.action-card h3 {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-md); margin-bottom: var(--s-2);
}
.action-card h3 .ico-wrap {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.action-card.warn h3 .ico-wrap { color: var(--warn); border-color: var(--warn-line); }
.action-card.opt  h3 .ico-wrap { color: var(--opt);  border-color: var(--opt-line); }
.action-card.ok   h3 .ico-wrap { color: var(--ok);   border-color: var(--ok-line); }
.action-card .desc {
  font-size: var(--fs-sm); color: var(--ink-muted); line-height: 1.5;
  margin-bottom: var(--s-3);
}
.action-card .grow { flex: 1; }
.action-card .textarea { background: var(--surface); }
.action-card .btn { align-self: flex-start; margin-top: var(--s-3); }

/* ============================================================
   Flash
   ============================================================ */
.flash {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  margin-bottom: var(--s-4);
  background: var(--surface);
}
.flash.info  { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.flash.ok    { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok); }
.flash.err   { background: var(--err-bg);  border-color: var(--err-line);  color: var(--err); }
.flash .dot { margin-top: 6px; }
.flash .body { flex: 1; color: var(--ink); }
/* Inline-Variante (innerhalb einer Card-Body etc): kein eigener Abstand */
.flash.flash--bare { margin: 0; }
.flash .body strong { color: inherit; font-weight: 600; }
.flash.info  .body strong { color: var(--info); }
.flash.ok    .body strong { color: var(--ok); }
.flash.err   .body strong { color: var(--err); }
.flash .close { color: inherit; opacity: 0.7; background: none; border: none; padding: 0; }
.flash .close:hover { opacity: 1; }

/* ============================================================
   Empty / 404
   ============================================================ */
.error-shell {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: var(--s-7);
}
.error-card {
  text-align: center;
  max-width: 360px;
}
.error-card .code {
  font-family: var(--font-mono);
  font-size: var(--fs-3xl);
  color: var(--ink-subtle);
  letter-spacing: -0.02em;
  margin-bottom: var(--s-2);
}
.error-card h1 { font-size: var(--fs-xl); margin-bottom: var(--s-2); }
.error-card p { color: var(--ink-muted); font-size: var(--fs-base); margin-bottom: var(--s-5); line-height: 1.55; }
.error-card .btn-row { display: flex; gap: var(--s-2); justify-content: center; }

/* ============================================================
   Components-preview helpers
   ============================================================ */
.preview-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.preview-row:last-child { border-bottom: none; }
.preview-row .label {
  font-size: var(--fs-xs);
  color: var(--ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 130px;
  flex: none;
}

/* misc utilities — .hstack ist oben definiert (mit gap- und wrap-Modifier) */
.vstack { display: flex; flex-direction: column; gap: var(--s-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.muted { color: var(--ink-muted); }
.subtle { color: var(--ink-subtle); }
.tnum { font-variant-numeric: tabular-nums; }

/* ============================================================
   Filter bar
   ============================================================ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-5);
}
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 3px;
  box-shadow: var(--sh-1);
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 60ms ease, color 60ms ease;
}
.filter-pill:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.filter-pill.is-active {
  background: var(--ink);
  color: var(--bg);
}
.filter-pill.is-active:hover { background: var(--ink); color: var(--bg); }
.filter-pill.is-active .filter-pill-count {
  color: var(--bg);
  background: oklch(from var(--ink) calc(l + 0.15) c h);
}
.filter-pill-count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--surface-3);
  color: var(--ink-subtle);
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
.filter-pill-warn:not(.is-active) .filter-pill-count {
  background: var(--err-bg);
  color: var(--err);
}

.filter-controls {
  display: flex;
  gap: var(--s-2);
  align-items: center;
}
.filter-search {
  width: 220px;
  padding: 6px 10px;
  font-size: var(--fs-sm);
}
.filter-site {
  width: 180px;
  padding: 6px 28px 6px 10px;
  font-size: var(--fs-sm);
}

@media (max-width: 760px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: var(--s-2);
  }
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    max-width: 100%;
    scrollbar-width: thin;
  }
  .filter-pills::-webkit-scrollbar { height: 6px; }
  .filter-pills::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
  .filter-controls { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .filter-search, .filter-site { flex: 1 1 calc(50% - var(--s-2)); width: auto; min-width: 0; }
  .filter-bar > * { min-width: 0; max-width: 100%; }
}

/* ============================================================
   Calendar
   ============================================================ */
.cal-legend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs); color: var(--ink-subtle);
  margin-left: var(--s-3);
}
.cal-legend .dot { width: 7px; height: 7px; }
.dot.opt { background: var(--opt); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line);
}
.cal-weekhead {
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-subtle);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
}
.cal-weekhead:nth-child(7n) { border-right: none; }

.cal-day {
  min-height: 110px;
  min-width: 0; /* sonst dehnen lange Event-Titel die 1fr-Grid-Spalten auseinander → horizontaler Overflow */
  padding: var(--s-2);
  background: var(--surface);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}
.cal-day:nth-child(7n) { border-right: none; } /* So spalte */
.cal-day.is-other { background: var(--surface-2); }
.cal-day.is-other .cal-date { color: var(--ink-disabled); }
.cal-day.is-weekend:not(.is-other) { background: oklch(from var(--surface-2) l c h / 0.6); }

.cal-date {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 2px 0;
  align-self: flex-end;
}
.cal-date-day {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
}
.cal-day.is-today .cal-date-day {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.cal-events {
  display: flex; flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.cal-event {
  display: block;
  min-width: 0;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink);
  transition: transform 80ms ease, box-shadow 80ms ease;
  text-decoration: none;
  border-left-width: 3px;
}
.cal-event:hover { text-decoration: none; box-shadow: var(--sh-2); transform: translateY(-1px); }
.cal-event-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  margin-right: 4px;
}
.cal-event-site {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-subtle);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.cal-event-title {
  display: block;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.cal-event-published      { border-left-color: var(--ok);   background: var(--ok-bg); }
.cal-event-scheduled      { border-left-color: var(--opt);  background: var(--opt-bg); }
.cal-event-ready_for_review,
.cal-event-ready          { border-left-color: var(--warn); background: var(--warn-bg); }
.cal-event-generating,
.cal-event-uploading,
.cal-event-working,
.cal-event-pending        { border-left-color: var(--info); background: var(--info-bg); }
.cal-event-failed         { border-left-color: var(--err);  background: var(--err-bg); }

/* Header-Zeile in jedem Event: Type-/Plattform-Chips + Time + Site */
.cal-event-head {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 1px;
  min-width: 0;
}
.cal-event-head .cal-event-time { margin-right: 0; }
.cal-event-head .cal-event-site {
  display: inline;
  font-size: 10px;
  color: var(--ink-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Site-Chip: Brand-Farbe pro Site aus sites.json. Inline-Style setzt bg/color. */
.cal-site-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
  background: var(--surface-2);
  color: var(--ink);
  white-space: nowrap;
}

/* Plattform-Chips mit Brand-Farben — auf einen Blick erkennbar */
.cal-platform-chip {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.cal-platform-chip[data-platform="instagram"] {
  background: var(--c-instagram);
  color: #ffffff;
}
.cal-platform-chip[data-platform="facebook"] {
  background: var(--c-facebook);
  color: #ffffff;
}
.cal-platform-chip[data-platform="linkedin"] {
  background: var(--c-linkedin);
  color: #ffffff;
}

/* Social-Variante: dezente Hintergrund-Akzentlinie damit man Blog/Social
   auch ohne Chips unterscheiden kann. */
.cal-event.is-social {
  border-left-width: 4px;
  position: relative;
}
.cal-event.is-social::after {
  content: "";
  position: absolute;
  inset: 0 0 0 4px;
  pointer-events: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 95%, rgba(0,0,0,0.04) 100%);
}
/* Legende oben — kompakter + Trenner */
.cal-legend-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cal-legend-sep {
  width: 1px;
  height: 14px;
  background: var(--line);
  margin: 0 2px;
}

/* "+N weitere"-Counter im Monatsmodus — Link in die Wochenansicht des Tages */
.cal-more {
  display: block;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--ink-subtle);
  text-decoration: none;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.cal-more:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}

/* Wochenmodus: dieselben 7 Spalten, aber viel mehr Vertical Room
   damit alle Events ohne Cap reinpassen. */
.cal-grid.is-week .cal-day { min-height: 480px; }
.cal-grid.is-week .cal-date {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cal-date-wday {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Button-Gruppe (Monat/Woche Toggle) — gegenseitig anliegende Buttons */
.btn-group {
  display: inline-flex;
  gap: 0;
}
.btn-group .btn {
  border-radius: 0;
  margin: 0;
}
.btn-group .btn:first-child { border-top-left-radius: var(--r-sm); border-bottom-left-radius: var(--r-sm); }
.btn-group .btn:last-child  { border-top-right-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); }
.btn-group .btn + .btn { border-left: 0; }

.cal-list-card { margin-top: var(--s-6); }
.cal-list { display: flex; flex-direction: column; }
.cal-list-row {
  display: grid;
  grid-template-columns: 110px 200px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-base);
}
.cal-list-row:last-child { border-bottom: none; }
.cal-list-row:hover { background: var(--surface-2); text-decoration: none; }
.cal-list-day { font-variant-numeric: tabular-nums; color: var(--ink-muted); font-size: var(--fs-sm); }
.cal-list-site { color: var(--ink-muted); font-size: var(--fs-sm); }
.cal-list-topic { color: var(--ink); }

/* ============================================================
   Responsive
   ============================================================ */

/* tablet */
@media (max-width: 900px) {
  .content { padding: var(--s-5) var(--s-4); }
  .actions { grid-template-columns: 1fr; }
  .wp-grid { grid-template-columns: 1fr 1fr; }
  .spec-meta { grid-template-columns: 1fr; row-gap: 6px; }
  .spec-meta dt { padding-top: 0; }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }
  .page-head .btn { align-self: flex-start; }

  .job-head { flex-direction: column; }
  .job-head h1 { font-size: var(--fs-lg); }

  .status-block { flex-direction: column; }
  .status-block .right { align-self: flex-end; font-size: var(--fs-xs); }

  .issue {
    grid-template-columns: 70px 1fr;
    grid-template-areas:
      "level code"
      "msg   msg";
    row-gap: 4px;
  }
  .issue-level { grid-area: level; }
  .issue-code  { grid-area: code; }
  .issue-msg   { grid-area: msg; }

  .block-item { grid-template-columns: 60px 1fr; }
}

/* phone */
@media (max-width: 640px) {
  body { font-size: var(--fs-md); }

  .topbar {
    padding: 0 var(--s-3);
    gap: var(--s-2);
    height: 52px;
  }
  .topbar .brand img { height: 24px !important; width: 24px !important; }
  .topbar .brand-app { display: none; }
  .nav { display: none; }
  .topbar-cta span { display: none; }
  .topbar-cta { padding: 6px 9px; }
  .topbar-activity { padding: 4px 8px; font-size: var(--fs-xs); }

  /* Topic-Suggestion: Action-Spalte unter Content stapeln */
  .topic-row { grid-template-columns: 1fr; }
  .topic-actions { min-width: 0; }
  .topic-actions form { width: 100%; }

  /* Action-Bar: secondary-actions duerfen wrappen */
  .secondary-actions { flex-wrap: wrap; }
  .action-bar .btn.primary.big { width: 100%; justify-content: center; }

  /* Stat-Tile auf Mobile: kompakter */
  .stat-tile-value { font-size: 20px; }
  .grid-stats { gap: var(--s-3); }

  /* Sites-Card-Title: Title darf umbrechen, Score bleibt rechts */
  .site-card-title { flex-wrap: wrap; }

  /* Job-Liste auf dem Dashboard — etwas mehr Padding */
  .job-list-link { padding: 16px; }
  .job-list-meta { flex-wrap: wrap; }

  .user-chip { gap: 4px; margin-left: auto; }
  .user-chip .avatar-desktop,
  .user-chip .user-name { display: none; }

  /* Trigger: Avatar + Chevron statt "Einstellungen" */
  .dropdown-trigger .dt-label { display: none; }
  .dropdown-trigger .dt-avatar { display: inline-flex; }
  .user-chip .dropdown-trigger {
    padding: 4px;
    border-radius: 999px;
  }

  /* Dropdown-Menu Mobile: breiter, Mobile-only Items sichtbar */
  .dropdown-menu { min-width: 220px; }
  .dm-mobile-only { display: list-item; }
  .dropdown-menu a, .dropdown-menu button { padding: 10px 14px; font-size: var(--fs-md); }

  .content { padding: var(--s-5) var(--s-3); }
  .content-narrow, .content-wide { max-width: 100%; }

  .page-head {
    margin-bottom: var(--s-4);
    padding-bottom: var(--s-3);
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .page-head > div:first-child { min-width: 0; flex: 1 1 100%; }
  .page-head > div:last-child { flex: 0 0 auto; }
  .page-head h1 {
    font-size: var(--fs-xl);
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .page-head .sub {
    font-size: var(--fs-sm);
    overflow-wrap: anywhere;
  }

  .card-head { padding: var(--s-3) var(--s-4); }
  .card-body { padding: var(--s-4); }
  .card + .card { margin-top: var(--s-4); }

  .login-shell { padding: var(--s-4); }
  .login-card {
    width: 100%;
    max-width: 380px;
    padding: var(--s-6) var(--s-5) var(--s-5);
  }

  .form-stack { padding: var(--s-4); }
  .form-actions { flex-direction: column-reverse; gap: var(--s-2); }
  .form-actions .btn { width: 100%; justify-content: center; }

  .job-head h1 { font-size: var(--fs-lg); }
  .job-head .meta-row {
    flex-direction: column;
    gap: var(--s-1);
  }

  .wp-grid { grid-template-columns: 1fr; }

  .action-card { padding: var(--s-4); min-height: 0; }
  .action-card .btn { width: 100%; justify-content: center; }

  .spec-meta {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .spec-meta dt { font-size: var(--fs-xs); padding-top: var(--s-2); }
  .spec-meta dd { font-size: var(--fs-sm); }
  .spec-meta dd .len { display: block; margin-left: 0; margin-top: 2px; }

  .block-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: var(--s-3) 0;
  }
  .block-tag { padding-top: 0; }
  .block-content .img-row { flex-direction: column; align-items: flex-start; }

  .issue {
    padding: var(--s-3) var(--s-4);
  }

  /* Tabellen: Header verstecken, Rows als „Cards" ausspielen */
  .t thead { display: none; }
  .t, .t tbody, .t tr, .t td { display: block; }
  .t tr {
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--line);
  }
  .t tbody tr:hover td { background: transparent; }
  .t tbody tr:hover { background: var(--surface-2); }
  .t td {
    padding: 2px 0;
    border: none;
    display: flex;
    align-items: center;
    gap: var(--s-2);
  }
  .t td::before {
    content: attr(data-label);
    font-size: var(--fs-xs);
    color: var(--ink-subtle);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    width: 80px;
    flex: none;
  }
  .t td.title {
    flex-direction: column;
    align-items: flex-start;
    margin-top: var(--s-1);
  }
  .t td.title::before { display: none; }
  .t td.title a { font-weight: 500; }

  /* Hidden / decoration cells (empty data-label) verstecken; nur Action-Cells (data-label=" ") behalten */
  .t td[data-label=""] { display: none; }
  .t td[data-label=" "]::before { display: none; }
  .t td[data-label=" "] { padding-top: var(--s-2); margin-top: 2px; }

  .badge { font-size: var(--fs-xs); padding: 2px 7px 2px 5px; }

  .topbar-spacer { flex: 1; }
}

/* very small phones */
@media (max-width: 360px) {
  .topbar { gap: 4px; padding: 0 var(--s-2); }
  .nav a { padding: 5px 6px; }
}

/* ----- Social-Posts: pill-Style Radios + Checkboxes ----- */
.radio-pill, .check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  background: var(--bg);
  transition: border-color .12s, background .12s;
}
.radio-pill:hover, .check-pill:hover { border-color: var(--ink); }
.radio-pill input, .check-pill input {
  margin: 0;
  accent-color: var(--accent, currentColor);
}
.radio-pill:has(input:checked), .check-pill:has(input:checked) {
  border-color: var(--ink);
  background: var(--bg2);
}

/* Calendar mobile: Grid weg, alleine die List zeigen */
@media (max-width: 760px) {
  .cal-grid, .card-head .cal-legend { display: none; }
  .cal-list-card { margin-top: 0; }
  .cal-list-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "day  badge"
      "site badge"
      "topic topic";
    row-gap: 4px;
  }
  .cal-list-day   { grid-area: day; }
  .cal-list-site  { grid-area: site; }
  .cal-list-topic { grid-area: topic; font-weight: 500; }
  .cal-list-row .badge { grid-area: badge; align-self: flex-start; }
}

/* ----- Social-Detail-Seite ----- */
.social-tabs-card { margin-top: 8px; }
.social-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bd);
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.social-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  font-size: 14px;
  flex: 0 0 auto;
}
.social-tab:hover { background: var(--bg2); }
.social-tab.is-active {
  font-weight: 600;
  border-bottom-color: var(--accent, var(--ink));
}
.social-tab-badge { font-size: 10px; }

.social-variant-card { margin-top: 8px; }
.social-variant-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 24px;
}
.social-variant-preview { min-width: 0; }
.social-variant-form { min-width: 0; }
.social-section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.social-preview-frame {
  margin-top: 8px;
  border: 1px solid var(--bd);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg2);
}
.social-preview-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  width: 100%;
}
.social-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.social-preview-empty {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.social-preview-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.social-preview-actions form { margin: 0; }
.social-strategy-badge { font-size: 10px; }
.social-variant-error { margin-top: 8px; }

/* ── CB-Archive-Integration: Archive-Chip + Liste-Highlight ────── */
.badge.archive-chip {
  color: oklch(48% 0.06 220);
  background: oklch(96% 0.02 220);
  border-color: oklch(86% 0.04 220);
  font-weight: 500;
}
.badge-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.job-list-row.is-archive,
.reel-list-row.is-archive {
  background: linear-gradient(to right, rgba(0,0,0,0.015), transparent);
}
.job-list-row.is-archive .job-list-topic,
.reel-list-row.is-archive .reel-list-title {
  color: var(--ink-muted);
}

/* ── Phase-5-UI: Reel-Render-Aktionen einheitlich ──────────────── */
.reel-render-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.reel-render-row .reel-render-primary form,
.reel-render-row > form { margin: 0; }
.reel-render-primary { display: flex; }
.reel-render-secondary { display: flex; }
.reel-render-pending {
  margin: 0 0 8px;
  padding: 6px 10px;
  background: var(--warn-bg, #fff7ed);
  border-left: 2px solid var(--warn, #d97706);
  border-radius: 0 4px 4px 0;
  color: var(--ink);
}

/* ── Phase-4-UI: Toast (transientes Save-/Action-Feedback) ─────── */
.toast-host {
  position: fixed;
  top: 72px;             /* unter der fixierten Topbar */
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.06);
  padding: 10px 14px;
  font-size: var(--fs-base);
  color: var(--ink);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 200ms ease, opacity 200ms ease;
  min-width: 220px;
  max-width: 420px;
}
.toast.is-in  { transform: translateY(0); opacity: 1; }
.toast.is-out { transform: translateY(-4px); opacity: 0; }
.toast .toast-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-muted);
}
.toast-ok    .toast-dot { background: var(--ok); }
.toast-err   .toast-dot { background: var(--err); }
.toast-warn  .toast-dot { background: var(--warn); }
.toast-info  .toast-dot { background: var(--info); }
.toast-ok    { border-color: var(--ok-line); }
.toast-err   { border-color: var(--err-line); }
.toast-warn  { border-color: var(--warn-line); }
.toast-info  { border-color: var(--info-line); }
.toast-body  { flex: 1; }
@media (max-width: 640px) {
  .toast-host {
    top: 60px;
    right: 8px;
    left: 8px;
    max-width: none;
  }
  .toast { min-width: 0; max-width: none; width: 100%; }
}

/* ── Phase-2-UI: Section-Card (kleine Sub-Karte innerhalb einer Card) ── */
.section-card {
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-1);
  border: 1px solid var(--bd-soft);
  margin-bottom: 12px;
}
.section-card:last-child { margin-bottom: 0; }
.section-card .section-title {
  margin: 0 0 10px;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.section-card-prompt { margin-top: 12px; }
.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.section-actions form { margin: 0; }

/* ── Phase-2-UI: Dirty-Marker + Save-Counter ───────────────────── */
.dirty-dot {
  display: none;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warn, #d97706);
  vertical-align: middle;
  margin-left: 4px;
}
[data-watch-field].is-dirty .dirty-dot { display: inline-block; }
[data-watch-field].is-dirty > label {
  color: var(--ink);
  font-weight: 600;
}
[data-save-btn].is-dirty {
  background: var(--accent, #0f172a);
  color: white;
  border-color: transparent;
}
.field-compact { margin-top: 12px; }
.field-compact > label {
  display: block;
  font-size: var(--fs-sm, 13px);
  color: var(--ink-muted);
  margin-bottom: 4px;
}

/* ── Phase-2-UI: Action-Menü (details-basiert) ─────────────────── */
.action-menu { position: relative; margin: 0; }
.action-menu > summary {
  list-style: none;
  cursor: pointer;
}
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu > summary::marker { content: ""; }
.action-menu-body {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  min-width: 240px;
  max-width: 360px;
  background: var(--surface-1);
  border: 1px solid var(--bd);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,0.08));
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--fs-base);
  cursor: pointer;
}
.action-menu-item:hover { background: var(--surface-2); }
.action-menu-row { display: block; }
.action-menu-row > form { margin: 0; }
.action-menu-prompt > summary { list-style: none; }
.action-menu-prompt > summary::-webkit-details-marker { display: none; }
.action-menu-prompt[open] .social-prompt-form { margin-top: 8px; padding: 8px; }
.form-extras { margin-top: 10px; }
.form-extras .action-menu-body {
  position: static;
  box-shadow: none;
  padding: 10px;
  margin-top: 8px;
}
.form-extras .field { margin: 0 0 10px; }
.form-extras .field:last-child { margin-bottom: 0; }

.hook-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}
.hook-reroll-inline form { margin: 0; }
.btn-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: var(--fs-sm, 13px);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--ink); }

.page-head-actions {
  display: flex;
  gap: var(--s-2);
  align-items: center;
  flex-wrap: wrap;
}

.hook-candidates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.hook-cand {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--bd);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  color: inherit;
  width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hook-cand:hover { background: var(--bg2); }
.hook-cand.is-active { background: var(--bg2); border-color: var(--ink); }
.hook-cand-num {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
  padding-top: 1px;
}
.hook-cand-text { flex: 1; min-width: 0; }
.hook-reroll { margin-top: 6px; }
.hook-reroll form { margin: 0; display: inline; }

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill-row .radio-pill,
.pill-row .check-pill { max-width: 100%; }
.pill-row .radio-pill span,
.pill-row .check-pill span { min-width: 0; overflow-wrap: anywhere; }

.social-form-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.social-form-actions form { margin: 0; }

code.event-details {
  font-size: 10px;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

.wp-selected { margin-top: var(--s-2); }
.wp-results-empty { font-size: var(--fs-sm); padding: var(--s-2) 0; }
.wp-search-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wp-search-input {
  flex: 1 1 240px;
  min-width: 0;
}
.wp-results {
  margin-top: 8px;
  max-height: 280px;
  overflow: auto;
  border-radius: 6px;
}
.wp-result {
  display: block;
  padding: 8px;
  border-bottom: 1px solid var(--bd);
  text-decoration: none;
  color: inherit;
  overflow-wrap: anywhere;
}
.wp-result:hover { background: var(--bg2); }
.wp-result-meta { font-size: 11px; color: var(--muted); }

/* Social-Filter nutzt .filter-bar/.filter-controls (siehe oben).
   Social hat zusaetzliche Selects (Site/Platform/Status) — sie kriegen
   denselben kompakten Sizing-Stil wie .filter-site/.filter-search. */
.filter-controls .select.filter-select {
  width: 160px;
  padding: 6px 28px 6px 10px;
  font-size: var(--fs-sm);
}

/* Social-Liste: Delete-Action rechts neben Link */
.list-row-action {
  display: flex !important;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}
.list-row-action:last-child { border-bottom: none; }
.list-row-action > .job-list-link,
.list-row-action > .reel-list-link {
  flex: 1 1 auto;
  min-width: 0;
}
/* Rechte Aktions-Spalte einer list-row-action (z.B. "bearbeiten") */
.list-row-cta { display: flex; align-items: center; gap: 8px; padding: 0 16px; flex: 0 0 auto; }
/* Gruppen-Zwischenüberschrift in einer Liste (TextNetz-Sites / Kunden) */
.list-group-label {
  padding: 10px 16px 4px;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

/* Kleine Thumb-Vorschau am linken Rand von job-list-link (Posts/Artikel) */
.job-list-link { display: flex; align-items: center; gap: 14px; }
.list-row-thumb {
  flex: 0 0 auto;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}
.list-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-row-thumb.is-1x1 { width: 48px; height: 48px; }
.list-row-thumb.is-4x3 { width: 64px; height: 48px; }
.list-row-thumb-empty {
  font-size: 18px;
  opacity: 0.5;
}

/* Pagination-Footer für lange Listen */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}
.pagination-info {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.list-row-delete {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-right: var(--s-3);
  margin: 0;
}
/* Card-Stacking: tight (8px) statt default 24px */
.card.is-tight + .card,
.card + .card.is-tight { margin-top: var(--s-2); }

/* Card-Head Layout-Variante: links Title, rechts Action */
.card-head.is-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
}

/* Mini-Platform-Badge fuer Listen (IG/FB/LI) */
.platform-badge {
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* Event/Verlauf-Liste: kompakte Rows + Meta-Zeile */
.event-list .event-row {
  padding: var(--s-2) var(--s-4);
}
.event-row .event-title { font-size: var(--fs-sm); }
.event-row .event-title .badge { font-size: 10px; margin-left: 6px; }
.event-row .event-meta {
  font-size: 11px;
  color: var(--ink-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}
.event-row .event-meta code {
  font-size: 10px;
  word-break: break-all;
  overflow-wrap: anywhere;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}

/* Empty-State innerhalb Card-Body mit etwas Luft */
.t-empty.is-spacious { padding: var(--s-5) var(--s-4); }

/* Generischer Icon-Button (Liste, Detail, Card-Head) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  color: var(--ink-subtle);
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.icon-btn:hover {
  color: var(--ink);
  background: var(--bg2);
  border-color: var(--bd);
}
.icon-btn.is-danger:hover {
  color: var(--danger, #c0392b);
}
.icon-btn svg { display: block; }

.social-prompt-edit {
  margin-top: 8px;
  border: 1px solid var(--bd);
  border-radius: 6px;
  background: var(--bg2);
}
.social-prompt-edit > summary {
  cursor: pointer;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  user-select: none;
}
.social-prompt-edit > summary:hover { color: var(--ink); }
.social-prompt-edit[open] > summary {
  border-bottom: 1px solid var(--bd);
  margin-bottom: 0;
}
.social-prompt-form {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.social-prompt-form textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  min-height: 140px;
}
.social-prompt-actions {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.social-prompt-actions form { margin: 0; }

@media (max-width: 760px) {
  .social-variant-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .social-tab { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 640px) {
  .wp-search-input { flex: 1 1 100%; }
  .wp-search-row .btn { flex: 1; }
  .filter-controls .select.filter-select { width: 100%; }
}

@media (max-width: 640px) {
  .social-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .social-form-actions .btn,
  .social-form-actions form .btn { width: 100%; justify-content: center; }
  .social-form-actions form { width: 100%; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { margin-left: auto; }
}

/* Body-Repair-Preview — schlichte numerische Liste mit Block-Inhalt. */
.repair-block-list { padding-left: 1.5em; margin: 0; font-size: 0.92rem; }
.repair-block-list li { margin: 4px 0; line-height: 1.5; color: var(--fg-muted); }
.repair-block-list li code { font-size: 0.85em; }

/* Reel-Liste: eigenes Layout mit Thumbnail links, Hook unter Titel. */
.reel-list { list-style: none; margin: 0; padding: 0; }
.reel-list-row { border-bottom: 1px solid var(--line); }
.reel-list-row:last-child { border-bottom: none; }
.reel-list-link {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    text-decoration: none; color: inherit;
}
.reel-list-link:hover { background: var(--surface-2); text-decoration: none; }
.reel-thumb {
    flex: 0 0 auto;
    width: 56px; height: 100px;          /* 9:16 hochkant, kleine Vorschau */
    background: var(--surface-2);
    border-radius: 6px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.reel-thumb img,
.reel-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.reel-thumb-empty {
    color: var(--ink-muted); font-size: 18px;
}
.reel-thumb-glyph { opacity: 0.5; }
.reel-list-main { flex: 1; min-width: 0; }
.reel-list-title {
    font-size: var(--fs-base); font-weight: 500; margin: 0 0 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reel-list-hook {
    font-size: 0.95rem; color: var(--ink); margin: 0 0 6px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reel-list-meta {
    font-size: var(--fs-sm); color: var(--ink-muted);
    display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.reel-list-error { color: var(--err); margin-top: 4px; }

/* Reel-Detail: zweispaltig auf Desktop, gestapelt auf Mobile. */
.reel-detail-grid {
    display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
    gap: var(--s-4);
}
.reel-detail-video { width: 100%; max-height: 640px; border-radius: 8px; background: #000; display: block; }
.reel-detail-empty {
    padding: 32px 16px; text-align: center; color: var(--ink-muted);
    background: var(--surface-2); border-radius: 8px;
}
.reel-detail-hook {
    font-size: 1.1rem; font-weight: 500; margin: 6px 0 0;
    line-height: 1.4;
}
.reel-detail-caption {
    white-space: pre-wrap; font-family: inherit; font-size: 0.95rem;
    background: var(--surface-2); padding: 12px 14px; border-radius: 6px;
    margin: 6px 0 0; max-height: 320px; overflow: auto;
}
@media (max-width: 720px) {
    .reel-detail-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Stilguide-Editor (/settings/guides) */
.guide-editor {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    tab-size: 2;
    min-height: 480px;
    width: 100%;
    background: var(--surface-2);
}
/* Editor-Seiten profitieren von mehr Breite, aber der Lesefluss leidet ab
   einer gewissen Zeilenlänge. Editor-Felder auf angenehme Maximalbreite
   begrenzen, die History-Tabelle darf die volle Breite nutzen. */
.guide-form .field { max-width: 860px; }

/* Geerbte Ebenen auf der Profilseite — read-only, eingeklappt. */
.inherited-card { background: var(--surface-2); }
.inherited-intro { margin: 0 0 var(--s-3); }
.inherited-layer { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: var(--s-2); background: var(--surface); }
.inherited-layer > summary { cursor: pointer; padding: 8px 12px; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.inherited-layer > summary::-webkit-details-marker { display: none; }
.inherited-layer[open] > summary { border-bottom: 1px solid var(--line); }
.inherited-layer-body { padding: 10px 12px; }
.inherited-layer-body .btn { margin-bottom: var(--s-2); }
.inherited-layer-body pre {
    margin: 0; max-height: 320px; overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere;
    color: var(--ink-muted);
}
.guide-version-actions {
    white-space: nowrap;
}
.guide-version-actions form {
    display: inline-block;
    margin: 0 0 0 .35em;
}

/* Effektiv-Ansicht (/settings/projects/.../effective) */
.effective-content {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0;
    max-width: 860px;
    background: var(--surface-2);
    padding: 12px 14px;
    border-radius: 8px;
}
.effective-note { color: oklch(58% 0.12 60); }
.effective-guardrails { border-left: 3px solid oklch(58% 0.18 25); }
.effective-voice { border-left: 3px solid oklch(55% 0.13 250); }
.effective-concept { border-left: 3px solid oklch(60% 0.14 150); }
.effective-surface { border-left: 3px solid oklch(65% 0.13 90); }
.effective-format { border-left: 3px solid var(--line); }

/* Projekt-Profile (/settings/projects) */
.profile-doc-chips {
    display: flex; gap: .5em; margin-top: .35em; flex-wrap: wrap;
}
.profile-chip {
    display: inline-flex; align-items: center; gap: .35em;
    padding: 2px 8px; border-radius: 999px; font-size: .82em;
    border: 1px solid var(--line);
    color: var(--ink-muted); background: var(--surface-2);
}
.profile-chip-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--line);
}
.profile-chip.is-filled {
    color: var(--ink); border-color: oklch(60% 0.13 155);
}
.profile-chip.is-filled .profile-chip-dot {
    background: oklch(60% 0.13 155);
}
.profile-chip.is-empty {
    opacity: .65;
}

.profile-tabs {
    display: flex; gap: 4px; margin: 0 0 var(--s-3);
    border-bottom: 1px solid var(--line);
}
.profile-tab {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 14px; text-decoration: none;
    color: var(--ink-muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.profile-tab:hover { color: var(--ink); }
.profile-tab.is-active {
    color: var(--ink); border-bottom-color: var(--accent);
}
.profile-tab-label { font-weight: 500; font-size: .95em; }
.profile-tab-meta { font-size: .78em; opacity: .75; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-tab-empty { font-style: italic; }

[data-token-counter].is-warn { color: oklch(70% 0.14 75); }
[data-token-counter].is-over { color: oklch(58% 0.18 25); font-weight: 500; }

/* Stil & Guides — Vorschau ("Was bekommt die KI?") */
.inline-pick { margin: 0; }
.inline-pick .input.sm { padding: 4px 8px; font-size: var(--fs-sm); max-width: 240px; }

.layer-list { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.layer-row { border-bottom: 1px solid var(--line); }
.layer-row:last-child { border-bottom: none; }
.layer-link {
    display: flex; align-items: flex-start; gap: var(--s-3);
    padding: 12px 4px; text-decoration: none; color: inherit;
    border-radius: 8px;
}
.layer-row.is-editable .layer-link:hover { background: var(--surface-2); text-decoration: none; }
.layer-num {
    flex: none; width: 22px; height: 22px; margin-top: 1px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--surface-3);
    font-size: 12px; font-weight: 600; color: var(--ink-muted);
}
.layer-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.layer-title { font-weight: 500; }
.layer-ex {
    font-size: var(--fs-sm); color: var(--ink-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.layer-cue { flex: none; align-self: center; font-size: var(--fs-sm); color: var(--ink-subtle); }
.layer-row.is-editable .layer-cue { color: var(--accent); }

/* Eingeklappte Technik-Karte — gleiches Muster wie spec-card */
details.card.details-card { padding: 0; }
details.card.details-card > summary { cursor: pointer; list-style: none; }
details.card.details-card > summary::-webkit-details-marker { display: none; }
details.card.details-card > summary::after {
    content: '▾'; margin-left: auto; color: var(--ink-subtle);
    font-size: 12px; transition: transform 150ms ease;
}
details.card.details-card[open] > summary::after { transform: rotate(180deg); }
details.card.details-card > summary:hover { background: var(--surface-2); }
