/* abbund-viewer.css – alle Regeln sind auf .abv begrenzt und beeinflussen die Host-Seite nicht. Farben/Schriften über die Custom Properties in .abv anpassen. */
.abv{
  --bg:#eef0ee; --panel:#f8f9f7; --line:#d3d8d2; --fg:#1f2523; --muted:#5d6762;
  --accent:#2c64a6;           /* Schlagschnur-Blau */
  --accent-soft:#dbe6f3;
  --wood:#d9b98a; --wood-edge:#8a6a3c; --op:#c8462c; --op2:#d98a1f; --drill:#2c64a6;
  --scene:#e4e7e3;
  --f-display:"Archivo","Arial Narrow",Arial,sans-serif;
  --f-body:"Source Sans 3","Segoe UI",system-ui,sans-serif;
  --f-mono:"IBM Plex Mono",ui-monospace,Consolas,monospace;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .abv:not([data-theme="light"]){
  --bg:#151917; --panel:#1c211f; --line:#323a36; --fg:#e4e8e5; --muted:#9aa49f;
  --accent:#7fb0ea; --accent-soft:#24374c; --wood:#c9a575; --wood-edge:#6d5230; --op:#ef6a4f; --op2:#f0a548; --drill:#7fb0ea; --scene:#202624; color-scheme:dark}}
:root[data-theme="dark"] .abv:not([data-theme="light"]),.abv[data-theme="dark"]{
  --bg:#151917; --panel:#1c211f; --line:#323a36; --fg:#e4e8e5; --muted:#9aa49f;
  --accent:#7fb0ea; --accent-soft:#24374c; --wood:#c9a575; --wood-edge:#6d5230; --op:#ef6a4f; --op2:#f0a548; --drill:#7fb0ea; --scene:#202624; color-scheme:dark}
.abv{background:var(--bg);color:var(--fg);font-family:var(--f-body);font-size:15px;line-height:1.45;margin:0;text-align:left}
.abv,.abv *{box-sizing:border-box}
.abv-app{display:flex;flex-direction:column;min-height:100%;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:12px 16px;gap:12px}
.abv header{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px}
.abv h1{font-family:var(--f-display);font-stretch:80%;font-weight:800;font-size:1.45rem;letter-spacing:.01em;margin:0;text-wrap:balance}
.abv h1 small{font-weight:500;color:var(--muted);font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;margin-left:6px}
.abv .tabs{display:flex;gap:4px;margin-left:auto}
.abv button,.abv .btn,.abv select{font:inherit;font-size:.9rem;color:var(--fg);background:var(--panel);border:1px solid var(--line);border-radius:6px;padding:6px 12px;cursor:pointer}
.abv button:hover,.abv .btn:hover{border-color:var(--accent)}
.abv button:focus-visible,.abv .btn:focus-within,.abv select:focus-visible,.abv input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.abv button[aria-pressed="true"],.abv button.on{background:var(--accent);border-color:var(--accent);color:var(--bg)}
.abv button:disabled{opacity:.45;cursor:not-allowed}
.abv .btn input{display:none}
.abv .toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.abv .drop{border:1.5px dashed var(--line);border-radius:8px;padding:8px 12px;color:var(--muted);font-size:.88rem;flex:1 1 260px;min-width:0}
.abv .drop.hot{border-color:var(--accent);background:var(--accent-soft);color:var(--fg)}
.abv .jobinfo{font-size:.85rem;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 14px}
.abv .jobinfo b{color:var(--fg);font-weight:600}
.abv .pill{display:inline-block;font-family:var(--f-mono);font-size:.72rem;padding:1px 6px;border-radius:4px;background:var(--accent-soft);color:var(--fg);letter-spacing:.03em}
.abv .grid{display:grid;grid-template-columns:minmax(300px,410px) minmax(0,1fr);grid-template-rows:minmax(380px,58vh) auto;gap:12px;flex:1}
.abv .panel{background:var(--panel);border:1px solid var(--line);border-radius:8px;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.abv .panel h2{font-family:var(--f-display);font-stretch:85%;font-size:.78rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin:0;padding:10px 12px 6px;display:flex;align-items:center;gap:8px}
.abv .list{grid-row:1 / span 2}
.abv .list .filter{padding:0 12px 8px}
.abv .list input{width:100%;font:inherit;font-size:.9rem;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--fg)}
.abv .scroll{overflow:auto;flex:1;min-height:0}
.abv table{border-collapse:collapse;width:100%;font-size:.86rem;font-variant-numeric:tabular-nums}
.abv th{position:sticky;top:0;background:var(--panel);text-align:left;font-weight:600;color:var(--muted);font-size:.74rem;letter-spacing:.05em;text-transform:uppercase;padding:6px 8px;border-bottom:1px solid var(--line);white-space:nowrap}
.abv td{padding:5px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.abv td.num,.abv th.num{text-align:right;white-space:nowrap}
.abv .ops td.mono{white-space:nowrap}
.abv td.mono{font-family:var(--f-mono);font-size:.8rem}
.abv tr.part{cursor:pointer}
.abv tr.part:hover td{background:var(--accent-soft)}
.abv tr.part.sel td{background:var(--accent);color:var(--bg)}
.abv tr.part.sel td .sub{color:var(--bg)}
.abv .sub{color:var(--muted);font-size:.76rem;display:block}
.abv tr.grp td{background:var(--bg);font-weight:600;font-size:.78rem;color:var(--muted);letter-spacing:.03em}
.abv .view{position:relative}
.abv .view canvas{display:block;width:100%;height:100%}
.abv .view .stage{flex:1;min-height:0;position:relative}
.abv .overlay{position:absolute;left:10px;bottom:10px;right:10px;display:flex;flex-wrap:wrap;gap:6px 12px;font-size:.78rem;color:var(--muted);pointer-events:none}
.abv .overlay span{background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:2px 6px;opacity:.92}
.abv .sw{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.abv .partttl{font-family:var(--f-display);font-stretch:85%;font-weight:700;font-size:1.05rem;color:var(--fg);letter-spacing:0;text-transform:none}
.abv .ops tr:hover td{background:var(--accent-soft)}
.abv .ops tr.hl td{background:var(--accent-soft)}
.abv .raw{color:var(--muted);white-space:pre;font-family:var(--f-mono);font-size:.74rem}
.abv .empty{padding:16px 12px;color:var(--muted)}
.abv .note{font-size:.8rem;color:var(--muted)}
.abv /* Formatreferenz */
.ref{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;max-width:980px}
.abv .ref section{background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:16px 18px;min-width:0}
.abv .ref h2{font-family:var(--f-display);font-stretch:82%;font-weight:800;font-size:1.3rem;margin:0 0 8px;text-wrap:balance}
.abv .ref h3{font-family:var(--f-display);font-stretch:90%;font-weight:700;font-size:1rem;margin:16px 0 6px}
.abv .ref p,.abv .ref li{max-width:70ch}
.abv .ref .tw{overflow-x:auto;margin:8px 0}
.abv .ref table td,.abv .ref table th{white-space:normal}
.abv .ref pre{font-family:var(--f-mono);font-size:.78rem;background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:10px 12px;overflow-x:auto;margin:8px 0;line-height:1.5}
.abv .ref code{font-family:var(--f-mono);font-size:.85em}
.abv .ref .hl1{color:var(--accent);font-weight:500}.abv .ref .hl2{color:var(--op);font-weight:500}.abv .ref .hl3{color:var(--op2);font-weight:500}
.abv .ref .flag{border-left:3px solid var(--op2);padding:6px 12px;background:var(--bg);border-radius:0 6px 6px 0}
@media (max-width:820px){
  .abv .grid{grid-template-columns:minmax(0,1fr);grid-template-rows:auto}
  .abv .list{grid-row:auto;max-height:46vh}
  .abv .view{height:62vh}
  .abv .tabs{margin-left:0}
  .abv .view h2{flex-wrap:wrap}
  .abv .view h2 .partttl{flex:1 1 100%;font-size:.98rem}
  .abv .view h2>span:last-child{margin-left:0!important;flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){.abv *{transition:none!important}}
.abv .jobinfo .warn{color:var(--op2)}
