:root {
    --cert-blue: #3f73ee;
    --cert-blue-deep: #1e58d4;
    --cert-ink: #202124;
    --cert-muted: #667085;
    --cert-red: #c50000;
    --cert-line: #d8dde8;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: var(--cert-ink); }
button, input { font: inherit; }

.cert-query-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #3d75ef 0, #79a1f4 42%, #f7f9ff 100%);
}

.cert-query-shell {
    width: min(100%, 1180px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 46px 42px 88px;
}

.cert-brand {
    width: min(100%, 860px);
    min-height: 108px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    color: #07528e;
}

.cert-brand-logo {
    width: 116px;
    height: 74px;
    flex: none;
    display: block;
    object-fit: contain;
}

.cert-brand-copy strong {
    display: block;
    font-size: clamp(26px, 4.1vw, 48px);
    line-height: 1.15;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cert-brand-copy small {
    display: block;
    margin-top: 7px;
    font-size: clamp(10px, 1.5vw, 17px);
    letter-spacing: 1.2px;
}

.cert-card {
    width: min(100%, 860px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(30, 72, 160, .18);
}

.cert-card h1 {
    margin: 0;
    padding: 35px 24px;
    color: #fff;
    background: var(--cert-blue);
    text-align: center;
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.2;
    font-weight: 400;
}

.cert-card-body { padding: 34px 42px 40px; }
.cert-summary { margin: 0 0 30px; }

.cert-summary div {
    display: grid;
    grid-template-columns: 135px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 0;
    font-size: 24px;
    line-height: 1.55;
}

.cert-summary dt { color: var(--cert-muted); letter-spacing: 5px; white-space: nowrap; }
.cert-summary dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.cert-form { margin-top: 4px; }

.cert-field {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 0 24px;
    color: var(--cert-muted);
    font-size: 24px;
    line-height: 1.3;
}

.cert-field > span,
.cert-captcha-field > label span { letter-spacing: 2px; white-space: nowrap; }

.cert-field input {
    width: 100%;
    min-width: 0;
    height: 66px;
    padding: 0 20px;
    border: 1px solid var(--cert-line);
    border-radius: 10px;
    outline: none;
    color: var(--cert-ink);
    background: #fff;
    font-size: 22px;
    transition: border-color .18s, box-shadow .18s;
}

.cert-field input::placeholder { color: #c6cad4; }
.cert-field input:focus { border-color: var(--cert-blue); box-shadow: 0 0 0 4px rgba(63, 115, 238, .12); }

.cert-captcha-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 16px;
}

.cert-captcha-image {
    height: 66px;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    color: #0d4d31;
    background:
        linear-gradient(12deg, transparent 42%, rgba(33, 71, 37, .15) 43%, transparent 45%),
        linear-gradient(-10deg, transparent 50%, rgba(65, 37, 14, .13) 51%, transparent 54%),
        #fbfcf8;
    font: 800 30px/1.1 Georgia, serif;
    letter-spacing: 13px;
    text-shadow: 2px 1px 1px rgba(82, 40, 22, .25);
    transform: rotate(var(--captcha-turn, -1deg));
}

.cert-query-button {
    width: 100%;
    height: 76px;
    margin: 14px 0 0;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--cert-blue);
    font-size: 28px;
    cursor: pointer;
    transition: background .18s, transform .18s;
}

.cert-query-button:hover { background: var(--cert-blue-deep); }
.cert-query-button:active { transform: translateY(1px); }
.cert-message { min-height: 26px; margin: 14px 0 0; text-align: center; color: var(--cert-red); font-size: 17px; }
.cert-message.is-loading { color: var(--cert-blue-deep); }
.cert-warning, .cert-tip { margin: 5px 0 0; text-align: center; line-height: 1.7; }
.cert-warning { color: var(--cert-red); font-size: 20px; }
.cert-tip { color: #777; font-size: 19px; }
.cert-footer { padding: 48px 20px 0; color: rgba(69, 81, 105, .58); text-align: center; font-size: 18px; }

.pdf-result-body { min-height: 100vh; background: #e9edf2; }

.pdf-toolbar {
    min-height: 70px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 11px max(18px, calc((100% - 1120px) / 2));
    color: #fff;
    background: #1f2937;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}

.pdf-toolbar > div { min-width: 0; }
.pdf-toolbar strong, .pdf-toolbar span { display: block; }
.pdf-toolbar strong { font-size: 18px; line-height: 1.35; }

.pdf-toolbar span {
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-back {
    width: 42px;
    height: 42px;
    flex: none;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    font: 300 38px/1 Arial, sans-serif;
}

.pdf-back:hover { background: rgba(255, 255, 255, .12); }
.pdf-viewer-shell { width: min(100%, 1144px); min-height: calc(100vh - 70px); margin: 0 auto; padding: 22px 12px 50px; }
.pdf-status { min-height: 220px; display: grid; place-items: center; color: #64748b; text-align: center; font-size: 16px; }
.pdf-status[hidden] { display: none; }
.pdf-status.is-error { color: #b91c1c; }
.pdf-viewer { width: 100%; }

.pdf-page {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 18px rgba(35, 46, 60, .18);
}

.pdf-page canvas { display: block; max-width: 100%; height: auto !important; }

@media (max-width: 700px) {
    .cert-query-shell { padding: 25px 18px 64px; }
    .cert-brand { min-height: 86px; margin-bottom: 18px; gap: 11px; }
    .cert-brand-logo { width: 71px; height: 48px; }
    .cert-brand-copy { min-width: 0; }
    .cert-brand-copy strong { font-size: clamp(19px, 6.1vw, 28px); letter-spacing: 0; white-space: normal; }
    .cert-brand-copy small { font-size: 7px; letter-spacing: .4px; }
    .cert-card { border-radius: 11px; }
    .cert-card h1 { padding: 25px 18px; font-size: 29px; }
    .cert-card-body { padding: 24px 21px 29px; }
    .cert-summary { margin-bottom: 22px; }
    .cert-summary div { grid-template-columns: 105px minmax(0, 1fr); gap: 3px; padding: 8px 0; font-size: 17px; }
    .cert-summary dt { letter-spacing: 2px; }
    .cert-field { grid-template-columns: 118px minmax(0, 1fr); gap: 5px; margin-bottom: 18px; font-size: 17px; }
    .cert-field input { height: 55px; padding: 0 13px; border-radius: 7px; font-size: 17px; }
    .cert-captcha-control { grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
    .cert-captcha-image { height: 55px; font-size: 21px; letter-spacing: 7px; }
    .cert-query-button { height: 60px; margin-top: 9px; font-size: 23px; }
    .cert-message { min-height: 23px; margin-top: 9px; font-size: 14px; }
    .cert-warning, .cert-tip { font-size: 15px; }
    .cert-footer { padding-top: 35px; font-size: 14px; }
    .pdf-toolbar { min-height: 62px; padding: 9px 12px; }
    .pdf-toolbar strong { font-size: 16px; }
    .pdf-back { width: 38px; height: 38px; }
    .pdf-viewer-shell { min-height: calc(100vh - 62px); padding: 8px 0 24px; }
    .pdf-page { margin-bottom: 8px; box-shadow: none; }
}

@media (max-width: 390px) {
    .cert-query-shell { padding-inline: 12px; }
    .cert-card-body { padding-inline: 15px; }
    .cert-summary div { grid-template-columns: 94px minmax(0, 1fr); font-size: 15px; }
    .cert-field { grid-template-columns: 105px minmax(0, 1fr); font-size: 15px; }
    .cert-captcha-control { grid-template-columns: minmax(0, 1fr) 98px; }
    .cert-captcha-image { font-size: 18px; letter-spacing: 5px; }
}
