/* ProTaxi-Trainer · css/fixes.css (2026-11-12)
   Loaded last: login layout, floating buttons on the login page, colours without brown. */

/* ---------- Login: Leo + language button bottom right, above the footer ---------- */
body.welcome-active #tutorFab,
body.welcome-active #langFab{
  top:auto!important;
  bottom:calc(env(safe-area-inset-bottom,0px) + 66px)!important;
  width:46px!important;height:46px!important;padding:0!important;
  justify-content:center;animation:none!important;
}
body.welcome-active #tutorFab{right:14px!important;}
body.welcome-active #langFab{right:68px!important;}
html[dir="rtl"] body.welcome-active #tutorFab{right:auto!important;left:14px!important;}
html[dir="rtl"] body.welcome-active #langFab{right:auto!important;left:68px!important;}
body.welcome-active #tutorFab .tt-av{width:40px!important;height:40px!important;}
body.welcome-active #tutorFab .tt-dot{left:32px!important;top:32px!important;}
body.welcome-active #tutorFab b{display:none!important;}

/* ---------- Login card: fits on one phone screen without scrolling ---------- */
@media (max-width:1024px), (max-height:900px), (pointer:coarse){
  body.welcome-active .welcome-screen{
    min-height:100dvh!important;
    padding:calc(env(safe-area-inset-top,0px) + 10px) 14px calc(env(safe-area-inset-bottom,0px) + 122px)!important;
    align-items:center!important;
  }
  .wl-live .welcome-card,.welcome-card{margin:0 auto!important;padding:16px 18px 12px!important;border-radius:20px!important;}
  .welcome-card .logo{width:84px!important;height:84px!important;margin:0 auto 6px!important;}
  .welcome-card h1{font-size:18px!important;margin:0 0 2px!important;line-height:1.25;}
  .welcome-card p{font-size:12.5px!important;margin:0 0 10px!important;}
  .welcome-card .gbtn{min-height:44px;font-size:15px!important;}
  .welcome-card .gbtn .gi{padding:0 12px!important;}
  .welcome-card .gnote{font-size:10.5px!important;margin:4px 0 0!important;line-height:1.35;}
  .welcome-card .aor{margin:8px 0 10px!important;font-size:12px!important;}
  .welcome-card input:not([type="checkbox"]){padding:10px 14px!important;margin-bottom:9px!important;font-size:15px!important;}
  .welcome-card button:not(.gbtn){padding:11px 14px!important;}
  .welcome-card .alinks{gap:6px!important;margin-top:10px!important;font-size:13.5px!important;}
  .welcome-card .wlegal{margin-top:10px!important;font-size:11.5px!important;}
  .welcome-card .amsg:empty{display:none;}
}
@media (max-height:700px){
  .welcome-card .logo{width:64px!important;height:64px!important;}
  .welcome-card .gnote{display:none;}
}

/* "Anmeldedaten speichern" */
.welcome-card .aremember{align-items:center;justify-content:flex-start;margin:0 0 10px!important;font-size:13.5px;cursor:pointer;user-select:none;}
.welcome-card .aremember input{width:18px!important;height:18px!important;margin:0!important;padding:0!important;flex:0 0 auto;accent-color:#8b7ff0;cursor:pointer;}

/* ---------- Footer: violet/indigo instead of the brown glow ---------- */
footer:before{background:linear-gradient(90deg,transparent,rgba(139,127,240,.9),rgba(91,200,255,.85),rgba(139,127,240,.9),transparent)!important;background-size:200% 100%!important;}
.ft-tun{background:radial-gradient(ellipse 34% 75% at 50% 50%,rgba(124,107,255,.30),rgba(64,140,255,.10) 55%,transparent 75%)!important;}
.ft-tun span{border-color:rgba(160,150,255,.5)!important;}
.ft-grav i:nth-child(n+4):nth-child(-n+7){color:#ffd23f!important;text-shadow:0 0 12px rgba(255,210,63,.55),0 2px 0 rgba(0,0,0,.4)!important;}
footer .ft-sub{color:#c4bbff!important;}

/* ---------- "Pause machen" / "Pause beenden" ---------- */
.pausebtn{
  background:linear-gradient(135deg,rgba(124,107,255,.22),rgba(76,55,194,.14))!important;
  border:1.5px solid rgba(139,127,240,.5)!important;color:#e6e2ff!important;
  box-shadow:0 6px 16px rgba(44,26,129,.25)!important;
}
.pausebtn:hover{background:linear-gradient(135deg,rgba(124,107,255,.32),rgba(76,55,194,.22))!important;}
.pausebtn.danger{
  background:linear-gradient(135deg,#7c6bff,#4c37c2)!important;border:1.5px solid rgba(196,187,255,.6)!important;
  color:#fff!important;box-shadow:0 6px 18px rgba(76,55,194,.45)!important;
}

/* ---------- Profile: "Neu anfangen" card without the brown tint ---------- */
.ps-danger{
  background:linear-gradient(160deg,rgba(124,107,255,.08),rgba(255,92,122,.06))!important;
  border:1px solid rgba(255,92,122,.35)!important;
}
.ps-danger .ps-h{color:#ff7a93!important;}

/* ---------- Speed: fast, smooth movement everywhere ---------- */
/* All UI transitions short (buttons, menu, dialogs, bubbles). */
*,*::before,*::after{transition-duration:.12s!important;transition-delay:0s!important;}
/* One-shot entry animations: quick fade, no staggered waiting. Looping animations are untouched. */
#app .card,
#app .gcard,
#app .itile,
#app .listcard,
#app .tile,
#app>.back,
#app>.crumbs,
#app>.ftgrid,
#app>.ftwork,
#app>.homeh2,
#app>.kgrid,
#app>.px-prog,
#app>.qpanel,
#app>.rbox,
#app>.subtitle,
#app>.tabs,
#app>details,
#app>h1,
#psBox,
.adh-apps,
.adh-badge,
.adh-hero,
.adm-back,
.ait-m,
.ait-mdl.open .ait-mdl-m,
.ait-sugg button,
.ait-welcome,
.avz-3b,
.avz-brow,
.avz-card,
.avz-done,
.avz-hero,
.avz-menu,
.avz-more-t,
.avz-ok span,
.avz-tc,
.gv3-bub,
.gv3-cap,
.gv3-chips span,
.gv3-intro,
.gv3-txt,
.hello-ed,
.hsidebar.open .hs-nav .hs-sec,
.hsidebar.open .hs-nav a,
.kgrid>.kcard,
.mki,
.mki-bar i,
.mki-stats div,
.ps-confirm,
.ps-done,
.ps-grp,
.ptx-lg,
.vs-ring{animation-duration:.16s!important;animation-delay:0s!important;}
/* Lighter entry motion: no 3D tilt (it caused flicker on phones). */
@keyframes fx3dIn{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
@keyframes fx3dTitle{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:none;}}
/* Touch screens: no hover lift/tilt that stays stuck after a tap and makes things shift. */
@media (hover:none){
  .btn:hover,.qbtn:hover,.rowbtn:hover,.kgrid>.kcard:hover,.adh-apps a:hover,.ps-adminapp:hover img,.kgrid>.kcard:hover .kicon{transform:none!important;filter:none!important;}
  .avz-tilt{--rx:0deg!important;--ry:0deg!important;}
  #app,.hmain{scroll-behavior:auto!important;}
}
/* Android app: blur effects are expensive in the WebView and cause stutter; use solid backgrounds. */
html.ptx-native *,html.ptx-native *::before,html.ptx-native *::after{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
html.ptx-native footer{background:#0b1029!important;}
html.ptx-native .wl-live .welcome-card{background:linear-gradient(160deg,#141c33,#0c1222)!important;}

/* ---------- Menu: active item violet instead of orange ---------- */
.hs-nav a.active,.hs-nav a.active:hover{background:linear-gradient(135deg,#7c6bff,#4c37c2)!important;color:#fff!important;box-shadow:0 8px 20px rgba(76,55,194,.45)!important;}
.hs-nav a.active .nbell-badge{color:#4c37c2!important;border-color:#4c37c2!important;}

/* ---------- Menu (sidebar): clean violet background, no skyline over the items, no orange glow ---------- */
.hsidebar{background:linear-gradient(185deg,#0f1638 0%,#1b2350 40%,#252a68 75%,#2d2874 100%)!important;}
.hsidebar:after{display:none!important;}
.hsidebar:before{background:radial-gradient(120% 50% at 0% 0%,rgba(139,127,240,.32),transparent 60%),radial-gradient(90% 40% at 100% 100%,rgba(91,140,255,.16),transparent 60%)!important;}

/* ---------- Exam: "Markieren" never overflows ---------- */
.px-row .px-btn{padding:0 8px!important;}
.px-row:has(> [onclick^="pxMark"]){display:grid!important;grid-auto-flow:row!important;grid-template-columns:1fr 1.35fr 1fr!important;gap:8px!important;}
.px-row:has(> [onclick^="pxMark"]) .px-btn{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px!important;min-width:0;}
.px-btn.ghost.marked{border-color:#ffd23f!important;background:rgba(255,210,63,.12)!important;color:#ffd23f!important;}
.actions .btn{white-space:nowrap;min-width:0;}

/* ---------- Phones: compact header + learning pages so the content fits on screen ---------- */
@media (max-width:1024px), (pointer:coarse){
  /* top brand bar */
  #brandbar{height:50px!important;min-height:50px!important;}
  #brandbar .logo{width:34px!important;height:34px!important;}
  #brandbar .brandtxt{font-size:17px!important;}

  /* menu button + learning time + pause in one row */
  #headHost{display:flex!important;align-items:center!important;gap:8px!important;}
  #headHost .hs-toggle{width:48px!important;height:48px!important;min-height:0!important;flex:0 0 48px!important;padding:0!important;border-radius:14px!important;}
  #headHost .hs-toggle .hs-tl{display:none!important;}
  #headHost .homehead{display:flex!important;flex-wrap:nowrap!important;flex:1 1 auto!important;min-width:0!important;gap:8px!important;align-items:stretch!important;margin:0!important;}
  #headHost .greetbar{flex:1 1 auto!important;min-width:0!important;min-height:48px!important;padding:6px 12px!important;margin:0!important;border-radius:14px!important;align-items:center!important;}
  #headHost .greetbar{flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:1px!important;}
  #headHost .greetbar > div:first-child{min-width:0;max-width:100%;}
  #headHost .greetbar .gt{display:none!important;}
  #headHost .greetbar .gs{font-size:10.5px!important;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.85;text-align:center;}
  #headHost .greetbar .gtimer{position:static!important;font-size:17px!important;line-height:1.15;}
  #headHost{margin-bottom:8px!important;}
  #headHost .quickrow{flex:0 0 auto!important;margin:0!important;}
  #headHost .pausebtn{min-height:48px!important;height:48px!important;padding:0 12px!important;font-size:12.5px!important;white-space:nowrap;border-radius:14px!important;}

  /* page head */
  #app>.crumbs{flex-wrap:nowrap!important;overflow-x:auto;white-space:nowrap;font-size:12.5px!important;margin:4px 0 0!important;scrollbar-width:none;}
  #app>.crumbs::-webkit-scrollbar{display:none;}
  #app>.crumbs .clogo{display:none!important;}
  #app>.back{margin:4px 0 2px!important;font-size:13.5px!important;}
  #app>h1{font-size:20px!important;line-height:1.25!important;margin:4px 0 2px!important;}
  #app>.subtitle{font-size:12.5px!important;margin:0 0 8px!important;}

  /* score card as one slim row */
  .scorecard{display:flex!important;align-items:center!important;gap:4px!important;padding:8px 10px!important;margin:0 0 8px!important;border-radius:14px!important;min-height:0!important;}
  .scorecard .sctitle{display:none!important;}
  .scorecard .scrow{flex:1 1 0!important;display:flex!important;flex-direction:column-reverse!important;align-items:center!important;justify-content:center!important;gap:0!important;padding:0!important;margin:0!important;border:none!important;font-size:11px!important;line-height:1.25!important;}
  .scorecard .scrow span:last-child{font-size:18px!important;font-weight:800;}

  /* filter tabs */
  .tabs{gap:6px!important;margin:0 0 8px!important;}
  .tabs .tab{padding:6px 2px!important;min-height:0!important;font-size:10.5px!important;gap:2px!important;border-radius:12px!important;}
  .tabs .tab svg{width:15px!important;height:15px!important;}
  .tabs .tabicon{padding:6px 8px!important;min-height:0!important;font-size:13px!important;border-radius:12px!important;}

  /* question card */
  .qpanel{padding:14px 14px 12px!important;margin-top:0!important;}
  .qpanel .qt{font-size:17px!important;line-height:1.35!important;margin:4px 0 10px!important;}
  .qpanel .choice{padding:10px 12px!important;}
  .qpanel .actions{margin-top:10px!important;}

  /* exam */
  .px-run-h{margin-bottom:0!important;}
  .px-nums{margin:6px 0 8px!important;}
  .px-card.px-q{padding:14px!important;}
  .px-q-t{font-size:17px!important;line-height:1.35!important;}
  .px-ta{min-height:96px!important;height:96px;}

  /* Leo + language: small round buttons so they cover less */
  body:not(.welcome-active) #tutorFab{width:46px!important;height:46px!important;padding:0!important;justify-content:center!important;right:12px!important;bottom:calc(env(safe-area-inset-bottom,0px) + 64px)!important;}
  body:not(.welcome-active) #tutorFab b{display:none!important;}
  body:not(.welcome-active) #tutorFab .tt-av{width:40px!important;height:40px!important;}
  body:not(.welcome-active) #tutorFab .tt-dot{left:32px!important;top:32px!important;}
  body:not(.welcome-active) #langFab{width:42px!important;height:42px!important;right:66px!important;bottom:calc(env(safe-area-inset-bottom,0px) + 66px)!important;}
  html[dir="rtl"] body:not(.welcome-active) #tutorFab{right:auto!important;left:12px!important;}
  html[dir="rtl"] body:not(.welcome-active) #langFab{right:auto!important;left:66px!important;}
  body:not(.welcome-active) #app{padding-bottom:84px!important;}
}

/* ---------- Text greys: lavender instead of olive (fits the violet design) ---------- */
:root{--sub:#5d6285;}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]){--sub:#a9acc9;--red-bg:#3a1626;} }
:root[data-theme="dark"]{--sub:#a9acc9;--red-bg:#3a1626;}

/* ---------- Footer name: calm (no falling letters) ---------- */
.ft-grav i{animation:none!important;transform:none!important;opacity:1!important;}

/* ---------- Phones: Leo + language button live inside the bottom bar, never over page buttons ---------- */
@media (max-width:1024px), (pointer:coarse){
  body:not(.welcome-active) #tutorFab{bottom:calc(env(safe-area-inset-bottom,0px) + 5px)!important;right:10px!important;width:44px!important;height:44px!important;z-index:9998!important;}
  body:not(.welcome-active) #tutorFab .tt-av{width:38px!important;height:38px!important;}
  body:not(.welcome-active) #tutorFab .tt-dot{left:30px!important;top:30px!important;}
  body:not(.welcome-active) #langFab{bottom:calc(env(safe-area-inset-bottom,0px) + 7px)!important;right:62px!important;width:40px!important;height:40px!important;}
  html[dir="rtl"] body:not(.welcome-active) #tutorFab{right:auto!important;left:10px!important;}
  html[dir="rtl"] body:not(.welcome-active) #langFab{right:auto!important;left:62px!important;}
  body:not(.welcome-active) #app{padding-bottom:76px!important;}
  body:not(.welcome-active) footer .ft-in{padding-right:110px!important;padding-left:12px!important;align-items:flex-start!important;}
  html[dir="rtl"] body:not(.welcome-active) footer .ft-in{padding-left:110px!important;padding-right:12px!important;align-items:flex-end!important;}
}

/* ======================= 2026-11-13 round 3 ======================= */

/* ---------- Menu: one background for the whole scroll length, skyline at the very bottom ---------- */
.hsidebar{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 80' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='.11' d='M0 80V24h18V28h14v16h12V18h16v26h10V34h18V14h6V4h4v10h6v30h14V26h18v18h12V30h14v14h10V20h16v24h12V36h16v8h12V24h18v20h14V30h12V22h28V80z'/%3E%3C/svg%3E") left bottom / 100% 86px no-repeat local,
    radial-gradient(130% 35% at 0% 0%,rgba(139,127,240,.30),transparent 62%) local,
    linear-gradient(185deg,#0f1638 0%,#1b2350 38%,#232a66 70%,#2d2874 100%) local!important;
  padding-bottom:96px!important;
  scrollbar-width:none!important;-ms-overflow-style:none!important;
}
.hsidebar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important;}
.hsidebar:before,.hsidebar:after{display:none!important;}
@media (max-width:860px){
  .hsidebar{border-radius:0 26px 0 0!important;}
  html[dir="rtl"] .hsidebar{border-radius:26px 0 0 0!important;}
}

/* ---------- "Zurück" as a real button ---------- */
#app>.back,.px-back{
  display:inline-flex!important;align-items:center;gap:6px;width:auto!important;align-self:flex-start;
  padding:6px 14px 6px 10px!important;margin:6px 0 4px!important;border-radius:999px;
  border:1px solid rgba(139,127,240,.5);background:rgba(124,107,255,.14);
  color:#ddd8ff!important;font-weight:700!important;font-size:13px!important;line-height:1.2;cursor:pointer;user-select:none;
}
#app>.back svg{display:none!important;}
#app>.back:before{content:'‹';font-size:18px;line-height:1;margin-top:-2px;}
#app>.back:active,.px-back:active{transform:scale(.97);background:rgba(124,107,255,.24);}
:root[data-theme="light"] #app>.back,:root[data-theme="light"] .px-back{color:#3a2f9e!important;}

/* ---------- Flashcard rating: Nicht gewusst / Gewusst / Perfekt fit in one row ---------- */
.actions:has(> [onclick*="'offen'"]){display:grid!important;grid-template-columns:1.3fr 1fr 1fr!important;gap:8px!important;}
.actions:has(> [onclick*="'offen'"]) .btn{padding:4px 6px!important;min-height:46px;font-size:14px!important;line-height:1.15!important;white-space:normal!important;overflow:hidden;min-width:0;margin:0!important;}
.actions .btn[onclick*="'gewusst'"]{background:linear-gradient(135deg,#22a06b,#15803d)!important;color:#fff!important;}

/* ---------- Exam intro: smaller title and details ---------- */
.px-h1{font-size:22px!important;}
@media (max-width:1024px), (pointer:coarse){
  .px-h1{font-size:19px!important;line-height:1.25;}
  .px-sub{margin-top:2px!important;}
  .px-kicker{font-size:11px!important;}
  .px .px-card{padding:14px!important;gap:10px!important;}
  .px-line{font-size:15px!important;line-height:1.35!important;}
  .px-chips{gap:6px!important;}
  .px-chips>*{font-size:12.5px!important;padding:4px 10px!important;}
  .px-rules{font-size:13px!important;line-height:1.45!important;}
  .px-rules>*{margin:0 0 6px!important;}
}

/* ---------- Phones: slimmer top bar (fits the logo) and smaller header row ---------- */
@media (max-width:1024px), (pointer:coarse){
  #brandbar{height:auto!important;min-height:0!important;padding:5px 14px!important;gap:8px!important;
    background:linear-gradient(90deg,#0f1638,#1b2350)!important;border-bottom:1px solid rgba(139,127,240,.18)!important;}
  #brandbar .logo{width:32px!important;height:32px!important;flex:0 0 32px!important;}
  #brandbar .brandtxt{font-size:16px!important;}

  #headHost{gap:6px!important;margin-bottom:6px!important;}
  #headHost .hs-toggle{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:12px!important;}
  #headHost .hs-toggle .hs-burger{transform:scale(.85);}
  #headHost .homehead{gap:6px!important;}
  #headHost .greetbar{min-height:42px!important;padding:4px 10px!important;border-radius:12px!important;}
  #headHost .greetbar .gs{font-size:9.5px!important;}
  #headHost .greetbar .gtimer{font-size:15px!important;}
  #headHost .pausebtn{min-height:42px!important;height:42px!important;padding:0 10px!important;font-size:12px!important;border-radius:12px!important;}
}

/* long German titles: break cleanly instead of running off the edge */
#app>h1,.px-h1,.qpanel .qt,.px-q-t{overflow-wrap:break-word;hyphens:auto;-webkit-hyphens:auto;}
@media (max-width:360px){ #app>h1{font-size:18.5px!important;} }

/* ======================= 2026-11-13 round 4 ======================= */
/* Menu: same look as the big home card (navy -> violet with stars), skyline flush at the bottom */
.hsidebar{
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 80' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' fill-opacity='.13' d='M0 80V24h18V28h14v16h12V18h16v26h10V34h18V14h6V4h4v10h6v30h14V26h18v18h12V30h14v14h10V20h16v24h12V36h16v8h12V24h18v20h14V30h12V22h28V80z'/%3E%3C/svg%3E") left bottom / 100% 104px no-repeat local,
    radial-gradient(1.5px 1.5px at 12% 6%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 78% 4%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 55% 14%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 30% 22%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 88% 31%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 18% 44%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 64% 52%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 42% 66%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 84% 72%,rgba(255,255,255,.75),transparent) local,radial-gradient(1.5px 1.5px at 10% 84%,rgba(255,255,255,.75),transparent) local,
    linear-gradient(160deg,#0a1024 0%,#1b2350 38%,#4a3f78 74%,#4c37c2 100%) local!important;
  padding-bottom:110px!important;
}

/* Exam intro and exam pages: tighter spacing so the content starts higher */
@media (max-width:1024px), (pointer:coarse){
  .px{gap:8px!important;}
  .px-back{margin:2px 0 0!important;}
  .px-h1{margin:2px 0 0!important;}
  .px-sub{margin:0!important;}
  .px .px-card{margin-top:2px!important;}
  .px-line{margin:0!important;}
}

/* ======================= 2026-11-13 round 5 ======================= */
@media (max-width:1024px), (pointer:coarse){
  /* exam intro: app-bar style head – back button exactly under the menu button (same size),
     label + title stacked next to it, exactly as tall as the button */
  .px:has(> .px-back + .px-h1){display:grid!important;grid-template-columns:42px minmax(0,1fr);column-gap:12px;row-gap:0!important;align-items:center;}
  .px:has(> .px-back + .px-h1) > *{grid-column:1 / -1;margin-top:10px!important;}
  .px:has(> .px-back + .px-h1) > .px-back{grid-column:1;grid-row:1 / span 2;width:42px!important;height:42px!important;padding:0!important;margin:0!important;
    justify-content:center;border-radius:12px;font-size:0!important;gap:0;align-self:center;}
  .px:has(> .px-back + .px-h1) > .px-back:before{content:'‹';font-size:26px;line-height:1;margin:-3px 2px 0 0;}
  /* default (list pages, long description): back + title in row 1, description full width below */
  .px:has(> .px-back + .px-h1) > .px-back{grid-row:1!important;}
  .px:has(> .px-back + .px-h1) > .px-h1{grid-column:2;grid-row:1;margin:0!important;align-self:center;font-size:20px!important;line-height:25px!important;color:#fff!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .px:has(> .px-back + .px-h1) > .px-sub{grid-column:1 / -1;grid-row:2;margin:10px 0 0!important;font-size:13px!important;line-height:1.45!important;}
  /* intro pages (short label): label above the title, both beside the back button */
  .px:has(> .px-back + .px-h1 + .px-sub .px-kicker) > .px-back{grid-row:1 / span 2!important;}
  .px:has(> .px-back + .px-h1 + .px-sub .px-kicker) > .px-sub{grid-column:2;grid-row:1;margin:0!important;align-self:end;line-height:15px!important;height:15px;}
  .px:has(> .px-back + .px-h1 + .px-sub .px-kicker) > .px-h1{grid-row:2;margin:2px 0 0!important;align-self:start;height:25px;}
  /* running exam: title block a little lower, clear of the header */
  .px-run-h{margin-top:8px!important;}
}

/* Leo's chat panel when closed: invisible AND untouchable (its avatar blocked the menu button) */
#tutorPanel:not(.open),#tutorPanel:not(.open) *{pointer-events:none!important;}

/* phones up to 600px have 14px extra page indent: pull the exam head back so the back button sits exactly under ☰ */
@media (max-width:600px){
  .px:has(> .px-back + .px-h1) > .px-back,
  .px:has(> .px-back + .px-h1) > .px-h1,
  .px:has(> .px-back + .px-h1 + .px-sub .px-kicker) > .px-h1,
  .px:has(> .px-back + .px-h1 + .px-sub .px-kicker) > .px-sub{margin-left:-14px!important;}
}

/* wider touch screens (foldables, tablets): score card and filter tabs span the full width */
@media (max-width:1024px), (pointer:coarse){
  .scorecard{width:100%!important;box-sizing:border-box;}
  .tabs{display:flex!important;flex-wrap:wrap;}
  .tabs .tab,.tabs .tabicon{flex:1 1 0!important;min-width:0;}
}
@media (max-width:600px){
  .tabs .tab{flex:1 1 15%!important;}
  .tabs .tabicon{flex:1 1 40%!important;}
}
