/* Portal Sul MA — revisão editorial Sky, 18/10/2026.
   Fontes locais; CSS Vanilla; contratos de app.js preservados. */
@font-face {
  font-family: "Alfa Slab One";
  src: url("assets/fonts/alfa-slab-one-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-500.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-600.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-700.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter-800.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Slab";
  src: url("assets/fonts/roboto-slab-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root, html[data-theme="light"] {
  color-scheme: light;
  --paper: #fff;
  --surface: #fff;
  --ink: #111c2e;
  --muted: #405169;
  --line: #aeb9c6;
  --soft-line: #dce2e9;
  --blue: #0865d1;
  --red: #b51c28;
  --navy: #071a33;
  --focus: #0865d1;
  --max: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 3px;
  --card-pad: clamp(22px, 2.4vw, 34px);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Alfa Slab One", Rockwell, Georgia, serif;
  --headline: "Roboto Slab", Rockwell, Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Charter, Georgia, serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #050d17;
  --surface: #0c1929;
  --ink: #edf2f8;
  --muted: #b0bed0;
  --line: #526378;
  --soft-line: #2c3d53;
  --blue: #79b7ff;
  --red: #ff8c94;
  --navy: #030b15;
  --focus: #90c5ff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 220px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
:where(h1, h2, h3, h4, p, span, small, strong, b, em, dt, dd, li, label, summary) { color: inherit; }
button, input { font: inherit; color: inherit; }
button, a, summary { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration-thickness: .065em; text-underline-offset: .2em; }
img { display: block; max-width: 100%; }
.shell { width: min(calc(100% - var(--pad) * 2), var(--max)); margin-inline: auto; }
:where(h1, h2, h3, p, dd, li, a) { overflow-wrap: anywhere; }
:where(.hero-copy, .story-content, .controls-grid > *, .section-heading > *, .method > *, .footer-grid > *) { min-width: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link {
  position: fixed;
  left: 16px;
  top: -140px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--surface);
  border: 2px solid var(--focus);
  font-weight: 700;
}
.skip-link:focus { top: 16px; }
.status-ribbon {
  min-height: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 16px;
  padding: 10px var(--pad);
  background: #b71d29;
  color: #fff;
  font-size: .6875rem;
  line-height: 1.55;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-align: center;
}
.status-ribbon strong { font-weight: 800; }
.site-header { background: var(--navy); color: #fff; border-bottom: 1px solid #29425f; }
.masthead {
  display: grid;
  grid-template-columns: minmax(200px, 350px) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  min-height: 132px;
  padding-block: 20px;
}
.brand { display: block; width: min(350px, 100%); padding: 4px 0; }
.brand img, .footer-grid img { width: 100%; height: auto; aspect-ratio: 1390 / 575; object-fit: contain; }
.edition-kicker { margin: 0; color: #b9c6d8; font-size: .6875rem; line-height: 1.9; letter-spacing: .07em; text-transform: uppercase; }
.edition-kicker strong { color: #fff; font-weight: 600; }
.compact-button, .layout-switcher button, .filters button, .carousel-controls button {
  min-height: 44px;
  min-width: 44px;
  padding: 11px 15px;
  border: 1px solid var(--soft-line);
  border-radius: var(--radius);
  background: transparent;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .055em;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.compact-button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; color: #fff; border-color: #64738a; }
.compact-button > [aria-hidden] { font-size: 1.125rem; line-height: 1; flex: 0 0 auto; }
.compact-button:hover, .compact-button[aria-pressed="true"] { background: #fff; color: #071a33; border-color: #fff; }
.section-nav { border-top: 1px solid #29425f; }
.nav-scroll { display: flex; gap: clamp(18px, 3vw, 34px); overflow-x: auto; scrollbar-width: thin; scroll-padding-inline: 4px; padding: 4px; }
.nav-scroll a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 4px; flex: 0 0 auto; white-space: nowrap; text-decoration: none; font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.nav-scroll a:hover { text-decoration: underline; text-decoration-color: #79b7ff; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, .28fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  min-height: 420px;
  padding-block: clamp(44px, 6vw, 84px);
  border-bottom: 2px solid var(--ink);
}
.eyebrow, .control-label {
  margin: 0 0 12px;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--muted); margin-bottom: 22px; }
.hero h1 {
  color: var(--ink);
  max-width: 19ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 4.6vw, 4.8rem);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.18;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p:last-child { max-width: 56ch; margin: 26px 0 0; color: var(--muted); font-family: var(--serif); font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.6; }
.hero-signal { justify-self: end; width: min(220px, 100%); aspect-ratio: 1; display: grid; place-content: center; gap: 18px; padding: 26px; text-align: center; background: #0865d1; color: #fff; clip-path: polygon(50% 0, 100% 17%, 91% 78%, 50% 100%, 9% 78%, 0 17%); }
.hero-signal span { font-family: var(--display); font-weight: 400; font-size: clamp(3rem, 5.5vw, 5rem); line-height: 1; letter-spacing: -.04em; }
.hero-signal b { font-weight: 600; font-size: .6875rem; letter-spacing: .2em; }
.hero-signal i { width: 42px; border-top: 2px solid; margin: 0 auto; }
.control-deck { position: sticky; top: 0; z-index: 20; background: var(--surface); background: color-mix(in srgb, var(--surface) 97%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--soft-line); }
.controls-grid { display: grid; grid-template-columns: 1.15fr .9fr 1.15fr; gap: 24px; align-items: start; padding-block: 22px; }
.control-label, .search-panel label { display: block; margin: 0 0 10px; color: var(--muted); font-size: .625rem; font-weight: 700; letter-spacing: .1em; line-height: 1.5; text-transform: uppercase; }
.layout-switcher, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.layout-switcher button span { color: var(--muted); margin-right: 5px; font-variant-numeric: tabular-nums; }
.layout-switcher button:hover, .filters button:hover { background: color-mix(in srgb, var(--blue) 7%, var(--surface)); border-color: var(--blue); }
.layout-switcher button[aria-pressed="true"], .filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.layout-switcher button[aria-pressed="true"] span { color: inherit; opacity: .8; }
.search-panel input { width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid var(--soft-line); border-radius: var(--radius); background: var(--surface); font-size: 1rem; line-height: 1.4; }
.search-panel input::placeholder { color: var(--muted); opacity: 1; }
.stories { padding-block: clamp(40px, 5vw, 72px) clamp(56px, 7vw, 96px); }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px 24px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-heading .eyebrow { color: var(--muted); }
.section-heading h2 { color: var(--ink); margin: 0; font-family: var(--display); font-size: clamp(1.75rem, 3.3vw, 3.125rem); font-weight: 400; font-synthesis: none; line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; }
.section-heading > p { margin: 0 0 4px; color: var(--muted); font-size: .75rem; font-weight: 500; }
.story-grid { display: grid; gap: 20px; align-items: start; }
.story-card { --accent: var(--blue); position: relative; min-width: 0; padding: var(--card-pad); border: 1px solid var(--soft-line); background: var(--surface); border-radius: var(--radius); transition: border-color .16s ease; }
.story-card:hover { border-color: var(--line); }
.story-card[data-tone="red"] { --accent: var(--red); }
.story-card[data-tone="blue"] { --accent: var(--blue); }
.story-media { position: relative; display: block; overflow: hidden; min-height: 140px; margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 24px; border-bottom: 1px solid var(--soft-line); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.story-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-media::before { content: ""; position: absolute; inset: 20px; border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.story-media::after { content: attr(data-index); position: absolute; right: 24px; bottom: 16px; font-family: var(--display); font-size: clamp(3.25rem, 6vw, 5.5rem); line-height: 1; color: var(--accent); opacity: .28; }
.card-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 14px; }
.tag, .status { font-size: .625rem; line-height: 1.6; font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
.tag { color: var(--accent); }
.status { max-width: 100%; padding: 5px 9px; border: 1px solid var(--soft-line); border-radius: 2px; color: var(--muted); }
.story-card h3 { color: var(--ink); margin: 20px 0 14px; font-family: var(--headline); font-size: clamp(1.5rem, 2.3vw, 2.25rem); font-weight: 700; line-height: 1.22; letter-spacing: -.02em; text-wrap: pretty; }
.story-card .summary { margin: 0 0 24px; color: var(--muted); font-size: .9375rem; line-height: 1.7; }
.card-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; padding-block: 14px; border-block: 1px solid var(--soft-line); color: var(--muted); font-size: .6875rem; line-height: 1.7; font-weight: 500; }
.caveat { margin: 20px 0 0; padding: 15px 16px; border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); font-size: .8125rem; line-height: 1.7; }
.story-details { margin-top: 22px; border-top: 1px solid var(--soft-line); }
.story-details summary { min-height: 44px; padding: 14px 4px; font-weight: 600; font-size: .6875rem; line-height: 1.6; text-transform: uppercase; letter-spacing: .065em; cursor: pointer; }
.story-details summary::marker { color: var(--accent); }
.story-details dl { display: grid; grid-template-columns: minmax(0, .4fr) minmax(0, 1fr); gap: 10px 16px; margin: 10px 0 20px; font-size: .75rem; line-height: 1.7; }
.story-details dt { font-weight: 700; }
.story-details dd { margin: 0; color: var(--muted); }
.sources { margin: 0; padding-left: 20px; font-size: .75rem; line-height: 1.7; }
.sources li + li { margin-top: 12px; }
.sources a { display: inline-block; padding-block: 8px; }
.sources small { display: block; color: var(--muted); font-size: .6875rem; }
.publication-lock { margin: 20px 0 0; color: var(--red); font-size: .625rem; font-weight: 700; line-height: 1.7; letter-spacing: .07em; text-transform: uppercase; }
/* Pulse: destaque + coluna lateral; sequência natural para resultados filtrados. */
body[data-layout="pulse"] .story-grid { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
body[data-layout="pulse"] .story-card:first-child { grid-row: span 2; }
body[data-layout="pulse"] .story-card:first-child .story-media { min-height: 260px; }
body[data-layout="pulse"] .story-card:first-child h3 { font-size: clamp(2rem, 3.5vw, 3.5rem); }
body[data-layout="pulse"] .story-card:nth-child(4) { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); gap: var(--card-pad); }
body[data-layout="pulse"] .story-card:nth-child(4) .story-media { margin: calc(-1 * var(--card-pad)) 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)); min-height: 240px; border-bottom: 0; border-right: 1px solid var(--soft-line); }
/* Ledger: colunas de jornal, sem forçar os títulos em maiúsculas. */
body[data-layout="ledger"] .hero { min-height: 300px; padding-block: 44px; }
body[data-layout="ledger"] .hero h1 { font-size: clamp(2.5rem, 4vw, 4rem); }
body[data-layout="ledger"] .hero-signal { width: 170px; }
body[data-layout="ledger"] .story-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
body[data-layout="ledger"] .story-card { --card-pad: 22px; }
body[data-layout="ledger"] .story-media { min-height: 110px; }
body[data-layout="ledger"] .story-card h3 { font-family: var(--headline); font-size: clamp(1.25rem, 1.6vw, 1.625rem); font-weight: 700; font-synthesis: none; line-height: 1.4; letter-spacing: -.015em; }
body[data-layout="ledger"] .summary { font-size: .875rem; }
body[data-layout="ledger"] .story-details dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
body[data-layout="ledger"] .story-details dd + dt { margin-top: 8px; }
/* Horizon: capítulos alternados. */
body[data-layout="horizon"] .hero { grid-template-columns: minmax(0, 1fr); min-height: 420px; text-align: center; place-items: center; }
body[data-layout="horizon"] .hero-copy { display: grid; justify-items: center; }
body[data-layout="horizon"] .hero h1 { max-width: 23ch; }
body[data-layout="horizon"] .hero-signal { display: none; }
body[data-layout="horizon"] .story-grid { gap: 28px; }
body[data-layout="horizon"] .story-card { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); min-height: 330px; padding: 0; }
body[data-layout="horizon"] .story-card:nth-child(even) { grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); }
body[data-layout="horizon"] .story-card:nth-child(even) .story-media { order: 2; border-right: 0; border-left: 1px solid var(--soft-line); }
body[data-layout="horizon"] .story-media { margin: 0; min-height: 100%; border-bottom: 0; border-right: 1px solid var(--soft-line); }
body[data-layout="horizon"] .story-content { padding: clamp(24px, 4vw, 48px); }
body[data-layout="horizon"] .story-card h3 { max-width: 28ch; font-size: clamp(1.875rem, 3vw, 3rem); }
.radar { background: var(--navy); color: #fff; padding-block: clamp(44px, 6vw, 76px); }
.radar .section-heading h2 { color: #fff; }
.radar .section-heading { border-color: #40536c; align-items: center; }
.radar .eyebrow { color: #b2c3d8; }
.carousel-controls { display: flex; flex: 0 0 auto; gap: 10px; padding: 4px; }
.carousel-controls button { display: grid; place-items: center; width: 48px; height: 48px; padding: 10px; color: #fff; border-color: #64738a; font-size: 1.25rem; line-height: 1; }
.carousel-controls button:hover { background: #fff; color: #071a33; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 36%); gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 5px; padding: 6px 5px 22px; scrollbar-color: #79b7ff #21364e; }
.radar-card { min-width: 0; scroll-snap-align: start; min-height: 290px; padding: clamp(22px, 2.5vw, 32px); background: #10243c; border: 1px solid #334960; border-top: 3px solid #79b7ff; }
.radar-card small { color: #becce0; font-size: .625rem; line-height: 1.8; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.radar-card h3 { color: #fff; margin: 20px 0 14px; font-family: var(--headline); font-size: clamp(1.5rem, 2vw, 1.875rem); line-height: 1.25; letter-spacing: -.015em;  font-weight: 700; }
.radar-card p { color: #cbd6e5; font-size: .875rem; line-height: 1.7; }
.radar-card strong { display: block; margin-top: 22px; color: #fff; font-size: .75rem; font-weight: 600; }
.carousel-help { margin: 14px 5px 0; font-size: .75rem; color: #bdcbdd; }
.method { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 88px); padding-block: clamp(52px, 7vw, 96px); }
.method h2 { color: var(--ink); margin: 0; font-family: var(--display); font-size: clamp(2rem, 3.5vw, 3.5rem); font-weight: 400; font-synthesis: none; line-height: 1.3; letter-spacing: -.025em; text-wrap: balance; }
.method-copy { max-width: 64ch; font-family: var(--serif); font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.75; }
.method-copy p:first-child { margin-top: 0; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; padding-block: 10px; font-family: var(--sans); font-weight: 700; font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; }
.site-footer { background: #050d17; color: #fff; border-top: 3px solid #b71d29; padding-block: 40px; }
.footer-grid { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto; align-items: center; gap: 32px; }
.footer-grid p { max-width: 52ch; color: #bbc8da; font-size: .75rem; line-height: 1.8; }
.footer-grid > a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 10px; font-size: .75rem; }
.empty-state { grid-column: 1 / -1; display: grid; gap: 10px; padding: clamp(28px, 6vw, 64px); border: 1px dashed var(--line); text-align: center; }
.empty-state span { color: var(--muted); }
.noscript { padding: 24px; background: #0865d1; color: #fff; font-weight: 600; }
/* Templates de artigo: estilos antes duplicados no HTML gerado. */
.article-hero { padding-block: clamp(40px, 6vw, 72px); border-bottom: 2px solid var(--ink); text-align: center; }
.article-hero h1 { color: var(--ink); max-width: 24ch; margin: 0 auto; font-family: var(--headline); font-size: clamp(2rem, 4vw, 4rem); font-weight: 700; font-synthesis: none; line-height: 1.3; letter-spacing: -.02em; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-top: 26px; color: var(--muted); font-size: .8125rem; }
.article-meta span { font-weight: 600; }
.article-body { max-width: 70ch; margin-inline: auto; }
.article-media { width: min(calc(100% - var(--pad) * 2), 1120px); margin: clamp(28px, 5vw, 56px) auto 0; }
.article-media img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border: 1px solid var(--soft-line); }
.article-media figcaption { margin-top: 8px; color: var(--muted); font-size: .75rem; }
.editorial-disclosure { max-width: 70ch; margin: 32px auto 0; padding: 18px 20px; border-left: 3px solid var(--blue); background: color-mix(in srgb, var(--blue) 7%, var(--surface)); color: var(--muted); font-family: var(--sans); font-size: .875rem; }
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-track { background: #21364e; border-radius: 4px; }
.carousel::-webkit-scrollbar-thumb { background: #79b7ff; border-radius: 4px; }
@media (min-width: 1101px) and (max-width: 1270px) {
  .controls-grid { grid-template-columns: 1fr 1fr; }
  .filter-panel { grid-column: 1 / -1; }
}
@media (max-width: 1100px) {
  .masthead { grid-template-columns: minmax(180px, 300px) minmax(0, 1fr) auto; gap: 20px; }
  .controls-grid { grid-template-columns: 1fr 1fr; gap: 20px 24px; }
  .controls-grid > div:first-child { grid-column: 1 / -1; }
  .control-deck { position: static; }
  html { scroll-padding-top: 24px; }
  body[data-layout="ledger"] .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  body[data-layout="ledger"] .story-card h3 { font-size: 1.5rem; }
  .carousel { grid-auto-columns: minmax(0, 54%); }
}
@media (max-width: 800px) {
  .masthead { grid-template-columns: minmax(0, 1fr) auto; min-height: 100px; padding-block: 16px; }
  .brand { max-width: 280px; }
  .edition-kicker { display: none; }
  .hero, body[data-layout="ledger"] .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-block: 44px; }
  .hero h1, body[data-layout="ledger"] .hero h1 { font-size: clamp(2.125rem, 5.5vw, 3.25rem); }
  .hero-signal { display: none; }
  body[data-layout="pulse"] .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-layout="pulse"] .story-card:first-child { grid-column: 1 / -1; grid-row: auto; }
  body[data-layout="pulse"] .story-card:nth-child(4) { grid-template-columns: minmax(0, 1fr); }
  body[data-layout="pulse"] .story-card:nth-child(4) .story-media { margin: calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)) 0; min-height: 150px; border-right: 0; border-bottom: 1px solid var(--soft-line); }
  .method { gap: 32px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 32px; }
  .footer-grid > a { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 600px) {
  :root { --pad: 20px; --card-pad: 22px; }
  .status-ribbon { display: block; font-size: .625rem; padding-block: 9px; }
  .status-ribbon span { display: block; margin-top: 3px; }
  .masthead { gap: 16px; }
  .brand { max-width: 235px; }
  .article-hero { width: 100%; padding-inline: var(--pad); }
  .article-hero h1 { max-width: 100%; font-size: clamp(1.8rem, 8vw, 2.5rem); overflow-wrap: anywhere; }
  .article-media { width: calc(100% - var(--pad) * 2); }
  /* Manter o nome acessível do botão quando o rótulo visual fica oculto. */
  .compact-button [data-theme-label] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .compact-button { width: 46px; height: 46px; padding: 10px; }
  .nav-scroll { gap: 18px; }
  .hero h1, body[data-layout="ledger"] .hero h1 { font-size: clamp(1.875rem, 7.1vw, 2.75rem); line-height: 1.25; }
  .hero .eyebrow { font-size: .625rem; }
  .hero-copy > p:last-child { margin-top: 22px; font-size: 1.125rem; }
  .controls-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .controls-grid > div:first-child { grid-column: auto; }
  .layout-switcher button { flex: 1 1 80px; padding-inline: 10px; }
  .filters button { flex: 1 1 auto; padding-inline: 12px; }
  .section-heading { gap: 16px; padding-bottom: 20px; margin-bottom: 22px; }
  .section-heading h2 { font-size: clamp(1.5rem, 6.5vw, 2.25rem); }
  body[data-layout="pulse"] .story-grid, body[data-layout="ledger"] .story-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  body[data-layout="pulse"] .story-card:first-child, body[data-layout="pulse"] .story-card:nth-child(4) { grid-column: auto; grid-row: auto; }
  body[data-layout="pulse"] .story-card:nth-child(4) { display: block; }
  body[data-layout="pulse"] .story-card:nth-child(4) .story-media { margin-bottom: 24px; }
  body[data-layout="pulse"] .story-card:first-child .story-media { min-height: 180px; }
  body[data-layout="pulse"] .story-card:first-child h3 { font-size: clamp(1.875rem, 6.5vw, 2.5rem); }
  .story-card h3 { font-size: 1.625rem; }
  .story-details dl { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .story-details dd + dt { margin-top: 8px; }
  body[data-layout="horizon"] .hero { min-height: 0; }
  body[data-layout="horizon"] .story-card, body[data-layout="horizon"] .story-card:nth-child(even) { display: flex; flex-direction: column; min-height: 0; }
  body[data-layout="horizon"] .story-media, body[data-layout="horizon"] .story-card:nth-child(even) .story-media { order: 0; min-height: 170px; border: 0; border-bottom: 1px solid var(--soft-line); }
  body[data-layout="horizon"] .story-content { padding: var(--card-pad); }
  body[data-layout="horizon"] .story-card h3 { font-size: 1.75rem; }
  .radar .section-heading { align-items: start; }
  .carousel { grid-auto-columns: minmax(0, 88%); }
  .method { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .method h2 { font-size: clamp(1.875rem, 7vw, 2.75rem); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .footer-grid img { max-width: 260px; }
}

/* Contraste explícito no tema claro, inclusive em prévias incorporadas. */
html[data-theme="light"] .story-card,
html[data-theme="light"] .method { color: var(--ink); }
html[data-theme="light"] .story-card .status {
  color: #405169;
  background: #f3f5f8;
  border-color: #bac5d2;
}
html[data-theme="light"] .story-media::after { opacity: 1; color: var(--accent); }
html[data-theme="light"] .story-media { background: color-mix(in srgb, var(--accent) 4%, #fff); }
html[data-theme="light"] .story-media::before { border-top-color: var(--accent); }
html[data-theme="light"] .tag,
html[data-theme="light"] .publication-lock { opacity: 1; }

/* Movimento nativo: entrada, troca de composição e feedback de interação. */
@keyframes portal-title-in {
  from { opacity: .35; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes portal-pulse-in {
  from { opacity: .45; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes portal-ledger-in {
  from { opacity: .45; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes portal-horizon-in {
  from { opacity: .45; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes portal-detail-in {
  from { opacity: .5; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: portal-title-in .6s cubic-bezier(.22, 1, .36, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .07s; }
  .hero-copy > :nth-child(3) { animation-delay: .14s; }
  .story-card {
    animation-duration: .48s;
    animation-timing-function: cubic-bezier(.22, 1, .36, 1);
    /* Não manter transform ao finalizar: o hover continua independente. */
    animation-fill-mode: backwards;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  }
  body[data-layout="pulse"] .story-card { animation-name: portal-pulse-in; }
  body[data-layout="ledger"] .story-card { animation-name: portal-ledger-in; }
  body[data-layout="horizon"] .story-card { animation-name: portal-horizon-in; }
  .story-card:nth-child(2) { animation-delay: .06s; }
  .story-card:nth-child(3) { animation-delay: .12s; }
  .story-card:nth-child(4) { animation-delay: .18s; }
  .radar-card { transition: transform .22s ease, border-color .22s ease; }
  .carousel-controls button { transition: transform .18s ease, background .18s ease, color .18s ease; }
  .compact-button > [aria-hidden] { transition: transform .32s ease; }
  .compact-button[aria-pressed="true"] > [aria-hidden] { transform: rotate(180deg); }
  .story-details[open] > dl, .story-details[open] > ul { animation: portal-detail-in .25s ease; }
  .layout-switcher button:active, .filters button:active { transform: translateY(1px); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .story-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px color-mix(in srgb, var(--ink) 6%, transparent); }
  .radar-card:hover { transform: translateY(-4px); border-color: #79b7ff; }
  .carousel-controls button[data-carousel-prev]:hover { transform: translateX(-2px); }
  .carousel-controls button[data-carousel-next]:hover { transform: translateX(2px); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .method > *, .radar .section-heading {
      animation: portal-title-in .6s linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 25%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .layout-switcher button[aria-pressed="true"], .filters button[aria-pressed="true"] { outline: 2px solid Highlight; outline-offset: -4px; }
}
@media print {
  :root { --paper: #fff; --surface: #fff; --ink: #000; --muted: #444; --soft-line: #ccc; }
  html[data-theme="dark"] { --paper: #fff; --surface: #fff; --ink: #000; --muted: #444; }
  .status-ribbon, .control-deck, .radar, .site-footer, .theme-toggle, .section-nav { display: none !important; }
  .hero { min-height: 0; border-bottom: 1px solid #ccc; }
  .story-grid, body[data-layout] .story-grid { display: block; }
  .story-card, body[data-layout] .story-card { display: block; break-inside: avoid; margin-bottom: 20px; border: 1px solid #ccc; }
  .story-media { display: none !important; }
  .story-content, body[data-layout="horizon"] .story-content { padding: 0; }
}
