/* PluBIM Hilfe – shared stylesheet. Works via file://, no external resources. */
@font-face{font-family:"Noto Sans";src:url("../fonts/NotoSans-Regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:"Noto Sans";src:url("../fonts/NotoSans-Medium.ttf") format("truetype");font-weight:500;font-display:swap}
@font-face{font-family:"Noto Sans";src:url("../fonts/NotoSans-SemiBold.ttf") format("truetype");font-weight:600;font-display:swap}
@font-face{font-family:"Noto Sans";src:url("../fonts/NotoSans-Bold.ttf") format("truetype");font-weight:700;font-display:swap}

:root{
  --color-primary:#607891;--color-text-primary:#000302;--color-secondary:#F1DEBA;--plb-charcoal:#ADADAD;
  --color-page-background:#EFEFEF;--color-interaction-hover:#90B2D6;--color-surface-highlight:#CFD7DE;
  --color-control-background:#FFFFFF;--color-control-border:#ADADAD;--color-info:#3E73A8;
  --color-text-secondary:#9CA3AF;--color-surface-muted:#F2F4F7;--color-surface-subtle:#E3E8EE;
  --color-steps-border:#E1E4E8;--color-stroke-accent:#7A8794;
  --color-critical:#D50000;--color-critical-badge-background:#F8D3D3;--color-critical-background:#FBE7E7;--color-critical-hover:#EEC2B9;
  --color-success:#2FA45E;--color-success-badge-background:#D7F0DE;--color-success-background:#E9F7ED;--color-success-hover:#C2EEB9;
  --color-warning:#B8600A;--color-warning-badge-background:#FBDFC0;--color-warning-background:#FDF0DE;
  /* --color-warning-hover intentionally unused until the XAML value is verified */
  /* Zoom boxes on screenshots: PluBIM Color_Info. Not a status colour (critical, warning, success), so a box is
     not read as an error; the white edge keeps it visible on the blue-grey title and button bars */
  --color-annotation:#3E73A8;
  --radius:8px;--header-h:56px;
}
*{box-sizing:border-box}
html{scroll-padding-top:calc(var(--header-h) + 20px)}
body{margin:0;background:var(--color-page-background);color:var(--color-text-primary);font:15px/1.6 "Noto Sans","Segoe UI",system-ui,sans-serif;-webkit-font-smoothing:antialiased}
a{color:var(--color-info);text-decoration:none}
a:hover{text-decoration:underline}
:focus-visible{outline:2px solid var(--color-info);outline-offset:2px}
img{max-width:100%;height:auto}
h1,h2,h3{line-height:1.25;margin:0}
h1{font-size:34px;font-weight:700}
h2{font-size:22px;font-weight:600}
h3{font-size:17px;font-weight:600}
p,ul,ol,dl,figure{margin:0}
/* Small meta text: use --color-primary (4.6:1). --color-text-secondary fails contrast on white. */
.meta{font-size:13px;color:var(--color-primary)}

/* Header */
.site-header{position:sticky;top:0;z-index:5;background:var(--color-primary);color:var(--color-text-primary)}
.site-header__inner{max-width:1320px;margin:0 auto;padding:0 24px;height:var(--header-h);display:flex;align-items:center;gap:14px}
.site-header__brand{display:flex;align-items:center;gap:10px;color:var(--color-text-primary);font-weight:600;font-size:17px}
.site-header__brand:hover{text-decoration:none}
.site-header__logo{width:32px;height:32px;display:block}
.site-header__version{margin-left:auto;font-size:13px;background:var(--color-surface-highlight);color:var(--color-text-primary);padding:3px 10px;border-radius:999px}

/* Layout */
.layout{max-width:1320px;margin:0 auto;padding:24px;display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}
.content{flex:999 1 560px;min-width:0;background:#fff;border:1px solid var(--color-steps-border);border-radius:10px;padding:32px clamp(20px,4vw,48px) 48px;display:flex;flex-wrap:wrap;gap:40px;align-items:flex-start}
.article{flex:999 1 520px;min-width:0;max-width:780px;display:flex;flex-direction:column;gap:40px}
.article > section{display:flex;flex-direction:column;gap:14px}
.site-footer{max-width:1320px;margin:0 auto;padding:4px 24px 32px;font-size:12px;color:var(--color-primary);display:flex;flex-wrap:wrap;gap:6px 18px}

/* Sidebar navigation */
.sidenav{flex:1 1 220px;max-width:260px;position:sticky;top:calc(var(--header-h) + 24px);font-size:14px;display:flex;flex-direction:column;gap:18px}
.sidenav ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.sidenav__group{padding:0 10px 4px;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--color-primary)}
.sidenav a,.sidenav .pending,.sidenav .current{display:flex;justify-content:space-between;gap:8px;padding:4px 10px;border-radius:6px}
.sidenav a{color:var(--color-info);font-weight:500}
.sidenav a:hover{background:var(--color-surface-subtle);text-decoration:none}
.sidenav .current{background:var(--color-surface-highlight);color:var(--color-text-primary);font-weight:600}
.sidenav .pending{color:var(--color-stroke-accent)}
.sidenav .pending::after{content:"folgt";font-size:11px}
.sidenav .sub a{padding-left:22px;font-size:13px;color:var(--color-text-primary);font-weight:400}
@media (max-width:820px){.sidenav{position:static;max-width:none}}

/* On-page TOC */
.toc{flex:1 1 180px;max-width:220px;position:sticky;top:calc(var(--header-h) + 24px);font-size:13px;display:flex;flex-direction:column;gap:6px}
.toc__title{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--color-primary)}
.toc a{color:var(--color-text-primary)}
@media (max-width:1100px){.toc{display:none}}

/* Breadcrumb + tool header */
.breadcrumb{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--color-primary)}
.breadcrumb li{list-style:none}
.breadcrumb li+li::before{content:"›";margin-right:6px}
.tool-head{display:flex;align-items:center;gap:14px}
.tool-head img{width:48px;height:48px}
.lead{font-size:17px;text-wrap:pretty}
.facts{display:flex;flex-wrap:wrap;gap:1px;background:var(--color-steps-border);border:1px solid var(--color-steps-border);border-radius:var(--radius);overflow:hidden;font-size:14px}
.facts > div{flex:1 1 200px;background:var(--color-surface-muted);padding:10px 14px}
.facts dt{font-size:12px;color:var(--color-primary)}
.facts dd{margin:0;font-weight:600}

/* Cards (task finder, workflow chooser, related guides) */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:10px}
.card{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--color-steps-border);border-radius:var(--radius);background:var(--color-surface-muted);color:var(--color-text-primary)}
a.card:hover{background:var(--color-surface-highlight);border-color:var(--color-interaction-hover);text-decoration:none}
.card__eyebrow{font-size:12px;font-weight:600;color:var(--color-primary)}
.card__title{font-weight:600}
.card--pending{background:#fff}
.card--pending .card__eyebrow::after{content:" · Anleitung folgt";color:var(--color-stroke-accent);font-weight:400}

/* Ribbon overview */
.ribbon-groups{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:14px;align-items:start}
.ribbon-group{border:1px solid var(--color-steps-border);border-radius:var(--radius);overflow:hidden}
.ribbon-group h3{padding:10px 14px;background:var(--color-surface-subtle);font-size:15px}
.ribbon-group ul{list-style:none;margin:0;padding:4px 0}
.ribbon-group li{display:flex;align-items:center;gap:10px;padding:8px 14px;border-top:1px solid var(--color-surface-muted)}
.ribbon-group li img{width:24px;height:24px;flex:none}
.ribbon-group .name{flex:1;font-weight:600}
.badge{font-size:12px;padding:1px 8px;border-radius:999px;background:var(--color-surface-muted);border:1px solid var(--color-steps-border);white-space:nowrap}

/* Figures / screenshots */
figure.screenshot{display:flex;flex-direction:column;gap:6px}
figure.screenshot img{display:block;border:1px solid var(--color-control-border);border-radius:6px;background:#fff}
figure.screenshot figcaption{font-size:13px;color:var(--color-primary)}
figure.screenshot figcaption strong{color:var(--color-text-primary);font-weight:600}
.screenshot--wide img{width:100%}

/* Workflow */
.workflow{padding-top:28px;border-top:1px solid var(--color-steps-border)}
.workflow__eyebrow{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--color-primary)}
ol.steps{list-style:none;padding:0;counter-reset:step;display:flex;flex-direction:column}
ol.steps > li{counter-increment:step;position:relative;padding:3px 0 22px 44px;display:flex;flex-wrap:wrap;gap:12px 20px;align-items:flex-start}
ol.steps > li::before{content:counter(step);position:absolute;left:0;top:0;width:30px;height:30px;border-radius:50%;background:var(--color-primary);color:#fff;font-weight:700;font-size:14px;display:grid;place-items:center}
ol.steps > li:not(:last-child)::after{content:"";position:absolute;left:14px;top:34px;bottom:4px;width:2px;background:var(--color-steps-border)}
ol.steps > li > p{flex:1 1 100%}
ol.steps > li > figure{flex:1 1 100%}
/* Screenshot beside the text: add {.beside} to the step's first paragraph */
ol.steps > li > p.beside{flex:1 1 220px}
ol.steps > li > p.beside + figure{flex:1 1 260px}

/* Callouts: Tipp, Hinweis, Wichtig, Achtung, Ergebnis */
.callout{display:flex;flex-direction:column;gap:6px;padding:12px 16px;border-radius:var(--radius);font-size:14px}
.callout::before{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.tipp{background:var(--color-secondary)}.tipp::before{content:"Tipp"}
.hinweis{background:var(--color-surface-subtle)}.hinweis::before{content:"Hinweis"}
.wichtig{background:var(--color-warning-background)}.wichtig::before{content:"▲  Wichtig";color:var(--color-text-primary)}
.achtung{background:var(--color-critical-background)}.achtung::before{content:"◆  Achtung"}
.ergebnis{background:var(--color-success-background);padding:16px 18px}.ergebnis::before{content:"●  Ergebnis"}
.wichtig::first-letter{color:var(--color-warning)}
.achtung::first-letter{color:var(--color-critical)}
.ergebnis::first-letter{color:var(--color-success)}

/* Placeholder for unverified content: ==Text== in Markdown */
mark{background:var(--color-surface-subtle);border:1px dashed var(--color-stroke-accent);padding:0 6px;border-radius:3px;color:var(--color-text-primary)}

/* Common problems: <details> works without JS */
.problems{border:1px solid var(--color-steps-border);border-radius:var(--radius);overflow:hidden}
.problems details+details{border-top:1px solid var(--color-steps-border)}
.problems summary{padding:12px 16px;font-weight:600;cursor:pointer;background:var(--color-surface-muted)}
.problems details > :not(summary){padding:10px 16px 14px;font-size:14px}

/* Page parts used by the generated pages */
.skip{position:absolute;left:-9999px}.skip:focus{left:12px;top:12px;z-index:10;background:#fff;padding:6px 10px;border-radius:6px}
.intro,.tool-intro{display:flex;flex-direction:column;gap:14px}
.small{font-size:14px}
.pending-inline{font-size:12px;color:var(--color-stroke-accent)}
.article ul:not(.checklist):not(.sub){padding-left:20px;display:flex;flex-direction:column;gap:4px}
.checklist{list-style:none;padding:0;display:flex;flex-direction:column;gap:6px}
.checklist li{position:relative;padding-left:22px}
.checklist li::before{content:"";position:absolute;left:0;top:6px;width:12px;height:12px;border:1.5px solid var(--color-primary);border-radius:3px}
.card__meta{font-size:13px;color:var(--color-primary)}
.card__meta b{color:var(--color-info);font-weight:600}
.card--pending .card__meta b{color:var(--color-text-primary)}
.ribbon-group h3{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.ribbon-group h3 span{font-size:12px;font-weight:400;color:var(--color-primary)}
.ribbon-group .name{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.ribbon-group .name small{font-size:12px;font-weight:400;color:var(--color-primary)}
.ribbon-group .go{font-size:13px;font-weight:600;white-space:nowrap}
.home-cols{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:20px}
.panel{display:flex;flex-direction:column;gap:12px;padding:20px 22px;border:1px solid var(--color-steps-border);border-radius:var(--radius)}
.panel h2{font-size:18px}
.panel--sand{background:var(--color-secondary);border-color:var(--color-secondary)}
ol.steps--small > li{padding:0 0 10px 36px;font-size:14px}
ol.steps--small > li::before{width:24px;height:24px;font-size:12px;background:#fff;color:var(--color-primary);border:1.5px solid var(--color-primary)}
ol.steps--small > li::after{display:none}
ol.steps > li > ul{flex:1 1 100%;font-size:14px}
.callout > p,.callout > figure{margin:0}
.workflow__eyebrow{margin-bottom:-10px}
/* Fallback shown by the generator's onerror handler when a screenshot is not yet delivered */
.shot-missing{display:grid;place-items:center;min-height:140px;border:1px dashed var(--color-stroke-accent);border-radius:6px;background:repeating-linear-gradient(135deg,var(--color-surface-muted) 0 10px,var(--color-surface-subtle) 10px 20px);font:12px ui-monospace,Consolas,monospace;color:var(--color-text-primary);padding:12px;text-align:center}
.screenshot--wide .shot-missing{min-height:110px}
/* Ribbon groups – larger labels */
.sidenav__group{padding:0 10px 4px;font-size:15px;font-weight:700;letter-spacing:0;text-transform:none;color:var(--color-text-primary)}
.ribbon-group h3{font-size:17px;font-weight:700}
.sidenav .sub{margin:1px 0 4px}
.sidenav .sub .current{padding-left:22px;font-size:13px;background:var(--color-surface-subtle)}
.icon-missing--sm{width:24px!important;height:24px!important;border-radius:4px!important}
.icon-missing{width:48px;height:48px;flex:none;border-radius:8px;border:1px solid var(--color-steps-border);background:repeating-linear-gradient(135deg,var(--color-surface-muted) 0 4px,var(--color-surface-subtle) 4px 8px)}

kbd{font:12px/1 ui-monospace,Consolas,monospace;padding:2px 6px;border:1px solid var(--color-control-border);border-bottom-width:2px;border-radius:4px;background:#fff}

@media print{.site-header,.sidenav,.toc{display:none}.content{border:0;padding:0}body{background:#fff}}

/* Two Ribbon buttons share the Lüftung guide. */
.tool-icons{display:flex;align-items:center;gap:3px;flex:none}
.ribbon-group li .tool-icons img{width:24px;height:24px;flex:none}

/* Annotated screenshots: numbered boxes from "^^^ box" lines; Assets/js/annotate.js zooms into the clicked one.
   Without the script (or in print) boxes and legend still show. --s is the current zoom, so borders and badges keep
   their size while the canvas is scaled. */
.annotated__stage{position:relative;overflow:hidden;width:fit-content;max-width:100%;border:1px solid var(--color-control-border);border-radius:6px;background:#fff}
.annotated__canvas{position:relative;transform-origin:0 0;transition:transform .45s cubic-bezier(.2,.7,.2,1)}
figure.screenshot .annotated__canvas img{border:0;border-radius:0;max-width:100%;height:auto}
.annotated__box{position:absolute;padding:0;margin:0;background:transparent;cursor:zoom-in;border:calc(2px / var(--s,1)) solid var(--color-annotation);box-shadow:0 0 0 calc(1px / var(--s,1)) rgba(255,255,255,.85);border-radius:calc(4px / var(--s,1));transition:box-shadow .3s,opacity .3s}
.annotated__box span{position:absolute;left:0;top:0;transform:translate(-50%,-50%);width:calc(20px / var(--s,1));height:calc(20px / var(--s,1));border-radius:50%;background:var(--color-annotation);color:#fff;font:600 calc(12px / var(--s,1))/calc(20px / var(--s,1)) "Noto Sans","Segoe UI",sans-serif;text-align:center}
.annotated__box:focus-visible{outline:calc(2px / var(--s,1)) solid var(--color-info);outline-offset:calc(2px / var(--s,1))}
.annotated.is-zoomed .annotated__box{opacity:0}
.annotated--static .annotated__box,.annotated--static .annotated__legend button{cursor:default}
.annotated--static .annotated__box span{width:28px;height:28px;font-size:16px;line-height:28px}
.annotated--static .annotated__legend button:hover{color:var(--color-text-primary);text-decoration:none}
.annotated.is-zoomed .annotated__box.is-active{opacity:1;cursor:zoom-out;box-shadow:0 0 0 100vmax rgba(0,3,2,.35)}
.annotated__legend{margin:2px 0 0;padding-left:22px;font-size:14px}
.annotated__legend li::marker{color:var(--color-annotation);font-weight:600}
.annotated__legend button{all:unset;display:inline-block;vertical-align:top;text-align:left;cursor:pointer;color:var(--color-text-primary)}
.annotated__legend button:hover,.annotated__legend button[aria-pressed="true"]{color:var(--color-info);text-decoration:underline}
.annotated__legend button:focus-visible{outline:2px solid var(--color-info);outline-offset:2px}
@media (prefers-reduced-motion:reduce){.annotated__canvas,.annotated__box{transition:none}}
@media print{.annotated__canvas{transform:none!important}.annotated .annotated__box{opacity:1!important;box-shadow:none!important}}
/* Tables in guides (comparisons, rules): full width, left-aligned, light rules between rows */
.article table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;border:1px solid var(--color-steps-border);border-radius:var(--radius);overflow:hidden}
.article th,.article td{text-align:left;vertical-align:top;padding:8px 12px;border-bottom:1px solid var(--color-steps-border)}
.article th{background:var(--color-surface-subtle);color:var(--color-text-primary);font-weight:600;border-bottom-color:var(--color-control-border)}
.article tr:last-child td{border-bottom:0}
.inline-icon{height:1.6em;width:auto;vertical-align:middle;margin:0 .15em}
.swatch{display:inline-block;width:1.1em;height:1.1em;margin-right:.45em;border:1px solid #9aa5b1;border-radius:3px;vertical-align:-.15em}
.status-icon{width:32px;height:32px;display:block;border-radius:3px}
/* Click-to-enlarge for wide images (Assets/js/zoom.js) */
figure.zoomable img{cursor:zoom-in}
.zoom-overlay{position:fixed;inset:0;z-index:100;display:flex;align-items:center;overflow:auto;padding:24px;background:rgba(0,3,2,.72);cursor:zoom-out}
.zoom-overlay img{flex:none;max-width:none;height:auto;margin:auto;background:#fff;box-shadow:0 8px 32px rgba(0,0,0,.4)}
/* Sidebar: own scroll bar, foldable sub-entries (Assets/js/nav.js) */
.sidenav{max-height:calc(100vh - var(--header-h) - 48px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px}
.sidenav li.has-sub{position:relative}
.sidenav li.has-sub > a,.sidenav li.has-sub > .current{padding-right:34px}
.sidenav__toggle{position:absolute;top:2px;right:2px;width:26px;height:24px;border:0;border-radius:6px;background:transparent;cursor:pointer;color:var(--color-stroke-accent)}
.sidenav__toggle::before{content:"";display:inline-block;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);transition:transform .15s}
.sidenav li.is-open > .sidenav__toggle::before{transform:rotate(45deg)}
.sidenav__toggle:hover{background:var(--color-surface-subtle)}
.sidenav li.has-sub:not(.is-open) > ul.sub{display:none}
@media (max-width:820px){.sidenav{max-height:none;overflow:visible}}

/* Language switch in the header (DE | EN) */
.lang-switch{display:flex;gap:2px;margin-left:12px;font-size:13px;font-weight:600}
.lang-switch a,.lang-switch span{padding:3px 8px;border-radius:999px;color:var(--color-text-primary);text-decoration:none}
.lang-switch a:hover{background:var(--color-surface-highlight)}
.lang-switch span{background:var(--color-surface-highlight)}
/* English labels for callouts and placeholders on English pages (html lang="en") */
html[lang="en"] .tipp::before{content:"Tip"}
html[lang="en"] .hinweis::before{content:"Note"}
html[lang="en"] .wichtig::before{content:"▲  Important"}
html[lang="en"] .achtung::before{content:"◆  Caution"}
html[lang="en"] .ergebnis::before{content:"●  Result"}
html[lang="en"] .sidenav .pending::after{content:"coming"}
html[lang="en"] .card--pending .card__eyebrow::after{content:" · guide coming"}
