/* Squarewheels website: new, combined style-sheet, taking as its basis the HDL one.  Wrangled into shape on 26 FBY 2020 */

/* General page setup directives */
body {
    background-image: url(/pics/squarewheels.org.uk_logo-bg-eeeeee.gif);
    background-position: center;
    background-attachment: fixed;
    background-color: #eeeeee;
    color: #000000;
    font-family: Baskerville, serif;
}

a:hover {
    background-color: #ffffcc;
    color: #000000;
}

div.standout a:hover {
    background-color: pink;
    color: black;
}

a:active {
    background-color: #ffffff !important;
    color: red !important;
}

p {
    text-align: justify;
    margin-top: 1em;
    font-size: 14pt;
    line-height: 1.4em;
}

li {
    font-size: 14pt;
    line-height: 1.4em;
}

body > p.intro:first-letter, body > p:not([class]):first-letter { /* Makes the first letter larger in all non-special paragraphs (but including Intros) */
    font-size: 1.2em;
}

.contents p, ul li {
    text-align: left;
}

h1, .top, p.intro {
    text-align: center;
    color: #007700;
}

h2 {
    margin-top: 2em;
}

h2.top {
    margin-left: 0;
}

.top {
    font-style: italic;
    margin-top: 0em;
}

.cleared, h2, h3 { /* HDL doesn't have the h2, h3 but we needed it on SQW */
    clear: both;
}

.contents a {
    font-size: larger;
}

.contents span {
    color: red;
}

.mod {
    font-style: italic;
}

p.mod:before {
    content: "📅 ";
}

.aside {
    font-size: smaller;
}

.pickout {
    letter-spacing: 0.04em;
}

.quotation {
    margin-left: 2.5em;
}

abbr {
    cursor: help;
    border-bottom: 1px dashed;
}

sup, sub {
    vertical-align: baseline;
    position: relative;
    top: -0.4em;
}

sub {
    top: 0.3em;
}

.super {
    vertical-align: 0.27em;
    font-size: 75%;
}


/* Automatic customising of external links */

a.extlnk:before {
    content: "[";
    color: black;
    text-decoration: none;
}

a.extlnk:after {
    content: "]";
    color: black;
    text-decoration: none;
}

/* a.extlnk:link:hover:after { content: "]"; text-decoration: none; }  I don't think we need this any more? */


/* ensuring correct handling of the q element instead of lots of &#8220;&#8221; */

q:before {
    content: "“";
}

q:after {
    content: "”";
}

.no-close-quote:after {
    content: no-close-quote;
}

q q:before, q.l2:before {  /* nested (level 2) quotes */
    content: "‘";
}

q q:after, q.l2:after {
    content: "’";
}

q q q:before {  /* nested (level 3) quotes */
    content: "“";
}
q q q:after {
    content: "”";
}


/* Custom-built styles for Intro, Banner, Navbar, Standout, Standin, Important, Wow, Sidebar, Footer */

p.intro {
    font-size: 1.3em;
    margin: 1em 10%;
    padding: 0.4em;
}

div.banner {
    margin: 0.4em 12.5% 1em;
    background-color: #cccc99; /* fallback for older browsers */
    background-color: rgba(174,174,53,0.5);  /* semi-transparent */
    color: #000000;
    border: ridge 0.3em;
    border-radius: 1em;
    padding: 0.6em;
}

div.banner p, div.banner li {
    text-align: center;
    line-height: 1.2em;
    font-size: 1.2em;
}

div.banner li {
    text-align: left;
}

div.banner h2 {
    margin: 0;
}

div.banner span {
    color: #ff0000;
    font-weight: bold;
}

.navbar {
    text-align: center;
    font-size: 120%;
}

div.standout {
    margin: 1em -3.5em;
    padding: 0.7em 3.5em;
    background-color: #ffffcc;
    color: #000000;
    border-style: none;
    border-radius: 1em;
}

div.standout p {
    margin-top: 1.2em;
}

div.standout h2:first-child {
    margin-top: 1em;
}

span.standout {
    color: #000000;
    background-color: #ffffcc;
}

div.standin {
    margin: 1em -3.5em;
    padding: 0.7em 3.5em;
    background-color: #cccccc;
    color: #000000;
    border-style: none;
    border-radius: 1em;
}

div.standin:nth-last-child(2) { /* this keeps footnotes-sections, which are the 2nd-to-last element, square-cornered. */
/* removed as unwanted, and interferes with other things */
}

span.standin {
    color: #000000;
    background-color: #cccccc;
}

p.important, div.important {
    margin: 0.5em 8%;
    background-color: #ffffcc;
    color: #000000;
    padding: 0.7em;
    text-align: center;
}

.wow {
    color: #ff0000;
    font-weight: bold;
}

div.sidebar {
    width: 25%;
    float: right;
    margin: 0 0 1em 1em;
    padding: 0 0.5em;
    border: double 3px black;
    background-color: #ffeeee;
    border-radius: 0.5em;
}

div.sidebar p {
    text-align: left;
}

div.footer {
    border-top: solid;
    border-bottom: solid;
    border-width: 0.2em;
    border-color: #aaaaaa;
    padding: 0.3em 0em 0.5em;
}

div.footer p {
    margin: 0.15em 0 0;
    text-align: left;
}

p.footer {
    margin: 0.2em 0;
}


/* Photographs and their captions */

div.photos img {  /* for 'inline'-style photos having no link */
    border-style: none;
}

div.thumbnails img {  /* I use "div.thumbnails" to enclose non-fullsize thumbnails of any size, typically width=600px */
    border: solid 2px;
}

div.photos, div.thumbnails {
    text-align: center;
}

div.photos img, div.thumbnails img, img {  /* centre-ifies photos, incl for mobile and incl non-divved imgs */
    margin: 0;
    max-width: 98%;
    height: auto;
}

p.caption {
    font-style: italic;
    text-align: center;
}

p.caption span {
    font-style: normal;
}


/* RIGHT-aligned and LEFT-aligned photos here:  */

.iconr img {
    border-style: none;
    padding: 0.6em 0 0.6em 0.6em;
    float: right;
}

.photl img {
    border-style: none;
    padding: 0 1.5em 1em 0;
    float: left;
}

.photr img {
    border-style: none;
    padding: 0 0 1em 1em;
    float: right;
}

.thumbr img {
    border: solid 2px;
    margin: 0 0 1em 1em;
    float: right;
}

.thumbl img {
    border: solid 2px;
    margin: 0 1em 1em 0;
    float: left;
}


/* For the SQW logo at the tops of pages */

h1 img {
    vertical-align: middle;
}

span.logo {
    font-style: italic;
}

span.logo span {
    font-style: normal;
    font-size: smaller;
}


/* Other directives */

p.quote { /* used at tops of several pages */
    text-align: center;
}

p.quote span { /* used within quotations that appear at tops of several pages */
    color: #666666;
    font-style: italic;
}

.update { /* used only on the audio page at present */
    text-align: right;
    font-size: smaller;
    font-style: italic;
}


/* For users on quite-narrow screens (iPhone 8 Plus in portrait mode is 414px) */
@media only screen and (max-width: 414px) {

    h1 span.logo {
	font-size: 80%;
    }

    h1 img {
	width: 50px;
	height: auto;
	margin: 0;
    }

}


/* For users on pretty-narrow screens (iPhone 8 in portrait mode is 375px) */
@media only screen and (max-width: 375px) {

    h1 span.logo { /* shrink logo-text to avoid h-overflow */
	font-size: 75%;
    }

    h1 img { /* shrink logo to avoid h-overflow */
	width: 40px;
	height: auto;
	margin: 0;
    }

}



/* For users on the narrowest screens (iPhone SE in portrait mode is 320px) */
@media only screen and (max-width: 320px) {

    h1 span.logo { /* shrink logo-text to avoid h-overflow */
	font-size: 69%;
    }

    h1 img { /* shrink logo to avoid h-overflow */
	width: 30px;
	height: auto;
	margin: 0;
    }

}



/* For users on small screens (736px is largest dimension of biggest iPhone) */

@media only screen and (max-width: 736px) {

    html {
	-webkit-text-size-adjust: none;
    }

    h2 {
	margin-left: 1em;
    }

    div.standout {
	margin: 0em;
	padding: 0.5em;
    }

    div.standin {
	margin: 1em 0;
	padding: 0.1em 0.5em;
    }

    div.sidebar {
	width: 40%;
    }

    div.banner {
	margin: 0.4em 2.5% 1em;
    }

    body {
	margin: 0.2em 0.2em 0.2em 0.2em;
    }

    pre { /* preformatted text as used in timings-printouts etc */
	font-size: 0.75rem; /* on landscape iPhone 8+, timings virtually fit */
    }

}


/* For ALL screens bigger than iPhones */
@media only screen and (min-width: 737px) {  /* Ensure this is 1px bigger than the max-width figure! */

    body {
	margin: 2.3em 15.5% 3em;
	/* background-size: cover; */
	font-size: 1.1rem;  /* Make it a more comfortable size for reading */
    }

    h2 {
	margin-left: -2em;
    }

}



/* ADDITIONAL instructions for very wide screens */
@media (min-width: 1290px) {

    body {
	max-width: 900px;
	margin: 2.3em auto 3em auto; /* Let the page body centre itself */
    }

}



@media print {

    body {
	margin: 0;
	font-size: 80% !important;
    }

    div.thumbnails img, div.photos img, img {
	max-width: 40% !important;
	height: auto;
    }

    nav {
	display: none;
    }

    h2 {
	margin-left: 0;
    }

    p.mod:before {
	content: "";
    }

}

/* end of file */

