/* ============================================================
   v4.2 — alignment + responsive polish
   Loaded last on purpose: this file neutralizes legacy layout conflicts
   without redesigning the approved desktop comp.
   ============================================================ */

:root{
  --v42-shell:1180px;
  --v42-gutter:48px;
  --v42-gutter-tablet:30px;
  --v42-gutter-mobile:18px;
}

html{overflow-x:hidden;}
body{overflow-x:clip;}
*,*::before,*::after{box-sizing:border-box;}
img,svg{max-width:100%;}
button,input,textarea,select{font:inherit;}

/* ---- typography alignment / wrapping ---- */
.dm-hero-title-v37,
.dm-concept-copy h2,
#empathy-ledger .v31-cases-head h2,
.dm-plan-intro h2,
#services h2,#difference h2,#faq h2,#cta h2{
  text-wrap:balance;
  overflow-wrap:anywhere;
}
.dm-hero-lead,
.dm-concept-copy p,
#empathy-ledger p,
#empathy-ledger li,
.dm-plan-intro>p,
.dm-plan-summary,
#services .sec-lead,#difference .sec-lead,#faq .sec-lead,#cta .sec-lead{
  overflow-wrap:anywhere;
}
.dm-eyebrow,.sec-eyebrow{line-height:1.35!important;}

/* One consistent content rail for the redesigned upper half. */
.dm-shell{
  width:min(var(--v42-shell),calc(100% - (var(--v42-gutter) * 2)))!important;
  margin-inline:auto!important;
}

/* ---- header ---- */
.dm-nav-inner{
  width:min(var(--v42-shell),calc(100% - (var(--v42-gutter) * 2)))!important;
  margin-inline:auto!important;
}
.dm-brand,.dm-nav-links,.dm-nav-cta{min-width:0;}
.dm-nav-links a{line-height:1.35;}
.dm-nav-cta{border:0;}

/* ---- HERO ---- */
#hero .dm-hero-copy{min-width:0;}
#hero .dm-hero-title-v37{
  width:auto!important;
  max-width:620px!important;
}
#hero .dm-hero-title-line{
  width:auto!important;
  max-width:100%!important;
}
#hero .dm-hero-actions-v26{
  align-items:stretch!important;
}
#hero .dm-hero-actions-v26>a{
  margin:0!important;
  line-height:1.35!important;
  text-align:center;
  border-width:1px;
}
#hero .dm-hero-benefit{align-items:center!important;}
#hero .dm-hero-benefit p{min-width:0;text-align:left;}

/* ---- CONCEPT ---- */
.dm-concept-grid>*{min-width:0;}
.dm-concept-copy h2,.dm-concept-copy p{max-width:100%;}
.dm-concept-points article{align-items:center!important;}
.dm-concept-points article>div{min-width:0;}
.dm-concept-points h3,.dm-concept-points p{overflow-wrap:anywhere;}

/* ---- PROBLEMS & CASES ---- */
#empathy-ledger .v31-cases-head>*{min-width:0;}
#empathy-ledger .v31-cases-head h2{max-width:940px;}
#empathy-ledger .v31-case-lead{line-height:1.55;}
#empathy-ledger .v32-marquee{max-width:100%;}
#empathy-ledger .v31-concern-tags>span{
  line-height:1.5!important;
  text-align:center!important;
}
#empathy-ledger .v31-case-card strong{
  width:100%;
  min-width:0;
  text-align:center!important;
  overflow-wrap:anywhere;
}

/* Inline example: keep all three cards visually aligned. */
#empathy-ledger .v31-example-top>*{min-width:0;}
#empathy-ledger .v31-example-steps>article{
  min-width:0;
  height:100%;
}
#empathy-ledger .v31-example-steps ul{padding-left:1.1em;}
#empathy-ledger .v31-example-steps li{margin:.22em 0;}
#empathy-ledger .v31-step-heading h4{min-width:0;}
#empathy-ledger .v31-self-check>*{min-width:0;}
#empathy-ledger .v31-case-cta>*{min-width:0;}

/* ---- PLAN ---- */
.dm-plan-layout>*{min-width:0;}
.dm-plan-card{min-width:0;}
.dm-plan-use,.dm-plan-summary{overflow-wrap:anywhere;}
.dm-plan-price{flex-wrap:wrap;}

/* ---- KARTE MODAL ---- */
#karteModal .karte-modal-panel--v29{width:min(720px,calc(100vw - 36px));}
#karteModal .karte-modal-head,
#karteModal .karte-modal-body,
#karteModal .karte-modal-foot{box-sizing:border-box;}
#karteModal .karte-modal-intro h3,
#karteModal .karte-modal-summary,
#karteModal .karte-problem-list li,
#karteModal .karte-approach-item,
#karteModal .karte-commitment,
#karteModal .karte-outcome-title,
#karteModal .karte-outcome-quote{overflow-wrap:anywhere;}
#karteModal .karte-modal-foot{align-items:center;gap:18px;}
#karteModal .karte-modal-guide{min-width:0;}
#karteModal .karte-consult-btn{
  border:0!important;            /* requested: no outer outline */
  outline:0!important;
  box-shadow:none!important;
  appearance:none;
  -webkit-appearance:none;
  white-space:nowrap;
  line-height:1.35;
}
#karteModal .karte-consult-btn:focus-visible{
  outline:2px solid rgba(232,104,88,.30)!important;
  outline-offset:3px!important;
}

/* ---- CONSULT MODAL ---- */
#consultModal .consult-modal-panel{width:min(620px,calc(100vw - 36px));}
#consultModal .consult-modal-brand>div{min-width:0;}
#consultModal .consult-modal-brand h3,
#consultModal .consult-modal-brand p,
#consultModal .consult-label{overflow-wrap:anywhere;}
#consultModal .consult-segment button,
#consultModal .consult-chips button{line-height:1.35;text-align:center;}

/* ---- Existing v10 sections: prevent mobile spill / text drift ---- */
#services,#difference,#faq,#cta{overflow-x:clip;}
#services .inner-wide,#difference .inner-wide{
  width:min(1180px,calc(100% - 48px));
  margin-inline:auto;
}
#faq .inner,#cta .inner{
  width:min(980px,calc(100% - 48px));
  margin-inline:auto;
}
#difference .diff-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
#difference table{min-width:760px;}

/* ============================================================
   Tablet
   ============================================================ */
@media (max-width:960px){
  :root{--v42-gutter:var(--v42-gutter-tablet);}

  .dm-nav-inner{gap:16px!important;}
  .dm-brand-tagline{display:none!important;}
  .dm-nav-links{display:none!important;}

  /* Hero becomes a deliberate text -> art stack. */
  #hero.dm-hero{padding-top:38px!important;}
  #hero .dm-hero-grid{display:block!important;min-height:0!important;}
  #hero .dm-hero-copy{padding:0!important;}
  #hero .dm-hero-title-v37{max-width:720px!important;font-size:clamp(34px,5vw,42px)!important;}
  #hero .dm-hero-title-line:first-child{white-space:normal!important;}
  #hero .dm-hero-actions-v26{max-width:620px!important;}
  #hero .dm-hero-benefits{max-width:680px!important;}
  #hero .dm-hero-art{height:410px!important;margin-top:10px!important;overflow:hidden!important;}
  #hero .dm-hero-art img{width:min(650px,92vw)!important;max-height:410px!important;}

  /* Concept: copy + mascot, points form a clean row below. */
  .dm-concept-grid{
    grid-template-columns:minmax(0,1fr) minmax(230px,300px)!important;
    gap:32px!important;
  }
  .dm-concept-points{
    grid-column:1/-1!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
  }
  .dm-concept-points article{
    grid-template-columns:46px minmax(0,1fr)!important;
    border:1px solid #eee5df!important;
    border-radius:12px!important;
    padding:16px!important;
  }

  /* Cases */
  #empathy-ledger.v31-cases{padding:64px 0!important;}
  #empathy-ledger .v31-cases-head{grid-template-columns:1fr!important;gap:10px!important;}
  #empathy-ledger .v31-head-note{display:none!important;}
  #empathy-ledger .v31-cases-head h2::after{margin-left:70px!important;}
  #empathy-ledger .v31-concern-row{grid-template-columns:1fr!important;}
  #empathy-ledger .v31-thinking-beaver{display:none!important;}
  #empathy-ledger .v31-example-body{grid-template-columns:1fr!important;}
  #empathy-ledger .v31-guide-beaver{display:none!important;}
  #empathy-ledger .v31-example-steps{
    grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr) 26px minmax(0,1fr)!important;
    gap:6px!important;
  }
  #empathy-ledger .v31-example-steps>article{min-height:220px!important;}
  #empathy-ledger .v31-self-check{
    grid-template-columns:80px minmax(0,1fr) minmax(0,1fr)!important;
  }
  #empathy-ledger .v31-mini-hotel{display:none!important;}

  /* Plan */
  .dm-plan-layout{grid-template-columns:1fr!important;gap:26px!important;}
  .dm-plan-intro{max-width:680px!important;}
  .dm-plan-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;}

  #services .inner-wide,#difference .inner-wide,#faq .inner,#cta .inner{
    width:calc(100% - 40px)!important;
  }
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width:680px){
  :root{--v42-gutter:var(--v42-gutter-mobile);}

  .dm-nav{height:62px!important;}
  .dm-nav-inner{width:calc(100% - 24px)!important;gap:10px!important;}
  .dm-brand img{width:136px!important;}
  .dm-nav-cta{padding:10px 13px!important;font-size:10px!important;gap:6px!important;white-space:nowrap;}

  #hero.dm-hero{padding-top:28px!important;}
  #hero .dm-hero-kicker{font-size:10px!important;gap:7px!important;}
  #hero .dm-hero-title-v37{font-size:clamp(29px,8.1vw,34px)!important;line-height:1.38!important;}
  #hero .dm-hero-title-line{display:block!important;white-space:normal!important;}
  #hero .dm-hero-title-line--accent em{white-space:normal!important;}
  #hero .dm-hero-lead{font-size:12px!important;line-height:1.82!important;}
  #hero .dm-hero-actions-v26{grid-template-columns:1fr!important;gap:10px!important;width:100%!important;max-width:420px!important;}
  #hero .dm-hero-actions-v26>a{width:100%!important;min-height:52px!important;padding-inline:18px!important;}
  #hero .dm-hero-benefits{grid-template-columns:1fr!important;width:100%!important;gap:0!important;margin-top:20px!important;}
  #hero .dm-benefit-separator{display:none!important;}
  #hero .dm-hero-benefit{grid-template-columns:44px minmax(0,1fr)!important;gap:11px!important;padding:10px 0!important;border-bottom:1px solid #f1ded8;}
  #hero .dm-hero-benefit:last-child{border-bottom:0;}
  #hero .dm-benefit-icon{width:42px!important;height:42px!important;}
  #hero .dm-hero-art{height:300px!important;margin-top:4px!important;}
  #hero .dm-hero-art img{width:min(470px,118vw)!important;max-height:320px!important;}

  .dm-concept{padding:52px 0!important;}
  .dm-concept-grid{grid-template-columns:1fr!important;gap:24px!important;}
  .dm-concept-copy h2{font-size:30px!important;line-height:1.45!important;}
  .dm-concept-copy p{font-size:12px!important;line-height:1.85!important;}
  .dm-concept-mascot{order:2!important;min-height:220px!important;margin:0!important;}
  .dm-concept-mascot img{width:min(280px,86vw)!important;}
  .dm-concept-points{order:3!important;display:block!important;}
  .dm-concept-points article{
    grid-template-columns:46px minmax(0,1fr)!important;
    border-width:0 0 1px!important;
    border-radius:0!important;
    padding:15px 0!important;
  }

  #empathy-ledger.v31-cases{padding:52px 0!important;}
  #empathy-ledger .v31-cases-head{margin-bottom:20px!important;}
  #empathy-ledger .v31-cases-head h2{font-size:30px!important;line-height:1.42!important;}
  #empathy-ledger .v31-cases-head h2::after{width:90px!important;height:6px!important;margin:2px 0 0 72px!important;}
  #empathy-ledger .v31-case-lead{font-size:14px!important;margin-top:4px!important;}
  #empathy-ledger .v32-marquee--concerns .v31-concern-tags>span{
    flex-basis:166px!important;width:166px!important;min-width:166px!important;min-height:78px!important;font-size:12px!important;border-radius:18px!important;
  }
  #empathy-ledger .v32-marquee--cases .v31-case-card,
  #empathy-ledger .v32-marquee--cases #karteGrid.karte-stack>.karte-card{
    flex-basis:172px!important;width:172px!important;min-width:172px!important;min-height:145px!important;
  }
  #empathy-ledger .v31-example{padding:18px 14px 15px!important;border-radius:14px!important;}
  #empathy-ledger .v31-example-top{grid-template-columns:1fr!important;gap:6px!important;}
  #empathy-ledger .v31-example-top h3{font-size:20px!important;line-height:1.5!important;}
  #empathy-ledger .v31-example-kicker{display:block!important;margin:0 0 4px!important;}
  #empathy-ledger .v31-example-top p{font-size:11.5px!important;line-height:1.7!important;letter-spacing:.02em!important;}
  #empathy-ledger .v31-example-steps{grid-template-columns:1fr!important;gap:8px!important;}
  #empathy-ledger .v31-example-steps>article{min-height:0!important;height:auto!important;padding:15px!important;}
  #empathy-ledger .v31-step-arrow{transform:rotate(90deg)!important;font-size:30px!important;line-height:.8!important;}
  #empathy-ledger .v31-step-heading>span{width:34px!important;height:34px!important;}
  #empathy-ledger .v31-example-steps ul{font-size:12px!important;line-height:1.75!important;}
  #empathy-ledger .v31-self-check{grid-template-columns:1fr!important;padding:17px 14px!important;gap:12px!important;}
  #empathy-ledger .v31-self-beaver{display:none!important;}
  #empathy-ledger .v31-self-copy h3{font-size:17px!important;}
  #empathy-ledger .v31-self-points{grid-column:auto!important;}
  #empathy-ledger .v31-case-cta{grid-template-columns:1fr!important;padding:20px 15px!important;gap:16px!important;}
  #empathy-ledger .v31-case-cta-copy h3{font-size:21px!important;}
  #empathy-ledger .v31-case-cta-actions{grid-template-columns:1fr!important;}
  #empathy-ledger .v31-case-cta-actions p{grid-column:auto!important;}

  .dm-plans{padding:52px 0!important;}
  .dm-plan-intro h2{font-size:29px!important;}
  .dm-plan-cards{grid-template-columns:1fr!important;gap:24px!important;}
  .dm-plan-card{width:100%!important;max-width:420px!important;margin-inline:auto!important;}
  .dm-plan-foot{display:block!important;padding-top:16px!important;}
  .dm-plan-foot a{display:block!important;margin-top:10px!important;white-space:normal!important;}

  #karteModal.karte-modal{padding:10px!important;align-items:flex-end!important;}
  #karteModal .karte-modal-panel--v29{width:100%!important;max-height:94dvh!important;border-radius:18px 18px 12px 12px!important;}
  #karteModal .karte-modal-head{padding:14px 16px 12px!important;}
  #karteModal .karte-modal-body{padding:20px 17px 22px!important;}
  #karteModal .karte-modal-intro h3{font-size:21px!important;line-height:1.5!important;}
  #karteModal .karte-modal-summary{font-size:12.5px!important;line-height:1.78!important;}
  #karteModal .karte-modal-problem,#karteModal .karte-modal-approach,#karteModal .karte-modal-outcome{padding:18px 0!important;}
  #karteModal .karte-problem-list li,#karteModal .karte-approach-item{font-size:12.5px!important;}
  #karteModal .karte-modal-foot{padding:12px 14px!important;display:block!important;}
  #karteModal .karte-modal-guide{display:none!important;}
  #karteModal .karte-consult-btn{width:100%!important;max-width:none!important;min-height:48px!important;}

  #consultModal.consult-modal{padding:8px!important;align-items:flex-end!important;}
  #consultModal .consult-modal-panel{width:100%!important;max-height:96dvh!important;border-radius:18px 18px 12px 12px!important;}
  #consultModal .consult-modal-head{padding:13px 14px!important;}
  #consultModal .consult-modal-body{padding:17px 14px 19px!important;}
  #consultModal .consult-grid-2{grid-template-columns:1fr!important;}
  #consultModal .consult-segment{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #consultModal .consult-chips{gap:7px!important;}
  #consultModal .consult-chips button{font-size:10.5px!important;}

  #services .inner-wide,#difference .inner-wide,#faq .inner,#cta .inner{
    width:calc(100% - 28px)!important;
  }
  #services h2,#difference h2,#faq h2,#cta h2{font-size:clamp(28px,8vw,36px)!important;line-height:1.45!important;}
  #services .sec-lead,#difference .sec-lead,#faq .sec-lead,#cta .sec-lead{font-size:12px!important;line-height:1.8!important;}
}

@media (max-width:390px){
  .dm-brand img{width:124px!important;}
  .dm-nav-cta{padding:9px 11px!important;font-size:9.5px!important;}
  #hero .dm-hero-title-v37{font-size:28px!important;}
  #empathy-ledger .v32-marquee--concerns .v31-concern-tags>span{flex-basis:158px!important;width:158px!important;min-width:158px!important;}
  #empathy-ledger .v32-marquee--cases .v31-case-card,
  #empathy-ledger .v32-marquee--cases #karteGrid.karte-stack>.karte-card{flex-basis:164px!important;width:164px!important;min-width:164px!important;}
}
