.ajd-directory,
.ajd-detail-shell {
    --ajd-bg: #FFFFFF;
    --ajd-soft-bg: #F8FAFC;
    --ajd-card: #FFFFFF;
    --ajd-border: #E2E8F0;
    --ajd-ink: #172033;
    --ajd-muted: #64748B;
    --ajd-blue: #2563EB;
    --ajd-blue-soft: #EFF6FF;
    --ajd-green-soft: #ECFDF5;
    --ajd-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
    background: #FFFFFF;
    color: var(--ajd-ink);
}

.ajd-directory *,
.ajd-detail-shell * {
    box-sizing: border-box;
}

.ajd-directory {
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    padding: clamp(20px, 4vw, 40px);
}

.ajd-directory-header {
    align-items: end;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 28px;
}

.ajd-kicker {
    color: var(--ajd-blue);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ajd-directory-header h2 {
    color: var(--ajd-ink);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.08;
    margin: 0;
}

.ajd-directory-header p {
    color: var(--ajd-muted);
    font-size: 16px;
    line-height: 1.65;
    margin: 12px 0 0;
    max-width: 760px;
}

.ajd-count {
    background: var(--ajd-blue-soft);
    border: 1px solid #BFDBFE;
    border-radius: 8px;
    min-width: 112px;
    padding: 16px;
    text-align: center;
}

.ajd-count strong {
    color: var(--ajd-blue);
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.ajd-count span {
    color: #1E40AF;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    text-transform: uppercase;
}

.ajd-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ajd-card {
    background: #FFFFFF;
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    min-height: 100%;
    overflow: hidden;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.ajd-card:hover,
.ajd-card:focus-within {
    border-color: #93C5FD;
    box-shadow: var(--ajd-shadow);
    transform: translateY(-3px);
}

.ajd-card-link {
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
}

.ajd-card-link:focus-visible,
.ajd-back-link:focus-visible,
.ajd-official-links a:focus-visible,
.ajd-page-link .page-numbers:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.36);
    outline-offset: 3px;
}

.ajd-card-top {
    align-items: flex-start;
    background:
        linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 56%, #EFF6FF 100%);
    border-bottom: 1px solid var(--ajd-border);
    display: flex;
    justify-content: space-between;
    min-height: 94px;
    padding: 18px;
}

.ajd-card-logo,
.ajd-detail-logo {
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    display: inline-flex;
    justify-content: center;
    overflow: hidden;
}

.ajd-card-logo {
    height: 58px;
    width: 58px;
}

.ajd-detail-logo {
    height: 88px;
    width: 88px;
}

.ajd-card-logo img,
.ajd-detail-logo img {
    display: block;
    height: 72%;
    object-fit: contain;
    width: 72%;
}

.ajd-card-logo b,
.ajd-detail-logo b {
    color: var(--ajd-blue);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
}

.ajd-status {
    background: var(--ajd-green-soft);
    border: 1px solid #BBF7D0;
    border-radius: 999px;
    color: #047857;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 8px 10px;
}

.ajd-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.ajd-card h3 {
    color: var(--ajd-ink);
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.ajd-card-tags,
.ajd-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ajd-card-tags span,
.ajd-hero-chips span {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 999px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
}

.ajd-card p {
    color: var(--ajd-muted);
    display: -webkit-box;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.ajd-updated {
    color: #64748B;
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.ajd-card-action {
    align-items: center;
    border-top: 1px solid var(--ajd-border);
    color: var(--ajd-blue);
    display: flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
}

.ajd-empty {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    color: var(--ajd-muted);
    margin: 0;
    padding: 18px;
}

.ajd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 32px;
}

.ajd-page-link .page-numbers {
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    color: var(--ajd-ink);
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: center;
    min-height: 40px;
    min-width: 40px;
    padding: 10px 13px;
    text-decoration: none;
}

.ajd-page-link .page-numbers.current,
.ajd-page-link .page-numbers:hover {
    background: var(--ajd-blue);
    border-color: var(--ajd-blue);
    color: #FFFFFF;
}

.ajd-detail-shell {
    padding: 36px 18px 64px;
}

.ajd-detail-wrap {
    margin: 0 auto;
    max-width: 1180px;
}

.ajd-back-link {
    color: var(--ajd-blue);
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 18px;
    text-decoration: none;
}

.ajd-detail-hero {
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 22px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: clamp(22px, 4vw, 36px);
}

.ajd-detail-copy h1 {
    color: var(--ajd-ink);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 850;
    line-height: 1.05;
    margin: 0;
}

.ajd-detail-copy > p {
    color: var(--ajd-muted);
    font-size: 16px;
    line-height: 1.7;
    margin: 14px 0 0;
    max-width: 820px;
}

.ajd-hero-chips {
    margin-top: 18px;
}

.ajd-detail-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 330px;
    margin-top: 24px;
}

.ajd-detail-main,
.ajd-detail-side {
    display: grid;
    gap: 20px;
}

.ajd-article,
.ajd-panel {
    background: #FFFFFF;
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.ajd-article {
    color: #334155;
    font-size: 17px;
    line-height: 1.78;
    padding: clamp(24px, 4vw, 42px);
}

.ajd-article > *:first-child {
    margin-top: 0;
}

.ajd-article > *:last-child {
    margin-bottom: 0;
}

.ajd-article h2,
.ajd-article h3,
.ajd-panel h2 {
    color: var(--ajd-ink);
    font-weight: 850;
    line-height: 1.18;
}

.ajd-article h2 {
    font-size: 28px;
    margin: 30px 0 12px;
}

.ajd-article h3 {
    font-size: 21px;
    margin: 22px 0 8px;
}

.ajd-article ul,
.ajd-article ol {
    padding-left: 24px;
}

.ajd-article-module {
    border-top: 1px solid var(--ajd-border);
    margin-top: 28px;
    padding-top: 24px;
}

.ajd-faq-list {
    display: grid;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ajd-faq-list li {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    color: #334155;
    line-height: 1.65;
    padding: 14px 16px;
}

.ajd-panel {
    padding: 22px;
}

.ajd-panel h2 {
    font-size: 21px;
    margin: 0 0 14px;
}

.ajd-facts {
    display: grid;
    gap: 10px;
    margin: 0;
}

.ajd-facts dt {
    color: var(--ajd-muted);
    font-size: 12px;
    font-weight: 800;
    margin-top: 10px;
    text-transform: uppercase;
}

.ajd-facts dt:first-child {
    margin-top: 0;
}

.ajd-facts dd {
    color: var(--ajd-ink);
    font-size: 16px;
    font-weight: 760;
    margin: 0;
}

.ajd-note-list,
.ajd-step-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.ajd-note-list {
    list-style: none;
}

.ajd-note-list li {
    color: #475569;
    line-height: 1.55;
    padding-left: 18px;
    position: relative;
}

.ajd-note-list li::before {
    background: var(--ajd-blue);
    border-radius: 999px;
    content: "";
    height: 7px;
    left: 0;
    position: absolute;
    top: 0.58em;
    width: 7px;
}

.ajd-step-list {
    list-style: none;
}

.ajd-step-list li {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
}

.ajd-step-list span {
    align-items: center;
    background: var(--ajd-blue);
    border-radius: 8px;
    color: #FFFFFF;
    display: inline-flex;
    font-size: 13px;
    font-weight: 850;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.ajd-step-list p {
    color: #475569;
    line-height: 1.55;
    margin: 3px 0 0;
}

.ajd-official-links {
    display: grid;
    gap: 10px;
}

.ajd-official-links a {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 8px;
    color: var(--ajd-blue);
    font-size: 14px;
    font-weight: 800;
    padding: 11px 12px;
    text-decoration: none;
}

.ajd-official-links a:hover {
    background: var(--ajd-blue-soft);
    border-color: #BFDBFE;
}

@media (prefers-reduced-motion: reduce) {
    .ajd-card {
        transition: none;
    }

    .ajd-card:hover,
    .ajd-card:focus-within {
        transform: none;
    }
}

@media (max-width: 900px) {
    .ajd-directory-header,
    .ajd-detail-hero,
    .ajd-detail-grid {
        grid-template-columns: 1fr;
    }

    .ajd-count {
        justify-self: start;
    }

    .ajd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ajd-detail-logo-wrap {
        order: -1;
    }
}

@media (max-width: 620px) {
    .ajd-directory {
        padding: 18px;
    }

    .ajd-grid {
        grid-template-columns: 1fr;
    }

    .ajd-card-top,
    .ajd-card-body {
        padding: 16px;
    }

    .ajd-detail-shell {
        padding: 24px 12px 48px;
    }

    .ajd-detail-copy h1 {
        font-size: 32px;
    }
}
