/* xdevice-fixes 2026-11-08: cross-device fixes for the public tracems.com pages (phones, iPads, desktops).
   Loaded in <head> after the other public stylesheets. No restyling beyond the items below. */

/* 1. Home contact map: "Open directions" was dark navy on the dark map label (1.4:1). Use the label's own light tone. */
html body.trace-launch #contact .map-label a[href*="maps"]{color:#b8cccf!important}

/* 2. Security, Privacy and Terms in phone/OS dark mode: the contents box turned dark while its links stayed dark
   (1.1:1, unreadable). These pages are light everywhere else, so keep their light tokens in dark mode too. */
@media (prefers-color-scheme:dark){
  html:not([data-theme="dark"]) body.trace-public-shell:has(#main > .toc){
    --paper:#f6f7fb;--paper-raise:#ffffff;--ink:#12172a;--ink-soft:#4a5170;
    --line:#dde1ec;--accent:#2554c7;--accent-ink:#173a91;--accent-tint:#eaf0fd;--seal:#c98a2c;
  }
}

/* 3. Security & Trust: "Self-Recovery" eyebrow was grey on the dark recovery panel (2.3:1). */
#main .recovery-hero .eyebrow{color:#aab0c8}

/* 4. /thanks: the per-form heading and the "Free to explore" band are added after first paint and pushed the
   footer down while it was on screen (CLS up to 0.17). The message area fills the first screen, so they land below it. */
main[data-thanks]{min-height:calc(100vh - 60px);min-height:calc(100svh - 60px)}

/* 5. Back-to-top button: same look as page-controls-v1.js sets from script, from a stylesheet so the
   page's style policy cannot leave it as a plain grey button under the footer. Not shown until scrolled. */
.trace-back-top{position:fixed;right:18px;bottom:18px;z-index:1000;display:grid;width:44px;height:44px;padding:0;place-items:center;border:1px solid #7fa4af;border-radius:50%;background:#173f49;color:#fff;font:800 20px/1 system-ui,sans-serif;box-shadow:0 8px 24px rgba(7,30,38,.24);cursor:pointer}
.trace-back-top[hidden]{display:none}
.trace-back-top:hover,.trace-back-top:focus-visible{background:#0f6576;outline:3px solid rgba(255,255,255,.85);outline-offset:2px}
@media (max-width:720px){.trace-back-top{right:12px;bottom:12px;width:44px;height:44px}}

/* 6. Touch screens (phones, iPads): menu, footer and contents links get a 44 px tap height. */
@media (pointer:coarse){
  #trace-public-header details.trace-public-menu > summary{min-height:44px!important;box-sizing:border-box!important}
  .tapps-foot a,
  footer#contact > .launch-wrap > a:not(.trace-public-footer-brand),
  footer .foot-links > a,
  footer .foot-contact > a,
  footer > nav > a{display:inline-flex!important;align-items:center;justify-content:center;min-height:44px;min-width:44px}
  .tapps-foot,
  footer#contact > .launch-wrap,
  footer .foot-links{row-gap:2px!important}
  #main > .toc > a{padding-top:11px;padding-bottom:11px;line-height:22px}
  .trace-ui-tabs > .trace-ui-tab{min-height:44px}
  section.trace-plan-disclosure > a{display:inline-flex;align-items:center;min-height:44px}
}
