/* PostDive site: the one stylesheet (07-UI-SPEC §4.2, "Color › Site", "Typography › Site", "Spacing › Site").
   System fonts only, nothing loaded from another host. Sizes in rem, so the visitor's font size applies
   (1rem = 16px at the default). */

:root {
    color-scheme: light dark;
    --background: #FFFFFF;
    --text: #1C1C1E;
    --secondary: #6C6C70;
    --rule: #D1D1D6;
    --accent: #C2410C;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #1C1C1E;
        --text: #F2F2F7;
        --secondary: #AEAEB2;
        --rule: #38383A;
        --accent: #EC5C10;
    }
}

html {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    max-width: 42.5rem; /* 680px */
    margin: 0 auto;
    padding: 1.5rem; /* 24px */
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Header: icon and name on one line, 16px apart; the nav 8px under it. */
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand img {
    display: block;
    width: 4rem;  /* 64px */
    height: 4rem;
    border-radius: 0.875rem; /* 14px */
}

.name {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    line-height: 1.2;
}

nav {
    margin-top: 0.5rem; /* 8px */
    font-size: 0.875rem; /* 14px */
    color: var(--secondary);
}

nav [aria-current="page"] {
    color: var(--text);
}

h1,
h2 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    margin: 1.5rem 0 0.25rem; /* 24px above, 4px to the date */
    font-size: 1.75rem; /* 28px */
}

h2 {
    margin: 1.5rem 0 0.5rem; /* 24px above, 8px under */
    font-size: 1.25rem; /* 20px */
}

p,
ol,
dl {
    margin: 0 0 1rem; /* 16px between paragraphs */
}

ol {
    padding-left: 1.5rem;
}

li + li {
    margin-top: 0.25rem;
}

dt {
    font-weight: 600;
}

dd {
    margin: 0.25rem 0 1rem;
}

.updated {
    font-size: 0.875rem;
    color: var(--secondary);
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 0.125em;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

footer {
    margin-top: 1.5rem; /* 24px above the rule */
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-size: 0.875rem;
    color: var(--secondary);
}

footer p {
    margin: 0;
}
