/* R43 ticket – /ticket als eigene Anwendung (TEXTE43 T3): dunkle App-Leiste statt Website-Kopfzeile, Statusleiste statt Fußzeile,
   keine helle Fläche, kein Rot (Akzent Blau #304ee7), Anhänge im Ticket, kurzer Überblend beim Wechsel Website ↔ /ticket.
   Töne wie die linke Leiste des Helpdesks: Leiste #0a1215, Linie #21343a, Text #e4ebe8, gedämpft #93a6a3. In hell, dunkel und im
   Lesemodus gleich (die App ist immer dunkel). Alles mit „html body.page-ticket …“, weil ältere Regeln jede <header>-Leiste treffen. */

/* ---------- 0. no light surface, no red */
html body.page-ticket .page-thread{display:none!important}
html:has(body.page-ticket){background:#0d1619;color-scheme:dark}
html body.page-ticket>main{min-height:calc(100vh - 56px - 80px)}
/* skip link „Zum Ticket“: first stop of the keyboard, visible only with focus */
html body.page-ticket .tk-skip-link{position:fixed;left:12px;top:8px;z-index:100;padding:11px 18px;background:#304ee7;color:#fff!important;border-radius:9px;
  font:800 14px/1.2 Manrope,Arial,sans-serif;text-decoration:none;transform:translateY(-200%)}
html body.page-ticket .tk-skip-link:focus{transform:none;outline:2px solid #fff;outline-offset:2px}

/* ---------- 1. the app bar */
html body.page-ticket .tk-appbar{--ab:#0a1215;--ab-line:#21343a;--ab-text:#e4ebe8;--ab-muted:#93a6a3;--ab-panel:#132126;
  position:sticky;top:0;z-index:60;box-sizing:border-box;display:flex;align-items:center;gap:12px;height:56px;margin:0 0 0 -76px;padding:0 18px 0 0;
  background:var(--ab);border-bottom:1px solid var(--ab-line);color:var(--ab-text);font:600 14px/1.2 Manrope,Arial,sans-serif;filter:none!important;backdrop-filter:none!important}
.tk-appbar *{box-sizing:border-box}
.tk-ab-start{display:flex;align-items:center;gap:12px;min-width:0}
.tk-sw{position:relative;flex:none;display:grid;place-items:center;width:76px;height:56px;border-right:1px solid var(--ab-line)}
html body.page-ticket .tk-ab-icon{display:grid;place-items:center;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:10px;background:transparent;color:var(--ab-muted);cursor:pointer}
html body.page-ticket .tk-ab-icon:hover,html body.page-ticket .tk-ab-icon[aria-expanded=true]{background:rgba(228,235,232,.07);color:var(--ab-text)}
.tk-ab-icon svg{width:22px;height:22px;fill:currentColor}
html body.page-ticket .tk-back{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:7px 13px 7px 11px;border:1px solid #2c444b;border-radius:9px;background:#132126;
  color:var(--ab-text)!important;font:700 14px/1.2 Manrope,Arial,sans-serif;text-decoration:none;white-space:nowrap}
html body.page-ticket .tk-back:hover{border-color:#47646c;background:#182a30}
.tk-back-arrow{font-size:17px;line-height:1;margin-top:-2px;color:#9fb1ff}
.tk-back-short{display:none}
.tk-ab-app{padding-left:12px;border-left:1px solid var(--ab-line);color:var(--ab-muted);font-weight:700;white-space:nowrap}
.tk-ab-id,.tk-ab-more{display:none!important}
.tk-ab-tools{margin-left:auto;display:flex;align-items:center;gap:8px}
.tk-more-pages{display:none}
html body.page-ticket .tk-appbar :is(a,button):focus-visible{outline:2px solid #8ea2ff!important;outline-offset:2px}

/* the controls that came from the website header, as calm symbol buttons */
html body.page-ticket .tk-appbar .view-controls{display:flex;gap:6px;margin:0!important}
html body.page-ticket .tk-appbar .view-btn{width:36px!important;min-width:36px;height:36px;min-height:36px;padding:0!important;border:1px solid transparent!important;border-radius:9px!important;
  background:transparent!important;color:var(--ab-muted)!important;box-shadow:none!important}
html body.page-ticket .tk-appbar .view-btn:hover{background:rgba(228,235,232,.07)!important;color:var(--ab-text)!important}
html body.page-ticket .tk-appbar .view-btn[aria-pressed=true]{border-color:#3d55c9!important;color:#c9d4ff!important;background:rgba(48,78,231,.16)!important}
html body.page-ticket .tk-appbar .view-btn svg{width:17px;height:17px}
html body.page-ticket .tk-appbar :is(.view-read span,[data-sound-label]){position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
html body.page-ticket .tk-appbar .sound-toolbar{position:relative;display:flex;align-items:center;gap:2px;margin:0!important}
html body.page-ticket .tk-appbar .sound-settings-toggle{display:none!important}
html body.page-ticket .tk-appbar .scene-sound-toggle,html body.page-ticket .tk-appbar .scene-sound-toggle[aria-pressed]{display:grid!important;place-items:center;width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;padding:0!important;
  border:1px solid transparent!important;border-radius:9px!important;background:transparent!important;box-shadow:none!important;color:var(--ab-muted)!important}
html body.page-ticket .tk-appbar .scene-sound-toggle *{color:inherit!important;stroke:currentColor!important}
html body.page-ticket .tk-appbar .scene-sound-toggle:hover{background:rgba(228,235,232,.07)!important;color:var(--ab-text)!important}
html body.page-ticket .tk-appbar .scene-sound-toggle[aria-pressed=true]{border-color:#3d55c9!important;background:rgba(48,78,231,.16)!important;color:#c9d4ff!important}
html body.page-ticket .tk-appbar .scene-sound-toggle svg{width:17px!important;height:17px!important}
html body.page-ticket .tk-appbar .language-switch,html body.page-ticket .tk-appbar .language-switch.is-slider{height:36px!important;padding:2px!important;margin:0 4px 0 0!important;border:1px solid var(--ab-line)!important;border-radius:99px!important;background:#132126!important;box-shadow:none!important}
html body.page-ticket .tk-appbar .language-switch a,html body.page-ticket .tk-appbar .language-switch.is-slider a{width:30px!important;height:30px!important;color:var(--ab-muted)!important;font:800 11.5px/1 Manrope,Arial,sans-serif!important}
html body.page-ticket .tk-appbar .language-switch a[aria-current],html body.page-ticket .tk-appbar .language-switch.is-slider a.ls-on{color:#0a1215!important}
html body.page-ticket .tk-appbar .language-switch .ls-knob{width:30px!important;height:30px!important;background:#e4ebe8!important;box-shadow:none!important}
html body.page-ticket .tk-appbar .language-switch:not(.is-slider) a[aria-current]{background:#e4ebe8!important;border-radius:50%}

/* the app switcher: a small field with every page, the CVs and contact */
html body.page-ticket .tk-sw-panel,html body.page-ticket .tk-appbar.is-more .tk-ab-tools{position:absolute;z-index:61;border:1px solid #2c444b;border-radius:12px;background:var(--ab-panel);
  box-shadow:0 24px 48px -20px rgba(0,0,0,.85);color:var(--ab-text)}
html body.page-ticket .tk-sw-panel{left:12px;top:52px;width:288px;max-height:calc(100vh - 72px);overflow:auto;padding:10px}
.tk-sw-panel[hidden]{display:none!important}
.tk-sw-title,.tk-sw-sub{margin:4px 10px 6px;font:800 10.5px/1.2 Manrope,Arial,sans-serif;letter-spacing:.14em;text-transform:uppercase;color:#7c918d}
.tk-sw-sub{margin-top:12px}
.tk-sw-group,.tk-sw-docs{display:grid;gap:2px}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) a{display:grid;gap:2px;padding:8px 10px;border-radius:8px;color:var(--ab-text)!important;text-decoration:none;font:700 14px/1.25 Manrope,Arial,sans-serif}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) a small{font:500 12px/1.3 Manrope,Arial,sans-serif;color:var(--ab-muted)}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) a:hover{background:#1a2b31}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) a b{font-weight:700}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) :is(.nav-live,.rf-yarn){display:none}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) .wg-nav{border-top:1px solid var(--ab-line)!important;border-radius:0 0 8px 8px;margin-top:4px}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) .tk-sw-docs a{font-weight:600}
html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) .tk-sw-contact{margin-top:8px;border-top:1px solid var(--ab-line);border-radius:0 0 8px 8px}

html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) a b,html body.page-ticket :is(.tk-sw-panel,.tk-more-pages) .nav-rf b{color:inherit!important}

/* Fio's speech bubble and name tag wear the app's colours here (no light patch on the dark app; Fio itself unchanged) */
html body.page-ticket .fio-say{border-color:#2c444b;background:#132126;color:#e4ebe8;box-shadow:0 18px 36px -18px rgba(0,0,0,.8)}
html body.page-ticket .fio-say p{color:#e4ebe8}
html body.page-ticket .fio-say-x{color:#93a6a3}
html body.page-ticket .fio-say-x:hover{background:rgba(228,235,232,.08)}
html body.page-ticket .fox-name{background:#132126!important;color:#c7d3d0!important;box-shadow:0 0 0 1px #2c444b!important}

/* the rail starts under the bar */
@media (min-width:721px){html body.page-ticket .tk-rail{top:56px!important}}

/* ---------- 2. phones: 52 px, „← Website“, the ticket number, „⋯“ */
@media (max-width:720px){
  html body.page-ticket .tk-appbar{height:52px;margin:0;padding:0 6px 0 8px;gap:6px}
  .tk-sw,.tk-ab-app,.tk-back-long{display:none!important}
  .tk-back-short{display:inline}
  html body.page-ticket .tk-back{min-height:40px;padding:7px 12px 7px 10px}
  .tk-ab-id{display:block!important;position:absolute;left:50%;top:50%;translate:-50% -50%;font:800 14px/1 Manrope,Arial,sans-serif;color:#c7d3d0;letter-spacing:.02em;pointer-events:none}
  html body.page-ticket .tk-ab-more{display:grid!important;margin-left:auto;width:44px;height:44px;font:800 22px/1 Manrope,Arial,sans-serif}
  .tk-ab-tools{display:none}
  html body.page-ticket .tk-appbar.is-more .tk-ab-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;left:8px;right:8px;top:50px;max-height:calc(100vh - 66px);overflow:auto;padding:10px 12px 14px}
  html body.page-ticket .tk-appbar.is-more .tk-more-pages{display:block;flex:0 0 100%;padding-bottom:8px;border-bottom:1px solid var(--ab-line)}
  html body.page-ticket .tk-appbar.is-more .tk-more-pages .tk-sw-sub{margin-left:10px}
  html body.page-ticket .tk-appbar.is-more :is(.view-read span,[data-sound-label]){display:inline!important;position:static!important;width:auto!important;height:auto!important;clip:auto!important;clip-path:none!important}
  html body.page-ticket .tk-appbar.is-more .language-switch{order:1}html body.page-ticket .tk-appbar.is-more .view-controls{order:2}html body.page-ticket .tk-appbar.is-more .sound-toolbar{order:3}
  html body.page-ticket .tk-appbar.is-more .view-read{width:auto!important;padding:0 12px!important;gap:6px;border-color:var(--ab-line)!important}
  html body.page-ticket .tk-appbar.is-more .scene-sound-toggle[aria-pressed]{display:inline-flex!important;width:auto!important;gap:6px;padding:0 12px!important;border-color:var(--ab-line)!important}
  html body.page-ticket .tk-appbar.is-more .view-btn[data-view=theme]{border-color:var(--ab-line)!important}
  html body.page-ticket .tk-appbar.is-more :is(.view-btn,.scene-sound-toggle){height:44px!important;min-height:44px!important}
  html body.page-ticket .tk-appbar.is-more .view-btn[data-view=theme]{width:44px!important}
  html body.page-ticket .tk-appbar.is-more .language-switch{height:44px!important}
  html body.page-ticket .tk-appbar.is-more .language-switch a{width:38px!important;height:38px!important}
  html body.page-ticket .tk-appbar.is-more .language-switch .ls-knob{width:38px!important;height:38px!important}
}

/* ---------- 3. the status bar at the end of the page (not fixed) */
html body.page-ticket .tk-status{box-sizing:border-box;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 24px;min-height:38px;margin:40px 0 0 -76px;
  padding:9px max(20px,calc((100% + 76px - 1180px) / 2));background:#0a1215;border-top:1px solid #21343a;color:#93a6a3;font:500 12.5px/1.4 Manrope,Arial,sans-serif}
.tk-status p{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 0}
.tk-status-conn i{display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:#3fbf73;box-shadow:0 0 0 3px rgba(63,191,115,.16)}
html body.page-ticket .tk-status-links>*{display:inline-flex;align-items:center;gap:5px;min-height:28px;margin:0;padding:0;border:0;background:none;color:#93a6a3!important;font:inherit;text-decoration:none;cursor:pointer;white-space:nowrap}
html body.page-ticket .tk-status-links>*+*::before{content:"·";margin:0 10px;color:#5d716e}
html body.page-ticket .tk-status-links>*:hover{color:#e4ebe8!important;text-decoration:underline;text-underline-offset:3px}
html body.page-ticket .tk-status-links svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4}
html body.page-ticket .tk-status :focus-visible{outline:2px solid #8ea2ff;outline-offset:2px}
@media (max-width:720px){html body.page-ticket .tk-status{margin-left:0;padding:10px 16px 14px;flex-direction:column;align-items:flex-start}}

/* ---------- 4. inside the ticket: no search field, the example line in the head, attachments */
html body.page-ticket .tk-bar{justify-content:flex-start}
html body.page-ticket .tk-example{display:flex;align-items:flex-start;gap:7px;margin:8px 0 0;font-size:13px;line-height:1.45;color:#93a6a3}
.tk-example svg{flex:none;width:15px;height:15px;margin-top:2px;fill:none;stroke:#8ea2ff;stroke-width:1.8;stroke-linecap:round}
html body.page-ticket .tk-files{margin:18px 0 0}
html body.page-ticket .tk-files h2{margin:0 0 8px}
html body.page-ticket .tk-files h2 span{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:4px;padding:0 5px;border-radius:9px;background:#1a2b31;color:#c7d3d0;font-size:10.5px;letter-spacing:0}
.tk-files ul{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
html body.page-ticket .tk-files a{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:8px 13px 8px 11px;border:1px solid #2c444b;border-radius:9px;background:#182a30;color:#e4ebe8!important;
  font:600 14px/1.25 Manrope,Arial,sans-serif;text-decoration:none}
html body.page-ticket .tk-files a:hover{border-color:#47646c;background:#1c3138}
html body.page-ticket .tk-files a small{padding:2px 6px;border-radius:5px;background:#0d1619;color:#93a6a3;font:800 10px/1.2 Manrope,Arial,sans-serif;letter-spacing:.06em}
.tk-file-ico{flex:none;width:17px;height:17px;fill:none;stroke:#9fb1ff;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html body.page-ticket .tk-files a:focus-visible{outline:2px solid #8ea2ff;outline-offset:2px}
@media (max-width:420px){.tk-files ul{display:grid}html body.page-ticket .tk-files a{width:100%}}

/* ---------- 5. read mode: the app stays dark and calm (the website's read-mode paper must not come back) */
html[data-read=on] body.page-ticket .tk-appbar{background:#0a1215!important}
html[data-read=on] body.page-ticket .tk-status{background:#0a1215!important}
html[data-read=on] body.page-ticket .tk-status *{color:#c7d3d0!important}
html[data-read=on] body.page-ticket .tk-appbar .tk-back{color:#eef3f1!important}

/* ---------- 6. changing between the website and the app: one short cross-fade (≤ 0.45 s, head script sets tk-in / tk-out).
   Into the app: the paper dims (0.22 s), then the app fades in, the bar slides in from the left, the card follows 8 px.
   Back: the reverse. Read mode, „weniger Bewegung“ and browsers without view transitions: a plain cut. */
html:not([data-read=on]) body.page-ticket .tk-appbar{view-transition-name:tk-appbar}
html:not([data-read=on]) body.page-ticket .tk-card{view-transition-name:tk-card}
html:active-view-transition-type(tk-in)::view-transition-old(root){animation:tk-vt-dim .22s ease-in both}
html:active-view-transition-type(tk-in)::view-transition-new(root){animation:tk-vt-show .2s ease-out .2s both}
html:active-view-transition-type(tk-in)::view-transition-new(tk-appbar){animation:tk-vt-bar .2s cubic-bezier(.2,.7,.2,1) .22s both}
html:active-view-transition-type(tk-in)::view-transition-new(tk-card){animation:tk-vt-card .2s cubic-bezier(.2,.7,.2,1) .24s both}
html:active-view-transition-type(tk-out)::view-transition-old(root){animation:tk-vt-hide .16s ease-in both}
html:active-view-transition-type(tk-out)::view-transition-old(tk-appbar){animation:tk-vt-bar-out .16s ease-in both}
html:active-view-transition-type(tk-out)::view-transition-old(tk-card){animation:tk-vt-card-out .16s ease-in both}
html:active-view-transition-type(tk-out)::view-transition-new(root){animation:tk-vt-light .28s ease-out .14s both}
html:is(:active-view-transition-type(tk-in),:active-view-transition-type(tk-out))::view-transition-group(*){animation-duration:0s}
html:is(:active-view-transition-type(tk-in),:active-view-transition-type(tk-out))::view-transition-image-pair(root){isolation:auto}
@keyframes tk-vt-dim{to{filter:brightness(.16)}}
@keyframes tk-vt-show{from{opacity:0}}
@keyframes tk-vt-bar{from{translate:-76px 0;opacity:0}}
@keyframes tk-vt-card{from{translate:0 8px;opacity:0}}
@keyframes tk-vt-hide{to{opacity:0;filter:brightness(.3)}}
@keyframes tk-vt-bar-out{to{translate:-76px 0;opacity:0}}
@keyframes tk-vt-card-out{to{translate:0 8px;opacity:0}}
@keyframes tk-vt-light{from{opacity:0;filter:brightness(.25)}}
/* „weniger Bewegung“ and read mode: the head script skips the transition, nothing to animate here */

/* ---------- 7. print: the sheet (weitergabe.css) – nothing of the app */
@media print{html body.page-ticket :is(.tk-appbar,.tk-status,.tk-skip-link){display:none!important}}
