/*********************************************************************************/
/* YQR Transit – main stylesheet                                                 */
/* Based on "Wide-Range" by TEMPLATED (templated.co), CC BY 3.0                  */
/*********************************************************************************/

/* Variables*/

:root {
    /* Colours */
    --color-brand: #3e86d8;
    /* page edges, buttons, accents */
    --color-brand-dark: #2a67ad;
    /* menu bar*/
    --color-on-brand: #ffffff;
    /* text on blue */
    --color-surface: #ffffff;
    /* main page background */
    --color-surface-alt: #f7f7f7;
    /* shaded sections */
    --color-text: #333333;
    --color-text-muted: #595959;
    --color-heading: #2d2d2d;
    --color-border: #e6e7dc;
    --color-link: #333333;
    --color-link-accent: var(--color-brand-dark);
    --color-focus: #ffbf47;
    /* keyboard focus highlight */
    --color-focus-text: #0b0c0c;

    /* Typography */
    --font-body: 'Source Sans Pro', sans-serif;
    --font-size-base: 1rem;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-bold: 700;
    --line-height-body: 1.8;
    --line-height-tight: 1.2;

    /* Spacing scale */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 3rem;
    --space-xl: 5rem;

    /* Layout */
    --container-max: 75rem;
    --page-gutter: 1.25rem;
    /* blue edge around the white page */
    --content-padding: 1.5rem;
    /* space between page edge and text */
    --header-height: clamp(6rem, 22vw, 15rem);
    --menu-height: 4.375rem;
    --column-min: 15rem;
    --focus-width: 0.1875rem;
}

/* Smaller screen variables*/
@media (max-width: 40em) {
    :root {
        --page-gutter: 0.5rem;
        --content-padding: 1rem;
        --space-xl: 3rem;
        --space-lg: 2rem;
    }
}

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

html {
    height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: var(--color-brand);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--color-text);
}

h1,
h2,
h3 {
    margin: 0;
    padding: 0;
    text-transform: uppercase;
    font-weight: var(--font-weight-light);
    line-height: var(--line-height-tight);
    color: var(--color-heading);
}

h1 {
    padding-bottom: var(--space-md);
    font-size: 2.5em;
}

h2 {
    padding-bottom: var(--space-md);
    font-size: 2em;
}

p,
ol,
ul {
    margin-top: 0;
}

p {
    line-height: var(--line-height-body);
}

a {
    color: var(--color-link);
}

a:hover {
    text-decoration: none;
}

a img {
    border: none;
}

img,
svg,
video,
iframe {
    max-width: 100%;
    height: auto;
}

hr {
    display: none;
}

/* Accessibility*/


/* Hidden text visible by screen readers and search engines */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip to main content */
.skip-link {
    position: absolute;
    top: var(--space-xs);
    left: var(--space-xs);
    z-index: 100;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-focus);
    color: var(--color-focus-text);
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: translateY(0);
}

/* keyboard focus */
:focus-visible {
    outline: var(--focus-width) solid var(--color-focus-text);
    outline-offset: var(--focus-width);
}

/* Main focus */
main:focus {
    outline: none;
}

/* Allow animations to be turned off */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* Image styles */

.image {
    display: inline-block;
}

.image img {
    display: block;
    width: 100%;
}

table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    box-sizing: border-box;
    padding: var(--spacing-xs);
    overflow-wrap: break-word;
    word-wrap: break-word;
    vertical-align: top;
}

/* Column width distribution */
.col-ward {
    width: 8%;
}

.col-councillor {
    width: 15%;
}

.col-phone {
    width: 15%;
}

.col-neighbourhoods {
    width: auto;
}

.col-num {
    width: 15%;
}

.num {
    text-align: right;
}


.image-full {
    display: block;
    width: 100%;
    margin: 0 0 var(--space-lg) 0;
}

.image-left {
    float: left;
    margin: 0 var(--space-md) var(--space-md) 0;
}

.image-centered {
    display: block;
    margin: 0 0 var(--space-md) 0;
}

.image-centered img {
    margin: 0 auto;
    width: auto;
}

@media (max-width: 40em) {
    .image-left {
        float: none;
        display: block;
        margin: 0 0 var(--space-sm) 0;
    }
}


/* Layout */

#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--color-surface);
    margin: 0 var(--page-gutter);
}

#wrapper>main {
    flex: 1 0 auto;
}

/* responsive container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--content-padding);
}

.clearfix {
    clear: both;
}

/* Responsive columns */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--column-min)), 1fr));
    gap: var(--space-md);
}

/* Header */

#header-wrapper {
    background: url("images/background.png") no-repeat center center;
    background-size: contain;
}

#header {
    position: relative;
    min-height: var(--header-height);
}

/* Banner link */
.site-title,
.site-title a {
    display: block;
    min-height: var(--header-height);
    margin: 0;
    padding: 0;
}

#social {
    position: absolute;
    top: 4em;
    right: 0;
}

/* Menu */

#menu {
    background: var(--color-brand-dark);
}

#menu ul {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: normal;
}

#menu li {
    margin: 0;
}

#menu a {
    display: block;
    padding: 0 0.75rem;
    line-height: var(--menu-height);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    letter-spacing: 0.03em;
    color: var(--color-on-brand);
    border: none;
}

#menu a:hover {
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

/* Screen reader marking for current page*/
#menu a[aria-current="page"],
#menu .current_page_item a {
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-decoration-thickness: 0.15em;
    text-underline-offset: 0.3em;
}

/* Contrast for accessibility focus */
#menu a:focus-visible {
    outline: none;
    background: var(--color-focus);
    color: var(--color-focus-text);
    text-decoration: none;
    box-shadow: inset 0 calc(-1 * var(--focus-width)) 0 var(--color-focus-text);
}

/* tablet view*/
@media (max-width: 64em) {
    #menu a {
        line-height: 3rem;
    }
}

/* phone view */
@media (max-width: 40em) {
    #menu .container {
        padding: 0;
    }

    #menu ul {
        flex-direction: column;
    }

    #menu li+li {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    #menu a {
        padding: 0 var(--content-padding);
        line-height: 2.75rem;
    }
}

/* Page */

#page {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

#page img {
    margin-bottom: var(--space-sm);
}

#page .title {
    margin-bottom: var(--space-md);
}

#page .title h2 {
    font-size: 1.5em;
    font-weight: var(--font-weight-normal);
    color: var(--color-heading);
}

#page .title .byline {
    display: block;
    padding-bottom: var(--space-md);
    color: var(--color-text-muted);
}


#page .updated {
    margin-top: calc(-1 * var(--space-sm));
    color: var(--color-text-muted);
}

#page section {
    margin-bottom: var(--space-lg);
}

#page h2 {
    padding-top: var(--space-md);
    padding-bottom: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

#page h3 {
    padding: var(--space-sm) 0 var(--space-xs);
    font-size: 1.2em;
    font-weight: var(--font-weight-normal);
}

#page li {
    line-height: var(--line-height-body);
}

#page a {
    color: var(--color-link-accent);
}

.table-wrap {
    overflow-x: auto;
    margin-bottom: var(--space-md);
}

#page table {
    width: 100%;
    border-collapse: collapse;
    line-height: 1.5;
}

#page caption {
    text-align: left;
    padding-bottom: var(--space-xs);
    color: var(--color-text-muted);
}

#page th,
#page td {
    padding: var(--space-xs) 0.75rem;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

#page thead th {
    background: var(--color-brand-dark);
    color: var(--color-on-brand);
    font-weight: var(--font-weight-bold);
}

#page tbody th {
    background: var(--color-surface-alt);
    font-weight: var(--font-weight-bold);
}

#page tbody tr:nth-child(even) td {
    background: var(--color-surface-alt);
}

#page .num {
    text-align: right;
    white-space: nowrap;
}

/* Two column pages */

#content .post-title {
    margin-bottom: var(--space-md);
}

#content .post-title h2 {
    margin: 0;
    padding: 0;
}

#content .post {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

#sidebar1 #box1 {
    margin-bottom: var(--space-lg);
}

#sidebar1 h2,
#sidebar2 h2 {
    font-size: 1.5em;
    font-weight: var(--font-weight-normal);
}

/* Stack for small screens */
@media (min-width: 64em) {
    #content {
        float: left;
        width: 66%;
        padding-right: var(--space-lg);
        border-right: 1px solid var(--color-border);
    }

    #sidebar1,
    #sidebar2 {
        float: right;
        width: 30%;
    }
}


/* shaded section*/

#portfolio-wrapper {
    padding: var(--space-xl) 0;
    background-color: var(--color-surface-alt);
    background-image: url(images/overlay.png);
    background-repeat: repeat;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

#portfolio {
    text-align: center;
}

#portfolio .box {
    color: var(--color-text-muted);
}

#portfolio h3 {
    display: block;
    padding-bottom: var(--space-sm);
    text-transform: uppercase;
    font-size: 1.2em;
    font-weight: var(--font-weight-normal);
    color: var(--color-heading);
}

#portfolio .title h2 {
    color: var(--color-heading);
}

#portfolio .title .byline {
    display: block;
    padding-bottom: var(--space-md);
    color: var(--color-text-muted);
}

/* Heading titles */

.title {
    margin-bottom: var(--space-lg);
}

.title h2 {
    margin: 0;
    padding: 0;
    font-size: 2.8em;
    color: var(--color-heading);
    /* was white-on-white in the original template */
}

.title .byline {
    padding-top: 0.5em;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: var(--font-weight-normal);
    font-size: 1.1em;
    color: var(--color-text-muted);
}

/*titles for phones */
@media (max-width: 40em) {
    h1 {
        font-size: 2em;
    }

    .title h2 {
        font-size: 2em;
    }
}

/* Footer */

#footer {
    padding: var(--space-lg) var(--content-padding) var(--space-md);
    text-align: center;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
}

#footer p {
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    color: var(--color-text-muted);
}

#footer a {
    color: var(--color-text-muted);
}

.license-icons {
    display: inline-flex;
    gap: 0.2rem;
    margin-left: 0.2rem;
    vertical-align: text-bottom;
}

.license-icons img {
    height: 1.375rem;
    width: auto;
}

/* Lists */

ul.style1,
ul.style2,
ul.style3 {
    margin: 0;
    padding: 0;
    list-style: none;
}

ul.style1 li {
    padding: 0.625rem 0 0.9375rem 0;
    border-top: 1px solid var(--color-border);
}

ul.style2 li {
    padding: 1.5625rem 0 0.9375rem 0;
    border-top: 1px solid var(--color-border);
}

ul.style3 li {
    padding: 1.25rem 0;
    border-top: 1px solid var(--color-border);
}

ul.style1 .first,
ul.style2 .first,
ul.style3 .first {
    padding-top: 0;
    border-top: none;
}

ul.style2 h3 {
    padding: 0 0 0.625rem 0;
    font-size: 1.1em;
}

ul.style2 h3 a {
    color: var(--color-link-accent);
}

ul.style2 a {
    text-decoration: none;
}

ul.style2 a:hover {
    text-decoration: underline;
}

ul.style3 p {
    margin: 0;
    padding: 0;
}

ul.style3 img {
    float: left;
    margin-top: 0.1875rem;
    margin-right: 1.25rem;
}

ul.style3 .posted {
    padding: 0.625rem 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    /* was #A2A2A2, too faint to read */
}

/* Buttons */

.link-style,
.button {
    display: inline-block;
    margin-top: var(--space-md);
    padding: 0 1em;
    background: var(--color-brand-dark);
    letter-spacing: 0.1em;
    line-height: 3em;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: var(--font-weight-normal);
    font-size: 1em;
    color: var(--color-on-brand);
}

.link-style {
    margin-top: 1.25rem;
    line-height: normal;
    padding: 0.4375rem 1.25rem;
    border-radius: 0.3125rem;
}

.link-style:hover,
.button:hover {
    background: var(--color-brand);
}

/* Social icons */

ul.contact {
    margin: 0;
    padding: var(--space-md) 0 0 0;
    list-style: none;
}

ul.contact li {
    display: inline-block;
    padding: 0 0.1em;
    font-size: 1em;
}

/* Icon labels */
ul.contact li span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

ul.contact li a::before {
    display: inline-block;
    background: none;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    text-align: center;
    color: var(--color-on-brand);
}

.note {
    color: var(--color-text-muted);
    font-size: 0.95em;
}

.posts {
    padding: 0;
    list-style: none;
}

.posts li {
    margin-bottom: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    border-left: 0.25rem solid var(--color-brand);
    background: var(--color-surface-alt);
}

.letter {
    margin: 0 0 var(--space-md);
    padding: var(--space-sm) var(--space-md);
    border: 1px dashed var(--color-text-muted);
    background: var(--color-surface-alt);
}

.letter p:last-child {
    margin-bottom: 0;
}

@media print {

    #menu,
    .skip-link {
        display: none;
    }

    #page table,
    .letter,
    .posts li {
        break-inside: avoid;
    }
}