/* page.css - styles for content pages (meta, prose, repos, etc.) */


/* Colours, by role. Every colour on screen comes from one of these; nothing
   below names a colour directly. They are repeated in home.css, page.css and
   post.css, because each page loads exactly one of the three, and verify.sh
   checks the three blocks are identical. The print styles at the end use
   plain black and white on purpose: paper has no theme.

     --bg           the page
     --ink          body text, the site title, the coin's hover ring
     --link         navigation and link text; the background of a hovered link
     --on-ink       text on an --ink or --link background (a hovered link)
     --muted        dates, the .xyz, secondary text
     --rule         dividing lines
     --rule-faint   the lighter lines between listing entries
     --tint         a hovered listing entry
     --tint-strong  the footnote just arrived at

   Two sets. The first is the light theme, on an off-white page (chosen
   2026-11-17). The second replaces it when the reader's system is set to
   dark: a dark grey page, not black, with off-white text. Neither needs
   JavaScript; the browser picks by the reader's own setting.

   The coin (assets/img/ivdas1.svg) colours itself the same way, from a
   style block inside the SVG, because an image cannot see these
   variables. Its two fills must equal --ink in each set; verify.sh checks.
*/
:root {
    color-scheme: light;
    --bg: #faf8f3;
    --ink: #000;
    --link: #555;
    --on-ink: #faf8f3;
    --muted: #777;
    --rule: #ddd;
    --rule-faint: #ebe8df;
    --tint: #f3f0e8;
    --tint-strong: #ece8de;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #1c1c1c;
        --ink: #e8e6e1;
        --link: #b5b3ae;
        --on-ink: #1c1c1c;
        --muted: #8d8b86;
        --rule: #3a3a3a;
        --rule-faint: #2b2b2b;
        --tint: #242424;
        --tint-strong: #303030;
    }
}

/* TYPE SCALE
 *
 * Sizes are in rem, not pt. A pt in CSS is a fixed 1/72 inch -- it ignores the
 * reader's browser font-size setting entirely, so a reader who has set 20px
 * because they need 20px got 16px anyway. rem is relative to the root element,
 * which is exactly the setting they changed.
 *
 * Converted at the default root of 16px, so nothing moves for a reader who has
 * changed nothing. The old value is on the right where the two differ:
 *
 *   0.75rem   12px    was  9pt
 *   0.85rem   13.6px  was 10pt
 *   0.9rem    14.4px  was 11pt
 *   1rem      16px    was 12pt   (exact)
 *   1.1rem    17.6px  was 13pt
 *   1.15rem   18.4px  was 14pt
 *   1.25rem   20px    was 15pt   (exact)
 *   1.35rem   21.6px  was 16pt
 *   1.5rem    24px    was 18pt   (exact)
 *   1.6rem    25.6px  was 19.3pt
 *   1.65rem   26.4px  was 20pt
 *   1.85rem   29.6px  was 22pt
 *   2.35rem   37.6px  was 28pt
 *
 * Rounded to 0.05rem rather than carried to four decimals: no step moves by
 * more than 0.27px, which is less than a device pixel on every display this
 * site will meet, and the round numbers survive being edited by hand.
 *
 * Nothing here sets a font-size on html. That is deliberate -- setting one is
 * how a site takes the reader's setting away again.
 */


@font-face {
    font-family: 'Aesthetic';
    src: url('../fonts/aesthetic-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Belgiano';
    src: url('../fonts/belgiano-serif.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FiraSans';
    src: url('../fonts/fira-sans-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    font-family: 'FiraSans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
}

header {
    padding: 30px 0 15px 0;
    border-bottom: 1px solid var(--rule);
}

header nav {
    max-width: 34rem;
    margin: 0 auto;
    padding: 0 40px;
    overflow-wrap: break-word;
}

header nav a {
    font-family: 'Belgiano', serif;
    font-size: 1rem;
    text-decoration: none;
    color: var(--link);
}

header nav a:hover,
header nav a:focus-visible {
    color: var(--on-ink);
    background-color: var(--link);
}

header nav .nav-title {
    font-family: 'Aesthetic', serif;
    font-size: 1.35rem;
    color: var(--ink);
}

header nav .nav-title:hover,
header nav .nav-title:focus-visible {
    color: var(--on-ink);
    background-color: var(--ink);
}

.tld {
    color: var(--muted);
}

header nav .nav-title:hover .tld,
header nav .nav-title:focus-visible .tld {
    color: var(--on-ink);
}

/* directory navigator: ivdasmachabevs.xyz/prose/ribbon-cutting
   .nav-title  the wordmark
   .nav-sub    an ancestor segment (the category, on a post page)
   .nav-current the page you are on -- also carries aria-current="page"

   Neither .nav-sub nor .nav-current has a rule of its own, deliberately:
   they would restate `header nav a` exactly, and a rule that changes
   nothing is a rule that only one of these two stylesheets will get
   updated when it finally does change. The classes are markup hooks. To
   make the current segment look different -- dimmed, unlinked-looking --
   style [aria-current="page"] and add it to BOTH post.css and page.css. */

/* skip link: the first thing in the tab order on every page, off-screen until
   it has focus. The same rule is in home.css and post.css. */
.skip-link {
    position: absolute;
    left: -100rem;
    top: 0;
    z-index: 10;
    padding: 0.4em 0.8em;
    font-family: 'Belgiano', serif;
    font-size: 1rem;
    text-decoration: none;
    color: var(--on-ink);
    background-color: var(--ink);
}

.skip-link:focus {
    left: 0;
}

main {
    max-width: 34rem;
    margin: 0 auto;
    padding: 30px 40px 40px 40px;
}

/* Standalone page content -- 404.html, the feed list -- as opposed to an
   SSI-included <article class="post">, whose own rules are below. Scoped to
   direct children of <main> so an included article never matches these. */

main > h1 {
    font-family: 'Belgiano', serif;
    font-size: 2.35rem;
    margin: 0 0 20px 0;
}

main > p {
    font-family: 'FiraSans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Links in standalone page copy -- the feed list, the 404 fallbacks. These
   carried a colour as an inline style attribute on rss.html and nothing at all
   on 404.html, so the same link was two different colours on two pages. The
   underline stays: unlike the nav and the listings, these sit inside running
   text and have no other affordance. */

main > p a,
main > p a:visited {
    color: var(--link);
}

main > p a:hover,
main > p a:focus-visible {
    color: var(--on-ink);
    background-color: var(--link);
}

footer {
    max-width: 34rem;
    margin: 0 auto;
    padding: 20px 40px 40px 40px;
    border-top: 1px solid var(--rule);
}

footer a {
    font-family: 'Belgiano', serif;
    text-decoration: none;
    color: var(--link);
}

footer a:hover,
footer a:focus-visible {
    color: var(--on-ink);
    background-color: var(--link);
}

/* article styles */

article.post h1 {
    font-family: 'Belgiano', serif;
    font-size: 2.35rem;
    line-height: 1.15;
    margin: 0 0 0.15em 0; 
}

article.post h1 + .post-meta,
article.post .post-meta {
    font-family: 'Belgiano', serif;
    color: var(--muted);
    font-size: 1.15rem;
    margin: 0 0 1.4em 0;
}

article.post h2 {
    font-family: 'FiraSans', sans-serif;
    font-size: 1.5rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

article.post p {
    font-family: 'FiraSans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.2em;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* mobile */

@media (max-width: 600px) {
    header nav {
        padding: 0 20px;
    }

    main {
        padding: 20px 20px 20px 20px;
    }

    footer {
        padding: 20px;
    }

    article.post h1 {
        font-size: 1.85rem;
    }

    article.post p {
        font-size: 1rem;
    }
}

/* post listing styles for category pages */
.post-listing-link {
    text-decoration: none;
    color: inherit;
    display: block;
    margin-bottom: 20px;
}

.post-listing {
    padding: 15px 0;
    border-bottom: 1px solid var(--rule-faint);
    transition: background-color 0.2s ease;
}

.post-listing-link:hover .post-listing,
.post-listing-link:focus-visible .post-listing {
    background-color: var(--tint);
}

.post-listing h2 {
    font-family: 'Belgiano', serif;
    font-size: 1.65rem;
    margin: 0 0 5px 0;
    color: var(--ink);
}

.post-listing .post-meta {
    font-family: 'Belgiano', serif;
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

/* feed listing (pages/rss.html)
 *
 * A description list rather than a bare <ul>: each feed is a term and a
 * definition, which is what the page is, and it gives the reader's screen
 * reader the same pairing the sighted reader gets from the indent. */

.feed-list {
    margin: 0 0 2rem 0;
}

.feed-list dt {
    font-family: 'Belgiano', serif;
    font-size: 1.35rem;
    margin: 0.9rem 0 0.1rem 0;
}

.feed-list dt a {
    text-decoration: none;
    color: var(--link);
}

.feed-list dt a:hover,
.feed-list dt a:focus-visible {
    color: var(--on-ink);
    background-color: var(--link);
}

.feed-list dd {
    font-family: 'FiraSans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--link);
    margin: 0;
}

.feed-group {
    font-family: 'FiraSans', sans-serif;
    font-size: 1.15rem;
    margin: 2rem 0 0.3rem 0;
}

/* Print: the page content only. Category listings and the feed list are the
   pages here; post.css carries the fuller rules for articles. Links print as
   their text only (decided 2026-11-17). */
@media print {
    header,
    footer,
    .skip-link {
        display: none;
    }

    body,
    main {
        max-width: none;
        margin: 0;
        padding: 0;
        color: #000;
        background: #fff;
    }

    main a {
        color: inherit;
        text-decoration: none;
    }
}
