
* {
    box-sizing: border-box;
}

html {
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

body {
    margin: 0;
    background: #f1f1f1;
    color: #181818;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}


/* ======================================================
   ADMIN HEADER
====================================================== */

.admin-top,
.public-header {
    min-height: 72px;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    background: #fff;

    border-bottom: 1px solid #d9d9d9;
}

.brand,
.public-brand {
    display: flex;
    align-items: center;

    gap: 10px;
}

.bx {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;

    background: #171717;

    border: 3px solid #df0712;

    color: white;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-style: italic;

    transform: rotate(-3deg);
}

.brand strong,
.public-brand strong {
    display: block;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-size: 20px;

    font-weight: 400;

    letter-spacing: .4px;
}

.public-brand strong span {
    color: #df0712;
}

.brand span,
.public-brand small {
    display: block;

    margin-top: 2px;

    color: #969696;

    font-size: 7px;

    font-weight: 700;

    letter-spacing: 1px;
}

.admin-top nav,
.public-header nav {
    display: flex;

    gap: 22px;
}

.admin-top nav a,
.public-header nav a {
    font-size: 8px;
    font-weight: 900;
}

.admin-top nav a:hover,
.public-header nav a:hover,
.public-header nav .active {
    color: #df0712;
}


/* ======================================================
   ADMIN MAIN
====================================================== */

main {
    width: min(
        1400px,
        calc(100% - 40px)
    );

    margin: 30px auto 60px;
}

.newsroom-heading {
    min-height: 130px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 25px;

    padding-bottom: 20px;

    border-bottom: 5px solid #181818;
}

.eyebrow,
.news-kicker {
    color: #df0712;

    font-size: 8px;

    font-weight: 900;

    letter-spacing: 1px;
}

.newsroom-heading h1,
.editor-main > h1,
.public-news-shell > h1 {
    margin: 3px 0 5px;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-size:
        clamp(42px, 6vw, 76px);

    font-weight: 400;

    line-height: 1;
}

.newsroom-heading p {
    max-width: 650px;

    margin: 0;

    color: #676767;

    font-size: 11px;
}

.fetch-button {
    min-height: 44px;

    padding: 0 18px;

    border: 0;

    background: #df0712;

    color: white;

    font-size: 8px;

    font-weight: 900;

    letter-spacing: .6px;

    cursor: pointer;
}


/* ======================================================
   FLASH
====================================================== */

.flash-stack {
    display: grid;

    gap: 6px;

    margin: 15px 0;
}

.flash {
    padding: 11px 13px;

    background: #fff;

    border-left: 4px solid #df0712;

    font-size: 10px;
}


/* ======================================================
   STATS
====================================================== */

.stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 8px;

    margin: 20px 0;
}

.stats a {
    padding: 14px;

    background: white;

    border: 1px solid #dadada;
}

.stats a.active {
    border-top: 4px solid #df0712;
}

.stats strong {
    display: block;

    font-family:
        Impact,
        sans-serif;

    font-size: 26px;

    font-weight: 400;
}

.stats span {
    color: #777;

    font-size: 7px;

    font-weight: 900;
}


/* ======================================================
   STORY INBOX
====================================================== */

.story-list {
    display: grid;

    gap: 9px;
}

.story-row {
    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        auto;

    gap: 20px;

    padding: 19px;

    background: #fff;

    border: 1px solid #ddd;
}

.story-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    color: #888;

    font-size: 7px;

    font-weight: 700;
}

.story-meta .category {
    color: #df0712;

    font-weight: 900;
}

.story-row h2 {
    margin: 5px 0 8px;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-size: 24px;

    font-weight: 400;

    line-height: 1.05;
}

.story-row p {
    max-width: 900px;

    margin: 0 0 12px;

    color: #666;

    font-size: 11px;

    line-height: 1.5;
}

.boxx-summary strong {
    color: #df0712;
}

.story-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 12px;
}

.story-actions a,
.text-button {
    color: #555;

    font-size: 7px;

    font-weight: 900;
}

.story-actions .edit {
    padding: 8px 10px;

    background: #181818;

    color: white;
}

.story-actions form {
    margin: 0;
}

.text-button {
    padding: 0;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.status-badge {
    height: max-content;

    padding: 6px 7px;

    font-size: 7px;

    font-weight: 900;
}

.status-badge.draft {
    background: #eee;
}

.status-badge.published {
    background: #dff4df;

    color: #176817;
}

.status-badge.discarded {
    background: #f4e4e4;

    color: #8a2a2a;
}

.empty {
    padding: 45px;

    background: white;

    border: 1px solid #ddd;

    text-align: center;
}

.empty h2 {
    font-family:
        Impact,
        sans-serif;

    font-size: 28px;

    font-weight: 400;
}

.empty p {
    color: #777;
}


/* ======================================================
   EDITOR
====================================================== */

.editor-shell {
    max-width: 1250px;
}

.editor-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        360px;

    gap: 25px;
}

.editor-form {
    display: grid;

    gap: 16px;
}

.editor-form label {
    display: grid;

    gap: 6px;
}

.editor-form label > span {
    font-size: 8px;

    font-weight: 900;
}

.editor-form label > small {
    color: #777;

    font-size: 9px;
}

.editor-form input,
.editor-form textarea {
    width: 100%;

    padding: 12px;

    border: 1px solid #ccc;

    background: white;

    color: #181818;

    outline: none;
}

.editor-form input:focus,
.editor-form textarea:focus {
    border-color: #181818;
}

.editor-form textarea {
    resize: vertical;

    line-height: 1.6;
}

.save,
.publish {
    min-height: 43px;

    padding: 0 17px;

    border: 0;

    font-size: 8px;

    font-weight: 900;

    cursor: pointer;
}

.save {
    background: #181818;

    color: white;
}

.publish-form {
    margin-top: 22px;

    padding-top: 20px;

    border-top: 4px solid #181818;
}

.publish {
    background: #df0712;

    color: white;
}

.publish-form p {
    color: #777;

    font-size: 9px;
}

.reference-card,
.tip-card {
    margin-bottom: 15px;

    padding: 18px;

    background: white;

    border: 1px solid #ddd;
}

.reference-label {
    color: #df0712;

    font-size: 7px;

    font-weight: 900;
}

.reference-card h2 {
    font-family:
        Impact,
        sans-serif;

    font-size: 24px;

    font-weight: 400;

    line-height: 1.1;
}

.reference-card p,
.tip-card p {
    color: #666;

    font-size: 10px;

    line-height: 1.55;
}

.source-meta {
    display: flex;
    flex-direction: column;

    gap: 3px;

    color: #777;

    font-size: 8px;
}

.source-button {
    display: inline-flex;

    padding: 9px 11px;

    background: #181818;

    color: white;

    font-size: 7px;

    font-weight: 900;
}


/* ======================================================
   SOURCE MANAGEMENT
====================================================== */

.source-layout {
    display: grid;

    grid-template-columns:
        minmax(0,1fr)
        340px;

    gap: 25px;
}

.source-list {
    display: grid;

    gap: 8px;
}

.source-row {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    padding: 15px;

    background: white;

    border: 1px solid #ddd;
}

.source-row strong,
.source-row span,
.source-row small {
    display: block;
}

.source-row strong {
    font-size: 11px;
}

.source-row span {
    margin-top: 3px;

    color: #df0712;

    font-size: 8px;

    font-weight: 900;
}

.source-row small {
    max-width: 700px;

    margin-top: 6px;

    color: #999;

    font-size: 7px;

    overflow-wrap: anywhere;
}

.source-row button {
    width: 55px;

    min-height: 31px;

    border: 0;

    color: white;

    font-size: 8px;

    font-weight: 900;

    cursor: pointer;
}

.source-row button.enabled {
    background: #238523;
}

.source-row button.disabled {
    background: #777;
}

.add-source {
    height: max-content;

    padding: 18px;

    display: grid;

    gap: 13px;

    background: white;

    border: 1px solid #ddd;
}

.add-source h2 {
    margin: 0;

    font-family:
        Impact,
        sans-serif;

    font-weight: 400;
}

.add-source label {
    display: grid;

    gap: 5px;
}

.add-source label span {
    font-size: 7px;

    font-weight: 900;
}

.add-source input {
    width: 100%;

    padding: 10px;

    border: 1px solid #ccc;
}

.add-source button {
    min-height: 40px;

    border: 0;

    background: #df0712;

    color: white;

    font-size: 8px;

    font-weight: 900;
}


/* ======================================================
   PUBLIC NEWS
====================================================== */

.public-page {
    background: #f4f4f4;
}

.public-news-shell {
    max-width: 1350px;
}

.public-story-grid {
    display: grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap: 18px;
}

.public-story-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid #ddd;
}

.public-story-image {
    aspect-ratio: 16 / 9;

    background-size: cover;

    background-position: center;
}

.public-story-image.no-image {
    display: grid;
    place-items: center;

    background: #181818;
}

.public-story-image.no-image span {
    color: white;

    font-family:
        Impact,
        sans-serif;

    font-size: 44px;
}

.public-story-copy {
    padding: 16px;
}

.story-category {
    color: #df0712;

    font-size: 7px;

    font-weight: 900;

    text-transform: uppercase;
}

.public-story-copy h2 {
    margin: 5px 0 8px;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-size: 26px;

    font-weight: 400;

    line-height: 1.05;
}

.public-story-copy p {
    color: #666;

    font-size: 10px;

    line-height: 1.55;
}

.read-story {
    color: #df0712;

    font-size: 8px;

    font-weight: 900;
}


/* ======================================================
   PUBLIC ARTICLE
====================================================== */

.article-shell {
    max-width: 950px;
}

.back-news {
    display: inline-block;

    margin-bottom: 28px;

    color: #777;

    font-size: 8px;

    font-weight: 900;
}

.article-shell > h1 {
    margin: 6px 0 12px;

    font-family:
        Impact,
        "Arial Narrow Bold",
        sans-serif;

    font-size:
        clamp(40px,6vw,76px);

    font-weight: 400;

    line-height: .98;
}

.article-source {
    margin-bottom: 20px;

    color: #888;

    font-size: 8px;
}

.article-image {
    aspect-ratio: 16 / 8;

    margin-bottom: 25px;

    background-size: cover;

    background-position: center;
}

.article-body {
    max-width: 800px;
}

.article-body p {
    color: #363636;

    font-family:
        Georgia,
        serif;

    font-size: 17px;

    line-height: 1.8;
}

.article-source-box {
    max-width: 800px;

    margin-top: 35px;

    padding: 18px;

    border-left: 5px solid #df0712;

    background: white;
}

.article-source-box strong {
    font-size: 8px;
}

.article-source-box p {
    color: #666;

    font-size: 10px;
}

.article-source-box a {
    color: #df0712;

    font-size: 8px;

    font-weight: 900;
}


/* ======================================================
   MOBILE
====================================================== */

@media(max-width:900px) {

    .editor-grid,
    .source-layout {
        grid-template-columns: 1fr;
    }

    .public-story-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }

}


@media(max-width:600px) {

    main {
        width: calc(100% - 18px);

        margin-top: 20px;
    }

    .admin-top,
    .public-header {
        min-height: 62px;

        padding: 0 10px;
    }

    .admin-top nav a,
    .public-header nav a {
        display: none;
    }

    .admin-top nav a:last-child,
    .public-header nav a:last-child {
        display: block;
    }

    .newsroom-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .newsroom-heading {
        display: flex;
    }

    .fetch-button {
        width: 100%;
    }

    .stats {
        grid-template-columns:
            repeat(2,1fr);
    }

    .story-row {
        grid-template-columns: 1fr;
    }

    .status-badge {
        width: max-content;
    }

    .public-story-grid {
        grid-template-columns: 1fr;
    }

    .article-body p {
        font-size: 16px;
    }

}
