/* Variabook website: one plain page style, carried over from the CCalc site (ccalc.net): a light cream page,
   dark gray system type, thin rules, nothing else. Light by default; a neutral dark gray, with no warm tint, when the
   visitor's system is in Dark Mode, so browsers and extensions have no need to work out dark colours themselves. */

:root {
    color-scheme: light dark;
    --bg: #FAF8F3;
    --text: #3C3C3C;
    --heading: #4A4A4A;
    --muted: #5F5F5F;
    --soft: #767676;
    --line: rgba(60, 50, 30, 0.12);
    /* The logo's teal (#547E99), deepened so links read clearly on the light page. */
    --accent: #44697F;
}

/* Dark Mode: neutral grays only, the logo's teal lightened so links read on the dark page. */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #222222;
        --text: #E2E2E2;
        --heading: #F0F0F0;
        --muted: #C2C2C2;
        --soft: #979797;
        --line: rgba(255, 255, 255, 0.14);
        --accent: #7FA8C2;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
}

/* Type, as on ccalc.net: the system's own sans-serif (San Francisco on Apple devices, Segoe UI on Windows,
   Helvetica or Arial elsewhere). Regular weight for text, 500 for headings, nothing bold, no web fonts to load. */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--text);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 58px 28px 64px;
}

.header {
    padding: 10px 0 28px;
}

/* The teal mark.
   The mark sits about a fifth of the way into its square, so the image is pulled left to line it up with the text. */
.logo {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin: 0 0 22px -18px;
}

h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 500;
    letter-spacing: -0.035em;
    color: var(--heading);
}

h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 500;
    color: var(--heading);
}

h3 {
    margin: 22px 0 4px;
    font-size: 16px;
    font-weight: 500;
    color: var(--heading);
}

h3:first-child {
    margin-top: 0;
}

p,
li {
    margin: 8px 0;
    color: var(--muted);
    font-size: 16px;
}

ul {
    margin: 8px 0;
    padding-left: 20px;
}

li {
    margin: 4px 0;
}

/* The line under the name: CCalc's section-heading size and weight, in the text gray. */
.tagline {
    margin: 8px 0 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--muted);
}

.section {
    padding: 26px 0 28px;
    border-top: 1px solid var(--line);
}

.section-note {
    max-width: 620px;
}

.version {
    margin: 12px 0 0;
    font-size: 13px;
    color: var(--soft);
}

.links {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover,
a:focus-visible {
    text-decoration: underline;
}

.link-row {
    display: inline-block;
    width: fit-content;
    padding: 5px 0;
    font-size: 15.5px;
}

.contact-row {
    padding: 5px 0;
    font-size: 15.5px;
    color: var(--muted);
}

.label {
    color: var(--soft);
}

.note {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--soft);
}

.small {
    font-size: 14px;
    color: var(--soft);
}

/* The policy's facts (date, developer, contact) as a short block under the title. */
.meta p {
    margin: 2px 0;
    font-size: 14px;
    color: var(--soft);
}

.footer {
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--soft);
}

.footer a {
    color: var(--soft);
}

@media (max-width: 520px) {
    main {
        padding: 42px 22px 52px;
    }

    .logo {
        width: 82px;
        height: 82px;
        margin-left: -16px;
    }

    h1 {
        font-size: 32px;
    }

    p,
    li {
        font-size: 15px;
    }

    .tagline {
        font-size: 16px;
    }
}

@media print {
    :root {
        --bg: #FFFFFF;
        --text: #000000;
        --heading: #000000;
        --muted: #222222;
        --soft: #555555;
    }

    main {
        max-width: none;
        padding: 0;
    }
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.92em;
    color: var(--text);
}
