/* NAF narrow-screen fixes (11-28). Load LAST, after every other stylesheet link.
   Every rule sits inside a max-width media query, so desktop rendering is unchanged.
   Cells: overflow-wrap normal, word-break normal, hyphens manual (never auto); no min-content tracks. */
@media (max-width:400px){
/* A. Labels wrap instead of being cut off by .lg-fig{overflow:hidden}. */
.lg-fig .lg-tag,.lg-fig .lg-call>b,.lg-fig .lg-switch,.lg-fig .lg-val{white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:manual;max-width:100%}
.lg-fig .lg-tag,.lg-fig .lg-li .lg-tag{line-height:1.25}
.lg-fig .lg-switch{line-height:1.25}
.lg-fig .lg-switch::before{flex:none}
/* B. Grid "tables": below 400px each table lays out as a real table (rows become table rows, cells
   table cells inside the one anonymous table the row groups share), so columns stay aligned across
   rows and size to their content: a column is never narrower than its longest word. The table box
   scrolls sideways inside the figure only when the words cannot fit. No grid tracks are involved. */
.lg-fig .lg-table{contain:inline-size;display:grid;grid-template-columns:100%;overflow-x:auto;overscroll-behavior-x:contain;border-collapse:collapse;border-spacing:0}
/* Scroll hint: an edge shadow appears only on a side that has more to scroll to (shadow stays put,
   the panel-coloured covers travel with the content and hide it at each end). */
.lg-fig .lg-table{background:linear-gradient(90deg,var(--panel) 30%,transparent) left/1.5rem 100% no-repeat local,linear-gradient(270deg,var(--panel) 30%,transparent) right/1.5rem 100% no-repeat local,radial-gradient(farthest-side at 0 50%,#000a,transparent) left/.6rem 100% no-repeat scroll,radial-gradient(farthest-side at 100% 50%,#000a,transparent) right/.6rem 100% no-repeat scroll}
.lg-fig .lg-table>.lg-rg{display:table-row-group}
.lg-fig .lg-table .lg-tr{display:table-row}
.lg-fig .lg-table .lg-tr .lg-td{display:table-cell;vertical-align:top;overflow-wrap:normal;word-break:normal;hyphens:manual;font-size:.8rem;padding:.4rem .3rem}
.lg-fig .lg-table .lg-tr .lg-td[role=columnheader]{font-size:.66rem;letter-spacing:0;vertical-align:bottom}
.lg-fig .lg-table .lg-tr .lg-td .lg-tag{font-size:.62rem;letter-spacing:.04em}
/* C. /fears/ hub map: the port-and-branches row leaves the links about 87px, so "information"
   overflowed the figure. Below 400px the port sits above the list, which keeps a left spine. */
.naf-routing{flex-direction:column;align-items:flex-start}
.naf-routing .naf-port{width:auto;text-align:left}
.naf-routing ul{align-self:stretch;min-width:0;margin:10px 0 0 18px;padding:0 0 0 14px;border-left:2px solid var(--line)}
.naf-routing .naf-port:after,.naf-routing li:after{display:none}
.naf-routing li:before{width:12px}
.naf-hflow ol{grid-template-columns:minmax(0,1fr)}
/* D. Page-level sideways scroll. */
html body>div.container{box-sizing:border-box}
html .prompt-box p,html .phrase-card code,html .phrase-card p,html .prompt-card p,html .callout p{overflow-wrap:break-word}
html .phrase-grid,html .prompts-grid,html .tools-grid,html .blog-grid,html .card-grid,html .next-guides,html .related-grid,html .trust-grid{grid-template-columns:minmax(0,1fr)}
}
/* D. The edge-injected network footer sits in a <nav>, so page rules like `nav ul{display:flex}`
   turn each link column into a 650px row. Scoped to the footer's own single/two-column breakpoints. */
@media (max-width:900px){
html .gwn-network-footer .gwn-footer-col ul{display:block}
}
