/* =====================================================================
   TechSentials website - phone and tablet fix  (ts-mobile.css)  v2.0
   2026-11-24. Built from Duet's 11-23 plan, rewritten against the REAL
   page code (same class names on all six pages).

   Active only when <html> has class "tsm". Desktop is unchanged.
   Causes fixed:
   1. Menu (nav.main) is hidden under 960px and nothing replaces it.
   2. Very large fixed headline sizes; one long word is wider than a phone.
   3. Grid columns grow to fit their longest word, so the page gets
      wider than the phone and everything is cut off on the right.
   4. Rows that sit side by side on desktop never wrap on a phone.
   ===================================================================== */

html.tsm, html.tsm body { overflow-x: clip; }
html.tsm .ts-menu-btn { display: none; }

@media (max-width: 960px) {
  html.tsm .wrap { padding: 0 20px; }
  html.tsm .hero .grid > *, html.tsm .creds > *, html.tsm .svcs > *,
  html.tsm .noc .body > *, html.tsm .seals > *, html.tsm .proofrow > * { min-width: 0; }
  html.tsm .hero .grid, html.tsm .creds { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  /* headlines scale with the screen */
  html.tsm .hero h1 { font-size: clamp(34px, 8.6vw, 56px); letter-spacing: -1px; line-height: 1.06; overflow-wrap: break-word; }
  html.tsm .h2 { font-size: clamp(27px, 6.6vw, 40px); letter-spacing: -.6px; overflow-wrap: break-word; }
  html.tsm .cta-final h2 { font-size: clamp(26px, 6.4vw, 36px); }
  html.tsm .lead, html.tsm .hero p.sub { max-width: 100%; }

  /* header: logo, smaller download button, menu button */
  html.tsm header .wrap { height: 66px; gap: 10px; position: relative; }
  html.tsm header .logo img { height: 46px; }
  html.tsm header .btn-primary { margin-left: auto; padding: 9px 13px; font-size: 13px; }
  html.tsm .ts-menu-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 44px; height: 44px; padding: 0; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line); background: #fff; color: var(--ink);
  }
  html.tsm .ts-menu-btn svg { width: 22px; height: 22px; }
  html.tsm .ts-menu-btn .ts-x { display: none; }
  html.tsm.ts-nav-open .ts-menu-btn .ts-bars { display: none; }
  html.tsm.ts-nav-open .ts-menu-btn .ts-x { display: block; }
  html.tsm.ts-nav-open nav.main {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0;
    padding: 6px 20px 14px; background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(20, 40, 90, .14); z-index: 60;
  }
  html.tsm.ts-nav-open nav.main a { padding: 14px 2px; font-size: 18px; border-bottom: 1px solid var(--line); }
  html.tsm.ts-nav-open nav.main a:last-child { border-bottom: 0; }
  html.tsm.ts-nav-open nav.main a::after { display: none; }

  /* bands and footer */
  html.tsm .band .wrap { flex-wrap: wrap; gap: 12px; padding: 20px; }
  html.tsm .band .lbl { white-space: normal; }
  html.tsm .wavewrap { flex: 1 1 100%; height: 30px; }
  html.tsm footer .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  html.tsm .cta-final { padding: 40px 24px; }
}

@media (max-width: 640px) {
  html.tsm .ticker { display: none; }               /* thin top strip crowds a phone */
  html.tsm .svcs { grid-template-columns: minmax(0, 1fr); }
  html.tsm .seals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.tsm .seal { height: 92px; }
  html.tsm .hero { padding-top: 28px; }
  html.tsm .hero .provenance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  html.tsm .hero .provenance .p b { font-size: 24px; }
  html.tsm .hero .provenance .p span { font-size: 12px; line-height: 1.3; }
  html.tsm .proofrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.tsm .noc .bar { flex-wrap: wrap; gap: 4px 10px; }
  html.tsm .noc .bar .push { margin-left: 0; }
  html.tsm .credrow { flex-wrap: wrap; gap: 4px 12px; padding: 14px 16px; }
  html.tsm .credrow .v { text-align: right; margin-left: auto; overflow-wrap: anywhere; }
  html.tsm .cform .row2 { grid-template-columns: minmax(0, 1fr); }
  html.tsm .card { padding: 22px; }
  html.tsm .card p, html.tsm .card-more p { font-size: 16.5px; }
  html.tsm .hero p.sub, html.tsm .lead { font-size: 17px; }
  html.tsm section.blk { padding: 40px 0; }
}

@media (max-width: 420px) {
  html.tsm header .btn-primary .ts-long { display: none; }
}
