/* Quiet Journal theme.
 *
 * Reading-first entry list with date marginalia -- the neutral default
 * theme. Visual source of truth: docs/design/journal/journal-home.html (the
 * "Journal -- Home" card), tokens from docs/design/design-system.md.
 *
 * Type: the Quiet Instrument scale only -- 12 / 14.5 / 16 / 20 / 26 / 28px
 * (docs/design/design-system.md). Emphasis is font-weight (450 body, 600
 * headings/labels), never an off-scale size; at most one element per page
 * sits above the body tier (signature move 4).
 *
 * Unlike travel/portfolio (system fonts only, no font-src), this theme
 * self-hosts IBM Plex Serif/Sans/Mono the way pressroom-tokens.css does for the
 * admin UI, via the org.webjars.npm:ibm__plex-serif/ibm__plex-sans/
 * ibm__plex-mono dependencies in app/pom.xml. That is why weblog.vm's CSP
 * carries a font-src 'self' the other two themes' policies do not --
 * default-src 'none' refuses everything a policy does not name, so a theme
 * that asks for a webfont must add the directive or the browser silently
 * drops every face (ThemeCspCoverageTest#everyFontAThemeAsksForIsShippedAndAllowedByItsPolicy
 * enforces this for every theme, not just this one). The url()s below use
 *  (this file is rendered through Velocity like every other theme
 * template -- the same webjar-path convention frontpage-custom.css uses for
 * its own self-hosted Plex faces) rather than a hand-written ../.. relative
 * path, so they resolve under
 * whatever context path the app is deployed at. Only the weights this theme
 * actually uses are declared -- Serif 400 (body/prose) and 600 (titles),
 * Sans 450 (UI labels/nav) and 600 (nav/meta emphasis), Mono 400 (the date
 * marginalia) -- the webjars ship far more that nothing here needs.
 * WebjarReferenceTest verifies these url()s resolve on the classpath the
 * same way it verifies JSP references.
 */

@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 400;
    src: url("/webjars/ibm__plex-serif/2.0.0/fonts/complete/woff2/IBMPlexSerif-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Serif";
    font-style: normal;
    font-weight: 600;
    src: url("/webjars/ibm__plex-serif/2.0.0/fonts/complete/woff2/IBMPlexSerif-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 450;
    src: url("/webjars/ibm__plex-sans/1.1.0/fonts/complete/woff2/IBMPlexSans-Text.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-weight: 600;
    src: url("/webjars/ibm__plex-sans/1.1.0/fonts/complete/woff2/IBMPlexSans-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    src: url("/webjars/ibm__plex-mono/2.5.0/fonts/complete/woff2/IBMPlexMono-Regular.woff2") format("woff2");
}

:root {
    /* Both palettes below are real, so the browser is told so: color-scheme
       makes it paint form controls, scrollbars and the canvas from the
       theme's own light/dark pair instead of guessing from the user's
       preference alone. */
    color-scheme: light dark;

    /* Quiet Instrument -- light palette (default). Values are exactly
       docs/design/design-system.md's Light row / the .qj-light panel in
       docs/design/journal/journal-home.html -- no other colors. */
    --qj-paper: #F7F9F9;
    --qj-surface: #FFFFFF;
    --qj-ink: #17262A;
    --qj-ink-soft: #5A6E72;
    --qj-line: #DCE4E4;
    --qj-accent: #0F6E68;
    --qj-accent-quiet: #E3F0EE;
    --qj-bad: #A33B2E;
    --qj-focus: #2AA198;
    --qj-radius: 6px;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Quiet Instrument -- dark palette. */
        --qj-paper: #131C1C;
        --qj-surface: #1A2626;
        --qj-ink: #DCE7E5;
        --qj-ink-soft: #8FA5A2;
        --qj-line: #2A3838;
        --qj-accent: #4FB3AA;
        --qj-accent-quiet: #1E3230;
        --qj-bad: #D0705F;
        --qj-focus: #2AA198;
    }
}

body.qj * { box-sizing: border-box; }

body.qj {
    margin: 0;
    background: var(--qj-paper);
    color: var(--qj-ink);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.55;
}

body.qj a { color: inherit; }
body.qj img { max-width: 100%; height: auto; }
body.qj :focus-visible { outline: 2px solid var(--qj-focus); outline-offset: 2px; }

/* Skip link: the first focusable thing in the document, off-screen until it
 * takes focus. Without it a keyboard reader tabs the site name, the whole
 * category list and every nav page before reaching the first entry, on every
 * page. left/top rather than clip() so it lands where a sighted keyboard user
 * is already looking. */
.qj-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: .5rem .75rem;
    background: var(--qj-surface);
    color: var(--qj-ink);
    border: 1px solid var(--qj-line);
    border-radius: var(--qj-radius);
    font-size: .90625rem;
    text-decoration: none;
}
.qj-skip:focus { left: .75rem; top: .75rem; }

/* ---- chrome ---- */

.qj-head {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 1.5rem;
}
.qj-site { margin: 0; }
.qj-site a {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -.01em;
    text-decoration: none;
    color: var(--qj-ink);
}
.qj-tagline { margin: .2rem 0 0; color: var(--qj-ink-soft); font-size: .90625rem; }

.qj-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    margin-top: .9rem;
    padding-top: .75rem;
    border-top: 1px solid var(--qj-line);
    font-size: .90625rem;
    font-weight: 600;
}
.qj-nav ul.rCategory,
.qj-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.qj-nav a { color: var(--qj-ink-soft); text-decoration: none; padding: .1rem 0; }
/* .selected is what the showWeblogCategoryLinksList macro emits; the a.active half of
 * this selector was written for markup no template has ever produced. */
.qj-nav li.selected a { color: var(--qj-accent); box-shadow: inset 0 -2px var(--qj-accent); }

/* ---- entry list: date marginalia ---- */

.qj-main { max-width: 46rem; margin: 0 auto; padding: .5rem 1.25rem 3rem; }

.qj-entries { display: block; }

.qj-entry {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0 1.25rem;
    padding: 1.1rem 0;
    border-left: 2px solid transparent;
    padding-left: .75rem;
    margin-left: -.75rem;
    transition: border-color .12s ease;
}
.qj-entry + .qj-entry { border-top: 1px solid var(--qj-line); }
.qj-entry:hover { border-left-color: var(--qj-accent); }
.qj-entry:hover .qj-title a { color: var(--qj-accent); }

/* The date is this theme's signature move, so it has to read as an anchor
 * rather than as faded furniture. The day sits at full ink; only the year --
 * which repeats down the whole column and is the part you rarely need -- drops
 * back to ink-soft. Previously both lines were ink-soft and the marginalia was
 * too quiet to do the job it exists for. */
.qj-date {
    margin: 0;
    padding-top: .3rem;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: .75rem;
    color: var(--qj-ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}
.qj-date .y { color: var(--qj-ink-soft); }

.qj-title {
    margin: 0;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    text-wrap: balance;
}
.qj-title a { color: var(--qj-ink); text-decoration: none; }

.qj-sum {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: .90625rem;
    line-height: 1.6;
    color: var(--qj-ink-soft);
    margin: .4rem 0 0;
    max-width: 58ch;
    overflow-wrap: anywhere;
}

/* The category, set as a quiet caps label rather than an accent-coloured link.
 * It was the only colour in the row, which put the strongest visual pull on the
 * least useful thing in it -- the summary sells the entry, the category does
 * not. The accent now appears in the row only on hover, on the title. */
.qj-meta {
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--qj-ink-soft);
    margin: .5rem 0 0;
}

/* A pictured row: the featured image in a third column, cropped to a steady
 * 4:3 so rows of different pictures line up. */
.qj-entry-pictured { grid-template-columns: 5.5rem 1fr 10rem; }
.qj-thumb {
    display: block;
    align-self: start;
    margin-top: .3rem;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: var(--qj-line);
}
/* body.qj in the selector: without it the base rule "body.qj img { height: auto }"
 * outranked this one, and a wide picture left a grey band under it in its 4:3 frame. */
.qj-thumb picture, body.qj .qj-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.qj-read { font-weight: 400; letter-spacing: .02em; text-transform: none; }

@media (max-width: 560px) {
    .qj-entry, .qj-entry-pictured { grid-template-columns: 1fr; }
    .qj-date { padding: 0 0 .25rem; }
    /* On a phone the picture leads the row, full width. */
    .qj-thumb { order: -1; margin: 0 0 .6rem; aspect-ratio: 16 / 9; }
}

/* ---- pager / footer ---- */

/* Entry-to-entry navigation on the permalink: two halves of a rule, older on
 * the left, newer on the right, each with a caps label over the neighbour's
 * real title. This replaces the showNextPrevEntriesControl macro's "&laquo; a | Main |
 * b &raquo;" strip -- see permalink.vm for why the theme renders its own. */
.qj-pager {
    max-width: 46rem;
    margin: 2.5rem auto 0;
    padding: 1.25rem 1.25rem 0;
    border-top: 1px solid var(--qj-line);
}
/* The two-up grid is scoped to qj-steps, not qj-pager, on purpose: both
 * templates share the qj-pager container, and if the grid lived there any
 * template still emitting the showNextPrevEntriesControl macro's inline "a | Main | b"
 * strip would have its pipes dealt into grid cells and stack vertically. */
.qj-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.qj-step { text-decoration: none; display: block; min-width: 0; }
.qj-step-back { grid-column: 1; }
.qj-step-fwd { text-align: right; grid-column: 2; }
.qj-step-label {
    display: block;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--qj-ink-soft);
}
.qj-step-title {
    display: block;
    margin-top: .25rem;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: .90625rem;
    line-height: 1.4;
    color: var(--qj-ink);
    text-wrap: balance;
}
.qj-step:hover .qj-step-title { color: var(--qj-accent); }

@media (max-width: 560px) {
    .qj-steps { grid-template-columns: 1fr; gap: 1.25rem; }
    .qj-step-fwd { text-align: left; grid-column: 1; }
    .qj-step-empty { display: none; }
}

.qj-footer {
    max-width: 46rem;
    margin: 3rem auto 0;
    padding: 1.5rem 1.25rem 4rem;
    border-top: 1px solid var(--qj-line);
}
/* A rule the caret sits on, not a rounded box floating in white space. The
 * boxed input was the one control on the page that looked like the browser's
 * default rather than part of the theme. */
.qj-search,
.qj-head .site-search { margin: 0; }
.qj-head .site-search { margin-top: .9rem; }
.qj-search input,
.qj-head .site-search input {
    width: 100%;
    max-width: 20rem;
    padding: .35rem 0;
    border: 0;
    border-bottom: 1px solid var(--qj-line);
    border-radius: 0;
    background: transparent;
    color: var(--qj-ink);
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: .90625rem;
}
.qj-search input::placeholder,
.qj-head .site-search input::placeholder { color: var(--qj-ink-soft); }
/* The accent underline is an extra affordance, not a replacement: body.qj's
 * :focus-visible ring still applies, so keyboard focus stays visible. */
.qj-search input:focus,
.qj-head .site-search input:focus { border-bottom-color: var(--qj-accent); }

/* The home page's search box sits in the header (the showSearchBox macro);
 * Enter searches and the button stays for assistive technology only. */
.qj-head .site-search-go {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}


/* ---- reading view (permalink) ----
 * Visual source of truth: docs/design/journal/journal-permalink.html (the
 * "Journal -- Reading view" card, classes qp-*). This theme's established
 * vocabulary is qj-*, so the mapping is qp-crumb->qj-crumb, qp-h1->qj-h1,
 * qp-byline->qj-byline, qp-prose->qj-prose (blockquote gets the pull-quote
 * treatment directly, since markdown output has no class to hang a qp-pull
 * equivalent on). */

.qj-main-entry { max-width: 40rem; }

.qj-reading { padding: .5rem 0 1rem; }

.qj-crumb {
    margin: 0 0 1.375rem;
    font-size: .75rem;
    color: var(--qj-ink-soft);
}
.qj-crumb a { color: var(--qj-accent); text-decoration: none; font-weight: 600; }

.qj-h1 {
    margin: 0;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
    /* The prose's own measure, so the title block is as wide as the column it
     * heads: 30ch of this 26px face was about 400px over a 560px body, and a
     * long title wrapped to three lines beside empty space. ch scales with
     * font-size and both are Plex Serif, so 58ch / 1.625 here is exactly
     * .qj-prose's 58ch at 1rem. */
    max-width: calc(58ch / 1.625);
}

.qj-byline {
    display: flex;
    gap: .875rem;
    align-items: baseline;
    margin: .75rem 0 1.625rem;
    padding-bottom: 1.125rem;
    border-bottom: 1px solid var(--qj-line);
    font-size: .75rem;
    color: var(--qj-ink-soft);
}
/* The author's way into the editor -- the page cache is per user, so only an
 * author ever sees it. Quiet like the crumb link: accent and weight. */
.qj-byline .qj-edit { color: var(--qj-accent); text-decoration: none; font-weight: 600; }
.qj-byline .d {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.qj-prose {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1rem;
    line-height: 1.68;
    max-width: 58ch;
    /* A long bare URL is one unbreakable word: without this the page scrolled
     * sideways at phone width. "anywhere" also lowers the min-content width,
     * which is what lets the .qj-sum grid cell shrink instead of overflowing. */
    overflow-wrap: anywhere;
}
.qj-prose p + p { margin-top: .875rem; }
/* body.qj prefix: without it this (0,1,1) lost to body.qj a (0,1,2) and every
   link in a post rendered in the ink colour. The [cta] card is a link with its
   own treatment (below); :where() keeps excluding it from adding specificity. */
body.qj .qj-prose a:where(:not(.cta-card)) { color: var(--qj-accent); }
.qj-prose img { border-radius: var(--qj-radius); }

/* pull-quote treatment -- every blockquote in the rendered entry body gets
   this, matching the qp-pull rule in the design card. */
.qj-prose blockquote {
    margin: 1.125rem 0;
    padding: .25rem 0 .25rem 1rem;
    border-left: 2px solid var(--qj-accent);
    color: var(--qj-ink-soft);
    font-style: italic;
}
.qj-prose blockquote p { margin: 0; }

/* ---- entry tags (reading view) ----
   Quiet pills rather than the accent-coloured inline links .qj-prose a uses:
   the tag row sits directly under the prose and would otherwise read as a
   continuation of the writing. Same 58ch measure so it lines up with it. */
.qj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    max-width: 58ch;
    margin: 1.75rem 0 0;
}
.qj-tags a {
    display: inline-block;
    padding: .125rem .5rem;
    border-radius: var(--qj-radius);
    background: var(--qj-accent-quiet);
    color: var(--qj-accent);
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: .8125rem;
    text-decoration: none;
}
.qj-tags a:hover { background: var(--qj-accent); color: var(--qj-paper); }

/* ---- search results ---- */

.qj-search-head { margin-bottom: 1.5rem; }
.qj-search-empty,
.qj-search-error { margin: 0 0 1.5rem; color: var(--qj-ink-soft); }

/* ---- contact form & newsletter subscribe ----
 * the showAudienceAssets/showSubscribeForm macros inject these forms unscoped
 * (form.className = 'contact-form' / 'newsletter-subscribe'); the body.qj
 * prefix here outranks that head-level style block by specificity so the
 * theme's own card treatment wins without touching the shared macro (same
 * precedent as body.tg in travel-custom.css / body.pf in
 * portfolio-custom.css). Per docs/design/journal/journal-page.html's
 * .qg-form: a --qj-surface card, caps 12px labels, paper-background
 * inputs with a --qj-line border and a --qj-focus focus ring, and an
 * accent Send button. */
body.qj .contact-form,
body.qj .newsletter-subscribe {
    background: var(--qj-surface);
    border: 1px solid var(--qj-line);
    border-radius: var(--qj-radius);
    padding: 1.25rem 1.375rem;
    max-width: 30rem;
    margin: 1.75rem 0;
}
body.qj .contact-form label,
body.qj .newsletter-subscribe label {
    display: block;
    margin-top: .875rem;
    font-family: "IBM Plex Sans", system-ui, sans-serif;
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--qj-ink-soft);
}
body.qj .contact-form label:first-child,
body.qj .newsletter-subscribe label:first-child {
    margin-top: 0;
}
body.qj .contact-form input,
body.qj .contact-form textarea,
body.qj .comments .comment-form textarea,
body.qj .newsletter-subscribe input[type=email] {
    display: block;
    width: 100%;
    max-width: none;
    margin-top: .3125rem;
    padding: .5rem .6875rem;
    box-sizing: border-box;
    font: inherit;
    font-size: .90625rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--qj-ink);
    background: var(--qj-paper);
    border: 1px solid var(--qj-line);
    border-radius: var(--qj-radius);
}
body.qj .contact-form input:focus,
body.qj .contact-form textarea:focus,
body.qj .comments .comment-form textarea:focus,
body.qj .newsletter-subscribe input[type=email]:focus {
    outline: 2px solid var(--qj-focus);
    outline-offset: 1px;
    border-color: var(--qj-focus);
}
body.qj .contact-form textarea { min-height: 5.25rem; resize: vertical; }
body.qj .contact-form .audience-hp,
body.qj .newsletter-subscribe .audience-hp { position: absolute; left: -9999px; top: -9999px; }
body.qj .contact-form button,
body.qj .comments .comment-form button,
body.qj .newsletter-subscribe button {
    margin-top: 1rem;
    padding: .5rem 1.375rem;
    font: inherit;
    font-size: .90625rem;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--qj-accent);
    border: 1px solid var(--qj-accent);
    border-radius: var(--qj-radius);
    cursor: pointer;
}
body.qj .contact-form button:hover,
body.qj .comments .comment-form button:hover,
body.qj .newsletter-subscribe button:hover {
    opacity: .9;
}
body.qj .audience-message { margin-top: .75rem; font-size: .90625rem; color: var(--qj-accent); }

/* The button's label is hardcoded white because --qj-accent is dark enough in
 * the light palette to carry it. In the dark palette --qj-accent lightens to
 * #4FB3AA and white on it falls to roughly 2.2:1 -- below any readable floor.
 * --qj-paper is the dark canvas, so the label inverts with the scheme instead
 * of staying a literal (portfolio does the same with --pf-bg). */
@media (prefers-color-scheme: dark) {
    body.qj .contact-form button,
    body.qj .comments .comment-form button,
    body.qj .newsletter-subscribe button {
        color: var(--qj-paper);
    }
}

/* ---- search results page ----
 * the showWeblogSearchAgainForm macro emits an unclassed <input type="text"
 * class="text">, a <select> and a submit button straight into the theme, so
 * without these three rules the journal's search page showed raw OS form
 * controls in the middle of a serif reading layout. Ported from
 * portfolio-custom.css's equivalent block, with journal's tokens. */
#searchAgain input.text {
    background: var(--qj-surface);
    border: 1px solid var(--qj-line);
    color: var(--qj-ink);
    padding: .5rem .6875rem;
    font: inherit;
    font-size: .90625rem;
    border-radius: var(--qj-radius);
}
#searchAgain input.text:focus { border-color: var(--qj-accent); }
#searchAgain select,
#searchAgain input.button {
    background: var(--qj-surface);
    border: 1px solid var(--qj-line);
    color: var(--qj-ink);
    padding: .45rem .6875rem;
    font: inherit;
    font-size: .90625rem;
    border-radius: var(--qj-radius);
}
#searchAgain input.button { cursor: pointer; }

/* The search-results pager sits directly under the search-again form, inside
 * qj-search-head, where .qj-pager's top border reads as a second rule two
 * lines below the form's own. Same container, no border. */
.qj-search-pager { border-top: 0; padding-top: 0; margin-top: .75rem; }

/* ---- empty entry list ---- */
.qj-list-empty {
    max-width: 46rem;
    margin: 1.5rem 0 0;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: .90625rem;
    color: var(--qj-ink-soft);
}

/* ---- newsletter prompt ----
 * the showSubscribeForm macro drops this <p> into every theme's footer with no styling
 * of its own; it takes the same caps-label role the audience forms' own
 * labels already carry in this file. */
body.qj .newsletter-prompt {
    margin: 0 0 .5rem;
    font-size: .75rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--qj-ink-soft);
}
body.qj .newsletter-subscribe-block { margin-top: 1.5rem; }

/* ---- shortcode blocks ----
 * [faq], [cta], [map] and [video] emit their own class names from the shared
 * macros, unstyled. Travel framed them from the start; outside travel a [cta]
 * collapsed to a bare inline anchor and a [map] had no frame at all. Ported
 * from travel-custom.css with journal's tokens. */
body.qj .travel-map {
    height: 380px;
    margin: 1.75rem 0;
    border: 1px solid var(--qj-line);
    border-radius: var(--qj-radius);
    overflow: hidden;
}
@media (max-width: 640px) { body.qj .travel-map { height: 280px; } }

body.qj .faq {
    margin: 1.75rem 0;
    padding: .25rem 1.25rem 1rem;
    background: var(--qj-surface);
    border: 1px solid var(--qj-line);
    border-radius: var(--qj-radius);
}
body.qj .faq dt { margin-top: 1rem; font-weight: 600; }
body.qj .faq dd { margin: .35rem 0 0; color: var(--qj-ink-soft); }

body.qj .cta-card {
    display: block;
    margin: 1.75rem 0;
    padding: 1.1rem 1.25rem;
    background: var(--qj-accent-quiet);
    color: var(--qj-ink);
    border: 1px solid var(--qj-accent);
    border-radius: var(--qj-radius);
    text-decoration: none;
}
body.qj .cta-card:hover { background: var(--qj-surface); }
body.qj .cta-card .cta-label { display: block; font-weight: 600; }
body.qj .cta-card .cta-note {
    display: block;
    margin-top: .2rem;
    font-size: .90625rem;
    color: var(--qj-ink-soft);
}

body.qj .shortcode-image { margin: 1.75rem 0; }
body.qj .shortcode-image img { border-radius: var(--qj-radius); }
body.qj .jgrid { margin: 1.75rem 0; }
body.qj .video-figure { margin: 1.75rem 0; }
body.qj .video-embed { border-radius: var(--qj-radius); overflow: hidden; }

/* the showNextPrevSearchControl macro's hit count, formerly an <h3> and now a status
 * paragraph -- it needs the size the heading used to give it. */
body.qj .search-summary { margin: 0 0 .75rem; font-size: .75rem; color: var(--qj-ink-soft); }

/* The search pager macro's own nav: previous results on the left, more on
 * the right, and a lone "More results" still on the right. The hit line
 * above the search-again form is a status line, quiet like the summary. */
body.qj .search-pager { display: flex; justify-content: space-between; gap: 1rem; }
body.qj .search-pager-next { margin-left: auto; }
body.qj .search-hits { margin: 0 0 .5rem; font-size: .75rem; color: var(--qj-ink-soft); }

/* ---- business card ----
 * the footer card for a blog with a business or place; the markup is the
 * showBusinessCard macro's. Tokens only, so light and dark follow the theme. */
body.qj .business-card {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--qj-line);
    font-size: .875rem;
}
body.qj .business-card p { margin: 0 0 .25rem; }
body.qj .business-card-name { font-weight: 600; }
body.qj .business-card-locality { color: var(--qj-ink-soft); }
body.qj .business-card-tel { display: inline-block; margin-right: 1rem; }
body.qj .business-card-book {
    display: inline-block;
    padding: .375rem .875rem;
    border: 1px solid var(--qj-accent);
    border-radius: 6px;
    color: var(--qj-accent);
    text-decoration: none;
}
body.qj .business-card-book:hover { background: var(--qj-accent); color: var(--qj-paper); }

/* ---- view heading (category and tag views) ----
 * The caps-label role over the name in the title face: the view says what it
 * is on the page, not only in the tab. Emphasis by weight, on the type scale. */
.qj-view { margin: .5rem 0 .25rem; }
.qj-view-label {
    margin: 0;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--qj-ink-soft);
}
.qj-view-name {
    margin: .2rem 0 0;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--qj-ink);
    overflow-wrap: anywhere;
}

/* ---- colophon: the showColophon macro's last line of the footer ---- */
body.qj .colophon { margin-top: 1.5rem; font-size: .75rem; line-height: 1.5; color: var(--qj-ink-soft); }
body.qj .colophon p { margin: 0 0 .25rem; }
body.qj .colophon a { color: inherit; text-decoration: underline; }
body.qj .colophon-meta span + span::before { content: "\00b7"; margin: 0 .5em; }

/* ---- more from the site: the showMoreFromSite macro, just above the colophon.
 * Quiet on purpose: small type in the theme's own soft ink, one rule above it.
 * The places list (the showPlacesYouveBeen macro's script) stays hidden until
 * the reader's own browser has something to show, so nothing here sets a
 * display on .places-been itself. ---- */
body.qj .more-from-site { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--qj-line); }
body.qj .more-from-site-title,
body.qj .places-been-title { margin: 0 0 .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--qj-ink-soft); }
body.qj .more-from-site-posts,
body.qj .places-been-list { list-style: none; margin: 0; padding: 0; }
body.qj .more-from-site-post { margin: 0 0 .5rem; font-size: .90625rem; line-height: 1.4; overflow-wrap: anywhere; }
body.qj .more-from-site-post a { color: var(--qj-ink); text-decoration: none; }
body.qj .more-from-site-post a:hover { color: var(--qj-accent); text-decoration: underline; }
body.qj .more-from-site-blog { display: block; font-size: .75rem; color: var(--qj-ink-soft); }
body.qj .more-from-site .places-been { margin-top: 1rem; }
body.qj .places-been-list li { display: inline; font-size: .8125rem; }
body.qj .places-been-list li + li::before { content: "\00b7"; margin: 0 .5em; color: var(--qj-ink-soft); }
body.qj .places-been-list a { color: var(--qj-accent); }
body.qj .more-from-site-home { margin: 1rem 0 0; font-size: .8125rem; }
body.qj .more-from-site-home a { color: var(--qj-accent); }

/* ---- site bar ----
 * The strip above the header (the showSiteBar macro, weblog.vm) inherits this
 * theme's ink and font; these two name its menu surface and its rule. */
body.qj { --site-bar-surface: var(--qj-surface); --site-bar-line: var(--qj-line); }

/* A blog's pinned post, marked in the date column. */
.qj-date .entry-pinned { color: var(--qj-ink-soft); text-transform: uppercase; letter-spacing: .06em; font-size: .6875rem; }

/* A strand: the "Part N of M in" bar under a post's byline, and a strand page's list of parts. */
.strand-bar { margin: .5rem 0 0; font-size: .875rem; color: var(--qj-ink-soft); }
.strand-bar a { color: inherit; text-decoration-color: var(--qj-line); text-underline-offset: .2em; }
.strand-parts { margin: 2rem 0 0; padding-left: 1.5rem; }
.strand-part { margin: 0 0 1rem; }
.strand-part-title { font-family: var(--qj-serif, inherit); font-size: 1.125rem; }
.strand-part-excerpt { margin: .25rem 0 0; font-size: .9375rem; color: var(--qj-ink-soft); }
