/*
 * Layout fixes (spacing and sizing only; no visual redesign). Loaded after the built stylesheets.
 * Found by an automated overflow audit of every template in Arabic and English at 1440 / 1024 / 768 / 390 / 360 px.
 */

/* The URL field's built-in default width (~290px) set the minimum width of every analysis form, pushing the form
   and its whole column (hero, final CTA, analysis CTA) past both screen edges on 360px phones. */
.analysis-form__field { min-width: 0; }
.analysis-form__input { width: 100%; min-width: 0; }
.ahero__text > *, .final-cta > *, .acta__main > *, .mountain__content .container > * { min-width: 0; max-width: 100%; }

/* Between 961px and 1200px four columns were too narrow: "+420%" and the labels ran out of their cards and over the
   column dividers. The design's own two-column tablet layout now starts at 1200px. */
@media (min-width: 961px) and (max-width: 1200px) {
	.stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.loop-result { grid-template-columns: minmax(0, 1fr); }
	.loop-result ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pillars--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
	.pillar--flat:nth-child(3) { border-inline-start: 0; }
}

/* Demand table: the intent chip column was fixed at 5.5rem, so "Informational" / "Commercial" were cut at the card edge. */
.mtable--3 .mtable__row { grid-template-columns: minmax(0, 1fr) auto minmax(5.5rem, max-content); }

/* Legal table of contents: the label is one flex item (templates/page-legal.php), so a label mixing Arabic and English
   ("Data Credits و AI Credits") wraps as one line of text instead of splitting into columns or leaving the sidebar. */
.legal-toc__label { min-width: 0; }
