/* Technologies directory — scoped to .page-technologies only.
   Uses homepage (--th-*) tokens; does not alter header/footer. */

.page-technologies {
    --th-bg: #ffffff;
    --th-bg-soft: #f4f5f7;
    --th-ink: #101828;
    --th-ink-soft: #1f2937;
    --th-muted: #5c6570;
    --th-line: #e3e8ef;
    --th-navy: #0a1a3d;
    --th-accent: #1868c9;
    --th-radius: 4px;
    --th-rail-wide: 1400px;
    --th-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --th-amber-bg: #faf6ee;
    --th-amber-ink: #5c4a28;
    background: var(--th-bg);
    color: var(--th-ink);
}

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

.page-technologies .tech-rail {
    margin-inline: auto;
}
/* Hero + search/filters: centered, limited width */
.page-technologies .tech-hero .tech-rail,
.page-technologies .tech-rail--top {
    width: min(100% - 3rem, 720px);
    max-width: 720px;
}
/* Results + suggest: full width */
.page-technologies .tech-rail--list,
.page-technologies .tech-suggest .tech-rail {
    width: calc(100% - 3rem);
    max-width: none;
}

/* —— Hero —— */
.page-technologies .tech-hero {
    background: #fff;
    padding-block: 56px 0;
}
.page-technologies .tech-hero__eyebrow {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--th-muted);
    margin: 0 0 12px;
}
.page-technologies .tech-hero__title {
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 2.4vw, 2.75rem); /* ~28–44 */
    font-weight: 700;
    line-height: 1.2;
    color: var(--th-navy);
    text-wrap: pretty;
    max-width: 22ch;
}
.page-technologies .tech-hero__lead {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--th-ink-soft);
    max-width: 42rem;
}

/* —— Toolbar —— */
.page-technologies .tech-directory {
    padding-block: 28px 64px;
}
.page-technologies .tech-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin: 0 0 8px;
}
.page-technologies .tech-search {
    position: relative;
    width: 100%;
    max-width: 560px;
}
.page-technologies .tech-search > svg {
    position: absolute;
    inset-inline-start: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--th-muted);
    pointer-events: none;
}
.page-technologies .tech-search input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    font: inherit;
    font-size: 1rem;
    color: var(--th-ink);
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: var(--th-radius);
    padding: 0 44px;
    transition: border-color 160ms var(--th-ease), box-shadow 160ms var(--th-ease);
}
.page-technologies .tech-search input:focus {
    outline: none;
    border-color: var(--th-accent);
    box-shadow: 0 0 0 3px rgba(24, 104, 201, 0.18);
}
.page-technologies .tech-search input::placeholder { color: var(--th-muted); }
.page-technologies .tech-search__clear {
    display: none;
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--th-muted);
    background: transparent;
    border: 0;
    border-radius: var(--th-radius);
    cursor: pointer;
}
.page-technologies .tech-search__clear svg { width: 18px; height: 18px; }
.page-technologies .tech-search__clear:hover { color: var(--th-ink); }
.page-technologies .tech-search__clear:focus-visible {
    outline: 2px solid var(--th-accent);
    outline-offset: 2px;
}
.page-technologies .tech-search.has-value .tech-search__clear { display: inline-flex; }

.page-technologies .tech-cat-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font: inherit;
    color: var(--th-ink);
    background: #fff;
    border: 1px solid var(--th-line);
    border-radius: 8px;
    cursor: pointer;
    text-align: right;
}
.page-technologies .tech-cat-toggle__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}
.page-technologies .tech-cat-toggle__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-muted);
}
.page-technologies .tech-cat-toggle__value {
    color: var(--th-navy);
    font-weight: 700;
    font-size: 0.9375rem;
}
/* Chevron points DOWN when closed, UP when open (dropdown) */
.page-technologies .tech-cat-toggle__chev {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--th-navy);
}
.page-technologies .tech-cat-toggle__chev svg {
    display: block;
    transition: transform 160ms ease;
}
.page-technologies .tech-cat-toggle[aria-expanded="true"] {
    border-color: var(--th-navy);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
}
.page-technologies .tech-cat-toggle[aria-expanded="true"] .tech-cat-toggle__chev svg {
    transform: rotate(180deg); /* arrow points up when open */
}
.page-technologies .tech-cat-toggle:focus-visible {
    outline: 2px solid var(--th-accent);
    outline-offset: 2px;
}
.page-technologies .tech-filters.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--th-navy);
    border-top: 0;
    border-radius: 0 0 8px 8px;
}

.page-technologies .tech-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.page-technologies .tech-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    min-height: 40px;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--th-line);
    background: #fff;
    color: var(--th-ink-soft);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 160ms var(--th-ease), border-color 160ms var(--th-ease), color 160ms var(--th-ease);
}
.page-technologies .tech-filter:hover {
    border-color: var(--th-accent);
    color: var(--th-accent);
}
.page-technologies .tech-filter:focus-visible {
    outline: 2px solid var(--th-accent);
    outline-offset: 2px;
}
.page-technologies .tech-filter.is-active {
    background: var(--th-navy);
    border-color: var(--th-navy);
    color: #fff;
}
.page-technologies .tech-filter.is-active:hover {
    color: #fff;
}
.page-technologies .tech-filter__count {
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.8;
}

.page-technologies .tech-results {
    margin: 4px 0 0;
    font-size: 0.875rem;
    color: var(--th-muted);
}

/* —— Records —— */
.page-technologies .tech-list {
    border-top: 1px solid var(--th-line);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 768px) {
    .page-technologies .tech-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
        border-top: 0;
    }
    .page-technologies .tech-profile {
        border-top: 1px solid var(--th-line);
        border-bottom: 0;
    }
}
@media (min-width: 1100px) {
    .page-technologies .tech-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 28px;
    }
}
.page-technologies .tech-profile {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--th-line);
    border-radius: 0;
    padding: 28px 0;
    margin: 0;
    scroll-margin-top: calc(68px + 12px);
}
.page-technologies .tech-profile.is-hidden { display: none; }

.page-technologies .tech-profile__head {
    display: block;
    margin: 0 0 16px;
}
.page-technologies .tech-profile__id {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.page-technologies .tech-profile__logo {
    width: 100px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 4px;
    box-sizing: border-box;
    border-radius: 5px;
    overflow: hidden;
}
/* Dark card for logos with white/light marks (e.g. JP Motion) */
.page-technologies .tech-profile__logo--on-dark,
.page-technologies .tech-profile__logo:has(img[src*="jpmotion"]),
.page-technologies .tech-profile__logo:has(img[src*="irp-systems"]),
.page-technologies .tech-profile__logo:has(img[src*="algolion"]),
.page-technologies .tech-profile__logo:has(img[src*="aviv-cems"]),
.page-technologies .tech-profile__logo:has(img[src*="enervibe"]),
.page-technologies .tech-profile__logo:has(img[src*="saverone"]),
.page-technologies .tech-profile__logo:has(img[src*="bright-way-vision"]),
.page-technologies .tech-profile__logo:has(img[src*="opsys-tech"]),
.page-technologies .tech-profile__logo:has(img[src*="newsight-imaging"]),
.page-technologies .tech-profile__logo:has(img[src*="c2a-security"]),
.page-technologies .tech-profile__logo:has(img[src*="aquarius-engines"]),
.page-technologies .tech-profile__logo:has(img[src*="corractions"]),
.page-technologies .tech-profile__logo:has(img[src*="eye-net-mobile"]),
.page-technologies .tech-profile__logo:has(img[src*="cognata"]),
.page-technologies .tech-profile__logo:has(img[src*="arbe-robotics"]),
.page-technologies .tech-profile__logo:has(img[src*="adasky"]),
.page-technologies .tech-profile__logo:has(img[src*="trieye"]),
.page-technologies .tech-profile__logo:has(img[src*="lidwave"]),
.page-technologies .tech-profile__logo:has(img[src*="namiir"]) {
    background: #0b1220; /* midnight — keeps white/light wordmarks readable */
    padding: 0; /* logo asset already includes navy padding */
    border-radius: 5px;
    overflow: hidden;
}
.page-technologies .tech-profile__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.page-technologies .tech-profile__logo-fallback {
    display: flex;
    color: var(--th-accent);
}
.page-technologies .tech-profile__logo-fallback svg {
    width: 28px;
    height: 28px;
}
.page-technologies .tech-profile__who { min-width: 0; flex: 1; }
.page-technologies .tech-profile__name {
    margin: 0 0 6px;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--th-navy);
}
.page-technologies .tech-profile__alias {
    font-weight: 500;
    color: var(--th-muted);
    font-size: 0.75em;
    margin-inline-start: 0.35em;
}
.page-technologies .tech-profile__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 0.875rem;
    color: var(--th-muted);
}
.page-technologies .tech-profile__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    color: var(--th-accent);
    font-weight: 600;
    text-decoration: none;
}
.page-technologies .tech-profile__link:hover { text-decoration: underline; }
.page-technologies .tech-profile__link svg {
    width: 12px;
    height: 12px;
    transform: scaleX(-1);
}
.page-technologies .tech-profile__category {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-navy);
    background: var(--th-bg-soft);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.page-technologies .tech-profile__lead {
    margin: 0 0 16px;
    max-width: none;
    font-size: 1.0625rem; /* ~17 */
    line-height: 1.65;
    color: var(--th-ink-soft);
}

.page-technologies .tech-profile__compare {
    background: transparent;
    border: 0;
    border-inline-start: 2px solid var(--th-line);
    border-radius: 0;
    padding: 0;
    padding-inline-start: 14px;
    margin: 0 0 16px;
    max-width: none;
}
.page-technologies .tech-profile__compare-title {
    display: block;
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--th-muted);
}
.page-technologies .tech-profile__compare-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--th-ink);
}
.page-technologies .tech-profile__compare-text strong {
    color: var(--th-navy);
    font-weight: 700;
}

.page-technologies .tech-profile__status {
    display: block;
    margin: 0;
    max-width: none;
    padding: 12px 14px;
    background: var(--th-amber-bg);
    border: 0;
    border-radius: var(--th-radius);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--th-amber-ink);
}

/* —— Empty —— */
.page-technologies .tech-empty {
    display: none;
    padding: 40px 0;
    text-align: right;
}
.page-technologies .tech-empty.is-visible {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.page-technologies .tech-empty__text {
    margin: 0;
    font-size: 1rem;
    color: var(--th-ink-soft);
}
.page-technologies .tech-empty[hidden] { display: none !important; }

/* —— Suggest band —— */
.page-technologies .tech-suggest {
    background: var(--th-bg-soft);
    padding-block: 48px;
}
.page-technologies .tech-suggest__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.page-technologies .tech-suggest__copy {
    flex: 1;
    min-width: 0;
    max-width: 36rem;
}
.page-technologies .tech-suggest__copy h2 {
    margin: 0 0 10px;
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: var(--th-navy);
}
.page-technologies .tech-suggest__copy p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--th-ink-soft);
}
.page-technologies .tech-suggest__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}
.page-technologies .tech-suggest .th-btn {
    min-height: 48px;
}

/* Kill old hero/cta bleed on this page if any leftover classes appear */
.page-technologies .hero--compact::before { display: none !important; }
.page-technologies .section--raised { background: transparent; }

@media (max-width: 900px) {
    .page-technologies .tech-hero .tech-rail,
    .page-technologies .tech-rail--top {
        width: calc(100% - 2.75rem);
        max-width: none;
    }
    .page-technologies .tech-rail--list,
    .page-technologies .tech-suggest .tech-rail {
        width: calc(100% - 2.75rem);
    }
    .page-technologies .tech-hero {
        padding-block: 36px 0;
    }
    .page-technologies .tech-hero__title {
        font-size: clamp(1.75rem, 6vw, 2.125rem); /* 28–34 */
        max-width: none;
    }
    .page-technologies .tech-directory {
        padding-block: 24px 48px;
    }
    .page-technologies .tech-rail {
        width: min(100% - 2.75rem, var(--th-rail-wide)); /* ~22px side */
    }
    .page-technologies .tech-search { max-width: none; }

    .page-technologies .tech-cat-toggle { display: flex; }
    .page-technologies .tech-filters.is-open .tech-filter {
        border-radius: 6px;
        width: 100%;
        box-sizing: border-box;
        justify-content: space-between;
    }

    .page-technologies .tech-filters {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .page-technologies .tech-filters.is-open {
        display: flex;
        margin-top: -16px; /* cancel toolbar gap — attach to toggle */
    }
    .page-technologies .tech-toolbar {
        gap: 12px;
    }
    .page-technologies .tech-filter {
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
    }

    .page-technologies .tech-profile { padding: 28px 0; }
    .page-technologies .tech-profile__logo {
        width: 72px;
        height: 40px;
    }
    .page-technologies .tech-profile__name { font-size: 1.25rem; }
    .page-technologies .tech-profile__lead {
        font-size: 1rem;
        max-width: none;
    }
    .page-technologies .tech-profile__compare,
    .page-technologies .tech-profile__status {
        max-width: none;
    }
    .page-technologies .tech-profile__compare-text br { display: none; }

    .page-technologies .tech-suggest {
        padding-block: 40px;
    }
    .page-technologies .tech-suggest__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .page-technologies .tech-suggest__actions {
        flex-direction: column;
    }
    .page-technologies .tech-suggest .th-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-technologies .tech-rail {
        width: calc(100% - 2.5rem); max-width: none;
    }
}
