Changes for page Get Started

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

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