diff --git a/docs-site/src/styles/components.css b/docs-site/src/styles/components.css index 4538e3f..7622d51 100644 --- a/docs-site/src/styles/components.css +++ b/docs-site/src/styles/components.css @@ -326,6 +326,87 @@ } } +/* ============================================================ + * Mobile (≤640px): tighten the hero, shrink the wire-dump, + * hide the ASCII column, prevent runaway horizontal overflow + * ============================================================ */ + +@media (max-width: 640px) { + /* Defensive guard against any descendant forcing horizontal scroll — + the wire-dump's white-space: pre content was overflowing the + hero column and propagating up to the page. overflow-x: hidden + on .ifx-hero contains it without affecting page-level scroll. */ + .ifx-hero, + .ifx-hero__copy, + .ifx-hero__visual { + min-width: 0; /* allow flex/grid item to shrink below content min-width */ + } + + .ifx-hero { + padding: 1.25rem 0 1.75rem; + gap: 1.25rem; + } + + .ifx-hero__eyebrow { + flex-wrap: wrap; + row-gap: 0.25rem; + font-size: 0.7rem; + letter-spacing: 0.12em; + } + + .ifx-hero__title { + font-size: clamp(1.75rem, 7.5vw, 2.5rem); + line-height: 1.1; + } + + .ifx-hero__lede { + font-size: 0.95rem; + line-height: 1.55; + } + + .ifx-hero__cta { + gap: 0.5rem; + } + .ifx-hero__cta a { + padding: 0.55rem 0.9rem; + font-size: 0.92rem; + } + + .ifx-hero__install { + font-size: 0.85rem; + word-break: break-all; /* survive any future longer install command */ + } + + /* The wire-dump is the biggest mobile risk: pre-formatted hex lines + are ~50 chars wide. Three things together make it survive narrow + viewports: smaller font, ASCII column hidden, horizontal-scroll + fallback if the hex itself still overruns. */ + .ifx-wiredump { + font-size: 0.62rem; + height: clamp(220px, 60vw, 280px); + padding: 0.85rem 0.65rem; + overflow-x: auto; + } + .ifx-wiredump__byte--ascii { + display: none; + } + .ifx-wiredump__caption { + font-size: 0.62rem; + text-align: left; + } + + .ifx-features { + gap: 0.9rem; + margin: 2rem 0; + } + .ifx-feature { + padding: 1.1rem; + } + .ifx-feature h3 { + font-size: 1rem; + } +} + /* Performance-bar visual for the comparison table */ .ifx-perfbar { position: relative;