/* Simple Calculator Tools v6.2.1 — Mobile Readability Fix */
@media (max-width: 760px) {
  html { font-size: 17px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { font-size: 1rem !important; line-height: 1.62 !important; color: #17233a !important; background: #f7f9fc; }
  .container { width: min(100% - 28px, 1240px) !important; }

  main section { padding-top: 38px !important; padding-bottom: 38px !important; }
  .page-hero { padding: 32px 0 24px !important; }
  .page-hero h1, .app-dashboard-hero h1, .v5-hero-copy h1 {
    font-size: clamp(2rem, 9vw, 2.65rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -.025em;
  }
  h2, .section-head h2 { font-size: clamp(1.55rem, 7vw, 2rem) !important; line-height: 1.2 !important; }
  h3 { font-size: 1.15rem !important; line-height: 1.3 !important; }
  p, li, .page-hero p, .section-head p, .app-dashboard-hero p { font-size: 1rem !important; line-height: 1.62 !important; color: #3e4d65; }
  small { font-size: .86rem !important; }

  .site-header .nav { min-height: 68px !important; padding: 10px 0 !important; }
  .brand { font-size: 1rem !important; }

  .calc-card, .content-card, .tool-card, .category-card, .feature-card,
  .journey-card, .home-collection, .sct-review-panel {
    padding: 20px !important;
    border-radius: 16px !important;
  }
  .calculator-layout { gap: 18px !important; }
  .calc-card-head h2 { font-size: 1.4rem !important; }
  .calc-card-head p { font-size: .98rem !important; }

  .field label { font-size: 1rem !important; font-weight: 800 !important; margin-bottom: 8px !important; color: #17233a !important; }
  .field input, .field select, .field textarea,
  input, select, textarea {
    min-height: 52px !important;
    font-size: 18px !important;
    padding: 0 14px !important;
    border-width: 2px !important;
    border-color: #aebbd0 !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #101827 !important;
  }
  textarea, .field textarea { min-height: 120px !important; padding-top: 12px !important; }
  .field small { font-size: .84rem !important; line-height: 1.45 !important; }

  .btn, button, .dashboard-secondary-btn, .dashboard-browse-btn, .continue-card a {
    min-height: 50px !important;
    padding: 12px 18px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    border-radius: 11px !important;
  }
  .form-actions { gap: 12px !important; }
  .form-actions .btn { width: 100%; }

  .result-panel { padding: 20px !important; }
  .result-panel h3 { font-size: 1.2rem !important; }
  .result-value { font-size: 2rem !important; line-height: 1.15 !important; }
  .result-row { font-size: .98rem !important; padding: 10px 0 !important; }

  .sct-category-page .tool-card {
    min-height: 112px !important;
    padding: 18px 48px 18px 16px !important;
    grid-template-columns: 42px minmax(0,1fr) !important;
    column-gap: 14px !important;
  }
  .sct-category-page .tool-card .icon { width: 42px !important; height: 42px !important; font-size: 1.2rem !important; }
  .sct-category-page .tool-card h3, .grid.cards-3 .compact-tool-link h3 { font-size: 1rem !important; }
  .sct-category-page .tool-card p { font-size: .9rem !important; }

  .dashboard-search-box input { min-height: 56px !important; font-size: 18px !important; }
  .dashboard-search-box > span { font-size: 1.45rem !important; }
  .dashboard-summary { grid-template-columns: 1fr !important; gap: 10px !important; }
  .dashboard-stat { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px !important; text-align: left; }
  .dashboard-stat strong { font-size: 1.8rem !important; }
  .dashboard-stat span { margin-top: 0 !important; font-size: .95rem !important; }
  .continue-card { padding: 22px !important; }

  .mobile-app-nav {
    grid-template-columns: repeat(5, minmax(0,1fr)) !important;
    padding-top: 8px !important;
    background: #fff !important;
  }
  .mobile-app-nav a {
    min-height: 58px !important;
    font-size: .72rem !important;
    line-height: 1.15 !important;
    color: #40516b !important;
  }
  .mobile-app-nav a span:first-child { font-size: 1.4rem !important; }
  .mobile-app-nav a.active { color: #154fc7 !important; background: #eaf2ff !important; }
  .sct-app-page, .pwa-standalone body { padding-bottom: 104px !important; }

  .footer-bottom { gap: 15px; flex-direction: column; align-items: flex-start !important; }
  .site-footer a, .footer-bottom { font-size: .9rem !important; }

  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 3px !important;
  }
}

@media (max-width: 390px) {
  html { font-size: 16px; }
  .container { width: min(100% - 22px, 1240px) !important; }
  .mobile-app-nav a { font-size: .66rem !important; }
}

/* v6.2.2 — highly visible app installation controls */
.pwa-header-install{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  margin-left:auto;
  padding:10px 16px;
  border:0;
  border-radius:12px;
  background:#2563eb;
  color:#fff;
  font:800 15px/1.1 Arial,sans-serif;
  box-shadow:0 8px 20px rgba(37,99,235,.25);
  cursor:pointer;
  white-space:nowrap;
}
.pwa-header-install:hover{transform:translateY(-1px);background:#1d4ed8}
.pwa-header-install[hidden]{display:none!important}

.pwa-hero-install{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:50px;
}

.pwa-install-help{
  position:fixed;
  inset:0;
  z-index:10050;
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.72);
}
.pwa-install-help.show{display:flex}
.pwa-install-help-card{
  position:relative;
  width:min(420px,100%);
  border-radius:20px;
  background:#fff;
  color:#172033;
  padding:28px 24px 24px;
  box-shadow:0 24px 70px rgba(0,0,0,.3);
}
.pwa-install-help-card h2{margin:8px 0 14px;font-size:24px;line-height:1.2}
.pwa-install-help-copy{font-size:17px;line-height:1.6}
.pwa-install-help-copy ol{padding-left:24px}
.pwa-install-help-copy li{margin:8px 0}
.pwa-install-help-icon{font-size:38px}
.pwa-install-help-close{
  position:absolute;right:12px;top:10px;width:40px;height:40px;border:0;border-radius:50%;
  background:#eef2f7;color:#172033;font-size:26px;cursor:pointer
}
.pwa-install-help-done{width:100%;margin-top:12px;min-height:48px}

@media(max-width:760px){
  .site-header .nav{gap:8px}
  .pwa-header-install{order:2;margin-left:auto;padding:10px 13px;font-size:14px}
  .site-header .menu-btn{order:3}
  .site-header .brand{max-width:48%}
  .site-header .brand>span:last-child{font-size:15px;line-height:1.1}
  .v5-hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  .v5-hero-actions .btn{width:100%;min-height:52px;font-size:17px}
  .pwa-install-button{left:12px!important;right:12px!important;bottom:88px!important;width:calc(100% - 24px);justify-content:center;font-size:16px!important;padding:14px 18px!important}
}

@media(max-width:420px){
  .pwa-header-install span:last-child{display:none}
  .pwa-header-install{width:44px;padding:0;font-size:18px}
}

@media(display-mode:standalone){
  .pwa-header-install,.pwa-hero-install,.pwa-install-button{display:none!important}
}
