/* reset */
html, body, section, article, aside, nav,
div, span, h1, h2, p, a, img, ol, ul, li,
button
{
    margin:0;padding:0;border:0;outline:0;
    font-size:1em;font-weight:inherit;font-style:inherit;font-family:inherit;
    vertical-align:baseline
}
html { overflow-y: scroll }
a img { border:none }

/* layout */
body {
    height: 100vh;
    line-height:1.6em;
    font-size:20px;
    color:#2d2d2d;
    font-family:'Roboto', sans-serif;
}

section {
    max-width:1200px;
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: min-content min-content 1fr min-content min-content; /* header-nav-[article|asise]-nav-footer */
    min-width: 0;
}

section.no-aside {
    grid-template-columns: 100%;
}

section.no-aside > * {
    grid-column: 1/-1 !important;
    grid-row: auto !important;
}

section.no-aside > aside {
    display: none;
}

@media (min-width: 1001px) {
    nav button { width: 300px }
}

@media (max-width: 1000px) {
    section {
        grid-template-columns: 100%;
    }
    section > * {
        grid-column: 1/-1 !important;
        grid-row: auto !important;
    }
    section nav {
        padding-left: .25em;
    }
    section nav:first-of-type button {
        display: none;
        color: yellow;
    }
    aside {
        margin-left: .25em;
        margin-right: .25em;
    }
}

@media print {
    nav, aside, button {
        display: none !important;
    }
    header p {
        display: block !important; 
    }
}

header {
    grid-column: 1/-1;
    background:url('../images/excel-header.png') no-repeat bottom;
    background-position:0 8px;
    height:80px;
    border-bottom:2px solid #0d7239;
    margin-bottom: 2px;
}

footer {
    grid-column: 1/-1;
    border-top:solid 2px #0d7239;
    color:#0d7239;
    padding: 1em 0;
    text-align:center;
    font-size:.6em;
    margin-top: 2px;
}

footer:after {
    content: "Copyright © 2015-21 Artur Żuwała"
}

article {
    grid-column: 2/3;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1em;
}

nav {
    grid-column: 1/3;
    padding: .25em .25em .25em 0;
    font-size: .8em;
    color: #0d7239;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

nav a {
    color: #0d7239;
    padding-left: 1em;
}

nav span {
    margin-left: auto;
}

/*  aside  */
aside {
    background: #0d7239;
    color:#f0f0f0;
    grid-column: 1/2;
    grid-row: 3/4;
    font-size: .8em;
    border-radius: 4px;
}    

aside a.current {
    background: #185c37;
    pointer-events: none;
}

aside p {
    color: yellow;
    font-family:'Roboto Slab', Georgia, Arial, sans-serif;    
    font-weight: 600;
    padding: .25em 1em;
}

aside a {
    display: block;
    padding: 0 1em;
    color: white;
    text-decoration: none;
}

/* article formats */
header p, h1, h2 {
    font-family:'Roboto Slab', Georgia, Arial, sans-serif;    
    font-weight:600; 
    color:#0d7239;
}

header p {
    display: none;
    font-size: 1.4em;
    margin: 1em 0; 
}

h1 { font-size: 1.3em }

h2 { font-size: 1.1em }

h1 + h2, div + h2 { padding-top: 1rem; }
h1 + div { margin-top: 1rem }

img {
    margin: 1rem auto;
    display: block;
    max-width: 100%;
} 

section.no-aside article {
    padding-top: 1em;
}

article {
    padding-bottom: 1.5em;
}

article p {
    margin: 1em 0;
    text-align: justify;
}

article a {
    color: #0d7239;
}

/* artcle .rd & .ex */

.ex {
    border-left: 3px solid red; padding-left: 17px
}
.rd {
    border-left: 3px solid #0d7239; padding-left: 17px
}

.ex ol, .rd ol, .ex ul, .rd ul {
    padding-left: 30px;
    list-style-position: outside;
}

article li {
    text-align: justify;
}

/* checking */
div.ch {
    border-left: 3px solid #800; 
    padding-left: 17px;
    margin: 20px 0;
}
div.ch > button + * {
    display: none;
}

/* button */
button {
    display: block;
    color: #fff;
    background-color: #21a366;
    width: 150px;
    height: 40px;
    font-weight: 400;
    font-family:'Roboto', sans-serif;
    font-size: 16px;
    border: none;
    transition: background-color 300ms ease-in-out, transform 200ms ease; 
    padding:0;
    border-radius: 4px;
}

button:hover, button:focus {
    background-color: #107c41;
}

button:focus {
    outline: none;
    font-weight: 700;
}

button:active {
    transform: scale(0.9);
}

/* keys */
i, .key {
    background-color:#EEE;
    border: solid 1px black;
    border-radius: 5px;
    margin: 0 3px;
    padding: 2px 6px;
    font-family:'Courier New', Courier, monospace;
    font-style: normal;
    font-weight: 400;
    white-space: nowrap;
}

table {
    border-collapse: collapse;
	margin: 10px 0;
    margin: 0 auto;
}

table, th, td {
    border: 1px solid black;
    padding: 0 1em;
    text-align:center
}