:root {
    --color-brand: #174a9c;
    --color-accent: #f36b21;
    --color-cyan: #33c3d6;
    --color-ink: #172033;
    --color-muted: #64748b;
    --color-line: #dce5f3;
    --color-soft: #f5f8fc;
    --color-white: #fff;
    --font-sans: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    --radius-sm: 6px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
    color: var(--color-ink);
    background: #f2f5fa;
    font-family: var(--font-sans);
    line-height: 1.65;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 0%, rgba(51, 195, 214, 0.18), transparent 30%),
        radial-gradient(circle at 92% 3%, rgba(243, 107, 33, 0.14), transparent 24%),
        linear-gradient(180deg, #071735 0, #09214b 520px, #f2f5fa 1120px);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3 {
    margin: 0 0 16px;
    line-height: 1.16;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(42px, 5.6vw, 82px);
    font-weight: 900;
}

h2 {
    font-size: clamp(30px, 3.2vw, 48px);
    font-weight: 900;
}

h3 {
    font-size: 24px;
    font-weight: 850;
}

p {
    margin-top: 0;
}

.site-header,
.site-footer,
.section,
.hero,
.breadcrumbs {
    padding-left: max(24px, calc((100vw - var(--container)) / 2));
    padding-right: max(24px, calc((100vw - var(--container)) / 2));
}

.site-header {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #f8fbff;
    background:
        linear-gradient(90deg, rgba(7, 23, 53, 0.98), rgba(13, 43, 92, 0.96)),
        #071735;
    border-bottom: 1px solid rgba(209, 225, 245, 0.14);
}

.site-brand {
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-brand__logo {
    width: 184px;
    height: auto;
    max-height: 56px;
    object-fit: contain;
}

.site-brand__text {
    min-height: 34px;
    display: flex;
    align-items: center;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.site-brand small {
    color: #bcd2f1;
    font-size: 12px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.site-nav a {
    position: relative;
    color: #dbeafe;
    font-size: 14px;
    font-weight: 800;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--color-accent);
}

.site-nav a.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -10px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--color-accent);
}

.breadcrumbs {
    padding-top: 18px;
    color: #dbeafe;
    background: rgba(7, 23, 53, 0.94);
    font-size: 14px;
}

.breadcrumbs a {
    color: #91e3f0;
    font-weight: 800;
}

.breadcrumbs__sep {
    margin: 0 8px;
    color: rgba(219, 234, 254, 0.58);
}

.hero {
    position: relative;
    overflow: hidden;
    padding-top: 86px;
    padding-bottom: 90px;
    color: var(--color-white);
    background:
        linear-gradient(115deg, rgba(5, 15, 34, 0.95), rgba(15, 61, 132, 0.84)),
        #071735;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(90deg, #000 0%, transparent 78%);
}

.hero::after {
    content: "";
    position: absolute;
    top: -140px;
    right: -120px;
    width: 520px;
    height: 520px;
    border: 2px solid rgba(51, 195, 214, 0.28);
    border-radius: 50%;
    pointer-events: none;
    box-shadow:
        inset 0 0 0 68px rgba(51, 195, 214, 0.05),
        inset 0 0 0 132px rgba(255, 255, 255, 0.03);
}

.hero--compact {
    padding-top: 70px;
    padding-bottom: 76px;
}

.hero__inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.badge {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(51, 195, 214, 0.36);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: #8ee7f1;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.badge::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--color-accent);
}

.lead {
    max-width: 780px;
    color: #dbeafe;
    font-size: clamp(18px, 2vw, 22px);
}

.section {
    padding-top: 78px;
    padding-bottom: 78px;
    background: #f2f5fa;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
}

.certificate-query__grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.certificate-query__form,
.certificate-query__results {
    min-width: 0;
    border: 1px solid rgba(216, 226, 241, 0.94);
    border-radius: 18px;
    background: var(--color-white);
    box-shadow: 0 18px 50px rgba(21, 44, 80, 0.12);
}

.certificate-query__form {
    padding: 30px;
}

.certificate-query__results {
    padding: 24px;
}

.certificate-query__header {
    margin-bottom: 24px;
}

.section__kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--color-cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section__kicker::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--color-accent);
}

.section__title {
    margin-bottom: 10px;
    color: #0f2f68;
    font-size: 30px;
}

.section__lead {
    margin-bottom: 0;
    color: var(--color-muted);
}

.form-group {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    color: #1f2a44;
    font-size: 15px;
    font-weight: 850;
}

.form-required {
    color: var(--color-accent);
}

.form-group input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-line);
    border-radius: 10px;
    padding: 0 14px;
    background: #fff;
    color: var(--color-ink);
    font: inherit;
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 4px rgba(23, 74, 156, 0.12);
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    padding: 0 20px;
    color: var(--color-white);
    background: linear-gradient(135deg, var(--color-accent), #ff8f47);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(243, 107, 33, 0.18);
}

.btn--full {
    width: 100%;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.64;
}

.form-note {
    min-height: 1.4em;
    margin: 14px 0 0;
    font-weight: 800;
}

.form-note.error {
    color: #c2410c;
}

.certificate-query__empty {
    border: 1px dashed #bfd1ea;
    border-radius: 14px;
    padding: 18px;
    color: var(--color-muted);
    background: #f8fbff;
    line-height: 1.8;
}

.certificate-query__summary {
    margin-bottom: 16px;
    color: #0f2f68;
    font-weight: 900;
}

.certificate-query__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.certificate-result-card {
    overflow: hidden;
    border: 1px solid rgba(216, 226, 241, 0.94);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.certificate-result-card:hover,
.certificate-result-card:focus {
    outline: none;
    border-color: rgba(23, 74, 156, 0.42);
    box-shadow: 0 18px 46px rgba(21, 44, 80, 0.16);
    transform: translateY(-2px);
}

.certificate-result__image {
    aspect-ratio: 3 / 4;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f8fbff;
}

.certificate-result__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.certificate-result__placeholder {
    color: var(--color-muted);
    font-weight: 800;
}

.certificate-result__pdf {
    min-height: 100%;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    padding: 18px;
    color: #1f2937;
    text-align: center;
}

.certificate-result__pdf-icon {
    width: 54px;
    height: 68px;
    display: grid;
    place-items: center;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    background: #fff;
    color: #c2410c;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.certificate-result__pdf strong {
    color: #9a3412;
    font-size: 16px;
}

.certificate-result__pdf span {
    color: var(--color-muted);
    font-weight: 800;
}

.certificate-result__body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.certificate-result__body h3 {
    margin: 0;
    color: #132846;
    font-size: 18px;
}

.certificate-result__body p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.certificate-result__team {
    width: fit-content;
    border-radius: 999px;
    padding: 4px 10px;
    color: #174a9c;
    background: #eaf3ff;
    font-weight: 900;
}

.certificate-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.certificate-result__actions a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    padding: 0 12px;
    color: var(--color-brand);
    background: #fff;
    font-size: 14px;
    font-weight: 900;
}

.site-footer {
    padding-top: 18px;
    padding-bottom: 18px;
    color: #e5edf7;
    background: #071735;
}

.site-footer p {
    margin: 8px 0 0;
    color: #b7c6d9;
}

.site-footer__single-line {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.site-footer__logo {
    flex: 0 0 auto;
}

.site-footer__logo img {
    width: 154px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.site-footer__meta {
    margin-top: 0;
    color: #cbd8ea;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 900px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .site-brand {
        min-width: 0;
    }

    .site-nav {
        gap: 10px 14px;
    }

    .certificate-query__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 40px;
    }

    .site-brand__text {
        display: none;
    }

    .site-brand__logo {
        width: 160px;
    }

    .hero--compact {
        padding-top: 54px;
        padding-bottom: 58px;
    }

    .section {
        padding-top: 44px;
        padding-bottom: 48px;
    }

    .certificate-query__form,
    .certificate-query__results {
        padding: 20px;
    }

    .site-footer__single-line {
        align-items: center;
        flex-direction: column;
        gap: 10px;
    }

    .site-footer__logo img {
        width: 146px;
    }

    .site-footer__meta {
        font-size: 13px;
    }
}
