/*
 * The only stylesheet for katrinaeg.com.
 *
 * Adapted from Foundation 5 (MIT, (c) ZURB) and foundation-default-colours
 * (MIT, (c) 2014 Kenton Hamaluik).
 *
 * Phones: up to 40em. Wider screens: 40.063em and up.
 */

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, p, blockquote, th, td {
	margin: 0;
	padding: 0;
}

body {
	display: flex; /* with .page's flex-grow, keeps the footer at the bottom */
	flex-direction: column;
	min-height: 100vh;
	background: white;
	color: black;
	font-family: Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif;
	line-height: 1;
}

a { color: black; }
a:hover, a:focus { color: #666; }

img {
	display: inline-block;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

hr {
	border: solid #ddd;
	border-width: 1px 0 0;
	height: 0;
	margin: 1.25rem 0 1.1875rem;
}

/* ---------- Text ---------- */

h1, h2, h3, h4, h5, h6 {
	margin: 2rem 0 0.5rem;
	font-weight: 300;
	line-height: 1.4;
}

h1, h2, h3 { font-weight: bold; }

h1 { font-size: 2.125rem; }
h2 { font-size: 1.6875rem; }
h3 { font-size: 1.375rem; }
h4, h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
	margin: 1rem 0 1.25rem;
	line-height: 1.6;
}

ul, ol, dl {
	margin-bottom: 1.25rem;
	line-height: 1.6;
}

ul { margin-left: 1.1rem; }
ol { margin-left: 1.4rem; }
li ul, li ol { margin-left: 1.25rem; margin-bottom: 0; }

dt { margin-bottom: 0.3rem; font-weight: bold; }
dd { margin-bottom: 0.75rem; }

blockquote {
	margin-bottom: 1.25rem;
	padding: 0.5625rem 1.25rem 0 1.1875rem;
	border-left: 1px solid #ddd;
}

blockquote, blockquote p { color: #6f6f6f; line-height: 1.6; }

pre {
	padding-left: 20px;
	font-size: 1rem;
	overflow-x: auto; /* long lines scroll instead of being cut off */
}

code { font-size: 1rem; line-height: 1.5; }

table {
	margin-bottom: 1.25rem;
	border: 1px solid #ddd;
	background: white;
}

thead { background: whitesmoke; }
th, td { padding: 0.5625rem 0.625rem; color: #222; font-size: 0.875rem; line-height: 1.125rem; }
thead th { padding: 0.5rem 0.625rem 0.625rem; text-align: left; }
tr:nth-of-type(even) { background: #f9f9f9; }

/* ---------- Header and menus ---------- */

.site-header { background: black; color: white; }
.site-header a { color: white; text-decoration: none; }

/* Wide screens: one row of links */
.wide-nav { display: none; height: 45px; line-height: 45px; }
.wide-nav a { padding: 0 15px; font-size: 0.8125rem; }
.wide-nav a:hover { background: #272727; }
.wide-nav .site-title { font-size: 1.0625rem; }
.wide-nav .site-title:hover { background: none; color: #666; }

/* Phones: a menu button that opens a list (no JavaScript) */
.phone-nav summary {
	position: relative;
	height: 2.8125rem;
	padding: 0 2.8125rem;
	font-size: 1.125rem;
	font-weight: bold;
	line-height: 2.8125rem;
	text-align: center;
	cursor: pointer;
	list-style: none;
}

.phone-nav summary::-webkit-details-marker { display: none; }

.phone-nav summary::before { /* divider beside the menu icon */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 2.8125rem;
	border-left: 1px solid #4d4d4d;
}

.phone-nav summary::after { /* three-line menu icon */
	content: "";
	position: absolute;
	top: 0.3125rem;
	left: 0.8125rem;
	width: 1rem;
	height: 0;
	box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white;
}

.phone-nav ul { margin: 0; list-style: none; }
.phone-nav li a { display: block; padding: 0.66667rem; border-top: 1px solid #262626; color: #b3b3b3; }

/* ---------- Page layout ---------- */

.page { flex-grow: 1; width: 100%; max-width: 62.5rem; margin: 0 auto; }
main { min-width: 0; padding: 0 0.9375rem; }
main p, main li { overflow-wrap: break-word; } /* wrap long URLs */
.sidebar { display: none; padding: 0 0.9375rem; }

.panel {
	margin-bottom: 1.25rem;
	padding: 1.25rem;
	border: 1px solid #d9d9d9;
	background: #f2f2f2;
}

.panel h5 { margin: 0 0 0.25em; border-bottom: 2px solid; line-height: 1; }
.panel ul { margin: 0; list-style: none; }
.panel li { font-size: 0.875rem; }
.panel li a { display: block; text-decoration: none; }
.panel li a::before { content: "- "; }

.site-footer { margin-top: 2rem; padding: 1rem 0.9375rem; background: black; color: white; }
.site-footer p { margin: 0; line-height: 1.6; text-align: center; }
.site-footer a { color: #3dc06c; }
.site-footer a:hover { color: #4e8b1d; }
.rc-logo { width: 0.935em; height: 1.1475em; vertical-align: baseline; }

/* ---------- Used inside page content ---------- */

/* Rows and columns: posts/2013/03/, plus headings on category, tag and other pages */
.row { display: flex; flex-wrap: wrap; margin: 0 -0.9375rem; }
.columns { width: 100%; padding: 0 0.9375rem; }
.small-2 { width: 16.66667%; }
.small-10 { width: 83.33333%; }
.small-centered { margin: 0 auto; }
.text-right { text-align: right; }
.archive-year { border-top: 1px solid; }
.archive-entry { border-top: 1px dotted; }
.continue { text-align: right; }

/* ---------- Phones ---------- */

@media (max-width: 40.0629em) {
	table { display: block; overflow-x: auto; } /* wide tables scroll */
}

/* ---------- Wide screens ---------- */

@media (min-width: 40.063em) {
	h1 { font-size: 2.75rem; }
	h2 { font-size: 2.3125rem; }
	h3 { font-size: 1.6875rem; }
	h4 { font-size: 1.4375rem; }

	.wide-nav { display: flex; }
	.phone-nav { display: none; }

	.page { display: grid; grid-template-columns: 75% 25%; align-items: start; }
	.sidebar { display: block; }
}
