/* DirectMeds full-content preservation + typography correction layer.
   This file does not hide, delete, replace, or reorder any original content. */

/*
  The source stylesheet expects GT Era Display and ABC Diatype Semi-Mono.
  Their font files are not present in the saved-page package, so the browser
  otherwise falls back to Georgia/Courier and the whole layout wraps incorrectly.
  Poppins is already referenced by the original stylesheet; stable system sans
  fonts are kept behind it as a no-network fallback.
*/
:root {
  --font-display: "GT Era Display", "Poppins", "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "ABC Diatype Semi-Mono", "Poppins", "Helvetica Neue", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure the original Tailwind-style utility classes use the corrected stacks. */
.font-display { font-family: var(--font-display) !important; }
.font-body { font-family: var(--font-body) !important; }

/* Preserve the original site's word wrapping. */
h1, h2, h3, h4, h5, h6,
.font-display,
.font-body {
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

img, video, svg { max-width: 100%; }
img { height: auto; }
iframe { max-width: 100%; }
* { box-sizing: border-box; }

/* Long contact/legal content may wrap on small screens without affecting headings. */
footer p,
footer li,
footer address,
footer a[href^="mailto:"],
footer a[href^="tel:"] {
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 767px) {
  a, button { -webkit-tap-highlight-color: transparent; }
  input, select, textarea { font-size: 16px; }
  dialog { max-width: calc(100vw - 24px) !important; }
}

/* Preserve the complete footer/legal area and avoid accidental clipping. */
footer { overflow: visible !important; }
