/*
CSS Reset by Eric Meyer - Released under Public Domain
http://meyerweb.com/eric/tools/css/reset/
with new HTML 5 elements added
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; vertical-align: baseline; background: transparent; }
body  { line-height: 1; }
ol, ul { list-style: none; }
blockquote, q { quotes: none; }
blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; }
:focus { outline: 0; } /* remember to set this! */
ins { text-decoration: none; }
del { text-decoration: line-through; }
table { border-collapse: collapse; border-spacing: 0; }
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; }
*, *:before, *:after { box-sizing: border-box; }

/* All-media, mobile-first stylesheet for boxgrovepublishing.co.uk, copyright Lab 99 Web Design (http://www.lab99.com/) 2014;
revised April 2023 to incorporate a grid'n'flex layout for modern browsers; minor tweaks April 2025.
Main colours:
    #201310 : dark grey (text)
    #b3ada1 : medium grey (#main border)
    #43bad0 : light turquoise ('boxgrove', h2, h3)
    #efb647 : gold ('publishing', h2 borders)
    #047271 : dark turquoise (a:link)
    #0e7587 : lighter turquoise (a:visited)
    #870e33 : red (a:hover)
    #d02d13 : bright red (ul.comError border)
    #801807 : dark red (h2#booktitle)
    #f9d9d4 : pale red (thank-you message background)
    #e3f7fb : pale turquoise (format info background)
*/

html { height: 100%; width: 100%; --heading-font-family: "latinia", "open sans", system-ui, "segoe ui", roboto, helvetica, arial, sans-serif; }
@-ms-viewport { width: device-width; } /* IE10 hack */
@viewport { width: device-width; zoom: 1; } /* to replace HTML meta tag in due course */

@font-face {
    font-family: "oswald"; /* appropriate, eh? */ 
    font-style: normal;
    font-weight: 400;
    src: url("fonts/oswald-v23-latin-regular.eot"); /* IE9 Compat Modes (18.2 kB) */
    src: local("Oswald Regular"), local("Oswald-Regular"), local("Oswald-Regular-webfont"), 
         url("fonts/oswald-v23-latin-regular.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
         url("fonts/oswald-v23-latin-regular.woff2") format("woff2"), /* Super Modern Browsers (16.0 kB) */
         url("fonts/oswald-v23-latin-regular.woff") format("woff"), /* Modern Browsers (19.6 kB) */
         url("fonts/oswald-v23-latin-regular.ttf") format("truetype"), /* Safari, Android, iOS (35.7 kB) */
         url("fonts/oswald-v23-latin-regular.svg#Oswald") format("svg"); /* Legacy iOS (49.6 kB) */
    }
@font-face {
    font-family: "latinia";
    font-style: normal;
    font-weight: 400;
    src: local("Latinia"), local("Latinia-Regular"), local("Latinia-Regular-webfont"), 
         url("fonts/Latinia.woff") format("woff"), /* Modern Browsers (20.1 kB) */
         url("fonts/latinia.ttf") format("truetype"), /* Safari, Android, iOS (36.4 kB) */
    }

/* main elements, including default float-based layout for older browsers */
body  { background: #fff; color: #201310; font-family: "open sans", system-ui, "segoe ui", roboto, helvetica, arial, sans-serif; font-size: 100%; font-size: calc(15px + 0.390625vw); line-height: 160%; text-align: left; width: 100%; } /* font-size tip: https://matthewjamestaylor.com/responsive-font-size */
contain-er  { display: block; margin: 0 auto; max-width: 750px; padding: 0 3% 1em 3%; width: 94%; }
book-description, book-formats  { float: left; width: 100%; }
book-availability, rec-prices, purchase-now, free-sample, #contact  { float: left; margin: 1em 0 0 0; width: 100%; }

/* headings */
h1, h2, h3 { color: #43bad0; font-family: var(--heading-font-family); font-weight: bold; } /* old browsers will use the standard text font */
h1  { font-size: 250%; letter-spacing: 0.06em; line-height: 115%; margin: 0.1em 0 0 0; }
#publishing  { color: #efb647; }
h2  { border-top: 2px solid #efb647; border-bottom: 2px solid #efb647; color: #43bad0; font-size: 170%; letter-spacing: 0.03em; line-height: 130%; margin: 0.5em 0 0.7em 0; padding: 0.3em 0; width: 100%; }
#book-title  { border-top: none; border-bottom: none; color: #801807; font-family: "oswald", var(--heading-font-family); margin: 0.4em 0; padding: 0; }
h3  { color: #43bad0; font-size: 130%; letter-spacing: 0.03em; line-height: 140%; margin: 1em 0 0 0; }

/* paragraphs and lists */
p  { margin: 0.7em 0 0 0; text-wrap: pretty; }
ul  { list-style: disc; margin: 0.3em 0 0 0; padding: 0 0 0 20px; }
li  { padding: 0.1em 0; }
li::marker  { color: #43bad0; } /* coloured dots! */
book-description li::marker  { color: #801807; }

/* hyphenation (from https://clagnut.com/blog/2395) */
p  { hyphens: auto; hyphenate-limit-chars: 6 3 3; hyphenate-limit-lines: 2; hyphenate-limit-last: always; hyphenate-limit-zone: 8%; }

/* images */
img  { float: left; height: auto; margin: 0.7em 1em 0 0; max-width: 100%; }
#book-cover  { margin: 1em 0 1.5em 0; }
#payhip-logo  { border-top: 1px solid #43bad0; border-bottom: 1px solid #43bad0; } /* not currently in use */

/* minor elements */
strong  { font-weight: bold; }
em, cite, .email-odd  { font-style: italic; }
abbr  { border-bottom: 1px dotted #201310; cursor: help; speak: spell-out; text-decoration: none; }
noscript  { background: #f9d9d4; border-left: 5px solid #801807; color: #801807; padding: 0.3em 0 0.3em 20px; }
.print-only  { display: none; }

/* links */
a:link  { color: #047271; text-decoration: underline; }
a:visited  { color: #0e7587; }
a:hover { border-bottom: 1px solid #870e33; color: #870e33; text-decoration: none; }
a:active  { color: #333; }
a:focus  { color: #000; outline: 3px solid #000; outline-offset: 0.25rem; }

/* keyboard focus (see https://www.sarasoueidan.com/blog/focus-indicators/) */
a:focus-visible, input:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 6px white; outline: 9px double black; z-index: 100; }

/* amazon, download, and google play links */
.saleslink-p  { border-bottom: 1px dotted #43bad0; border-top: 1px dotted #43bad0; font-family: var(--heading-font-family); margin: 1.2em 0; padding: 0.8em 0; } /* for a single product */
.saleslink-ul  { border-bottom: 1px dotted #43bad0; font-family: var(--heading-font-family); list-style: none; margin: 1em 0 0.5em 0; padding: 0; } /* for more than one product */
.saleslink-li  { border-top: 1px dotted #43bad0; padding: 0.8em 0; width: 100%; }
.am-link-a, a.dl-link-a  { margin: 0 0 0 0.2em; }
#google-play-a:link  { background: transparent; border: 3px solid #43bad0; display: block; height: 69px; margin: 0.5em 0; padding: 3px; text-decoration: none; max-width: 200px; }
#google-play-a:hover  { border: 3px solid #b52e17; }
#google-play-img  { margin: 0; }

/* contact form */
form  { margin: 0.3em 0 0 0; width: 100%; }
legend  { display: none; }
.form-div  { float: left; margin: 1em 0 0 0; width: 100%; }
label  { float: left; width: 100%; }
input, textarea  { background: #fff; border: 3px solid #43bad0; font: inherit; margin: 0.5em 0 0 0; padding: 5px; width: 95%; }
input:hover, textarea:hover  { background: #f1f2f4; }
input:focus, textarea:focus  { outline: 3px solid #43bad0; }
input:user-invalid  { border-color: red; } /* if the email field does not contain a correct email format */
input:user-valid  { border-color: #43bad0; } /* normal turquoise if the correct email format is entered */
input#phone, input#mail  { height: 0; }
.comSubmit  { background: #801807; border: 1px solid #6b1406; color: #fff; font-weight: bold; margin: 0 0 0 0.5em; padding: 0.3em 0.6em; width: auto; }
.comSubmit:hover  { background: #b52e17; border: 1px solid #8c2312; color: #fff; text-decoration: underline; }
.comSubmit:focus  { background: #fff; color: #b52e17; }
.comError  { border: 5px solid #d02d13; font-weight: bold; padding: 0.5em 2em; } /* non-HTML 5 browers only */
.comThanks  { background: #f9d9d4; border-left: 5px solid #801807; color: #801807; font-size: 130%; margin: 5em 0; padding: 0.5em 2em; } /* not in use if there's a Thank You page */

/* footer */
#footer-ul  { border-top: 10px solid #43bad0; float: left; list-style: none; padding: 0.5em 0; width: 100%; }
#toplink-li  { margin: 1em 0 0 0; }
#toplink-a  { background: #fff; border: 5px solid #efb647; padding: 0.4em 1em 0.5em 1em; text-decoration: none; }
#toplink-a:hover  { border: 5px solid #870e33; }
#toplink-a:focus  { outline: 3px solid #870e33; }
#toplink-arrow  { font-size: 150%; padding: 0 0.3em 0 0; } /* &#9652; x 1.5 is more consistent in size between browsers than &#9650; x 1.0 */
#credit-li  { margin: 1.5em 0 0 0; }

/* error & thanks pages */
#h1-a  { color: inherit; text-decoration: none; }
#h1-a:hover  { border-bottom: 2px solid #efb647; color: #efb647; }




/* grid-based layout */

@supports (display: grid) { /* to weed out older browsers */

/* first, make float-based stuff flex'n'grid-friendly */

/* custom elements (inline by default) */
contain-er, book-description, book-formats, format-pb, format-epub, format-mobi, book-availability, available-from, rec-prices, purchase-now, format-info-epub, format-info-calibre, free-sample  { display: block; }

/* main elements */
contain-er  { margin: 0; max-width: 100%; padding: 0 0 1em 0; width: 100%;
    display: grid; 
    grid-template-columns: 3% 94% 3%;
    }
header, main, #contact, footer  { display: flex; flex-direction: column; grid-column: 2; }
main  { border-bottom: 10px solid #43bad0; margin: 0 0 1em 0; padding: 0 0 2em 0; }
#error main, #thanks main  { border-bottom: none; }
#error article, #thanks article  { display: flex; flex-direction: column; }

/* footer */
footer  { font-family: var(--heading-font-family); }
#error #footer-ul, #thanks #footer-ul  { border-top: 2px solid #43bad0; margin: 1em 0 0 0; padding: 0; }

/* interior grid */
#book-intro  { grid-area: book-intro; }
#book-title  { grid-area: book-title; }
book-description  { grid-area: book-description; }
#book-cover  { grid-area: book-cover; }
book-formats  { grid-area: book-formats; }
book-availability  { grid-area: availability; }
rec-prices  { grid-area: prices; }
purchase-now  { grid-area: purchase; }
free-sample  { grid-area: sample; }
article  {
    display: grid;
    grid-template-columns: 1fr; 
    grid-template-rows: auto;
    grid-template-areas: 
        "book-intro"
        "book-title"
        "book-description"
        "book-cover"
        "book-formats"
        "availability" 
        "prices"
        "purchase"
        "sample";
    }

/* contact form */
.form-div  { display: flex; flex-direction: column; }
#send-div  { align-items: center; flex-flow: row wrap; margin: 1.5em 0 0 0; }
label { padding: 0.3em 0; width: 100%; }
input, textarea  { max-width: 600px; padding: 0.4em 0.6em; width: 100%; }
.comSubmit  { margin: 0 0 0 1em; width: auto; }

/* other */
#google-play-a:link  { display: flex; height: auto; }


@media all and (min-width: 520px)  { /* Amazon and download links boxed */

.am-link-a:link, .am-link-a:visited  { background: #801807; border: 1px solid #6b1406; color: #fff; margin: 0 0 0 0.5em; padding: 0.4em 0.6em; text-decoration: none; }
.am-link-a:hover  { background: #b52e17; border: 1px solid #8c2312; color: #fff; text-decoration: underline; }
.am-link-a:focus  { outline: 3px solid #201310; }
.dl-link-a:link, .dl-link-a:visited  { background: #2fa7bd; border: 1px solid #047271; color: #fff; margin: 0 0 0 0.5em; padding: 0.4em 0.6em; text-decoration: none; }
.dl-link-a:hover  { background: #047271; color: #fff; text-decoration: underline; }
.dl-link-a:focus  { outline: 3px solid #201310; }
.am-link-a:visited, .dl-link-a:visited  { color: #fff; }
.am-link-span, .dl-link-span  { background: transparent url(images/arrow-white-6x9.png) 100% 50% no-repeat; padding: 0 18px 0 0; text-decoration: 1px 1px 1px #000; }

}


@media all and (min-width: 650px)  { /* more intensive CSS */

article  {
    grid-template-columns: 260px 1fr;
    grid-template-areas: 
        "book-intro       book-intro"
        "book-title       book-title"
        "book-description book-description"
        "book-cover       book-formats"
        "availability     availability"
        "prices           prices"
        "purchase         purchase"
        "sample           sample";
    }
h1  { text-shadow: 1px 1px 1px #666; }
book-description  { margin: 0 0 1em 0; }
.saleslink-ul  { border-bottom: none; margin: 0.4em 0 0.2em 0; }
.saleslink-li, .saleslink-p  { background: url(images/flags-32x384-transparent-01.png) 0 14px no-repeat; height: 60px; line-height: 60px; padding: 0 0 0 45px; }
.saleslink-p  { margin: 0.7em 0 0 0; } /* for a single product */
.saleslink-li:first-of-type  { border-top: none; }
#uk  { background: url(images/flags-32x384-transparent-01.png) 0 -50px no-repeat; }
#eu  { background: url(images/flags-32x384-transparent-01.png) 0 -114px no-repeat; }
#ca  { background: url(images/flags-32x384-transparent-01.png) 0 -178px no-repeat; }
#aus  { background: url(images/flags-32x384-transparent-01.png) 0 -242px no-repeat; }
#nz  { background: url(images/flags-32x384-transparent-01.png) 0 -308px no-repeat; }
#za  { background: url(images/flags-32x384-transparent-02.png) 0 14px no-repeat; }
#es  { background: url(images/flags-32x384-transparent-02.png) 0 -50px no-repeat; }
#de  { background: url(images/flags-32x384-transparent-02.png) 0 -114px no-repeat; }
#fr  { background: url(images/flags-32x384-transparent-02.png) 0 -178px no-repeat; }
#it  { background: url(images/flags-32x384-transparent-02.png) 0 -242px no-repeat; }
#nl  { background: url(images/flags-32x384-transparent-02.png) 0 -308px no-repeat; }
.am-link-a:link, .am-link-a:visited  { background: #801807; background: linear-gradient(#8c2312, #6b1406); border-radius: 5px; }
.am-link-a:hover  { background: #b52e17; border: 1px solid #8c2312; }
.dl-link-a:link, .dl-link-a:visited  { background: #2fa7bd; background: linear-gradient(#43bad0, #15889d); border-radius: 5px; }
.dl-link-a:hover  { background: #047271; }
input, textarea  { border-radius: 3px; }
.comSubmit  { background: linear-gradient(#8c2312, #6b1406); }
#book-cover  { box-shadow: 5px 5px 5px rgba(0,0,0,0.5); }
#google-play-img  { box-shadow: none; }
#google-play-a:link  { border-radius: 9px; }
#gotop-a  { border-radius: 5px; }
#gotop-a:focus  { border-radius: none; }
#credit-li  { background: url(images/lab99-icon-22x22-05.png) 0 50% no-repeat; height: 30px; line-height: 30px; padding: 0 0 0 30px; }
#lab99-a  { text-decoration: none; }

}



@media all and (min-width: 800px)  { /* small-monitor layout: main content now enclosed by a grey box */

html { scrollbar-color: #43bad0 #efb647; }
::-webkit-scrollbar { background: #efb647; border-left: 1px solid #43bad0; border-right: 1px solid #43bad0; }
::-webkit-scrollbar-thumb  { background: #43bad0; }
body  { background: #f1f2f4; }
contain-er  { grid-template-columns: 1fr 770px 1fr; }
main, #error main, #thanks main  { background: #fff; border: 10px solid #b3ada1; margin: 0 0 1em 0; padding: 0.8em 30px 2em 30px; width: auto; }
article  {
    grid-template-columns: 1fr 240px;
    column-gap: 30px;
    grid-template-areas: 
        "book-intro       book-intro"
        "book-title       book-title"
        "book-description book-cover"
        "book-formats     book-formats"
        "availability     availability"
        "prices           prices"
        "purchase         purchase"
        "sample           sample";
    }
h1  { background: #fff url(images/boxgrove-logo-80x80-01.png) 0 50% no-repeat; margin: 20px 0; line-height: 80px; min-height: 80px; padding: 0 0 0 110px; }
book-formats  { border-top: 1px solid #efb647; margin: 1em 0 0 0; padding: 1em 0; }
book-availability, purchase-now  { margin: 1em 0 0 0; }
rec-prices  { margin: 2em 0 0 0; }
free-sample, #contact  { margin: 1.5em 0 0 0; }
.saleslink-li, .saleslink-p  { padding: 0 0 0 50px; }
#google-play-a  { margin: 1em 0 0.5em 0; }
form  { max-width: 650px; }

}


@media all and (min-width: 1050px)  { /* large-monitor layout */

contain-er  { grid-template-columns: 1fr 1020px 1fr; }
main, #error main, #thanks main  { border: 20px solid #b3ada1; padding: 0.8em 50px 2.5em 50px; }
article  {
    grid-template-columns: 240px 1fr;
    column-gap: 40px;
    grid-template-areas: 
        "book-intro   book-intro"
        "book-title   book-title"
        "book-cover   book-description"
        "book-formats book-formats"
        "availability availability"
        "prices       prices"
        "purchase     purchase"
        "sample       sample";
    }
.saleslink-li, .saleslink-p  { background: url(images/flags-32x384-transparent-01.png) 0 19px no-repeat; height: 70px; line-height: 70px; padding: 0 0 0 55px; }
.saleslink-li:first-of-type  { border-top: none; }
#uk  { background: url(images/flags-32x384-transparent-01.png) 0 -45px no-repeat; }
#eu  { background: url(images/flags-32x384-transparent-01.png) 0 -110px no-repeat; }
#ca  { background: url(images/flags-32x384-transparent-01.png) 0 -174px no-repeat; }
#aus  { background: url(images/flags-32x384-transparent-01.png) 0 -238px no-repeat; }
#nz  { background: url(images/flags-32x384-transparent-01.png) 0 -302px no-repeat; }
#za  { background: url(images/flags-32x384-transparent-02.png) 0 19px no-repeat; }
#es  { background: url(images/flags-32x384-transparent-02.png) 0 -45px no-repeat; }
#de  { background: url(images/flags-32x384-transparent-02.png) 0 -110px no-repeat; }
#fr  { background: url(images/flags-32x384-transparent-02.png) 0 -174px no-repeat; }
#it  { background: url(images/flags-32x384-transparent-02.png) 0 -238px no-repeat; }
#nl  { background: url(images/flags-32x384-transparent-02.png) 0 -302px no-repeat; }
available-from  { display: flex; flex-direction: row; justify-content: space-evenly; }
#available-here  { border-right: 2px solid #43bad0; padding: 0 30px 0 0; }
#available-elsewhere  { padding: 0 0 0 45px; }
format-info  { background: #e3f7fb; border-left: 1px solid #43bad0; border-right: 1px solid #43bad0; font-size: 95%; margin: 1.5em 0 2em 0; padding: 1em 2.5em 1.75em 2.5em; display: flex; flex-direction: row; justify-content: space-evenly; text-align: justify; }
#format-info-epub  { border-right: 1px solid #43bad0; padding: 0 2.5em 0 0; }
#format-info-calibre  { padding: 0 0 0 2.5em; }
}



@media all and (min-width: 1250px)  { /* extra-wide layout */

contain-er  { grid-template-columns: 1fr 1220px 1fr; }
main, #error main, #thanks main  { border: 30px solid #b3ada1; padding: 1em 60px 2.5em 60px; }
article  { column-gap: 50px; }
#format-intro  { grid-area: format-intro; }
format-pb  { grid-area: format-pb; }
format-epub  { grid-area: format-epub; }
format-mobi  { grid-area: format-mobi; }
book-formats  {
    display: grid;
    grid-template-columns: 210px 500px 290px; 
    grid-template-rows: 2;
    column-gap: 30px;
    grid-template-areas: 
        "format-intro format-intro format-intro"
        "format-pb    format-epub  format-mobi"; 
    }
format-pb, format-epub, format-mobi  { margin: 1em 0 0 0; }
#format-epub-h3  { margin: 0; padding: 0 30px; }
#format-pb-h3, #format-mobi-h3  { margin: 0; }
#format-epub-ul  { border-left: 2px solid #43bad0; border-right: 2px solid #43bad0; padding: 0 28px 0 48px; }

}


} /* end of @supports (display: grid) */



@media print  { /* print layout (Sitepoint's article is worth reading: https://www.sitepoint.com/css-printer-friendly-pages/) */

@page  { margin: 1.5cm 2cm; }
body  { background: #fff; color: #000; font: 12pt/170% georgia, serif; text-align: justify; }
container { margin: 0; padding: 0; width: 100%; }
container, article, aside  { display: flex; flex-direction: column; }
main  { background: #fff; border: none; margin: 0; padding: 0; }
h1, h2, h3, #publishing, #book-title  { border: none; color: #000; font-weight: bold; break-after: avoid; text-shadow: none; }
h1  { font-size: 24pt; margin: 0.25cm 0; }
h2  { font-size: 20pt; margin: 0.5cm 0 0 0; padding: 0; }
#book-title  { font-size: 22pt; margin: 0.75cm 0 0.5cm 0; }
h3  { font-size: 14pt; margin: 0.5cm 0 0 0; }
p  { orphans: 3; widows: 3; }
li::marker, book-description li::marker  { color: #000; }
a:link  { color: #000; text-decoration: none; }
a:visited  { color: #000; }
a.print-url[href]:after { content: " (" attr(href) ")"; }
.saleslink-p  { background: none; border: none; height: auto; line-height: 160%; padding: 0.2cm 0; width: 100%; }
.saleslink-ul  { border: none; margin: 0.3cm 0 0 0; }
.saleslink-li  { background: none; border: none; height: auto; line-height: 160%; padding: 0.2cm 0; width: 100%; }
.am-link-a:link, .am-link-a:visited, .dl-link-a:link, .dl-link-a:visited  { background: none; border: none; color: #000; margin: 0; padding: 0; text-decoration: none; }
.am-link-span, .dl-link-span  { background: none; padding: 0; text-decoration: none; }
#google-play-a:link  { background: none; border: none; display: inline; height: auto; margin: 0.2cm 0; padding: 0; max-width: 100%; width: 100%; }
#google-play-img  { display: none; }
*  { background-image: none important!; } /* just in case browsers decide to put them in! */
img  { break-inside: avoid; }
abbr  { border-bottom: none; }
.no-print, form  { display: none; }
.print-only  { display: block; }
.am-link-a, a.dl-link-a  { margin: 0 0 0 0.2em; }

} /* end of print styles */
