/* Shared rules for every page. Page layout still lives in inline styles;
   this file holds what inline styles can't: fonts, focus, breakpoints. */

@font-face { font-family: 'Instrument Serif'; src: url(/assets/fonts/instrument-serif-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/assets/fonts/jetbrains-mono-400.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:focus-visible { outline: 2px solid #2A1508; outline-offset: 3px; }
[data-on-orange] :focus-visible { outline-color: #fceee8; }
img { max-width: 100%; height: auto; display: block; }

/* Tap targets: nav, breadcrumb and footer links get at least 24px of hit area. */
header nav a, footer a { display: inline-block; padding-block: 6px; }

/* Scrollable tables are keyboard-reachable (tabindex set in markup). */
[data-scroll]:focus-visible { outline-offset: -2px; }

/* Sticky enquiry bar, phones only (homepage). */
.cta-bar { display: none; }

/* Wide tables scroll sideways on phones; say so. */
.swipe-hint { display: none; margin: 0 0 8px; font: 11px/1.4 'JetBrains Mono', ui-monospace, monospace; color: #7A5A4B; }
@media (max-width: 720px) { .swipe-hint { display: block; } }

@media (max-width: 640px) {
  /* Fixed label | value grids collapse to one column. */
  .stack { grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important; }
  /* The vertical "Case file" rail beside each hero is dropped on phones. */
  .rail { grid-template-columns: minmax(0, 1fr) !important; }
  .rail > p:first-child { display: none; }
  /* Secondary nav links live in the footer on phones. */
  .hide-sm { display: none !important; }
  /* The highlighted pricing row bleeds 32px past its column; pull that in. */
  .bleed { box-shadow: 0 0 0 12px #f9ded2 !important; }
  .cta-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #2A1508; color: #fceee8; font: 14px/1.3 system-ui, -apple-system, 'Segoe UI', sans-serif; transform: translateY(110%); transition: transform 0.2s ease-out; }
  .cta-bar.on { transform: none; }
  .cta-bar a { color: #2A1508; background: #fceee8; padding: 12px 16px; border-radius: 4px; text-decoration: none; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) { .cta-bar { transition: none; } }
