/* The page that confirms a certificate (certificate/index.html). On its own:
   the site's colours and type, light and dark, and nothing else. */
:root {
    --page-bg: #fbfaf6;
    --page-panel: #ffffff;
    --page-ink: #18211f;
    --page-muted: #5f6a65;
    --page-soft: #69736e;
    --page-line: rgba(24, 33, 31, 0.12);
    --page-green: #4f6f5d;
    --page-green-ink: #466553;    /* the pill's text on its own green tint: 5.2:1 */
    --page-blue: #234d6f;         /* the certificate's blue */
}
html.dark {
    --page-bg: #0f172a;
    --page-panel: #1f2937;
    --page-ink: #f9fafb;
    --page-muted: #9ca3af;
    --page-soft: #9ca3af;
    --page-line: #374151;
    --page-green: #8cc0a3;
    --page-green-ink: #8cc0a3;
    --page-blue: #7fb3dd;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--page-ink);
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.check-top {
    display: flex;
    justify-content: center;
    padding: 22px 16px;
    border-bottom: 1px solid var(--page-line);
}
.check-logo img { display: block; width: min(300px, 70vw); height: auto; }
html.dark .check-logo img { filter: invert(1); }

.check {
    width: min(760px, 100%);
    margin: 0 auto;
    padding: 40px 16px 64px;
}

.check-result h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.15; }
.check-line { margin: 0; font-size: 1.05rem; color: var(--page-muted); }
.check-line strong { color: var(--page-ink); font-weight: 600; }
.check-wait { color: var(--page-muted); }

.check-ok {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 6px 12px 6px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--page-green) 14%, transparent);
    color: var(--page-green-ink, var(--page-green));
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
#check-number::placeholder { color: var(--page-soft); }

.check-facts {
    display: grid;
    gap: 10px;
    margin: 26px 0;
    padding: 18px 20px;
    border: 1px solid var(--page-line);
    border-radius: 16px;
    background: var(--page-panel);
}
.check-facts div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; }
.check-facts dt { color: var(--page-soft); font-size: 0.9rem; }
.check-facts dd { margin: 0; font-weight: 500; }

.check-paper {
    margin: 0 0 18px;
    aspect-ratio: 2339 / 1654;
    border-radius: 12px;
    overflow: hidden;
    background: #fbfaf6;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.35);
}
.check-paper img { display: block; width: 100%; height: 100%; }
.check-paper img:not([src]) { visibility: hidden; }

.check-pdf {
    display: inline-flex;
    padding: 12px 22px;
    border-radius: 10px;
    background: var(--page-blue);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}
html.dark .check-pdf { color: #111827; }

/* For somebody who came by a shared certificate: the course is theirs to take too. */
.check-learn {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    margin-top: 28px;
    padding: 16px 18px;
    border: 1px solid var(--page-line);
    border-radius: 12px;
    background: var(--page-panel);
}
.check-learn p { margin: 0; color: var(--page-muted); }
.check-learn strong { color: var(--page-ink); font-weight: 600; }
.check-learn a { color: var(--page-blue); font-weight: 600; text-decoration: none; white-space: nowrap; }
.check-learn a:hover { text-decoration: underline; }

.check-form {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--page-line);
}
.check-result.is-ask + .check-form { margin-top: 22px; padding-top: 0; border-top: 0; }
.check-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.check-row { display: flex; gap: 8px; }
.check-row input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid var(--page-line);
    border-radius: 10px;
    background: var(--page-panel);
    color: var(--page-ink);
    font: inherit;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.check-row button {
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: var(--page-ink);
    color: var(--page-bg);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 520px) {
    .check { padding-top: 28px; }
    .check-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
