/* Public verification uses the website shell; overrides stay on this page. */
body.certificate-page {
    --paper: #fff;
    --ink: #333;
    --surface: #fff;
    --field: #fff;
    --line: #ccc;
    --muted: #666;
    --accent: #0e3e90;
    --button: #eebd2b;
    --button-ink: #171717;
    --warning: #9b4614;
    --notice: #fff8ed;
    min-width: 0;
    background: var(--paper);
    color: var(--ink);
    color-scheme: light;
}
body.certificate-page[data-theme="dark"] {
    --paper: #141d2b;
    --ink: #e6edf8;
    --surface: #1c283a;
    --field: #152134;
    --line: #46566e;
    --muted: #b3c1d6;
    --accent: #a7c7ff;
    --warning: #ffbf85;
    --notice: #352b23;
    color-scheme: dark;
}
.certificate-page ::selection { background: #c9dcff; color: #102e5e; }
.certificate-page a:focus-visible,
.certificate-page button:focus-visible,
.certificate-page input:focus-visible,
.certificate-result:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.certificate-page > header .body,
.certificate-page > footer .body {
    width: min(1600px, calc(100% - 80px));
}
.certificate-page > header .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.certificate-page > header .top .logo { flex-shrink: 1; }
.certificate-page > header .top span {
    flex-shrink: 0;
    margin-top: 0;
}
.certificate-page > header menu .body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    min-height: 50px;
}
.certificate-page > header menu i { padding: 0 clamp(12px, 2vw, 35px); color: #fff; }
.certificate-page > header .top a { color: var(--accent); }
.certificate-page > footer { color: var(--muted); }
.certificate-page > footer .body { border-top: 0; padding: 24px 0; }
.certificate-page > footer a { color: var(--accent); }
.certificate-page[data-theme="dark"] > header .logo { background-color: #fff; border-radius: 4px; }
.certificate-main {
    width: min(1600px, calc(100% - 80px));
    margin: 0 auto;
    padding: 28px 32px 32px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    text-align: left;
}
.certificate-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}
.certificate-heading h1 { color: var(--accent); font-size: 25px; line-height: 1.4; }
.certificate-breadcrumb { color: var(--muted); font-size: 14px; }
.certificate-breadcrumb a { color: var(--accent); }
.certificate-breadcrumb a:hover { text-decoration: underline; }
.certificate-content { max-width: 760px; margin: 32px auto 4px; }
.certificate-intro p { color: var(--muted); font-size: 16px; line-height: 1.9; }
.certificate-form { margin: 30px 0 0; }
.certificate-field {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    margin-bottom: 22px;
}
.certificate-field > label { padding-top: 12px; text-align: right; font-size: 16px; line-height: 24px; }
.certificate-field > div { min-width: 0; }
.certificate-field input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: var(--field);
    color: var(--ink);
    caret-color: var(--accent);
    font-size: 16px;
}
.certificate-field input:hover { border-color: var(--muted); }
.certificate-field input:focus { border-color: var(--accent); }
.certificate-field small { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.certificate-submit {
    display: block;
    width: calc(100% - 180px);
    min-height: 48px;
    margin: 28px 0 0 180px;
    padding: 10px 20px;
    border: 0;
    border-radius: 5px;
    background: var(--button);
    color: var(--button-ink);
    font-size: 20px;
    cursor: pointer;
}
.certificate-submit:hover { background: #dfac15; }
.certificate-submit:active { background: #ce9c0a; }
.certificate-submit:disabled { opacity: .65; cursor: wait; }
.certificate-message,
.certificate-result { margin-top: 28px; padding: 24px; border: 1px solid var(--line); border-radius: 5px; }
.certificate-message { color: var(--warning); border-color: var(--warning); background: var(--notice); line-height: 1.8; }
.certificate-result h2 { font-size: 22px; color: var(--accent); }
.certificate-state { margin: 12px 0 20px; color: var(--accent); font-weight: 700; }
.certificate-state[data-state="revoked"],
.certificate-state[data-state="expired"],
.certificate-state[data-state="pending"],
.certificate-state[data-state="unknown"] { color: var(--warning); }
.certificate-result dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px 20px; font-size: 16px; line-height: 1.8; font-variant-numeric: tabular-nums; }
.certificate-result dt { color: var(--muted); }
.certificate-result dd { margin: 0; overflow-wrap: anywhere; }
.certificate-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 0 180px; }
.certificate-footnote { color: var(--muted); font-size: 13px; line-height: 1.8; }
#certificate-theme { flex-shrink: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--accent); font-size: 13px; cursor: pointer; }
#certificate-theme:hover { border-color: var(--accent); }
@media (max-width: 1400px) {
    .certificate-page > header .body,
    .certificate-page > footer .body,
    .certificate-main { max-width: 1200px; }
}
@media (max-width: 900px) {
    .certificate-page > header .body,
    .certificate-page > footer .body,
    .certificate-main { width: calc(100% - 40px); }
    .certificate-page > header .top { flex-wrap: wrap; gap: 0; padding: 16px 0; }
    .certificate-page > header .top .logo { width: min(540px, 100%); height: 80px; margin: 0; }
    .certificate-page > header .top span { margin-left: auto; }
    .certificate-page > header .top span,
    .certificate-page > header .top span * { font-size: 16px; }
    .certificate-page > header menu i { display: none; }
    .certificate-page > header menu .body { gap: 0 24px; }
    .certificate-page > header menu a { font-size: 16px; }
    .certificate-page > header { margin-bottom: 28px; }
    .certificate-main { padding: 24px; }
    .certificate-page > footer { margin-top: 28px; }
    .certificate-page > footer ul { display: flex; flex-wrap: wrap; justify-content: center; line-height: 1.9; font-size: 13px; }
}
@media (max-width: 600px) {
    .certificate-page > header .body,
    .certificate-page > footer .body,
    .certificate-main { width: calc(100% - 32px); }
    .certificate-page > header .top .logo { height: 62px; }
    .certificate-page > header .top span { line-height: 44px; }
    .certificate-page > header menu .body { gap: 0 20px; }
    .certificate-page > header menu a { height: 44px; line-height: 40px; font-size: 15px; }
    .certificate-main { padding: 22px 20px; }
    .certificate-heading { align-items: flex-start; flex-direction: column; gap: 10px; padding-bottom: 16px; }
    .certificate-heading h1 { font-size: 23px; }
    .certificate-content { margin-top: 22px; }
    .certificate-form { margin-top: 24px; }
    .certificate-field { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 20px; }
    .certificate-field > label { padding-top: 0; text-align: left; }
    .certificate-submit { width: 100%; margin: 24px 0 0; font-size: 18px; }
    .certificate-bottom { align-items: flex-start; flex-direction: column; gap: 14px; margin: 22px 0 0; }
    .certificate-result, .certificate-message { padding: 20px 16px; }
    .certificate-result dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .certificate-result dd { margin-bottom: 12px; }
}
