:root {
    --title-font-family: Abel, serif; /* for branded/logo */
    --main-font-family: Abel; /* for non-logo titles */
    --text-font-family: Helvetica, sans-serif; /* for large chunks of text */
    --font-color: rgb(23, 29, 58);
    --article-title-font-size: 3rem;
    --article-subtitle-font-size: 1.125rem;
    --large-header-font-size: 3.25rem;
    --medium-header-font-size: 2.5rem;
    --small-header-font-size: 1.65rem;
    --paragraph-font-size: 0.9rem;
    --small-detail-font-size: 0.875rem;
    --brand-light-purple: rgb(148, 171, 249);
    --brand-dark-purple: rgb(23,29,58);
    --brand-blue: rgb(0, 122, 183);
    --brand-dark-grey: rgb(62, 62, 62);
    --brand-light-grey: rgb(199,202,224);
    --brand-green: rgb(129, 166, 132);
    --brand-maroon: rgb(144, 45, 65);
    --brand-background-color: rgb(229, 233, 253);
    --main-body-margin: 8.5rem;
    --negative-main-body-margin: -8.5rem;
    --tablet-body-margin: 4.5rem;
    --negative-tablet-body-margin: -4.5rem;
}

body {
    background-color: var(--brand-background-color);
    width: 100%;
}

img {
    max-width: 100%;
}

img.desktop {
    display: block;
}

img.mobile {
    display: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--main-font-family);
    margin: 2.75rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a { 
    color: var(--font-color);
}

p {
    line-height: 1.5rem;
    margin: 1rem auto;
    max-width: 1299px;
    font-size: var(--paragraph-font-size);
}

main {
    margin-left: var(--main-body-margin);
    margin-right: var(--main-body-margin);
    clear: both;
}

main p {
    font-family: var(--text-font-family);
}

a {
    color: #000000;
}

h1 {
    font-size: 3.5em;
}

h2 {
    font-size: var(--large-header-font-size);
}

h3 {
    font-size: var(--small-header-font-size);
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em;
}

nav {
    position: fixed;
    background-color: var(--brand-background-color);
    top: 0;
    z-index: 2;
}

ul {
    margin-left: 0;
    padding-left: 0;
}

main {
    margin-top: 12rem;
}

nav ul,
.tags ul {
    padding: 0;
}

nav li,
.tags li {
    list-style: none;
    display: inline;
    font-size: 2em;
    white-space: nowrap;
}

nav li search,
nav li search form {
    display: inline;
    font-size: 0.75em;
}

.roles h3 {
    margin: 1rem;
}

.roles h3 a {
    font-weight: normal;
}

.show-group.roles p {
    margin-top: 0;
}

.show-group.resources {
    width: 100%;
    margin: 2rem 0rem;
}

.roles section,
.resources section {
    border-color: var(--font-color);
    border-width: 1px;
    border-style: solid;
    margin: 0.5em 0.5em 0.5em 0.5em;
    padding: 0.5em 0.5em 0.5em 0.5em;
}

.highlighted {
    background-color: #ffffff;
}

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

#skip {
    opacity: 0;
}

#skip:focus {
    opacity: 1;
}

#nav-search-field {
    margin-right: 0;
    padding-right: 0;
    border-radius: 300px;
    border: 1px solid var(--font-color);
    font-size: 1rem;
    line-height: 1.5rem;
    padding-left: 0.75rem;
}

#nav-search-submit {
    padding: 2px 6px;
    margin-left: -2rem;
    border: none;
    background: none;
    padding: 3px 7px;
    vertical-align: middle;
}

#nav-search-submit:hover {
    cursor: pointer;
    background-color: var(--brand-light-purple);
    border-radius: 300px;
}

/* TODO: organize code above this */
/* multi-use components */
.button-pill {
    font-family: var(--main-font-family);
    text-decoration: none;
    border-radius: 300px;
    padding: 0.5rem 0.75rem;
    font-size: var(--small-detail-font-size);
    color: white;
    display: inline-block;
}

.icon {
    display: inline-block;
    height: 3rem;
    width: 3rem;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    vertical-align: middle;
}

.no-icon {
    display: none;
}

.incident-icon {
    background-image: url('../images/ICO-globe_64x64.png');
}

.actor-icon {
    background-image: url('../images/ICO-book_64x64.png');
}

.idea-icon {
    background-image: url('../images/ICO-lamp_64x64.png');
}

/* Navigation */
nav {
    padding: 1.25rem 0rem;
    width: 100%;
    min-height: 5rem;
}


nav a:hover {
    text-decoration: underline;
}

.logos-wrapper {
    float: left;
    padding-left: 1.25rem;
    min-width: 10%;
}

.homelink {
    font-family: var(--main-font-family);
    font-size: 3rem;
    display: block;
}

.am-link-wrapper {
    font-family: var(--main-font-family);
    font-size: 1.25rem;
    display: block;
    margin: 0.5rem 0rem;
}

.navlink-wrapper {
    float: right;
    text-align: right;
    max-width: 68%;
    margin: 0px;
    padding-right: 1.25rem;
}

.navlink-wrapper button {
    border: none;
    background: none;
    max-width: 75px;
}

.navlink-wrapper li {
    padding: 0rem;
    display: inline-block;
    height: 2.25rem;
    margin: 0rem 0.5rem;
}

.navlink-wrapper li:hover {
    border-bottom: 1px solid var(--font-color);
}

.navlink-wrapper li a {
    font-size: var(--small-detail-font-size);
    font-family: var(--title-font-family);
    text-decoration: none;
}

.navlink-wrapper li a,
.navlink-wrapper li search {
    vertical-align: middle;
}

li a img.social-icon {
    max-width: 1.5rem;
    vertical-align: middle;
}

/* CTAs */
.cta-wrapper {
    /*
    negative margins are always a code smell.
    this was a cost-benefit decision; fixing this issue would involve touching up
    every single page, but the negative margin is a quick and simple fix.
    */
    margin-left: var(--negative-main-body-margin);
    margin-right: var(--negative-main-body-margin);
    background-color: white;
    padding-left: var(--main-body-margin);
    padding-right: var(--main-body-margin);
    margin-bottom: 3rem;
}

.cta {
    padding: 2rem 0rem;
    text-align: center;
}

.cta h4 {
    margin: 0;
    margin-bottom: 1rem;
    font-family: var(--main-font-family);
    font-size: var(--small-header-font-size);
    font-weight: normal;
}

.cta p {
    margin: 0rem auto;
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
}

.cta .button-pill {
    background-color: var(--brand-light-purple);
    color: var(--font-color);
    display: block;
    width: fit-content;
    margin: auto;
    font-size: 1rem;
    margin-top: 1rem;
}

.cta-wrapper.body-cta {
    clear: both;
    margin-top: 4rem;
}

/* footer */
footer {
    clear: both;
    padding-top: 2rem;
}

footer.full-width {
    max-width: 80%;
    margin: auto;
}

footer .function-group {
    padding-top: 2rem;
}

footer .function-group.left {
    float: left;
}

footer .function-group.left li {
    float: right;
    padding-right: 4rem;
}

footer .function-group.right {
    float: right;
}

footer .function-group.right li {
    float: left;
    padding-left: 4rem;
}

footer.full-width .function-group {
    max-width: 42%;
    width: 42%;
}

footer .function-group .internal-section {
    padding-bottom: 1rem;
    display: block;
}

footer ul {
    margin: 0;
    padding: 0 10%; 
}

footer .function-group {
    max-width: 26%;
    width: 26%;
    display: inline-block;
    vertical-align: top;
    margin: 0;
}

footer .function-group li {
    list-style: none;
    padding: 0.5rem 1rem;
    padding-left: 4rem;
    clear: both;
    width: 50%;
    max-width: 100px;
}

footer .function-group li:hover {
    text-decoration: underline;
}

footer .function-group li a {
    text-decoration: none;
    font-family: var(--main-font-family);
}

footer .cta-wrapper {
    padding: 0;
    margin: 0;
    width: 48%;
    display: inline-block;
}

footer .cta-wrapper .cta h4 {
    font-size: 1.25rem;
}

footer .cta-wrapper .cta p {
    font-size: var(--small-detail-font-size);
}

/* "articles"/pages */

.content-title {
    margin-bottom: 6rem;
}

.article-title {
    font-size: var(--article-title-font-size);
    text-align: center;
    margin-bottom: 1rem;
}

.updated-at {
    text-align: right;
    font-size: var(--paragraph-font-size);
    font-style: italic;
    margin-bottom: 2rem;
}

.article-subtitle {
    font-size: var(--article-subtitle-font-size);
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    margin-top: 0;
    position: relative;
    font-weight: normal;
}

section {
    position: relative;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

section header {
    text-align: center;
}

section p,
section a,
section a p {
    text-align: center;
}

.detail-link {
    display: inline-block;
}

.detail-link h4 {
    font-size: 1.5rem;
    width: fit-content;
    margin-right: 0;
}

.index-link:hover {
    text-decoration: underline;
}

.index-link.person, .button-pill.person {
    background-color: var(--brand-light-purple);
    color: var(--font-color);
}

.index-link.organization {
    background-color: var(--brand-dark-purple);
}

.index-link.event {
    background-color: var(--brand-blue)
}

.index-link.topic {
    background-color: var(--brand-dark-grey);
}

.index-link.concept {
    background-color: var(--brand-maroon);
}

.index-link.ideology {
    background-color: var(--brand-green);
    color: var(--font-color);
}

.detail-link p,
p .detail-link span,
section p a,
section p span {
    font-size: var(--small-detail-font-size);
    font-family: var(--text-font-family);
}

.detail-link h2 span {
    font-weight: normal;
    font-size: var(--small-detail-font-size);
}

.detail-link.paragraph-wrapper {
    text-decoration: none;
    font-family: var(--text-font-family);
    font-weight: normal;
    margin-top: 1rem;
}

.detail-link.paragraph-wrapper:hover {
    text-decoration: underline;
}

.further-resources {
    position: static;
}

.further-resources li {
    list-style: none;
    margin: 2rem 0rem;
}

.further-resources li a {
    font-weight: bold;
    text-decoration: none;
}

.further-resources li a:hover {
    text-decoration: underline;
}

.further-resources li a span {
    text-decoration: underline;
}

.further-resources li a p {
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
    font-weight: normal;
}

.show-group:first-of-type.full-width {
    width: 100%;
}

.show-group section {
    position: static;
}

.show-group .icon {
    max-width: 2rem;
    max-height: 2rem;
}

/* pagination */
.page-num-wrapper {
    padding: 0;
    text-align: center;
}

.page-num-wrapper li {
    list-style: none;
    display: inline-block;
    text-decoration: none;
}

.page-num-wrapper li:hover {
    text-decoration: underline;
}

.page-num-wrapper li a {
    text-decoration: none;
    display: block;
    min-width: 1.5rem;
}

.page-num-wrapper li.active a {
    font-weight: bold;
    text-decoration: underline;
}

/* detail/show pages */
.page-description {
    max-width: 1299px;
    margin: 2.75rem auto;
    overflow: hidden;
}

.page-description p {
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
    line-height: 1.5rem;
}

.page-description blockquote {
    background-color: white;
    margin: 0;
    padding: 2.5rem;
    font-style: italic;
    margin: 2.5rem;
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
    line-height: 1.5rem;
}

.page-description h2 {
    font-size: var(--small-header-font-size);
    text-align: center;
    margin-top: 6rem;
}

.page-description p {
    font-size: var(--paragraph-font-size);
}

.page-description ul li {
    list-style: none;
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
}

.show-group {
    width: 100%;
    display: inline-block;
}

.show-group.further-resources,
.show-group:first-of-type.further-resources {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: auto;
    overflow: scroll;
}

.show-group.further-resources ul,
.show-group:first-of-type.further-resources ul {
    padding: 0;
}

.show-group h2 {
    font-size: var(--small-header-font-size);
    text-align: center;
    margin-bottom: 1rem;
    font-weight: normal;
}

.show-group a {
    font-family: var(--text-font-family);
    font-size: 1rem;
}

.show-group p {
    font-size: var(--paragraph-font-size);
}

/* tag/list pages */

.list-page .detail-link h4 {
    margin-left: 0;
}

.description-wrapper p {
    font-family: var(--text-font-family);
    font-size: var(--paragraph-font-size);
    text-align: left;
}

.description-wrapper p a {
    text-decoration: underline;
}

.description-wrapper p a:hover {
    cursor: pointer;
}

.detail-link h4 {
    font-weight: normal;
}

.related-entities-title {
    font-size: 2rem;
    text-align: center;
    padding: 3rem 0;
    position: relative;
}

section ul li {
    list-style: none;
    font-family: var(--text-font-family);
    font-size: 1rem;
}

/* landing page */
.welcome-block {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-block h1 {
    margin-bottom: 6rem;
}

.welcome-block img {
    max-width: 100%;
    width: 1200px;
    margin: auto;
}

.welcome-block p {
    font-family: var(--text-font-family);
    margin: 3rem auto;
    max-width: 800px;
    text-align: center;
}

.featured-label {
    width: 39%;
    display: inline-block;
    vertical-align: top;
}

.featured-label h2 {
    font-size: 2rem;
}

.featured {
    width: 60%;
    display: inline-block;
}

.featured h4 {
    margin-bottom: 0;
}

.featured-wrapper {
    margin-bottom: 2rem;
}

#mobile-nav li {
    display: none;
}

#mobile-nav #close-button {
    display: none;
    margin-top: -8rem;
    max-width: 55px;
}

/* about page */
.no-subtitle {
    margin-bottom: 6rem;
}

h4.partner {
    font-size: 1.5rem;
    text-align: center;
    margin-top: 6rem;
    font-weight: normal;
}

.partner-wrapper li {
    max-width: 40%;
    width: 40%;
    list-style: none;
    float: left;
    padding: 0 5%;
    margin-bottom: 3rem;    
}

.partner-wrapper li:nth-child(2n + 1) {
    clear: left;
}

.partner-wrapper li a {
    text-decoration: none;
    font-size: var(--paragraph-font-size);
    text-align: center;
}

.partner-wrapper li a:hover {
    text-decoration: underline;
}

.partner-wrapper li a h5 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    min-height: 2.75rem;
    font-weight: normal;
}

.partner-wrapper li a img {
    max-width: 100px;
    max-height: 100px;
    display: block;
    margin: auto;
}

.partner-wrapper li a p {
    max-width: 300px;
}

/* contact page */
p.contact {
    max-width: 800px;
    margin: 2rem auto;
    font-size: var(--paragraph-font-size);
    font-family: var(--text-font-family);
}

.contact-email {
    font-size: 2rem;
    text-align: center;
}

.contact-p {
    font-size: var(--paragraph-font-size);
    font-family: var(--text-font-family);
    text-align: center;
    margin-bottom: 4rem;
}

.contact-form {
    margin-bottom: 2rem;
}

.contact-form label, .contact-form input, .contact-form textarea {
    display: block;
    width: 98%;
    max-width: 800px;
    font-size: var(--paragraph-font-size);
    margin: 1rem auto;
}

.contact-form .submit {
    max-width: 200px;
    border: none;
}

/* Place pages */
.address-wrapper {
    max-width: 350px;
    margin: auto;
    margin-bottom: 3rem;
}

.address-wrapper h3 {
    margin-bottom: 3rem;
}

.address-wrapper p {
    margin: 0;
}

/* small desktop */
@media only screen and (max-width: 1024px) {
    nav .homelink {
        font-size: 2rem;
    }

    .nav-search-field {
        height: 1.5rem;
        width: 10rem;
        border-radius: 300px;
        border: 1px solid var(--font-color);
    }

    .navlink-wrapper {
        max-width: 60%;
    }

    .welcome-block h1 {
        font-size: var(--large-header-font-size);
        margin-bottom: 4rem;
    }

    .featured .detail-link h4 {
        margin: 1rem 0rem;
    }

    .featured-label h2 {
        font-size: 1.75rem;
        margin: 1rem 0rem;
    }
}

/* tablets */
@media only screen and (max-width: 768px) {
    main {
        margin-left: var(--tablet-body-margin);
        margin-right: var(--tablet-body-margin);
    }

    h1 {
        font-size: 3rem;
    }

    .cta-wrapper {
        margin-left: var(--negative-tablet-body-margin);
        margin-right: var(--negative-tablet-body-margin);
    }

    footer ul {
        padding: 0;
    }

    footer .function-group {
        max-width: 42%;
        width: 42%;
        padding-bottom: 2rem;
    }

    footer .function-group {
        width: 50%;
        max-width: 50%;
    }

    footer .cta-wrapper {
        width: 100%;
    }

    .icon {
        height: 2rem;
        width: 2rem;
    }

    .incident-icon {
        background-image: url('../images/ICO-globe_32x32.png');
    }
    
    .actor-icon {
        background-image: url('../images/ICO-book_32x32.png');
    }
    
    .idea-icon {
        background-image: url('../images/ICO-lamp_32x32.png');
    }

    .detail-link {
        margin-bottom: 1rem;
    }

    .detail-link h4 {
        margin: 0;
    }

    .partner {
        margin-left: 0;
        margin-right: 0;
    }

    .partner-wrapper {
        padding: 0;
    }

    .partner-wrapper li {
        max-width: 45%;
        width: 45%;
        padding: 0 2.5%;
        margin-bottom: 1rem;
    }

    .featured-label {
        width: 100%;
        text-align: center;
    }

    .featured {
        width: 100%;
    }

    .content-title {
        margin-bottom: 4rem;
    }

    .related-entities-title {
        font-size: 1.5rem;
        margin: 0;
    }

    .page-description {
        margin-bottom: 0;
    }

    .show-group {
        width: 100%;
    }

    .tags {
        margin-top: 0;
    }
}

@media only screen and (max-width: 480px) {
    main {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    img.desktop {
        display: none;
    }

    img.mobile {
        display: block;
    }

    h1, .welcome-block h1  {
        font-size: var(--medium-header-font-size);
    }

    nav {
        min-height: 4rem;
        border-bottom: 1px solid var(--brand-light-grey);
    }

    .logos-wrapper {
        padding-left: 1rem;
    }

    nav .homelink {
        font-size: 1.75rem;
        margin-top: 1rem;
        max-width: 90%;
    }

    .am-link-wrapper {
        font-size: 1rem;
    }

    #menu-toggle img {
        max-width: 60px;
    }

    .navlink-wrapper {
        max-width: 55%;
        padding-right: 1rem;
    }

    .navlink-wrapper li {
        margin-bottom: 1rem;
    }

    .navlink-wrapper li a {
        font-size: 2rem;
    }

    #nav-search-field {
        max-width: 100%;
    }

    .cta-wrapper {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .show-group:first-of-type {
        width: 100%;
    }

    .featured-label {
        width: 100%;
    }

    .featured {
        margin-top: 1rem;
        width: 100%;
    }

    .partner-wrapper li {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .article-title {
        font-size: 1.85rem;
    }

    .article-subtitle {
        padding-bottom: 1rem;
    }

    .no-subtitle {
        margin-bottom: 4rem;
    }

    .cta h4 {
        font-size: 1.5rem;
    }

    footer .function-group {
        padding: 0;
    }

    footer .function-group.left li {
        padding-right: 2rem;
    }

    footer .function-group.right li {
        padding-left: 2rem;
    }

    .welcome-block h1 {
        font-size: 2rem;
    }

    .featured-label h2 {
        font-size: 1.5rem;
    }

    .detail-link h4 {
        font-size: 1.25rem;
    }

    .content-title {
        margin-bottom: 2rem;
    }
}