/* Tiraz Labs: home "services-grid" ("what we make"). Owner: B Home. See js/sections/services-grid.js. Tokens only.
   Each tile is ONE link: icon · name · a few words. Phones: 2 columns, icon + name · ≥ 640: + the short line · ≥ 1080: 4 columns. */

.sg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
/* seven tiles: on two columns the last one spans the row */
.sg-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sg-item { display: flex; min-width: 0; }
.sg-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-height: 0; padding: 14px; color: var(--text); text-decoration: none; }
.sg-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); background: var(--surface-3); color: var(--accent); }
.sg-text { display: grid; gap: 2px; min-width: 0; }
.sg-name { font-family: var(--f-body); font-weight: 600; font-size: var(--t-small); line-height: 1.45; }
/* phones: the name is enough; the short line returns from 640 */
@media (max-width: 639px) { .sg-line { display: none; } .sg-item:last-child:nth-child(odd) .sg-card { flex-direction: row; align-items: center; } }
.sg-line { font-size: var(--t-small); line-height: 1.5; color: var(--text-soft); }
.sg-card:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.sg-foot { display: flex; margin-block-start: 24px; }
.sg-all { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

@media (min-width: 640px) {
  .sg-list { gap: 12px; }
  .sg-card { padding: 18px; }
  .sg-name { font-size: var(--t-body); }
}
@media (min-width: 1080px) {
  .sg-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .sg-item:last-child:nth-child(odd) { grid-column: auto; }
  .sg-card { gap: 16px; padding: 22px; }
  .sg-foot { margin-block-start: 32px; }
}
@media (hover: hover) {
  .sg-card { transition: border-color var(--dur-2) var(--ease-out); }
  .sg-card:hover { border-color: var(--line-2); }
}
