/* ===================================================================
   Related Tools / Other Tools (Pages/Shared/_ToolLists.cshtml)

   Scoped under .tl. Reads the site-wide --az-* tokens from tool-shell.css.
   Each card sets --tl-accent to its own A-Z letter colour; the accent is
   used for the icon tile tint, the hover border and the focus ring only,
   so text contrast never depends on it.

   The site stylesheet forces a { color: #1c1c1c !important }, which is
   why the link colours below also carry !important.
   =================================================================== */

.tl {
    --tl-ink: var(--az-ink, #10162b);
    --tl-ink-3: var(--az-ink-3, #5f677d);
    --tl-line: var(--az-line, #e8e6e3);
    --tl-surface: var(--az-surface, #ffffff);
    --tl-r: var(--az-r, 14px);

    max-width: 1120px;
    margin: 28px auto 8px;
    padding: 0 16px;
    text-align: left;
}

.tl *, .tl *::before, .tl *::after { box-sizing: border-box; }

/* style.css gives every section 60px top/bottom padding and overflow:hidden. */
.tl :where(section) { padding: 0; overflow: visible; }

.tl-section + .tl-section { margin-top: 22px; }

.tl-head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
    margin-bottom: 12px;
}

.tl .tl-title {
    margin: 0; font-size: 1.2rem; font-weight: 800; line-height: 1.25;
    color: var(--tl-ink); letter-spacing: -.01em;
}

.tl-sub { margin: 0; font-size: .86rem; color: var(--tl-ink-3); }

.tl ul { list-style: none; margin: 0; padding: 0; }

/* ---- Related: icon cards ---- */
.tl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.tl .tl-card {
    --tl-accent: var(--az-a-1, #5b8def);
    display: flex; align-items: center; gap: 10px;
    height: 100%; min-height: 60px; padding: 10px 12px;
    background: var(--tl-surface);
    border: 1px solid var(--tl-line);
    border-radius: var(--tl-r);
    color: var(--tl-ink) !important;
    text-decoration: none !important;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.tl .tl-card:hover {
    border-color: var(--tl-accent);
    box-shadow: 0 8px 20px -12px rgba(16, 22, 43, .35);
    transform: translateY(-1px);
}

.tl .tl-card:focus-visible,
.tl .tl-chip:focus-visible {
    outline: 3px solid var(--tl-accent);
    outline-offset: 2px;
}

.tl-icon {
    flex: none; display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 11px;
    background: var(--az-line-2, #f0eeeb);
    background: color-mix(in srgb, var(--tl-accent) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--tl-accent) 26%, #fff);
}
.tl-icon img { width: 26px; height: 26px; object-fit: contain; display: block; }

.tl-name {
    flex: 1; min-width: 0;
    font-size: .92rem; font-weight: 700; line-height: 1.3;
    overflow-wrap: anywhere;
}

.tl-go {
    flex: none; font-size: .8rem; color: var(--tl-ink-3);
    transition: transform .16s, color .16s;
}
.tl .tl-card:hover .tl-go { color: var(--tl-accent); transform: translateX(2px); }

/* ---- Other: compact chips ---- */
.tl-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tl .tl-chip {
    --tl-accent: var(--az-a-1, #5b8def);
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 5px 12px 5px 5px;
    background: var(--tl-surface);
    border: 1px solid var(--tl-line);
    border-radius: 999px;
    color: var(--tl-ink) !important;
    text-decoration: none !important;
    transition: border-color .16s, background-color .16s;
}
.tl .tl-chip:hover { border-color: var(--tl-accent); background: color-mix(in srgb, var(--tl-accent) 6%, #fff); }

.tl-icon-sm { width: 30px; height: 30px; border-radius: 999px; }
.tl-icon-sm img { width: 18px; height: 18px; }
.tl-chip .tl-name { font-size: .86rem; font-weight: 600; }

@media (max-width: 575px) {
    .tl { margin-top: 22px; }
    .tl-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tl .tl-card { flex-direction: column; align-items: flex-start; gap: 8px; }
    .tl-go { display: none; }
    .tl-chip .tl-name { font-size: .82rem; }
}

@media (max-width: 360px) {
    .tl-grid { grid-template-columns: 1fr; }
    .tl .tl-card { flex-direction: row; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    .tl .tl-card, .tl .tl-chip, .tl-go { transition: none; }
    .tl .tl-card:hover { transform: none; }
}
