/*
 * a11y.css - accessibility layer for the TapTheMap marketing site (site 1.4.6; 1.5.1 adds N2 and N14).
 * Source: TapTheMap WCAG 2.2 AA Audit v1.0, Oct 29, 2026 (findings A3, A6, A7, A8, A9, A13, A15).
 * Linked last in every page head, so it applies after each page's own styles.
 */

/* Skip link (2.4.1). Same look as style.css; pages without style.css need it here too. */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: #1A6FA8;
  color: #ffffff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
}
.skip-link:focus { top: 0; outline: 2px solid #ffffff; outline-offset: -2px; }

/* The skip target is <main tabindex="-1">. It is not interactive, so a ring around the
   whole page after a skip adds noise; a transparent outline keeps the rule set intact. */
main[tabindex="-1"]:focus { outline-color: transparent; }

/* Links inside text are underlined, so color is not the only cue (1.4.1). */
main p a:not([class*="btn"]),
main li a:not([class*="btn"]),
main td a,
main dd a,
.article-author a,
.author-info a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Wide tables scroll inside their own box, not the whole page (1.4.10).
   The box takes keyboard focus so it can be scrolled with arrow keys (2.1.1). */
.table-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 3px solid #1A6FA8; outline-offset: 2px; }

/* Menu button: a full 44 x 44 px touch target (2.5.8). */
.nav-toggle { min-width: 44px; min-height: 44px; }

/* Sample-site pages: the venue name in the header is now the page's h1 (1.3.1). */
h1.demo-header-subtitle { font-size: inherit; font-weight: inherit; line-height: inherit; color: inherit; margin: 0; }

/* Nothing may make the page wider than the screen at 320 px (1.4.10). */
img, svg, video, iframe { max-width: 100%; }
main a { overflow-wrap: anywhere; }
main p, main li, main td, main h2, main h3 { overflow-wrap: break-word; }
.articles-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.venue-selector { flex-wrap: wrap; }
@media (max-width: 480px) {
  .pilot-strip { padding: 16px; }
  main .card { padding: 20px; }
  .pilot-strip-text { min-width: 0; }
  .status-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 12px; }
}
/* Grid items may shrink below their content's widest word (default min-width is auto). */
main [style*="grid-template-columns"] > * { min-width: 0; }

/* ── Site 1.5.1: WCAG 2.2 AA Audit v2.0 (Nov 4, 2026) ── */

/* N2 (2.2.2, 2.5.8): with 20 articles the dots needed 594 px and squeezed Previous, Pause and Next to 2 px on phones.
   The buttons keep their size; the dots wrap, and on phones they take their own row under the buttons. */
.carousel-controls { flex-wrap: wrap; row-gap: 12px; }
.carousel-controls > .carousel-btn { flex: 0 0 auto; }
.carousel-dots { flex-wrap: wrap; justify-content: center; min-width: 0; }
@media (max-width: 640px) {
  .carousel-dots { order: 3; flex-basis: 100%; }
}

/* N14 (2.1.1): nav-a11y.js opens a menu with the keyboard by adding .open. That class showed the menu only on phones,
   so About and Demos links could not be reached from the keyboard on a laptop. */
.nav-dropdown.open .nav-dropdown-menu { display: block; }

/* Site 1.5.19: fixes from the WebAbility scan of Nov 23, 2026 (WCAG 1.4.11, 2.4.11).
   a11y.css loads last, so these rules win over style.css, print-calc.css and inline page
   styles without !important. --field-border is 3.47:1 on #ffffff and 3.32:1 on #fafaf8;
   --border (#e5e5e0, 1.26:1) stays as is for cards and dividers. */
:root { --field-border: #8a8a84; --sticky-offset: 104px; }

/* Form field edges (1.4.11): contact, request-demo, feedback and the print-cost calculator
   (on /print-costs and /pricing). feedback.html styles its fields with .feedback-form, so it is named here too. */
.form-input,
.form-select,
.form-textarea,
.feedback-form .form-input,
.feedback-form .form-select,
.feedback-form .form-textarea,
.pcalc__input { border-color: var(--field-border); }
/* The pricing-page estimator fields set their border in the page's own <style> block, which
   loads after this file, so pricing.html uses var(--field-border) there directly. */

/* Carousel dots (1.4.11): #9a9a94 was 2.71:1 on the page background. */
.carousel-dot { background: var(--field-border); }
.carousel-dot.active,
.carousel-dot:hover { background: var(--accent, #1A6FA8); }

/* Sticky nav (2.4.11): keep a focused or anchored element below the nav. */
html { scroll-padding-top: var(--sticky-offset); }

/* Required fields say so in the label text (3.3.2). Same look as the "(optional)" note. */
.form-label .required { font-weight: 400; color: var(--text-muted, #4b5563); }
