/* CODR landing — L10 Roles section (README §2). Four role cards + a who-can-do-what matrix. Static, no motion (reveal.css handles scroll reveals). */
.roles {
  padding: var(--section-y) clamp(1rem, 4vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.roles__inner { max-width: 90rem; margin-inline: auto; }
.roles__head { margin-bottom: var(--space-6); }

.roles__grid { display: grid; gap: var(--space-4); margin-bottom: var(--space-6); }
@media (min-width: 640px) { .roles__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .roles__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.role { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.role__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-2); }
.role__name { font: 700 var(--text-lg)/1.25 var(--font-display); color: var(--petrol); overflow-wrap: anywhere; }
.role__list { display: grid; gap: var(--space-3); }
.role__list li { position: relative; padding-inline-start: var(--space-5); font-size: var(--text-sm); line-height: 1.5; color: var(--ink-2); }
.role__list li::before { content: ''; position: absolute; inset-inline-start: 0; top: 0.5em; width: 0.5rem; height: 0.5rem; background: var(--orange); }
.role--client { background: var(--bg); border: 2px dashed var(--muted); box-shadow: none; }   /* outside the system: no account */
.role--client::before { display: none; }

/* who-can-do-what matrix (div table with ARIA roles; layout switches by its own width) */
.rmx { container-type: inline-size; display: grid; gap: 0; min-width: 0; padding: var(--space-5); background: var(--paper); border: var(--border); }
.rmx__title { margin-bottom: var(--space-3); font: 700 var(--text-lg)/1.25 var(--font-display); color: var(--petrol); }
.rmx__head,
.rmx__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, minmax(4.5rem, 6.5rem));
  gap: var(--space-1);
  align-items: center;
}
.rmx__head { padding: 0 var(--space-2) var(--space-2); border-bottom: 1px solid var(--line-soft); }
.rmx__head span { font: 700 var(--text-xs)/1.2 var(--font-display); color: var(--muted); text-align: center; overflow-wrap: anywhere; }
.rmx__row { min-height: 2.75rem; padding: var(--space-1) var(--space-2); border-bottom: 1px solid var(--line-soft); }
.rmx__name { min-width: 0; font: 600 var(--text-sm)/1.35 var(--font-display); color: var(--ink-2); overflow-wrap: anywhere; }
.rmx .cell { overflow-wrap: anywhere; }
.rmx__note { margin-top: var(--space-3); font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
@container (max-width: 559px) {
  .rmx__head, .rmx__row { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--space-1); }
  .rmx__corner { display: none; }
  .rmx__name { grid-column: 1 / -1; }
}

/* Arabic glyphs read small at the Latin sizes: lift them (size only) */
:root:lang(ar) .role__list li,
:root:lang(ar) .rmx__name,
:root:lang(ar) .rmx__note { font-size: 1rem; }
:root:lang(ar) .rmx__head span,
:root:lang(ar) .rmx .cell { font-size: 0.8125rem; }
