/* Website-CMS: dunkle, ruhige Editor-Chrome im Stil professioneller Site-Builder. Die Website im Canvas bleibt hell und ist der Fokus.
   System: neutrale Graustufen, ein blauer Akzent, 1-px-Linien, 11-13-px-UI.
   Formen: Bedienelemente 5 px, Container 8 px, Dialoge 10 px, Zähler/Filter/Score als Pille. */
:root {
  --bg: #141414; --chrome: #181818; --panel: #1e1e1e; --panel-2: #262626; --panel-3: #2f2f2f; --hover: #272727; --field: #161616;
  --line: #2e2e2e; --line-soft: #272727; --line-2: #3a3a3a; --line-3: #4a4a4a;
  --text: #ededed; --text-2: #c4c4c4; --muted: #999; --faint: #6e6e6e; --ph: #8a8a8a;
  --accent: #2b6be6; --accent-h: #2f6fe8; --accent-a: #255fd6; --accent-t: #8db2ff; --accent-bg: rgba(43, 107, 230, .18); --accent-line: rgba(91, 147, 255, .55); --ring: 0 0 0 3px rgba(43, 107, 230, .32);
  --good: #3fb37f; --warn: #e0a03a; --bad: #f0625f;
  --good-t: #63cf9c; --warn-t: #eeb85c; --bad-t: #ff8f8c;
  --good-bg: rgba(63, 179, 127, .15); --warn-bg: rgba(224, 160, 58, .15); --bad-bg: rgba(240, 98, 95, .15);
  --r: 5px; --r-lg: 8px; --top: 44px; --rail-w: 48px; --gut: 12px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --shadow: 0 10px 28px rgba(0, 0, 0, .42), 0 1px 3px rgba(0, 0, 0, .3);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark; font-family: var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 12px; line-height: 1.45; background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
code, .src { font-family: var(--mono); font-size: 11px; }
a { color: var(--accent-t); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.pad { padding: var(--gut); } .pad-x { padding: var(--gut) var(--gut) 0; }
.grow { flex: 1; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-t); outline-offset: 1px; }
::selection { background: rgba(43, 107, 230, .5); }
::placeholder { color: var(--ph); opacity: 1; }
* { scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }

/* ---------- Grundraster ---------- */
.app { display: grid; height: 100dvh; grid-template-columns: var(--rail-w) 248px minmax(0, 1fr) 328px; grid-template-rows: var(--top) minmax(0, 1fr);
  grid-template-areas: "rail top top top" "rail pages stage insp"; }
.app[data-view="tracker"] { grid-template-areas: "rail top top top" "rail tracker tracker tracker"; }
.app[data-view="tracker"] .pages, .app[data-view="tracker"] .stage, .app[data-view="tracker"] .inspector,
.app[data-view="tracker"] .vp, .app[data-view="tracker"] #modeBtn { display: none; }
.app[data-view="tracker"] .top { grid-template-columns: minmax(0, 1fr) auto; }

/* ---------- Leiste links ---------- */
.rail { grid-area: rail; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0; background: var(--chrome); border-right: 1px solid var(--line); }
.rail-logo { width: 28px; height: 28px; margin-bottom: 10px; border-radius: 6px; display: grid; place-items: center; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-weight: 700; font-size: 10.5px; letter-spacing: .02em; }
.rail-btn { position: relative; width: 32px; height: 32px; border: 0; border-radius: var(--r); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background-color .12s ease, color .12s ease, transform .12s var(--ease); }
.rail-btn svg { width: 18px; height: 18px; }
.rail-btn:hover { background: var(--panel-2); color: var(--text); }
.rail-btn:active { transform: scale(.94); }
.rail-btn[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent-t); }
.rail-badge { position: absolute; top: 1px; right: 0; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); box-shadow: 0 0 0 2px var(--chrome); color: #fff; font-size: 9.5px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--panel-3); color: var(--text-2); display: grid; place-items: center; font-size: 10px; font-weight: 650; letter-spacing: .02em; }
.menu-wrap { position: relative; }
.menu { position: absolute; left: calc(100% + 8px); bottom: 0; width: 232px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 4px; z-index: 30; }
.menu-head { padding: 8px 8px 9px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: grid; gap: 1px; }
.menu-head span { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.menu button { display: flex; align-items: center; width: 100%; min-height: 28px; text-align: left; border: 0; background: transparent; padding: 0 8px; border-radius: var(--r); cursor: pointer; }
.menu button:hover { background: var(--panel-3); }

/* ---------- Kopfzeile ---------- */
.top { grid-area: top; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 8px 0 var(--gut); background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
.crumb { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.crumb-group { color: var(--muted); flex: none; }
.crumb-sep { color: var(--ph); }
.crumb-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-link { color: var(--muted); display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r); flex: none; }
.crumb-link svg { width: 13px; height: 13px; }
.crumb-link:hover { color: var(--text); background: var(--panel-2); }
.tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); }
.seg button { width: 30px; height: 24px; border: 0; background: transparent; border-radius: 4px; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: background-color .12s ease, color .12s ease; }
.seg button svg { width: 16px; height: 16px; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); cursor: pointer; font-weight: 550; white-space: nowrap; transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s var(--ease); }
.btn:hover { background: var(--panel-3); border-color: var(--line-3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn.primary:active { background: var(--accent-a); border-color: var(--accent-a); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary:disabled { opacity: 1; background: var(--panel-3); border-color: var(--panel-3); color: var(--muted); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.ghost[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent-t); }
.btn.small { height: 24px; padding: 0 8px; font-size: 11.5px; }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--bad-t); }
.btn.danger-ghost:hover { background: var(--bad-bg); }
.icon-btn { width: 28px; height: 28px; border: 0; background: transparent; border-radius: var(--r); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: background-color .12s ease, color .12s ease, transform .12s var(--ease); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.score-pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 9px; border-radius: 13px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font-weight: 600; font-size: 11.5px; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .12s ease, border-color .12s ease; }
.score-pill:hover { background: var(--panel-2); border-color: var(--line-3); }
.sp-l { margin-right: -2px; }
.sp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.score-pill[data-rating="good"] .sp-dot { background: var(--good); } .score-pill[data-rating="warn"] .sp-dot { background: var(--warn); } .score-pill[data-rating="bad"] .sp-dot { background: var(--bad); }

/* ---------- Felder (gemeinsam) ---------- */
input[type="search"], .fld input, .inp-wrap, .texts-head input, .login-card input { background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color .12s ease, box-shadow .12s ease; }
input[type="search"]:hover, .fld input:hover, .inp-wrap:hover, .login-card input:hover { border-color: var(--line-3); }
input[type="search"]:focus, .fld input:focus, .inp-wrap:focus-within, .login-card input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.pages-search input, .texts-head input, .tr-tools input[type="search"] { width: 100%; height: 28px; padding: 0 9px; outline: none; }

/* ---------- Panels ---------- */
.panel { background: var(--panel); min-height: 0; display: flex; flex-direction: column; }
.pages { grid-area: pages; border-right: 1px solid var(--line); }
.inspector { grid-area: insp; border-left: 1px solid var(--line); }
.panel-head { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 0 var(--gut); flex: none; }
.panel-title { font-weight: 600; font-size: 12.5px; }
.panel-meta { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.pages-search { padding: 0 var(--gut) 10px; border-bottom: 1px solid var(--line); flex: none; }
.page-list { overflow: auto; padding: 4px 4px 20px; }
.pg summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 30px; padding: 6px 8px 2px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); cursor: pointer; border-radius: 4px; }
.pg summary::-webkit-details-marker { display: none; }
.pg summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-right: 5.5px; transition: transform .15s var(--ease); flex: none; }
.pg[open] summary::before { transform: rotate(45deg); }
.pg summary span:first-child { flex: 1; }
.pg summary:hover { color: var(--text); }
.pg-n { font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pg ul { list-style: none; margin: 0 0 6px; padding: 0; }
.pl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 5px 8px 5px 20px; border-radius: var(--r); color: inherit; text-decoration: none; transition: background-color .1s ease; }
.pl:hover { background: var(--hover); }
.pl.on { background: var(--accent-bg); }
.pl.on .pl-t { color: #fff; }
.pl.on .pl-r { color: #a9b9d9; }
.pl-t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.pl-r { grid-column: 1; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-side { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; gap: 5px; align-items: center; }
.dot { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; display: grid; place-items: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.tag { font-size: 10px; line-height: 15px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; white-space: nowrap; }
.mini-score { font-size: 11px; font-weight: 650; min-width: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.ms-good { color: var(--good); } .ms-warn { color: var(--warn); } .ms-bad { color: var(--bad); }

/* ---------- Canvas (Abstand 16 px ist Teil der Skalierung in app.js) ---------- */
.stage { grid-area: stage; min-width: 0; min-height: 0; background: var(--bg); }
.frame-wrap { position: relative; height: 100%; overflow: hidden; display: flex; justify-content: center; padding: 16px; }
.frame-box { position: relative; overflow: hidden; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 8px 28px rgba(0, 0, 0, .4); background: #fff; }
.frame-box iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #fff; }
.empty { position: absolute; inset: 16px; display: grid; place-content: center; justify-items: center; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 24px; }
.empty h1 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.empty p { margin: 0; color: var(--muted); max-width: 40ch; }
.loading { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; height: 30px; padding: 0 12px; border-radius: 15px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); white-space: nowrap; }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .16); border-top-color: var(--accent-t); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inspektor ---------- */
.tabs { display: flex; padding: 0 4px; border-bottom: 1px solid var(--line); height: 40px; flex: none; }
.tabs button { flex: 1; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-weight: 550; transition: color .12s ease, box-shadow .15s var(--ease); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tabs button:focus-visible { outline-offset: -2px; }
.tab { position: relative; overflow: auto; flex: 1; } /* hält auch .sr-Texte im Scrollbereich */
.section { border-top: 1px solid var(--line); }
.section-h { margin: 0; padding: 12px var(--gut) 8px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
details.section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; min-height: 38px; padding-top: 0; padding-bottom: 0; transition: color .12s ease; }
details.section > summary:hover { color: var(--text); }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after { content: ""; margin-left: auto; margin-right: 2px; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s var(--ease); }
details.section[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details.section > .pad { padding-top: 4px; }

.seo-score { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 14px var(--gut) 12px; position: relative; }
.seo-score .ring { grid-row: 1; grid-column: 1; width: 48px; height: 48px; }
.score-num { grid-row: 1; grid-column: 1; text-align: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.score-t { display: grid; gap: 2px; min-width: 0; }
.score-t strong { font-size: 13px; font-weight: 600; }
.score-t span { color: var(--muted); font-size: 11.5px; }
.ring-bg { stroke: var(--panel-3); stroke-width: 4; }
.ring-fg { stroke-width: 4; transition: stroke-dashoffset .35s var(--ease); }
.ring-good .ring-fg { stroke: var(--good); } .ring-warn .ring-fg { stroke: var(--warn); } .ring-bad .ring-fg { stroke: var(--bad); }

.fld { margin: 0 0 14px; }
.fld-h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-height: 18px; }
.fld-h label { font-weight: 500; font-size: 11.5px; color: var(--text-2); }
.cnt { margin-left: auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.cnt[data-status="good"] { color: var(--good); } .cnt[data-status="warn"] { color: var(--warn); } .cnt[data-status="bad"] { color: var(--bad); }
.fld input { width: 100%; height: 28px; padding: 0 8px; outline: none; font-size: 12.5px; }
.inp-wrap { display: flex; align-items: stretch; overflow: hidden; }
.inp-wrap textarea { flex: 1; min-width: 0; border: 0; padding: 6px 8px; background: transparent; resize: none; outline: none; font-size: 12.5px; line-height: 1.45; field-sizing: content; min-height: 2.9em; max-height: 14em; }
.suffix { display: flex; align-items: center; padding: 0 8px; background: var(--panel-2); color: var(--muted); font-size: 11px; border-left: 1px solid var(--line-2); white-space: nowrap; }
.fld.is-draft .inp-wrap { border-color: var(--accent-line); }
.fld.is-draft .inp-wrap:focus-within { border-color: var(--accent); }
.fld-ro { margin: 0; padding: 6px 8px; border-radius: var(--r); background: var(--panel-2); color: var(--text-2); font-size: 12.5px; }
.fld.locked .fld-h label { color: var(--muted); }
.lock { margin-left: auto; font-size: 10.5px; line-height: 16px; color: var(--muted); border: 1px solid var(--line-2); padding: 0 6px; border-radius: 4px; }
.hint { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; }
.src { margin: 6px 0 0; color: var(--muted); white-space: pre-wrap; word-break: break-all; }
.meter { position: relative; height: 3px; margin-top: 7px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.meter-ideal { position: absolute; top: 0; bottom: 0; background: rgba(63, 179, 127, .26); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--muted); transition: background-color .15s ease; } /* folgt dem Tippen: Breite ohne Animation */
.meter-fill[data-status="good"] { background: var(--good); } .meter-fill[data-status="warn"] { background: var(--warn); } .meter-fill[data-status="bad"] { background: var(--bad); }
.meter-note { margin: 5px 0 0; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.warn-t { color: var(--warn-t); }
.badge { font-size: 10.5px; line-height: 16px; padding: 0 7px; border-radius: 8px; background: var(--panel-3); color: var(--text-2); white-space: nowrap; }
.badge.draft { background: var(--accent-bg); color: var(--accent-t); }
.badge.warn { background: var(--warn-bg); color: var(--warn-t); }
.badge.ok { background: var(--good-bg); color: var(--good-t); }
.badge.bad { background: var(--bad-bg); color: var(--bad-t); }
.chip { font-size: 11px; font-weight: 600; line-height: 16px; padding: 2px 7px; border-radius: 4px; background: var(--panel-3); color: var(--text); white-space: nowrap; }
.chip.sm { font-size: 10.5px; font-weight: 550; line-height: 15px; padding: 1px 5px; color: var(--text-2); }
.note { margin: 10px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); font-size: 11.5px; line-height: 1.5; color: var(--text-2); }
.note code { font-size: 10.5px; overflow-wrap: anywhere; }
.note.warn { background: var(--warn-bg); color: #f0c47a; }
.note.bad { background: var(--bad-bg); color: #ff9b98; }

.serp { padding: 12px; border-radius: var(--r-lg); margin: 2px 0 16px; background: #fff; font-family: Arial, sans-serif; color: #202124; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.serp-url { display: flex; gap: 9px; align-items: center; font-size: 12px; line-height: 1.3; }
.serp-path { display: block; color: #4d5156; }
.fav { width: 24px; height: 24px; border-radius: 50%; background: #f1f3f4; display: grid; place-items: center; font-weight: 700; color: #b5652b; flex: none; font-size: 12px; }
.serp-t { margin-top: 7px; color: #1a0dab; font-size: 17px; line-height: 1.3; }
.serp-d { margin-top: 3px; color: #4d5156; font-size: 12.5px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 var(--gut) 14px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.stat { background: var(--panel); padding: 8px 10px; display: grid; gap: 1px; min-width: 0; }
.stat-v { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-k { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checks { padding: 0 4px 10px; }
.chk-g > summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 8px; cursor: pointer; font-weight: 550; color: var(--text-2); border-radius: var(--r); transition: background-color .1s ease; }
.chk-g > summary::-webkit-details-marker { display: none; }
.chk-g > summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .15s var(--ease); flex: none; }
.chk-g[open] > summary::before { transform: rotate(45deg); }
.chk-g > summary > span:first-child { flex: 1; }
.chk-g > summary:hover { background: var(--hover); color: var(--text); }
.chk-n { display: flex; gap: 4px; }
.chk-n b { position: relative; min-width: 18px; height: 16px; padding: 0 5px; border-radius: 8px; font-size: 10.5px; font-weight: 650; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.chk-n b svg { width: 11px; height: 11px; stroke-width: 2.2; }
.n-bad { background: var(--bad-bg); color: var(--bad-t); } .n-warn { background: var(--warn-bg); color: var(--warn-t); } .n-good { background: var(--good-bg); color: var(--good-t); }
.chk-g ul { list-style: none; margin: 0 0 6px; padding: 0 8px 0 20.5px; }
.chk { display: flex; gap: 8px; padding: 6px 0; align-items: flex-start; }
.chk + .chk { border-top: 1px solid var(--line-soft); }
.chk > div { min-width: 0; }
.chk-l { display: block; color: var(--text); }
.chk-d { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.st { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 0; }
.st svg { width: 12px; height: 12px; stroke-width: 2.2; }
.st.st-good { background: var(--good-bg); color: var(--good-t); } .st.st-warn { background: var(--warn-bg); color: var(--warn-t); } .st.st-bad { background: var(--bad-bg); color: var(--bad-t); } .st.st-info { background: var(--panel-3); color: var(--muted); }
.facts { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 12px; margin: 0; padding-top: 0; font-size: 11.5px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; word-break: break-all; color: var(--text-2); }
.social .btn { margin-top: 0; }

.el-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.el-actions { display: flex; justify-content: flex-end; margin-top: -6px; }
.was { margin-top: 12px; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--field); color: var(--text-2); font-size: 12px; }
.was span { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; color: var(--muted); }
.srcs { margin-top: 12px; font-size: 11.5px; }
/* Kleine Aufklapper (Quelle, Änderungen im Verlauf, Protokoll): gleiche Pfeilsprache wie die Seitengruppen */
.srcs summary, .hist summary, .log summary { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; cursor: pointer; color: var(--muted); list-style: none; border-radius: 4px; transition: color .12s ease; }
.srcs summary::-webkit-details-marker, .hist summary::-webkit-details-marker, .log summary::-webkit-details-marker { display: none; }
.srcs summary::before, .hist summary::before, .log summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s var(--ease); }
.srcs[open] summary::before, .hist details[open] summary::before, .log[open] summary::before { transform: rotate(45deg); }
.srcs summary:hover, .hist summary:hover, .log summary:hover { color: var(--text); }
.secs { list-style: none; margin: 10px 0; padding: 0 4px; }
.secs button { width: 100%; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 1px 10px; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: var(--r); cursor: pointer; transition: background-color .1s ease; }
.secs button:hover { background: var(--hover); }
.sec-n { grid-row: 1 / span 2; width: 22px; height: 22px; border-radius: 5px; background: var(--panel-3); display: grid; place-items: center; font-size: 10.5px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sec-l { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-m { color: var(--muted); font-size: 11px; } .sec-m b { color: var(--accent-t); font-weight: 600; }
.texts-head p { margin: 8px 0 6px; font-size: 11.5px; }
.texts { list-style: none; margin: 0; padding: 0 4px 20px; }
.texts button { width: 100%; display: flex; gap: 8px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: var(--r); cursor: pointer; transition: background-color .1s ease; }
.texts button:hover { background: var(--hover); }
.texts button.is-draft { background: var(--accent-bg); }
.texts .tx { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-2); }
.texts .g { position: relative; color: var(--warn); display: inline-grid; align-self: center; }
.texts .g svg { width: 12px; height: 12px; }

/* ---------- SEO-Tracker ---------- */
.tracker { grid-area: tracker; display: flex; flex-direction: column; overflow: auto; padding: 20px 24px 24px; background: var(--bg); min-width: 0; }
.tracker > * { flex-shrink: 0; }
.tr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 16px; margin-bottom: 16px; }
.tr-head h1 { margin: 0 0 3px; font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.tr-head p { margin: 0; font-size: 11.5px; }
.tr-tools { display: flex; flex: 1 1 420px; justify-content: flex-end; align-items: center; gap: 8px; }
.tr-tools input[type="search"] { flex: 0 1 260px; width: 260px; }
.switch { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 4px; color: var(--text-2); cursor: pointer; white-space: nowrap; border-radius: var(--r); }
.switch input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); }
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 1px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--line); }
.kpi { text-align: left; display: grid; align-content: start; gap: 2px; min-width: 0; padding: 10px 12px 11px; border: 0; border-radius: 0; background: var(--panel); cursor: pointer; transition: background-color .12s ease, box-shadow .12s ease; }
.kpi:not([data-filter]) { cursor: default; }
.kpi[data-filter]:hover { background: var(--panel-2); }
.kpi[aria-pressed="true"] { background: #202c42; box-shadow: inset 0 0 0 1px var(--accent-line); }
.kpi:focus-visible { outline-offset: -2px; }
.kpi-k { color: var(--text-2); font-size: 11px; font-weight: 500; }
.kpi-v { font-size: 20px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi[data-st="good"] .kpi-v { color: var(--good); } .kpi[data-st="warn"] .kpi-v { color: var(--warn); } .kpi[data-st="bad"] .kpi-v { color: var(--bad); }
.kpi-s { color: var(--muted); font-size: 10.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); cursor: pointer; font-size: 11.5px; transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .12s var(--ease); }
.chip-btn span { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-btn:hover { border-color: var(--line-3); background: var(--panel); color: var(--text); }
.chip-btn:active { transform: scale(.97); }
.chip-btn[aria-pressed="true"] { background: var(--accent-bg); border-color: var(--accent-line); color: var(--accent-t); }
.chip-btn[aria-pressed="true"] span { color: var(--accent-t); }
.tr-table-wrap { flex: 1 1 auto; flex-shrink: 1; min-height: 260px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; background: var(--panel); }
.tr-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 980px; }
.tr-table th { position: sticky; top: 0; z-index: 1; height: 32px; background: var(--panel-2); text-align: left; font-weight: 600; font-size: 11px; color: var(--muted); padding: 0 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tr-table th[data-sort] { cursor: pointer; user-select: none; transition: color .12s ease; }
.tr-table th[data-sort]:hover { color: var(--text); }
.tr-table th[aria-sort="ascending"], .tr-table th[aria-sort="descending"] { color: var(--text); }
.tr-table th[aria-sort="ascending"]::after, .tr-table th[aria-sort="descending"]::after { content: ""; display: inline-block; vertical-align: middle; margin: -2px 0 0 5px; border: 4px solid transparent; border-bottom: 5px solid var(--accent-t); border-top-width: 0; }
.tr-table th[aria-sort="descending"]::after { border-bottom-width: 0; border-top: 5px solid var(--accent-t); margin-top: 0; }
.tr-table td { padding: 7px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; background: var(--panel); transition: background-color .08s ease; }
.tr-table th:first-child, .tr-table td:first-child { position: sticky; left: 0; }
.tr-table th:first-child { z-index: 2; }
.tr-table tbody tr { cursor: pointer; }
.tr-table tbody tr:hover td { background: var(--hover); }
.tr-table tbody tr:focus-visible { outline: none; }
.tr-table tbody tr:focus-visible td { background: #202c42; box-shadow: inset 0 1px 0 var(--accent-t), inset 0 -1px 0 var(--accent-t); }
.tr-table tbody tr:focus-visible td:first-child { box-shadow: inset 2px 0 0 var(--accent-t), inset 0 1px 0 var(--accent-t), inset 0 -1px 0 var(--accent-t); }
.tr-table tbody tr:last-child td { border-bottom: 0; }
.tr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tr-title { display: block; font-weight: 550; max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-route { display: block; color: var(--muted); font-size: 11px; } .tr-route b { color: var(--accent-t); font-weight: 600; }
.sc { display: inline-flex; align-items: center; gap: 7px; } .sc svg { width: 20px; height: 20px; } .sc b { min-width: 20px; text-align: right; font-weight: 650; }
.delta { display: block; font-size: 10.5px; font-weight: 600; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.len { display: inline-flex; align-items: center; gap: 6px; }
.len::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.len[data-status="good"]::before { background: var(--good); } .len[data-status="warn"]::before { background: var(--warn); } .len[data-status="bad"]::before { background: var(--bad); } .len[data-status="info"]::before { background: var(--line-3); }
/* Die Zelle bleibt table-cell, sonst verrutschen Zeilenhöhe und Trennlinie */
.tr-issue { color: var(--text-2); white-space: nowrap; }
.tr-issue > .st { display: inline-grid; vertical-align: middle; margin: -2px 7px 0 0; }
.tr-issue > span:last-child { display: inline-block; vertical-align: middle; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Dialoge ---------- */
.dlg { border: 1px solid var(--line-2); border-radius: 10px; padding: 0; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); background: var(--panel); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .3); }
.dlg.wide { width: min(860px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(8, 8, 8, .62); }
.dlg[open] { display: flex; flex-direction: column; animation: dlg-in .18s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(4px) scale(.985); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 11px 0 18px; border-bottom: 1px solid var(--line); flex: none; }
.dlg-head h2 { margin: 0; font-size: 13.5px; font-weight: 600; }
.dlg-body { padding: 16px 18px; overflow: auto; }
.dlg-body > p:first-child { margin-top: 0; }
.dlg-body > p { line-height: 1.55; }
.dlg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex: none; }
.dlg-foot > .btn:last-child { margin-left: auto; } /* bleibt auch nach Umbruch rechts */
.chg-page { margin-bottom: 18px; }
.chg-page:last-child { margin-bottom: 0; }
.chg-page h3 { display: flex; gap: 10px; align-items: baseline; margin: 0 0 8px; font-size: 12.5px; font-weight: 600; }
.chg-page h3 a { display: inline-flex; align-items: center; min-height: 24px; color: var(--text); text-decoration: none; }
.chg-page h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.chg-page h3 .muted { font-weight: 400; font-size: 11.5px; }
.chg, .hist { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 12px; margin-bottom: 8px; background: var(--panel-2); }
.hist:last-child { margin-bottom: 0; }
.chg.stale { border-color: rgba(224, 160, 58, .5); }
.chg-h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 24px; font-size: 11.5px; }
.chg-h > .btn:last-child { margin-left: auto; }
.old, .new { margin: 6px 0 0; padding: 6px 9px; border-radius: var(--r); font-size: 12.5px; line-height: 1.5; display: flex; gap: 10px; }
.old span, .new span { flex: none; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; width: 42px; }
.old { background: rgba(240, 98, 95, .08); color: #e9b3b1; text-decoration: line-through; text-decoration-color: rgba(233, 179, 177, .5); }
.old span { text-decoration: none; color: var(--bad-t); }
.new { background: rgba(63, 179, 127, .09); color: #c4ebd6; }
.new span { color: var(--good-t); }
.hist details { margin-top: 6px; }
.hist summary { font-size: 12px; }
.hist-c { margin-top: 10px; font-size: 12px; }
.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.st-i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-3); flex: none; }
.steps .st-ok { color: var(--text); } .steps .st-ok .st-i { background: var(--good); border-color: var(--good); box-shadow: inset 0 0 0 3px var(--panel); }
.steps .st-run { color: var(--text); font-weight: 600; } .steps .st-run .st-i { border-color: var(--accent-t); border-top-color: transparent; animation: spin .8s linear infinite; }
.steps .st-bad { color: var(--bad-t); font-weight: 600; } .steps .st-bad .st-i { background: var(--bad); border-color: var(--bad); }
.result { padding: 10px 12px; border-radius: var(--r-lg); background: var(--good-bg); color: #9fe0c0; }
.result p { margin: 0 0 6px; } .result ul { margin: 0; padding-left: 18px; } .result .warn { color: var(--warn-t); }
.log summary { margin-top: 12px; }
.log pre { max-height: 220px; overflow: auto; background: var(--field); border: 1px solid var(--line); color: #d6d6d6; padding: 10px; border-radius: 6px; font-size: 11px; white-space: pre-wrap; }
.empty-state { display: grid; justify-items: center; gap: 4px; padding: 24px 16px 20px; text-align: center; }
.empty-state .es-i { width: 36px; height: 36px; margin-bottom: 8px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); }
.empty-state .es-i svg { width: 18px; height: 18px; }
.empty-state strong { font-size: 13px; font-weight: 600; }
.empty-state p { margin: 0; max-width: 46ch; color: var(--muted); font-size: 12px; line-height: 1.5; }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; z-index: 50; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 8px 12px; border-radius: var(--r-lg); background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text); box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s var(--ease); max-width: 520px; }
@starting-style { .toast { opacity: 0; transform: translateY(6px); } }
.toast.error { border-color: rgba(240, 98, 95, .6); } .toast.warn { border-color: rgba(224, 160, 58, .6); }
.toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- Login ---------- */
.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 16px; background: var(--bg); }
.login { width: 100%; display: grid; justify-items: center; }
.login-card { width: min(352px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.login-card .brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 12.5px; }
.login-card .mark { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: 10px; font-weight: 700; }
.login-card h1 { font-size: 17px; margin: 22px 0 4px; font-weight: 650; letter-spacing: -.01em; }
.login-card > p { margin: 0; font-size: 12px; }
.login-card form { display: grid; gap: 6px; margin-top: 18px; }
.login-card label { font-weight: 500; font-size: 11.5px; color: var(--text-2); margin-top: 6px; }
.login-card label:first-child { margin-top: 0; }
.login-card input { height: 32px; padding: 0 10px; outline: none; font-size: 12.5px; }
.login-card .note { margin-top: 8px; }
.login-card .btn { margin-top: 14px; height: 32px; }

/* ---------- Responsiv ---------- */
@media (max-width: 1280px) { .app { grid-template-columns: var(--rail-w) 224px minmax(0, 1fr) 304px; } .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: var(--top) 46dvh auto auto; grid-template-areas: "rail top" "rail stage" "rail insp" "rail pages"; height: auto; min-height: 100dvh; }
  .app[data-view="tracker"] { grid-template-rows: var(--top) auto; grid-template-areas: "rail top" "rail tracker"; }
  .rail { position: sticky; top: 0; height: 100dvh; align-self: start; }
  .pages { border-right: 0; border-top: 1px solid var(--line); max-height: 60dvh; } .inspector { border-left: 0; border-top: 1px solid var(--line); max-height: 80dvh; }
  .top { grid-template-columns: minmax(0, 1fr) auto; } .top .vp { display: none; }
  .tracker { padding: 16px; overflow: visible; } .tr-tools { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-start; } .tr-tools input[type="search"] { flex: 1 1 100%; width: 100%; }
  .tr-table-wrap { max-height: 72dvh; min-height: 0; }
  /* Tabelle scrollt seitlich; schmale, fixierte Seitenspalte statt gestreckter Spalten */
  .tr-table { width: max-content; min-width: 100%; }
  .tr-title, .tr-route { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 600px) {
  :root { --rail-w: 44px; }
  .top { gap: 8px; padding: 0 6px 0 10px; } .crumb-group, .crumb-sep, #modeBtn { display: none; }
  .score-pill { padding: 0 8px; } .tools { gap: 4px; } .tools .btn.primary { padding: 0 9px; }
  .tracker { padding: 14px 12px; } .tr-head { margin-bottom: 12px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 9px 10px 10px; } .kpi-v { font-size: 18px; }
  .tr-title, .tr-route { max-width: 140px; }
  .tr-table th, .tr-table td { padding-left: 10px; padding-right: 10px; }
  /* Filter als waagerechte Leiste, damit die Tabelle früher sichtbar wird */
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px 12px; padding: 0 12px 2px; scrollbar-width: none; }
  .chip-btn { flex: none; }
  .old, .new { flex-direction: column; gap: 1px; }
  .old span, .new span { width: auto; padding-top: 0; }
  .dlg-head { padding-left: 16px; } .dlg-body { padding: 14px 16px; } .dlg-foot { padding: 12px 16px; }
}
@media (max-width: 480px) {
  .dlg-foot .btn.primary { flex: 1 1 100%; order: 3; }
  .sp-l { display: none; }
  .tools .btn.primary { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } .spinner, .steps .st-run .st-i { animation-duration: 2.4s !important; } }
