@import url('https://fonts.googleapis.com/css?family=Amethysta|Roboto:400,700&display=swap');

body {
    font-family: Roboto, sans-serif;
    background-color: #f5f8ff;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-image: url(bg-fs8.png);
    background-size: 600px 524px;
}
body, select, input, textarea {
    color: #111;
}
h1, h2, h3, .entry-title, .entry, #sidebar {
    text-align: center;
    font-family: 'Amethysta', Serif;
}
h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 0.1em;
}
h2 {
    font-size: 1.5rem;
    line-height: 1.2em;
    font-weight: normal;
    margin: 0 0 0.5em 0;}
h3 {
    font-size: 1.2rem;
    font-weight: normal;
    font-style: italic;
    line-height: 1.2em;}
ul, ol {
    font-size: 1.30rem;}
p {
    font-size: 1.30rem;
    font-weight: normal;
    font-style: normal;
    line-height: 2.15rem;
    margin-bottom: 2rem;}
p small {
    line-height: 1rem;
}
footer {
    border-top: 4px solid #333;
    margin-top: 2em;
    padding-right: 50px;
    background: url(trlogo.png) bottom right no-repeat;
    background-size: 40px 40px;
}
footer p {
    font-size: 0.8rem;
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    margin-bottom: 0.1rem;
}

main {
    max-width: 48rem;
    padding: 2rem;
    margin: auto;
}
a {
  color: #66f;
}
a:visited {
  color: #88d;
}

#lines a {
    color: #ccc;
}

div.warnings p {
    margin-bottom: 0;
    margin-top: 0;
}
div.warnings p:last-child {
    margin-bottom: 2rem;
}
div.warnings p:first-child {
    margin-top: 2rem;
}

article {
    display: grid;
    grid-template-columns: 100px 1fr 1fr 4fr 100px;
    grid-template-rows: 40px auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}
article div.thumb {
    grid-column-start: 1;
    grid-row-start: 1;
    grid-row-end: span 2;
}
article div.count {
    grid-column-start: 2;
    grid-row-start: 1;
}
article div.speaker {
    grid-column-start: 3;
    grid-row-start: 1;
    font-weight: bold;
}
article div.episode {
    grid-column-start: 4;
    grid-row-start: 1;
}
article div.links {
    grid-column-start: 5;
    grid-row-start: 1;
    grid-row-end: span 2;
}
article div.line {
    grid-column-start: 2;
    grid-row-start: 2;
    grid-column-end: span 3;
}

#list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#list ul li {
  margin: 0;
  padding: 0;
}
form p, form ul {
    font-size: 0.7em;
}
form ul {
    display: grid;
    margin: 1em 0;
    padding: 0;
    grid-template-columns: repeat(9, 1fr);
}
form li {
    margin: 0;
    padding: 0 1.1em 0 0.4em;
    list-style: none;
    white-space: nowrap;
}
form li input[type=checkbox] {
    vertical-align: middle;
}
form input[type=submit] { display: block; }
#results {
    margin-top: 1em;
}
p.unprocessed-warning {
    line-height: 1;
    padding: 1em;
    border: 1px solid #600;
    background: #fdd;
}
#lines p.unprocessed-warning a {
    color: #a00;
}
nav {
    padding: 1em 0;
    margin: 1em 0;
    border: 1px solid #eee;
    border-width: 3px 0;
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
}
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
nav ul li {
    flex: 1 1 auto;
    padding: 0 1em;
}
nav ul li:nth-child(1) {
    border-right: 3px solid #eee;
    text-align: right;
}

:target { /* box around linked-to item */
    position: relative;
    scroll-margin-top: 8em;
}
:target:not(.mediaref)::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -0.5em;
    left: -0.5em;
    right: -0.5em;
    bottom: -0.5em;
    background: #ff880033;
    border: 2px solid #ff880088;
}

input[type="search"] {
    border-width: 0;
    border-radius: 5px;
    box-shadow: rgba(220, 220, 255, 0.4) 4px 4px 2px;
    padding: 0.5em;
    font-size: 1.5em;
    width: 100%;
    background: white;
}

.prevnext {
    display: flex;
}
.prevnext a {
    flex: 1 1 auto;
}
.prevnext .prev {
    padding-right: 1em;
}
.prevnext .next {
    padding-left: 1em;
    text-align: right;
}
.prevnext .crwiki {
    width: 57px;
    height: 40px;
    text-indent: -1000em;
    background: url(crwiki.png) center center no-repeat;
    background-size: contain;
}
#lines + .prevnext {
    margin-top: 2em;
}
span.unprocessed {
    font-size: 60%;
    background: yellow;
}
img.thumb {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}
.links a {
    display: block;
    width: 104px;
    height: 44px;
    line-height: 44px;
    text-align: right;
    padding-right: 50px;
    box-sizing: border-box;
    background-repeat: no-repeat;
    background-size: 44px 44px;
    background-position: center right;
    color: black;
    font-size: 10px;
    text-decoration: none;
    /* https://codepen.io/sosuke/pen/Pjoqqp */
    filter: invert(39%) sepia(73%) saturate(3564%) hue-rotate(227deg) brightness(102%) contrast(51%);
}
.links a:nth-child(1) {
    background-image: url(document.svg);
    margin-bottom: 2px;
}
.links a:nth-child(2) {
    background-image: url(video.svg);
}
.links a:visited {
    /* https://codepen.io/sosuke/pen/Pjoqqp */
    filter: invert(60%) sepia(19%) saturate(1170%) hue-rotate(201deg) brightness(90%) contrast(92%);
}

.cr-theme {
    background: rgba(0, 0, 0, 0.2);
    text-indent: -1000em;
    position: relative;
    padding: 1em;
}
.cr-theme::after {
    text-indent: 0;
    position: absolute;
    top: 0;
    left: 0;
    content: "🎼 Your Turn To Roll";
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    font-size: 1.3em;
}
.cr-theme a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

mark {
    font-weight: bold;
    background: rgba(255, 255, 0, 0.4);
}

@media (max-width: 800px) {
    h1 { font-size: 1.3em; }
    h2 { font-size: 1.3em; }
    main { padding: 0.5rem; }
    nav ul { font-size: 1em; }
    form ul { grid-template-columns: repeat(3, 1fr); }
    input[type="search"] { width: 100%; font-size: 1.2em; border-color: #777; }

    article {
        grid-template-columns: 40px 1fr 3fr auto;
        grid-template-rows: auto auto auto;
        grid-gap: 10px;
    }
    article div.thumb {
        grid-column-start: 1;
        grid-row-start: 1;
        grid-row-end: span 2;
    }
    article div.count {
        grid-column-start: 2;
        grid-row-start: 1;
    }
    article div.speaker {
        grid-column-start: 3;
        grid-row-start: 1;
        font-weight: bold;
    }
    article div.episode {
        grid-column-start: 2;
        grid-row-start: 2;
        grid-column-end: span 2;
    }
    article div.links {
        grid-column-start: 4;
        grid-row-start: 1;
        grid-row-end: span 2;
    }
    article div.line {
        grid-column-start: 1;
        grid-row-start: 3;
        grid-column-end: span 4;
    }
    img.thumb {
        width: 40px;
        height: 40px;
    }
    .links a {
        width: auto;
    }
}

/* timestamps */
  dt a:hover::before {
    position: absolute;
    content: attr(data-ts);
    transform: translateX(-110%);
  }
  dt a:hover {
    position: relative;
  }
  dd:target { position: relative; }
  dd[data-ts]:target::before {
    content: attr(data-ts);
    position: absolute;
    top: 0;
    right: 0;
    text-align: right;
    transform: translateY(-120%);
    color: rgba(0, 0, 0, 0.5);
  }

ul.names button {
    border-radius: 1px;
    text-transform: uppercase;
    border-width: 1px;
    border: 2px solid #8f8f9d;
    background: transparent;
    font-size: 1em;
}

.crs_credit, dd.mediaref {
    text-align: right;
    font-size: 80%;
    color: #040;
}
.crs_credit a, #lines dd.mediaref a {
    color: #040;
}
#lines dd.mediaref a:first-child, .crs_credit a.crs {
    text-indent: -1000em;
    display: inline-block;
    width: 42px;
    height: 16px;
    background: url(mediarefs/crstats.png) center center no-repeat;
    overflow: hidden;
    color: transparent;
    vertical-align: middle;
}
