/* =========================================================
   Portal de Notícias — folha de estilo principal
   Temas claro/escuro via [data-theme] no elemento <html>
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
    --bg:            #ffffff;
    --bg-soft:       #f2f4f7;
    --surface:       #ffffff;
    --surface-2:     #f7f8fa;
    --surface-3:     #eef1f5;
    --border:        #e2e6eb;
    --border-2:      #cfd5dd;
    --text:          #0f1319;
    --text-2:        #3d4551;
    --muted:         #6b7480;
    --accent:        #c8102e;
    --accent-ink:    #ffffff;
    --accent-soft:   rgba(200, 16, 46, .10);
    --link:          #0b57d0;
    --ok:            #0f9d58;
    --shadow-sm:     0 1px 2px rgba(15, 19, 25, .06);
    --shadow:        0 2px 10px rgba(15, 19, 25, .08);
    --shadow-lg:     0 12px 32px rgba(15, 19, 25, .12);
    --radius:        10px;
    --radius-lg:     16px;
    --wrap:          1240px;
    --header-h:      64px;
    --font-ui:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-serif:    'Lora', Georgia, 'Times New Roman', serif;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg:            #0d1117;
    --bg-soft:       #090c11;
    --surface:       #151a21;
    --surface-2:     #1a2028;
    --surface-3:     #212933;
    --border:        #262e39;
    --border-2:      #38424f;
    --text:          #e9ecf1;
    --text-2:        #b9c0cc;
    --muted:         #8a93a1;
    --accent:        #ff4d60;
    --accent-ink:    #1a0409;
    --accent-soft:   rgba(255, 77, 96, .14);
    --link:          #7fb0ff;
    --ok:            #2ea36a;
    --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
    --shadow:        0 2px 12px rgba(0, 0, 0, .45);
    --shadow-lg:     0 14px 38px rgba(0, 0, 0, .55);
    color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .2s ease, color .2s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; letter-spacing: -.018em; font-weight: 800; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
time { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 999;
    background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Topbar ---------- */
.topbar {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--muted);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 34px; gap: 16px; }
.topbar__date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__links { display: flex; gap: 16px; flex-shrink: 0; }
.topbar__links a:hover { color: var(--accent); }

/* ---------- 4. Cabeçalho ---------- */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
    .site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: saturate(180%) blur(12px); }
}
.site-header__inner { display: flex; align-items: center; gap: 14px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand:hover { color: inherit; }
.brand__mark {
    width: 38px; height: 38px; border-radius: 9px;
    background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center;
    font-weight: 900; font-size: 21px; letter-spacing: -.04em;
}
.brand__text strong { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; }
.brand__text small { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; }

.site-header__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
    display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 9px;
    background: transparent; border: 1px solid transparent; color: var(--text-2);
    transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.menu-btn { display: none; }

.theme-btn .icon-moon { display: none; }
:root[data-theme="dark"] .theme-btn .icon-sun { display: none; }
:root[data-theme="dark"] .theme-btn .icon-moon { display: block; }

.search {
    display: flex; align-items: center; gap: 6px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 999px; padding: 4px 6px 4px 14px;
    transition: border-color .15s, background .15s;
}
.search:focus-within { border-color: var(--accent); background: var(--surface); }
.search input {
    border: 0; background: transparent; color: var(--text);
    font: inherit; font-size: 14px; width: 190px; padding: 5px 0;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; }
.search button {
    border: 0; background: var(--accent); color: var(--accent-ink);
    width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center;
}
.search--page { padding: 6px 6px 6px 18px; max-width: 520px; margin-top: 16px; }
.search--page input { width: 100%; font-size: 15px; }
.search--page button { width: auto; height: 34px; padding: 0 16px; font-size: 14px; font-weight: 600; }

/* navegação de editorias */
.mainnav { border-top: 1px solid var(--border); background: var(--bg); }
.mainnav__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav__inner::-webkit-scrollbar { display: none; }
.mainnav a {
    position: relative; white-space: nowrap;
    padding: 11px 13px; font-size: 14px; font-weight: 600; color: var(--text-2);
}
.mainnav a::after {
    content: ''; position: absolute; left: 13px; right: 13px; bottom: 0; height: 3px;
    background: var(--cat, var(--accent)); border-radius: 3px 3px 0 0;
    transform: scaleX(0); transform-origin: left; transition: transform .18s ease;
}
.mainnav a:hover { color: var(--text); }
.mainnav a:hover::after, .mainnav a.is-active::after { transform: scaleX(1); }
.mainnav a.is-active { color: var(--text); }

/* ---------- 5. Plantão / urgente ---------- */
.breaking { background: var(--accent); color: var(--accent-ink); }
.breaking__inner { display: flex; align-items: center; gap: 12px; padding: 9px 20px; font-size: 14px; }
.breaking__tag {
    text-transform: uppercase; font-size: 11px; font-weight: 900; letter-spacing: .08em;
    background: rgba(255, 255, 255, .22); padding: 3px 8px; border-radius: 4px; flex-shrink: 0;
}
.breaking a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breaking a:hover { color: inherit; text-decoration: underline; }
.breaking time { margin-left: auto; font-size: 12px; opacity: .85; flex-shrink: 0; }

/* ---------- 6. Menu lateral (mobile) ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5); }
.drawer[hidden] { display: none; }
.drawer__panel {
    width: min(320px, 86vw); height: 100%; background: var(--bg);
    padding: 18px; overflow-y: auto; box-shadow: var(--shadow-lg);
    animation: slideIn .2s ease;
}
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer__head strong { font-size: 19px; font-weight: 900; }
.search--drawer { padding: 5px 6px 5px 14px; }
.search--drawer input { width: 100%; }
.search--drawer button { width: auto; padding: 0 14px; font-size: 13px; }
.drawer__nav { display: flex; flex-direction: column; margin-top: 18px; }
.drawer__nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 8px; border-radius: 8px; font-weight: 600; font-size: 15px;
}
.drawer__nav a:hover { background: var(--surface-2); }
.drawer__nav hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; width: 100%; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ---------- 7. Layout de página ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-block: 32px 48px; }
.layout__main { min-width: 0; }
.sidebar {
    display: flex; flex-direction: column; gap: 24px;
    align-self: start; position: sticky; top: calc(var(--header-h) + 16px);
}

.section-title { font-size: 19px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.section-title--cat { padding-left: 12px; border-left: 5px solid var(--cat, var(--accent)); }
.section-link { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.section-link:hover { color: var(--accent); }

.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
    70%  { box-shadow: 0 0 0 9px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---------- 8. Capa: manchetes ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    grid-template-areas: 'main side' 'list list';
    gap: 28px;
    padding-block: 28px 8px;
}
.hero__main { grid-area: main; }
.hero__side { grid-area: side; display: flex; flex-direction: column; gap: 22px; }
.hero__list {
    grid-area: list; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0 28px; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 18px;
}

.lead { display: flex; flex-direction: column; gap: 14px; }
.lead__media { display: block; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-3); aspect-ratio: 16 / 9; }
.lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.lead:hover .lead__media img { transform: scale(1.035); }
.lead__title { font-size: clamp(28px, 3.4vw, 42px); font-weight: 900; letter-spacing: -.035em; line-height: 1.08; }
.lead__title a:hover { color: var(--accent); }
.lead__dek { color: var(--text-2); font-size: 17px; margin: 0; }

/* ---------- 9. Cards ---------- */
.card { display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.card__media {
    display: block; overflow: hidden; border-radius: var(--radius);
    background: var(--surface-3); aspect-ratio: 16 / 9; position: relative;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card__media img { transform: scale(1.05); }
.card__flag {
    position: absolute; top: 10px; left: 10px;
    background: var(--accent); color: var(--accent-ink);
    font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
    padding: 4px 8px; border-radius: 4px;
}
.card__body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.card__cat {
    align-self: flex-start;
    font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
    color: var(--cat, var(--accent));
}
.card__cat:hover { text-decoration: underline; color: var(--cat, var(--accent)); }
.card__title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; line-height: 1.28; }
.card__title a:hover { color: var(--accent); }
.card__dek { color: var(--text-2); font-size: 14.5px; margin: 0; }
.card__meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }

.card--lead .card__title { font-size: clamp(20px, 2vw, 24px); font-weight: 800; }
.card--sm .card__title { font-size: 16px; }

.card--text { border-top: 3px solid var(--cat, var(--accent)); padding-top: 12px; padding-bottom: 18px; }
.card--text .card__title { font-size: 16.5px; }

.card--row {
    flex-direction: row-reverse; gap: 16px; align-items: flex-start;
    padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.card--row .card__media { width: 168px; flex-shrink: 0; }
.card--row .card__title { font-size: 17.5px; }

/* ---------- 10. Régua de últimas ---------- */
.strip { background: var(--surface-2); border-block: 1px solid var(--border); padding-block: 22px; }
.strip--bottom { margin-top: 8px; }
.strip__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.strip__rail {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr);
    gap: 20px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px;
}
.strip__rail::-webkit-scrollbar { height: 6px; }
.strip__rail::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
.mini {
    scroll-snap-align: start; display: flex; flex-direction: column; gap: 5px;
    padding-left: 14px; border-left: 3px solid var(--cat, var(--accent));
}
.mini time { font-size: 12px; font-weight: 700; color: var(--accent); }
.mini__cat { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.mini a { font-size: 15px; font-weight: 600; line-height: 1.34; }

/* ---------- 11. Blocos de editoria ---------- */
.block { margin-bottom: 44px; }
.block__head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid var(--border);
}
.block__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.block__grid > .card--lead { grid-row: span 3; }
.block__grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.block__grid--4 > .card { grid-row: auto; }
.rows { display: flex; flex-direction: column; gap: 18px; }

.grid-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 26px; }
.grid-cards > .card--lead { grid-column: 1 / -1; }
.grid-cards > .card--lead .card__media { aspect-ratio: 21 / 9; }

/* ---------- 12. Sidebar ---------- */
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.box__title { font-size: 16px; font-weight: 800; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); }
.box p { font-size: 14px; color: var(--text-2); }

.ranked { display: flex; flex-direction: column; }
.ranked li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.ranked li:last-child { border-bottom: 0; padding-bottom: 0; }
.ranked__n { font-size: 22px; font-weight: 900; color: var(--accent); line-height: 1; width: 24px; flex-shrink: 0; opacity: .8; }
.ranked a { font-size: 14.5px; font-weight: 600; line-height: 1.35; display: block; }
.ranked__meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .05em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.chip:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input {
    flex: 1; min-width: 0; padding: 10px 12px; font: inherit; font-size: 14px;
    background: var(--bg); border: 1px solid var(--border-2); border-radius: 8px; color: var(--text);
}
.newsletter button {
    border: 0; background: var(--accent); color: var(--accent-ink);
    padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.newsletter button:hover { filter: brightness(1.08); }
.newsletter--side { flex-direction: column; }
.newsletter--side button { width: 100%; }

.ad {
    background: var(--surface-2); border: 1px dashed var(--border-2); border-radius: var(--radius);
    min-height: 90px; display: grid; place-items: center; color: var(--muted); font-size: 13px;
}
.ad--header { margin-top: 18px; }

/* ---------- 13. Página de notícia ---------- */
.layout--article { padding-top: 24px; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }

.post { max-width: 760px; }
.post__flag {
    display: inline-block; background: var(--accent); color: var(--accent-ink);
    font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em;
    padding: 4px 9px; border-radius: 4px; margin-bottom: 10px;
}
.post__head { margin-bottom: 24px; }
.post__title { font-size: clamp(30px, 4vw, 46px); font-weight: 900; letter-spacing: -.035em; line-height: 1.07; margin: 8px 0 14px; }
.post__dek { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); font-weight: 400; line-height: 1.45; margin: 0 0 20px; }

.post__byline {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
    padding: 14px 0; border-block: 1px solid var(--border);
}
.post__author { display: flex; align-items: center; gap: 11px; font-size: 13.5px; }
.post__author strong { display: block; font-weight: 700; }
.post__author span { color: var(--muted); font-size: 12.5px; }
.avatar {
    width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center; font-weight: 800; font-size: 16px; flex-shrink: 0;
}

.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share__btn {
    font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.share__btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.share--bottom { margin: 28px 0; padding-top: 20px; border-top: 1px solid var(--border); }
.share--bottom > span { font-size: 14px; font-weight: 700; margin-right: 4px; }

.post__figure { margin: 0 0 28px; }
.post__figure img { width: 100%; border-radius: var(--radius-lg); background: var(--surface-3); }
.post__figure figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-left: 2px; }

.post__content { font-family: var(--font-serif); font-size: 19px; line-height: 1.72; color: var(--text); }
.post__content p { margin: 0 0 1.15em; }
.post__content h2 { font-family: var(--font-ui); font-size: 25px; font-weight: 800; margin: 1.7em 0 .6em; letter-spacing: -.02em; }
.post__content h3 { font-family: var(--font-ui); font-size: 21px; font-weight: 700; margin: 1.5em 0 .5em; }
.post__content a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.post__content ul, .post__content ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.post__content ul { list-style: disc; }
.post__content ol { list-style: decimal; }
.post__content li { margin-bottom: .5em; }
.post__content img { border-radius: var(--radius); margin: 1.5em 0; }
.post__content blockquote {
    margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--accent);
    font-size: 21px; font-style: italic; color: var(--text-2);
}
.post__content figure { margin: 1.6em 0; }
.post__content figcaption { font-family: var(--font-ui); font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.post__content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.post__content table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 15px; margin: 1.4em 0; }
.post__content th, .post__content td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.post__content th { background: var(--surface-2); font-weight: 700; }

.post__source {
    font-size: 13.5px; color: var(--muted); padding: 12px 16px; background: var(--surface-2);
    border-radius: var(--radius); border-left: 3px solid var(--border-2);
}
.post__source a { color: var(--link); text-decoration: underline; }

.post__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 24px 0; }
.post__tags > span { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

.block--related { margin-top: 40px; padding-top: 8px; }

/* ---------- 14. Paginação, avisos, erros ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; margin-top: 40px; }
.pager a, .pager span {
    min-width: 40px; height: 40px; padding: 0 13px; border-radius: 9px;
    display: inline-grid; place-items: center; font-size: 14px; font-weight: 600;
    border: 1px solid var(--border); background: var(--surface);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pager__gap { border: 0; background: transparent; min-width: 20px; }

.flash { background: var(--ok); color: #fff; font-size: 14.5px; font-weight: 600; }
.flash--error { background: var(--accent); color: var(--accent-ink); }
.flash .wrap { padding-block: 11px; }

.empty {
    padding: 48px 20px; text-align: center; color: var(--muted); background: var(--surface-2);
    border: 1px dashed var(--border-2); border-radius: var(--radius-lg);
}

.page-head { padding: 30px 0 8px; border-bottom: 3px solid var(--cat, var(--accent)); margin-bottom: 4px; }
.page-head__title { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; letter-spacing: -.03em; }
.page-head__sub { color: var(--text-2); margin: 8px 0 18px; font-size: 16px; }

.error-page { text-align: center; padding: 80px 20px 100px; }
.error-page__code { font-size: 78px; font-weight: 900; color: var(--accent); letter-spacing: -.05em; line-height: 1; }
.error-page h1 { font-size: 28px; margin: 12px 0; }
.error-page p { color: var(--text-2); max-width: 480px; margin: 0 auto 24px; }
.error-page__actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 9px;
    background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14.5px; border: 1px solid var(--accent);
}
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }

.to-top {
    position: fixed; right: 18px; bottom: 18px; z-index: 70;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); display: grid; place-items: center;
    box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.to-top.is-visible { opacity: 1; transform: none; }
.to-top[hidden] { display: none; }

/* ---------- 15. Rodapé ---------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--border); margin-top: 40px; padding-block: 44px 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; }
.site-footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.site-footer__brand p { font-size: 14px; color: var(--text-2); margin: 14px 0; max-width: 40ch; }
.brand--footer { margin-bottom: 4px; }
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a {
    font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--border-2); color: var(--text-2);
}
.social a:hover { border-color: var(--accent); color: var(--accent); }
.site-footer__news p { font-size: 14px; color: var(--text-2); }
.site-footer__bottom {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
    margin-top: 36px; padding: 18px 0; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted);
}

/* ---------- 16. Responsivo ---------- */
@media (max-width: 1080px) {
    .layout { grid-template-columns: 1fr; gap: 32px; }
    .sidebar { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .post { max-width: none; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 880px) {
    .hero { grid-template-columns: 1fr; grid-template-areas: 'main' 'side' 'list'; gap: 24px; }
    .hero__side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
    .block__grid { grid-template-columns: 1fr; }
    .block__grid > .card--lead { grid-row: auto; }
    .block__grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search { display: none; }
    .menu-btn { display: grid; }
    .topbar__date { display: none; }
}

@media (max-width: 560px) {
    .brand__mark { width: 34px; height: 34px; font-size: 18px; }
    .brand__text strong { font-size: 17px; }
    .brand__text small { display: none; }
    .grid-cards, .block__grid--4 { grid-template-columns: 1fr; }
    .card--row { flex-direction: column-reverse; }
    .card--row .card__media { width: 100%; }
    .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
    .post__content { font-size: 18px; }
    .layout { padding-block: 22px 34px; }
    .breaking time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

@media print {
    .topbar, .site-header, .breaking, .sidebar, .site-footer, .share, .to-top, .strip, .progress { display: none !important; }
    body { background: #fff; color: #000; }
    .post__content { font-size: 12pt; }
}

/* logo enviado pelo painel — troca com o tema quando há as duas versões */
.brand__logo { max-height: 46px; max-width: 300px; width: auto; object-fit: contain; }
.brand__logo--escuro { display: none; }
:root[data-theme="dark"] .brand__logo--claro { display: none; }
:root[data-theme="dark"] .brand__logo--escuro { display: block; }
@media (max-width: 560px) { .brand__logo { max-height: 36px; max-width: 190px; } }
