/*
 * Digi Rehbar 2.18 — clean responsive layer.
 * Loaded after the historical design system so one predictable layer owns
 * phone/tablet sizing, card flow, overflow protection and reduced motion.
 */

html{overflow-x:clip}
body{max-width:100%;overflow-x:clip}
main,section,article,header,footer,nav,form,fieldset,div{min-width:0}
img,svg,video,canvas,iframe{max-width:100%}
:where(h1,h2,h3,h4,p,li,a,strong,small,span){overflow-wrap:break-word}

/* Keep the existing 3D compass, but make its nodes feel dimensional. */
.drr-compass__viewport{perspective:1100px;transform-style:preserve-3d}
.drr-compass__node{transform:translateZ(28px);will-change:transform,box-shadow}
.drr-compass__node.is-active{transform:translateY(-3px) translateZ(44px);box-shadow:0 18px 38px rgba(0,0,0,.32),0 0 0 1px rgba(95,208,202,.25),0 0 28px rgba(95,208,202,.14)}

@media (hover:hover) and (min-width:861px){
  .drr-compass__node{animation:drr217NodeFloat 5.2s ease-in-out infinite}
  .drr-compass__node:nth-of-type(2){animation-delay:-1.3s}
  .drr-compass__node:nth-of-type(3){animation-delay:-2.6s}
  .drr-compass__node:nth-of-type(4){animation-delay:-3.9s}
  .drr-compass__node:hover,.drr-compass__node:focus-visible{transform:translateY(-5px) translateZ(48px)}
}

@keyframes drr217NodeFloat{
  0%,100%{box-shadow:0 12px 28px rgba(0,0,0,.2),0 0 0 rgba(95,208,202,0)}
  50%{box-shadow:0 17px 36px rgba(0,0,0,.29),0 0 24px rgba(95,208,202,.12)}
}

/* Tablet: no fixed desktop column is allowed to squeeze a card. */
@media (max-width:1050px){
  .drr-shell{width:min(calc(100% - 38px),var(--shell))}
  .drr-front-page .drr-hero-scene__grid,
  .drr-front-page .drr-map-scene__grid,
  .drr-page-hero__grid,
  .drr-service-fit__grid,
  .drr-service-connected-route__grid,
  .drr-route-brief__grid,
  .drr-route-system-v2__grid,
  .drr-route-faq-v2__grid{grid-template-columns:minmax(0,1fr)!important}
  .drr-folder-card,
  .drr-proof-folder-card,
  .drr-service-folder-card{width:100%;max-width:100%}
  .drr-folder-card__body,
  .drr-proof-folder-card .drr-folder-card__body,
  .drr-service-folder-card__body{grid-template-columns:minmax(0,1fr)!important;height:auto!important}
  .drr-folder-card__content,
  .drr-proof-folder-card__content,
  .drr-service-folder-card__content{border-left:0}
  .drr-system-architecture--compact .drr-system-architecture__routes article{flex-basis:min(78vw,520px);max-width:520px}
}

@media (min-width:721px) and (max-width:1050px){
  .drr-folder-showcase__stack,
  .drr-proof-folder-showcase .drr-folder-showcase__stack,
  .drr-service-folder-showcase__stack{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:42px!important;height:auto!important;overflow:visible!important;padding-top:28px}
  .drr-folder-card,
  .drr-proof-folder-card,
  .drr-service-folder-card{position:relative!important;inset:auto!important;height:auto!important;opacity:1!important;transform:none!important;pointer-events:auto!important}
  .drr-proof-folder-card__visual,
  .drr-service-folder-card__visual,
  .drr-folder-card .drr-concept-visual{min-height:330px!important;height:auto!important}
}

/* Phones: a clean document flow beats nested swipe rails. */
@media (max-width:720px){
  :root{--header-h:64px;--radius:18px}
  html,body{overflow-x:clip!important}
  body{font-size:15px;line-height:1.55}
  .drr-shell{width:min(calc(100% - 28px),var(--shell))}

  .drr-header,.drr-header.is-compact{position:sticky!important;top:0!important;transform:none!important}
  .admin-bar .drr-header,.admin-bar .drr-header.is-compact{top:46px!important}
  .drr-header__inner,.drr-header.is-compact .drr-header__inner{min-height:64px!important;padding-block:7px}
  .drr-logo{width:144px;max-width:52vw}
  .drr-menu-toggle{width:42px;height:42px}
  .drr-nav{inset:64px 0 auto!important;max-height:calc(100svh - 64px)}

  .drr-hero-scene,.drr-front-page .drr-hero-scene{padding:42px 0 28px!important}
  .drr-front-page .drr-hero-scene__grid{gap:26px;min-height:0}
  .drr-front-page .drr-hero-scene h1{max-width:13ch;font-size:clamp(2.45rem,11.6vw,3.45rem)!important;line-height:.96!important;letter-spacing:-.055em}
  .drr-hero-scene__lead{max-width:34rem;margin:18px 0 21px;font-size:.94rem;line-height:1.58}
  .drr-hero-scene__micro{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:22px}
  .drr-hero-scene__micro span{width:auto!important;min-width:0;padding:10px 7px!important;margin:0!important;border:0!important;font-size:.58rem;line-height:1.3}
  .drr-hero-scene__micro span:not(:last-child){border-right:1px solid var(--line-light)!important}
  .drr-hero-scene__visual{margin-top:0!important}
  .drr-compass{min-height:0!important;padding:8px;border-radius:20px}
  .drr-compass__status{padding:3px 6px 10px;font-size:.48rem}
  .drr-compass__viewport{min-height:318px;aspect-ratio:1/1.04}
  .drr-compass__sculpture{width:150px;height:150px}
  .drr-compass__node{min-width:62px;padding:7px 8px;transform:translateZ(18px)}
  .drr-compass__node span{font-size:.58rem}.drr-compass__node b{font-size:.48rem}
  .drr-compass__node--attract{left:2%;top:17%}.drr-compass__node--convert{right:2%;top:25%}.drr-compass__node--operate{right:4%;bottom:10%}.drr-compass__node--build{left:3%;bottom:14%}
  .drr-compass__readout{grid-template-columns:1fr auto!important;min-height:68px;padding:10px 7px 2px}
  .drr-compass__readout>span{grid-column:1/-1}.drr-compass__readout a{align-self:end;font-size:.66rem}

  .drr-route-scene,.drr-system-architecture,.drr-decision-scene,.drr-proof-scene,.drr-delivery-scene,.drr-map-scene,.drr-final-scene,.drr-section{padding-block:52px!important}
  .drr-scene-heading,.drr-system-architecture__head,.drr-decision-scene__head,.drr-proof-scene__head{gap:12px!important;margin-bottom:22px!important}
  .drr-scene-heading h2,.drr-system-architecture__head h2,.drr-decision-scene__head h2,.drr-proof-scene__head h2,.drr-map-scene__visual h2,.drr-final-scene__inner h2{font-size:clamp(2rem,9vw,2.75rem)!important;line-height:1!important;letter-spacing:-.045em}
  .drr-scene-heading>p:last-child,.drr-system-architecture__head>p,.drr-decision-scene__head>p,.drr-proof-scene__head>p{font-size:.82rem;line-height:1.5}

  .drr-router{border-radius:16px;overflow:hidden}
  .drr-router__nav{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .drr-router__nav button{min-width:0;padding:13px 11px!important}
  .drr-router__nav span{font-size:.82rem!important}.drr-router__nav small{font-size:.6rem}
  .drr-router__stage{padding:22px 18px!important}
  .drr-router__message h3{font-size:2rem!important;line-height:1!important}
  .drr-router__system{padding:18px}
  .drr-router__actions{display:grid;grid-template-columns:1fr;gap:8px}

  .drr-system-architecture__route-panel{border-radius:16px}
  .drr-system-architecture__route-controls{min-height:58px;padding:9px 11px}
  .drr-system-architecture--compact .drr-system-architecture__routes{gap:10px;padding:10px;scroll-padding-inline:10px}
  .drr-system-architecture--compact .drr-system-architecture__routes article{flex:0 0 calc(100vw - 58px)!important;max-width:420px;min-height:0!important;padding:22px 18px;border-radius:15px}
  .drr-system-architecture__routes h3{margin:17px 0 10px;font-size:1.65rem!important}
  .drr-system-architecture__routes p{font-size:.78rem;line-height:1.48}
  .drr-system-architecture__routes ul{margin:17px 0 18px;padding-top:15px;font-size:.73rem}

  /* Proof, service and concept folders become normal full-width cards. */
  .drr-folder-showcase,
  .drr-proof-folder-showcase,
  .drr-service-folder-showcase{height:auto!important;min-height:0!important;margin-top:18px!important}
  .drr-folder-showcase__sticky{position:relative!important;top:auto!important;height:auto!important;min-height:0!important}
  .drr-folder-showcase__stack,
  .drr-proof-folder-showcase .drr-folder-showcase__stack,
  .drr-service-folder-showcase__stack{display:grid!important;grid-auto-flow:row!important;grid-auto-columns:auto!important;grid-template-columns:minmax(0,1fr)!important;gap:42px!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;margin:0!important;padding:26px 0 0!important;overflow:visible!important;scroll-snap-type:none!important}
  .drr-folder-card,
  .drr-proof-folder-card,
  .drr-service-folder-card{position:relative!important;inset:auto!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;margin:0!important;opacity:1!important;transform:none!important;pointer-events:auto!important;border-radius:17px!important;overflow:visible!important;scroll-snap-align:none!important}
  .drr-folder-card__body,
  .drr-proof-folder-card .drr-folder-card__body,
  .drr-service-folder-card__body{display:grid!important;grid-template-columns:minmax(0,1fr)!important;height:auto!important;min-height:0!important;border-radius:16px!important;overflow:hidden!important}
  .drr-proof-folder-card__visual,
  .drr-service-folder-card__visual,
  .drr-folder-card .drr-concept-visual{height:auto!important;min-height:210px!important;overflow:hidden!important}
  .drr-proof-folder-card__visual-inner{min-height:210px;padding:17px 15px!important}
  .drr-proof-folder-card__content,
  .drr-service-folder-card__content,
  .drr-folder-card__content{min-height:0!important;padding:19px 17px 20px!important}
  .drr-proof-folder-card__content h3,
  .drr-service-folder-card__content h3,
  .drr-folder-card__content h3{max-width:none!important;margin:7px 0 9px!important;font-size:1.5rem!important;line-height:1.06!important}
  .drr-proof-folder-card__content>p,
  .drr-service-folder-card__content>p,
  .drr-folder-card__content>p{display:block!important;font-size:.8rem!important;line-height:1.5!important;overflow:visible!important;-webkit-line-clamp:unset!important}
  .drr-proof-folder-card__actions,.drr-service-folder-card__actions{grid-template-columns:1fr!important}
  .drr-mobile-folder-nav{display:none!important}

  /* Ordinary information cards stay readable in a vertical flow. */
  .drr-decision-scene__grid,
  .drr-delivery-scene__steps,
  .drr-values-grid,
  .drr-industry-patterns__grid,
  .drr-combination-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;overflow:visible!important;margin:0!important;padding:0!important}
  .drr-decision-scene__grid>a,
  .drr-delivery-scene__steps article,
  .drr-values-grid article,
  .drr-industry-patterns__grid article,
  .drr-combination-grid article{width:100%!important;min-height:0!important;padding:20px!important;opacity:1!important;transform:none!important}
  .drr-decision-scene__grid strong,.drr-delivery-scene__steps h3,.drr-values-grid h3{margin:30px 0 8px!important}

  .drr-map-scene__grid{gap:26px!important}
  .drr-live-map{padding:16px;border-radius:15px}
  .drr-guided-form,.drr-contact-form,.drr-map-form{padding:18px 15px!important;border-radius:16px!important}
  .drr-fields{grid-template-columns:minmax(0,1fr)!important;gap:10px}
  input,select,textarea{font-size:16px}
  .drr-guided-form__decision{align-items:stretch;flex-direction:column-reverse;gap:9px}
  .drr-guided-form__decision .drr-button{width:100%}

  .drr-actions,.drr-work-showcase__actions,.drr-proof-scene__actions{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .drr-actions .drr-button,.drr-work-showcase__actions .drr-button,.drr-proof-scene__actions .drr-button{width:100%;min-width:0}
  .drr-footer__grid{grid-template-columns:minmax(0,1fr)!important;gap:28px}
  .drr-footer__grid>div:first-child{grid-column:auto!important}

  /* 2.18: current real-work components use format-frame and pos-preview.
     Reset their desktop absolute coordinates instead of targeting retired
     video-orbit / pos-grid markup. */
  .drr-proof-folder-card__visual-inner{overflow:hidden}
  .drr-real-visual{width:100%;max-width:100%;min-width:0}

  .drr-real-visual--video,
  .drr-case-preview-visual .drr-real-visual--video{
    position:relative!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    align-content:center;
    min-height:226px!important;
    padding:4px 0 0;
  }
  .drr-video-hub,
  .drr-case-preview-visual .drr-video-hub{
    position:relative!important;
    inset:auto!important;
    order:-1;
    grid-column:1/-1;
    width:58px!important;
    height:58px!important;
    margin:0 auto 3px;
    border-radius:16px;
    transform:none!important;
  }
  .drr-video-hub:before,.drr-video-hub:after{display:none!important}
  .drr-video-hub__play{border-top-width:10px;border-bottom-width:10px;border-left-width:16px;margin-left:4px}
  .drr-video-hub small{bottom:7px!important;font-size:.48rem!important}
  .drr-format-frame,
  .drr-case-preview-visual .drr-format-frame{
    position:relative!important;
    inset:auto!important;
    width:auto!important;
    min-width:0!important;
    min-height:76px!important;
    grid-template-columns:32px minmax(0,1fr)!important;
    column-gap:8px!important;
    padding:9px!important;
    border-radius:12px!important;
    transform:none!important;
    animation:none!important;
  }
  .drr-format-frame--three{grid-column:1/-1}
  .drr-format-icon,
  .drr-case-preview-visual .drr-format-icon{width:32px!important;height:32px!important;border-radius:9px!important}
  .drr-format-frame strong,
  .drr-case-preview-visual .drr-format-frame strong{font-size:.68rem!important;line-height:1.18!important;overflow-wrap:normal}
  .drr-format-frame small,
  .drr-case-preview-visual .drr-format-frame small{grid-column:2;font-size:.56rem!important;line-height:1.25!important;overflow-wrap:normal}

  .drr-real-visual--pos,
  .drr-case-preview-visual .drr-real-visual--pos{
    display:block!important;
    grid-template-columns:none!important;
    min-height:0!important;
  }
  .drr-pos-preview,
  .drr-case-preview-visual .drr-pos-preview{width:100%;margin-top:5px;border-radius:15px}
  .drr-pos-preview header,
  .drr-case-preview-visual .drr-pos-preview header{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:4px 9px;
    align-items:center;
    padding:9px 10px;
  }
  .drr-pos-preview header span{min-width:0;font-size:.57rem;line-height:1.25;letter-spacing:.045em}
  .drr-pos-preview header b{font-size:.57rem;line-height:1.25;text-align:right}
  .drr-pos-preview__body,
  .drr-case-preview-visual .drr-pos-preview__body{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:8px!important;
  }
  .drr-pos-module,
  .drr-case-preview-visual .drr-pos-module{
    min-width:0;
    min-height:58px!important;
    gap:7px;
    padding:7px!important;
    border-radius:10px!important;
    transform:none!important;
  }
  .drr-pos-module i,
  .drr-case-preview-visual .drr-pos-module i{flex:0 0 30px!important;width:30px!important;height:30px!important;border-radius:8px!important;font-size:.49rem!important}
  .drr-pos-module span,
  .drr-case-preview-visual .drr-pos-module span{min-width:0;font-size:.59rem!important;line-height:1.2!important;word-break:normal!important;overflow-wrap:normal!important}
  .drr-real-visual__caption{margin-top:8px;font-size:.62rem;line-height:1.38;text-align:left}

  /* Blueprint cards: reserve a real HUD zone, then let the diagram fill the
     remaining canvas. This removes the large empty lower half and overlap. */
  .drr-route-evidence__grid .drr-route-evidence__card{grid-template-columns:minmax(0,1fr)!important;min-height:0!important}
  .drr-route-evidence__media{height:260px!important;min-height:260px!important}
  .drr-case-preview-visual{height:260px!important;min-height:260px!important}
  .drr-case-preview-visual>.drr-diagram-card,
  .drr-folder-card .drr-concept-visual>.drr-diagram-card{
    width:100%!important;
    height:260px!important;
    min-height:260px!important;
  }
  .drr-case-preview-visual .drr-diagram-card__hud,
  .drr-folder-card .drr-concept-visual .drr-diagram-card__hud{
    inset:15px 15px auto!important;
    gap:3px;
  }
  .drr-case-preview-visual .drr-diagram-card__hud strong,
  .drr-folder-card .drr-concept-visual .drr-diagram-card__hud strong{
    max-width:18ch;
    font-size:1rem!important;
    line-height:1.05!important;
    overflow-wrap:normal!important;
  }
  .drr-case-preview-visual .drr-diagram-card__hud small,
  .drr-folder-card .drr-concept-visual .drr-diagram-card__hud small{max-width:29ch;font-size:.54rem!important;line-height:1.25!important;letter-spacing:.09em!important}
  .drr-case-preview-visual .drr-diagram-card__canvas,
  .drr-folder-card .drr-concept-visual .drr-diagram-card__canvas,
  .drr-service-folder-card__visual .drr-diagram-card__canvas{
    inset:0!important;
    padding:76px 10px 10px!important;
  }
  .drr-case-preview-visual .drr-kinetic-svg,
  .drr-folder-card .drr-concept-visual .drr-kinetic-svg,
  .drr-service-folder-card__visual .drr-kinetic-svg{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
  }
  .drr-case-preview-visual .drr-kinetic-svg .micro,
  .drr-folder-card .drr-concept-visual .drr-kinetic-svg .micro{display:block!important;font-size:10px;letter-spacing:1.5px}
  .drr-case-preview-visual .drr-kinetic-svg .panel,
  .drr-folder-card .drr-concept-visual .drr-kinetic-svg .panel{fill:rgba(11,38,54,.58);stroke:rgba(95,208,202,.5)}
  .drr-case-preview-visual .drr-kinetic-svg .stroke-strong,
  .drr-folder-card .drr-concept-visual .drr-kinetic-svg .stroke-strong{stroke-width:2.4}

  /* Route models must remain populated in Customizer/device previews even
     when resize observers and entrance motion run late. */
  .drr-route-model{min-height:304px!important}
  .drr-route-model__scene{display:block!important;inset:50px 9px 34px!important;opacity:1!important;visibility:visible!important;transform:none!important}
  .drr-route-3d{display:block!important;width:100%!important;height:100%!important;min-height:220px!important;opacity:1!important;visibility:visible!important}
  .drr-route-3d__stage{inset:7px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(58px,1fr));gap:9px!important;align-content:center!important;padding:12px 0!important}
  .drr-route-3d__module{display:block!important;opacity:1!important;visibility:visible!important}
  .drr-route-3d__module-inner{min-height:58px!important;padding:8px 9px!important;background:linear-gradient(145deg,rgba(15,53,69,.97),rgba(6,27,40,.99))!important}
  .drr-route-3d__core{display:grid!important;z-index:8!important;width:66px!important;height:66px!important;opacity:1!important;visibility:visible!important}
  .drr-route-3d__links{display:block!important;opacity:.58!important}
}

@media (max-width:380px){
  .drr-shell{width:min(calc(100% - 22px),var(--shell))}
  .drr-hero-scene__micro{grid-template-columns:1fr}
  .drr-hero-scene__micro span:not(:last-child){border-right:0!important;border-bottom:1px solid var(--line-light)!important}
  .drr-compass__viewport{min-height:296px}
  .drr-compass__node{min-width:58px;padding-inline:6px}
}

@media (prefers-reduced-motion:reduce){
  .drr-compass__node{animation:none!important;transform:none!important}
}
