/* ==========================================================================
   PREFERENCE MATRIX (.verser-pref-matrix). CSS only. Settings › Notifications (G1, 2 Nov): one row per kind of
   alert, one column per way it reaches the person (Push, Daily email), a kit switch in each cell.

   .verser-pref-matrix            the list (a plain row list's look: no glass of its own inside a sheet; data-variant
                                  "card" puts it on the glass row card). --verser-pref-matrix-cols (default 2) is the
                                  number of switch columns, --verser-pref-matrix-col (default 60px) their width.
     .verser-pref-matrix-head     the column names: an empty first cell, then one .verser-pref-matrix-col-name each,
                                  in the mono at the meta size, centred over its switches
     .verser-pref-matrix-row      one kind: .verser-pref-matrix-label (> -title + -sub, optional -icon before it),
                                  then one .verser-pref-matrix-cell per column holding a .verser-switch (each switch is
                                  named for its row and column with aria-label). A hairline between rows.
       data-off                   the row's every column is off: the title steps down to the secondary text
   Rows are grids with the head's columns, so the switches line up under their names at every width; the label
   column shrinks first and its sub wraps. The columns follow the page direction (right to left in Arabic).
   ========================================================================== */

.verser-pref-matrix{
  --_cols:minmax(0,1fr) repeat(var(--verser-pref-matrix-cols,2),var(--verser-pref-matrix-col,60px));
  box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);margin:0;padding:0;
  font-family:var(--font-ui)
}
.verser-pref-matrix[data-variant="card"]{
  padding-block:var(--space-1);padding-inline:var(--space-4);
  border:1px solid var(--vx-hair);border-radius:var(--vx-r-lg);
  background:var(--surface-gloss),var(--surface-fog),var(--surface-panel)
}
.verser-pref-matrix-head,.verser-pref-matrix-row{
  display:grid;grid-template-columns:var(--_cols);align-items:center;column-gap:var(--space-2);min-inline-size:0
}
.verser-pref-matrix-head{padding-block:var(--space-1) var(--space-2)}
.verser-pref-matrix-col-name{
  justify-self:center;text-align:center;
  font-family:var(--font-mono);font-size:var(--font-size-meta);line-height:1.3;color:var(--text-muted)
}
.verser-pref-matrix-col-name:is(:lang(ar),:dir(rtl)){font-family:var(--font-mono-rtl,var(--font-mono))}
.verser-pref-matrix-row{min-block-size:56px;padding-block:var(--space-2);border-top:1px solid var(--hairline)}
.verser-pref-matrix-head+.verser-pref-matrix-row{border-top-color:var(--vx-hair)}
.verser-pref-matrix-label{display:flex;align-items:center;gap:var(--space-3);min-inline-size:0}
.verser-pref-matrix-icon{
  flex:none;display:grid;place-items:center;inline-size:36px;block-size:36px;border-radius:var(--radius-sm);
  background:var(--surface-fill-1);color:var(--text-secondary)
}
.verser-pref-matrix-icon .icon{inline-size:20px;block-size:20px}
.verser-pref-matrix-text{display:grid;gap:2px;min-inline-size:0}
.verser-pref-matrix-title{
  font-size:var(--font-size-body);font-weight:var(--vx-fw-semibold,600);line-height:1.3;color:var(--text);
  overflow-wrap:anywhere;transition:color var(--duration-fast) ease
}
.verser-pref-matrix-sub{font-size:var(--font-size-small);line-height:1.4;color:var(--text-secondary);overflow-wrap:anywhere}
.verser-pref-matrix-row[data-off] .verser-pref-matrix-title{color:var(--text-secondary)}
.verser-pref-matrix-cell{display:grid;place-items:center;min-block-size:var(--tap-min,44px)}

@media (prefers-reduced-motion:reduce){.verser-pref-matrix-title{transition:none}}
