:root {
    --bg-color: #fafafa;
    --white: #fafafa;
    --grey: #6b6b6b;
    --text-color: #272727;
    --primary-color: #9B2743;
    --link-color: #9B2743;
    --nav-footer-bg: #ececec;
    --border-radius: .7rem;
    --border-radius-ex: 1.3rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #111;
        --text-color: #ececec;
        --grey: #8f8f8f;
        --nav-footer-bg: #272727;
        --link-color: #E69EAD;
    }
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans", "Segoe UI", "Liberation Sans", sans-serif;
    font-size: 1.125rem;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--text-color);
    text-underline-position: under;
    text-decoration: underline var(--link-color) .12rem;
}

a:hover {
    opacity: 0.8;
}

img {
    width: 100%;
    height: auto;
    display: block;
    margin: auto;
    border-radius: var(--border-radius-ex);
}

h1, h2, h3, h4, h5, h6 {
    text-align: center;
    line-height: 1.3;
    font-weight: 600;
}

input[type="submit"]:hover {
    opacity: .80;
    cursor: pointer;
}

.top-logo {
    max-width: 170px;
    display: block;
    margin: 0 auto 1rem auto;
}

.main {
    flex: 1;
    max-width: 43rem;
    margin: 0 auto;
    padding: 0 1rem;
}

.article-body p {
    font-family: "New York", "Noto Serif", Georgia, "Liberation Serif", serif;
}

.top-nav, .footer {
    background-color: var(--nav-footer-bg);
    padding: 2rem 1rem;
    text-align: center;
}

.top-nav a, .footer-nav a {
    color: var(--text-color);
    text-decoration: none;
}

.top-nav a:hover, .footer-nav a:hover {
    color: var(--link-color);
    opacity: 1;
}

.top-nav nav a + a::before,
.footer-nav a + a::before {
    content: " - ";
    color: var(--text-color);
    pointer-events: none;
}

.top-nav nav a:hover::before,
.footer-nav a:hover::before {
    color: var(--text-color);
}

.box {
    background-color: var(--nav-footer-bg);
    border-radius: var(--border-radius-ex);
    padding: 1rem;
    margin-bottom: 1rem;
}

.box img {
    border-radius: var(--border-radius);
}

.button {
    display: block;
    margin: 0 auto;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-align: center;
    width: max-content;
    text-decoration: none;
}

.style {
    color: inherit;
    text-decoration: none;
    display: block;
}

.style * {
    text-decoration: none;
    color: inherit;
}

.cat-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 1rem;
}

.cat-btn {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    display: inline-block;
    border-radius: var(--border-radius);
}

.cat-btn.active {
    opacity: .75;
}

.date {
    color: var(--grey);
}

.copyright {
    text-align: right;
    color: var(--grey);
}

.quote {
    text-align: center;
}

.cta {
    background-color: var(--primary-color);
    border-radius: var(--border-radius-ex);
    text-align: center;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

.fineprint {
    font-size: .9rem;
    font-style: italic;
}

.cta .fineprint a {
    color: var(--white);
    text-underline-position: under;
    text-decoration: underline var(--white) .12rem !important;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
}

.form-row input[type="email"], .form-row textarea {
    flex: 1 1 250px;
    width: 100%;
    max-width: 580px;
    min-height: 50px;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans", "Segoe UI", "Liberation Sans", sans-serif;
    font-size: 1.125rem;
    box-sizing: border-box;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.form-row input[type="submit"] {
    flex: 0 0 auto;
    min-height: 50px;
    padding: 0 1rem;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    font-size: 1.125rem;
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans", "Segoe UI", "Liberation Sans", sans-serif;
    line-height: 1.5;
    cursor: pointer;
    display: flex;
    align-items: center;
    height: auto;
}

.form-row input:focus, .form-row textarea:focus {
    outline: .15rem solid var(--primary-color);
    outline-offset: -.15rem;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1.1rem;
    height: 1.1rem;
    border: .13rem solid #ececec;
    border-radius: .13rem;
    cursor: pointer;
    position: relative; 
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: -1px;
    width: 5px;
    height: 9px;
    border: 2px solid ;
    border-top: none #ececec;
    border-left: none;
    transform: rotate(45deg);
}

@media (max-width: 550px) {
    .form-row input[type="email"], .form-row input[type="submit"] {
        width: 100%;
    }
}

.cta h1, .cta h2, .cta h3, .cta h4, .cta h5, .cta h6, .cta p {
    color: var(--white);
    text-align: center;
}

.cta a {
    color: var(--primary-color);
    text-decoration: none;
}

.cta .button {
    background: var(--white);
}

.pagination {
    margin-bottom: 1rem;
    text-align: center;
}

.social-bar {
    padding: 1rem 1rem 2rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.social-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    text-decoration: none;
}

.social-bar img.social,
.social-bar img.donate {
    width: 1.6rem;
    height: 1.6rem;
    margin: 0;
    border-radius: 0;
}

.social-bar a:has(img.donate) {
    background-color: #FFDD00;
    animation: wobble 3s ease infinite;
}

@keyframes wobble {
  0%, 100% { transform: translateX(0) rotate(0); }
  15%      { transform: translateX(-8px) rotate(-10deg); }
  30%      { transform: translateX(4px) rotate(10deg); }
  45%      { transform: translateX(-4px) rotate(-5.5deg); }
  60%      { transform: translateX(2.4px) rotate(3.3deg); }
  75%      { transform: translateX(-1.45px) rotate(-2deg); }
}

.badge-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    text-align: center;
    margin-bottom: 1rem;
}

.kb-club a, .ws-carbon a {
    text-decoration: none;
    display: inline-flex;
}

.kb-club a {
    color: #212121;
}

.kb-club-bg,
.kb-club-no-bg {
    padding: .3rem .6rem;
}

.kb-club-bg {
    background: #4CAF50;
    font-weight: bold;
}

.kb-club-no-bg {
    background: #c8e6c9;
}

img.wcag {
    width: auto;
    height: 2.3rem;
    border-radius: 0;
}

.ws-carbon a {
    border: .15rem solid #00ffbc;
    border-radius: .5rem;
    overflow: hidden;
    color: #1519d3;
}

.ws-carbon-no-bg,
.ws-carbon-bg {
    padding: .25rem .5rem;
}

.ws-carbon-no-bg {
    background: var(--white);
}

.ws-carbon-bg {
    background: #00ffbc;
    font-weight: bold;
}

.hide {
    display: none;
}
