:root {
    --ink: #211a15;
    --brown: #7a5835;
    --brown-dark: #4b3322;
    --paper: #f7f3ed;
    --paper-2: #efe5d7;
    --line: #d8cbbb;
    --white: #fff;
    --muted: #776f68;
    --green: #2d6b4b;
    --red: #9f3e34;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: #fbfaf8
}

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

button, input, textarea, select {
    font: inherit
}

.topbar {
    background: var(--brown-dark);
    color: #fff;
    font-size: 13px
}

.topbar .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0
}

.wrap {
    width: min(1180px, calc(100% - 32px));
    margin: auto
}

.masthead {
    padding: 14px 0 24px;
    border-bottom: 1px solid var(--line)
}

.mast-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    padding: 0 0 12px
}

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 28px
}

.brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 46px;
    letter-spacing: -2px;
    color: var(--brown)
}

.outline-btn, .primary-btn, .ghost-btn {
    border: 1px solid var(--brown);
    padding: 12px 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    color: var(--brown)
}

.primary-btn {
    background: var(--brown);
    color: #fff
}

.ghost-btn {
    border-color: var(--line);
    color: var(--ink)
}

.nav {
    border-bottom: 1px solid var(--line);
    background: #fff
}

.nav .wrap {
    display: flex;
    gap: 26px;
    align-items: center;
    min-height: 50px;
    overflow: auto
}

.nav a {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap
}

.nav a.active {
    color: var(--brown)
}

.ticker {
    margin: 22px auto;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    background: #fff
}

.ticker b {
    background: var(--brown);
    color: #fff;
    padding: 14px 18px;
    font-size: 12px;
    letter-spacing: 1px
}

.ticker span {
    padding: 0 18px;
    font-size: 14px
}

.ticker em {
    margin-left: auto;
    padding-right: 14px;
    font-size: 11px;
    color: var(--muted);
    font-style: normal
}

.home-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 28px
}

.hero {
    min-height: 500px;
    width: 100%;
    background: linear-gradient(125deg, rgba(20, 15, 11, .82), rgba(122, 88, 53, .18)), radial-gradient(circle at 80% 20%, #d8b887 0 7%, transparent 8%), linear-gradient(35deg, #5a4938, #c5ab86);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 38px;
    color: #fff
}

.hero:before, .hero:after {
    content: "";
    position: absolute;
    inset: auto -10% 14% 10%;
    height: 1px;
    background: rgba(255, 255, 255, .14);
    transform: rotate(-13deg);
    box-shadow: 0 -65px 0 rgba(255, 255, 255, .08), 0 65px 0 rgba(255, 255, 255, .08)
}

.hero:after {
    transform: rotate(17deg);
    bottom: 35%
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px
}

.kicker {
    display: inline-block;
    background: #fff;
    color: var(--brown-dark);
    padding: 9px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase
}

.hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: 58px;
    line-height: 1.02;
    margin: 25px 0 14px
}

.hero p {
    font-size: 16px;
    line-height: 1.5;
    max-width: 720px
}

.text-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid currentColor;
    padding-bottom: 6px
}

.today {
    display: grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap: 0 22px
}

.today h2, .section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
    font-size: 36px;
    margin: 8px 0 16px
}

.today h2 {
    grid-column: 1/-1
}

.today h2:before, .section-title:before {
    content: "—";
    color: var(--brown);
    margin-right: 12px
}

.today-item {
    border-top: 1px solid var(--line);
    padding: 20px 0
}

.today-item .num {
    font-size: 11px;
    color: #a18e79
}

.today-item .cat {
    font-size: 11px;
    color: var(--brown);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px
}

.today-item h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 21px;
    font-weight: 400;
    margin: 7px 0
}

.section {
    padding: 48px 0
}

.cards {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 22px;
    align-items: stretch
}

.cards > .muted {
    grid-column: 1/-1
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    overflow: hidden
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: linear-gradient(135deg, #7e6b59, #d4c1a7)
}

.card-body {
    padding: 18px
}

.card .cat {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--brown)
}

.card h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 25px;
    font-weight: 400;
    margin: 9px 0
}

.card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.55
}

.footer {
    margin-top: 50px;
    background: var(--brown-dark);
    color: #eee;
    padding: 38px 0;
    font-size: 13px
}

/* backoffice */
.admin-shell {
    display: grid;
    grid-template-columns:240px 1fr;
    min-height: 100vh;
    background: #f6f1ea
}

.sidebar {
    background: #201913;
    color: #fff;
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh
}

.side-brand {
    font-family: Georgia, serif;
    font-size: 17px;
    border-bottom: 1px solid #4b4139;
    padding: 0 8px 26px
}

.side-brand small {
    font-family: Arial, sans-serif;
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    margin-top: 6px
}

.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 26px
}

.side-nav button {
    background: transparent;
    border: 0;
    color: #fff;
    text-align: left;
    padding: 13px 12px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer
}

.side-nav button.active, .side-nav button:hover {
    background: #7b5938
}

.side-user {
    margin-top: auto;
    border-top: 1px solid #4b4139;
    padding: 20px 8px 0;
    font-size: 12px
}

.admin-main {
    padding: 36px 38px;
    min-width: 0
}

.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px
}

.admin-head h1 {
    font-family: Georgia, serif;
    font-size: 38px;
    font-weight: 400;
    margin: 7px 0
}

.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--brown)
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.notice {
    background: #ede1d1;
    border-left: 3px solid var(--brown);
    padding: 14px 16px;
    margin: 0 0 22px;
    font-size: 14px
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    padding: 22px;
    margin-bottom: 22px
}

.panel h2 {
    font-family: Georgia, serif;
    font-weight: 400;
    margin: 0 0 18px;
    font-size: 27px
}

.form-grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 14px
}

.field {
    display: grid;
    gap: 7px
}

.field.full {
    grid-column: 1/-1
}

.field label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase
}

.field input, .field textarea, .field select {
    border: 1px solid var(--line);
    background: #fff;
    padding: 12px;
    outline: none
}

.field textarea {
    min-height: 130px;
    resize: vertical
}

.toolbar {
    border: 1px solid var(--line);
    border-bottom: 0;
    padding: 8px;
    background: #faf7f2;
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.toolbar button {
    border: 1px solid var(--line);
    background: #fff;
    padding: 6px 9px;
    cursor: pointer
}

.rich {
    min-height: 220px;
    border: 1px solid var(--line);
    padding: 14px;
    background: #fff;
    outline: none
}

.table-wrap {
    overflow: auto
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.table th, .table td {
    padding: 12px;
    border-bottom: 1px solid #ece4da;
    text-align: left;
    vertical-align: top
}

.table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted)
}

.badge {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eee;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase
}

.badge.published {
    background: #dfeee6;
    color: var(--green)
}

.badge.draft {
    background: #efe7db;
    color: #7c5d36
}

.badge.pending {
    background: #f4dfdc;
    color: var(--red)
}

.grid-4 {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 14px
}

.metric {
    background: #fff;
    border: 1px solid var(--line);
    padding: 18px
}

.metric b {
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 400
}

.metric span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: .8px
}

.hidden {
    display: none !important
}

.mini-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.mini-actions button {
    font-size: 11px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 6px 8px;
    cursor: pointer
}

@media (max-width: 900px) {
    .brand {
        font-size: 34px
    }

    .today {
        grid-template-columns:1fr 1fr
    }

    .admin-shell {
        grid-template-columns:1fr
    }

    .sidebar {
        position: relative;
        height: auto
    }

    .side-nav {
        grid-template-columns:repeat(2, 1fr)
    }

    .side-user {
        margin-top: 20px
    }

    .admin-main {
        padding: 24px 18px
    }

    .grid-4 {
        grid-template-columns:1fr 1fr
    }

    .form-grid {
        grid-template-columns:1fr
    }

    .field.full {
        grid-column: auto
    }

    .hero h1 {
        font-size: 44px
    }
}

@media (max-width: 600px) {
    .brand-row {
        align-items: flex-start;
        gap: 14px
    }

    .brand {
        font-size: 28px
    }

    .brand-row .outline-btn {
        display: none
    }

    .mast-meta {
        font-size: 11px
    }

    .hero {
        padding: 24px;
        min-height: 430px
    }

    .hero h1 {
        font-size: 38px
    }

    .today {
        grid-template-columns:1fr
    }

    .grid-4 {
        grid-template-columns:1fr
    }

    .admin-head {
        flex-direction: column
    }

    .side-nav {
        grid-template-columns:1fr 1fr
    }

    .ticker em {
        display: none
    }
}

/* produção */
body.admin-body {
    background: #f6f1ea
}

.alert {
    padding: 12px 14px;
    border: 1px solid var(--line);
    margin: 0 0 16px;
    background: #fff
}

.alert.success {
    border-color: #a6c9b6;
    background: #edf7f1;
    color: #24543c
}

.alert.error {
    border-color: #ddb3ae;
    background: #fff1ef;
    color: #7a2e28
}

.install-page, .login-page {
    background: var(--paper);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px
}

.install-card, .login-card {
    width: min(520px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    padding: 30px
}

.install-card h1, .login-card h1 {
    font-family: Georgia, serif;
    font-weight: 400;
    color: var(--brown);
    margin-top: 0
}

.install-card label, .login-card label {
    display: grid;
    gap: 7px;
    margin: 14px 0;
    font-size: 12px;
    font-weight: 700
}

.install-card input, .login-card input {
    padding: 12px;
    border: 1px solid var(--line)
}

.article-shell {
    display: grid;
    grid-template-columns:minmax(0, 760px) minmax(230px, 1fr);
    gap: 46px;
    padding-top: 30px
}

.article-shell-single {
    grid-template-columns:minmax(0, 760px)
}

.article-title {
    font-family: Georgia, serif;
    font-size: 52px;
    line-height: 1.05;
    font-weight: 400;
    margin: 14px 0
}

.article-summary {
    font-family: Georgia, serif;
    font-size: 21px;
    line-height: 1.45;
    color: #5e554e
}

.article-meta {
    font-size: 12px;
    color: var(--muted);
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--line)
}

.article-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 24px 0 8px
}

.caption {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 24px
}

.article-body {
    font-family: Georgia, serif;
    font-size: 19px;
    line-height: 1.75
}

.article-body h2 {
    font-size: 31px;
    font-weight: 400;
    margin-top: 34px
}

.article-body h3 {
    font-size: 24px
}

.article-body blockquote {
    border-left: 3px solid var(--brown);
    margin: 28px 0;
    padding: 8px 0 8px 20px;
    color: #5d4c3d
}

.article-body a {
    text-decoration: underline;
    color: var(--brown-dark)
}

.article-body img, .article-body figure {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    margin: 1.4em auto
}

.article-body figcaption {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    margin-top: 8px
}

.admin-shell a.side-link {
    display: block;
    color: #fff;
    padding: 13px 12px;
    border-radius: 5px;
    font-weight: 700
}

.admin-shell a.side-link.active, .admin-shell a.side-link:hover {
    background: #7b5938
}

.admin-main .panel form {
    margin: 0
}

.btn-link {
    display: inline-block
}

.danger-btn {
    border: 1px solid #b95a50;
    background: #fff;
    color: #8e322a;
    padding: 8px 10px;
    font-weight: 700;
    cursor: pointer
}

.small-btn {
    padding: 8px 10px
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px
}

.filters select, .filters input {
    padding: 10px;
    border: 1px solid var(--line)
}

.thumb {
    width: 78px;
    height: 54px;
    object-fit: cover;
    background: #eee
}

.media-grid {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 14px
}

.media-item {
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px
}

.media-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #eee
}

.muted {
    color: var(--muted)
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px
}

.checkbox-row input {
    width: auto
}

.readonly {
    background: #f6f3ef !important
}

.admin-footer {
    font-size: 11px;
    color: var(--muted);
    padding-top: 10px
}

.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.pagination a {
    border: 1px solid var(--line);
    padding: 7px 10px;
    background: #fff
}

.pagination a.active {
    background: var(--brown);
    color: #fff
}

.ad-slot {
    border: 1px solid var(--line);
    background: #fff;
    padding: 10px;
    text-align: center;
    margin: 22px 0;
    display: flex;
    justify-content: center
}

.ad-slot a {
    display: flex;
    justify-content: center;
    width: 100%
}

.ad-slot img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    object-fit: contain
}

.edition-cover {
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center;
    width: 100%;
    background: #eee
}

.card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

@media (max-width: 900px) {
    .article-shell {
        grid-template-columns:1fr
    }

    .article-title {
        font-size: 42px
    }

    .media-grid {
        grid-template-columns:1fr 1fr
    }
}

@media (max-width: 600px) {
    .article-title {
        font-size: 36px
    }

    .article-body {
        font-size: 18px
    }

    .media-grid {
        grid-template-columns:1fr
    }

    .install-card, .login-card {
        padding: 20px
    }
}