.product-certificates-guide {
    --cert-blue: #1d4ed8;
    --cert-blue-soft: #dbeafe;
    --cert-green: #047857;
    --cert-green-soft: #d1fae5;
    --cert-amber: #b45309;
    --cert-amber-soft: #fef3c7;
    --cert-rose: #be123c;
    --cert-rose-soft: #ffe4e6;
}

.product-certificates-guide .bad-disclaimer {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 18px 20px;
    margin: 0 0 26px;
    border: 1px solid rgba(180, 83, 9, 0.24);
    border-left: 5px solid var(--cert-amber);
    border-radius: 12px;
    background: var(--cert-amber-soft);
    color: #78350f;
    line-height: 1.7;
}

.product-certificates-guide .bad-disclaimer i {
    margin-top: 4px;
    color: var(--cert-amber);
}

.cert-hero-visual {
    background: var(--guide-surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    box-shadow: var(--guide-shadow);
    padding: 28px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
}

.cert-hero-visual img {
    width: min(100%, 460px);
    max-height: 300px;
    margin: 0 auto 24px;
    display: block;
    object-fit: contain;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0;
}

html[data-effective-theme] body.product-certificates-guide .cert-hero-visual img {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.cert-hero-visual figcaption {
    margin: 0;
    color: var(--guide-muted);
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.cert-lead-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
}

.cert-stat-stack {
    display: grid;
    gap: 12px;
}

.cert-stat {
    padding: 18px;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.82), rgba(209, 250, 229, 0.72));
}

.cert-stat strong {
    display: block;
    color: var(--cert-blue);
    font-size: 32px;
    line-height: 1;
    margin-bottom: 8px;
}

.cert-stat span {
    color: var(--guide-text);
    font-size: 14px;
    line-height: 1.5;
}

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

.cert-note {
    padding: 18px;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: #fff;
}

.cert-note span {
    display: inline-flex;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: var(--cert-blue-soft);
    color: var(--cert-blue);
    font-weight: 700;
    font-size: 13px;
}

.cert-note p {
    margin: 0;
    color: var(--guide-text);
    line-height: 1.75;
}

.cert-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: #fff;
}

.cert-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 0;
    font-size: 14px;
}

.cert-table th,
.cert-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--guide-border);
    text-align: left;
    vertical-align: top;
}

.cert-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: var(--guide-ink);
    font-weight: 700;
}

.cert-table tr:last-child td {
    border-bottom: 0;
}

.cert-table th:nth-child(1),
.cert-table td:first-child {
    width: 48px;
    color: var(--guide-muted);
    font-weight: 700;
}

.cert-table th:nth-child(2) {
    width: 32%;
}

.cert-table th:nth-child(3) {
    width: 220px;
}

.cert-table th:nth-child(4) {
    width: 112px;
}

.cert-table td:nth-child(4) {
    white-space: nowrap;
}

.cert-table a,
.cert-source,
.product-certificates-guide #sources a {
    color: var(--cert-blue);
    text-decoration: none;
    font-weight: 700;
}

.cert-table a:hover,
.cert-source:hover,
.product-certificates-guide #sources a:hover,
.cert-table a:focus-within,
.cert-source:focus-within,
.product-certificates-guide #sources a:focus-within{
    text-decoration: underline;
}

.cert-table .cert-product-link {
    color: var(--guide-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.cert-reg-link {
    display: block;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid rgba(29, 78, 216, 0.2);
    border-radius: 999px;
    background: var(--cert-blue-soft);
    color: var(--cert-blue);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    vertical-align: middle;
}

.cert-reg-link:hover,
.cert-reg-link:focus-within{
    background: #bfdbfe;
    text-decoration: none;
}

.cert-status-short {
    display: none;
}

.cert-section-intro {
    max-width: 900px;
    color: var(--guide-text);
    line-height: 1.8;
    margin: 0 0 20px;
}

.cert-record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.cert-record-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cert-record {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: #fff;
    min-width: 0;
}

.cert-record h3 {
    margin: 0;
    color: var(--guide-ink);
    font-size: 19px;
    line-height: 1.35;
}

.cert-number {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cert-record dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.cert-record dl div {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.cert-record dt {
    color: var(--guide-muted);
    font-size: 13px;
    font-weight: 700;
}

.cert-record dd {
    margin: 0;
    color: var(--guide-text);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.cert-record--compact p:not(.cert-number) {
    margin: 0;
    color: var(--guide-text);
    line-height: 1.7;
}

.cert-source {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.cert-source::after {
    content: "\f35d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
}

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

.cert-related-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: #fff;
    color: var(--guide-ink);
    text-decoration: none;
    min-height: 100%;
}

.cert-related-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f8fafc;
}

.cert-related-card span {
    padding: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.cert-related-card:hover span,
.cert-related-card:focus-within span{
    color: var(--cert-blue);
}

html[data-effective-theme="dark"] .product-certificates-guide {
    --guide-bg: #101820;
    --guide-surface: #17212b;
    --guide-ink: #f8fafc;
    --guide-text: #dbe3ea;
    --guide-muted: #b7c3cf;
    --guide-border: rgba(226, 232, 240, 0.16);
    background: #101820;
}

html[data-effective-theme="dark"] .product-certificates-guide .header {
    background: rgba(16, 24, 32, 0.94);
}

html[data-effective-theme="dark"] .product-certificates-guide .nav-links a {
    color: #f8fafc;
}

html[data-effective-theme="dark"] .product-certificates-guide .meridian-guide__hero-copy,
html[data-effective-theme="dark"] .product-certificates-guide .meridian-guide__panel,
html[data-effective-theme="dark"] .product-certificates-guide .cert-hero-visual,
html[data-effective-theme="dark"] .product-certificates-guide .cert-note,
html[data-effective-theme="dark"] .product-certificates-guide .cert-table-wrap,
html[data-effective-theme="dark"] .product-certificates-guide .cert-record,
html[data-effective-theme="dark"] .product-certificates-guide .cert-related-card {
    background: #17212b;
    border-color: rgba(226, 232, 240, 0.16);
}

html[data-effective-theme="dark"] .product-certificates-guide .bad-disclaimer {
    background: rgba(180, 83, 9, 0.18);
    color: #fde68a;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-table th {
    background: #1f2b36;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-number {
    background: #22303d;
    color: #e2e8f0;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-stat {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.22), rgba(4, 120, 87, 0.22));
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-note span {
    background: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-table a,
html[data-effective-theme="dark"] .product-certificates-guide .cert-source,
html[data-effective-theme="dark"] .product-certificates-guide #sources a,
html[data-effective-theme="dark"] .product-certificates-guide .cert-related-card:hover span,
html[data-effective-theme="dark"] .product-certificates-guide .cert-related-card:focus-within span{
    color: #93c5fd;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-reg-link {
    border-color: rgba(147, 197, 253, 0.28);
    background: rgba(96, 165, 250, 0.16);
    color: #bfdbfe;
}

html[data-effective-theme="dark"] .product-certificates-guide .cert-reg-link:hover,
html[data-effective-theme="dark"] .product-certificates-guide .cert-reg-link:focus-within{
    background: rgba(96, 165, 250, 0.24);
}

@media (max-width: 980px) {
    .cert-lead-grid,
    .cert-note-grid,
    .cert-record-grid,
    .cert-record-grid--compact,
    .cert-related-grid {
        grid-template-columns: 1fr;
    }

    .cert-stat-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .cert-hero-visual {
        min-height: 0;
        padding: 22px;
    }

    .cert-stat-stack {
        grid-template-columns: 1fr;
    }

    .cert-record {
        padding: 16px;
    }

    .cert-record dl div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .cert-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .cert-table {
        display: block;
        min-width: 0;
        border-collapse: separate;
        font-size: 13px;
    }

    .cert-table thead {
        display: none;
    }

    .cert-table tbody {
        display: grid;
        gap: 10px;
    }

    .cert-table tr {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) auto auto;
        gap: 8px 10px;
        align-items: center;
        padding: 13px;
        border: 1px solid var(--guide-border);
        border-radius: 12px;
        background: #fff;
    }

    .cert-table td {
        min-width: 0;
        padding: 0;
        border-bottom: 0;
    }

    .cert-table td:first-child {
        grid-column: 1;
        grid-row: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 999px;
        background: #eef6f4;
        color: var(--cert-green);
        font-size: 12px;
    }

    .cert-table td:nth-child(2) {
        grid-column: 2 / 5;
        grid-row: 1;
        align-self: center;
        font-size: 14px;
        line-height: 1.35;
    }

    .cert-table td:nth-child(3) {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .cert-table td:nth-child(4) {
        grid-column: 3;
        grid-row: 2;
        color: var(--guide-muted);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
    }

    .cert-table td:nth-child(5) {
        grid-column: 4;
        grid-row: 2;
        width: auto;
        max-width: none;
        min-width: 0;
        padding: 5px 8px;
        border-radius: 999px;
        background: #eef6f4;
        color: var(--cert-green);
        font-size: 12px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cert-status-full {
        display: none;
    }

    .cert-status-short {
        display: inline;
    }

    .cert-reg-link {
        width: 100%;
        min-height: 36px;
        padding: 8px 10px;
    }

    html[data-effective-theme="dark"] .product-certificates-guide .cert-table tr {
        background: #17212b;
        border-color: rgba(226, 232, 240, 0.16);
    }

    html[data-effective-theme="dark"] .product-certificates-guide .cert-table td:first-child {
        background: rgba(52, 211, 153, 0.14);
        color: #6ee7b7;
    }

    html[data-effective-theme="dark"] .product-certificates-guide .cert-table td:nth-child(5) {
        background: rgba(52, 211, 153, 0.14);
        color: #6ee7b7;
    }

    .cert-related-card img {
        height: 140px;
    }
}
