/* Polish pass: shared accessibility and touch rules for the CPIPS23 pages.
   Linked last in <head> so these win over each page's own styles. Colors come from each page's own variables. */

/* Visible keyboard focus in the page's gold */
:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold, #d4a843);
  outline-offset: 3px;
  border-radius: 4px;
}

/* No tap delay or double-tap zoom on controls */
a, button, input, select, textarea, summary, label, [role="button"] { touch-action: manipulation; }

/* Crisper text, balanced headings, no one-word last lines */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Prices line up */
.card-price, .gann-price, .gann-price-note, .price-amount, .product-price, .cp-price, .price-now, .price-was, .price-note {
  font-variant-numeric: tabular-nums;
}

/* Skip link and its target */
.skip {
  position: absolute; left: 12px; top: -72px; z-index: 10000;
  padding: 12px 18px; border-radius: 6px;
  background: var(--gold, #d4a843); color: #08090c;
  font: 700 14px/1.2 system-ui, -apple-system, 'Segoe UI', sans-serif; text-decoration: none;
}
.skip:focus { top: max(12px, env(safe-area-inset-top, 0px)); }
main:focus { outline: none; }

/* Phones: 16px fields so iOS does not zoom on tap */
@media (max-width: 760px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px; }
}

/* Touch screens: 44px tap areas without changing the layout (the padding is cancelled by the negative margin) */
@media (pointer: coarse) {
  footer a, nav a, .social-link {
    position: relative;
  }
  footer a::after, nav a::after, .social-link::after {
    content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 44px; transform: translateY(-50%);
  }
}

/* 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;
  }
}
