/* Final mobile layer, loaded after panel and branding styles. Never scale text. */
@media screen {
 html{scroll-padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
 body{padding-top:env(safe-area-inset-top,0px);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
 input,select,textarea{font-size:max(16px,1em)}
 input,select,textarea,[contenteditable=true]{scroll-margin-block:120px}
 .mobile-install-entry{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;max-width:100%;padding:10px 14px;border:1px solid #497510;border-radius:12px;background:#fff;color:#36590b;font:600 14px/1.4 system-ui;white-space:normal;cursor:pointer;touch-action:manipulation}
 .mobile-install-footer{padding:12px max(16px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));text-align:center}
 .mobile-install-dialog{box-sizing:border-box;width:min(520px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);padding:24px;border:1px solid #d6e2d7;border-radius:20px;background:#fff;color:#26351d;overflow:auto;overscroll-behavior:contain;font:16px/1.6 system-ui}
 .mobile-install-dialog::backdrop{background:#10241599}
 .mobile-install-dialog h2{font-size:24px;line-height:1.3;margin:0 0 16px;padding-right:50px}
 .mobile-install-dialog h3{font-size:18px;margin:18px 0 8px}
 .mobile-install-dialog p{font-size:16px;line-height:1.6;text-align:start}
 .mobile-install-close{float:right;min-width:44px;min-height:44px;border:1px solid #d6e2d7;border-radius:10px;background:#fff;font:24px system-ui;cursor:pointer}
 .mobile-install-dialog button:focus-visible,.mobile-install-entry:focus-visible{outline:3px solid #497510;outline-offset:3px}
 .mobile-install-dialog [hidden],.mobile-install-entry[hidden],.mobile-install-footer[hidden]{display:none!important}
 .mobile-install-note{padding:12px;background:#eff6e5;border-radius:12px}
 .mobile-install-dialog [data-install-native]{width:100%;min-height:48px;background:#497510;color:#fff;border:0;border-radius:12px;font:600 16px system-ui;cursor:pointer}
 .keyboard-open .page-tools{position:static}
 .keyboard-open .mobile-install-footer{display:none}
 .header-actions .install{display:inline-flex}
 @media(max-width:700px){
  .global-language-control,.member-language,.language-control{max-width:100%;min-width:0}
  .global-language-control select,.member-language select,.language-control select{font-size:16px;max-width:100%;min-width:0}
  .plan-source-table,.article-table-wrap,.club-table-wrap,.order-scroll{overscroll-behavior-x:contain}
  .mobile-install-dialog{padding:18px}
  .mobile-install-entry{flex:0 1 auto}
 }
 @media(pointer:coarse){
  :where(.club-fields,.plan-fields,.exam-fields,.member-card,.access-card) :where(input:not([type=checkbox]):not([type=radio]),select,button){min-height:48px}
  :where(.plan-tree,.education-choice-tree,.belt-home) summary{min-height:44px;align-content:center}
 }
 @media(display-mode:standalone){body{padding-bottom:env(safe-area-inset-bottom,0px)}}
}
@media print{.mobile-install-entry,.mobile-install-footer,.mobile-install-dialog{display:none!important}}

/* Tighter reading rhythm at every screen width; retain natural text reflow. */
@media screen {
 .article-prose p,.text-version p,.plan-source-section p,
 #demo-reader-body p,.exam-answer,.assistant-excerpt{line-height:1.6}

 .hero p:not(.eyebrow),.muted,.empty,.placeholder-note p,
 .article-editor-note,.translation-disclosure,
 .intro-fine,.intro-section-head>p,.intro-pricing>div>p:not(.intro-kicker),
 .intro-price-login,.member-intro>p:not(.member-eyebrow),.member-card p,
 .panel-loading,.learning-lead,.exam-note,.exam-prompt,.exam-show-answers,
 .learning-error,.assistant-mode,.assistant-source h3,
 .plan-heading p,.plan-status,.plan-panel>.muted,.plan-error,
 .plan-review-meta,.plan-phase li,.plan-approval>.muted,
 .plan-export-options>.muted,.plan-output-hint,.plan-source-preview>summary,
 .plan-source-section h4,.plan-pdf-progress,.belt-questions li,
 .athlete-card p,.club-status p,.club-content>.muted,
 .access-feedback,.organization-status,.private-check,
 .viewer-intro,.viewer-main p,.order-intro,.order-help,.order-next,
 .order-empty,#order-status,.sms-panel,
 .broadcast-check,.broadcast-status,.broadcast-main p,
 .mobile-install-dialog p{line-height:1.5}

 .article-prose p{margin-bottom:14px}
 .article-prose p:last-child{margin-bottom:0}
}

.whatsapp-contact {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: white;
  background: #137b42;
  box-shadow: 0 2px 8px #0004;
  touch-action: manipulation;
}
.whatsapp-contact > svg { display: block; }
.whatsapp-contact:hover{background:#096436;color:white}
.whatsapp-contact:focus-visible{outline:3px solid #142f23;outline-offset:3px}
@media(max-width:1024px){body:has(.mobile-nav) .whatsapp-contact{bottom:calc(76px + env(safe-area-inset-bottom,0px))}}
@media print{.whatsapp-contact{display:none!important}}

button.app-previous-page {
  position: fixed;
  left: calc(12px + env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 10000;
  box-sizing: border-box;
  min-height: 44px;
  max-width: calc(100% - 88px);
  padding: 8px 14px;
  border: 1px solid #a8b99c;
  border-radius: 24px;
  background: white;
  color: #304b22;
  font: 600 14px/1.3 system-ui,sans-serif;
  box-shadow: 0 2px 8px #0002;
  touch-action: manipulation;
  cursor: pointer;
}
button.app-previous-page:focus-visible{outline:3px solid #497510;outline-offset:2px}
button.app-previous-page:disabled{opacity:.6;cursor:default}
@media(max-width:1024px){body:has(.mobile-nav) .app-previous-page{bottom:calc(76px + env(safe-area-inset-bottom,0px))}}
@media(max-width:700px){body:has(.course-picker) .app-previous-page{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
@media print{.app-previous-page{display:none!important}}
