/* Keep tool choices compact and proportionate on phones. */
@media (max-width:600px) {
  .general-tool-hero,.fedex-tool-hero,.ups-tool-hero,.ems-tool-hero{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    padding:18px;
  }
  .general-wordmark,.fedex-wordmark,.ups-wordmark,.ems-wordmark{
    font-size:1.25rem;
    letter-spacing:-1px;
  }
  .general-tool-hero h2,.fedex-tool-hero h2,.ups-tool-hero h2,.ems-tool-hero h2{
    margin:7px 0;
    line-height:1.35;
  }
  .carrier-tool-tabs{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px;
    width:100%!important;
    margin:0;
  }
  .carrier-tool-tabs button{
    width:100%!important;
    min-width:0!important;
    min-height:43px;
    padding:7px 4px;
    font-size:clamp(10px,2.8vw,12px);
    line-height:1.3;
    white-space:normal;
  }

  .general-quick-tools,.fedex-quick-tools,.ups-quick-tools,.ems-quick-tools,
  .general-resource-grid,.fedex-resource-grid,.ups-resource-grid,.ems-resource-grid,
  .tool-section .grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .general-quick-tools>a,.fedex-quick-tools>a,.ups-quick-tools>a,.ems-quick-tools>a{
    aspect-ratio:1.12;
    min-width:0;
    min-height:0;
    padding:9px;
    align-content:center;
    gap:5px;
  }
  .general-quick-tools small,.fedex-quick-tools small,.ups-quick-tools small,.ems-quick-tools small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:100%;
  }
  .general-quick-icon,.fedex-quick-icon,.ups-quick-icon,.ems-quick-icon{
    width:32px;
    height:32px;
  }

  .general-resource-card,.fedex-resource-card,.ups-resource-card,.ems-resource-card{
    aspect-ratio:1;
    min-width:0;
    min-height:0;
    padding:10px;
    overflow:hidden;
  }
  .general-resource-top,.fedex-resource-top,.ups-resource-top,.ems-resource-top{
    flex-direction:row;
    align-items:center;
  }
  .general-resource-top small,.fedex-resource-top small,.ups-resource-top small,.ems-resource-top small{
    max-width:60%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .general-resource-icon,.fedex-resource-icon,.ups-resource-icon,.ems-resource-icon{padding:6px}
  .general-resource-icon svg,.fedex-resource-icon svg,.ups-resource-icon svg,.ems-resource-icon svg{width:20px;height:20px}
  .general-resource-card h4,.fedex-resource-card h4,.ups-resource-card h4,.ems-resource-card h4{
    font-size:.8125rem;
    line-height:1.35;
    margin:8px 0 4px;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
  .general-resource-card p,.fedex-resource-card p,.ups-resource-card p,.ems-resource-card p{
    font-size:.6875rem;
    line-height:1.35;
    margin:0;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
  .general-resource-label,.fedex-resource-label,.ups-resource-label,.ems-resource-label{display:none}

  .tool-section .n-card{
    aspect-ratio:1.12;
    min-width:0;
    min-height:0;
    padding:10px 8px;
    overflow:hidden;
  }
  .tool-section .n-card h3{font-size:.8125rem;line-height:1.35;margin:5px 0}
  .tool-section .n-card p{font-size:.6875rem;line-height:1.4;-webkit-line-clamp:2}
  .tool-section .tool-logo{height:34px;margin-bottom:6px}
}

@media (max-width:370px) {
  .general-resource-card p,.fedex-resource-card p,.ups-resource-card p,.ems-resource-card p{
    -webkit-line-clamp:1;
  }
}

@media (max-width:650px) {
  .unit-results{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }
  .unit-card{
    aspect-ratio:1;
    width:100%;
    min-width:0;
    min-height:0;
    padding:8px;
    overflow:hidden;
  }
  .unit-card h3{font-size:.6875rem;line-height:1.3;margin:0 0 5px}
  .unit-card strong{font-size:.875rem;line-height:1.25;overflow-wrap:anywhere}
  .unit-card .unit-symbol{font-size:.625rem;margin-top:5px}
}

@media (max-width:370px) {
  .unit-card{padding:6px}
  .unit-card strong{font-size:.75rem}
  .unit-card .unit-symbol{display:none}
}

@media (max-width:650px) {
  #results.grid,
  #airCargoResults.air-cargo-grid,
  #oceanCargoResults.ocean-cargo-grid,
  #portResults.air-cargo-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px;
  }
  #results.grid > *,#airCargoResults > *,#oceanCargoResults > *,#portResults > *{
    min-width:0;
    max-width:100%;
    box-sizing:border-box;
  }
  #airCargoResults .air-cargo-card,
  #oceanCargoResults .ocean-cargo-card{
    aspect-ratio:1;
    min-height:0;
    padding:10px;
    overflow:hidden;
  }
  #airCargoResults .air-cargo-top,
  #oceanCargoResults .ocean-cargo-top{gap:4px;flex-wrap:wrap}
  #airCargoResults .airline-logo,
  #oceanCargoResults .oceanline-logo{width:64px;height:34px}
  #airCargoResults .air-cargo-code,
  #oceanCargoResults .ocean-cargo-code{font-size:.875rem;letter-spacing:0}
  #airCargoResults .air-cargo-card h3,
  #oceanCargoResults .ocean-cargo-card h3{
    font-size:.8125rem;
    line-height:1.35;
    margin:7px 0 5px;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }
  #airCargoResults .air-cargo-card p,
  #oceanCargoResults .ocean-cargo-card p{font-size:.6875rem;line-height:1.35}
  #airCargoResults .air-cargo-card small,
  #oceanCargoResults .ocean-cargo-card small{display:none}
  #portResults .port-card{min-height:0;padding:12px}
  #portResults .port-card h3{font-size:.875rem;line-height:1.35;overflow-wrap:anywhere}
}
