/* Readability-only overrides for the mobile Home/showcase surface. */
#panel-home {
  --home-label-size: 12px;
  --home-body-size: 13px;
  --home-title-size: 17px;
}

#panel-home .home-intro-copy small,
#panel-home .home-plan-copy strong,
#panel-home .home-search-copy small,
#panel-home .home-hero-eyebrow,
#panel-home .home-section-head small,
#panel-home .home-all-link,
#panel-home .module-carousel-head small,
#panel-home .module-showcase-card small,
#panel-home .module-showcase-more,
#panel-home .home-finance-copy small,
#panel-home .home-finance-copy em {
  font-size: var(--home-label-size);
}

#panel-home .home-plan-copy small,
#panel-home .module-carousel-count {
  font-size: 11.5px;
}

#panel-home .home-search-copy strong,
#panel-home .home-hero p,
#panel-home .home-hero-cta,
#panel-home .home-service,
#panel-home .module-showcase-card strong {
  font-size: var(--home-body-size);
}

#panel-home .home-section-head h2,
#panel-home .module-carousel-head h2 {
  font-size: var(--home-title-size);
}

#panel-home .home-plan-chip {
  min-width: 104px;
  padding-inline: 9px;
}

#panel-home .home-plan-copy,
#panel-home .home-search-copy,
#panel-home .home-finance-copy {
  line-height: 1.5;
}

#panel-home .home-search {
  min-height: 68px;
}

#panel-home .home-hero p {
  line-height: 1.75;
  max-width: 31ch;
}

#panel-home .home-service {
  min-height: 104px;
  line-height: 1.5;
  gap: 7px;
}

#panel-home .module-showcase-card {
  min-height: 192px;
  padding: 13px;
}

#panel-home .module-showcase-card strong {
  line-height: 1.55;
  min-height: 40px;
}

#panel-home .module-showcase-card small {
  line-height: 1.65;
}

#panel-home .module-showcase-more {
  min-height: 32px;
  line-height: 1.4;
}

#panel-home .home-finance-copy strong {
  font-size: 14px;
}

@media (max-width: 380px) {
  #panel-home .home-intro-copy h1 {
    font-size: 18px;
    white-space: normal;
  }

  #panel-home .home-plan-chip {
    min-width: 98px;
  }

  #panel-home .home-service-grid {
    gap-inline: 5px;
  }

  #panel-home .module-showcase-card {
    padding: 11px;
  }
}

@media (min-width: 700px) {
  #panel-home .module-showcase-card {
    min-height: 180px;
  }
}

/* Shell-level width contract: module layouts must size from the phone, not the outer preview viewport. */
#main > .app-panel,
#main > .app-panel > [id$="-root"],
.feature-module-root,
.finance-root,
.account-root,
.legal-suite-root,
.shahdad-mobile-calendar { width:100%; max-width:100%; min-width:0; }
.sh-auth-layer,.sh-auth-sheet,.sh-auth-form,.sh-auth-field { min-width:0; max-width:100%; }
@container shahdad-phone (max-width:639px){
.legal-writing-shell,.lw-scroll,.lw-editor-view,.lw-preview-view,.lw-card,.lw-form,.lw-form-grid{min-width:0;max-width:100%}
.lw-scroll{padding:14px 14px calc(32px + env(safe-area-inset-bottom))}
.lw-editor-view,.lw-preview-view{grid-template-columns:minmax(0,1fr);gap:13px}
.lw-hero,.lw-truth,.lw-inline-state,.lw-template-card,.lw-form,.lw-danger-link,.lw-ai-card{grid-column:auto;grid-row:auto}
.lw-ai-card{position:static;top:auto}.lw-hero h1{font-size:21px}.lw-form-grid{grid-template-columns:minmax(0,1fr);gap:11px}.lw-field.lw-full{grid-column:auto}.lw-template-chip{flex-basis:142px}.lw-paper{padding:28px 22px}.lw-export-grid{max-width:none}.lw-confirm-layer{align-items:end}.lw-confirm{padding:20px 16px 16px}
}
@container shahdad-phone (max-width:430px){
.lw-appbar{grid-template-columns:44px minmax(0,1fr) minmax(88px,auto)}.lw-save{max-width:112px;padding-inline:7px}.lw-save .lw-icon{display:none}.lw-paper{padding:24px 17px}.lw-preview-meta{grid-template-columns:1fr}.lw-export-grid{grid-template-columns:1fr 1fr}.lw-export-grid .lw-secondary:last-child{grid-column:1/-1}
}
@container shahdad-phone (max-width:390px){
.lw-scroll{padding-inline:11px}.lw-appbar{padding-inline:10px}.lw-appbar-copy small{display:none}.lw-save{max-width:96px}.lw-hero{grid-template-columns:54px minmax(0,1fr);padding:14px}.lw-hero-mark{width:54px;height:54px;border-radius:19px}.lw-hero h1{font-size:20px}.lw-template-chip{flex-basis:148px}.lw-form-actions,.lw-preview-head,.lw-confirm>div{grid-template-columns:1fr}.lw-preview-head>button{width:100%}
}
@container shahdad-phone (max-width:360px){
.lw-appbar{gap:7px;padding-inline:8px;grid-template-columns:44px minmax(0,1fr) 88px}.lw-appbar-copy strong{font-size:15px}.lw-save{max-width:88px}.lw-save span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lw-card{padding:12px}.lw-template-chip{flex-basis:144px}.lw-paper{padding:22px 14px}.lw-paper h2{font-size:20px}
}
