/* HICONIUM twin: motion layer (behaviour in akte-motion.js). Only for dossiers with meta.motion.
   Values from the HICONIUM DESIGN.md «Motion»: control 180–220 ms on cubic-bezier(.32,.72,0,1), overlays 240/160 ms and
   pages/media 320–640 ms on expo-out cubic-bezier(.16,1,.3,1), linear only for progress. Only transform and opacity move.
   Every hidden state below sits behind html.mo (set by the script, never with reduced motion, print or ?wb-shot=1). */
:root{--mo-expo:cubic-bezier(.16,1,.3,1);--mo-ctl:cubic-bezier(.32,.72,0,1)}

@media screen{
  /* ------------------------------------------------ arrival: hold until the script takes over, release after 1.4 s anyway */
  .mo-pre #top :is(.c-sig,.c-bg,.c-ttl h1,.c-ttl .sub,.c-facts){animation:mo-hold 1.4s step-end both}
  @keyframes mo-hold{from{opacity:0}to{opacity:1}}
  .mo-sig{position:relative}
  .mo-sig .mo-l{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

  /* ------------------------------------------------ chapter openers (scroll-driven, visible without support) */
  .mo-d{display:inline-block;clip-path:inset(-.08em -.2em -.12em -.2em)}
  .mo-d > span{display:inline-block}
  @supports ((animation-timeline: view()) and (animation-range: entry)){
    @keyframes mo-roll{from{transform:translateY(105%)}to{transform:none}}
    @keyframes mo-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
    .mo .mo-num{view-timeline:--mo-num block}
    .mo .mo-d > span{animation:mo-roll linear both;animation-timeline:--mo-num;
      animation-range:entry calc(10% + var(--i) * 8%) cover calc(22% + var(--i) * 3%);animation-timing-function:var(--mo-expo)}
    .mo .op.pic .op-i{animation:mo-rise linear both;animation-timeline:view();animation-range:entry 0% cover 28%;
      animation-timing-function:var(--mo-expo)}
  }

  /* ------------------------------------------------ charts draw once when they come into view (.ch-in from akte-charts.js) */
  .mo .ch[data-chart=docring] .mo-grow{transform-box:view-box;transform-origin:80px 80px;transition:transform .48s var(--mo-expo)}
  .mo .ch[data-chart=docring]:not(.ch-in) .mo-grow{transform:scale(.79)}
  .mo .ch[data-chart=climate] .mo-m{transition:opacity .22s ease-out;transition-delay:calc(var(--m) * 40ms)}
  .mo .ch[data-chart=climate]:not(.ch-in) .mo-m{opacity:0}
  .mo .ch[data-chart=swatches] .sw-i{transition:opacity .24s ease-out,transform .36s var(--mo-expo)}
  .mo .ch[data-chart=swatches] .sw-i:nth-child(2){transition-delay:50ms}
  .mo .ch[data-chart=swatches] .sw-i:nth-child(3){transition-delay:100ms}
  .mo .ch[data-chart=swatches] .sw-i:nth-child(4){transition-delay:150ms}
  .mo .ch[data-chart=swatches] .sw-i:nth-child(n+5){transition-delay:200ms}
  .mo .ch[data-chart=swatches]:not(.ch-in) .sw-i{opacity:0;transform:translateY(10px) scale(.97)}

  /* ------------------------------------------------ chapter rail (desktop): one mark glides, reading progress runs along */
  @media (min-width:1320px){
    .mo .rail ol{position:relative}
    .mo .rail a i{width:14px;opacity:.55}
    .mo .rail a.on i{opacity:0}
    .mo .mo-mark{position:absolute;right:0;top:0;width:30px;height:1.5px;margin-top:-.75px;background:currentColor;opacity:0;
      transition:opacity .2s ease-out}
    .mo .mo-mark.is-on{opacity:1}
    .mo .mo-mark.is-ready{transition:transform .2s var(--mo-ctl),opacity .2s ease-out}
    .mo .mo-prog{position:absolute;right:-8px;top:13px;bottom:13px;width:1px;background:currentColor;opacity:.35;transform-origin:50% 0;transform:scaleY(0)}
    @supports (animation-timeline: scroll()){
      @keyframes mo-progress{from{transform:scaleY(0)}to{transform:scaleY(1)}}
      .mo .mo-prog{animation:mo-progress linear both;animation-timeline:scroll(root)}
    }
  }
  @supports not (animation-timeline: scroll()){.mo-prog{display:none}}
  @media (max-width:1319.98px){.mo-mark,.mo-prog{display:none}
    .mo .rail{transition:transform .32s var(--mo-expo)}
  }
}

/* ------------------------------------------------ from the scan to the dossier: the car picture travels (cross-document) */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  .cert .c-bg{view-transition-name:mo-car}
  ::view-transition-group(mo-car){animation-duration:.42s;animation-timing-function:var(--mo-expo)}
  ::view-transition-old(root){animation:.2s ease-out both mo-vt-out}
  ::view-transition-new(root){animation:.4s var(--mo-expo) both mo-vt-in}
  @keyframes mo-vt-out{to{opacity:0}}
  @keyframes mo-vt-in{from{opacity:0}}
}

@media screen{
  /* ------------------------------------------------ dialogs and picture view as a pair: 240 ms in from the trigger, 160 ms out */
  .mo :is(dialog.dlg,dialog.lb){opacity:0;transform:scale(.95);transform-origin:var(--mo-ox,50%) var(--mo-oy,50%);
    transition:opacity .16s ease-out,transform .16s ease-out,overlay .16s,display .16s;transition-behavior:allow-discrete}
  .mo :is(dialog.dlg,dialog.lb)[open]:not([data-closing]){opacity:1;transform:none;transition-duration:.24s;transition-timing-function:var(--mo-expo)}
  @starting-style{.mo :is(dialog.dlg,dialog.lb)[open]:not([data-closing]){opacity:0;transform:scale(.95)}}
  .mo :is(dialog.dlg,dialog.lb)::backdrop{opacity:0;transition:opacity .16s ease-out,overlay .16s,display .16s;transition-behavior:allow-discrete}
  .mo :is(dialog.dlg,dialog.lb)[open]:not([data-closing])::backdrop{opacity:1;transition-duration:.24s}
  @starting-style{.mo :is(dialog.dlg,dialog.lb)[open]:not([data-closing])::backdrop{opacity:0}}

  /* ------------------------------------------------ view switch: one thumb glides */
  .mo .mo-seg{position:relative;isolation:isolate}
  .mo .mo-seg .mo-thumb{position:absolute;left:2px;top:2px;bottom:2px;border-radius:16px;background:var(--bg);z-index:-1;transform-origin:0 50%;pointer-events:none}
  .mo .mo-seg .mo-thumb.is-ready{transition:transform .2s var(--mo-ctl)}
  .mo .mo-seg button[aria-pressed=true]{background:transparent}

  /* ------------------------------------------------ corrections of the shared motion, for these dossiers only */
  .mo :is(details.sheet,.sp) .chev{transition:transform .2s var(--mo-ctl)}
  .mo .ch .ch-g{transition:transform .48s var(--mo-expo),opacity .24s ease-out}
  .mo .ch:not(.ch-in) .ch-g{transform:scaleX(.92);opacity:0}
  .mo .dial mask circle{transition:stroke-dasharray .56s var(--mo-expo)}
  .mo .sc-dial .ar{transition:stroke-dasharray .56s var(--mo-expo),opacity .2s ease-out}
  @media (hover:hover) and (pointer:fine){
    .mo :is(.op-i,.ph,.still) img{transition:transform .32s var(--mo-expo)}
  }
}

/* ------------------------------------------------ reduced motion: an equivalent path. No travel, no scale; fades and colour
   changes of at most 200 ms stay, so every state change still registers (overrides the blanket rule of akte.css). */
@media (prefers-reduced-motion:reduce){
  .btn,.seg button,.ch-lg,.ch-chip,tr[data-finding],.sr{transition:opacity .15s ease-out,background-color .15s ease,color .15s ease!important}
  .btn:active,.ch-lg:active,.ch-chip:active{transform:none}
  .ch-ug,.ch-sh,.dr-s,.rail a span{transition:opacity .2s ease-out!important}
  :is(dialog.dlg,dialog.lb){opacity:0;transition:opacity .12s ease-out,overlay .12s,display .12s!important;transition-behavior:allow-discrete!important}
  :is(dialog.dlg,dialog.lb)[open]{opacity:1;transition-duration:.2s!important}
  @starting-style{:is(dialog.dlg,dialog.lb)[open]{opacity:0}}
  @media (min-width:1320px){.rail{transition:opacity .2s ease-out!important}}
  @media (max-width:1319.98px){
    .rail{transform:translate(-50%,0);transition:opacity .2s ease-out,visibility 0s .2s!important;visibility:hidden}
    .rail.show{opacity:1;visibility:visible;transition:opacity .2s ease-out!important}
    .rail:not(.show){opacity:0;pointer-events:none}
  }
}
/* ------------------------------------------------ «What the ring says» (extra 03.12.2026): the head signet opens #ring.
   The parts of the ring text arrive in ring order, 40 ms apart, while the small signet turns its last 24 degrees into
   place: the line is being unwound. Reduced motion: the dialog's own 200 ms fade (below) carries it, nothing travels or turns. ?wb-shot=1: nothing runs. */
.rg-go{cursor:pointer;-webkit-tap-highlight-color:transparent}
.rg .rg-hd{display:grid;grid-template-columns:64px minmax(0,1fr);gap:18px;align-items:center}
.rg .rg-hd h3{margin:0 0 6px}
.rg .rg-hd .d-lead{margin:0;text-wrap:pretty}
.rg .rg-sig svg{display:block;width:64px;height:64px}
.rg .rg-l{margin:0}
.rg .rg-r{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:4px 20px;padding:11px 0;border-top:1px solid var(--line);align-items:baseline}
.rg .rg-r:last-child{border-bottom:1px solid var(--line)}
.rg .rg-r dt{font-size:var(--s);font-weight:500;letter-spacing:.08em;color:var(--ink);overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.rg .rg-r dd{margin:0;font-size:var(--s);color:var(--ink2)}
.rg .rg-r dd{text-wrap:pretty}
.rg .d-acts>.btn{flex:1 1 auto}   /* buttons of the panel fill their line: stacked, each takes the full width */
/* the buttons stand at the foot of the panel, the list scrolls above them; a hairline over the buttons appears while
   rows are hidden below (class rg-more from akte-motion.js). Surface, radius, shadow and insets stay those of .dlg. */
.rg[open]{overflow:hidden}
.rg form{box-sizing:border-box;max-height:inherit;grid-template-rows:auto minmax(0,1fr) auto;
  padding-bottom:calc(clamp(20px,4vw,28px) + env(safe-area-inset-bottom,0px))}
.rg .rg-l{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.rg .d-acts{position:relative}
.rg .d-acts::before{content:"";position:absolute;left:0;right:0;top:-9px;height:1px;background:var(--line);opacity:0;transition:opacity .2s ease-out}
.rg.rg-more .d-acts::before{opacity:1}
.rg.rg-more .rg-l{-webkit-mask-image:linear-gradient(#000 calc(100% - 28px),transparent);mask-image:linear-gradient(#000 calc(100% - 28px),transparent)}
@media (min-width:521px){.rg{width:min(640px,calc(100vw - 24px))}.rg .rg-r{grid-template-columns:minmax(0,1fr) minmax(0,1.6fr)}}
@media (max-width:520px){.rg .rg-r{grid-template-columns:1fr}.rg .rg-hd{grid-template-columns:52px minmax(0,1fr);gap:14px}.rg .rg-sig svg{width:52px;height:52px}}
@media screen{
  @media (prefers-reduced-motion:no-preference){
    @media (hover:hover) and (pointer:fine){.rg-go{transition:transform .2s var(--mo-ctl)}.rg-go:hover{transform:scale(1.02)}}
    .rg-go:active{transform:scale(.97);transition:transform .16s var(--mo-ctl)}
    /* not bound to [open]: the entrance restarts with every display none→block and keeps running through the 160 ms exit,
       so closing mid-entrance never snaps rows to full (03.12.2026) */
    @keyframes rg-in{from{opacity:0;transform:translateX(-10px)}to{opacity:1;transform:none}}
    @keyframes rg-turn{from{transform:rotate(-24deg)}to{transform:none}}
    .rg-a .rg .rg-r{animation:rg-in .32s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(80ms + var(--k) * 40ms)}
    .rg-a .rg .rg-sig svg{animation:rg-turn .32s cubic-bezier(.16,1,.3,1) both}
  }
}
@media print{.rg{display:none}}
@media print{.mo-l,.mo-thumb,.mo-mark,.mo-prog{display:none}}
