/* The skills deck: the tiles of its dialog, the picker of "+ Add" and the rows of its
   dashboard panel. Tokens only, so that both themes and every accent work. */

.deck-count { margin: 0; }

.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

.deck-tile { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
/* A pinned tile is marked twice, for a reader who does not see the colour: the edge and the word. */
.deck-tile.deck-pinned { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }

.deck-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.deck-name { font-family: var(--f-mono); font-size: .88rem; overflow-wrap: anywhere; }
.deck-mark { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }

.deck-agent { display: flex; align-items: center; gap: 5px; margin: 0; font-size: .82rem; color: var(--muted); min-width: 0; }
.deck-agent span { overflow-wrap: anywhere; }
.deck-agent .ic { flex: none; }

.deck-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.deck-label { font-family: var(--f-mono); font-size: .64rem; font-weight: 600; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; border: 1px solid currentColor; color: var(--muted); white-space: nowrap; }
.deck-uses { font-size: .76rem; color: var(--muted); }

/* The hue of a model: the lightest model reads calm, the heaviest reads as a cost. */
.deck-m-haiku { color: var(--ok); border-color: var(--ok); }
.deck-m-sonnet { color: var(--accent); border-color: var(--accent); }
.deck-m-opus { color: var(--warn); border-color: var(--warn); }
.deck-m-fable { color: var(--ink); border-color: var(--ink); }

.deck-choice { display: flex; gap: 6px; min-width: 0; }
.deck-choice select { flex: 1 1 0; min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); padding: 4px 6px; font: inherit; font-size: .8rem; }
.deck-choice select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.deck-choice select:disabled { color: var(--muted); }

/* The buttons sit at the foot of the tile, whatever the height of the text above. */
.deck-acts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }

.deck-picker { margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunk); max-height: 46vh; overflow: auto; }
.deck-cand { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline, var(--line)); }
.deck-cand-main { flex: 1 1 auto; min-width: 0; }
.deck-cand-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.deck-cand-d { margin: 3px 0 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }

/* The row of the dashboard panel: the name must not push its button out of the panel. */
.deck-row .deck-name { font-size: .82rem; }
.deck-row.deck-pinned { box-shadow: inset 2px 0 0 var(--accent); }

@media (max-width: 559px) {
  .deck-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .deck-tile { padding: 10px; }
  /* A finger needs more than the 26 px of a desk select. */
  .deck-choice select { min-height: 34px; font-size: .86rem; }
  .deck-picker { padding: 8px 10px; max-height: 52vh; }
  .deck-cand { gap: 8px; }
}

/* The agent of a capability of the user, chosen beside its Add button. */
.deck-cand select { max-width: 11rem; }
