/*
 * PGP key page rules: only what .well-known/pgp.html needs beyond theme.css and layout.css -
 * the reading column, the key facts list and the code blocks. Linked third. A rule moves to
 * layout.css once a second page uses it.
 */

/* One column of panels at reading width. minmax(0, 1fr) rather than 1fr: a 1fr track is
   minmax(auto, 1fr), and auto is the panel's min-content width, which the 60-column command
   lines set at ~560px. That widened the column past a phone screen and scrolled the page;
   with a 0 minimum the panel fits the screen and the commands scroll inside their own box. */
.pgp {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}

.pgp p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.pgp .panel > :last-child {
    margin-bottom: 0;
}

/* Key facts: the label beside its value while there is room, stacked on phones. */
.key-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1.5rem;
}

.key-facts dt {
    font-weight: 700;
    color: var(--color-text);
}

.key-facts dd {
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
}

/* Inline code: the fingerprint and the key ID. */
code {
    padding: 0.15em 0.4em;
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius-sm) / 2);
}

/* Command blocks scroll inside their own box, never the page. */
pre {
    margin-bottom: 1rem;
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

pre code {
    padding: 0;
    font-size: inherit;
    background: none;
    border: 0;
}

/* The armored key. A <pre> keeps its line breaks, which the old page's <div> collapsed until
   the copied text no longer imported. pre-wrap lets the 64-column lines wrap inside the panel
   on a phone; soft wraps never reach the clipboard. */
.key-block {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    /* Same tightening layout.css gives .hero-card: a 2rem inset inside a 335px column is too much. */
    .pgp .panel {
        padding: 1.5rem 1.25rem;
    }

    .key-facts {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .key-facts dd + dt {
        margin-top: 0.75rem;
    }
}
