/* Shared styles for the author press kits under /author/. Each book section
   picks up its colours from the matching book page on the main site. */

:root {
    --page-bg: #efeae4;
    --page-text: #2a2320;
    --bar-bg: #d9d2ca;
    --bar-text: #1c1813;
    --link-bg: #f4f1ea;
    --link-text: #4b382a;
}

html {
    background: var(--page-bg);
}

body {
    margin: 0;
    color: var(--page-text);
    font-family: 'Libre Baskerville', serif;
    font-size: 1em;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: 'Cinzel', serif;
    margin: 0;
    line-height: 1.2;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Sections ---------------------------------------------------------- */

.kit {
    color: var(--text, var(--page-text));
    background-color: var(--bg, var(--page-bg));
}

.kit>.bar {
    padding: 0.8em 16px;
    color: var(--bar-ink, var(--bar-text));
    background: var(--bar, var(--bar-bg));
}

.kit>.bar>div,
.kit>.body {
    max-width: 960px;
    margin: 0 auto;
}

.kit>.bar h1,
.kit>.bar h2 {
    display: inline;
    font-size: 1.6em;
}

.kit>.bar .by {
    font-family: 'Libre Baskerville', serif;
    font-size: 0.85em;
    margin-left: 0.6em;
}

.kit>.bar .tag {
    display: block;
    font-size: 0.9em;
    margin-top: 0.3em;
}

.kit>.body {
    display: flex;
    gap: 2em;
    align-items: flex-start;
    padding: 2em 16px 2.5em 16px;
}

.kit>.body>.art {
    flex: 0 0 220px;
}

.kit>.body>.art img {
    display: block;
    width: 100%;
}

.kit .cover {
    filter: drop-shadow(2px 4px 6px #000a);
}

.kit>.body>.text {
    flex: 1 1 auto;
    min-width: 0;
}

.kit p {
    margin: 0 0 1em 0;
}

/* ---- Fact lists and links ---------------------------------------------- */

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.2em 1.5em;
    margin: 1.5em 0;
    font-size: 0.9em;
}

.facts dt {
    font-weight: bold;
}

.facts dd {
    margin: 0;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding: 0;
    margin: 0;
    list-style: none;
}

.links a {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 0.5em;
    color: var(--link-text);
    background: var(--link-bg);
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.media {
    columns: 2 16em;
    padding: 0;
    margin: 0 0 1.5em 0;
    list-style: none;
}

.media a {
    color: inherit;
}

.samples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 0 0 1.5em 0;
}

.samples img {
    display: block;
    height: 100px;
    width: auto;
    box-shadow: #000a 1px 1px 3px;
}

footer {
    padding: 1em 16px 2em 16px;
    text-align: center;
    font-size: 0.75em;
}

footer p {
    margin: 0.3em 0;
}

/* ---- Book themes (match the book pages on the main site) --------------- */

.furcifer {
    --bg: #2f3839;
    --text: #d4e6ea;
    --bar: #71acb7;
    --bar-ink: #181615;
    background-image: url('/img/furcifer-bottomleft.jpg'), url('/img/furcifer-bottom.jpg');
    background-repeat: no-repeat, repeat-x;
    background-position: left bottom, center bottom;
}

.blessing {
    --bg: #4f4748;
    --text: #efe6dc;
    --bar: #9c7936;
    --bar-ink: #1c1309;
    background-image: url('/img/blessing-bottomleft.jpg'), url('/img/blessing-bottom.jpg');
    background-repeat: no-repeat, repeat-x;
    background-position: right bottom, center bottom;
}

.chaos {
    --bg: #498fd4;
    --text: #140e06;
    --bar: #2e6aa6;
    --bar-ink: #eef4fb;
    background-image: url('/img/chaos-bottomleft.jpg'), url('/img/chaos-bottom.jpg');
    background-repeat: no-repeat, repeat-x;
    background-position: left bottom, center bottom;
}

.calamity {
    --bg: #140716;
    --text: #f3e7f2;
    --bar: #404274;
    --bar-ink: #39d251;
}

.lockhart {
    --bg: #353d41;
    --text: #ecdcdd;
    --bar: #d1888f;
    --bar-ink: #1c1813;
}

.gamedev {
    --bg: #fafafa;
    --text: #333;
    --bar: #444;
    --bar-ink: #e0e0e0;
}

/* ---- Small screens and print ------------------------------------------- */

@media (max-width: 640px) {
    .kit>.body {
        flex-direction: column;
        gap: 1.5em;
    }

    .kit>.body>.art {
        flex: none;
        width: 60%;
        max-width: 220px;
        align-self: center;
    }

    .facts {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .facts dd {
        margin-bottom: 0.5em;
    }
}

@media print {
    .kit {
        break-before: page;
        color: #000;
        background: none;
    }

    .kit:first-of-type {
        break-before: auto;
    }

    .links a {
        background: none;
        padding: 0;
    }

    .links a::after {
        content: " (" attr(href) ")";
    }
}
