.hdv2-home-legacy.hdv2-cert-page {
    padding-bottom: 3rem;
}

.hdv2-cert-hero {
    padding: 2.25rem 0 1.35rem;
    border-bottom: 1px solid var(--hdv2-home-border);
}

.hdv2-cert-hero__eyebrow {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hdv2-home-primary);
}

.hdv2-cert-hero__title {
    margin: 0 0 0.55rem;
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--hdv2-home-text-strong);
}

.hdv2-cert-hero__lead {
    margin: 0;
    max-width: 40rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--hdv2-home-muted);
}

.hdv2-cert-main {
    padding: 1.75rem 0 0;
}

.hdv2-cert-intro {
    text-align: center;
    margin-bottom: 1.75rem;
}

.hdv2-cert-intro__title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin: 0 0 0.75rem;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    font-weight: 700;
    color: var(--hdv2-home-text-strong);
}

.hdv2-cert-intro__icon {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--hdv2-home-primary);
}

.hdv2-cert-intro__icon svg {
    width: 100%;
    height: 100%;
}

.hdv2-cert-intro__lead {
    margin: 0 auto;
    max-width: 42rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--hdv2-home-muted);
}

.hdv2-cert-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.hdv2-cert-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 1rem 1.05rem;
    border: 1px solid var(--hdv2-home-border);
    border-radius: 0.85rem;
    background: var(--hdv2-home-surface);
    box-shadow: var(--hdv2-home-shadow-card);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hdv2-cert-card:hover {
    border-color: color-mix(in srgb, var(--hdv2-home-primary) 45%, var(--hdv2-home-border));
}

.hdv2-cert-card.is-active {
    border-color: var(--hdv2-home-primary);
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hdv2-home-primary) 25%, transparent);
}

.hdv2-cert-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    border-radius: 0.75rem;
    background: var(--hdv2-home-primary);
    color: #fff;
}

.hdv2-cert-card__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.hdv2-cert-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.hdv2-cert-card__title {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--hdv2-home-text-strong);
}

.hdv2-cert-card.is-active .hdv2-cert-card__title {
    color: var(--hdv2-home-primary);
}

.hdv2-cert-card__desc {
    font-size: 0.84rem;
    line-height: 1.45;
    color: var(--hdv2-home-muted);
}

.hdv2-cert-card__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 1.5px solid var(--hdv2-home-border);
    color: transparent;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hdv2-cert-card__check svg {
    width: 0.8rem;
    height: 0.8rem;
}

.hdv2-cert-card.is-active .hdv2-cert-card__check {
    background: var(--hdv2-home-primary);
    border-color: var(--hdv2-home-primary);
    color: #fff;
}

.hdv2-cert-viewer {
    border: 1px solid var(--hdv2-home-border);
    border-radius: 0.95rem;
    background: var(--hdv2-home-surface);
    box-shadow: var(--hdv2-home-shadow-card);
    overflow: hidden;
}

.hdv2-cert-viewer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--hdv2-home-border);
    background: color-mix(in srgb, var(--hdv2-home-muted) 6%, var(--hdv2-home-surface));
}

.hdv2-cert-viewer__title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--hdv2-home-text-strong);
}

.hdv2-cert-viewer__title-icon {
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--hdv2-home-primary);
}

.hdv2-cert-viewer__title-icon svg {
    width: 100%;
    height: 100%;
}

.hdv2-cert-viewer__actions {
    display: flex;
    gap: 0.55rem;
}

.hdv2-cert-viewer__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: 0.55rem;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hdv2-cert-viewer__btn svg {
    width: 0.95rem;
    height: 0.95rem;
}

.hdv2-cert-viewer__btn--primary {
    background: var(--hdv2-home-primary);
    color: #fff;
}

.hdv2-cert-viewer__btn--primary:hover {
    transform: translateY(-1px);
}

.hdv2-cert-viewer__btn--secondary {
    background: var(--hdv2-home-surface);
    color: var(--hdv2-home-primary);
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 35%, var(--hdv2-home-border));
}

.hdv2-cert-viewer__btn--secondary:hover {
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
}

.hdv2-cert-viewer__body {
    background: #525659;
}

.hdv2-cert-viewer__canvas {
    overflow: auto;
    min-height: 28rem;
    height: 75vh;
    padding: 1.25rem;
    text-align: center;
}

.hdv2-cert-viewer__canvas canvas {
    display: block;
    margin: 0 auto 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-radius: 0.25rem;
}

.hdv2-cert-viewer__loading,
.hdv2-cert-viewer__error {
    color: #fff;
    padding: 2.5rem 1rem;
    font-size: 0.95rem;
}

.hdv2-cert-viewer__spinner {
    display: block;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto 0.85rem;
    animation: hdv2-cert-spin 1s linear infinite;
}

.hdv2-cert-viewer__spinner svg {
    width: 100%;
    height: 100%;
}

.hdv2-cert-viewer__error-icon {
    display: block;
    width: 2rem;
    height: 2rem;
    margin: 0 auto 0.75rem;
}

.hdv2-cert-viewer__error a {
    color: #93c5fd;
}

@keyframes hdv2-cert-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .hdv2-cert-selector {
        grid-template-columns: 1fr;
    }

    .hdv2-cert-viewer__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hdv2-cert-viewer__actions {
        width: 100%;
    }

    .hdv2-cert-viewer__btn {
        flex: 1;
        justify-content: center;
    }

    .hdv2-cert-viewer__canvas {
        min-height: 20rem;
        height: 65vh;
    }
}

.hdv2-home-legacy.hdv2-cert-page {
    padding-bottom: 4.5rem;
    background: var(--hdv2-home-bg);
}

.hdv2-cert-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0;
    border-bottom: 1px solid var(--hdv2-home-border);
    background: var(--hdv2-home-surface);
}

.hdv2-cert-hero::before {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(color-mix(in srgb, var(--hdv2-home-border) 45%, transparent) 1px, transparent 1px),
        linear-gradient(90deg, color-mix(in srgb, var(--hdv2-home-border) 45%, transparent) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    content: "";
    opacity: 0.15;
    mask-image: linear-gradient(90deg, transparent 35%, #000 82%, transparent);
}

.hdv2-cert-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 0.72fr);
    align-items: center;
    gap: 5rem;
}

.hdv2-cert-hero__copy {
    max-width: 42rem;
}

.hdv2-cert-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 25%, var(--hdv2-home-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--hdv2-home-primary) 7%, var(--hdv2-home-surface));
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.hdv2-cert-hero__eyebrow span,
.hdv2-cert-hero__eyebrow svg {
    width: 1rem;
    height: 1rem;
}

.hdv2-cert-hero__title {
    max-width: 36rem;
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 5vw, 4.35rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.hdv2-cert-hero__lead {
    max-width: 38rem;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.7;
}

.hdv2-cert-hero__standards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.65rem;
}

.hdv2-cert-hero__standards span {
    display: inline-flex;
    align-items: center;
    min-height: 2.15rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--hdv2-home-border);
    border-radius: 0.6rem;
    background: var(--hdv2-home-surface);
    box-shadow: 0 0.35rem 1rem rgba(15, 23, 42, 0.04);
    color: var(--hdv2-home-text-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.hdv2-cert-hero__visual {
    display: flex;
    justify-content: center;
    perspective: 70rem;
}

.hdv2-cert-hero__document {
    position: relative;
    width: min(100%, 19rem);
    aspect-ratio: 0.78;
    padding: 2rem;
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 20%, var(--hdv2-home-border));
    border-radius: 0.8rem;
    background: var(--hdv2-home-surface);
    box-shadow: 1.25rem 1.5rem 0 color-mix(in srgb, var(--hdv2-home-primary) 7%, transparent), 0 1.5rem 4rem rgba(15, 23, 42, 0.13);
    transform: rotate(3deg);
}

.hdv2-cert-hero__document::after {
    position: absolute;
    inset: 0.7rem;
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 20%, var(--hdv2-home-border));
    border-radius: 0.45rem;
    content: "";
    pointer-events: none;
}

.hdv2-cert-hero__document-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hdv2-cert-hero__document-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.65rem;
    background: var(--hdv2-home-primary);
    color: #fff;
}

.hdv2-cert-hero__document-mark svg {
    width: 1.55rem;
    height: 1.55rem;
}

.hdv2-cert-hero__document-lines {
    display: grid;
    gap: 0.45rem;
    width: 6.5rem;
}

.hdv2-cert-hero__document-lines i,
.hdv2-cert-hero__document-title,
.hdv2-cert-hero__document-line {
    display: block;
    height: 0.42rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hdv2-home-muted) 22%, transparent);
}

.hdv2-cert-hero__document-lines i:last-child {
    width: 72%;
    margin-left: auto;
}

.hdv2-cert-hero__document-title {
    position: relative;
    z-index: 1;
    width: 75%;
    height: 0.8rem;
    margin: 4.25rem auto 1.5rem;
    background: color-mix(in srgb, var(--hdv2-home-primary) 48%, transparent);
}

.hdv2-cert-hero__document-line {
    position: relative;
    z-index: 1;
    width: 88%;
    margin: 0.75rem auto;
}

.hdv2-cert-hero__document-line--short {
    width: 62%;
}

.hdv2-cert-hero__seal {
    position: absolute;
    z-index: 1;
    bottom: 3rem;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 30%, var(--hdv2-home-border));
    border-radius: 50%;
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
    color: var(--hdv2-home-primary);
    transform: translateX(-50%);
}

.hdv2-cert-hero__seal svg {
    width: 2.7rem;
    height: 2.7rem;
}

.hdv2-cert-main {
    padding: 3.5rem 0 0;
}

.hdv2-cert-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    max-width: 48rem;
    margin: 0 0 2rem;
    text-align: left;
}

.hdv2-cert-intro__icon {
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    min-width: 3.25rem;
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--hdv2-home-primary) 9%, var(--hdv2-home-surface));
}

.hdv2-cert-intro__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.hdv2-cert-intro__title {
    display: block;
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.hdv2-cert-intro__lead {
    max-width: 44rem;
    margin: 0;
}

.hdv2-cert-workspace {
    display: grid;
    grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.hdv2-cert-workspace__selector {
    position: sticky;
    top: 1.25rem;
}

.hdv2-cert-selector {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0;
    padding: 0.65rem;
    border: 1px solid var(--hdv2-home-border);
    border-radius: 1rem;
    background: var(--hdv2-home-surface);
    box-shadow: var(--hdv2-home-shadow-card);
}

.hdv2-cert-card {
    gap: 0.75rem;
    padding: 0.75rem;
    border-color: transparent;
    border-radius: 0.75rem;
    box-shadow: none;
}

.hdv2-cert-card:hover {
    border-color: var(--hdv2-home-border);
    background: color-mix(in srgb, var(--hdv2-home-muted) 5%, var(--hdv2-home-surface));
}

.hdv2-cert-card.is-active {
    border-color: color-mix(in srgb, var(--hdv2-home-primary) 25%, var(--hdv2-home-border));
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
    box-shadow: inset 0.2rem 0 0 var(--hdv2-home-primary);
}

.hdv2-cert-card__icon {
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    border: 1px solid color-mix(in srgb, var(--hdv2-home-primary) 22%, var(--hdv2-home-border));
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
    color: var(--hdv2-home-primary);
}

.hdv2-cert-card.is-active .hdv2-cert-card__icon {
    background: var(--hdv2-home-primary);
    color: #fff;
}

.hdv2-cert-card__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hdv2-cert-card__title {
    font-size: 0.88rem;
}

.hdv2-cert-card__desc {
    overflow: hidden;
    font-size: 0.73rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdv2-cert-card__check {
    width: 1.15rem;
    height: 1.15rem;
}

.hdv2-cert-viewer {
    border-radius: 1rem;
}

.hdv2-cert-viewer__head {
    min-height: 4.6rem;
    padding: 0.9rem 1.15rem;
    background: var(--hdv2-home-surface);
}

.hdv2-cert-viewer__title {
    font-size: 0.95rem;
}

.hdv2-cert-viewer__title-icon {
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0.5rem;
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--hdv2-home-primary) 8%, var(--hdv2-home-surface));
}

.hdv2-cert-viewer__btn {
    min-height: 2.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.hdv2-cert-viewer__body {
    background: #e7e9ed;
}

.hdv2-cert-viewer__canvas {
    height: min(76vh, 52rem);
    min-height: 36rem;
    padding: 1.75rem;
}

.hdv2-cert-viewer__canvas canvas {
    max-width: 100%;
    height: auto !important;
    margin-bottom: 1.75rem;
    border-radius: 0.2rem;
    box-shadow: 0 0.75rem 2.25rem rgba(15, 23, 42, 0.18);
}

.hdv2-cert-viewer__loading,
.hdv2-cert-viewer__error {
    color: #334155;
}

.hdv2-cert-viewer__error a {
    color: var(--hdv2-home-primary);
}

@media (max-width: 960px) {
    .hdv2-cert-hero {
        padding: 3.5rem 0;
    }

    .hdv2-cert-hero__inner {
        grid-template-columns: minmax(0, 1fr) 15rem;
        gap: 2.5rem;
    }

    .hdv2-cert-hero__document {
        padding: 1.5rem;
    }

    .hdv2-cert-workspace {
        grid-template-columns: 1fr;
    }

    .hdv2-cert-workspace__selector {
        position: static;
    }

    .hdv2-cert-selector {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hdv2-cert-hero {
        padding: 2.75rem 0;
    }

    .hdv2-cert-hero__inner {
        grid-template-columns: 1fr;
    }

    .hdv2-cert-hero__visual {
        display: none;
    }

    .hdv2-cert-hero__title {
        font-size: clamp(2.25rem, 13vw, 3.25rem);
    }

    .hdv2-cert-main {
        padding-top: 2.25rem;
    }

    .hdv2-cert-intro {
        gap: 0.8rem;
    }

    .hdv2-cert-intro__icon {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
    }

    .hdv2-cert-selector {
        display: flex;
        overflow-x: auto;
        flex-direction: row;
        gap: 0.55rem;
        padding: 0.55rem;
        scroll-snap-type: x mandatory;
    }

    .hdv2-cert-card {
        min-width: 15rem;
        scroll-snap-align: start;
    }

    .hdv2-cert-viewer__head {
        align-items: stretch;
    }

    .hdv2-cert-viewer__title {
        width: 100%;
    }

    .hdv2-cert-viewer__canvas {
        height: 65vh;
        min-height: 24rem;
        padding: 0.75rem;
    }
}
