/* ============================================================================
   Mobile and tablet fixes: company pages (security.html, newsroom.html),
   everything inside <main class="co">.
   Load AFTER css/teradix-company.css. Only max-width media queries, every
   selector scoped under .co. Logical properties so the same rules hold on a
   right-to-left page. Desktop (above 1180px) is untouched.
   ============================================================================ */

/* ---- touch widths: arrow links are 44px targets ---- */
@media (max-width:1180px){
  .co .co-go{min-height:44px}
  .co .co-links{gap:0 26px}
  .co .co-links .co-go{min-height:44px}
  /* the base rule right-aligns the third caption; on a right-to-left page that is the wrong side */
  .co .co-split__cap span:nth-child(3){text-align:end}
  .co .co-points li{padding-left:0;padding-inline-start:22px}
  .co .co-points li::before{left:auto;inset-inline-start:0}
}

/* ---- tablet (two-column card grids): no orphan card, no oversized drawing ---- */
@media (max-width:980px){
  /* a third card alone on its row takes the full row */
  .co .co-grid:not(.co-grid--4):not(.co-grid--2)>:last-child:nth-child(odd){grid-column:1/-1}
  /* five backers: three on the first row, two wider ones on the second */
  .co .co-backers{grid-template-columns:repeat(6,minmax(0,1fr))}
  .co .co-backers>*{grid-column:span 2}
  .co .co-backers>:nth-child(n+4){grid-column:span 3}
  /* the square partner drawing does not need the whole column */
  .co.co--newsroom .co-split__art{width:100%;max-width:520px;margin-inline:auto}
  /* small print up to a readable size */
  .co .co-spec dd small,.co .co-backer span{font-size:14px}
  .co .co-spec__h span{font-size:14px}
  .co .co-tag{font-size:12px}
}

/* ---- phone (one column) ---- */
@media (max-width:640px){
  .co .co-grid:not(.co-grid--4):not(.co-grid--2)>:last-child:nth-child(odd){grid-column:auto}
  .co .co-backers{grid-template-columns:repeat(2,minmax(0,1fr))}
  .co .co-backers>*,.co .co-backers>:nth-child(n+4){grid-column:auto}
  .co .co-backers>:last-child:nth-child(odd){grid-column:1/-1}
  .co .co-backer{min-height:112px;gap:12px}

  /* icon cards: the icon sits beside the text, so four cards do not fill four screens */
  .co .co-card:not(.co-fact):not(.co-film){display:grid;grid-template-columns:minmax(0,1fr);align-items:start;justify-items:start}
  .co.co--security .co-card:not(.co-fact){grid-template-columns:48px minmax(0,1fr);column-gap:16px}
  .co.co--security .co-card:not(.co-fact)>*{grid-column:2}
  .co.co--security .co-card:not(.co-fact)>.ico3{grid-column:1;grid-row:1/span 4;width:48px;height:48px;margin-bottom:0}
  .co .co-card .co-kicker{margin-bottom:8px}
  .co .co-card p{margin-top:8px}
  .co .co-card .co-go{margin-top:0;padding-top:8px}

  /* figures */
  .co .co-fact h3{margin-top:12px}
  .co .co-fact .co-go{padding-top:10px}

  /* summary sheet */
  .co .co-spec{padding:20px}
  .co .co-spec dd small{font-size:15px}

  /* the bridge drawing uses the full width of the screen column and its three labels stay on one line each */
  .co .co-split__cap{padding-inline:0;letter-spacing:.04em;column-gap:8px;margin-top:10px}
  .co .co-split__cap span:nth-child(1){text-align:start}

  /* film cards */
  .co .co-film__body{padding:20px}
  .co .co-links{flex-direction:column;align-items:flex-start;gap:0;padding-top:10px}

  /* buttons: full width, same as the page head */
  .co .cta-actions{display:flex;flex-direction:column;align-items:stretch;gap:12px}
  .co .cta-actions .btn{width:100%;justify-content:center}
  .co .co-note{padding:20px;border-left:1px solid var(--border);border-inline-start:3px solid var(--lime)}
  .co .co-note .btn{width:100%}

  /* closing drawing: smaller, so the band is not mostly picture */
  .co .co-cta__art{max-width:220px}
  .co.co--newsroom .co-split__art{max-width:340px}
  .co .co-foot{font-size:15px}
}
