/* ArtificialWeapons.com: keep every page inside the screen (phones, tablets, laptops). Loaded after each page's own CSS. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;overflow-x:hidden;overflow-x:clip}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
svg:not([height]){height:auto}
pre,code,kbd,samp{overflow-wrap:anywhere}
pre{max-width:100%;overflow-x:auto;white-space:pre-wrap}
h1,h2,h3,h4,p,li,td,th,dd,dt,a,strong,span,label{overflow-wrap:break-word}
main,article,section,.article-body,.wrap,.container{min-width:0}
.footer-links{flex-wrap:wrap;row-gap:10px}
.footer-inner{flex-wrap:wrap}
.cost-table-wrap,.table-wrap,.data-table-wrap{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}
@media (hover:none) and (pointer:coarse){
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),select,textarea{font-size:16px !important}
}
@media (max-width:760px){
  table{display:block !important;max-width:100% !important;overflow-x:auto !important;-webkit-overflow-scrolling:touch}
  .tear-line-label,[class*="tear-line"]{white-space:normal !important;overflow-wrap:break-word}
  .article-body,.legal-section,main{overflow-wrap:break-word}
  :where(*){min-width:0}
  [class*="-grid"],[class*="grid-"],[class*="cards"],[class*="-list"]:not(ul):not(ol){grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)) !important}
  [class*="label"],[class*="title"],[class*="name"],[class*="badge"],[class*="tag"]{white-space:normal !important;overflow-wrap:break-word}
  .nav-live,.live-tag,[class*="live"]{white-space:normal !important}
}

/* OpenStreetMap tiles darkened to match the site (maps) */
.aw-dark-tiles{filter:invert(1) hue-rotate(180deg) brightness(.8) contrast(.9) saturate(.5)}

/* never split words inside navigation-like or compact UI parts */
[class*="breadcrumb"]{flex-wrap:wrap}
[class*="breadcrumb"],[class*="breadcrumb"] *,button,[class*="btn"],[class*="tab"],[class*="chip"],[class*="pill"],[class*="badge"],[class*="tag"],th,nav a{overflow-wrap:normal !important;word-break:normal !important}
[class*="breadcrumb"] > *,[class*="breadcrumb"] a,[class*="breadcrumb"] span,nav a,[class*="btn"],button{flex-shrink:0;min-width:auto}
/* long current-page titles and button rows may wrap on small screens */
[class*="breadcrumb"] span.breadcrumb-current,[class*="breadcrumb"] .breadcrumb-current{flex-shrink:1;min-width:0;white-space:normal;overflow-wrap:break-word !important}
[class*="btns"],[class*="filters"],[class*="filter-"],[class*="button-row"],[class*="actions"]{flex-wrap:wrap}
@media (max-width:760px){
  [class*="controls"],[class*="toolbar"],[class*="filter-bar"],[class*="filters"]{flex-wrap:wrap}
  [class*="btns"]{flex:1 1 100%;min-width:0}
}
/* scrolling tickers/marquees must keep their single-line animated layout (scoped: ".ticker" is also a stock-symbol label elsewhere) */
.ticker-bar,.ticker-bar *,.ticker-track,.ticker-track *,.ticker-item,.ticker-item *,.marquee,.marquee *,[class*="marquee-"],[class*="marquee-"] *{white-space:nowrap !important;overflow-wrap:normal !important;word-break:normal !important}
.ticker-track > *,.marquee > *,[class*="marquee-"] > *{flex-shrink:0 !important;min-width:auto !important}
@media (max-width:760px){.newsletter-input,.newsletter-btn,.wargame-btn,.cta-btn,.cta-content,.cta-content *{box-sizing:border-box;max-width:100%}.wargame-btn,.cta-btn{white-space:normal !important;text-align:center}}

/* ===== HEADER STACK: no gaps between the fixed layers (banner -> topbar -> nav) =====
   Desktop: 24 + 40 + 60 = 124. Phones: 22 + 32 + 60 = 114.
   The desktop top:24/64 !important rules out-ranked the mobile 22/54 ones, leaving 2px/8px slits
   where page content showed through while scrolling. Same-specificity overrides + opaque backing plate. */
.aw-classification-top{box-sizing:border-box;height:24px;padding-top:0 !important;padding-bottom:0 !important;display:flex;align-items:center;justify-content:center}
html:has(body.aw-classified:not(.aw-no-global-header))::before{content:"";position:fixed;top:0;left:0;right:0;height:124px;background:#0a0a0f;z-index:999;pointer-events:none}
@media (max-width:768px){
  .aw-classification-top{height:22px}
  html:has(body.aw-classified:not(.aw-no-global-header))::before{height:114px}
  html body.aw-classified:not(.aw-no-global-header) .aw-global-topbar{top:22px !important;height:32px !important}
  html body.aw-classified:not(.aw-no-global-header) .aw-nav{top:54px !important;height:60px !important}
}

/* document-control line injected as the first child of a full-bleed <main>: keep it aligned with the page content */
main > .aw-doc-control:first-child{padding-left:24px;padding-right:24px}
@media (max-width:760px){main > .aw-doc-control:first-child{padding-left:16px;padding-right:16px}}
