:root {
    --af-ink: #151918;
    --af-muted: #68716d;
    --af-line: #dfe4e1;
    --af-paper: #ffffff;
    --af-soft: #f3f5f2;
    --af-green: #194d3f;
    --af-green-dark: #12382f;
    --af-red: #d82e3b;
    --af-gold: #d99b22;
    --af-shell: 1180px;
}

body {
    background: var(--af-paper);
    color: var(--af-ink);
}

.g1-hb-row-normal,
.g1-hb-row-mobile {
    background: var(--af-green) !important;
    box-shadow: none;
}

.g1-hb-row-normal .g1-row-background,
.g1-hb-row-mobile .g1-row-background {
    background: var(--af-green) !important;
    border: 0 !important;
}

.g1-hb-row-normal .menu-item > a,
.g1-hb-row-normal .g1-hamburger,
.g1-hb-row-normal .g1-drop-toggle,
.g1-hb-row-mobile .menu-item > a,
.g1-hb-row-mobile .g1-hamburger,
.g1-hb-row-mobile .g1-drop-toggle {
    color: #ffffff !important;
}

.g1-primary-nav-menu > .menu-item > a {
    font-weight: 700;
}

.g1-primary-nav-menu > .menu-item:last-child > a {
    background: var(--af-red);
    border-radius: 4px;
    color: #ffffff !important;
    margin-left: 8px;
    padding-left: 16px;
    padding-right: 16px;
}

.af-home,
.af-category {
    display: block;
    width: 100%;
}

.af-shell {
    box-sizing: border-box;
    margin: 0 auto;
    max-width: var(--af-shell);
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
}

.af-home-intro,
.af-category-header {
    border-bottom: 1px solid var(--af-line);
    padding: 36px 0 32px;
}

.af-home-title,
.af-category-header h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 4px 0 8px;
}

.af-home-intro__text,
.af-category-header p {
    color: var(--af-muted);
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    max-width: 720px;
}

.af-kicker {
    color: var(--af-red) !important;
    font-size: 12px !important;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.af-section {
    padding: 44px 0;
}

.af-section--recent,
.af-topic-band:nth-of-type(even) {
    background: var(--af-soft);
}

.af-section-heading {
    align-items: baseline;
    border-bottom: 2px solid var(--af-ink);
    display: flex;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 10px;
}

.af-section-heading h2 {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0;
}

.af-section-heading > a {
    color: var(--af-green);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.af-lead-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 1fr);
}

.af-lead-grid__support {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.af-story {
    min-width: 0;
}

.af-story__media {
    background: #e8ece9;
    border-radius: 6px;
    display: block;
    overflow: hidden;
    position: relative;
}

.af-story__image,
.af-story__placeholder {
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    object-fit: cover;
    transition: transform 180ms ease;
    width: 100%;
}

.af-story__media:hover .af-story__image {
    transform: scale(1.015);
}

.af-story__body {
    padding-top: 12px;
}

.af-story__meta {
    align-items: center;
    color: var(--af-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px 12px;
    line-height: 1.3;
    margin-bottom: 7px;
}

.af-story__meta a {
    color: var(--af-red);
    font-weight: 800;
    text-decoration: none;
}

.af-story__title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.af-story__title a {
    color: var(--af-ink);
    text-decoration: none;
}

.af-story__title a:hover {
    color: var(--af-green);
}

.af-story__excerpt {
    color: var(--af-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 10px 0 0;
}

.af-story--lead .af-story__title,
.af-story--category-lead .af-story__title {
    font-size: 31px;
    line-height: 1.12;
}

.af-story--compact .af-story__title {
    font-size: 16px;
}

.af-story--compact .af-story__body {
    padding-top: 8px;
}

.af-story--compact .af-story__meta time {
    display: none;
}

.af-feed-grid {
    display: grid;
    gap: 26px 32px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.af-story--row {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: 180px minmax(0, 1fr);
}

.af-story--row .af-story__body {
    padding-top: 2px;
}

.af-story--row .af-story__title {
    font-size: 18px;
}

.af-topic-band {
    border-top: 1px solid var(--af-line);
}

.af-topic-band--mishap .af-section-heading {
    border-color: var(--af-red);
}

.af-topic-band--craft .af-section-heading {
    border-color: var(--af-gold);
}

.af-topic-band--work .af-section-heading,
.af-topic-band--life .af-section-heading {
    border-color: var(--af-green);
}

.af-topic-grid,
.af-category-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.af-submit-band {
    background: var(--af-green-dark);
    color: #ffffff;
    padding: 42px 0;
}

.af-submit-band__inner {
    align-items: center;
    display: flex;
    gap: 32px;
    justify-content: space-between;
}

.af-submit-band h2 {
    color: #ffffff;
    font-size: 27px;
    letter-spacing: 0;
    margin: 3px 0 8px;
}

.af-submit-band p {
    color: #d9e5e0;
    margin: 0;
}

.af-button {
    background: var(--af-red);
    border-radius: 4px;
    box-sizing: border-box;
    color: #ffffff;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    justify-content: center;
    min-width: 130px;
    padding: 13px 20px;
    text-decoration: none;
}

@media (min-width: 1024px) {
    .g1-hb-row-normal {
        margin-left: 0 !important;
        width: 100% !important;
    }

    html.g1-off-global-desktop .g1-body-inner {
        margin-left: 0 !important;
        width: 100% !important;
    }

    html.g1-off-global-desktop .g1-canvas-global {
        display: none !important;
    }

    .g1-hb-row-normal .g1-row-inner {
        left: 0 !important;
        width: 100% !important;
    }
}

.af-category-header {
    background: var(--af-soft);
}

.af-category-feature .af-story--category-lead {
    align-items: center;
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.af-category-feature .af-story--category-lead .af-story__body {
    padding-top: 0;
}

.af-category-feed {
    border-top: 1px solid var(--af-line);
}

.af-category .navigation.pagination {
    border-top: 1px solid var(--af-line);
    margin-top: 36px;
    padding-top: 24px;
}

.af-submit-hero {
    background: var(--af-soft);
    border-bottom: 1px solid var(--af-line);
    padding: 42px 0 38px;
}

.af-submit-hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    margin: 4px 0 10px;
}

.af-submit-hero > .af-shell > p:last-child {
    color: var(--af-muted);
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    max-width: 760px;
}

.af-submit-flow {
    padding: 48px 0 60px;
}

.af-submit-flow__layout {
    display: grid;
    gap: 64px;
    grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
}

.af-submit-flow h2 {
    font-size: 25px;
    letter-spacing: 0;
    margin: 0 0 22px;
}

.af-submit-flow__guide {
    border-top: 3px solid var(--af-green);
    padding-top: 22px;
}

.af-submit-flow__guide ol {
    counter-reset: af-submit-step;
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
}

.af-submit-flow__guide li {
    align-items: flex-start;
    counter-increment: af-submit-step;
    display: grid;
    gap: 13px;
    grid-template-columns: 30px minmax(0, 1fr);
    line-height: 1.5;
    margin-bottom: 16px;
}

.af-submit-flow__guide li::before {
    align-items: center;
    background: var(--af-green);
    border-radius: 50%;
    color: #ffffff;
    content: counter(af-submit-step);
    display: flex;
    font-size: 13px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.af-submit-flow__guide > p {
    color: var(--af-muted);
    line-height: 1.55;
    margin: 0;
}

.af-submit-flow__form {
    border-top: 3px solid var(--af-ink);
    min-width: 0;
    padding-top: 22px;
}

.af-submit-flow #usp_form {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.af-submit-flow #usp_form fieldset {
    border: 0;
    margin: 0 0 20px;
    padding: 0;
}

.af-submit-flow #usp_form .usp-title { order: 1; }
.af-submit-flow #usp_form .usp-content { order: 2; }
.af-submit-flow #usp_form .usp-images { order: 3; }
.af-submit-flow #usp_form .usp-email { order: 4; }
.af-submit-flow #usp_form .usp-checkbox { order: 5; }
.af-submit-flow #usp-submit { order: 6; }

.af-submit-flow #usp_form label {
    color: var(--af-ink);
    display: block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 7px;
}

.af-submit-flow #usp_form input[type='text'],
.af-submit-flow #usp_form input[type='email'],
.af-submit-flow #usp_form textarea {
    background: #ffffff;
    border: 1px solid #bfc8c3;
    border-radius: 4px;
    box-sizing: border-box;
    color: var(--af-ink);
    font: inherit;
    padding: 12px 13px;
    width: 100%;
}

.af-submit-flow #usp_form textarea {
    min-height: 150px;
    resize: vertical;
}

.af-submit-flow #usp_form input:focus,
.af-submit-flow #usp_form textarea:focus {
    border-color: var(--af-green);
    box-shadow: 0 0 0 3px rgba(25, 77, 63, 0.14);
    outline: 0;
}

.af-submit-flow .usp-images #usp-upload-message {
    color: var(--af-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.af-submit-flow .usp-images input[type='file'] {
    box-sizing: border-box;
    display: block;
    max-width: 100%;
    width: 100%;
}

.af-submit-flow #usp_add-another {
    color: var(--af-green);
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    margin-top: 10px;
}

.af-submit-flow .usp-checkbox {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: 20px minmax(0, 1fr);
}

.af-submit-flow .usp-checkbox input {
    height: 18px;
    margin: 2px 0 0;
    width: 18px;
}

.af-submit-flow .usp-checkbox label {
    font-weight: 500 !important;
    line-height: 1.45;
    margin: 0 !important;
}

.af-submit-flow #user-submitted-post {
    background: var(--af-red);
    border: 0;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    padding: 14px 22px;
}

.af-submit-flow .usp-callout-failure,
.af-submit-flow #usp-success-message {
    border-left: 4px solid var(--af-red);
    margin-bottom: 20px;
    padding: 12px 14px;
}

.af-submit-flow #usp-success-message {
    border-color: var(--af-green);
}

.single-post .snax-voting-container {
    display: none;
}

body.single-post {
    overflow-x: clip;
}

html:has(body.single-post) {
    overflow-x: clip;
}

.af-next-reads {
    border-top: 3px solid var(--af-green);
    margin-top: 42px;
    padding-top: 20px;
}

.af-next-reads > h2 {
    font-size: 24px;
    letter-spacing: 0;
    line-height: 1.2;
    margin: 0 0 20px;
}

.af-next-reads__grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.af-next-read {
    min-width: 0;
}

.af-next-read__media {
    background: #e8ece9;
    border-radius: 5px;
    display: block;
    overflow: hidden;
}

.af-next-read__media img,
.af-next-read__media > span {
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.af-next-read h3 {
    font-size: 16px;
    letter-spacing: 0;
    line-height: 1.3;
    margin: 10px 0 0;
    overflow-wrap: anywhere;
}

.af-next-read h3 a {
    color: var(--af-ink);
    text-decoration: none;
}

@media (max-width: 1023px) {
    .af-lead-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    }

    .af-lead-grid__support {
        grid-template-columns: 1fr;
    }

    .af-story--compact {
        align-items: start;
        display: grid;
        gap: 12px;
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .af-story--compact .af-story__body {
        padding-top: 0;
    }

    .af-topic-grid,
    .af-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .af-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .af-home-intro,
    .af-category-header,
    .af-submit-hero {
        padding: 26px 0 24px;
    }

    .af-home-title,
    .af-category-header h1,
    .af-submit-hero h1 {
        font-size: 32px;
    }

    .af-home-intro__text,
    .af-category-header p,
    .af-submit-hero > .af-shell > p:last-child {
        font-size: 16px;
    }

    .af-submit-flow {
        padding: 32px 0 42px;
    }

    .af-submit-flow__layout {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .af-submit-flow__guide {
        display: none;
    }

    .af-submit-flow #user-submitted-post {
        width: 100%;
    }

    .single-post .g1-sidebar {
        display: none;
    }

    .af-next-reads {
        margin-top: 34px;
    }

    .af-next-reads__grid {
        gap: 16px;
        grid-template-columns: 1fr;
    }

    .af-next-read {
        align-items: start;
        display: grid;
        gap: 14px;
        grid-template-columns: 126px minmax(0, 1fr);
    }

    .af-next-read h3 {
        font-size: 16px;
        margin-top: 0;
    }

    .af-section {
        padding: 32px 0;
    }

    .af-section-heading {
        margin-bottom: 18px;
    }

    .af-section-heading h2 {
        font-size: 21px;
    }

    .af-lead-grid,
    .af-category-feature .af-story--category-lead {
        display: block;
    }

    .af-lead-grid__support {
        border-top: 1px solid var(--af-line);
        display: grid;
        gap: 16px;
        margin-top: 24px;
        padding-top: 22px;
    }

    .af-story--lead .af-story__title,
    .af-story--category-lead .af-story__title {
        font-size: 25px;
    }

    .af-feed-grid,
    .af-topic-grid,
    .af-category-grid {
        grid-template-columns: 1fr;
    }

    .af-story--row,
    .af-story--compact {
        gap: 14px;
        grid-template-columns: 126px minmax(0, 1fr);
    }

    .af-story--row .af-story__title,
    .af-story--compact .af-story__title {
        font-size: 16px;
    }

    .af-story--row .af-story__meta time {
        display: none;
    }

    .af-category-feature .af-story--category-lead .af-story__body {
        padding-top: 14px;
    }

    .af-submit-band__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .af-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .af-section-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .af-section-heading > a {
        flex: 0 0 auto;
    }
}
