/* blarg-base.css — Blarg HTML standard (#101, directive 88990 / SPEC_blarg_html_standard.md)
   Fix-once-applies-everywhere base: box-sizing reset, dynamic viewport height (iOS Safari
   toolbar safe), env(safe-area) insets (notch + home-bar), 44px min tap targets, and an
   anti-horizontal-overflow guard for <=390px. Link from EVERY page; pair with
   <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/>.
   Authored MIDDLE/003 (build lane). No third-party marks. */

/* --- reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* --- dynamic viewport height: prefer 100dvh, fall back to 100vh on old engines --- */
.blarg-vh-full { min-height: 100vh; min-height: 100dvh; }
html, body { min-height: 100vh; min-height: 100dvh; }

/* --- safe-area insets (iPhone notch / home indicator); needs viewport-fit=cover --- */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.blarg-safe-top    { padding-top: max(0px, env(safe-area-inset-top)); }
.blarg-safe-bottom { padding-bottom: max(0px, env(safe-area-inset-bottom)); }

/* --- anti horizontal-overflow guard (the #88/390px class of bug, applied globally) --- */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas, table, pre { max-width: 100%; }
img, svg, video, canvas { height: auto; }

/* --- 44px minimum tap targets (WCAG / iOS HIG) for interactive elements --- */
a[role="button"], button, .btn, input[type="button"],
input[type="submit"], input[type="reset"], [data-tap] {
  min-height: 44px;
}

/* --- small-screen helper: anything tagged stacks below 600px --- */
@media (max-width: 600px) {
  .blarg-stack-sm { flex-direction: column !important; }
}
