/* Fonts */
    @font-face {
        font-family: "Captain Scarlet";
        src: url(fonts/Anderson_Captain_Scarlet.ttf);
    }
    /* font-family: "Captain Scarlet", "Six Caps", sans-serif; */
    @font-face {
        font-family: Mysteron;
        src: url(fonts/Anderson_The_Mysterons.ttf);
    }
    /* font-family: Mysteron, "Jolly Lodger", system-ui; */
    @font-face {
        font-family: Sofachrome;
        src: url(fonts/Sofachrome_Rg.otf);
    }
    /* font-family: Sofachrome, Notable, sans-serif; */
    @font-face {
        font-family: Handel;
        src: url(fonts/Handel_Gothic_Regular.ttf);
    }
    /* font-family: Handel, Goldman, sans-serif; */
    @font-face {
        font-family: fireball;
        src: url(fonts/Anderson_Fireball_XL5.ttf);
    }
    /* font-family: fireball, ??? */
    @font-face {
        font-family: stingray;
        src: url(fonts/Anderson_Stingray.ttf);
    }
    /* font-family:  */
    @font-face {
        font-family: secret;
        src: url(fonts/Anderson_The_Secret_Service.ttf);
    }
    /* font-family: secret, serif; */
    @font-face {
        font-family: thunderbirds;
        src: url(fonts/Anderson_Thunderbirds_Are_GO!.ttf);
    }
    /* font-family:  */


/*   Layout */
    body {
        display: grid;
        grid-template-columns: 200px auto 200px ;
        grid-template-rows: auto auto min-content;
        column-gap: 1ch;
        row-gap: 1ch;
        grid-template-areas:
            'left_space header right_space'
            'main_nav main local_nav'
            'main_nav footer local_nav'
        ;
        background-color: #000;
        color: #eee;
        font-family: Verdana, Geneva, Tahoma, sans-serif;
    }
    header {
        text-align: center;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        align-content: center;
        grid-area: header;
    }
    #left-space {
        grid-column-start: 1;
        grid-row-start: 1;
        padding-bottom: 1em;
        align-content: center;
        grid-area: left_space;
    }
    #right-space {
        grid-column-start: 3;
        grid-row-start: 1;
        align-content: center;
        grid-area: right_space;
    }
    #left-space img, #right-space img {
        display: block;
        margin: auto;
    }
    nav#main_nav {
        grid-column-start: 1;
        grid-row: 2 / 4;
        text-align: center;
        grid-area: main_nav;
    }
    nav#local-nav {
        grid-column-start: 3;
        grid-row: 2 / 4;
        text-align: center;
        grid-area: local_nav;
    }
    nav#local_nav {
        grid-column-start: 3;
        grid-row: 2 / 4;
        text-align: center;
        grid-area: local_nav;
    }
    main {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        grid-area: main;
    }
    section {
        clear: both;
    }
    footer {
        grid-column: 2 / 3;
        grid-row: 3 / 4;
        vertical-align: bottom;
        text-align: left;
        font-size: 0.6em;
        font-family: Arial, Helvetica, sans-serif;
        background-color: transparent;
        grid-area: footer;
    }
    div::after {
        content: "";
        clear: both;
        display: table;
    }
    subtitle {
        display: block;
    }
    subtitle:nth-of-type(1) {
        margin-top: -1.5em;
    }

dd {
    padding-bottom: 0.5em;
}
.note {
    font-size: smaller;
    font-style: italic;
}
img {
    border:0px;
}
.rfloat {
    float: right;
    padding: 0.25em 0 0.25em 0.5em;
}
.lfloat {
    float: left;
    padding: 0.25em 0.5em 0.25em 0;
}
#guide img {
    width:220px;
    aspect-ratio: (220 / 123);
}
.caps {
    text-transform: uppercase;
}
h1, subtitle {
    text-align: center;
}
div.update {
    border-bottom: solid #fff 2px;
    margin-bottom: 1.5em;
}

/* default page setting */
    body {
        background-color: #000;
        color: #eee;
        font-family: Verdana, Geneva, Tahoma, sans-serif;
    }
    a {
        color: #ff0;
    }
    footer {
        color:#aabbff;
    }
    footer p.broken {
        font-family: 'tahoma', Helvetica, sans-serif;
        color:#3fc8a6;
        font-size: 1em;
    }
    footer h4 {
        text-decoration: underline;
    }
    footer a {
        color:#fca2de;
    }
    nav a {
        font-family: "Handel", "Goldman", sans-serif;
        font-size: x-large;
        text-decoration: none;
        display: block;
        padding: 0.25em;
        text-align: center;
    }
    nav#main_nav a:nth-of-type(6n+1) {
        color: #f00;
    }
    nav#main_nav a:nth-of-type(6n+2) {
        color: #ffa500;
    }
    nav#main_nav a:nth-of-type(6n+3) {
        color: #ff0;
    }
    nav#main_nav a:nth-of-type(6n+4) {
        color: #3f3;
    }
    nav#main_nav a:nth-of-type(6n+5) {
        color: #33f;
    }
    nav#main_nav a:nth-of-type(6n+6) {
        color: #a0f;
    }

/* Supercar */
    body.supercar {
        background-color: #ffc;
        color: #000;
        & a {
            color: #c00;
        }
        & footer {
            color: #001a80;
        }
        & footer p.broken {
            color: #227762;
        }
        & nav#main_nav a:nth-of-type(6n+2) {
            color: #e69500;
        }
        & nav#main_nav a:nth-of-type(6n+3) {
            color: #bb3;
        }
        & div.episode_no_prod:nth-of-type(2n+1) {
            background-color: #ffff99;
        }
    }
/* Fireball */ /* Nebula-75 */
    body.fireball, body.nebula, body.spanner {
        & div.episode:nth-of-type(2n+1) {
            background-color: #222;
        }
        & div.episode_no_prod:nth-of-type(2n+1) {
            background-color: #222;
        }
    }
/* Stingray */
    body.stingray {
        background-color:#6cf;
        color:#000000;
        & div.episode:nth-of-type(2n+1) {
            background-color:#3bf;
        }
        & a {
            color:#b00;
        }
        & a:visited {
            color:#ff6600;
        }
        & footer {
            color:#830;
        }
        & footer p.broken {
            color:#174439;
        }
        & footer a {
            color:#8e005f;
        }
        & nav#main_nav a:nth-of-type(6n+2) {
            color: #f60;
        }
        & nav#main_nav a:nth-of-type(6n+4) {
            color: #0a0;
        }
    }
/* Joe 90 */ /* Secret Service */
body.joe90, body.secret_service {
    background-color: #590008;
    color: #ffd;
    & div.episode:nth-of-type(2n+1), div.episode_no_prod:nth-of-type(2n+1) {
        background-color: #470006;
    }
    & nav#main_nav a:nth-of-type(6n+5) {
        color: #22f;
    }
    & nav#main_nav a:nth-of-type(6n+6) {
        color: #b2f;
    }
}
/* UFO */
body.ufo {
    background-color:#229494;
    color:#000;
    & div.episode:nth-of-type(2n+1) {
        background-color:#1c7d7d;
    }
    & a:link {
        color:#600;
    }
    & nav#main_nav a:nth-of-type(6n+1) {
        color: #a00;
    }
    & nav#main_nav a:nth-of-type(6n+2) {
        color: #996300;
    }
    & nav#main_nav a:nth-of-type(6n+4) {
        color: #060;
    }
    & nav#main_nav a:nth-of-type(6n+6) {
        color: #808;
    }
}
/* Space: 1999 */
body.s1999 {
    background-color:#CFC;
    color:#000;
    & a {
       color:#c00;
    }
    & a:visited {
        color:#f60;
    }
    & nav#main_nav a:nth-of-type(6n+3) {
        color: #b3b300;
    }
    & nav#main_nav a:nth-of-type(6n+4) {
        color: #0a0;
    }
    & div.episode:nth-of-type(2n+1) {
        background-color: hsl(120, 100%, 80%);
    }
    & footer {
        color: #238;
        & .broken {
            color: #723;
        }
        & a {
            color: #c60686;
        }
    }
}
/* Terrahawks */
body.terrahawks {
    background-color: #024;
    & div.line:nth-of-type(2n+1) {
        background-color: hsl(210, 100%, 10%);
    }
}
/* Space Precinct */
body.space_precinct {
    background-color: #003;
}

/* personnel pages */
    dl.personnel {
        display: grid;
        grid-template-columns: max-content auto;
        & dt {
            grid-column-start: 1;
            font-weight: bold;
        }
        & dd {
            grid-column-start: 2;
            margin-left: 0;
            padding-left: 0.2em;
        }
    }
    .ep_link {
        font-style: italic;
    }
    .rl_info {
        margin-top: 1.5em;
    }
    .personnel_image {
        width: 250px;
        object-fit: contain;
    }
dd p {
    margin-top: 0;
}

.votm {
    color: #88ff00;
    font-variant-caps: small-caps;
    font-style: italic;
}

.italic em, i em, .note em {
    font-weight: bold;
}
.italic i, .note i {
    font-style: normal;
}
.italic i em, .note i em {
    font-style: italic;
}


/* Stills */
    img.lstill {
        padding: 0.25em 0.5em 0.25em 0;
        float:left;
        clear:left;
    }
    img.still, img.rstill, img.lstill {
        height: 8em;
        aspect-ratio: 1068 / 600;
    }
    img.still {
        margin: 0.25em;
    }
    img.rstill {
        padding:0.25em 0 0.25em 0.5em;
        float:right;
        clear:right;
    }

/* episode guides */
div.episode, div.episode_no_prod, div.dbl_ep, div.dbl_ep_no_prod {
    column-gap: 1em;
    row-gap: 0.5em;
    display: grid;
}
div.episode {
    grid-template-columns: 2em 3em auto 13em calc(1.5em / 296 * 1582);
    grid-template-areas: 
        'ep_no  prod_no ep_title    air_date    rating'
        'blurb  blurb   blurb       blurb       blurb'
    ;
}
div.episode_no_prod {
    grid-template-columns: 2.5em auto 13em calc(1.5em / 296 * 1582);
    grid-template-areas: 
        'ep_no  ep_title    air_date    rating'
        'blurb  blurb       blurb       blurb'
    ;
}
div.dbl_ep {
    grid-template-columns: 2em 3em auto 13em calc(1.5em / 296 * 1582);
    grid-template-areas: 
        'ep_no1 prod_no1    ep_title1   air_date1   rating'
        'ep_no2 prod_no2    ep_title2   air_date2   rating'
        'blurb  blurb       blurb       blurb       blurb'
    ;
}
div.dbl_ep_no_prod {
    grid-template-columns: 2.5em auto 13em calc(1.5em / 296 * 1582);
    grid-template-areas: 
        'ep_no1 ep_title1   air_date1   rating'
        'ep_no2 ep_title2   air_date2   rating'
        'blurb  blurb       blurb       blurb'
    ;
}
div.dbl_ep, div.dbl_ep_no_prod {
    display: grid;
    & .ep_no1 {
        grid-area: ep_no1;
        text-align: right;
    }
    & .ep_no2 {
        grid-area: ep_no2;
        text-align: right;
    }
    & .prod_no1 {
        grid-area: prod_no1;
    }
    & .prod_no2 {
        grid-area: prod_no2;
    }
    & .ep_title1 {
        grid-area: ep_title1;
        font-weight: bold;
    }
    & .ep_title2 {
        grid-area: ep_title2;
        font-weight: bold;
    }
    & .air_date1 {
        grid-area: air_date1;
    }
    & .air_date2 {
        grid-area: air_date2;
    }
}

div.ep_no, div.ep_no_dbl {
    text-align: right;
    grid-area: ep_no;
}
div.prod_no {
    grid-area: prod_no;
}
div.ep_title {
    grid-area: ep_title;
    font-weight: bold;
}
div.air_date {
    grid-area: air_date;
}
div.air_date, div.air_date1, div.air_date2 {
    text-align: right;
    font-style: italic;
}
    
.episode .rating div.rating_dbl {
    grid-area: rating;
}
    
.star {
    height: 1.5em;
    aspect-ratio: 1582 / 296;
}
div.blurb {
    grid-area: blurb;
    padding: 0 0.5em;
}

.end {
    font-family: 'Comic Relief', system-ui;
    padding-bottom: 2em;
    & dl {
        display: grid;
        grid-template-columns: max-content auto;
        & dt {
            grid-column-start: 1;
            text-align: right;
        }
        & dd {
            grid-column-start: 2;
            padding-bottom: 0em;
            margin-left: 0.5em;
        }
    }
}
.spotter {
    color: #f6bb78;
    font-style: italic;
    font-size: smaller;
}
.italic {
    font-style: italic;
}

.starring {
    font-family: 'Arial Narrow', 'Nimbus Sans L', sans-serif;
}

.prev-next {
    display: grid;
    grid-template-columns: auto auto;
    font-size: x-large;
    column-gap: 10ch;
    & a {
        display: block;
        text-decoration: none;
        padding: 0.5em;
        &:nth-of-type(1) {
            text-align: left;    
        }
        &:nth-of-type(2) {
            text-align: right;
        }
        &:nth-of-type(3) {
            text-align: center;
            grid-column: 1 / 3;
        }
    }
}

/* bingo */
#bingoCard {
    text-align: center;
    width: 90vh;
    display: none;
    margin: 1em auto 1em auto;
    padding: 1em;
}
#mainBingo {
    display: grid;
    grid-template-columns: calc(20% - 0.5em - 4px) calc(20% - 0.5em - 4px) calc(20% - 0.5em - 4px) calc(20% - 0.5em - 4px) calc(20% - 0.5em - 4px);
    margin-left: auto;
    margin-right: auto;
    & div {
        aspect-ratio: 1 / 1;
        align-content: center;
    }
}
#mainBingo3 {
    display: grid;
    grid-template-columns: calc(33% - 0.5em - 4px) calc(33% - 0.5em - 4px) calc(33% - 0.5em - 4px);
    margin-left: auto;
    margin-right: auto;
    & div {
        aspect-ratio: 1 / 1;
        align-content: center;
    }
}

#extra {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: small;
    text-align: left;
    & dl {
        display: grid;
        grid-template-columns: max-content auto;
        & dd {
            grid-column-start: 1;
            border: 2px solid black;
            height: 3em;
            aspect-ratio: 1 / 1;
            margin: 0.25em;
        }
        & dt {
            grid-column-start: 2;
            margin: auto 0.25em;
        }
    } 
}

.dab {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#footnotes, .footnotes{
    font-size: small;
    text-align: left;
}
#footnotes dl, dl.footnotes {
    display: grid;
    grid-template-columns: max-content auto;
    & dt {
        grid-column-start: 1;
        padding: 0.25em;
    }
    & dd {
        grid-column-start: 2;
        padding: 0.25em;
        margin: 0;        
    }
}

/* actor pages */
.show {
    width: max-content;
    float: left;
}