/* articles.padevgroup.com. A reading site: one column, nothing loaded from anywhere else. */

:root {
    --paper: #fdfcfa;
    --ink: #1c1d21;
    --muted: #5b5f6b;
    --rule: #dcd9d2;
    --link: #0a3fa8;
    --quote: #eaf2fd;
}
/* With scripts off the page follows the device. With theme.js it sets data-theme, which wins either way. */
@media (prefers-color-scheme: dark) {
    :root { --paper: #15171c; --ink: #e7e5e0; --muted: #a3a7b3; --rule: #343843; --link: #8fb8ff; --quote: #1a2536; }
}
:root[data-theme="light"] { --paper: #fdfcfa; --ink: #1c1d21; --muted: #5b5f6b; --rule: #dcd9d2; --link: #0a3fa8; --quote: #eaf2fd; }
:root[data-theme="dark"] { --paper: #15171c; --ink: #e7e5e0; --muted: #a3a7b3; --rule: #343843; --link: #8fb8ff; --quote: #1a2536; }

* { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
/* On a laptop the whole page scales up: bigger type and a wider column, the same seventy-odd characters a line. */
@media (min-width: 1100px) { html { font-size: 125%; } }
@media (min-width: 1400px) { html { font-size: 131.25%; } }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.65;
}
.masthead, main, .about { max-width: 38rem; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

.masthead { padding-top: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
            display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* The toggle from padevgroup.com: round, a moon while dark, a sun while light. */
.theme-toggle {
    flex: none; width: 36px; height: 36px; padding: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: none; border: 1px solid var(--rule); color: var(--ink);
    font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--quote); }
.theme-toggle:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }
.theme-icon-dark { display: none; color: #ddd; }
.theme-icon-light { display: inline; color: #f90; }
:root[data-theme="dark"] .theme-icon-dark { display: inline; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
.masthead .site { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em; }
.masthead-tools { flex: none; display: flex; align-items: center; gap: 1rem; }
.masthead .home, .masthead .start { font-size: 0.9rem; white-space: nowrap; }
.start-pointer { margin: -1.5rem 0 2.5rem; font-weight: 600; }

main { padding-top: 2.5rem; padding-bottom: 2.5rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.5rem 0 0.5rem; }
p { margin: 0 0 1.15rem; }

.byline, .meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
.byline span, .meta span { margin-left: 0.9em; }
.tagline { color: var(--muted); font-size: 1rem; margin-bottom: 2.5rem; }

.origin { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--muted); }

.neighbours { display: flex; gap: 1.5rem; justify-content: space-between; margin-top: 2rem; }
.neighbours a { flex: 1 1 0; text-decoration: none; font-weight: bold; }
.neighbours a.next { text-align: right; margin-left: auto; }
.neighbours span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.2rem; }

.entry { padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.entry .meta { margin-bottom: 0.4rem; }
.entry h2 { margin: 0 0 0.75rem; font-size: 1.45rem; }
.entry h2 a { color: var(--link); text-decoration: none; }
.entry h2 a:hover { text-decoration: underline; }
blockquote { margin: 0; padding: 0.9rem 1.1rem; background: var(--quote); border-left: 3px solid var(--rule); }
blockquote p { margin: 0; font-style: italic; }
.more { margin: 1rem 0 0; font-weight: 600; }

.about { padding-top: 1.5rem; padding-bottom: 3rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--muted); }
.about h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 0.6rem; color: var(--muted); }

@media (max-width: 30rem) {
    h1 { font-size: 1.6rem; }
    /* The top bar has to hold the site name, the way back and the toggle on one line. */
    .masthead .site { font-size: 0.85rem; letter-spacing: 0; }
    .masthead .home, .masthead .start { font-size: 0.85rem; }
    .masthead-tools { gap: 0.6rem; }
    .neighbours { flex-direction: column; }
    .neighbours a.next { text-align: left; margin-left: 0; }
}
