/* The skills and tools directory (Bader, 7 Nov; rebuilt 12 Nov 2026 like the Design tab). The page wears design.css
   (the head, the pill tabs and search, the side menu, the cards, the item head and the panel); only what is new lives
   here: the tile's glass window on its category's colour, the tags, and the item page's terminal, prompt and facts. */

/* Each category has its own colour; the tile and the item's terminal sit on it. */
.tb [data-cat] { --tb-a: #6d5efc; --tb-b: #22d3ee; }
.tb [data-cat="agents"] { --tb-a: #f97316; --tb-b: #ec4899; }
.tb [data-cat="coding"] { --tb-a: #2563eb; --tb-b: #22d3ee; }
.tb [data-cat="design"] { --tb-a: #a855f7; --tb-b: #f472b6; }
.tb [data-cat="video"] { --tb-a: #e11d48; --tb-b: #f59e0b; }
.tb [data-cat="media"] { --tb-a: #db2777; --tb-b: #8b5cf6; }
.tb [data-cat="security"] { --tb-a: #059669; --tb-b: #84cc16; }
.tb [data-cat="research"] { --tb-a: #0f766e; --tb-b: #38bdf8; }
.tb [data-cat="documents"] { --tb-a: #475569; --tb-b: #94a3b8; }
.tb [data-cat="web"] { --tb-a: #ea580c; --tb-b: #facc15; }
.tb [data-cat="local"] { --tb-a: #4f46e5; --tb-b: #14b8a6; }

.tb-stage { display: grid; place-items: center; padding: 1.25rem 1.4rem;
  background:
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--tb-a) 55%, transparent), transparent 70%),
    radial-gradient(80% 90% at 100% 100%, color-mix(in srgb, var(--tb-b) 50%, transparent), transparent 70%),
    color-mix(in srgb, var(--tb-a) 22%, var(--color-canvas)); }
.tb-hero { position: relative; display: grid; justify-items: center; gap: 1rem; padding: clamp(1.5rem, 5vw, 3.25rem) clamp(1rem, 4vw, 3rem);
  border-radius: 0 0 19px 19px;
  background:
    radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, var(--tb-a) 55%, transparent), transparent 70%),
    radial-gradient(70% 90% at 100% 100%, color-mix(in srgb, var(--tb-b) 45%, transparent), transparent 70%),
    color-mix(in srgb, var(--tb-a) 20%, var(--color-canvas)); }

/* The glass window: a terminal for a command, a browser bar for an address. Always left to right. */
.tb-win { inline-size: min(100%, 21rem); border: 1px solid rgb(255 255 255 / 0.35); border-radius: 14px; overflow: hidden; text-align: left;
  background: rgb(12 12 16 / 0.62); color: #f5f5f7; -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 18px 40px -18px rgb(0 0 0 / 0.55); transition: transform 0.2s ease; }
.tb-win__bar { display: flex; align-items: center; gap: 0.35rem; padding: 0.55rem 0.7rem; border-block-end: 1px solid rgb(255 255 255 / 0.1); }
.tb-win__bar > i { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: rgb(255 255 255 / 0.28); }
.tb-win__bar > i:first-child { background: #ff5f57; } .tb-win__bar > i:nth-child(2) { background: #febc2e; } .tb-win__bar > i:nth-child(3) { background: #28c840; }
.tb-win__name, .tb-win__url { margin-inline-start: 0.5rem; overflow: hidden; color: rgb(255 255 255 / 0.72); font: 600 11.5px / 1 var(--type-label-family); text-overflow: ellipsis; white-space: nowrap; }
.tb-win__url { flex: 1; padding: 0.3rem 0.6rem; border-radius: 999px; background: rgb(255 255 255 / 0.1); text-align: center; }
.tb-win__body { padding: 0.85rem 0.9rem 1rem; }
.tb-win__body code { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #f5f5f7; font: 500 12.5px / 1.55 var(--type-code-family), ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.tb-win__ps { color: #7ee787; }
.tb-win__site { display: block; padding-block: 0.6rem; color: #fff; font: 650 1.35rem / 1.1 var(--type-display-family); letter-spacing: -0.02em; text-align: center; }
.dz-card__open:hover .tb-win { transform: translateY(-2px); }

.tb-win--big { inline-size: min(100%, 44rem); }
.tb-win--big .tb-win__body { padding: 1.1rem 1.2rem 1.3rem; }
.tb-win--big pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tb-win--big code { display: block; -webkit-line-clamp: unset; color: #f5f5f7; font: 500 14.5px / 1.65 var(--type-code-family), ui-monospace, Menlo, monospace; }
.tb-hero .dz-btn { background: rgb(255 255 255 / 0.92); color: #0e0e12; border-color: transparent; }
.tb-hero .dz-btn:hover { background: #fff; }

/* Tags: kind, cost, licence, works with. On a tile they sit in its corner. */
.tb-tags { position: absolute; inset-block-start: 0.7rem; inset-inline-start: 0.7rem; z-index: 1; display: flex; gap: 0.3rem; }
.tb-tag { display: inline-flex; align-items: center; gap: 0.3rem; block-size: 1.6rem; padding-inline: 0.6rem; border-radius: 999px; border: 1px solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); font: 600 12px / 1 var(--type-label-family); white-space: nowrap; }
.tb-tags .tb-tag { border-color: rgb(255 255 255 / 0.4); background: rgb(255 255 255 / 0.78); color: #0e0e12; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 11px; block-size: 1.45rem; padding-inline: 0.5rem; }
.tb-tag--free { color: #047857; }
.tb-tags .tb-tag--free { color: #047857; }
.tb-tag--paid, .tb-tag--free-start { color: var(--color-text); }
.tb-tag--works { font-weight: 500; white-space: normal; block-size: auto; min-block-size: 1.6rem; padding-block: 0.25rem; }
.tb-tag--works small { color: var(--color-text-muted); font-weight: 600; }
.tb-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }

/* The save button sits over the tile's corner, as the Design tab's plus does. */
.tb-card { position: relative; }
.tb-save { position: absolute; inset-block-start: 0.55rem; inset-inline-end: 0.55rem; z-index: 2; }
.tb-card .dz-card__name small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; line-height: 1.45; }

/* The item page under the panel: the prompt to try, when to use it, notes; the aside: learn, source, checked. */
.tb-view { margin-block-end: 0.5rem; }
.tb-main { display: grid; gap: 1.75rem; align-content: start; }
.tb-try h2, .tb-use h2 { margin: 0 0 0.35rem; font: 650 1.2rem / 1.2 var(--type-display-family); letter-spacing: -0.01em; }
.tb-try__lead { margin: 0 0 0.75rem; color: var(--color-text-muted); font-size: 14.5px; }
.tb-try .dz-code pre { white-space: pre-wrap; padding-block-start: 1.1rem; padding-inline-end: 6.5rem; font: 400 15px / 1.65 var(--type-body-family); }
.tb-try .dz-code code { font: inherit; }
.tb .dz-search svg { inline-size: 18px; block-size: 18px; flex: none; color: var(--color-text-muted); }
.tb-try .dz-code > .dz-btn { position: absolute; inset-block-start: 0.6rem; inset-inline-end: 0.6rem; z-index: 1; min-block-size: 2.1rem; padding-inline: 0.8rem; font-size: 13px; }
.tb-use ul { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.tb-use li { position: relative; padding-inline-start: 1.6rem; color: var(--color-text); font-size: 15.5px; line-height: 1.55; }
.tb-use li::before { content: ""; position: absolute; inset-inline-start: 0.2rem; inset-block-start: 0.55rem; inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; background: var(--color-text-brand); }
.tb-note { margin: 0; padding: 0.9rem 1.1rem; border-radius: 14px; background: var(--color-surface-sunken); color: var(--color-text); font-size: 14.5px; line-height: 1.6; }
.tb-aside { display: grid; gap: 1rem; align-content: start; }
.tb-learn { display: grid; gap: 0.4rem; padding: 1rem 1.1rem; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); }
.tb-learn__label { margin: 0; color: var(--color-text-muted); font: 600 12.5px / 1.3 var(--type-label-family); }
.tb-source { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border: 1px solid var(--color-border); border-radius: 16px; background: var(--color-surface); color: var(--color-text); text-decoration: none; transition: border-color 0.15s ease; }
.tb-source:hover { border-color: var(--color-border-strong); }
.tb-source > span { display: grid; flex: 1; min-inline-size: 0; }
.tb-source small { overflow: hidden; color: var(--color-text-muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.tb-source svg, .tb-icon { inline-size: 18px; block-size: 18px; flex: none; }
[dir="rtl"] .tb-source > svg:last-child { transform: scaleX(-1); }

.tool-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0; color: var(--color-text-muted); font: 400 14px / 1.55 var(--type-body-family); }
.tool-check svg { inline-size: 18px; block-size: 18px; flex: none; margin-block-start: 0.1rem; color: var(--color-text-brand); }
.tool-check strong { color: var(--color-text); font-weight: 600; }
.tool-learn { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; color: var(--color-text-muted); font: 500 13px / 1.3 var(--type-body-family); }
.tool-learn svg { inline-size: 15px; block-size: 15px; flex: none; }
.tool-learn--open, .tool-learn--owned { color: var(--color-text-brand); }

@media (prefers-reduced-motion: reduce) { .tb-win { transition: none; } .dz-card__open:hover .tb-win { transform: none; } }
