/* The Skills tab (#skills, REQ-183.2, Pablo's mockup m1 on REQ-183): one row
   per skill with its steps, a bar and a 44 px count that opens its uses;
   unused skills under 'Not used yet' in the warning colour. */
.sk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 16px 0 8px; }
.sk-hd h1 { margin: 2px 0 4px; font-family: var(--font-display); font-weight: 800; }
.sk-hd code { font: 13px/1.4 var(--font-mono); }
.sk-sum { margin: 4px 0 12px; color: var(--mute); }
.sk-sum b { color: var(--ink); }
.sk-list { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.sk-row { border-top: 1px solid var(--line); padding: 10px 16px; }
.sk-row:first-child { border-top: 0; }
.sk-top { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.sk-name code { font: 700 14px/1.3 var(--font-mono); color: var(--accent); overflow-wrap: anywhere; }
.sk-steps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sk-step, .sk-removed { font: 600 11px/1.3 var(--font-mono); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--mute); background: var(--sunken); }
.sk-removed { color: var(--blocked); background: var(--blocked-soft); border-color: transparent; }
.sk-bar { height: 8px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.sk-bar span { display: block; height: 100%; border-radius: 999px; background: var(--done); }
.sk-count.btn { min-height: 44px; min-width: 6.5rem; justify-content: center; font-weight: 700; color: var(--ink); }
.sk-count[aria-expanded="true"] { background: var(--done-soft); border-color: var(--done); }
.sk-zero .sk-count.btn, .sk-zero .sk-count.btn:disabled { opacity: 1; color: var(--needs); background: var(--needs-soft); border-color: transparent; cursor: default; }
.sk-unused-h { margin: 0; padding: 10px 16px 6px; border-top: 1px solid var(--line); font: 700 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.sk-open { margin-top: 10px; }
.sk-uses { width: 100%; border-collapse: collapse; font-size: 14px; }
.sk-uses th { text-align: left; font: 700 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sk-uses td { padding: 8px; border-bottom: 1px solid var(--line); }
.sk-init { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font: 700 11px/1 var(--font-body); color: var(--ink); }
.sk-uses a { color: var(--accent); font-weight: 700; }
.sk-when, .sk-none { color: var(--mute); }
.sk-usenote { margin: 8px 0 0; color: var(--mute); font-size: 13px; }
.sk-more.btn { min-height: 44px; padding: 0 8px; color: var(--accent); font-weight: 700; }
.sk-foot { color: var(--faint); font-size: 13px; }
/* A phone: the bar under the name, the filter across the width. */
@media (max-width: 600px) {
  .sk-head .seg { width: 100%; }
  .sk-head .seg button { flex: 1 1 0; }
  .sk-top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name count' 'bar bar'; gap: 8px 12px; }
  .sk-name { grid-area: name; }
  .sk-count { grid-area: count; }
  .sk-bar { grid-area: bar; }
  .sk-uses th:nth-child(3), .sk-uses td:nth-child(3) { white-space: nowrap; }
}

/* System settings → Skill usage (REQ-183.3): a table on a computer, one card
   per skill on a phone (both drawn, one shown). */
.su-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.su-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.su-agent { display: flex; flex-direction: column; gap: 4px; font: 700 11px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.su-agent select { min-height: 44px; font: 600 15px/1.2 var(--font-body); text-transform: none; letter-spacing: 0; }
.su-sum { margin: 12px 0; color: var(--mute); }
.su-sum b { color: var(--ink); }
.su-admins { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--sunken); color: var(--mute); font: 700 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.su-tablebox { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.su-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.su-table th, .su-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.su-table thead th { font: 700 11px/1.3 var(--font-mono); color: var(--mute); }
.su-table th[scope="row"], .su-table thead th:first-child { text-align: left; }
.su-table th[scope="row"] code { font: 700 13px/1.3 var(--font-mono); color: var(--ink); }
.su-table .su-dash { color: var(--faint); }
.su-table .su-total { background: var(--sunken); font-weight: 800; color: var(--ink); }
.su-table tfoot th, .su-table tfoot td { font-weight: 800; border-bottom: 0; }
.su-table .su-never { color: var(--needs); }
.su-zero th[scope="row"] code { color: var(--mute); }
.su-cards { display: none; }
.su-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 12px; margin-bottom: 10px; }
.su-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.su-card-top code { font: 700 14px/1.3 var(--font-mono); }
.su-chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.su-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--sunken); font-size: 14px; }
.su-zero .su-card-top b { color: var(--needs); }
@media (max-width: 600px) {
  .su-filters, .su-filters .seg, .su-agent { width: 100%; }
  .su-filters .seg button { flex: 1 1 0; }
  .su-tablebox { display: none; }
  .su-cards { display: block; }
}
