/* Mobile and tablet refinements. Desktop layouts keep their existing dimensions. */
body.nhstar-menu-open, body.nhstar-modal-open { overflow: hidden; }
.nhstar-quote-dialog { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
.nhstar-quote-dialog__header { flex-shrink: 0; }
.nhstar-quote-dialog__body { min-height: 0; overscroll-behavior-y: contain; }
.modal-need-label:focus-within { outline: 2px solid #80580f; outline-offset: 2px; }
@media (max-width: 1023px) {
    .nhstar-branding-bar { position: sticky; top: 0; z-index: 40; }
    .nhstar-branding-bar > div > .flex { gap: 12px; }
    .nhstar-branding-bar .max-w-xl { display: none; }
    .nhstar-branding-bar .nhstar-mobile-search { display: block; }
    .nhstar-brand-link { min-width: 0; flex-shrink: 1; }
    .nhstar-brand-link > span { display: none; }
    .nhstar-brand-link img { max-width: 140px; }
    .nhstar-header-actions { gap: 8px; }
    .nhstar-header-quote, #mobile-menu-toggle { min-height: 44px; }
    #mobile-menu-toggle { width: 44px; display: flex; align-items: center; justify-content: center; }
    #mobile-menu-toggle[aria-expanded="true"] { background: #f3f6f8; outline: 2px solid #d8a13a; outline-offset: -2px; }
    #mobile-menu { position: fixed; inset: var(--nhstar-mobile-header-height, 130px) 0 auto; max-height: calc(100dvh - var(--nhstar-mobile-header-height, 130px)); overflow-y: auto; overscroll-behavior-y: contain; padding-top: 12px; padding-bottom: max(24px, env(safe-area-inset-bottom)); box-shadow: 0 16px 24px #01162726; }
    #mobile-menu > a, .nhstar-mobile-menu-contact a { display: flex; align-items: center; min-height: 44px; font-size: 14px; }
    .nhstar-mobile-menu-contact a { gap: 4px; }
    #mobile-menu:focus-visible, #mobile-menu-toggle:focus-visible, .nhstar-brand-link:focus-visible { outline: 2px solid #80580f; outline-offset: 2px; }
    #primary :where(.grid) > * { min-width: 0; }
    #primary :is(h1,h2,h3,h4), footer a { overflow-wrap: anywhere; }
    #primary img, #primary iframe { max-width: 100%; }
    #primary :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea), #nhstar-quote-modal :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea), .nhstar-mobile-search input { font-size: 16px; }
    #primary :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select), .nhstar-mobile-search input { min-height: 44px; min-width: 0; }
    #primary :is(.btn-accent,.btn-secondary,.btn-outline,.btn-outline-dark,.btn-sm-accent), .nhstar-mobile-search button { min-height: 44px; white-space: normal; text-align: center; }
    #primary :is(button,a.inline-flex) { min-height: 44px; }
    #primary :is(input,select,textarea,button,a):focus-visible, #nhstar-quote-modal :is(input,select,textarea,button):focus-visible { outline: 2px solid #80580f; outline-offset: 2px; }
    #primary :is(.prose,.nhstar-article-content) { overflow-wrap: anywhere; }
    #primary .prose table { display: block; overflow-x: auto; max-width: 100%; }
    #primary .prose pre { max-width: 100%; overflow-x: auto; }
    .nhstar-about-hero > div { min-width: 0; }
    .nhstar-article-content :is(h2,h3,h4) { scroll-margin-top: calc(var(--nhstar-mobile-header-height, 130px) + 20px); }
    .nhstar-article-sidebar { display: contents; }
    .nhstar-article-layout { grid-template-areas: "header" "content" "quote"; }
    .nhstar-article-layout.nhstar-article--has-toc { grid-template-areas: "header" "toc" "content" "quote"; }
    .nhstar-article-toc { grid-area: toc; }
    .nhstar-article-consultation { grid-area: quote; }
    .nhstar-catalog-filter-option { min-height: 44px; font-size: 14px; }
    .nhstar-catalog-filter-heading > a { display: inline-flex; align-items: center; min-height: 44px; }
    .nhstar-catalog-active-filters > a { min-height: 44px; }
    .nhstar-catalog-filter-mobile-title { min-height: 48px; }
    #nhstar-quote-modal { padding: 12px; }
    .nhstar-quote-dialog { max-height: calc(100dvh - 24px); }
    #btn-close-quote-modal { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
    .nhstar-quote-dialog__body :is(input:not([type="radio"]):not([type="checkbox"]),select) { min-height: 44px; }
    .nhstar-quote-dialog__body label:not(.modal-need-label) { font-size: 12px; }
    .nhstar-quote-dialog__body .modal-need-label { font-size: 12px; min-height: 48px; }
    footer { padding-bottom: env(safe-area-inset-bottom); }
    footer li > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
    footer ul.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0; }
}
@media (max-width: 639px) {
    .nhstar-branding-bar { padding-block: 10px; }
    .nhstar-brand-link { gap: 8px; }
    .nhstar-brand-link img { height: 36px; max-width: 130px; }
    .nhstar-brand-link > div > span:first-child { font-size: 19px; }
    .nhstar-brand-link > div > span:last-child { display: none; }
    .nhstar-header-quote { width: 44px; padding: 10px; justify-content: center; }
    .nhstar-header-quote > span { display: none; }
    .nhstar-header-quote > svg { width: 20px; height: 20px; }
    .nhstar-mobile-search { margin-top: 8px; }
    .nhstar-mobile-search button { top: 0; right: 0; bottom: 0; padding-inline: 12px; font-size: 11px; }
    .nhstar-mobile-search input { padding-right: 100px; padding-left: 12px; }
    .nhstar-mobile-search input::placeholder { font-size: 13px; }
    .nhstar-page-shell, .nhstar-catalog { padding-block: 24px; }
    #primary :is(.p-6,.p-8,.p-10,.p-12) { padding: 20px; }
    #primary h1 { font-size: clamp(24px, 6.8vw, 32px); line-height: 1.25; }
    #nhstar-about-hero h1 { font-size: clamp(30px, 8.2vw, 44px); line-height: 1.1; }
    .nhstar-about-hero { min-height: 600px; min-height: clamp(600px, 80svh, 760px); }
    .nhstar-about-hero > div { padding-block: 48px; }
    #nhstar-company-metrics dl { gap: 20px 12px; }
    #nhstar-company-metrics dt { font-size: 19px; }
    #nhstar-company-metrics dd { font-size: 11px; line-height: 1.6; letter-spacing: 0; }
    #nhstar-company-metrics dl > :last-child { grid-column: 1 / -1; }
    .nhstar-director-layout { gap: 28px; }
    .nhstar-director-portrait { max-width: 220px; }
    .nhstar-industry-grid { gap: 12px; }
    .nhstar-industry-grid h3 { font-size: 12px; line-height: 1.5; letter-spacing: 0; }
    .nhstar-catalog-sort { width: 100%; justify-content: space-between; gap: 12px; }
    .nhstar-catalog-select { flex: 1; width: auto; min-width: 0; }
    .nhstar-catalog-toolbar { gap: 12px; }
    .nhstar-catalog-card-body { padding: 20px; }
    .nhstar-article-header, .nhstar-article-body, .nhstar-article-consultation { padding: 20px; }
    .nhstar-article-layout { gap: 20px; }
    .nhstar-article-related { margin-top: 32px; }
    .nhstar-article-related-grid { gap: 20px; }
    .nhstar-article-related-text { padding: 20px; }
    .nhstar-article-toc a { font-size: 14px; }
    .nhstar-article-toc ul ul a { font-size: 13px; }
    .nhstar-product-spec-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
    .nhstar-product-spec-value { overflow-wrap: anywhere; text-align: right; }
    .nhstar-product-actions { display: grid; gap: 12px; }
    .nhstar-product-title { font-size: 25px; }
    .nhstar-rental-table, .nhstar-rental-table tbody { display: block; width: 100%; }
    .nhstar-rental-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .nhstar-rental-table tbody { padding: 16px; }
    .nhstar-rental-table tbody tr { display: block; padding-block: 12px; border-bottom: 1px solid #e5e7eb; }
    .nhstar-rental-table tbody tr:last-child { border-bottom: 0; }
    .nhstar-rental-table td { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 12px; padding: 10px 0; font-size: 13px; text-align: left; overflow-wrap: anywhere; }
    .nhstar-rental-table td::before { content: attr(data-label); color: #475569; font-size: 12px; font-weight: 600; }
    .nhstar-rental-table td > span { white-space: normal; text-align: center; }
    .nhstar-rental-table td[colspan] { display: block; }
    .nhstar-rental-table td[colspan]::before { content: none; }
    body > .fixed.bottom-6 { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; }
    body > .fixed.bottom-6 :is(.nhstar-zalo-button,a) { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    html.scroll-smooth { scroll-behavior: auto; }
}
