/* stoneshadowsteel.com. No pictures: the feel comes from type, colour and one ornament.
   Two families, both served from this site (SIL Open Font License, texts in /fonts/):
   IM Fell English, the Fell types of the 1670s revived by Igino Marini, for titles, drop caps and (its SC cut)
   the small-capital headings; EB Garamond for reading. The floral heart of the scene breaks (U+2766) is EB
   Garamond's own, served as a one-glyph file. */

@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap;
             src: url("/fonts/IMFellEnglish-normal.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap;
             src: url("/fonts/IMFellEnglish-italic.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English SC"; font-style: normal; font-weight: 400; font-display: swap;
             src: url("/fonts/IMFellEnglishSC-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400 600; font-display: swap;
             src: url("/fonts/EBGaramond-normal.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: italic; font-weight: 400; font-display: swap;
             src: url("/fonts/EBGaramond-italic.woff2") format("woff2"); }
@font-face { font-family: "EB Garamond"; font-style: normal; font-weight: 400; font-display: block;
             src: url("/fonts/EBGaramond-fleuron.woff2") format("woff2"); unicode-range: U+2766; }

/* Stone, shadow and steel. Light: a stone-white paper, warm stone greys, a steel blue. Dark: the shadow, with
   the same steel lifted. Text pairs are WCAG AA or better (tests\test_style.py measures them); the steel line
   is for rules and the ornament only. */
:root {
    --paper: #f1eee7; --ink: #23211d; --muted: #5d584f; --rule: #cbc4b6; --heading: #262b30;
    --steel: #2f5674; --steel-line: #6f8ca5;
    --display: "IM Fell English", "EB Garamond", Georgia, serif;
    --sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
    --text: "EB Garamond", Garamond, Georgia, serif;
    --gutter: 56px; --column: 680px;
}
@media (prefers-color-scheme: dark) {
    :root { --paper: #121417; --ink: #e3ded3; --muted: #a39d90; --rule: #34383e; --heading: #eee9de;
            --steel: #9cb9d2; --steel-line: #6d8aa3; }
}
:root[data-theme="light"] { --paper: #f1eee7; --ink: #23211d; --muted: #5d584f; --rule: #cbc4b6; --heading: #262b30;
                            --steel: #2f5674; --steel-line: #6f8ca5; }
:root[data-theme="dark"] { --paper: #121417; --ink: #e3ded3; --muted: #a39d90; --rule: #34383e; --heading: #eee9de;
                           --steel: #9cb9d2; --steel-line: #6d8aa3; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink);
       font-family: var(--text); font-size: 20px; line-height: 1.55; font-kerning: normal;
       font-variant-ligatures: common-ligatures; }
button { font: inherit; }
a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--steel); outline-offset: 3px; }

/* One frame: the width of the reading column, so the masthead, the text and the footer share their edges. */
.masthead, main, .site-footer { width: 100%; max-width: calc(var(--column) + 2 * var(--gutter)); margin: 0 auto;
                                 padding-left: var(--gutter); padding-right: var(--gutter); }
main { flex: 1 0 auto; padding-top: 48px; padding-bottom: 72px; }

.masthead { padding-top: 28px; }
.masthead .bar { display: flex; align-items: center; gap: 12px 28px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.masthead .site { font-family: var(--sc); font-size: 21px; line-height: 1.2; color: var(--heading); text-decoration: none; }
.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a { font-family: var(--sc); font-size: 19px; color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--steel); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--steel); text-decoration: underline; text-decoration-color: var(--steel-line); }

/* The light and dark toggle from padevgroup.com and chrisrapp.com: 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: 18px;
                line-height: 1; cursor: pointer; }
.theme-toggle[hidden] { display: none; }
.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; }

h1, h2, h3 { color: var(--heading); font-weight: 400; }
h1 { font-family: var(--display); font-size: 64px; line-height: 1.02; margin: 0 0 10px; }
h2 { font-family: var(--sc); font-size: 27px; line-height: 1.2; margin: 52px 0 12px; }
h3 { font-family: var(--display); }
p { margin: 0 0 18px; }
.subtitle { font-family: var(--display); font-style: italic; font-size: 25px; line-height: 1.3; color: var(--muted); margin: 0 0 36px; }
.lede { font-size: 23px; }
.small { font-size: 17px; color: var(--muted); }
.small a { color: inherit; text-decoration-color: var(--steel-line); }

/* The series name, the largest thing on the site, one word group to a line. */
.hero { font-family: var(--display); font-size: clamp(64px, 11.5vw, 132px); line-height: 0.9; margin: 8px 0 22px; }
.hero .line { display: block; }

/* One drop cap a page, in the Fell type, three lines deep. The paragraph holds its own drop cap (flow-root) and
   is never shorter than it, so the cap can neither push into the next paragraph nor hang onto a rule below. */
.opening { display: flow-root; min-height: calc(3lh + 4px); }
.opening::first-letter { font-family: var(--display); color: var(--steel); float: left; font-size: 5.3em; line-height: 0.82;
                         margin: 0.06em 0.08em 0 -0.02em; }
@supports (initial-letter: 3) or (-webkit-initial-letter: 3) {
    .opening::first-letter { float: none; font-size: inherit; line-height: inherit; margin: 0 0.1em 0 0;
                             -webkit-initial-letter: 3; initial-letter: 3; }
}

/* The scene break from Chris's manuscripts: short rules either side of a floral heart. */
hr.fleuron { border: 0; width: 8.6em; height: 2em; margin: 60px auto; position: relative; overflow: visible; color: var(--steel);
             background: linear-gradient(var(--steel-line), var(--steel-line)) left center / 2.9em 1px no-repeat,
                         linear-gradient(var(--steel-line), var(--steel-line)) right center / 2.9em 1px no-repeat; }
hr.fleuron::after { content: "\2766"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
                    font-family: "EB Garamond", serif; font-size: 2em; line-height: 1; color: var(--steel); }

/* The names of the days and the months: the Fell italic, so the run reads as names, not as a sentence. */
.names { font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.5; color: var(--heading);
         margin: -6px 0 22px; padding-left: 1.2em; }
.names .name { white-space: nowrap; }

/* A book's place in the series, over its title. */
.label { font-family: var(--sc); font-size: 19px; color: var(--steel); margin: 0 0 2px; }
.label + h2 { font-family: var(--display); font-size: 52px; line-height: 1.05; margin: 0 0 18px; }
.status { font-family: var(--sc); font-size: 19px; color: var(--muted); margin: 26px 0 6px; }
.action { margin: 0 0 14px; }
.action a { font-size: 22px; font-weight: 600; }
.kicker { font-family: var(--display); font-style: italic; font-size: 30px; line-height: 1.25; color: var(--heading); margin: 28px 0 0; }
.blurb p { font-size: 21px; }

/* Ways in, and the trilogies: ruled lists, no boxes. */
.doors, .trilogies { list-style: none; margin: 0; padding: 0; }
.doors { margin-top: 64px; }
.opening + .trilogies { margin-top: 12px; }
.doors li, .trilogies li { border-top: 1px solid var(--rule); padding: 18px 0 16px; }
.doors li:last-child, .trilogies li:last-child { border-bottom: 1px solid var(--rule); }
.doors a { font-family: var(--display); font-size: 31px; line-height: 1.15; color: var(--heading);
           text-decoration-color: var(--rule); text-decoration-thickness: 1px; }
.doors a:hover { text-decoration-color: var(--steel); }
.doors p { margin: 4px 0 0; color: var(--muted); font-size: 19px; }
.trilogies h3 { font-size: 31px; line-height: 1.15; margin: 0; }
.trilogies p { margin: 2px 0 0; font-style: italic; color: var(--muted); font-size: 19px; }
.trilogies .begun p { font-style: normal; color: var(--ink); }

.site-footer { padding-bottom: 40px; }
.site-footer ul { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer a { font-size: 17px; color: var(--muted); }

@media (max-width: 600px) {
    :root { --gutter: 20px; }
    body { font-size: 19px; }
    .masthead { padding-top: 18px; }
    .masthead .bar { flex-wrap: wrap; column-gap: 12px; }
    .masthead .site { flex: 1 1 auto; }
    .site-nav { order: 3; flex-basis: 100%; margin-left: 0; }
    .site-nav ul { gap: 4px 16px; }
    .site-nav a { font-size: 17px; }
    /* On home there is no name in the masthead: the nav and the toggle share one line. */
    .home .site-nav { order: 0; flex: 1 1 auto; flex-basis: auto; }
    .names { font-size: 20px; padding-left: 0.8em; }
    main { padding-top: 32px; }
    h1 { font-size: 46px; }
    h2 { font-size: 24px; margin-top: 44px; }
    .hero { font-size: 19vw; }
    .subtitle { font-size: 22px; }
    .label + h2 { font-size: 42px; }
    .blurb p { font-size: 20px; }
    .kicker { font-size: 26px; }
    .doors a, .trilogies h3 { font-size: 28px; }
}
