/* Mobile audit overrides. Load AFTER app.css. White, system fonts, existing accent only. */
html{-webkit-text-size-adjust:100%}
body{font-size:16px;line-height:1.6}
img,video,table,pre,input,select,textarea{max-width:100%}
.main-content,.public-content,.app-header,.app-nav,.app-footer{min-width:0}
h1,h2,h3,.row-title,.brand,.notice,.panel,.lead-card,.term-card{overflow-wrap:anywhere}
.chip,.badges .chip{font-size:14px;white-space:normal;overflow-wrap:anywhere}
.badges,.chip-row,.terms-links,.day-row,.contact-actions{flex-wrap:wrap;gap:8px}
.small,.helper-line,.history-line{font-size:16px}
.script,.script-preview-box pre,.qa-say,.term-card .term-preview p{font-size:18px;line-height:1.7}
.script{max-width:100%;overflow-wrap:anywhere}
.button,.text-button,.chip.ph-chip,.day-chip,.back-link,summary,.small-link,.pv2-link,.settings-tabs a{min-height:44px}
.back-link,.small-link,.text-button{display:inline-flex;align-items:center}
.timeline-item a,.panel p a,.hist-row a,.notice a{display:inline-block;min-height:44px;line-height:44px}
input[type=checkbox]{width:24px;height:24px;min-height:24px;flex:none}
.checkbox-label{align-items:center;gap:12px}
.timeline-item span{font-size:14px}
.stats-strip span,.lead-row p,.lead-row small,.lead-row .chip,.reason-list{font-size:14px}
.eyebrow{font-size:12px}
.touch-dialog,.qa-dialog,dialog.pv2-sheet{overscroll-behavior:contain}
.dialog-heading button,.pv2-x{min-width:44px;min-height:44px}
.dialog-heading{gap:8px}
.dialog-heading h2{font-size:20px;min-width:0;flex:1;overflow-wrap:anywhere}
.gb-table th,.gb-table td{font-size:14px}

@media(max-width:720px),(max-height:500px) and (orientation:landscape){
  .main-content,.public-content,.app-footer{margin-left:max(16px,env(safe-area-inset-left));margin-right:max(16px,env(safe-area-inset-right))}
  .app-header{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right));gap:8px}
  .app-nav{padding:0 max(8px,env(safe-area-inset-left));gap:4px}
  .app-nav a{flex:1 1 auto;min-width:44px;font-size:16px;padding:0 10px}
  .page-heading{flex-direction:column;align-items:stretch}
  .page-heading>.contact-actions{flex-direction:row}
  .page-heading>.button,.contact-actions .button{white-space:normal}
  .contact-actions>.button,.contact-actions>form,.contact-actions>a{flex:1 1 140px}
  .stats-strip{grid-template-columns:minmax(0,1fr)}
  .stats-strip>div,.stats-strip>div:nth-child(3){border-right:0;border-bottom:1px solid var(--line)}
  .stats-strip>div:nth-child(odd){border-right:0}
  .stats-strip>div:last-child{border-bottom:0}
  .stats-strip span{font-size:14px}
  .lead-grid,.detail-grid,.form-grid,.pricing-grid,.pricing-edit,.steps-grid,.contact-section,.niche-grid,.weights-grid,.result-grid,.summary-counts,.gb-status,.gb-limits,.pv2-two{grid-template-columns:1fr}
  .lead-row{flex-direction:column;align-items:stretch}
  .lead-row>div{min-width:0}
  .row-title{font-size:18px}
  .row-score{text-align:left}
  .filter-panel{flex-direction:column;align-items:stretch}
  .filter-panel label,.filter-panel .search-field{flex:0 0 auto;width:100%}
  .bulk-bar{flex-direction:column;align-items:stretch}.bulk-bar label{max-width:none}
  .list-meta{flex-direction:column;gap:8px}
  .script{font-size:18px}
  .public-hero>p:not(.eyebrow){font-size:18px}
  .public-header{flex-wrap:wrap}
  .public-footer{flex-direction:column}
  .concept-banner{font-size:14px;margin:0 calc(-1 * max(16px,env(safe-area-inset-left)))}
  body:has(.public-call){padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  .public-call{min-height:52px}

  /* sticky bottom action bar: clear of the Answers FAB */
  .call-bar{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:8px}
  .call-bar .button{flex:1 1 80px;min-height:48px;padding:10px}
  body:has(.call-bar) .qa-fab{bottom:calc(88px + env(safe-area-inset-bottom));height:64px}
  body:has(.call-bar) .main-content{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
  body:has(.qa-fab):not(:has(.call-bar)) .main-content{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
  .save-bar{bottom:0;padding-bottom:calc(12px + env(safe-area-inset-bottom));padding-right:calc(92px + env(safe-area-inset-right))}

  /* dialogs and editors: full height with safe areas */
  .touch-dialog{top:0;bottom:0;height:100dvh;max-height:100dvh;border-radius:0;border-width:0;width:100%;max-width:none;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
  .dialog-heading{position:sticky;top:0;background:#fff;z-index:1}
  .qa-dialog{max-width:none}
  dialog.pv2-sheet{height:100dvh;max-height:100dvh;border-radius:0}

  /* tables to labeled cards */
  .gb-table-wrap{overflow:visible}
  .gb-table{min-width:0;display:block}
  .gb-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .gb-table tbody,.gb-table tr{display:block}
  .gb-table tr{border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-bottom:12px}
  .gb-table th[scope=row]{display:block;border:0;padding:8px 0;font-size:16px}
  .gb-table td{display:flex;justify-content:space-between;gap:12px;border:0;border-top:1px solid var(--line);padding:10px 0;font-size:16px;text-align:right}
  .gb-table td::before{content:attr(data-label);font-weight:600;color:var(--muted);text-align:left}
  .settings-tabs{flex-wrap:wrap;overflow:visible;gap:8px}
}
.main-content>*{min-width:0}
.script{white-space:pre-wrap;word-break:normal}
.app-footer a,.public-footer a{display:inline-flex;align-items:center;min-width:44px;min-height:44px}
.checkbox-label,.qa-check{min-height:44px}
.touch-dialog[open]{display:flex;flex-direction:column;overflow:hidden}
.touch-dialog .dialog-heading,.touch-dialog .td-progress{flex:none}
#quick-touch-form{display:flex;flex-direction:column;min-height:0;flex:1}
.td-scroll{overflow-y:auto;min-height:0;overscroll-behavior:contain}
.td-nav{flex:none;margin-top:8px;padding-top:8px;background:#fff}
.td-nav [hidden]{display:none}
.layout-check-list{display:flex;flex-direction:column;gap:16px}
.lc-case{margin-top:16px;min-width:0}
.lc-stage{position:relative;width:100%;max-width:390px;border:1px solid var(--line);overflow:hidden}
.lc-stage iframe{display:block;border:0;max-width:none;transform-origin:top left}
.call-bar{position:fixed;left:0;right:0;bottom:0;padding:10px max(16px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
body:has(.call-bar) .qa-fab{bottom:calc(var(--callbar-height,80px) + 12px)}
body:has(.call-bar) .main-content{padding-bottom:calc(var(--callbar-height,80px) + 100px)}
.mobile-editor-sheet{width:min(100%,680px);height:100dvh;max-height:100dvh;border:0;margin:0 auto;padding:16px;color:var(--ink);background:#fff}
.mobile-editor-sheet[open]{display:flex;flex-direction:column}
.mobile-editor-sheet::backdrop{background:#192e2680}
.mobile-editor-sheet .dialog-heading{flex:none}
.mobile-editor-scroll{overflow-y:auto;min-height:0;padding:8px 0 calc(16px + env(safe-area-inset-bottom))}
.mobile-editor-scroll .contact-actions{position:sticky;bottom:0;background:#fff;padding:8px 0}
@media(max-width:720px) and (orientation:landscape){
  .qa-fab{height:56px}
  .main-content{padding-bottom:110px}
}
@media(max-width:360px){
  h1,.page-heading h1,.public-hero h1,.login-panel h1{font-size:28px;letter-spacing:-.5px}
  .app-nav a{padding:0 6px;font-size:15px}
}
