Änderungen von Dokument Get Started

Zuletzt geändert von Veronika Kocher am Freitag, 04 Sep. 2026 14:45

Von Version 2.7
bearbeitet von Veronika Kocher
am Donnerstag, 03 Sep. 2026 10:09
Änderungskommentar: Es gibt keinen Kommentar für diese Version
Auf Version 2.11
bearbeitet von Veronika Kocher
am Freitag, 04 Sep. 2026 14:45
Änderungskommentar: Es gibt keinen Kommentar für diese Version

Zusammenfassung

Details

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