Changes for page Get Started

Last modified by Veronika Kocher on Friday, 04 Sep 2026 15:32

From version 8.5
edited by Veronika Kocher
on Thursday, 03 Sep 2026 9:34
Change comment: There is no comment for this version
To version 8.10
edited by Veronika Kocher
on Friday, 04 Sep 2026 14:23
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -42,7 +42,7 @@
42 42   <section class="arsn-card" style="margin-bottom:18px;overflow:hidden;border-left:6px solid #e94b13;">
43 43   <div class="arsn-hero-image"><img src="https://xwiki.uni-ak.ac.at/bin/download/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/WebHome/enable.png" alt="Planning an artistic or research project" /></div>
44 44   <div style="padding:18px 21px 20px 21px;">
45 - <div class="arsn-eyebrow" style="color:#8a4d36;margin-bottom:5px;">ENABLE · GET STARTED · AUSTRIA</div>
45 + <div class="arsn-eyebrow" style="color:#8a4d36;margin-bottom:5px;">PREPARE · GET STARTED · AUSTRIA</div>
46 46   <h2 style="font-size:27px;line-height:1.2;margin:0 0 8px 0;color:#2c2926;">From project idea to a fundable, workable project</h2>
47 47   <p style="margin:0;color:#5e5953;line-height:1.6;max-width:1100px;">
48 48   Use this page to clarify your project before you search for funding or start spending money.
... ... @@ -432,27 +432,144 @@
432 432   and <a href="https://xwiki.uni-ak.ac.at/bin/view/Service%20Navigator/Art%20%26%20Research%20Services%20Navigator/Enable/Plan%20Your%20Data%20Management/">Plan Your Data Management</a>.
433 433   </div>
434 434  
435 +<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_START -->
436 +{{include reference="Service Navigator.Art & Research Services Navigator.Code.TrainingWorkshopsBlock" author="target" /}}
437 +<!-- ARSN_TRAINING_WORKSHOPS_INCLUDE_V1_END -->
438 +
439 +<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_START -->
440 +{{include reference="Service Navigator.Art & Research Services Navigator.Code.PracticalResourcesFallbackBlock" author="target" /}}
441 +<!-- ARSN_PRACTICAL_RESOURCES_FALLBACK_V1_END -->
442 +
435 435  </div>
436 436  {{/html}}
437 437  
438 438  {{html clean="false"}}
439 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_START -->
440 -<style data-sn-horizontal-box-harmonizer="4">
441 -[data-sn-equal-height-managed],
442 -[data-sn-first-section-aligned]{
447 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_START -->
448 +
449 +<style data-sn-service-navigator-master="1">
450 +/* =========================================================
451 + MASTER TYPOGRAPHY
452 + ========================================================= */
453 +#xwikicontent h1,
454 +#xwikicontent h2,
455 +#xwikicontent h3,
456 +#xwikicontent h4,
457 +#xwikicontent h5,
458 +#xwikicontent h6,
459 +#xwikicontent .box-title,
460 +#xwikicontent [role="heading"],
461 +#xwikicontent h1 a,
462 +#xwikicontent h2 a,
463 +#xwikicontent h3 a,
464 +#xwikicontent h4 a,
465 +#xwikicontent h5 a,
466 +#xwikicontent h6 a,
467 +#xwikicontent .box-title a,
468 +#xwikicontent [role="heading"] a{
469 + text-align:left!important;
470 + text-justify:auto!important;
471 + word-spacing:normal!important;
472 +}
473 +
474 +/* =========================================================
475 + COMING SOON / IN VORBEREITUNG
476 + ========================================================= */
477 +.sn-coming-soon-badge{
478 + display:inline-block;
479 + vertical-align:middle;
480 + margin-left:10px;
481 + padding:4px 8px;
482 + border-radius:14px;
483 + border:1px solid #efd9cc;
484 + background:#fff4ee;
485 + color:#8a4d36;
486 + font-size:11px;
487 + font-weight:700;
488 + letter-spacing:.055em;
489 + line-height:1.2;
490 + white-space:nowrap;
491 +}
492 +
493 +/* =========================================================
494 + NATIVE / DETAIL CALLOUT GEOMETRY
495 + Preserve existing backgrounds.
496 + ========================================================= */
497 +#xwikicontent .arsn-info,
498 +#xwikicontent .dmp-info,
499 +#xwikicontent .ido-info,
500 +#xwikicontent .pp-info,
501 +#xwikicontent .infomessage{
502 + box-sizing:border-box!important;
503 + border-left:4px solid #21b6d7!important;
504 + border-radius:8px;
505 + text-align:left!important;
506 + word-spacing:normal!important;
507 +}
508 +
509 +#xwikicontent .arsn-warn,
510 +#xwikicontent .dmp-warn,
511 +#xwikicontent .ido-warn,
512 +#xwikicontent .pp-warn,
513 +#xwikicontent .warn,
514 +#xwikicontent .warning,
515 +#xwikicontent .warningmessage,
516 +#xwikicontent .errormessage{
517 + box-sizing:border-box!important;
518 + border-left:4px solid #e94b13!important;
519 + border-radius:8px;
520 + text-align:left!important;
521 + word-spacing:normal!important;
522 +}
523 +
524 +[data-sn-master-equal-height],
525 +[data-sn-master-first-row]{
443 443   box-sizing:border-box;
444 444  }
528 +
529 +/* =========================================================
530 + FULL-WIDTH THREE-LINE NUMBER / TITLE / SUBTITLE BLOCKS
531 + ========================================================= */
532 +#xwikicontent .arsn-area-label[data-sn-three-line="1"]{
533 + display:grid!important;
534 + grid-template-columns:minmax(0,1fr)!important;
535 + grid-auto-rows:auto!important;
536 + width:100%!important;
537 + max-width:none!important;
538 + box-sizing:border-box!important;
539 + justify-items:start!important;
540 + align-items:start!important;
541 + gap:2px!important;
542 + text-align:left!important;
543 + text-align-last:left!important;
544 + text-justify:auto!important;
545 + word-spacing:normal!important;
546 + white-space:normal!important;
547 +}
548 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-number,
549 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .sn-area-label-title,
550 +#xwikicontent .arsn-area-label[data-sn-three-line="1"] > .arsn-area-action{
551 + display:block!important;
552 + width:100%!important;
553 + margin:0!important;
554 + text-align:left!important;
555 + text-align-last:left!important;
556 + text-justify:auto!important;
557 + word-spacing:normal!important;
558 + white-space:normal!important;
559 +}
445 445  </style>
446 -<script data-sn-horizontal-box-harmonizer="4">
561 +
562 +<script data-sn-service-navigator-master="1">
447 447  (function(){
448 448   "use strict";
449 449  
566 + var PAGE_KIND="detail";
567 + var PLACEHOLDER=false;
568 + var PLACEHOLDER_LABEL="COMING SOON";
569 +
450 450   var MOBILE_MAX=767;
451 451   var ROW_TOLERANCE=6;
452 - var MIN_W=150;
453 - var MIN_H=36;
454 - var MAX_PARENT_CHILDREN=16;
455 - var SEARCH_DEPTH=5;
572 + var RESIZE_DEBOUNCE=220;
456 456  
457 457   var root=
458 458   document.getElementById("xwikicontent")||
... ... @@ -462,93 +462,105 @@
462 462  
463 463   if(!root)return;
464 464  
465 - var heightManaged=new Set();
466 - var sectionManaged=new Set();
467 - var originalMinHeight=new WeakMap();
468 - var originalMarginTop=new WeakMap();
469 - var raf=0;
582 + var managedHeight=new Set();
583 + var managedMargin=new Set();
584 + var originalHeight=new WeakMap();
585 + var originalMargin=new WeakMap();
470 470  
471 - function num(v){
472 - var n=parseFloat(v);
473 - return Number.isFinite(n)?n:0;
474 - }
587 + var resizeTimer=0;
588 + var running=false;
475 475  
476 - function visible(el,minW,minH){
477 - if(!el||el.nodeType!==1)return false;
478 -
479 - var s=getComputedStyle(el);
480 -
481 - if(
482 - s.display==="none"||
483 - s.visibility==="hidden"||
484 - Number(s.opacity)===0
485 - ){
486 - return false;
590 + var THEMES=[
591 + {
592 + name:"BLUE",
593 + accent:"#21b6d7",
594 + bg:"#eaf7fb",
595 + text:"#315d68",
596 + labels:[
597 + "HIER STARTEN",
598 + "ENTSCHEIDEN",
599 + "ÜBERPRÜFEN & ANPASSEN",
600 + "START HERE",
601 + "DECIDE",
602 + "REVIEW & ADAPT"
603 + ]
604 + },
605 + {
606 + name:"RED",
607 + accent:"#e94b13",
608 + bg:"#fff1ec",
609 + text:"#8a4d36",
610 + labels:[
611 + "PLANEN & ORGANISIEREN",
612 + "ORGANISIEREN & DOKUMENTIEREN",
613 + "PUBLIZIEREN & PRÄSENTIEREN",
614 + "PLAN & ORGANISE",
615 + "PLAN & ORGANIZE",
616 + "ORGANISE & DOCUMENT",
617 + "ORGANIZE & DOCUMENT",
618 + "PUBLISH & PRESENT"
619 + ]
620 + },
621 + {
622 + name:"YELLOW",
623 + accent:"#f0aa00",
624 + bg:"#fff8e7",
625 + text:"#785b17",
626 + labels:[
627 + "SCHÜTZEN & KLÄREN",
628 + "STANDARDISIEREN & IDENTIFIZIEREN",
629 + "ÖFFNEN, NACHNUTZEN & AUFFINDBAR MACHEN",
630 + "PROTECT & CLARIFY",
631 + "STANDARDISE & IDENTIFY",
632 + "STANDARDIZE & IDENTIFY",
633 + "OPEN, REUSE & MAKE FINDABLE"
634 + ]
635 + },
636 + {
637 + name:"GREEN",
638 + accent:"#38b76a",
639 + bg:"#edf9f1",
640 + text:"#3f7451",
641 + labels:[
642 + "INFRASTRUKTUR EINRICHTEN",
643 + "INFRASTRUKTUR & ZUSAMMENARBEIT EINRICHTEN",
644 + "SPEICHERN & ZUGRIFF STEUERN",
645 + "REPOSITORIUM, ERHALTEN & ÜBERGEBEN",
646 + "SET UP INFRASTRUCTURE",
647 + "SET UP INFRASTRUCTURE & COLLABORATION",
648 + "STORE & CONTROL ACCESS",
649 + "REPOSITORY, PRESERVE & HAND OVER"
650 + ]
487 487   }
652 + ];
488 488  
489 - var r=el.getBoundingClientRect();
490 -
491 - return (
492 - r.width>=(minW||1)&&
493 - r.height>=(minH||1)
494 - );
654 + function num(value){
655 + var n=parseFloat(value);
656 + return Number.isFinite(n)?n:0;
495 495   }
496 496  
497 - function excluded(el){
498 - return (
499 - !el.matches||
500 - el.matches(
501 - "button,input,select,textarea,option,label,img,svg,canvas,table,thead,tbody,tfoot,tr,td,th,summary,script,style,noscript,template,.btn,.chip,[role=button]"
502 - )
503 - );
659 + function norm(value){
660 + return String(value||"")
661 + .replace(/\s+/g," ")
662 + .trim()
663 + .toUpperCase();
504 504   }
505 505  
506 - function namedLikeBox(el){
507 - var c=
508 - typeof el.className==="string"
509 - ? el.className
510 - : "";
666 + function visible(el){
667 + if(!el||el.nodeType!==1)return false;
511 511  
512 - return /(^|[s_-])(box|card|tile|panel|role|check|service|source|call|area|detail|resource|topic|warn|info)([s_-]|$)/i.test(c);
513 - }
669 + var style=getComputedStyle(el);
670 + var rect=el.getBoundingClientRect();
514 514  
515 - function boxLike(el){
516 - if(!visible(el,MIN_W,MIN_H)||excluded(el))return false;
517 -
518 - var s=getComputedStyle(el);
519 - var r=el.getBoundingClientRect();
520 -
521 - var border=
522 - num(s.borderTopWidth)+
523 - num(s.borderRightWidth)+
524 - num(s.borderBottomWidth)+
525 - num(s.borderLeftWidth);
526 -
527 - var radius=Math.max(
528 - num(s.borderTopLeftRadius),
529 - num(s.borderTopRightRadius),
530 - num(s.borderBottomLeftRadius),
531 - num(s.borderBottomRightRadius)
532 - );
533 -
534 - var bg=
535 - s.backgroundColor&&
536 - s.backgroundColor!=="rgba(0, 0, 0, 0)"&&
537 - s.backgroundColor!=="transparent";
538 -
539 - var shadow=
540 - s.boxShadow&&
541 - s.boxShadow!=="none";
542 -
543 543   return (
544 - namedLikeBox(el)||
545 - border>=1||
546 - (bg&&radius>=3)||
547 - (shadow&&r.width>=180)
673 + style.display!=="none"&&
674 + style.visibility!=="hidden"&&
675 + rect.width>20&&
676 + rect.height>4
548 548   );
549 549   }
550 550  
551 - function saveOriginal(el,map,property){
680 + function saveStyle(el,map,property){
552 552   if(map.has(el))return;
553 553  
554 554   map.set(el,{
... ... @@ -557,7 +557,7 @@
557 557   });
558 558   }
559 559  
560 - function restoreOriginal(el,map,property){
689 + function restoreStyle(el,map,property){
561 561   var original=map.get(el);
562 562  
563 563   if(original&&original.value){
... ... @@ -571,247 +571,470 @@
571 571   }
572 572   }
573 573  
574 - function reset(){
575 - heightManaged.forEach(function(el){
576 - restoreOriginal(
703 + function resetRuntime(){
704 + managedHeight.forEach(function(el){
705 + restoreStyle(
577 577   el,
578 - originalMinHeight,
707 + originalHeight,
579 579   "min-height"
580 580   );
581 -
582 582   el.removeAttribute(
583 - "data-sn-equal-height-managed"
711 + "data-sn-master-equal-height"
584 584   );
585 585   });
586 586  
587 - sectionManaged.forEach(function(el){
588 - restoreOriginal(
715 + managedMargin.forEach(function(el){
716 + restoreStyle(
589 589   el,
590 - originalMarginTop,
718 + originalMargin,
591 591   "margin-top"
592 592   );
593 -
594 594   el.removeAttribute(
595 - "data-sn-first-section-aligned"
722 + "data-sn-master-first-row"
596 596   );
597 597   });
598 598  
599 - heightManaged.clear();
600 - sectionManaged.clear();
726 + managedHeight.clear();
727 + managedMargin.clear();
601 601   }
602 602  
603 - function pickTarget(child){
604 - if(!visible(child,MIN_W,MIN_H))return null;
730 + function themeFor(text){
731 + var value=norm(text);
605 605  
606 - if(boxLike(child)){
607 - return child;
733 + for(var i=0;i<THEMES.length;i++){
734 + for(var j=0;j<THEMES[i].labels.length;j++){
735 + var label=THEMES[i].labels[j];
736 +
737 + if(
738 + value===label||
739 + value.indexOf(label+" ")===0||
740 + value.indexOf(label+" -")===0||
741 + value.indexOf(label+" ·")===0
742 + ){
743 + return THEMES[i];
744 + }
745 + }
608 608   }
609 609  
610 - var cr=child.getBoundingClientRect();
611 - var q=[];
748 + return null;
749 + }
612 612  
613 - Array.from(child.children||[]).forEach(function(el){
614 - q.push({el:el,depth:1});
751 + /* =======================================================
752 + BORDERLESS FILLED RED/ORANGE CTA BUTTONS
753 + ======================================================= */
754 +
755 + function colourDistance(a,b){
756 + return Math.sqrt(
757 + Math.pow(a[0]-b[0],2)+
758 + Math.pow(a[1]-b[1],2)+
759 + Math.pow(a[2]-b[2],2)
760 + );
761 + }
762 +
763 + function makeFilledRedOrangeCTAsBorderless(){
764 + var RED_ORANGE=[233,75,19];
765 +
766 + Array.from(
767 + root.querySelectorAll(
768 + 'a,button,[role="button"],input[type="submit"],input[type="button"]'
769 + )
770 + ).forEach(function(el){
771 + if(!visible(el))return;
772 +
773 + var style=getComputedStyle(el);
774 + var rgb=parseRGB(style.backgroundColor);
775 +
776 + if(!rgb)return;
777 +
778 + if(
779 + colourDistance(
780 + rgb,
781 + RED_ORANGE
782 + )>55
783 + ){
784 + return;
785 + }
786 +
787 + var rect=el.getBoundingClientRect();
788 +
789 + if(
790 + rect.width<80||
791 + rect.height<24
792 + ){
793 + return;
794 + }
795 +
796 + el.style.setProperty(
797 + "border",
798 + "none",
799 + "important"
800 + );
801 +
802 + el.style.setProperty(
803 + "border-left",
804 + "none",
805 + "important"
806 + );
807 +
808 + el.style.setProperty(
809 + "border-top",
810 + "none",
811 + "important"
812 + );
813 +
814 + el.style.setProperty(
815 + "border-right",
816 + "none",
817 + "important"
818 + );
819 +
820 + el.style.setProperty(
821 + "border-bottom",
822 + "none",
823 + "important"
824 + );
825 +
826 + el.style.setProperty(
827 + "box-shadow",
828 + "none",
829 + "important"
830 + );
615 615   });
832 + }
616 616  
617 - var best=null;
618 - var bestScore=-Infinity;
834 + /* =======================================================
835 + FULL-WIDTH THREE-LINE AREA LABELS
836 + ======================================================= */
619 619  
620 - while(q.length){
621 - var item=q.shift();
622 - var el=item.el;
838 + function compactText(value){
839 + return String(value||"")
840 + .replace(/\s+/g," ")
841 + .trim();
842 + }
623 623  
624 - if(!visible(el,MIN_W,MIN_H))continue;
844 + function makeThreeLineAreaLabels(){
845 + Array.from(
846 + root.querySelectorAll(
847 + ".arsn-area-label"
848 + )
849 + ).forEach(function(label){
850 + if(
851 + label.getAttribute(
852 + "data-sn-three-line"
853 + )==="1"
854 + ){
855 + return;
856 + }
625 625  
626 - var r=el.getBoundingClientRect();
858 + var number=
859 + label.querySelector(
860 + ":scope > .arsn-area-number"
861 + );
627 627  
863 + var action=
864 + label.querySelector(
865 + ":scope > .arsn-area-action"
866 + );
867 +
628 628   if(
629 - r.width>=cr.width*.68&&
630 - boxLike(el)
869 + !number||
870 + !action
631 631   ){
632 - var widthFit=
633 - 1-Math.min(
634 - 1,
635 - Math.abs(cr.width-r.width)/
636 - Math.max(1,cr.width)
637 - );
872 + return;
873 + }
638 638  
639 - var topFit=
640 - 1-Math.min(
641 - 1,
642 - Math.abs(cr.top-r.top)/100
643 - );
875 + var clone=
876 + label.cloneNode(true);
644 644  
645 - var score=
646 - widthFit*6+
647 - topFit*3+
648 - Math.min(r.height,900)/450+
649 - Math.min(r.width*r.height,900000)/900000;
878 + var cloneNumber=
879 + clone.querySelector(
880 + ":scope > .arsn-area-number"
881 + );
650 650  
651 - if(score>bestScore){
652 - best=el;
653 - bestScore=score;
654 - }
883 + var cloneAction=
884 + clone.querySelector(
885 + ":scope > .arsn-area-action"
886 + );
887 +
888 + if(cloneNumber){
889 + cloneNumber.remove();
655 655   }
656 656  
657 - if(item.depth<SEARCH_DEPTH){
658 - Array.from(el.children||[]).forEach(function(next){
659 - q.push({
660 - el:next,
661 - depth:item.depth+1
662 - });
663 - });
892 + if(cloneAction){
893 + cloneAction.remove();
664 664   }
665 - }
666 666  
667 - return best;
668 - }
896 + var titleText=
897 + compactText(
898 + clone.textContent
899 + );
669 669  
670 - function groupsByVisualRow(entries){
671 - var groups=[];
901 + if(!titleText){
902 + return;
903 + }
672 672  
673 - entries
674 - .slice()
675 - .sort(function(a,b){
676 - return (
677 - a.rect.top-b.rect.top||
678 - a.rect.left-b.rect.left
905 + var numberNode=
906 + number.cloneNode(true);
907 +
908 + var actionNode=
909 + action.cloneNode(true);
910 +
911 + var titleNode=
912 + document.createElement(
913 + "span"
679 679   );
680 - })
681 - .forEach(function(entry){
682 - var group=null;
683 683  
684 - for(var i=0;i<groups.length;i++){
685 - if(
686 - Math.abs(
687 - groups[i].top-
688 - entry.rect.top
689 - )<=ROW_TOLERANCE
690 - ){
691 - group=groups[i];
692 - break;
693 - }
694 - }
916 + titleNode.className=
917 + "sn-area-label-title";
695 695  
696 - if(!group){
697 - group={
698 - top:entry.rect.top,
699 - entries:[]
700 - };
701 - groups.push(group);
702 - }
919 + titleNode.textContent=
920 + titleText;
703 703  
704 - group.entries.push(entry);
705 - });
922 + while(label.firstChild){
923 + label.removeChild(
924 + label.firstChild
925 + );
926 + }
706 706  
707 - return groups;
928 + label.appendChild(
929 + numberNode
930 + );
931 +
932 + label.appendChild(
933 + titleNode
934 + );
935 +
936 + label.appendChild(
937 + actionNode
938 + );
939 +
940 + label.setAttribute(
941 + "data-sn-three-line",
942 + "1"
943 + );
944 +
945 + var head=
946 + label.closest(
947 + ".arsn-area-head"
948 + );
949 +
950 + if(head){
951 + head.style.setProperty(
952 + "width",
953 + "100%",
954 + "important"
955 + );
956 +
957 + head.style.setProperty(
958 + "max-width",
959 + "100%",
960 + "important"
961 + );
962 +
963 + head.style.setProperty(
964 + "box-sizing",
965 + "border-box",
966 + "important"
967 + );
968 + }
969 + });
708 708   }
709 709  
710 - function validHorizontalGroup(group){
711 - if(group.entries.length<2)return false;
972 + /* =======================================================
973 + PLACEHOLDER BADGE
974 + ======================================================= */
712 712  
713 - var lefts=
714 - group.entries
715 - .map(function(e){return e.rect.left;})
716 - .sort(function(a,b){return a-b;});
976 + function applyPlaceholderBadge(){
977 + if(!PLACEHOLDER)return;
717 717  
718 718   if(
719 - lefts[lefts.length-1]-
720 - lefts[0]<
721 - 80
980 + document.querySelector(
981 + ".sn-coming-soon-badge"
982 + )
722 722   ){
723 - return false;
984 + return;
724 724   }
725 725  
726 - var widths=
727 - group.entries
728 - .map(function(e){return e.rect.width;})
729 - .filter(function(w){return w>0;});
987 + var title=
988 + document.querySelector(
989 + "#document-title"
990 + )||
991 + document.querySelector(
992 + "h1"
993 + );
730 730  
731 - if(widths.length<2)return false;
995 + if(!title)return;
732 732  
733 - var minWidth=Math.min.apply(Math,widths);
734 - var maxWidth=Math.max.apply(Math,widths);
997 + var badge=
998 + document.createElement(
999 + "span"
1000 + );
735 735  
736 - return (
737 - maxWidth/
738 - Math.max(1,minWidth)<=
739 - 1.9
1002 + badge.className=
1003 + "sn-coming-soon-badge";
1004 +
1005 + badge.textContent=
1006 + PLACEHOLDER_LABEL;
1007 +
1008 + badge.setAttribute(
1009 + "aria-label",
1010 + PLACEHOLDER_LABEL
740 740   );
741 - }
742 742  
743 - function normalizeText(text){
744 - return String(text||"")
745 - .replace(/s+/g," ")
746 - .trim()
747 - .toUpperCase();
1013 + title.appendChild(
1014 + badge
1015 + );
748 748   }
749 749  
750 - function exactKnownFirstSection(el){
751 - var text=normalizeText(el.textContent);
1018 + /* =======================================================
1019 + DETAIL PAGE OWN-ACCENT PROPAGATION
1020 + ======================================================= */
752 752  
753 - return (
754 - text==="HIER STARTEN"||
755 - text==="ORGANISIEREN & DOKUMENTIEREN"||
756 - text==="ENTSCHEIDEN"||
757 - text==="START HERE"||
758 - text==="GET STARTED"||
759 - text==="ORGANISE & DOCUMENT"||
760 - text==="ORGANIZE & DOCUMENT"||
761 - text==="DECIDE"
1022 + function parseRGB(value){
1023 + var match=String(value||"").match(
1024 + /rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i
762 762   );
1026 +
1027 + if(!match)return null;
1028 +
1029 + return [
1030 + Number(match[1]),
1031 + Number(match[2]),
1032 + Number(match[3])
1033 + ];
763 763   }
764 764  
765 - function visuallyFirstSectionBar(card){
766 - var cardRect=card.getBoundingClientRect();
767 - var candidates=[];
1036 + function distance(a,b){
1037 + return Math.sqrt(
1038 + Math.pow(a[0]-b[0],2)+
1039 + Math.pow(a[1]-b[1],2)+
1040 + Math.pow(a[2]-b[2],2)
1041 + );
1042 + }
768 768  
1044 + function paletteMatch(cssColor){
1045 + var rgb=parseRGB(cssColor);
1046 +
1047 + if(!rgb)return null;
1048 +
1049 + var palette=[
1050 + {hex:"#21b6d7",rgb:[33,182,215]},
1051 + {hex:"#e94b13",rgb:[233,75,19]},
1052 + {hex:"#f0aa00",rgb:[240,170,0]},
1053 + {hex:"#38b76a",rgb:[56,183,106]}
1054 + ];
1055 +
1056 + var best=null;
1057 + var bestDistance=Infinity;
1058 +
1059 + palette.forEach(function(item){
1060 + var d=distance(rgb,item.rgb);
1061 +
1062 + if(d<bestDistance){
1063 + best=item;
1064 + bestDistance=d;
1065 + }
1066 + });
1067 +
1068 + return bestDistance<=30
1069 + ?best
1070 + :null;
1071 + }
1072 +
1073 + function propagateDetailAccents(){
1074 + if(PAGE_KIND!=="detail")return;
1075 +
769 769   Array.from(
770 - card.querySelectorAll(
771 - "div,p,span,strong,h3,h4,h5,h6"
1077 + root.querySelectorAll(
1078 + ".arsn-call,.dmp-call,.ido-call,.pp-call,"+
1079 + ".arsn-source,.dmp-source,.ido-source,.pp-source"
772 772   )
773 773   ).forEach(function(el){
774 - if(!visible(el,20,6))return;
775 - if(excluded(el))return;
1082 + if(!visible(el))return;
776 776  
777 - var r=el.getBoundingClientRect();
778 - var relativeTop=r.top-cardRect.top;
1084 + var style=getComputedStyle(el);
779 779  
780 780   if(
781 - relativeTop<45||
782 - relativeTop>cardRect.height*.72
1087 + num(style.borderTopWidth)>=2
783 783   ){
784 - return;
1089 + var match=
1090 + paletteMatch(
1091 + style.borderTopColor
1092 + );
1093 +
1094 + if(match){
1095 + el.style.setProperty(
1096 + "border-left",
1097 + "4px solid "+match.hex,
1098 + "important"
1099 + );
1100 + }
785 785   }
1102 + });
786 786  
787 - var widthRatio=
788 - r.width/
789 - Math.max(1,cardRect.width);
1104 + // Warning families: explicit safety override.
1105 + Array.from(
1106 + root.querySelectorAll(
1107 + ".arsn-warn,.dmp-warn,.ido-warn,.pp-warn,"+
1108 + ".warn,.warning,.warningmessage,.errormessage"
1109 + )
1110 + ).forEach(function(el){
1111 + if(!visible(el))return;
790 790  
791 - if(
792 - widthRatio<.55||
793 - widthRatio>1.05||
794 - r.height>54
795 - ){
796 - return;
797 - }
1113 + el.style.setProperty(
1114 + "border-left",
1115 + "4px solid #e94b13",
1116 + "important"
1117 + );
1118 + });
798 798  
799 - var text=normalizeText(el.textContent);
1120 + // Info families: explicit orientation override.
1121 + Array.from(
1122 + root.querySelectorAll(
1123 + ".arsn-info,.dmp-info,.ido-info,.pp-info,.infomessage"
1124 + )
1125 + ).forEach(function(el){
1126 + if(!visible(el))return;
800 800  
801 - if(
802 - text.length<2||
803 - text.length>90
804 - ){
805 - return;
806 - }
1128 + el.style.setProperty(
1129 + "border-left",
1130 + "4px solid #21b6d7",
1131 + "important"
1132 + );
1133 + });
1134 + }
807 807  
808 - var style=getComputedStyle(el);
1136 + /* =======================================================
1137 + OVERVIEW SEMANTIC THEME PALETTE
1138 + ======================================================= */
809 809  
810 - var bg=
811 - style.backgroundColor&&
812 - style.backgroundColor!=="rgba(0, 0, 0, 0)"&&
813 - style.backgroundColor!=="transparent";
1140 + function smallestThemeHeaders(){
1141 + return Array.from(
1142 + root.querySelectorAll(
1143 + "div,span,p,strong,h3,h4,h5,h6"
1144 + )
1145 + ).filter(function(el){
1146 + if(!visible(el))return false;
1147 + if(!themeFor(el.textContent))return false;
814 814  
1149 + return !Array.from(
1150 + el.children||[]
1151 + ).some(function(child){
1152 + return !!themeFor(
1153 + child.textContent
1154 + );
1155 + });
1156 + });
1157 + }
1158 +
1159 + function findOverviewCard(header){
1160 + var node=header.parentElement;
1161 + var candidates=[];
1162 +
1163 + while(node&&node!==root){
1164 + var rect=node.getBoundingClientRect();
1165 + var style=getComputedStyle(node);
1166 +
815 815   var border=
816 816   num(style.borderTopWidth)+
817 817   num(style.borderRightWidth)+
... ... @@ -818,315 +818,677 @@
818 818   num(style.borderBottomWidth)+
819 819   num(style.borderLeftWidth);
820 820  
821 - var mostlyUpper=
822 - text.length>=3&&
823 - text===text.toUpperCase();
824 -
825 - var exact=exactKnownFirstSection(el);
826 -
827 - var score=
828 - (exact?20:0)+
829 - (bg?6:0)+
830 - (border>=1?2:0)+
831 - (mostlyUpper?4:0)+
832 - (num(style.fontWeight)>=600?1:0);
833 -
834 - if(score>=7){
835 - candidates.push({
836 - el:el,
837 - relativeTop:relativeTop,
838 - width:r.width,
839 - score:score
840 - });
1173 + if(
1174 + rect.width>=220&&
1175 + rect.width<=800&&
1176 + rect.height>=120&&
1177 + border>=1
1178 + ){
1179 + candidates.push(node);
841 841   }
842 - });
843 843  
1182 + node=node.parentElement;
1183 + }
1184 +
844 844   if(!candidates.length)return null;
845 845  
846 846   candidates.sort(function(a,b){
847 - if(a.score!==b.score)return b.score-a.score;
848 - if(Math.abs(a.relativeTop-b.relativeTop)>3){
849 - return a.relativeTop-b.relativeTop;
850 - }
851 - return b.width-a.width;
1188 + return (
1189 + b.getBoundingClientRect().height-
1190 + a.getBoundingClientRect().height
1191 + );
852 852   });
853 853  
854 - // For exact known labels always prefer the earliest exact match.
855 - var exacts=candidates.filter(function(c){
856 - return exactKnownFirstSection(c.el);
857 - });
1194 + return candidates[0];
1195 + }
858 858  
859 - if(exacts.length){
860 - exacts.sort(function(a,b){
861 - return a.relativeTop-b.relativeTop||b.width-a.width;
862 - });
863 - return exacts[0].el;
864 - }
1197 + function rowCandidates(link,card){
1198 + var result=[];
1199 + var cardRect=
1200 + card.getBoundingClientRect();
865 865  
866 - // Generic fallback: earliest high-confidence bar.
867 - candidates.sort(function(a,b){
868 - return a.relativeTop-b.relativeTop||b.score-a.score||b.width-a.width;
869 - });
1202 + var node=link;
870 870  
871 - return candidates[0].el;
872 - }
1204 + while(node&&node!==card){
1205 + if(visible(node)){
1206 + var rect=
1207 + node.getBoundingClientRect();
873 873  
874 - function alignFirstSections(cards){
875 - var rows=
876 - cards.map(function(card){
877 - var bar=
878 - visuallyFirstSectionBar(card);
1209 + if(
1210 + rect.height<=105&&
1211 + rect.width>=
1212 + cardRect.width*.50&&
1213 + rect.width<=
1214 + cardRect.width*1.03
1215 + ){
1216 + result.push(node);
1217 + }
1218 + }
879 879  
880 - if(!bar)return null;
1220 + node=node.parentElement;
1221 + }
881 881  
882 - var cardRect=
883 - card.getBoundingClientRect();
1223 + return result;
1224 + }
884 884  
885 - var barRect=
886 - bar.getBoundingClientRect();
1226 + function chooseOuterRow(
1227 + candidates,
1228 + link
1229 + ){
1230 + if(!candidates.length){
1231 + return link;
1232 + }
887 887  
888 - return {
889 - card:card,
890 - bar:bar,
891 - relativeTop:
892 - barRect.top-cardRect.top,
893 - label:
894 - normalizeText(bar.textContent)
895 - };
1234 + var bordered=
1235 + candidates.filter(function(el){
1236 + return (
1237 + num(
1238 + getComputedStyle(el)
1239 + .borderLeftWidth
1240 + )>=1
1241 + );
896 896   });
897 897  
898 - // Conservative: only align when every card in the horizontal row
899 - // has a reliable first section bar.
900 - if(
901 - rows.some(function(row){
902 - return !row;
903 - })
904 - ){
905 - return null;
1244 + var pool=
1245 + bordered.length
1246 + ?bordered
1247 + :candidates;
1248 +
1249 + pool.sort(function(a,b){
1250 + var ar=
1251 + a.getBoundingClientRect();
1252 +
1253 + var br=
1254 + b.getBoundingClientRect();
1255 +
1256 + return (
1257 + ar.left-br.left||
1258 + br.width-ar.width
1259 + );
1260 + });
1261 +
1262 + return pool[0]||link;
1263 + }
1264 +
1265 + function applyOverviewPalette(){
1266 + if(PAGE_KIND!=="overview"){
1267 + return [];
906 906   }
907 907  
908 - var targetTop=
909 - Math.max.apply(
910 - Math,
911 - rows.map(function(row){
912 - return row.relativeTop;
1270 + var headers=
1271 + smallestThemeHeaders()
1272 + .map(function(el){
1273 + return {
1274 + el:el,
1275 + theme:
1276 + themeFor(
1277 + el.textContent
1278 + ),
1279 + card:
1280 + findOverviewCard(
1281 + el
1282 + )
1283 + };
913 913   })
914 - );
1285 + .filter(function(row){
1286 + return !!row.card;
1287 + });
915 915  
916 - rows.forEach(function(row){
917 - var delta=
918 - targetTop-
919 - row.relativeTop;
1289 + var unique=[];
1290 + var seenHeaders=new Set();
920 920  
921 - if(delta<=1)return;
1292 + headers.forEach(function(row){
1293 + var key=
1294 + row.theme.name+
1295 + "|"+
1296 + Math.round(
1297 + row.card
1298 + .getBoundingClientRect()
1299 + .left
1300 + )+
1301 + "|"+
1302 + Math.round(
1303 + row.el
1304 + .getBoundingClientRect()
1305 + .top
1306 + );
922 922  
923 - saveOriginal(
924 - row.bar,
925 - originalMarginTop,
926 - "margin-top"
1308 + if(!seenHeaders.has(key)){
1309 + seenHeaders.add(key);
1310 + unique.push(row);
1311 + }
1312 + });
1313 +
1314 + unique.forEach(function(row){
1315 + var headerRect=
1316 + row.el
1317 + .getBoundingClientRect();
1318 +
1319 + row.el.style.setProperty(
1320 + "background",
1321 + row.theme.bg,
1322 + "important"
927 927   );
928 928  
929 - var currentMargin=
930 - num(
931 - getComputedStyle(
932 - row.bar
933 - ).marginTop
934 - );
1325 + row.el.style.setProperty(
1326 + "color",
1327 + row.theme.text,
1328 + "important"
1329 + );
935 935  
936 - row.bar.style.setProperty(
937 - "margin-top",
938 - (
939 - currentMargin+
940 - delta
941 - )+"px"
1331 + row.el.style.setProperty(
1332 + "text-align",
1333 + "left",
1334 + "important"
942 942   );
943 943  
944 - row.bar.setAttribute(
945 - "data-sn-first-section-aligned",
946 - "4"
1337 + row.el.style.setProperty(
1338 + "word-spacing",
1339 + "normal",
1340 + "important"
947 947   );
948 948  
949 - sectionManaged.add(row.bar);
1343 + var later=
1344 + unique
1345 + .filter(function(other){
1346 + return (
1347 + other.card===row.card&&
1348 + other.el
1349 + .getBoundingClientRect()
1350 + .top>
1351 + headerRect.top+2
1352 + );
1353 + })
1354 + .sort(function(a,b){
1355 + return (
1356 + a.el
1357 + .getBoundingClientRect()
1358 + .top-
1359 + b.el
1360 + .getBoundingClientRect()
1361 + .top
1362 + );
1363 + });
1364 +
1365 + var stopTop=
1366 + later.length
1367 + ?later[0].el
1368 + .getBoundingClientRect()
1369 + .top
1370 + :Infinity;
1371 +
1372 + Array.from(
1373 + row.card.querySelectorAll("a")
1374 + ).forEach(function(link){
1375 + if(!visible(link))return;
1376 +
1377 + var rect=
1378 + link.getBoundingClientRect();
1379 +
1380 + if(
1381 + rect.top<=
1382 + headerRect.bottom-2||
1383 + rect.top>=
1384 + stopTop-2
1385 + ){
1386 + return;
1387 + }
1388 +
1389 + var candidates=
1390 + rowCandidates(
1391 + link,
1392 + row.card
1393 + );
1394 +
1395 + var target=
1396 + chooseOuterRow(
1397 + candidates,
1398 + link
1399 + );
1400 +
1401 + candidates.forEach(function(el){
1402 + el.style.setProperty(
1403 + "border-left",
1404 + "0 solid transparent",
1405 + "important"
1406 + );
1407 + });
1408 +
1409 + target.style.setProperty(
1410 + "border-left",
1411 + "3px solid "+
1412 + row.theme.accent,
1413 + "important"
1414 + );
1415 +
1416 + target.style.setProperty(
1417 + "box-sizing",
1418 + "border-box",
1419 + "important"
1420 + );
1421 + });
950 950   });
951 951  
952 - return {
953 - labels:
954 - rows.map(function(row){
955 - return row.label;
956 - }),
957 - targetRelativeTop:
958 - Math.round(targetTop)
959 - };
1424 + return unique;
960 960   }
961 961  
962 - function applyGroup(group){
963 - if(!validHorizontalGroup(group)){
964 - return null;
1427 + /* =======================================================
1428 + OVERVIEW CARD HEIGHT + FIRST THEMATIC ROW
1429 + ======================================================= */
1430 +
1431 + function alignOverviewCards(headers){
1432 + if(
1433 + PAGE_KIND!=="overview"||
1434 + window.innerWidth<=MOBILE_MAX
1435 + ){
1436 + return;
965 965   }
966 966  
967 967   var cards=[];
968 968   var seen=new Set();
969 969  
970 - group.entries.forEach(function(entry){
971 - if(!seen.has(entry.target)){
972 - seen.add(entry.target);
973 - cards.push(entry.target);
1442 + headers.forEach(function(row){
1443 + if(!seen.has(row.card)){
1444 + seen.add(row.card);
1445 + cards.push(row.card);
974 974   }
975 975   });
976 976  
977 - if(cards.length<2)return null;
1449 + if(cards.length<2){
1450 + return;
1451 + }
978 978  
979 - var firstSection=
980 - alignFirstSections(cards);
1453 + // Group cards by actual top position.
1454 + var groups=[];
981 981  
982 - // The section alignment can change natural card heights.
983 - // Measure only afterwards.
984 - var maxHeight=0;
985 -
986 986   cards.forEach(function(card){
987 - maxHeight=Math.max(
988 - maxHeight,
989 - card.getBoundingClientRect().height
990 - );
1457 + var top=
1458 + card.getBoundingClientRect().top;
1459 +
1460 + var group=null;
1461 +
1462 + for(var i=0;i<groups.length;i++){
1463 + if(
1464 + Math.abs(
1465 + groups[i].top-top
1466 + )<=ROW_TOLERANCE
1467 + ){
1468 + group=groups[i];
1469 + break;
1470 + }
1471 + }
1472 +
1473 + if(!group){
1474 + group={
1475 + top:top,
1476 + cards:[]
1477 + };
1478 + groups.push(group);
1479 + }
1480 +
1481 + group.cards.push(card);
991 991   });
992 992  
993 - maxHeight=Math.ceil(maxHeight);
1484 + groups.forEach(function(group){
1485 + if(group.cards.length<2){
1486 + return;
1487 + }
994 994  
995 - if(maxHeight<MIN_H)return null;
1489 + var firstHeaders=
1490 + group.cards.map(function(card){
1491 + var candidates=
1492 + headers
1493 + .filter(function(row){
1494 + return row.card===card;
1495 + })
1496 + .sort(function(a,b){
1497 + return (
1498 + a.el
1499 + .getBoundingClientRect()
1500 + .top-
1501 + b.el
1502 + .getBoundingClientRect()
1503 + .top
1504 + );
1505 + });
996 996  
997 - cards.forEach(function(card){
998 - saveOriginal(
999 - card,
1000 - originalMinHeight,
1001 - "min-height"
1002 - );
1507 + return candidates.length
1508 + ?candidates[0]
1509 + :null;
1510 + });
1003 1003  
1004 - card.style.setProperty(
1005 - "min-height",
1006 - maxHeight+"px"
1007 - );
1512 + if(
1513 + !firstHeaders.some(function(row){
1514 + return !row;
1515 + })
1516 + ){
1517 + var targetTop=
1518 + Math.max.apply(
1519 + Math,
1520 + firstHeaders.map(function(row){
1521 + return (
1522 + row.el
1523 + .getBoundingClientRect()
1524 + .top-
1525 + row.card
1526 + .getBoundingClientRect()
1527 + .top
1528 + );
1529 + })
1530 + );
1008 1008  
1009 - card.setAttribute(
1010 - "data-sn-equal-height-managed",
1011 - "4"
1012 - );
1532 + firstHeaders.forEach(function(row){
1533 + var relativeTop=
1534 + row.el
1535 + .getBoundingClientRect()
1536 + .top-
1537 + row.card
1538 + .getBoundingClientRect()
1539 + .top;
1013 1013  
1014 - heightManaged.add(card);
1015 - });
1541 + var delta=
1542 + targetTop-relativeTop;
1016 1016  
1017 - return {
1018 - cards:cards.length,
1019 - height:maxHeight,
1020 - firstSection:firstSection
1021 - };
1544 + if(delta>1){
1545 + saveStyle(
1546 + row.el,
1547 + originalMargin,
1548 + "margin-top"
1549 + );
1550 +
1551 + var current=
1552 + num(
1553 + getComputedStyle(
1554 + row.el
1555 + ).marginTop
1556 + );
1557 +
1558 + row.el.style.setProperty(
1559 + "margin-top",
1560 + (
1561 + current+delta
1562 + )+"px"
1563 + );
1564 +
1565 + row.el.setAttribute(
1566 + "data-sn-master-first-row",
1567 + "1"
1568 + );
1569 +
1570 + managedMargin.add(
1571 + row.el
1572 + );
1573 + }
1574 + });
1575 + }
1576 +
1577 + var maxHeight=0;
1578 +
1579 + group.cards.forEach(function(card){
1580 + maxHeight=
1581 + Math.max(
1582 + maxHeight,
1583 + card
1584 + .getBoundingClientRect()
1585 + .height
1586 + );
1587 + });
1588 +
1589 + maxHeight=
1590 + Math.ceil(maxHeight);
1591 +
1592 + group.cards.forEach(function(card){
1593 + saveStyle(
1594 + card,
1595 + originalHeight,
1596 + "min-height"
1597 + );
1598 +
1599 + card.style.setProperty(
1600 + "min-height",
1601 + maxHeight+"px"
1602 + );
1603 +
1604 + card.setAttribute(
1605 + "data-sn-master-equal-height",
1606 + "1"
1607 + );
1608 +
1609 + managedHeight.add(
1610 + card
1611 + );
1612 + });
1613 + });
1022 1022   }
1023 1023  
1024 - function run(){
1025 - reset();
1616 + /* =======================================================
1617 + DETAIL GRID EQUAL HEIGHT, DESKTOP ONLY
1618 + ======================================================= */
1026 1026  
1620 + function equaliseDetailGrids(){
1027 1027   if(
1622 + PAGE_KIND!=="detail"||
1028 1028   window.innerWidth<=MOBILE_MAX
1029 1029   ){
1030 1030   return;
1031 1031   }
1032 1032  
1033 - var parents=
1628 + var selectors=[
1629 + ".arsn-grid",
1630 + ".arsn-grid-2",
1631 + ".arsn-grid-3",
1632 + ".dmp-grid",
1633 + ".ido-grid",
1634 + ".pp-grid"
1635 + ];
1636 +
1637 + selectors.forEach(function(selector){
1034 1034   Array.from(
1035 - root.querySelectorAll("*")
1036 - ).filter(function(parent){
1037 - return (
1038 - visible(parent,MIN_W,MIN_H)&&
1039 - parent.children&&
1040 - parent.children.length>=2&&
1041 - parent.children.length<=MAX_PARENT_CHILDREN
1042 - );
1043 - });
1639 + root.querySelectorAll(selector)
1640 + ).forEach(function(grid){
1641 + var children=
1642 + Array.from(
1643 + grid.children||[]
1644 + ).filter(visible);
1044 1044  
1045 - var touched=new Set();
1646 + if(children.length<2){
1647 + return;
1648 + }
1046 1046  
1047 - parents.forEach(function(parent){
1048 - var entries=[];
1650 + var groups=[];
1049 1049  
1050 - Array.from(parent.children).forEach(function(child){
1051 - if(!visible(child,MIN_W,MIN_H))return;
1652 + children.forEach(function(child){
1653 + var top=
1654 + child
1655 + .getBoundingClientRect()
1656 + .top;
1052 1052  
1053 - var target=pickTarget(child);
1054 - if(!target)return;
1658 + var group=null;
1055 1055  
1056 - entries.push({
1057 - target:target,
1058 - rect:target.getBoundingClientRect()
1660 + for(var i=0;i<groups.length;i++){
1661 + if(
1662 + Math.abs(
1663 + groups[i].top-top
1664 + )<=ROW_TOLERANCE
1665 + ){
1666 + group=groups[i];
1667 + break;
1668 + }
1669 + }
1670 +
1671 + if(!group){
1672 + group={
1673 + top:top,
1674 + items:[]
1675 + };
1676 + groups.push(group);
1677 + }
1678 +
1679 + group.items.push(child);
1059 1059   });
1060 - });
1061 1061  
1062 - if(entries.length<2)return;
1682 + groups.forEach(function(group){
1683 + if(group.items.length<2){
1684 + return;
1685 + }
1063 1063  
1064 - groupsByVisualRow(entries).forEach(function(group){
1065 - if(!validHorizontalGroup(group))return;
1687 + var maxHeight=0;
1066 1066  
1067 - var signature=
1068 - group.entries.map(function(entry){
1069 - return entry.target;
1689 + group.items.forEach(function(item){
1690 + maxHeight=
1691 + Math.max(
1692 + maxHeight,
1693 + item
1694 + .getBoundingClientRect()
1695 + .height
1696 + );
1070 1070   });
1071 1071  
1072 - if(
1073 - !signature.some(function(el){
1074 - return !touched.has(el);
1075 - })
1076 - ){
1077 - return;
1078 - }
1699 + maxHeight=
1700 + Math.ceil(maxHeight);
1079 1079  
1080 - var applied=
1081 - applyGroup(group);
1702 + group.items.forEach(function(item){
1703 + saveStyle(
1704 + item,
1705 + originalHeight,
1706 + "min-height"
1707 + );
1082 1082  
1083 - if(applied){
1084 - signature.forEach(function(el){
1085 - touched.add(el);
1709 + item.style.setProperty(
1710 + "min-height",
1711 + maxHeight+"px"
1712 + );
1713 +
1714 + item.setAttribute(
1715 + "data-sn-master-equal-height",
1716 + "1"
1717 + );
1718 +
1719 + managedHeight.add(item);
1086 1086   });
1087 - }
1721 + });
1088 1088   });
1089 1089   });
1090 1090   }
1091 1091  
1092 - function schedule(){
1093 - if(raf)cancelAnimationFrame(raf);
1726 + /* =======================================================
1727 + RUN / RESPONSIVE SCHEDULING
1728 + ======================================================= */
1094 1094  
1095 - raf=requestAnimationFrame(function(){
1096 - raf=requestAnimationFrame(function(){
1097 - raf=0;
1098 - run();
1099 - });
1100 - });
1730 + function run(){
1731 + if(running)return;
1732 +
1733 + running=true;
1734 +
1735 + try{
1736 + resetRuntime();
1737 + applyPlaceholderBadge();
1738 + propagateDetailAccents();
1739 +
1740 + var headers=
1741 + applyOverviewPalette();
1742 +
1743 + makeThreeLineAreaLabels();
1744 + makeFilledRedOrangeCTAsBorderless();
1745 +
1746 + if(
1747 + window.innerWidth>
1748 + MOBILE_MAX
1749 + ){
1750 + alignOverviewCards(
1751 + headers
1752 + );
1753 +
1754 + equaliseDetailGrids();
1755 + }
1756 + }finally{
1757 + running=false;
1758 + }
1101 1101   }
1102 1102  
1103 - addEventListener("resize",schedule,{passive:true});
1104 - addEventListener("load",schedule,{once:true});
1761 + function onResize(){
1762 + if(resizeTimer){
1763 + clearTimeout(
1764 + resizeTimer
1765 + );
1766 + }
1105 1105  
1106 - root.addEventListener(
1107 - "click",
1108 - function(){
1109 - setTimeout(schedule,0);
1110 - },
1111 - true
1112 - );
1768 + resizeTimer=
1769 + setTimeout(
1770 + function(){
1771 + resizeTimer=0;
1772 + run();
1773 + },
1774 + RESIZE_DEBOUNCE
1775 + );
1776 + }
1113 1113  
1114 - Array.from(root.querySelectorAll("img")).forEach(function(img){
1115 - if(!img.complete){
1116 - img.addEventListener("load",schedule,{once:true});
1778 + async function waitForReady(){
1779 + if(
1780 + document.readyState!=="complete"
1781 + ){
1782 + await new Promise(function(resolve){
1783 + window.addEventListener(
1784 + "load",
1785 + resolve,
1786 + {once:true}
1787 + );
1788 + });
1117 1117   }
1118 - });
1119 1119  
1120 - if(document.fonts&&document.fonts.ready){
1121 - document.fonts.ready.then(schedule);
1791 + if(
1792 + document.fonts&&
1793 + document.fonts.ready
1794 + ){
1795 + try{
1796 + await document.fonts.ready;
1797 + }catch(error){}
1798 + }
1799 +
1800 + var images=
1801 + Array.from(
1802 + root.querySelectorAll("img")
1803 + );
1804 +
1805 + await Promise.all(
1806 + images.map(function(img){
1807 + if(img.complete){
1808 + return Promise.resolve();
1809 + }
1810 +
1811 + return new Promise(function(resolve){
1812 + var done=function(){
1813 + resolve();
1814 + };
1815 +
1816 + img.addEventListener(
1817 + "load",
1818 + done,
1819 + {once:true}
1820 + );
1821 +
1822 + img.addEventListener(
1823 + "error",
1824 + done,
1825 + {once:true}
1826 + );
1827 + });
1828 + })
1829 + );
1830 +
1831 + run();
1122 1122   }
1123 1123  
1124 - schedule();
1125 - setTimeout(schedule,200);
1126 - setTimeout(schedule,650);
1127 - setTimeout(schedule,1400);
1834 + window.addEventListener(
1835 + "resize",
1836 + onResize,
1837 + {passive:true}
1838 + );
1839 +
1840 + waitForReady();
1128 1128  })();
1129 1129  </script>
1130 -<!-- SN_HORIZONTAL_BOX_HARMONIZER_END -->
1843 +
1844 +<!-- SN_SERVICE_NAVIGATOR_MASTER_STYLE_END -->
1131 1131  {{/html}}
1132 1132