/* mikeclancyforcongress.com - self-hosted restoration.

   The original theme is already responsive, so this file deliberately stays
   out of its way: no global img/layout rules that would fight the theme's own
   fluid-image sizing. It only adds the guards the theme lacks, plus styling
   for the 404 page (which is ours, not Squarespace's). */

html { -webkit-text-size-adjust: 100%; }

/* nothing may push the page sideways on a phone */
body { overflow-x: hidden; }

/* embeds and tables are the two things the theme lets overflow */
iframe, video { max-width: 100%; }
.sqs-block-markdown table,
.sqs-block-html table,
.sqs-block-code table { display: block; max-width: 100%; overflow-x: auto; }

/* ---------------------------------------------------------------- 404 page */
.notfound-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 14vh 6vw;
  text-align: center;
}
.notfound-page h1 { font-size: clamp(1.9rem, 6vw, 3rem); margin: 0 0 .6em; }
.notfound-page p { font-size: 1.05rem; line-height: 1.6; margin: 0 0 1em; }
.notfound-home {
  display: inline-block;
  margin-top: .5rem;
  padding: .8em 1.8em;
  border: 2px solid currentColor;
  border-radius: 2px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 767px) {
  /* long words (URLs, hyphenated slogans) must not widen their column */
  .sqs-block-html p,
  .sqs-block-html li,
  .sqs-block-markdown p,
  .sqs-block-markdown li { overflow-wrap: break-word; }

  /* form fields: full width, and >=16px so iOS does not zoom on focus */
  .form-wrapper .field-list .field input,
  .form-wrapper .field-list .field textarea,
  .form-wrapper .field-list .field select { font-size: 16px; }
  .form-wrapper .field-list .fields .field { width: 100%; float: none; }

  /* comfortable touch targets */
  .sqs-block-button-element,
  .notfound-home { min-height: 44px; }
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
