/* ============================================================================
   th-tools.css — tools & partners page + tool modal body
   Binds tokens.css only. Zero raw brand hex.
   ============================================================================ */

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.th-tools-intro {
    margin: 0 0 1.2rem;
    max-width: 62ch;
    color: var(--gray);
    font-size: clamp(.95rem, 1.15vw, 1.05rem);
    line-height: 1.75;
}

.th-tools-cat { margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.th-tools-cat:last-of-type { margin-bottom: 0; }

.th-tools-cat-intro {
    margin: .4rem 0 1.4rem;
    max-width: 62ch;
    color: var(--gray);
    font-size: clamp(.92rem, 1.1vw, 1.02rem);
    line-height: 1.7;
}

.th-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (min-width: 960px) {
    .th-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.th-tool-card {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    min-width: 0;
    padding: 20px 22px 22px;
    border-radius: 16px;
    background: var(--bg-2);
    border: 1px solid var(--gray-line);
    scroll-margin-top: 96px;
}
.th-tool-card:target {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-a20);
}

.th-tool-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}
.th-tool-card-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 52px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--white-pure);
    color: var(--black);
}
[data-theme="light"] .th-tool-card-mark {
    background: var(--bg-card);
    color: var(--white);
    border: 1px solid var(--gray-line);
}
.th-tool-card-mark svg {
    display: block;
    height: 28px;
    width: auto;
    max-width: 140px;
    color: inherit;
    fill: currentColor;
}
.th-tool-card-titles { min-width: 0; }
.th-tool-card-titles h3 {
    margin: 0;
    font-family: var(--font-headline);
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    letter-spacing: .01em;
    color: var(--white);
}
.th-tool-badge {
    display: inline-block;
    margin-top: 4px;
    font-family: var(--font-data);
    font-size: .62rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--blue);
}
.th-tool-badge[data-rel="partner"] { color: var(--blue); }
.th-tool-badge[data-rel="inhouse"] { color: var(--white); }

.th-tool-card-tagline {
    margin: 0;
    color: var(--white);
    font-size: .95rem;
    line-height: 1.5;
}
.th-tool-card-body {
    margin: 0;
    color: var(--gray);
    font-size: .9rem;
    line-height: 1.65;
}
.th-tool-card-link {
    margin-top: auto;
    font-family: var(--font-data);
    font-size: .68rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--blue);
    text-decoration: none;
}
.th-tool-card-link:hover,
.th-tool-card-link:focus-visible { text-decoration: underline; }

.th-tools-disclaimer {
    margin: 2.4rem 0 0;
    padding-top: 1.4rem;
    border-top: 1px solid var(--gray-line);
    color: var(--gray);
    font-size: .82rem;
    line-height: 1.65;
    max-width: 72ch;
}

.th-tool-wordmark {
    font-family: var(--font-data);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: inherit;
    white-space: nowrap;
}

/* Modal body */
.th-tool-modal-panel { width: min(640px, 100%); }
.th-tool-modal-panel h3 {
    margin: .35rem 0 .6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    letter-spacing: -.4px;
    max-width: 24ch;
}
.th-tool-modal-tagline {
    margin: 0 0 .9rem;
    color: var(--white);
    font-size: 1.02rem;
    line-height: 1.55;
}
.th-tool-modal-body {
    margin: 0 0 1.2rem;
    color: var(--gray);
    font-size: .95rem;
    line-height: 1.7;
}
.th-tool-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 .9rem;
}
.th-tool-modal-tm {
    margin: 0;
    color: var(--gray);
    font-size: .75rem;
    line-height: 1.5;
    opacity: .8;
}

@media (max-width: 700px) {
    .th-tools-grid { grid-template-columns: 1fr; }
}
